Răsfoiți Sursa

feature(表头配置): 表头配置保存功能,opms->oms

ZZH-wl 2 ani în urmă
părinte
comite
245657b58b
38 a modificat fișierele cu 270 adăugiri și 319 ștergeri
  1. 1 1
      package.json
  2. 11 0
      src/api/plat/tableColsConfig.js
  3. 8 9
      src/components/select/SelectBusiness.vue
  4. 8 9
      src/components/select/SelectBusinessContact.vue
  5. 8 9
      src/components/select/SelectCustomer.vue
  6. 8 9
      src/components/select/SelectCustomerContact.vue
  7. 8 9
      src/components/select/SelectDistributor.vue
  8. 8 9
      src/components/select/SelectProduct.vue
  9. 42 36
      src/components/table/TableTool.vue
  10. 2 2
      src/config/setting.config.js
  11. 9 1
      src/views/base/distributor/components/DistrEdit.vue
  12. 4 13
      src/views/base/distributor/index.vue
  13. 10 13
      src/views/base/product/index.vue
  14. 4 9
      src/views/base/productAuth/index.vue
  15. 5 12
      src/views/base/region/index.vue
  16. 4 9
      src/views/base/regionAuth/index.vue
  17. 4 9
      src/views/collection/index.vue
  18. 4 9
      src/views/collection/plan.vue
  19. 0 6
      src/views/contract/components/ProductTable.vue
  20. 4 9
      src/views/contract/index.vue
  21. 4 9
      src/views/contract/invoice.vue
  22. 5 10
      src/views/customer/list.vue
  23. 5 10
      src/views/customer/openSea.vue
  24. 19 1
      src/views/login/index.vue
  25. 5 10
      src/views/plat/task/index.vue
  26. 1 1
      src/views/proj/business/components/DetailsContract.vue
  27. 1 1
      src/views/proj/business/components/DetailsWorkOrder.vue
  28. 6 0
      src/views/proj/business/components/FollowAdd.vue
  29. 11 7
      src/views/proj/business/components/ProductTable.vue
  30. 28 22
      src/views/proj/business/index.vue
  31. 4 9
      src/views/system/config/index.vue
  32. 4 9
      src/views/system/dept/index.vue
  33. 6 10
      src/views/system/loginLog/index.vue
  34. 1 6
      src/views/system/notice/history.vue
  35. 4 9
      src/views/system/notice/index.vue
  36. 4 9
      src/views/work/order/index.vue
  37. 8 10
      src/views/work/orderType/index.vue
  38. 2 3
      vab.config.js

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "opms",
+  "name": "oms",
   "version": "2.0.9",
   "private": true,
   "author": "chuzhixin",

+ 11 - 0
src/api/plat/tableColsConfig.js

@@ -0,0 +1,11 @@
+import micro_request from '@/utils/micro_request'
+
+const basePath = process.env.VUE_APP_ParentPath
+export default {
+  getEntityByTable(query) {
+    return micro_request.postRequest(basePath, 'TableColsConfig', 'GetEntityByTable', query)
+  },
+  save(query) {
+    return micro_request.postRequest(basePath, 'TableColsConfig', 'Save', query)
+  },
+}

+ 8 - 9
src/components/select/SelectBusiness.vue

@@ -30,14 +30,18 @@
         <!--          <el-radio-button label="全部客户" />-->
         <!--          <el-radio-button label="我负责的客户" />-->
         <!--        </el-radio-group>-->
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectBusinessTable" />
       </el-col>
     </el-row>
     <el-table ref="businessTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -130,7 +134,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '项目标题',
@@ -204,11 +208,6 @@
         productLineOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getOptions()
     },

+ 8 - 9
src/components/select/SelectBusinessContact.vue

@@ -11,14 +11,18 @@
           @keyup.enter.native="fetchData" />
         <el-button icon="el-icon-search" type="primary" @click="fetchData">查询</el-button>
 
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectBusinessContactTable" />
       </el-col>
     </el-row>
     <el-table ref="contactTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -90,7 +94,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '联系人姓名',
