Explorar el Código

ele-pro-table columns缓存配置至后台

zhangqing hace 1 año
padre
commit
f23bcb4382
Se han modificado 36 ficheros con 398 adiciones y 117 borrados
  1. 142 0
      src/mixins/tableColumnsMixin.js
  2. 7 4
      src/views/contractManage/contractBook/index.vue
  3. 9 2
      src/views/contractManage/contractChange/index.vue
  4. 8 3
      src/views/financialManage/feeManage/feeApplication/page.vue
  5. 9 3
      src/views/financialManage/invoiceManage/index.vue
  6. 9 3
      src/views/financialManage/payableManage/index.vue
  7. 10 5
      src/views/financialManage/receivableManage/index.vue
  8. 9 3
      src/views/financialManage/settlementAccount/index.vue
  9. 9 3
      src/views/marketManagem/index.vue
  10. 6 3
      src/views/purchasingManage/inquiryManage/index.vue
  11. 7 3
      src/views/purchasingManage/purchaseNeedManage/index.vue
  12. 7 5
      src/views/purchasingManage/purchaseOrder/accountstatement/index.vue
  13. 6 3
      src/views/purchasingManage/purchaseOrder/index.vue
  14. 7 5
      src/views/purchasingManage/purchaseOrder/invoice/index.vue
  15. 7 3
      src/views/purchasingManage/purchaseOrder/outSourceSend/index.vue
  16. 7 5
      src/views/purchasingManage/purchaseOrder/returnGoods/index.vue
  17. 6 3
      src/views/purchasingManage/supplierManage/index.vue
  18. 6 3
      src/views/saleManage/businessOpportunity/index.vue
  19. 6 3
      src/views/saleManage/contact/contactList.vue
  20. 6 3
      src/views/saleManage/contact/contactListAdmin.vue
  21. 6 3
      src/views/saleManage/contact/index.vue
  22. 6 3
      src/views/saleManage/quotation/index.vue
  23. 6 3
      src/views/saleManage/saleOrder/accountstatement/index.vue
  24. 7 6
      src/views/saleManage/saleOrder/customerReturnOrder/index.vue
  25. 6 3
      src/views/saleManage/saleOrder/entrustedReceive/index.vue
  26. 9 2
      src/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue
  27. 6 3
      src/views/saleManage/saleOrder/index.vue
  28. 6 3
      src/views/saleManage/saleOrder/invoice/index.vue
  29. 6 3
      src/views/saleManage/saleOrder/invoiceConfirm/index.vue
  30. 6 3
      src/views/saleManage/saleOrder/returnGoods/index.vue
  31. 9 3
      src/views/targetManage/salesRegulation/index.vue
  32. 9 4
      src/views/targetManage/salesTarget/index.vue
  33. 8 3
      src/views/transportManager/carBook/index.vue
  34. 8 3
      src/views/transportManager/driverBook/index.vue
  35. 8 4
      src/views/transportManager/shipManage/dispatchManage/page.vue
  36. 9 3
      src/views/transportManager/shipManage/taskWorkManage/page.vue

+ 142 - 0
src/mixins/tableColumnsMixin.js

