zhiyong.zhou
2024-03-04 dfd7249fad876dee96480d70ff6f5ebd60207617
src/views/workspace/process/ProcessInstanceTabs.vue
@@ -23,39 +23,7 @@
    };
  },
  methods: {
    convertToTreeData(data, parent,index,parentId) {
      const tempJson = data.find(f =>
          f.index_no === index
      )
      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}
@@ -92,7 +60,7 @@
    getFlowDetail(param){
      getFlowDetail(param).then(rsp => {
        let form = rsp.data.data;
        form.process =this.convertToTreeData(form.steps, {
        form.process =this.$Utils.convertToTreeData(form.steps, {
          "id": form.id, "parentId": null,
          "type": "ROOT",
          "name": "发起人",