Procházet zdrojové kódy

feat(user-taskinstance): 新增并行工序字段及相关逻辑处理

xieyong před 1 týdnem
rodič
revize
fa2b005b57

+ 26 - 2
src/views/technology/route/components/user-taskinstance.vue

@@ -42,6 +42,13 @@
           <el-tag v-if="row.processLabel == 3" type="warning">请托</el-tag>
         </template>
 
+        <template v-slot:isParallel="{ row }">
+          <el-select v-model="row.isParallel" placeholder="请选择" size="small">
+            <el-option :value="0" label="否"></el-option>
+            <el-option :value="1" label="是"></el-option>
+          </el-select>
+        </template>
+
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -161,6 +168,14 @@
             align: 'center',
             minWidth: 110
           },
+          {
+            prop: 'isParallel',
+            label: '并行工序',
+            showOverflowTooltip: true,
+            align: 'center',
+            slot: 'isParallel',
+            minWidth: 110
+          },
           {
             align: 'center',
             prop: 'controlName',
@@ -258,7 +273,11 @@
         let arr = this.$refs.ProductionCom.selection;
         let len = this.$refs.table.getData().length + 1;
         let arrM = arr.map((item, index) => {
-          return { ...item.detail, orderNum: len + index };
+          return {
+            ...item.detail,
+            orderNum: len + index,
+            isParallel: item.isParallel || 0
+          };
         });
         arrM.forEach((element) => {
           if (element.id) {
@@ -353,7 +372,11 @@
         if (data.length != 0) {
           let len = this.$refs.table.getData().length + 1;
           let arrM = data.map((item, index) => {
-            return { ...item.detail, orderNum: len + index };
+            return {
+              ...item.detail,
+              orderNum: len + index,
+              isParallel: item.isParallel || 0
+            };
           });
           arrM.forEach((element) => {
             if (element.id) {
@@ -389,6 +412,7 @@
           let arr =
             res?.list?.map((it) => {
               it.detail.orderNum = it.orderNum;
+              it.detail.isParallel = it.isParallel || 0;
 
               return it.detail;
             }) || [];