@@ -0,0 +1,142 @@
+import request from '@/utils/request';
+
+export default {
+  data() {
+    return {
+      newColumns: []
+    };
+  },
+  created() {
+    //从服务器获取缓存列表配置
+    this.getTabColumns();
+    // 创建防抖函数并绑定this
+    this.debouncedHandleColumnChange = this.debounce(
+      this.handleColumnChangeImpl,
+      1000
+    );
+  },
+  methods: {
+    // 实际的列变更处理逻辑
+    handleColumnChangeImpl() {
+      try {
+        const list = this.getStorage(this.cacheKeyUrl + 'Cols');
+        if (list) {
+          this.saveColumns(list);
+        }
+      } catch (error) {
+        console.error('处理列配置出错:', error);
+      }
+    },
+
+    // 列表变化回调
+    handleColumnChange() {
+      this.debouncedHandleColumnChange();
+    },
+
+    // 获取table-column配置
+    async getTabColumns() {
+      const res = await this.getByTableId(this.cacheKeyUrl);
+      if (res?.columnConfig?.length > 0) {
+        this.setStorage(this.cacheKeyUrl + 'Cols', res.columnConfig);
+        // 更新列
+        if (this._computedWatchers && this._computedWatchers.columns) {
+          // console.log('columns 是计算属性');
+          this.columnsVersion++;
+        } else {
+          // console.log('columns 是 data 属性');
+          this.columns = [...this.columns];
+          this.newColumns = [...this.newColumns];
+        }
+      }
+    },
+
+    // 提交columns配置
+    async saveColumns(e) {
+      const data = {
+        tableId: this.cacheKeyUrl,
+        columnConfig: e
+      };
+      const msg = await this.saveTableConfig(data);
+      // console.log('列配置保存成功:', msg);
+      return msg;
+    },
+
+    //获取localstorage缓存
+    setStorage(key, value) {
+      try {
+        localStorage.setItem(key, JSON.stringify(value));
+      } catch (e) {
+        console.log('LocalStorage 存储错误:', e);
+        if (e.name === 'QuotaExceededError') {
+          this.clearCacheByPrefix(); //缓存不足,清除
+          localStorage.setItem(key, JSON.stringify(value));
+        }
+      }
+    },
+
+    //缓存不足清除缓存
+    clearCacheByPrefix() {
+      const prefix = 'Cols'; // 标识后缀
+      Object.keys(localStorage).forEach((key) => {
+        if (key.endsWith(prefix)) {
+          localStorage.removeItem(key);
+          // console.log(`已清除缓存: ${key}`);
+        }
+      });
+      // console.log('缓存清除完成');
+    },
+
+    //设置localstorage缓存
+    getStorage(key) {
+      try {
+        const value = localStorage.getItem(key);
+        return value ? JSON.parse(value) : null;
+      } catch (e) {
+        console.error('LocalStorage 解析错误:', e);
+        return null;
+      }
+    },
+
+    //防抖函数
+    debounce(fn, delay) {
+      let timer = null;
+      return (...args) => {
+        clearTimeout(timer);
+        timer = setTimeout(() => {
+          fn.apply(this, args);
+        }, delay);
+      };
+    },
+
+    //获取column记录接口
+    async getByTableId(key) {
+      try {
+        const res = await request.get(
+          `/sys/table-config/getByTableId/${key}`,
+          {}
+        );
+        if (res.data.code == 0) {
+          return res.data.data;
+        }
+      } catch (error) {
+        console.error('获取列配置失败:', error);
+      }
+    },
+
+    // 添加column记录接口
+    async saveTableConfig(data) {
+      try {
+        const res = await request({
+          url: '/sys/table-config/save',
+          method: 'post',
+          data
+        });
+        if (res.data.code == 0) {
+          return res.data.data;
+        }
+      } catch (error) {
+        console.error('保存列配置失败:', error);
+      }
+    }
+  }
+};

+ 7 - 4
src/views/contractManage/contractBook/index.vue

@@ -32,8 +32,9 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
-        :page-size="20"
-
+              :page-size="20"
+              @columns-change="handleColumnChange"
+              :cache-key="cacheKeyUrl"
             >
               <!-- 表头工具栏 -->
               <template v-slot:toolbar>
@@ -185,6 +186,7 @@ import { contactTypeTree } from '@/api/saleManage/contact';
 import saleOrderAddDialog from '@/views/saleManage/saleOrder/components/addDialog.vue';
 import supplierAddDialog from '@/views/purchasingManage/purchaseOrder/components/addDialog.vue';
 import { submit as saleOrderSubmitAPI } from '@/api/saleManage/saleorder';
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 import {
   getTableList,
@@ -197,7 +199,7 @@ import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
 import addInvoiceManage from "@/views/financialManage/invoiceManage/components/addOrEditDialog.vue";
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     autogenerateDialog,
@@ -412,7 +414,8 @@ export default {
           showOverflowTooltip: true,
           fixed: 'right'
         }
-      ]
+      ],
+      cacheKeyUrl:'eos-2310d377-contract-contractBook'
     };
   },
   computed: {},

+ 9 - 2
src/views/contractManage/contractChange/index.vue

@@ -11,8 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 查看详情列 -->
         <template v-slot:changeCode="{ row }">
@@ -93,8 +94,10 @@
     getTableList,
     deleteInformation
   } from '@/api/contractManage/contractChange.js';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
