zhiyong.zhou
2024-03-04 ba614829f008504d2316ba0916db8f3c9af0b563
src/views/workspace/process/ProcessInstanceTabs.vue
@@ -17,7 +17,6 @@
    return {
      loading: false,
      processInstanceId: "",
      taskId: "",
      formData: {},
      currentNode: {},
      processInfo: "",
@@ -51,6 +50,7 @@
              "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
@@ -60,15 +60,12 @@
    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);
          ////如果所有节点都没审批 那么就取index_no=1的id为当前运行的节点
          if(noApprovalArr.length===workSetps.length){
@@ -149,7 +146,6 @@
  },
  beforeMount() {
    this.processInstanceId = this.$route.query.processInstanceId;
    this.taskId = this.$route.query.taskId;
  },
  mounted() {
    this.getProcessInfo();