浏览代码

no message

linwenxin 1 年之前
父节点
当前提交
464e864daa

+ 25 - 0
src/api/lajizhan.js

@@ -0,0 +1,25 @@
+import request, { postBlob } from '@/utils/request'
+
+export function loginOrderRecycleList(params) {
+  return request({
+    url: `/trade/login/order/recycle/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function loginOrderRecycleDel(data) {
+  return request({
+    url: '/trade/login/order/recycle/del',
+    method: 'post',
+    data
+  })
+}
+
+export function loginOrderRecycleRestore(data) {
+  return request({
+    url: '/trade/login/order/recycle/restore',
+    method: 'post',
+    data
+  })
+}

+ 70 - 0
src/views/commercialEngineering/summaryTable/index_1.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>

+ 79 - 0
src/views/commercialEngineering/summaryTable/index_2.vue

@@ -0,0 +1,79 @@
+<template>
+  <template-page ref="pageRef" :get-list="getList" :column-parsing="columnParsing" :operation="operation">
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { loginOrderRecycleList, loginOrderRecycleDel, loginOrderRecycleRestore } from "@/api/lajizhan"
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: loginOrderRecycleList,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation(h, { row, index, column }) {
+      return <div class='operation-btns'>
+        <el-popconfirm
+          onConfirm={() => {
+            loginOrderRecycleRestore([row.id]).then(res => {
+              this.$refs.pageRef.refreshList()
+            })
+          }}
+          title="是否恢复?"
+        >
+          <el-button type="text" size="mini" slot="reference">恢复</el-button>
+        </el-popconfirm>
+        <el-popconfirm
+          onConfirm={() => {
+            loginOrderRecycleDel([row.id]).then(res => {
+              this.$refs.pageRef.refreshList()
+            })
+          }}
+          title="是否确定删除?"
+        >
+          <el-button type="text" size="mini" slot="reference">删除</el-button>
+        </el-popconfirm>
+      </div>
+    },
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .zj-button-collection{
+    min-height: 54px !important;
+  }
+</style>

+ 16 - 59
src/views/commercialEngineering/summaryTable/summaryTableList.vue

@@ -1,70 +1,27 @@
 <template>
-  <template-page
-    ref="pageRef"
-    :get-list="getList"
-    :export-list="exportList"
-    :column-parsing="columnParsing"
-  >
-    <Popu v-if="visible" />
-  </template-page>
+  <zj-page-container>
+    <div style="box-sizing: border-box;padding: 5px 20px 0;height: 45px;overflow: hidden;">
+      <el-tabs v-model="type">
+        <el-tab-pane label="项目数据" name="hdgl"></el-tab-pane>
+        <el-tab-pane label="回收站" name="spgl"></el-tab-pane>
+      </el-tabs>
+    </div>
+    <zj-page-fill>
+      <index1 v-if="type == 'hdgl'" key="hdgl" />
+      <index2 v-if="type == 'spgl'" key="spgl" />
+    </zj-page-fill>
+  </zj-page-container>
 </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'
+import index1 from "./index_1.vue"
+import index2 from "./index_2.vue"
 export default {
-  components: { TemplatePage, Popu },
-  mixins: [import_mixin, add_callback_mixin],
+  components: { index1, index2 },
   data() {
     return {
-      visible: false,
-      // 事件组合
-      optionsEvensGroup: [
-      ],
-      // 表格属性
-      tableAttributes: {
-        // 启用勾选列
-        selectColumn: true
-      }, // 关闭新增弹窗
-
-      // 表格事件
-      tableEvents: {
-        'selection-change': this.selectionChange
-      },
-      recordSelected: []
+      type: "hdgl",
     }
   },
-  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>