+    mixins:[tabMixins],
     components: {
       addOrEditDialog,
       searchTable,
@@ -107,11 +110,15 @@
         delVisible: false,
         addOrEditDialogFlag: false,
         processSubmitDialogFlag: false,
-        selection: []
+        selection: [],
+        cacheKeyUrl: 'eos-6f5d0bf2-contract-contractChange',
+        columnsVersion:1,
       };
     },
     computed: {
       columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
         return [
           // {
           //   width: 45,

+ 8 - 3
src/views/financialManage/feeManage/feeApplication/page.vue

@@ -10,9 +10,9 @@
       full-height="calc(100vh - 116px)"
       tool-class="ele-toolbar-form"
       :selection.sync="selection"
-      cache-key="eomContactPageTable"
       :page-size="20"
-
+      @columns-change="handleColumnChange"
+      :cache-key="cacheKeyUrl"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -115,9 +115,10 @@ import {
 import addOrEditDialog from './addOrEditDialog.vue'
 import detailDialog from './detailDialog.vue'
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     addOrEditDialog,
@@ -134,6 +135,8 @@ export default {
       addOrEditDialogFlag: false,
       detailDialogFlag: false,
       processSubmitDialogFlag: false,
+      cacheKeyUrl:'eos-ef52b03f-feeManage',
+      columnsVersion:1,
     };
   },
   computed: {
@@ -143,6 +146,8 @@ export default {
       }
     },
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 9 - 3
src/views/financialManage/invoiceManage/index.vue

@@ -12,8 +12,9 @@
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
         :page-size="20"
-
-        cache-key="eomContactPageTable">
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
+        >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
           <el-button
@@ -113,9 +114,10 @@ import {
 } from "@/api/financialManage/invoiceManage";
 import {reviewStatus} from "@/enum/dict";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     popModal,
@@ -141,10 +143,14 @@ export default {
       detailDialogFlag: false,
       processSubmitDialogFlag: false,
       selection: [],
+      cacheKeyUrl:'eos-cf5f69ee-invoiceManage',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 9 - 3
src/views/financialManage/payableManage/index.vue

@@ -12,7 +12,8 @@
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
         :page-size="20"
-        cache-key="eomContactPageTable"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 操作 -->
         <template v-slot:action="{ row }">
@@ -94,9 +95,10 @@
   import detailDialog from './components/detailDialog.vue';
   import invoiceDetailDialog from '../invoiceManage/components/detailDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       searchTable,
       paymentDialog,
@@ -126,11 +128,15 @@
             label: '已付全款',
             value: 2
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-7a7a5e23-payableManage',
+        columnsVersion:1,
       };
     },
     computed: {
       columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
         return [
           {
             width: 60,

+ 10 - 5
src/views/financialManage/receivableManage/index.vue

@@ -11,9 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
-
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 操作 -->
         <template v-slot:action="{ row }">
@@ -102,10 +102,11 @@
   import searchTable from './searchTable.vue';
   import detailDialog from './components/detailDialog.vue';
   import invoiceDetailDialog from '../invoiceManage/components/detailDialog.vue';
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+  import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       searchTable,
       collectionDialog,
@@ -149,11 +150,15 @@ import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubm
             label: '已收全款',
             value: 2
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-03850924-receivableManage',
+        columnsVersion:1,
       };
     },
     computed: {
       columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
         return [
           {
             width: 60,

+ 9 - 3
src/views/financialManage/settlementAccount/index.vue

@@ -12,8 +12,9 @@
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
         :page-size="20"
-
-        cache-key="eomContactPageTable">
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
+        >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
           <el-button
@@ -95,9 +96,10 @@ import {
   settlementAccountRemoveAPI,
   settlementAccountSubmit
 } from "@/api/financialManage/settlementAccount";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     popModal,
     addOrEditDialog,
@@ -110,10 +112,14 @@ export default {
       delVisible: false,
       addOrEditDialogFlag: false,
       selection: [],
+      cacheKeyUrl:'eos-99834979-settlementAccount',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 9 - 3
src/views/marketManagem/index.vue

@@ -11,8 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -98,6 +99,7 @@
 </template>
 
 <script>
+import tabMixins from '@/mixins/tableColumnsMixin';
 import dictMixins from '@/mixins/dictMixins';
 import addOrEditDialog from './components/addOrEditDialog.vue';
 import viewDialog from './components/viewDialog.vue';
@@ -106,7 +108,7 @@ import { getList, del } from '@/api/marketManagem/index';
 import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     addOrEditDialog,
@@ -119,11 +121,15 @@ export default {
       loading: false,
       delVisible: false,
       selection: [],
-      processSubmitDialogFlag: false
+      processSubmitDialogFlag: false,
+      cacheKeyUrl:'eos-a2e6abd9-marketManagement',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 6 - 3
src/views/purchasingManage/inquiryManage/index.vue

@@ -13,8 +13,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -169,9 +170,10 @@
     isHasGeneratedContractPI
   } from '@/api/purchasingManage/inquiryManage';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -329,7 +331,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-151ba34e-inquiryManage',
       };
     },
     computed: {},

+ 7 - 3
src/views/purchasingManage/purchaseNeedManage/index.vue

@@ -13,8 +13,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -142,8 +143,10 @@
     isHasGeneratedPlanAPI
   } from '@/api/purchasingManage/purchaseNeedManage';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -261,7 +264,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-d8f2c206-purchaseNeedManage',
       };
     },
     methods: {

+ 7 - 5
src/views/purchasingManage/purchaseOrder/accountstatement/index.vue

@@ -14,9 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
-        :page-size="20"
-
+          :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -158,9 +158,10 @@ import 'file-saver'
 import AccountInfoDialog from "@/views/financialManage/invoiceManage/components/accountInfoDialog.vue";
 import addInvoiceDialog from "@/views/financialManage/invoiceManage/components/addOrEditDialog.vue";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     addInvoiceDialog,
@@ -308,7 +309,8 @@ export default {
           showOverflowTooltip: true,
           fixed: 'right',
         }
-      ]
+      ],
+      cacheKeyUrl: 'eos-5c3f156d-purchaseOrder-accountstatement'
     };
   },
   computed: {},