@@ -145,11 +149,6 @@
         yesNoOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getDicts('sys_sex').then((response) => {
         this.sexOptions = response.data.values || []

+ 8 - 9
src/components/select/SelectCustomer.vue

@@ -30,14 +30,18 @@
         <!--          <el-radio-button label="全部客户" />-->
         <!--          <el-radio-button label="我负责的客户" />-->
         <!--        </el-radio-group>-->
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectCustomerTable" />
       </el-col>
     </el-row>
     <el-table ref="customerTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -115,7 +119,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '客户名称',
@@ -178,11 +182,6 @@
         industryOptions: [], //客户类型
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getOptions()
     },

+ 8 - 9
src/components/select/SelectCustomerContact.vue

@@ -30,14 +30,18 @@
         <!--          <el-radio-button label="全部客户" />-->
         <!--          <el-radio-button label="我负责的客户" />-->
         <!--        </el-radio-group>-->
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectCustomerContactTable" />
       </el-col>
     </el-row>
     <el-table ref="contactTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -113,7 +117,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '联系人姓名',
@@ -168,11 +172,6 @@
         yesNoOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getDicts('sys_sex').then((response) => {
         this.sexOptions = response.data.values || []

+ 8 - 9
src/components/select/SelectDistributor.vue

@@ -25,14 +25,18 @@
           @keyup.enter.native="fetchData" />
         <el-button icon="el-icon-search" type="primary" @click="fetchData">查询</el-button>
 
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectDistributorTable" />
       </el-col>
     </el-row>
     <el-table ref="distributorTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -97,7 +101,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '经销商名称',
@@ -155,11 +159,6 @@
         selectRows: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       // this.fetchData()
     },

+ 8 - 9
src/components/select/SelectProduct.vue

@@ -25,14 +25,18 @@
           @keyup.enter.native="fetchData" />
         <el-button icon="el-icon-search" type="primary" @click="fetchData">查询</el-button>
 
-        <table-tool :check-list.sync="checkList" :columns="columns" style="float: right" />
+        <table-tool
+          :columns="columns"
+          :show-columns.sync="showColumns"
+          style="float: right"
+          table-type="selectProductTable" />
       </el-col>
     </el-row>
     <el-table ref="productTable" v-loading="listLoading" :data="list" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -101,7 +105,7 @@
           pageNum: 1,
           pageSize: 10,
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '产品名称',
@@ -160,11 +164,6 @@
         productLineOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getOptions()
     },

+ 42 - 36
src/components/table/TableTool.vue

@@ -33,7 +33,7 @@
     <el-popover popper-class="custom-table-checkbox" trigger="hover">
       <el-checkbox-group v-model="checkColumns">
         <vab-draggable v-bind="dragOptions" :list="columns">
-          <div v-for="(item, index) in columns" :key="item + index">
+          <div v-for="item in columns" :key="item.label">
             <vab-icon icon="drag-drop-line" />
             <el-checkbox :disabled="item.disableCheck === true" :label="item.label">
               {{ item.label }}
@@ -50,6 +50,7 @@
 
 <script>
   import VabDraggable from 'vuedraggable'
+  import tableColsConfigApi from '@/api/plat/tableColsConfig'
 
   export default {
     name: 'TableTool',
@@ -57,13 +58,17 @@
       VabDraggable,
     },
     props: {
+      tableType: {
+        type: String,
+        required: true,
+      },
       columns: {
         type: Array,
         default() {
           return []
         },
       },
-      checkList: {
+      showColumns: {
         type: Array,
         default() {
           return []
@@ -77,6 +82,10 @@
         height: this.$baseTableHeight(1),
         stripe: false,
         lineHeight: 'medium',
+        dragOptions: {
+          animation: 600,
+          group: 'description',
+        },
         // checkList: ['标题', '作者', '评级', '点击量', '时间'],
         // columns: [
         //   {
@@ -87,51 +96,48 @@
         //     disableCheck: true,
         //   },
         // ],
-        flag: true,
+        flag: false,
+        id: 0,
+        checkColumns: [],
       }
     },
-    computed: {
-      dragOptions() {
-        return {
-          animation: 600,
-          group: 'description',
+    watch: {
+      async checkColumns(newValue) {
+        let list = this.columns.filter((item) => newValue.includes(item.label))
+        this.$emit('update:showColumns', list)
+        if (this.flag) {
+          const { data: id } = await tableColsConfigApi.save({
+            id: this.id,
+            table: this.tableType,
+            columns: JSON.stringify(newValue),
+          })
+          this.id = id
         }
-      },
-      checkColumns: {
-        get() {
-          return this.checkList
-        },
-        set(val) {
-          this.$emit('update:checkList', val)
-        },
+        this.flag = true
       },
     },
     created() {
-      let list = []
-      for (let item of this.columns) {
-        list.push(item['label'])
-      }
-      this.$emit('update:checkList', list)
+      this.getInitData()
+    },
+    methods: {
+      async getInitData() {
+        this.flag = false
+        this.id = 0
+        let list = this.columns
+        const { data: data } = await tableColsConfigApi.getEntityByTable({ table: this.tableType })
+        if (data) {
+          this.id = data.id
+          if (data.columns !== '' && data.columns !== '[]') {
+            list = this.columns.filter((item) => JSON.parse(data.columns).includes(item.label))
+          }
+        }
+        this.checkColumns = list.map((item) => item.label)
+      },
     },
-    methods: {},
   }
 </script>
 
 <style lang="scss" scoped>
-  .custom-table-container {
-    :deep() {
-      i {
-        cursor: pointer;
-      }
-    }
-
-    .stripe-panel,
-    .border-panel {
-      margin: 0 10px #{$base-margin/2} 10px !important;
-    }
-  }
-</style>
-<style lang="scss">
   .custom-table-checkbox {
     [class*='ri'] {
       vertical-align: -2.5px;

+ 2 - 2
src/config/setting.config.js

@@ -19,7 +19,7 @@ module.exports = {
   // 如果为ture : "title - page"
   titleReverse: false,
   // 简写
-  abbreviation: 'OPMS',
+  abbreviation: 'OMS',
   // pro版本copyright可随意修改
   copyright: 'dashoo@qq.com',
   // 缓存路由的最大数量
@@ -33,7 +33,7 @@ module.exports = {
   // token名称
   tokenName: 'token',
   // token在localStorage、sessionStorage、cookie存储的key的名称
-  tokenTableName: 'opms-' + process.env.VUE_APP_TENANT + '-token',
+  tokenTableName: 'oms-' + process.env.VUE_APP_TENANT + '-token',
   // token存储位置localStorage sessionStorage cookie
   storage: 'localStorage',
   // token失效回退到登录页时是否记录本次的路由(是否记录当前tab页)

+ 9 - 1
src/views/base/distributor/components/DistrEdit.vue

@@ -88,6 +88,7 @@
 <script>
   import distrApi from '@/api/base/distr'
   import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+  import regionAuthApi from '@/api/base/regionAuth'
   import SelectUser from '@/components/select/SelectUser'
 
   export default {
@@ -125,7 +126,8 @@
     },
     created() {
       //省份
-      this.getProvinceInfo()
+      // this.getProvinceInfo()
+      this.getUserSalesProvince()
     },
     methods: {
       showEdit(row) {
@@ -153,6 +155,12 @@
         const { data: data } = await distrApi.getProvinceInfo({})
         this.district = data.list
       },
+      async getUserSalesProvince() {
+        const { data: data } = await regionAuthApi.getUserSalesProvince({})
+        if (data && data.list) {
+          this.district = data.list
+        }
+      },
       selectDistrict(id) {
         let obj = {}
         obj = this.district.find((item) => {

+ 4 - 13
src/views/base/distributor/index.vue

@@ -55,13 +55,12 @@
           </el-button>
         </vab-query-form-left-panel>
         <vab-query-form-right-panel>
-          <table-tool :check-list.sync="checkList" :columns="columns" />
-          <el-button icon="el-icon-download" style="float: right" />
+          <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="distributorTable" />
         </vab-query-form-right-panel>
         <el-table v-loading="listLoading" :data="list" :height="$baseTableHeight(2)" @selection-change="setSelectRows">
           <el-table-column
-            v-for="(item, index) in finallyColumns"
-            :key="index"
+            v-for="(item, index) in showColumns"
+            :key="index + Math.random()"
             align="center"
             :label="item.label"
             :prop="item.prop"
@@ -125,7 +124,7 @@
           pageSize: 10,
           userName: '',
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '经销商名称',
@@ -172,14 +171,6 @@
         treeDefaultExpandAll: true,
       }
     },
-    computed: {
-      height() {
-        return this.$baseTableHeight(1)
-      },
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.fetchData()
       this.getRegionTree()

+ 10 - 13
src/views/base/product/index.vue

@@ -45,19 +45,24 @@
             </el-button>
           </vab-query-form-left-panel>
           <vab-query-form-right-panel>
-            <table-tool :check-list.sync="checkList" :columns="columns" />
+            <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="productTable" />
           </vab-query-form-right-panel>
         </vab-query-form>
 
-        <el-table v-loading="listLoading" border :data="list" :height="height" @selection-change="setSelectRows">
+        <el-table
+          v-loading="listLoading"
+          border
+          :data="list"
+          :height="$baseTableHeight(2)"
+          @selection-change="setSelectRows">
           <el-table-column align="center" label="序号" show-overflow-tooltip width="80">
             <template #default="{ $index }">
               {{ $index + 1 }}
             </template>
           </el-table-column>
           <el-table-column
-            v-for="(item, index) in finallyColumns"
-            :key="index"
+            v-for="(item, index) in showColumns"
+            :key="index + Math.random()"
             align="center"
             :label="item.label"
             :min-width="item.minWidth"
@@ -134,7 +139,7 @@
           prodClass: '',
           prodName: '',
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '产品型号',
@@ -190,14 +195,6 @@
         prodClassOptions: [], //产品分类
       }
     },
-    computed: {
-      height() {
-        return this.$baseTableHeight(2)
-      },
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.getOptions()
       this.fetchData()

+ 4 - 9
src/views/base/productAuth/index.vue

@@ -21,13 +21,13 @@
         </el-form>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="productAuthTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table v-loading="listLoading" border :data="list" :height="$baseTableHeight(1)">
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -97,7 +97,7 @@
         layout: 'total, sizes, prev, pager, next, jumper',
         listLoading: false,
         list: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '姓名',
@@ -145,11 +145,6 @@
         },
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getProducts()
       this.fetchData()

+ 5 - 12
src/views/base/region/index.vue

@@ -82,10 +82,11 @@
             </el-button>
           </vab-query-form-left-panel>
           <vab-query-form-right-panel>
-            <table-tool :check-list.sync="checkList" :columns="columns" />
+            <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="regionTable" />
           </vab-query-form-right-panel>
         </vab-query-form>
         <el-table
+          ref="regionTable"
           v-loading="listLoading"
           border
           :data="list"
@@ -93,8 +94,8 @@
           style="width: 100%"
           @selection-change="setSelectRows">
           <el-table-column
-            v-for="(item, index) in finallyColumns"
-            :key="index"
+            v-for="(item, index) in showColumns"
+            :key="index + Math.random()"
             align="center"
             :label="item.label"
             :min-width="item.minWidth"
@@ -171,7 +172,7 @@
         treeDefaultExpandAll: true,
         regionId: 0,
         industryOptions: [], //客户行业
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '省份',
@@ -214,14 +215,6 @@
       }
     },
 
-    computed: {
-      height() {
-        return this.$baseTableHeight(10)
-      },
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     watch: {
       filterText(val) {
         this.$refs.tree.filter(val)

+ 4 - 9
src/views/base/regionAuth/index.vue

@@ -27,7 +27,7 @@
             @click="handleAuth">
             授权
           </el-button>
-          <table-tool :check-list.sync="checkList" :columns="columns" />
+          <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="regionAuthTable" />
         </vab-query-form-right-panel>
       </el-form>
     </vab-query-form>
@@ -41,8 +41,8 @@
           style="width: 100%"
           @row-click="handleRowClick">
           <el-table-column
-            v-for="(item, index) in finallyColumns"
-            :key="index"
+            v-for="(item, index) in showColumns"
+            :key="index + Math.random()"
             align="center"
             :label="item.label"
             :prop="item.prop"
@@ -156,7 +156,7 @@
         total: 0,
         list: [],
         regionList: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '姓名',
@@ -201,11 +201,6 @@
         allocated: [], //已被分配的城市
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.fetchData()
     },

+ 4 - 9
src/views/collection/index.vue

@@ -36,14 +36,14 @@
         <el-button icon="el-icon-delete" type="danger" @click="handleDelete()">删除</el-button> -->
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="collectionTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table v-loading="listLoading" border :data="list" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -122,7 +122,7 @@
         selectRows: [], //选择的表格数据
         industryOptions: [], //客户行业
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '合同编号',
@@ -197,11 +197,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     async mounted() {
       await this.getOptions()
       this.queryData()

+ 4 - 9
src/views/collection/plan.vue

@@ -31,14 +31,14 @@
         <el-button icon="el-icon-delete" type="danger" @click="handleDelete()">删除</el-button> -->
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="collectionPlanTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table v-loading="listLoading" border :data="list" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -117,7 +117,7 @@
         selectRows: [], //选择的表格数据
         industryOptions: [], //客户行业
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '合同编号',
@@ -205,11 +205,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.queryData()
     },

+ 0 - 6
src/views/contract/components/ProductTable.vue

@@ -58,12 +58,6 @@
           return []
         },
       },
-      checkList: {
-        type: Array,
-        default() {
-          return []
-        },
-      },
     },
     data() {
       return {

+ 4 - 9
src/views/contract/index.vue

@@ -60,14 +60,14 @@
         </el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="contractTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table v-loading="listLoading" :data="list" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -211,7 +211,7 @@
         levelOptions: [], //客户级别
         contractOptions: {}, //合同类型
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '合同编号',
@@ -307,11 +307,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.queryData()
       this.getOptions()

+ 4 - 9
src/views/contract/invoice.vue

@@ -28,14 +28,14 @@
         <el-button icon="el-icon-delete" type="danger" @click="handleDelete()">删除</el-button> -->
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="contractInvoiceTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table v-loading="listLoading" border :data="invoiceData" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -134,7 +134,7 @@
           contractCode: '', // 合同编号
           custName: '', // 客户名称  ()
         },
-        checkList: [],
+        showColumns: [],
         invoiceData: [],
         invoiceTypeData: [], //发票类型
         columns: [
@@ -191,11 +191,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     async mounted() {
       await this.getOptions()
       this.queryData()

+ 5 - 10
src/views/customer/list.vue

@@ -80,7 +80,7 @@
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
         <!--        <el-button icon="el-icon-download" @click="exportData" />-->
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="customerTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table
@@ -91,8 +91,8 @@
       @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -186,7 +186,7 @@
         industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '客户编码',
@@ -275,11 +275,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.getOptions()
       this.fetchData()
@@ -315,7 +310,7 @@
       exportData() {
         this.queryForm.isPublic = false
         let exportFrom = JSON.parse(JSON.stringify(this.queryForm))
-        exportFrom.columns = this.finallyColumns.map((item) => item.label)
+        exportFrom.columns = this.showColumns.map((item) => item.label)
         api
           .deriveList(exportFrom)
           .then((res) => {

+ 5 - 10
src/views/customer/openSea.vue

@@ -54,7 +54,7 @@
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
         <!--        <el-button icon="el-icon-download" @click="exportData" />-->
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="openSeaCustomerTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table
@@ -65,8 +65,8 @@
       @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.width"
@@ -196,7 +196,7 @@
         industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '客户编码',
@@ -285,11 +285,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.fetchData()
       this.getOptions()
@@ -320,7 +315,7 @@
       exportData() {
         this.queryForm.isPublic = true
         let exportFrom = JSON.parse(JSON.stringify(this.queryForm))
-        exportFrom.columns = this.finallyColumns.map((item) => item.label)
+        exportFrom.columns = this.showColumns.map((item) => item.label)
         api
           .deriveList(exportFrom)
           .then((res) => {

+ 19 - 1
src/views/login/index.vue

@@ -44,6 +44,10 @@
                 </template>
               </el-input>
             </el-form-item>
+            <div style="float: right">
+              <el-checkbox v-model="rememenber" />
+              记住密码
+            </div>
             <el-button class="login-btn" :loading="loading" type="primary" @click="handleLogin">
               {{ translateTitle('登录') }}
             </el-button>
@@ -117,6 +121,9 @@
         passwordType: 'password',
         redirect: undefined,
         timer: 0,
+        rememenber: false,
+        rememenberKey: 'oms-rememenber-' + process.env.VUE_APP_TENANT,
+        loginInfoKey: 'oms-base-' + process.env.VUE_APP_TENANT,
       }
     },
     computed: {
@@ -132,7 +139,12 @@
         immediate: true,
       },
     },
-    mounted() {},
+    mounted() {
+      this.rememenber = Boolean(localStorage.getItem(this.rememenberKey))
+      if (this.rememenber) {
+        this.form = JSON.parse(window.atob(localStorage.getItem(this.loginInfoKey)))
+      }
+    },
     methods: {
       ...mapActions({
         login: 'user/login',
@@ -153,6 +165,12 @@
             try {
               this.loading = true
               await this.login(this.form)
+              localStorage.setItem(this.rememenberKey, this.rememenber)
+              if (this.rememenber) {
+                localStorage.setItem(this.loginInfoKey, window.btoa(JSON.stringify(this.form)))
+              } else {
+                localStorage.removeItem(this.loginInfoKey)
+              }
               await this.$router.push(this.handleRoute())
             } finally {
               this.loading = false

+ 5 - 10
src/views/plat/task/index.vue

@@ -77,14 +77,14 @@
           </vab-query-form-left-panel>
           <vab-query-form-right-panel :span="12">
             <!-- <el-button icon="el-icon-download" @click="exportData" /> -->
-            <table-tool :check-list.sync="checkList" :columns="columns" />
+            <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="taskTable" />
           </vab-query-form-right-panel>
         </vab-query-form>
         <!-- 主页面 -->
         <el-table v-loading="listLoading" border :data="list" :height="height" width="100%">
           <el-table-column
-            v-for="(item, index) in finallyColumns"
-            :key="index"
+            v-for="(item, index) in showColumns"
+            :key="index + Math.random()"
             align="center"
             :label="item.label"
             :prop="item.prop"
@@ -199,7 +199,7 @@
         types: [],
         sourceOptions: [],
         // 自定义列表
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '督办标题',
@@ -289,11 +289,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     async created() {
       this.queryForm.operateType = '1'
       this.statistics()
@@ -326,7 +321,7 @@
       // 数据导出
       exportData() {
         let exportFrom = JSON.parse(JSON.stringify(this.queryForm))
-        exportFrom.columns = this.finallyColumns.map((item) => item.label)
+        exportFrom.columns = this.showColumns.map((item) => item.label)
         taskApi
           .exportTasks(exportFrom)
           .then((res) => {

+ 1 - 1
src/views/proj/business/components/DetailsContract.vue

@@ -59,7 +59,7 @@
         },
         listLoading: false,
         selectRows: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '合同编号',

+ 1 - 1
src/views/proj/business/components/DetailsWorkOrder.vue

@@ -39,7 +39,7 @@
         },
         listLoading: false,
         selectRows: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '工单名称',

+ 6 - 0
src/views/proj/business/components/FollowAdd.vue

@@ -6,6 +6,12 @@
           <el-form-item label="跟进时间" prop="followDate">
             <el-date-picker
               v-model="form.followDate"
+              :picker-options="{
+                // 时间不能大于当前时间
+                disabledDate: (time) => {
+                  return time.getTime() > Date.now()
+                },
+              }"
               placeholder="选择日期"
               style="width: 100%"
               type="datetime"

+ 11 - 7
src/views/proj/business/components/ProductTable.vue

@@ -37,6 +37,9 @@
           <span v-else-if="item.label == '合计'">
             {{ calculatedDiscount(row.prodPrice, row.prodNum) }}
           </span>
+          <span v-else-if="item.prop == 'prodClass'">
+            {{ selectDictLabel(prodClassOptions, row.prodClass) }}
+          </span>
           <span v-else>{{ row[item.prop] }}</span>
         </template>
       </el-table-column>
@@ -64,12 +67,6 @@
           return []
         },
       },
-      checkList: {
-        type: Array,
-        default() {
-          return []
-        },
-      },
       isLook: Boolean,
     },
     data() {
@@ -88,7 +85,7 @@
           },
           {
             label: '产品类别',
-            width: '100px',
+            width: '140px',
             prop: 'prodClass',
           },
           {
@@ -102,6 +99,7 @@
             prop: 'prodNum',
           },
         ],
+        prodClassOptions: [],
       }
     },
     watch: {
@@ -125,8 +123,14 @@
           prop: 'total',
         })
       }
+      this.getOptions()
     },
     methods: {
+      getOptions() {
+        Promise.all([this.getDicts('sys_product_line')]).then(([productLine]) => {
+          this.prodClassOptions = productLine.data.values || []
+        })
+      },
       // input修改
       handleChange(row) {
         row.prodNum = parseInt(row.prodNum) || 1

+ 28 - 22
src/views/proj/business/index.vue

@@ -88,15 +88,19 @@
         <!--        <el-button icon="el-icon-delete" type="danger" @click="handleDelete">删除</el-button>-->
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool
+          ref="tableTool"
+          :columns.sync="finallyColumns"
+          :show-columns.sync="showColumns"
+          :table-type.sync="tableType" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
     <el-table ref="busTable" v-loading="listLoading" :data="list" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :min-width="item.minWidth"
@@ -201,7 +205,7 @@
     components: { Edit, Transfer, TableTool, FollowAdd },
     data() {
       return {
-        activeName: 'all',
+        activeName: '',
         height: this.$baseTableHeight(4),
         queryForm: {
           pageNum: 1,
@@ -217,7 +221,8 @@
           beginTime: undefined,
           endTime: undefined,
         },
-        checkList: [],
+        tableType: 'businessTable',
+        showColumns: [],
         columns: [
           {
             label: '项目编码',
@@ -225,6 +230,7 @@
             width: '120px',
             minWidth: '120px',
             sortable: false,
+            disableCheck: true,
           },
           {
             label: '项目名称',
@@ -409,38 +415,36 @@
         nboStatusOptions: [],
         approStatusOptions: [],
         followup: {},
+        finallyColumns: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        switch (this.activeName) {
+    watch: {
+      activeName(newValue) {
+        this.tableType = 'businessTable' + this.selectDictLabel(this.nboTypeOptions, newValue)
+        switch (newValue) {
           case '10':
           case '20':
           case '30':
-            return this.columns.filter(
-              (item) => this.checkList.includes(item.label) && this.abcColumns.includes(item.label)
-            )
+            this.finallyColumns = this.columns.filter((item) => this.abcColumns.includes(item.label))
+            break
           case '40':
-            return this.columns.filter(
-              (item) => this.checkList.includes(item.label) && this.dealColumns.includes(item.label)
-            )
+            this.finallyColumns = this.columns.filter((item) => this.dealColumns.includes(item.label))
+            break
           case '50':
-            return this.columns.filter(
-              (item) => this.checkList.includes(item.label) && this.reserveColumns.includes(item.label)
-            )
+            this.finallyColumns = this.columns.filter((item) => this.reserveColumns.includes(item.label))
+            break
           default:
-            return this.columns.filter(
-              (item) => this.checkList.includes(item.label) && this.allColumns.includes(item.label)
-            )
+            this.finallyColumns = this.columns.filter((item) => this.allColumns.includes(item.label))
         }
       },
     },
     created() {
+      this.activeName = 'all'
       if (this.$route.params && this.$route.params.length > 0) {
         this.queryForm = this.$route.params
         this.activeName = this.queryForm.activeName ? this.queryForm.activeName : 'all'
       }
-      this.fetchData()
+      this.handleTabClick()
       this.getOptions()
     },
     updated() {
@@ -474,12 +478,14 @@
       },
       handleTabClick() {
         this.queryForm.pageNum = 1
-        console.log(this.activeName)
         if (this.activeName !== 'all') {
           this.queryForm.nboType = this.activeName
         } else {
           this.queryForm.nboType = undefined
         }
+        this.$nextTick(() => {
+          this.$refs['tableTool'].getInitData()
+        })
         this.fetchData()
       },
       handleTransfer() {

+ 4 - 9
src/views/system/config/index.vue

@@ -40,7 +40,7 @@
         </el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="sysConfigTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
@@ -52,8 +52,8 @@
       @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :formatter="item.formatter"
         :label="item.label"
@@ -92,7 +92,7 @@
     data() {
       return {
         uuid: '',
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             prop: 'id',
@@ -142,11 +142,6 @@
         typeOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.getDicts('sys_yes_no').then((response) => {
         this.typeOptions = response.data.values || []

+ 4 - 9
src/views/system/dept/index.vue

@@ -32,7 +32,7 @@
         </el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="sysdeptTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
@@ -46,8 +46,8 @@
       @selection-change="setSelectRows">
       <el-table-column show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -115,7 +115,7 @@
           pageSize: 10,
           title: '',
         },
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '部门名称',
@@ -145,11 +145,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.fetchData()
     },

+ 6 - 10
src/views/system/loginLog/index.vue

@@ -61,15 +61,15 @@
         </el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel>
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="sysLoginLogTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
     <el-table v-loading="listLoading" :data="list" :height="height" @selection-change="setSelectRows">
       <el-table-column align="center" type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -107,7 +107,7 @@
       return {
         fold: false,
         height: this.$baseTableHeight(2),
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '登录名称',
@@ -161,16 +161,12 @@
         queryForm: {
           pageNum: 1,
           pageSize: 10,
-          title: '',
+          ipaddr: '',
+          loginLocation: '',
         },
         statusOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.fetchData()
     },

+ 1 - 6
src/views/system/notice/history.vue

@@ -67,7 +67,7 @@
     data() {
       return {
         uuid: '',
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             prop: 'msgType',
@@ -111,11 +111,6 @@
         yesOrNoOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.getOptions()
     },

+ 4 - 9
src/views/system/notice/index.vue

@@ -30,7 +30,7 @@
         </el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="sysNoticeTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
     <el-table
@@ -41,8 +41,8 @@
       @selection-change="setSelectRows">
       <el-table-column align="center" show-overflow-tooltip type="selection" />
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :formatter="item.formatter"
         :label="item.label"
@@ -83,7 +83,7 @@
     data() {
       return {
         uuid: '',
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             prop: 'id',
@@ -141,11 +141,6 @@
         msgStatusOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     created() {
       this.getOptions()
     },

+ 4 - 9
src/views/work/order/index.vue

@@ -28,14 +28,14 @@
         <el-button icon="el-icon-plus" size="mini" type="primary" @click="handleEdit">新建</el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
     <el-table v-loading="listLoading" border :data="list" :height="$baseTableHeight(1)">
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -106,7 +106,7 @@
         listLoading: false,
         list: [],
         selectRows: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '工单名称',
@@ -148,11 +148,6 @@
         orderStatusOptions: [],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.fetchData()
     },

+ 8 - 10
src/views/work/orderType/index.vue

@@ -15,7 +15,7 @@
         <el-button icon="el-icon-delete" type="danger" @click="handleDelete($event)">删除</el-button>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
-        <table-tool :check-list.sync="checkList" :columns="columns" />
+        <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTypeTable" />
       </vab-query-form-right-panel>
     </vab-query-form>
 
@@ -28,8 +28,8 @@
       <el-table-column show-overflow-tooltip type="selection" />
 
       <el-table-column
-        v-for="(item, index) in finallyColumns"
-        :key="index"
+        v-for="(item, index) in showColumns"
+        :key="index + Math.random()"
         align="center"
         :label="item.label"
         :prop="item.prop"
@@ -37,7 +37,10 @@
         :sortable="item.sortable"
         :width="item.width">
         <template #default="{ row }">
-          <span>{{ row[item.prop] }}</span>
+          <span v-if="item.prop === 'createdTime'">
+            {{ parseTime(row.createdTime, '{y}-{m}-{d}') }}
+          </span>
+          <span v-else>{{ row[item.prop] }}</span>
         </template>
       </el-table-column>
       <el-table-column align="center" label="操作" width="120">
@@ -86,7 +89,7 @@
         listLoading: false,
         list: [],
         selectRows: [],
-        checkList: [],
+        showColumns: [],
         columns: [
           {
             label: '名称',
@@ -122,11 +125,6 @@
         ],
       }
     },
-    computed: {
-      finallyColumns() {
-        return this.columns.filter((item) => this.checkList.includes(item.label))
-      },
-    },
     mounted() {
       this.fetchData()
     },

+ 2 - 3
vab.config.js

@@ -1,7 +1,6 @@
 module.exports = {
   // 开发工具控制台名字显示
-  webpackBarName: 'opms',
+  webpackBarName: 'oms',
   // 浏览器注释显示
-  webpackBanner:
-    ' build: opms \n copyright: vue-admin-beautiful.com 1204505056@qq.com \n time: ',
+  webpackBanner: ' build: oms \n copyright: vue-admin-beautiful.com 1204505056@qq.com \n time: ',
 }