From f262d0f0d5b5f94a482d036cc356ec2599131392 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 29 十一月 2024 20:06:34 +0800
Subject: [PATCH] 项目启动流程、变更流程逻辑调整

---
 src/views/projectProcess/components/RunProcess.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue
index 7dbee95..92c6530 100644
--- a/src/views/projectProcess/components/RunProcess.vue
+++ b/src/views/projectProcess/components/RunProcess.vue
@@ -10,7 +10,7 @@
       <div>
         <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px">
           <div>褰撳墠娴佺▼锛�</div>
-          <div v-if="nowProcessDefId">{{selectProcessName}}</div>
+          <div v-if="nowProcessDefId">{{selectProcessName}}<span v-if="nowProcessInsId" style="color: red">锛堣繍琛屼腑锛�</span></div>
           <div v-else>鏈粦瀹氭祦绋�</div>
         </div>
       </div>
@@ -74,8 +74,8 @@
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="danger" @click="startProcess" :disable="!this.selectProcessDefId">鍚姩娴佺▼</el-button>
-        <el-button type="primary" @click="changeProcess">鍙樻洿</el-button>
+        <el-button type="danger" @click="startProcess" :disabled="(nowProcessInsId !== '') || (selectProcessDefId === '')">鍚姩娴佺▼</el-button>
+        <el-button type="primary" @click="changeProcess" :disabled="((nowProcessDefId === selectProcessDefId) && nowProcessInsId !== '') || selectProcessDefId === '' || nowProcessInsId === ''">娴佺▼鍙樻洿</el-button>
       </span>
     </el-dialog>
   </div>
@@ -100,10 +100,14 @@
       required: true,
       type: Array
     },
-    nowProcessDefId: {  // 褰撳墠椤圭洰缁戝畾鐨勬祦绋媔d
+    nowProcessDefId: {  // 褰撳墠椤圭洰缁戝畾鐨勫畾涔塱d
       required: true,
       type: String
-    }
+    },
+    nowProcessInsId: {  // 褰撳墠椤圭洰缁戝畾鐨勫疄渚媔d
+      required: true,
+      type: String
+    },
   },
   watch: {
     // 鐩戝惉鍥炴樉鍊�
@@ -120,6 +124,9 @@
       selectProcessDefId: '',  // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
       selectProcessName: '',  // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d
     }
+  },
+  created() {
+    console.log(this.nowProcessInsId, typeof this.nowProcessInsId, "wwwww")
   },
   methods: {
     setSelect(value) {
@@ -150,6 +157,7 @@
     startProcess() {
       startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => {
         this.$message.success(res.msg);
+        this.handleClose()
       })
     },
     // 鍙樻洿娴佺▼

--
Gitblit v1.8.0