+ 6 - 3
src/views/purchasingManage/purchaseOrder/index.vue

@@ -30,8 +30,9 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
-              cache-key="eomContactPageTable"
               :page-size="20"
+              @columns-change="handleColumnChange"
+              :cache-key="cacheKeyUrl"
             >
               <!-- 表头工具栏 -->
               <template v-slot:toolbar>
@@ -231,9 +232,10 @@
     saleOrderProgressStatusEnum
   } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchTable,
@@ -427,7 +429,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-5f2ac512-purchaseOrder-saleorder'
       };
     },
     computed: {},

+ 7 - 5
src/views/purchasingManage/purchaseOrder/invoice/index.vue

@@ -14,9 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
-        :page-size="20"
-
+          :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -158,9 +158,10 @@ import {
 import dictMixins from '@/mixins/dictMixins';
 import {getWarehouseListByIds} from "@/api/purchasingManage/returnGoods";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     searchTable,
@@ -277,7 +278,8 @@ export default {
           showOverflowTooltip: true,
           fixed: 'right'
         }
-      ]
+      ],
+      cacheKeyUrl:'eos-8f646c6a-purchaseOrder-invoice',
     };
   },
   computed: {},

+ 7 - 3
src/views/purchasingManage/purchaseOrder/outSourceSend/index.vue

@@ -14,8 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -172,8 +173,10 @@
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import { getPurchaseOutSourceSendDetailAPI } from '@/api/purchasingManage/outSourceSend';
   import { getWarehouseOutStock } from '@/api/saleManage/saleorder';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       addInvoiceDialog,
@@ -277,7 +280,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-aba18b2f-purchaseOrder-outSourceSend'
       };
     },
     computed: {},

+ 7 - 5
src/views/purchasingManage/purchaseOrder/returnGoods/index.vue

@@ -14,9 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
-        :page-size="20"
-
+          :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -138,9 +138,10 @@
   } from '@/api/purchasingManage/returnGoods';
   import dictMixins from '@/mixins/dictMixins';
   import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchTable,
@@ -268,7 +269,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-41345bd0-purchaseOrder-returnorder'
       };
     },
     computed: {},

+ 6 - 3
src/views/purchasingManage/supplierManage/index.vue

@@ -32,7 +32,8 @@
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
               :page-size="20"
-              cache-key="eomContactPageTable"
+              @columns-change="handleColumnChange"
+              :cache-key="cacheKeyUrl"
             >
               <!-- 表头工具栏 -->
               <template v-slot:toolbar v-if="!isDialog">
