浏览代码

处理修改流程时新增节点缺少virtuallyRole数据

lph 1 年之前
父节点
当前提交
ee5430ae69

+ 3 - 1
zkqy-ui/src/views/system/bpmnPro/components/Panel/components/ElementExecuteUser.vue

@@ -160,7 +160,9 @@ export default {
       this.exeUserType = getExecuteUserType(getActive()) || "1";
       if (this.exeUserType == 2) {
         let temp = getExecuteUser(getActive()) || "";
-        this.exeUserValue = temp ? temp.split(",") : [];
+        console.log(temp);
+        this.exeUserValue = typeof temp == "string" ? temp.split(",") : temp;
+        console.log(this.exeUserValue);
       } else {
         this.exeUserValue = getExecuteUser(getActive()) || "";
       }

+ 7 - 2
zkqy-ui/src/views/system/bpmnPro/components/Panel/components/ElementUnusualTasks.vue

@@ -84,6 +84,7 @@
           <el-select
             v-model="newUnusualTask.industryType"
             @change="industryTypeChangeHandler"
+            :filterable="true"
           >
             <el-option
               v-for="{ label, value } in dict.type.industry_type"
@@ -98,6 +99,7 @@
             v-model="newUnusualTask.scriptKey"
             @change="scriptKeyChange"
             :disabled="!newUnusualTask.industryType"
+            :filterable="true"
           >
             <el-option
               v-for="{ label, value } in filteredScriptList"
@@ -112,7 +114,10 @@
           prop="scriptTriggerType"
           label="事件触发机制"
         >
-          <el-select v-model="newUnusualTask.scriptTriggerType">
+          <el-select
+            :filterable="true"
+            v-model="newUnusualTask.scriptTriggerType"
+          >
             <el-option
               v-for="item in dict.type.script_trigger_type"
               :label="item.label"
@@ -129,7 +134,7 @@
               size="normal"
               clearable
             ></el-input> -->
-            <el-select v-model="newUnusualTask.compName">
+            <el-select v-model="newUnusualTask.compName" :filterable="true">
               <el-option
                 v-for="item in myDesignFormList"
                 :key="item.formKey"

+ 28 - 23
zkqy-ui/src/views/system/bpmnPro/components/Panel/index.vue

@@ -211,30 +211,35 @@ export default {
 
       // !isProcess(element) && this.renderComponents.push(ElementBeforeNode);
       // !isProcess(element) && this.renderComponents.push(ElementAfterNode);
-      switch (this.myProcessType) {
-        case "0": //工业类型
-          this.renderComponents.push(ElementGenerations); //常规信息
-          // !isProcess(element) &&
-          //   !isStart(element) &&
-          //   !isEnd(element) &&
-          //   this.renderComponents.push(ElementAsyncContinuations); //节点前后执行的数据
-          !isProcess(element) && this.renderComponents.push(ElementNormalTask); //正常节点
-          !isProcess(element) &&
-            !isStart(element) &&
-            !isEnd(element) &&
-            this.renderComponents.push(ElementUnusualTasks); //可处理异常
-          isUserTask(element) && this.renderComponents.push(ElementExecuteUser);
-          !isProcess(element) &&
-            !isStart(element) &&
-            !isEnd(element) &&
-            this.renderComponents.push(ElementExcuteType); //执行类型
-          break;
-        case "1": //OA类型
-          this.renderComponents.push(ElementGenerations); //常规信息
-          !isProcess(element) && this.renderComponents.push(ElementAfterNode);
-        default:
-          break;
+      if (this.myProcessType == 0) {
+        this.renderComponents.push(ElementGenerations); //常规信息
+        // !isProcess(element) &&
+        //   !isStart(element) &&
+        //   !isEnd(element) &&
+        //   this.renderComponents.push(ElementAsyncContinuations); //节点前后执行的数据
+        !isProcess(element) && this.renderComponents.push(ElementNormalTask); //正常节点
+        !isProcess(element) &&
+          !isStart(element) &&
+          !isEnd(element) &&
+          this.renderComponents.push(ElementUnusualTasks); //可处理异常
+        isUserTask(element) && this.renderComponents.push(ElementExecuteUser);
+        !isProcess(element) &&
+          !isStart(element) &&
+          !isEnd(element) &&
+          this.renderComponents.push(ElementExcuteType); //执行类型
+      } else if (this.myProcessType == 1) {
+        this.renderComponents.push(ElementGenerations); //常规信息
+        !isProcess(element) && this.renderComponents.push(ElementAfterNode);
       }
+      // switch (this.myProcessType) {
+      //   case 0: //工业类型
+
+      //     break;
+      //   case 1: //OA类型
+
+      //   default:
+      //     break;
+      // }
     },
     // 获取所有脚本列表
     async getAllScriptList() {

+ 2 - 0
zkqy-ui/src/views/system/bpmnPro/components/bo-utils/getNodeMsg.js

@@ -234,6 +234,8 @@ export function filterNodeMsg(oldMsg, newMsg) {
     let sameNode = oldMsg[keys[2]].find((oldItem) => oldItem.virtuallyRole == item.virtuallyRole)
     if (sameNode) {
       item.id = sameNode.id;
+    } else {//新增节点  添加virtuallyRole
+      item.virtuallyRole = uuidv4();
     }
   })