From 39efab1d5585dcc6229a0c0e88d58556d9a9a67c Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 27 十一月 2024 02:37:22 +0800
Subject: [PATCH] 流程信息配置功能、项目关联流程功能

---
 src/views/projectProcess/components/RunProcess.vue |   79 +++++++++++++++++++++++++++++++++------
 1 files changed, 67 insertions(+), 12 deletions(-)

diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue
index 27e9699..24e17a8 100644
--- a/src/views/projectProcess/components/RunProcess.vue
+++ b/src/views/projectProcess/components/RunProcess.vue
@@ -1,9 +1,10 @@
 <template>
   <div>
     <el-dialog
-      title="娴佺▼鍚姩"
+      :title="`娴佺▼鍚姩锛歚 + projectInfo.projectName"
       :visible.sync="show"
-      width="750px"
+      width="950px"
+      :destroy-on-close="true"
       :close-on-click-modal="false"
       :before-close="handleClose">
       <div>
@@ -34,10 +35,46 @@
             label="娴佺▼绫诲瀷"
           >
           </el-table-column>
+          <el-table-column label="椤圭洰绫诲瀷" >
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.sys_project_type"
+                :value="scope.row.projectType"
+              >
+              </dict-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="璧勯噾绫诲瀷" >
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.sys_funding_type"
+                :value="scope.row.fundType"
+              >
+              </dict-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="鎶曡祫绫诲埆" >
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.sys_investment_type"
+                :value="scope.row.investType"
+              >
+              </dict-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="閲嶇偣鍒嗙被" >
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.sys_key_categories"
+                :value="scope.row.importanceType"
+              >
+              </dict-tag>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="startProcess">鍚姩</el-button>
+        <el-button type="danger" @click="startProcess">鍚姩</el-button>
         <el-button type="primary" @click="changeProcess">鍙樻洿</el-button>
       </span>
     </el-dialog>
@@ -45,35 +82,42 @@
 </template>
 
 <script>
+import {projectSetProcess} from "@/api/projectProcess/projectProcess";
+
 export default {
+  dicts: ['sys_project_type', 'sys_funding_type', 'sys_investment_type', 'sys_key_categories'],
   name: "RunProcess",
   props: {
     show: {
-      require: true,
+      required: true,
       type: Boolean
     },
-    projectId: {
-      require: true,  // 椤圭洰id
-      type: Number
+    projectInfo: {
+      required: true,  // 椤圭洰id銆佸悕绉�
+      type: Object
     },
     processList: {  // 娴佺▼鍒楄〃
-      require: true,
+      required: true,
       type: Array
     },
     nowProcessId: {  // 褰撳墠椤圭洰缁戝畾鐨勬祦绋媔d
-      require: true,
+      required: true,
       type: String
     },
     nowProcessName: {
-      require: true,
+      required: true,
       type: String
     }
   },
   watch: {
     // 鐩戝惉鍥炴樉鍊�
     nowProcessId(newVal, oldVal) {
+      console.log("浼犲叆鍊硷細", newVal, this.processList)
       this.processList.forEach((item,index) => {
-        if(item.id == newVal){
+        console.log(item.id, newVal, item.id === newVal)
+        if(item.id === newVal){
+          console.log("wwwwwww")
+          this.selectProcessId = newVal
           this.$nextTick(() => {
             this.$refs.myTable.toggleRowSelection(item);
           })
@@ -104,7 +148,18 @@
     },
     // 鍙樻洿娴佺▼
     changeProcess() {
-
+      if (!this.selectProcessId) {
+        this.$message.error("閫夊垯涓�涓祦绋嬪悗鎵嶈兘鍙樻洿")
+        return
+      }
+      const data = {
+        projectId: this.projectInfo.projectId,
+        flowableProcessId: this.selectProcessId
+      }
+      projectSetProcess(data).then(res => {
+        this.$message.success("鍙樻洿鎴愬姛")
+        this.handleClose()
+      })
     },
     handleClose() {
       this.$emit("close")

--
Gitblit v1.8.0