@@ -149,9 +150,10 @@
   } from '@/api/saleManage/contact';
   import dictMixins from '@/mixins/dictMixins';
   import { getPcTreeByPids } from '@/api/classifyManage';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     props: {
       isDialog: {
         default: false
@@ -305,7 +307,8 @@
           children: 'children',
           label: 'name'
         },
-        showEdit: true
+        showEdit: true,
+        cacheKeyUrl:'eos-f895878e-supplierManage',
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/businessOpportunity/index.vue

@@ -13,9 +13,10 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :row-class-name="tableRowClassName"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -191,9 +192,10 @@
   import assignDialog from './components/assignDialog';
   import { reviewStatus } from '@/enum/dict';
   import { businessOpportunityUpdateStatusAPI } from '@/BIZComponents/processSubmitDialog/api';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       opportunitySearch,
       followList,
@@ -428,7 +430,8 @@
           children: 'children',
           label: 'name'
         },
-        showEdit: true
+        showEdit: true,
+        cacheKeyUrl:"eos-eaf1548b-businessOpportunity"
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/contact/contactList.vue

@@ -41,7 +41,8 @@
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
           :page-size="20"
-          cache-key="eomContactPageTable"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -179,9 +180,10 @@
   import { reviewStatus } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import { mapGetters } from 'vuex';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       AssetTree,
@@ -360,7 +362,8 @@
           children: 'children',
           label: 'name'
         },
-        showEdit: true
+        showEdit: true,
+        cacheKeyUrl:'eos-77c81132-saleManage-contact-staff',
       };
     },
     computed: {

+ 6 - 3
src/views/saleManage/contact/contactListAdmin.vue

@@ -40,7 +40,8 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
           :page-size="20"
         >
           <!-- 表头工具栏 -->
@@ -240,9 +241,10 @@
   import { reviewStatus } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import myqsCode from './components/qsCode.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       AssetTree,
@@ -435,7 +437,8 @@
           children: 'children',
           label: 'name'
         },
-        showEdit: true
+        showEdit: true,
+        cacheKeyUrl:'eos-ce5bbf85-saleManage-contact-admin',
       };
     },
 

+ 6 - 3
src/views/saleManage/contact/index.vue

@@ -56,7 +56,8 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
-              cache-key="eomContactPageTable"
+              @columns-change="handleColumnChange"
+              :cache-key="cacheKeyUrl"
               :page-size="20"
             >
               <!-- 表头工具栏 -->
@@ -218,6 +219,7 @@
 </template>
 
 <script>
+  import tabMixins from '@/mixins/tableColumnsMixin';
   import addOpportunityDialog from '@/views/saleManage/businessOpportunity/components/addOpportunityDialog.vue';
 
   import ContactSearch from './components/contactSearch.vue';
@@ -240,7 +242,7 @@
   import dictMixins from '@/mixins/dictMixins';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       AssetTree,
       ContactSearch,
@@ -459,7 +461,8 @@
         },
         showEdit: true,
         visible: false,
-        codeVisible: false
+        codeVisible: false,
+        cacheKeyUrl:'eos-6c810d8f-saleManage-contact',
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/quotation/index.vue

@@ -13,8 +13,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -159,9 +160,10 @@
 
   import dictMixins from '@/mixins/dictMixins';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -343,7 +345,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-5569a1b1-saleManage-quotation'
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/saleOrder/accountstatement/index.vue

@@ -15,7 +15,8 @@
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
           :page-size="20"
-          cache-key="eomContactPageTable"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -196,9 +197,10 @@
   import AccountInfoDialog from '@/views/financialManage/invoiceManage/components/accountInfoDialog.vue';
   import addInvoiceDialog from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       addInvoiceDialog,
@@ -372,7 +374,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-b5bbaa6e-saleManage-accountstatement',
       };
     },
     computed: {},

+ 7 - 6
src/views/saleManage/saleOrder/customerReturnOrder/index.vue

@@ -14,9 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
-        :page-size="20"
-
+          :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -162,10 +162,10 @@ import dictMixins from '@/mixins/dictMixins';
 import addReturnGoodsDialog from "@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue";
 import AddSaleOrderDialog from "@/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     processSubmitDialog,
     AddSaleOrderDialog,
@@ -302,7 +302,8 @@ export default {
           showOverflowTooltip: true,
           fixed: 'right'
         }
