Преглед изворни кода

feat(工单): 添加way属性控制工单状态筛选

liujt пре 2 месеци
родитељ
комит
985646dff7

+ 5 - 1
src/views/bpm/tickets/inspectionWork/index.vue

@@ -152,6 +152,10 @@
       myWork: {
         type: Boolean,
         default: false
+      },
+      way: {
+        type: String,
+        default: 'todo'
       }
     },
     data() {
@@ -681,7 +685,7 @@
 
         // if (this.myWork) {
           where.currentLoginUserId = this.$store.state.user.info.userId;
-          where.status = 0;
+          where.status = this.way == 'todo' ? 0 : 1;
         // }
 
         return getList({

+ 6 - 5
src/views/bpm/tickets/productions/index.vue

@@ -989,7 +989,8 @@
           queryTermination: this.tabValue == '10' ? 1 : 0,
           pageNum: page,
           size: limit,
-          ...this.sort
+          ...this.sort,
+          statusList: this.way == 'todo' ? [4, 5, 7] : [6, 10]
         };
 
         // 只有 tabValue == 1 才可能需要 workCenterIds 字段,可根据业务决定是否添加
@@ -999,7 +1000,7 @@
 
         const URL = this.tabValue == 1 ? getMyPage : getPage;
 
-        let res = await URL({ ...params, statusList });
+        let res = await URL({ ...params });
 
         this.loadTaskNames(res.list);
 
@@ -1231,9 +1232,9 @@
       /* 刷新表格 */
       reload(where = {}) {
         this.$nextTick(() => {
-          where.statusList = (
-            where.status || this.statusOpt[this.activeName][0].value
-          ).split(',');
+          // where.statusList = (
+          //   where.status || this.statusOpt[this.activeName][0].value
+          // ).split(',');
           this.$refs.table.reload({ page: 1, where });
         });
       },

+ 7 - 1
src/views/bpm/tickets/work/index.vue

@@ -41,6 +41,12 @@
       WorkSearch,
       DisposeDialog
     },
+    props: {
+      way: {
+        type: String,
+        default: 'todo'
+      }
+    },
     data() {
       return {
         visibleDialog: false,
@@ -168,7 +174,7 @@
       },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
-        where.status = 0
+        where.status = this.way == 'todo' ? 0 : 2;
         where.executorId = this.userInfo.userId;
         return getPlanOrderList({ pageNum: page, size: limit, ...where });
       },