From 6a72e9e44dc7278e18d55ccd5637b81a1cb2f047 Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期一, 04 三月 2024 18:16:36 +0800
Subject: [PATCH] Merge branch 'dev' of http://highdatas.com:9000/r/foundation/designer.approve.2 into dev

---
 src/views/workspace/process/ProcessInstanceTabs.vue |   74 +------------------------------------
 1 files changed, 2 insertions(+), 72 deletions(-)

diff --git a/src/views/workspace/process/ProcessInstanceTabs.vue b/src/views/workspace/process/ProcessInstanceTabs.vue
index 6730c62..118080f 100644
--- a/src/views/workspace/process/ProcessInstanceTabs.vue
+++ b/src/views/workspace/process/ProcessInstanceTabs.vue
@@ -1,8 +1,6 @@
 <template>
   <div class="process-view">
-
     <div class="process-view__tabs" v-loading="loading">
-
     <process-diagram-viewer />
 
     </div>
@@ -19,59 +17,21 @@
     return {
       loading: false,
       processInstanceId: "",
-      taskId: "",
       formData: {},
       currentNode: {},
       processInfo: "",
     };
   },
-
   methods: {
-    convertToTreeData(data, parent,index,parentId) {
-      const tempJson = data.find(f =>
-          f.index_no === index
-      )
-      console.log("tempJson",tempJson);
-      this.$store.state.noTakeList .push(tempJson.id)
-      parent.children = {
-        "id": tempJson.id,
-        "parentId": parentId,
-        "name": "瀹℃壒浜�",
-        "type": "APPROVAL",
-        "props":
-            {
-              "assignedType": "ASSIGN_USER",
-              "nobody": {
-                "handler": "TO_PASS",
-                "assignedUser": []
-              },
-              "refuse": {
-                "type": "TO_END",
-                "target": ""
-              },
-              "assignedUser": [{"id": tempJson.board_id||tempJson.rule_code, "name": tempJson.name,"type":tempJson.board_id!=null?"group":"staff"}],
-              "approvalGroup":tempJson.board_id!=null?{"id":tempJson.board_id,"name":tempJson.name}:"",
-              "staffGroup":tempJson.board_id!=null?"":{"id":tempJson.rule_code,"name":tempJson.name},
-            }
-      }
-      if (data.length >index) {
-        let getChildren = this.convertToTreeData(data, parent.children, index+1,parent.children.id)
-        parent.children=getChildren
-      }
-      return parent;
-    },
+
     getProcessInfo() {
       this.loading = true;
       let param = {"id": this.processInstanceId}
-      //let param = {"id": "74d84fb9188f4ce4b93e95f301ebbc1b"}
-      //鏍规嵁涓氬姟id鑾峰彇褰撳墠瀹℃壒娴佹楠�
       getWorkSetpsByBusinessId(param).then(rsp => {
         let workSetps=rsp.data.data
-        console.log("workSetps", workSetps)
         if(workSetps.length>0){
           let index=-1;
           let resultProcess;
-          debugger
           let noApprovalArr=workSetps.filter(item=>item.end_time===null);
           ////濡傛灉鎵�鏈夎妭鐐归兘娌″鎵� 閭d箞灏卞彇index_no=1鐨刬d涓哄綋鍓嶈繍琛岀殑鑺傜偣
           if(noApprovalArr.length===workSetps.length){
@@ -79,23 +39,18 @@
           }else{
             //鍚﹀垯灏卞彇閬嶅巻鏌ヨ 瀹℃壒鑺傜偣涓嶄负绌� index_no鏈�澶х殑
             workSetps.forEach(item => {
-              console.log("indexno",item.index_no)
               if (item.index_no > index && item.end_time!==null) {
                 index = item.index_no;
                 resultProcess = item;
               }
             })
           }
-
-          console.log("resultProcess", resultProcess)
           this.$store.state.runningList .push(resultProcess.approve_step_id)
           param.id=resultProcess.approve_id
           this.getFlowDetail(param)
         }else{
           this.$message.error("鏈煡璇㈠埌瀹℃壒娴佹暟鎹�!")
         }
-
-        console.log("workSetps", workSetps)
       }).catch(err => {
         this.$message.error(err)
       })
@@ -104,24 +59,8 @@
     },
     getFlowDetail(param){
       getFlowDetail(param).then(rsp => {
-
         let form = rsp.data.data;
-        console.log("getFlowDetail-form", form)
-        form.logo = ""
-        form.settings = {
-          "commiter": [],
-          "admin": [],
-          "sign": false,
-          "notify": {
-            "types": [
-              "APP"
-            ],
-            " title": "娑堟伅閫氱煡鏍囬"
-          }
-        }
-        form.formItems = []
-
-        form.process =this.convertToTreeData(form.steps, {
+        form.process =this.$Utils.convertToTreeData(form.steps, {
           "id": form.id, "parentId": null,
           "type": "ROOT",
           "name": "鍙戣捣浜�",
@@ -133,15 +72,7 @@
 
         form.name=this.$Utils.decode(form.name);
         form.templateName = form.name
-        form.groupId = null;
-        form.icon = "{\"icon\":\"el-icon-eleme\",\"background\":\"#1e90ff\"}";
-        form.notify = "";
-        form.remark = "澶囨敞璇存槑";
-        form.isStop = false
-        form.processDefinitionId = null
         this.$store.state.design = form;
-        console.log("this.$store.state.design",this.$store.state.design)
-        console.log("杈撳嚭杞崲鍚庣殑form,",form)
         this.$store.commit('loadForm', form)
       }).catch(err => {
         this.$message.error(err)
@@ -152,7 +83,6 @@
   },
   beforeMount() {
     this.processInstanceId = this.$route.query.processInstanceId;
-    this.taskId = this.$route.query.taskId;
   },
   mounted() {
     this.getProcessInfo();

--
Gitblit v1.8.0