-      ]
+      ],
+      cacheKeyUrl:'eos-62240a29-saleManage-customerReturnOrder'
     };
   },
   computed: {},

+ 6 - 3
src/views/saleManage/saleOrder/entrustedReceive/index.vue

@@ -14,7 +14,8 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
           :page-size="20"
         >
           <!-- 表头工具栏 -->
@@ -168,9 +169,10 @@
   import AddOrEditDialog from '@/views/saleManage/saleOrder/customerReturnOrder/addOrEditDialog.vue';
   import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       addInvoiceDialog,
@@ -281,7 +283,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-00bf7292-saleManage-entrustedReceive',
       };
     },
     computed: {},

+ 9 - 2
src/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue

@@ -9,6 +9,8 @@
         :selection.sync="selection"
         row-key="id"
         :page-size="20"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <template v-slot:type="{ row }">
           <span> {{ getDictValue('异常类型', row.type + '') }}</span>
@@ -168,6 +170,7 @@
   import { getList, remove, submit } from '@/api/exceptionManagement/index';
   import { relationType } from '@/enum/dict.js';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
     components: {
@@ -175,7 +178,7 @@
       dispose,
       processSubmitDialog
     },
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     data() {
       return {
         visible: false,
@@ -188,12 +191,16 @@
         selection: [],
         userOptions: [],
         viewId: '',
-        qualityInspector: ''
+        qualityInspector: '',
+        cacheKeyUrl:'eos-7a45afd7-saleManage-exceptionList',
+        columnsVersion:1,
       };
     },
     computed: {
       // 表格列配置
       columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
         return [
           {
             columnKey: 'selection',

+ 6 - 3
src/views/saleManage/saleOrder/index.vue

@@ -30,8 +30,9 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
-              cache-key="eomContactPageTable"
               :page-size="20"
+              @columns-change="handleColumnChange"
+              :cache-key="cacheKeyUrl"
             >
               <!-- 表头工具栏 -->
               <template v-slot:toolbar>
@@ -268,9 +269,10 @@
   import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
   import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       autogenerateDialog,
@@ -491,7 +493,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-c2e9664a-saleManage-saleOrder',
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/saleOrder/invoice/index.vue

@@ -14,8 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -176,9 +177,10 @@
   } from '@/api/saleManage/saleordersendrecord';
   import dictMixins from '@/mixins/dictMixins';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       printTemplate,
@@ -324,7 +326,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-bfe3d5ea-saleManage-invoice' 
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/saleOrder/invoiceConfirm/index.vue

@@ -14,8 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -183,9 +184,10 @@
     getSendConfirmTableList,
     deleteSendConfirmInformation
   } from '@/api/saleManage/invoiceConfirm';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       printTemplate,
@@ -340,7 +342,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-436e7400-saleManage-invoiceConfirm',
       };
     },
     computed: {},

+ 6 - 3
src/views/saleManage/saleOrder/returnGoods/index.vue

@@ -14,8 +14,9 @@
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
-          cache-key="eomContactPageTable"
           :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -200,9 +201,10 @@
   import dictMixins from '@/mixins/dictMixins';
   import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchTable,
@@ -363,7 +365,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ]
+        ],
+        cacheKeyUrl:'eos-64acd1e7-saleManage-returnorder'
       };
     },
     computed: {},

+ 9 - 3
src/views/targetManage/salesRegulation/index.vue

