Browse Source

refactor(bpm): 统一协作流程列表列配置并调整列宽

合并 `columns` 和 `deptColumns` 为单一列配置,移除重复逻辑和注释代码,并调整列宽为固定宽度以优化表格布局。
yusheng 5 ngày trước cách đây
mục cha
commit
ea0c3696b8
1 tập tin đã thay đổi với 7 bổ sung135 xóa
  1. 7 135
      src/views/bpm/collaborative/index.vue

+ 7 - 135
src/views/bpm/collaborative/index.vue

@@ -425,18 +425,6 @@
         return this.$store.state.theme.styleResponsive;
       },
       columns() {
-        // let list = this.formColumnList
-        //   .filter((item) => item.name && item.name != '自定义区域')
-        //   .map((item) => {
-        //     return {
-        //       prop: item.model,
-        //       label: item.name,
-        //       align: 'center',
-        //       slot: item.model,
-        //       showOverflowTooltip: true,
-        //       minWidth: 120
-        //     };
-        //   });
         return [
           {
             width: 45,
@@ -459,7 +447,7 @@
             align: 'center',
             slot: 'dictType',
             showOverflowTooltip: true,
-            minWidth: 70
+            width: 80
           },
           {
             prop: 'formName',
@@ -467,7 +455,7 @@
             align: 'center',
             slot: 'formName',
             showOverflowTooltip: true,
-            minWidth: 70
+            minWidth: 120
           },
           {
             prop: 'remark',
@@ -482,112 +470,14 @@
             align: 'center',
             slot: 'listName',
             showOverflowTooltip: true,
-            minWidth: 80
-          },
-          {
-            prop: 'startUserName',
-            label: '发起人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 180
-          },
-          // ...list,
-          {
-            prop: 'result',
-            slot: 'result',
-            label: '结果',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 80
-          },
-          {
-            prop: 'endTime',
-            label: '审批时间',
-            align: 'center',
-            showOverflowTooltip: true,
             minWidth: 120
           },
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 120
-          }
-
-          // {
-          //   prop: 'durationInMillis',
-          //   slot: 'durationInMillis',
-          //   label: '耗时',
-          //   align: 'center',
-          //   showOverflowTooltip: true,
-          //   minWidth: 130
-          // },
-          // {
-          //   columnKey: 'action',
-          //   label: '操作',
-          //   width: 100,
-          //   align: 'center',
-          //   resizable: false,
-          //   slot: 'action',
-          //   showOverflowTooltip: true,
-          //   fixed: 'right'
-          // }
-        ];
-      },
-      deptColumns() {
-        // let list = this.formColumnList
-        //   .filter((item) => item.name && item.name != '自定义区域')
-        //   .map((item) => {
-        //     return {
-        //       prop: item.model,
-        //       label: item.name,
-        //       align: 'center',
-        //       slot: item.model,
-        //       showOverflowTooltip: true,
-        //       minWidth: 120
-        //     };
-        //   });
-        return [
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'dictType',
-            label: '分类',
-            align: 'center',
-            slot: 'dictType',
-            showOverflowTooltip: true,
-            minWidth: 70
-          },
-          {
-            prop: 'formName',
-            label: '单据',
-            align: 'center',
-            slot: 'formName',
-            showOverflowTooltip: true,
-            minWidth: 120
-          },
-          {
-            prop: 'listName',
-            label: '名称',
-            align: 'center',
-            slot: 'listName',
-            showOverflowTooltip: true,
-            minWidth: 150
-          },
           {
             prop: 'startUserName',
             label: '发起人',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 180
+            width: 120
           },
           // ...list,
           {
@@ -596,43 +486,25 @@
             label: '结果',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 100
+            width: 80
           },
           {
             prop: 'endTime',
             label: '审批时间',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 180
+            width: 160
           },
           {
             prop: 'createTime',
             label: '创建时间',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 180
+            width: 160
           }
-
-          // {
-          //   prop: 'durationInMillis',
-          //   slot: 'durationInMillis',
-          //   label: '耗时',
-          //   align: 'center',
-          //   showOverflowTooltip: true,
-          //   minWidth: 130
-          // },
-          // {
-          //   columnKey: 'action',
-          //   label: '操作',
-          //   width: 230,
-          //   align: 'center',
-          //   resizable: false,
-          //   slot: 'action',
-          //   showOverflowTooltip: true,
-          //   fixed: 'right'
-          // }
         ];
       },
+
       getUserName() {
         return (id) => {
           if (!id) return '';