Browse Source

feat: 商用工程登录总表

zh 2 years ago
parent
commit
1c53aa8f8c

+ 17 - 0
src/api/summaryTable.js

@@ -0,0 +1,17 @@
+import request, { postBlob } from '@/utils/request'
+
+export function getLoginList(params) {
+  return request({
+    url: `/trade/login/order/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportLogin(data, name) {
+  return postBlob({
+    url: '/trade/login/order/export',
+    data,
+    name
+  })
+}

+ 70 - 0
src/views/commercialEngineering/summaryTable/summaryTableList.vue

@@ -0,0 +1,70 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :export-list="exportList"
+    :column-parsing="columnParsing"
+  >
+    <Popu v-if="visible" />
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getLoginList, exportLogin } from '@/api/summaryTable'
+export default {
+  components: { TemplatePage, Popu },
+  mixins: [import_mixin, add_callback_mixin],
+  data() {
+    return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getLoginList(...p)
+    },
+    // 列表导出函数
+    exportList: exportLogin,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return <div class='operation-btns'></div>
+      }
+    },
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>