@@ -11,9 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
-
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -93,8 +93,10 @@ import {
   targetDefinitionPage,
   targetDefinitionDel
 } from '@/api/targetManage/index.js';
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
+  mixins:[tabMixins],
   components: {
     addOrEditDialog,
     searchTable
@@ -105,11 +107,15 @@ export default {
       loading: false,
       delVisible: false,
       addOrEditDialogFlag: false,
-      selection: []
+      selection: [],
+      cacheKeyUrl:'eos-1ee05028-targetManage-salesRegulation',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 9 - 4
src/views/targetManage/salesTarget/index.vue

@@ -11,9 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
-
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -80,6 +80,7 @@
 </template>
 
 <script>
+import tabMixins from '@/mixins/tableColumnsMixin';
 import dictMixins from '@/mixins/dictMixins';
 import addOrEditDialog from './components/addOrEditDialog.vue';
 import viewDialog from './components/viewDialog.vue';
@@ -87,7 +88,7 @@ import searchTable from './components/searchTable.vue';
 import { salesTargetPage ,settlementAccountRemoveAPI} from '@/api/targetManage/index.js';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     addOrEditDialog,
     searchTable,
@@ -98,11 +99,15 @@ export default {
       // 加载状态
       loading: false,
       delVisible: false,
-      selection: []
+      selection: [],
+      cacheKeyUrl:'eos-be72e790-targetManage-salesTarget',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 8 - 3
src/views/transportManager/carBook/index.vue

@@ -11,9 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
-
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -138,9 +138,10 @@ import detailDialog from './components/detailDialog.vue'
 import {carBookPageListAPI, carRemoveAPI, carSubmit, carUpdateAPI} from "@/api/transportManager/carBook";
 import {getFile} from "@/api/system/file";
 import fileMain from "@/components/addDoc/index.vue";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     fileMain,
     addOrEditDialog,
@@ -156,10 +157,14 @@ export default {
       loading: false,
       addOrEditDialogFlag: false,
       detailDialogFlag: false,
+      cacheKeyUrl:'eos-e3e8282b-carBook',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 8 - 3
src/views/transportManager/driverBook/index.vue

@@ -11,9 +11,9 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
-        cache-key="eomContactPageTable"
         :page-size="20"
-
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -112,9 +112,10 @@ import addOrEditDialog from './components/addOrEditDialog.vue'
 import detailDialog from './components/detailDialog.vue'
 import {driverBookPageListAPI, driverRemoveAPI, driverSubmit} from "@/api/transportManager/driverBook";
 import {mapGetters} from "vuex";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins,tabMixins],
   components: {
     addOrEditDialog,
     pageSearchTable,
@@ -139,11 +140,15 @@ export default {
       loading: false,
       addOrEditDialogFlag: false,
       detailDialogFlag: false,
+      cacheKeyUrl:'eos-8738c576-driverBook',
+      columnsVersion:1,
     };
   },
   computed: {
     ...mapGetters(['dict','getDictValue']),
     columns() {
+      // 当columnsVersion变化时会重新计算,用作更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 8 - 4
src/views/transportManager/shipManage/dispatchManage/page.vue

@@ -10,9 +10,9 @@
       full-height="calc(100vh - 116px)"
       tool-class="ele-toolbar-form"
       :selection.sync="selection"
-      cache-key="dispatchManagePage1Table"
       :page-size="20"
-
+      :cache-key="cacheKeyUrl"
+      @columns-change="handleColumnChange"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -130,9 +130,9 @@ import {
   logistictrakplanRemoveAPI, logistictrakplanwithdrawAPI
 } from "@/api/transportManager/shipManage";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-
+import tabMixins from '@/mixins/tableColumnsMixin';
 export default {
-  mixins: [dictMixins],
+  mixins: [dictMixins, tabMixins],
   components: {
     processSubmitDialog,
     addOrEditDialog,
@@ -155,10 +155,14 @@ export default {
       addOrEditDialogFlag: false,
       detailDialogFlag: false,
       processSubmitDialogFlag: false,
+      cacheKeyUrl: 'eos-31678736-shipManage-dispatch',
+      columnsVersion:1,
     };
   },
   computed: {
     columns() {
+      // 当columnsVersion变化时会重新计算,用做更新列配置
+      const version = this.columnsVersion;
       return [
         {
           width: 45,

+ 9 - 3
src/views/transportManager/shipManage/taskWorkManage/page.vue

@@ -11,7 +11,8 @@
       tool-class="ele-toolbar-form"
       :selection.sync="selection"
       :page-size="20"
-      cache-key="eomContactPageTable"
+      @columns-change="handleColumnChange"
+      :cache-key="cacheKeyUrl"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -117,9 +118,10 @@
     logistictraklistnotePageListAPI,
     logistictraklistnoteUpdateAPI
   } from '@/api/transportManager/shipManage/taskWork';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       addOrEditDialog,
       pageSearchTable,
@@ -142,11 +144,15 @@
         planDetailDialogFlag: false,
         feeInfoDialogFlag: false,
         transferDialogFlag: false,
-        addOrEditDialogFlag: false
+        addOrEditDialogFlag: false,
+        cacheKeyUrl:'eos-02b17ed5-shipManage-taskwork',
+        columnsVersion:1,
       };
     },
     computed: {
       columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
         return [
           {
             width: 45,