{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\flow\\flowAction.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\flow\\flowAction.vue","mtime":1667327529403},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport ImageBpm from \"@/components/flow/imageBpm.vue\";\nimport FormContent from \"@/components/flow/formContent.vue\"; //import OpinionText from \"@/components/common/opinionText.vue\";\n//import FileUpload from \"@/components/common/fileUpload.vue\";\n\nimport { mapState } from \"vuex\";\nimport { Message } from \"element-ui\";\nimport TaskToReject from \"@/components/flow/task/taskToReject.vue\";\nimport TaskToDelegate from \"@/components/flow/task/taskToDelegate.vue\";\nimport TaskToCopyTo from \"@/components/flow/task/taskToCopyTo.vue\";\nimport TaskToInqu from \"@/components/flow/task/taskToInqu.vue\";\nimport TaskToEndProcess from \"@/components/flow/task/taskToEndProcess.vue\";\nimport TaskToTrans from \"@/components/flow/task/taskToTrans.vue\";\nimport TaskToAddSign from \"@/components/flow/task/taskToAddSign.vue\";\nimport TaskToDelay from \"@/components/flow/task/taskToDelay.vue\";\nimport TaskSelectDestination from \"@/components/flow/task/taskSelectDestination.vue\";\nimport TaskToApproveLine from \"@/components/flow/task/taskToApproveLine.vue\";\nimport taskToSignSequence from \"@/components/flow/task/taskToSignSequence.vue\";\nimport taskToSignLine from \"@/components/flow/task/taskToSignLine.vue\";\nimport taskToComplete from \"@/components/flow/task/taskToComplete.vue\";\nimport taskToSave from \"@/components/flow/task/taskToSave.vue\";\nimport taskToRead from \"@/components/flow/task/taskToRead.vue\";\nimport taskToFeeBack from \"@/components/flow/task/taskToFeeBack.vue\";\nimport taskToInquReply from \"@/components/flow/task/taskToInquReply.vue\";\nimport userAddSignReply from \"@/components/flow/task/userAddSignReply.vue\";\nimport taskToRevoke from \"@/components/flow/task/taskToRevoke.vue\";\nimport utils from \"@/utils.js\";\nimport { Base64 } from \"js-base64\";\nimport moment from \"moment\"; //日期格式化插件\n\nimport form from \"@/api/form.js\";\nimport flow from \"@/api/flow.js\";\nimport i18n from \"@/lang/index.js\";\nimport req from \"@/request.js\";\nexport default {\n  components: {\n    ImageBpm: ImageBpm,\n    FormContent: FormContent,\n    //OpinionText,\n    //FileUpload,\n    TaskToReject: TaskToReject,\n    TaskToDelegate: TaskToDelegate,\n    TaskToCopyTo: TaskToCopyTo,\n    TaskToInqu: TaskToInqu,\n    TaskToEndProcess: TaskToEndProcess,\n    TaskToTrans: TaskToTrans,\n    TaskToAddSign: TaskToAddSign,\n    TaskToDelay: TaskToDelay,\n    TaskSelectDestination: TaskSelectDestination,\n    TaskToApproveLine: TaskToApproveLine,\n    taskToSignSequence: taskToSignSequence,\n    taskToSignLine: taskToSignLine,\n    taskToComplete: taskToComplete,\n    taskToSave: taskToSave,\n    taskToRead: taskToRead,\n    taskToFeeBack: taskToFeeBack,\n    taskToInquReply: taskToInquReply,\n    userAddSignReply: userAddSignReply,\n    taskToRevoke: taskToRevoke\n  },\n  props: [\"tasks\", //任务详情\n  \"task_state\", \"instId\", \"type\", \"taskId\", \"execId\", \"defId\", \"status\", \"choiceExcutor\", \"jumpType\", \"instStatus\", \"leaderId\", \"myReadType\", \"readId\", //知会任务待办传阅任务的主键ID\n  \"readDoneId\", //知会任务已办传阅任务的主键ID\n  \"approvalArea\", //审批区域显示的内容\n  \"referOpinion\", //允许参考意见 (选择否，则审批时不允许参考同环节其他会签人员的意见)\n  \"nodeType\", //当前任务类型\n  \"nodeId\", //当前任务节点\n  \"isLook\", \"sponsorRevoke\", //允许发起人撤回（默认不勾选）\n  \"opinionField\", //当前节点审批意见回填字段\n  \"appendOpinion\", //是否覆盖审批意见\n  \"signatureField\", //自动签章字段\n  \"signatureCover\", //自动签章是否覆盖\n  \"secretFree\", //自动签章时是否免密,\n  \"defKey\"],\n  data: function data() {\n    return {\n      isMk: false,\n      //是否是模块化开发进来\n      isDd: false,\n      // 是否是只显示审批页面\n      isGdt: false,\n      //是否有滚动条\n      dialogFormVisible: false,\n      dailogTitle: \"\",\n      opinion: \"\",\n      isHand: \"\",\n      state: \"\",\n      canLock: \"\",\n      formData: \"\",\n      actionName: \"\",\n      text: \"\",\n      disabled: true,\n      btnAlias: \"\",\n      //选择的按钮\n      token: utils.getUrlKey(\"token\"),\n      isApprovalOpinion: true,\n      //是否显示审批意见\n      iszFile: true,\n      //是否显示正文\n      isFile: true,\n      //是否显示附件\n      isProcessRecord: true,\n      //是否显示处理记录\n      isImageBpm: true,\n      //是否显示流程图\n      taskStatusArray: [\"APPROVELINEING\", \"APPROVELINEED\", \"SIGNSEQUENCEING\", \"SIGNSEQUENCEED\", \"SIGNLINEING\", \"SIGNLINEED\"],\n      isHang: false,\n      opinionFiles: \"\",\n      appendStr: true,\n      initBoAttr: ''\n    };\n  },\n  watch: {\n    status: function status(newVal, oldVal) {\n      var _this2 = this;\n\n      this.state = newVal; //newVal即是status\n\n      if (this.state != \"COPYTO\" && this.state != \"FOLLOW\" && this.state != \"COMMU\") {\n        var params = {\n          taskId: this.taskId,\n          leaderId: this.leaderId,\n          nodeType: this.nodeType\n        }; //判断是否是普通用户任务加签后的待办任务\n\n        if (this.tasks.bpmTask.parentId != \"0\") {\n          params.isAddSign = true;\n        } //通过流程实例ID和任务ID获取审批意见\n\n\n        if (this.taskId && this.instId) {\n          var bpmSaveOpinion = {\n            instId: this.instId,\n            taskId: this.taskId\n          };\n          flow.getBpmSaveOpinionByTeam(bpmSaveOpinion).then(function (data) {\n            if (data.state) {\n              if (data.value != \"\") {\n                _this2.text = data.value;\n              }\n            }\n          });\n        }\n\n        this.$store.dispatch(\"storeProcess/taskDetail\", params); //获取操作按钮\n\n        this.$store.dispatch(\"storeProcess/canLock\", {\n          taskId: this.taskId,\n          leaderId: this.leaderId\n        }).then(function (canLock) {\n          //获取任务是否能锁定\n          if (canLock == 4 && _this2.$router.history.current.fullPath.indexOf(\"token\") > -1) {\n            canLock = \"5\";\n          }\n\n          _this2.canLock = canLock;\n        });\n      }\n    },\n    approvalArea: function approvalArea(newVal, oldVal) {\n      //审批区域显示的内容\n      if (newVal) {\n        this.approvalArea = newVal;\n\n        if (this.approvalArea) {\n          if (this.approvalArea.indexOf(\"approvalOpinion\") == -1) {\n            this.isApprovalOpinion = false;\n          }\n\n          if (this.approvalArea.indexOf(\"zFile\") == -1) {\n            this.iszFile = false;\n          }\n\n          if (this.approvalArea.indexOf(\"file\") == -1) {\n            this.isFile = false;\n          }\n\n          if (this.approvalArea.indexOf(\"processRecord\") == -1) {\n            this.isProcessRecord = false;\n          }\n\n          if (this.approvalArea.indexOf(\"imageBpm\") == -1) {\n            this.isImageBpm = false;\n          }\n        }\n      }\n    }\n  },\n  computed: mapState({\n    rowsBtn: function rowsBtn(state) {\n      return state.storeProcess.rowsBtn;\n    },\n    forceLock: function forceLock(state) {\n      return state.storeProcess.forceLock;\n    },\n    isShowApprovalArea: function isShowApprovalArea() {\n      if (this.status != \"COPYTO\" && this.status != \"FOLLOW\" && (this.type != undefined || this.taskId != undefined) && this.instStatus != \"end\" && this.instStatus != \"manualend\" || this.status == \"COMMU\") {\n        return true;\n      }\n\n      return false;\n    }\n  }),\n  beforeDestroy: function beforeDestroy() {\n    //组件注销移除事件监听器，以防多次调用\n    this.$root.$off(\"formLoading\");\n  },\n  mounted: function mounted() {\n    var this_ = this; //监听表单加载完成发布事件\n\n    this_.$root.$on(\"formLoading\", function (value) {\n      this_.disabled = value; //检查当前挂起状态，判断是否禁用按钮\n\n      this_.checkInstStatus();\n    });\n  },\n  methods: {\n    // 通过按钮别名获取按钮主题类型\n    getType: function getType(alias) {\n      var type = \"default\";\n\n      switch (alias) {\n        case \"agree\":\n        case \"agreeTrans\":\n          type = \"primary\";\n          break;\n\n        case \"oppose\":\n        case \"opposeTrans\":\n        case \"reject\":\n        case \"endProcess\":\n          type = \"danger\";\n          break;\n      }\n\n      return type;\n    },\n    // //暂存审批意见\n    // createBpmSaveOpinion(flag) {\n    //   //点击保存暂存审批意见时，没有填写审批意见不处理\n    //   if (this.$refs.opinionText.getOpinion() == \"\" && flag) {\n    //     return;\n    //   }\n    //   if (this.$refs.opinionText.getOpinion() == \"\") {\n    //     Message.warning(\"请输入审批意见内容\");\n    //   } else {\n    //     let bpmSaveOpinion = { procInstId: this.instId, taskId: this.taskId, opinion: this.$refs.opinionText.getOpinion() };\n    //     flow.createBpmSaveOpinion(bpmSaveOpinion).then(data => {\n    //       if (data.state) {\n    //         if (!flag) {\n    //           this.$message({ type: \"success\", message: data.message });\n    //         }\n    //       }\n    //     });\n    //   }\n    // },\n    //获取意见\n    // getOpinion(opinion) {\n    //   this.text = opinion;\n    //   let opinioValue = this.$refs.opinionText.getOpinion();\n    //   if (this.opinionField) {\n    //     let currentUser = this.$store.state.user.currentUserDetail.user;\n    //     let moment = require(\"moment\");\n    //     let boData = this.$refs.formContent.data;\n    //     let filed = this.opinionField.split(\".\");\n    //     if (boData[filed[0]][filed[1]] == '<p><br/></p>') {\n    //       boData[filed[0]][filed[1]] = \"\";\n    //     }\n    //     //是否覆盖审批意见\n    //     if (this.appendOpinion) {\n    //       if (opinioValue) {\n    //         boData[filed[0]][filed[1]] = opinioValue + \"\\n\" + currentUser.fullname + \" \" + moment().format(\"YYYY-MM-DD HH:mm:ss\");\n    //       }\n    //     } else {\n    //       if (opinioValue) {\n    //         opinioValue += \"\\n\" + currentUser.fullname + \" \" + moment().format(\"YYYY-MM-DD HH:mm:ss\");\n    //       }\n    //       if (this.appendStr) {\n    //         this.initBoAttr = boData[filed[0]][filed[1]];\n    //       }\n    //       if (filed.length == 2) {\n    //         if (this.initBoAttr) {\n    //           if (opinion) {\n    //             boData[filed[0]][filed[1]] = this.initBoAttr + \"\\n\\n\" + opinioValue;\n    //           } else {\n    //             boData[filed[0]][filed[1]] = this.initBoAttr\n    //           }\n    //         } else {\n    //           boData[filed[0]][filed[1]] = opinioValue;\n    //         }\n    //       }\n    //       this.appendStr = false;\n    //     }\n    //   }\n    // },\n    //保存按钮\n    saveDraftBtn: function saveDraftBtn() {\n      var _this3 = this;\n\n      //this.$refs.taskToSave.showDialog();\n      this.$store.dispatch(\"storeProcess/canLock\", {\n        taskId: this.taskId,\n        leaderId: this.leaderId\n      }).then(function (canLock) {\n        //获取任务是否能锁定\n        if (canLock == 4 && _this3.$router.history.current.fullPath.indexOf(\"token\") > -1) {\n          canLock = \"5\";\n        }\n\n        if (canLock == 4) {\n          _this3.$message.warning(\"任务已被其他人签收了\");\n        } else {\n          _this3.taskSaveDraft(); //保存表单内容\n          //this.createBpmSaveOpinion(true);//暂存审批意见\n\n        }\n      });\n    },\n    //同意按钮\n    agreeBtn: function agreeBtn() {\n      var _this4 = this;\n\n      this.$store.dispatch(\"storeProcess/canLock\", {\n        taskId: this.taskId,\n        leaderId: this.leaderId\n      }).then(function (canLock) {\n        //获取任务是否能锁定\n        if (canLock == 4 && _this4.$router.history.current.fullPath.indexOf(\"token\") > -1) {\n          canLock = \"5\";\n        }\n\n        if (canLock == 4) {\n          _this4.$message.warning(\"任务已被其他人签收了\");\n        } else {\n          _this4.taskAgree();\n        }\n      });\n    },\n    checkInstStatus: function checkInstStatus(callback) {\n      var this_ = this;\n      this.$http.get(\"${bpmRunTime}/runtime/instance/v1/getDefStatus?instId=\" + (this.instId || \"\") + \"&taskId=\" + (this.taskId || \"\")).then(function (resp) {\n        if (resp.data) {\n          resp.data += \"\";\n\n          if (resp.data.indexOf(\"1\") > -1) {\n            this_.disabled = true;\n            this_.isHang = true;\n            this_.$message.warning(\"当前流程实例已被挂起，无法审批\");\n          } else if (resp.data.indexOf(\"3\") > -1) {\n            this_.disabled = true;\n            this_.$message.warning(\"当前流程定义已被禁止实例，无法审批\");\n          } else {\n            callback && callback();\n          }\n        } else if (callback) {\n          callback();\n        }\n      });\n    },\n    //提交事件\n    submitRevoke: function submitRevoke(alias) {\n      var _this5 = this;\n\n      var _this = this; //获取VUE表单实例(判断是否是在线表单)\n\n\n      if (document.getElementsByName(\"online-form\")[0]) {\n        var tables = document.getElementsByName(\"online-form\")[0].__vue__.permission.table; //获取子表权限\n\n\n        var boData = document.getElementsByName(\"online-form\")[0].__vue__.data; //获取表单bo对象\n\n\n        var zData = {};\n\n        for (var k in boData) {\n          zData = boData[k];\n        }\n\n        for (var key in tables) {\n          //如果有导入属性，则表明不是子表而是数据报表，不做必填校验\n          if (tables[key] && tables[key].hasOwnProperty(\"export\")) {\n            continue;\n          }\n\n          if ((tables[key].required == true || tables[key].required == \"true\") && zData[\"sub_\" + key] && zData[\"sub_\" + key].length == 0) {\n            this.$message({\n              message: \"子表必填一条记录\",\n              type: \"warning\"\n            });\n            return;\n          }\n        }\n      }\n\n      this.pressAction = true;\n      this.btnAlias = alias; //关闭\n\n      if (this.btnAlias == \"taskClose\") {\n        utils.closeAllNotification(); //判断菜单是否是模块开发配置出来的\n\n        if (this.$route.name.indexOf(\"reportModuleInst\") != -1) {\n          this.$router.push(\"/statement/template/preview/\" + this.$route.params.templateKey + \"/todo/\" + this.$route.params.defKey + \"/true\");\n        } else if (this.$route.name.indexOf(\"sysModuleInst\") != -1) {\n          this.$router.push(\"/v-flow/v-todo/\" + this.$route.params.defKey);\n        } else if (this.type == \"done\" || this.type == \"request\" || this.myReadType == \"myRequest\") {\n          this.$router.push(\"/v-flow/v-request\");\n        } else if (this.state == \"COMMU\" || this.state == \"FOLLOW\" || this.$route.name == \"instRead-read\") {\n          this.$router.push(\"/v-flow/v-todoRead\"); //待阅\n        } else if (this.$route.name == \"instRead-done\") {\n          this.$router.push(\"/v-flow/v-doneRead\"); //已阅\n        } else if (this.$route.name == \"myRead-type\") {\n          this.$router.push(\"/v-flow/v-myRead\"); //我传阅的\n        } else if (this.$route.name == \"instRead\" && this.$route.params.myReadType == \"delegate\") {\n          this.$router.push(\"/v-flow/v-myDelegate\");\n        } else {\n          if (JSON.stringify(this.$route.query) == \"{}\") {\n            this.$router.push(\"/v-flow/v-todo\");\n          } else {\n            this.$router.push(\"/home\");\n          }\n        }\n      } else if (this.btnAlias == \"saveDraft\") {\n        // todo 保存\n        this.saveDraftBtn();\n      } else if (this.btnAlias == \"agree\") {\n        // todo 同意\n        this.agreeBtn();\n      } else if (this.btnAlias == \"handleRead\") {\n        //传阅回复\n        this.handleRead();\n      } else if (this.btnAlias == \"handleRevoke\") {\n        //撤回\n        this.handleRevoke();\n      } else if (this.btnAlias == \"commuFeedBack\") {\n        //沟通反馈\n        this.commuFeedBack();\n      } else if (this.btnAlias == \"taskToInquReply\") {\n        //征询回复\n        this.taskToInquReply();\n      } else if (this.btnAlias == \"userAddSign\") {\n        //普通节点加签反馈\n        this.userAddSign();\n      } else if (this.btnAlias == \"reject\") {\n        //todo 驳回\n        this.taskToReject();\n      } else if (this.btnAlias == \"delegate\") {\n        //转办\n        this.taskToDelegate();\n      } else if (this.btnAlias == \"inqu\") {\n        //征询\n        this.taskToInqu();\n      } else if (this.btnAlias == \"endProcess\") {\n        // todo 流程终止\n        this.taskToEndProcess();\n      } else if (this.btnAlias == \"startTrans\") {\n        //todo 流转\n        this.taskToTrans();\n      } else if (this.btnAlias == \"addSign\") {\n        //todo 加签\n        this.taskToAddSign();\n      } else if (this.btnAlias == \"taskDelay\") {//todo 任务延期\n        // this.taskToDelay();\n      } else if (this.btnAlias == \"agreeTrans\") {\n        //todo 同意（流转）\n        this.taskAgreeTrans();\n      } else if (this.btnAlias == \"opposeTrans\") {\n        //todo 反对（流转）\n        this.taskOpposeTrans();\n      } else if (this.btnAlias == \"oppose\") {\n        //todo 反对\n        this.taskOppose();\n      } else if (this.btnAlias == \"lockUnlock\") {\n        //签收\n        this.$store.dispatch(\"storeProcess/canLock\", this.taskId).then(function (canLock) {\n          //获取任务是否能锁定\n          if (canLock == 4 && _this5.$router.history.current.fullPath.indexOf(\"token\") > -1) {\n            canLock = \"5\";\n          }\n\n          if (canLock == 4) {\n            _this5.$message.warning(\"任务已被其他人签收了\");\n          } else {\n            _this5.lockUnlock();\n          }\n        });\n      } else if (this.btnAlias == \"approveLine\") {\n        //并行审批\n        this.taskApproveLine();\n      } else if (this.btnAlias == \"signSequence\") {\n        // 顺序签署\n        this.taskSignSequence();\n      } else if (this.btnAlias == \"signLine\") {\n        // 并行签署\n        this.taskSignLine();\n      }\n    },\n    //执行前置脚本\n    runBeforeScript: function runBeforeScript() {\n      var _this = this;\n\n      var item = utils.indexOfList(_this.rowsBtn, \"alias\", _this.btnAlias);\n      return _this.tempScript(item.beforeScript);\n    },\n    //执行前置脚本\n    tempScript: function tempScript(script) {\n      var _this = this;\n\n      var _req = req;\n      var boData = _this.$refs.formContent.data;\n      var tempScript = \"var tempFunction = function(_req,data,_this){ \" + script + \"};\";\n      var result = eval(tempScript + \"tempFunction(_req,boData,_this);\");\n\n      if (result && result.then && typeof result.then == \"function\") {\n        return result;\n      }\n\n      if (result === false) return false;\n      return true;\n    },\n    //保存\n    taskSaveDraft: function taskSaveDraft() {\n      var _this6 = this;\n\n      var this_ = this;\n      utils.getOnlineFormData(false).then(function (formDataStr) {\n        return this_.saveDraftSubmit(formDataStr);\n      }).catch(function (reason) {\n        return utils.handleGetFormDataReject(reason).then(function () {\n          return _this6.saveDraftSubmit();\n        });\n      });\n    },\n    saveDraftSubmit: function saveDraftSubmit(formDataStr) {\n      var _this = this;\n\n      var scriptResult = this.runBeforeScript(); //执行前置脚本返回false时终止按钮操作\n\n      if (scriptResult === false) return; //执行前置脚本返回的接口时先执行前置事件接口\n\n      if (scriptResult.then && typeof scriptResult.then == \"function\") {\n        scriptResult.then(function () {\n          //接口返回成功则正常执行按钮操作\n          _this.funcSaveDraft(formDataStr);\n        }, function (fail) {\n          //接口返回失败则终止按钮操作，并给与提示\n          _this.$message.warning(fail);\n\n          return;\n        });\n      } else {\n        //执行前置脚本返回true时正常执行按钮操作\n        _this.funcSaveDraft(formDataStr);\n      }\n    },\n    //保存草稿\n    funcSaveDraft: function funcSaveDraft(formDataStr) {\n      utils.closeAllNotification();\n      var data = this.handleFormData(formDataStr);\n      data.defId = this.defId;\n      data.approval = true;\n      data.formKey = this.$refs.formContent.formKey;\n      this.$refs.taskToSave.showDialog(data); // this.$store.dispatch(\"storeProcess/saveTaskDraft\", data).then(() => {\n      //   utils.reload();\n      // });\n    },\n    //传阅回复\n    handleRead: function handleRead() {\n      this.$refs.taskToRead.showDialog();\n    },\n    // 准备要提交的数据\n    handleFormData: function handleFormData(formDataStr) {\n      //let files = \"\";\n      var zfiles = \"\"; // this.$refs.fileUpload.isFinishUpload();\n      // if (this.$refs.fileUpload && this.$refs.fileUpload.getFiles() != \"\") {\n      //   files = JSON.stringify(this.$refs.fileUpload.getFiles());\n      // }\n      //let opinion = \"\";\n      // if (this.$refs.opinionText && this.$refs.opinionText.getOpinion() != \"\") {\n      //   opinion = this.$refs.opinionText.getOpinion();\n      // }\n\n      var data = {\n        taskId: this.taskId,\n        actionName: this.actionName,\n        destination: \"\",\n        //files: files,\n        zfiles: zfiles,\n        //opinion: opinion,\n        jumpType: \"\",\n        agentLeaderId: this.leaderId,\n        nodeUsers: \"[]\"\n      };\n\n      if (formDataStr) {\n        // URL表单\n        if (formDataStr.constructor == Object) {\n          data.formType = \"frame\";\n\n          if (formDataStr.businessKey) {\n            data.businessKey = formDataStr.businessKey;\n          }\n\n          if (formDataStr.sysCode) {\n            data.sysCode = formDataStr.sysCode;\n          }\n\n          if (formDataStr.vars) {\n            data.vars = formDataStr.vars;\n          }\n        } else if (formDataStr.constructor == String) {\n          data.data = Base64.encode(formDataStr);\n          data.formType = \"inner\";\n        }\n      }\n\n      if (window.urgentStateValue) {\n        data.urgentStateValue = window.urgentStateValue;\n      }\n\n      return data;\n    },\n    handleClose: function handleClose() {\n      this.dialogFormVisible = true;\n    },\n    //获取任务锁定状态\n    lockUnlock: function lockUnlock() {\n      this.$store.dispatch(\"storeProcess/lockUnlock\", this.taskId + \"&leaderId=\" + this.leaderId).then(function () {\n        // this.$router.go(this.$router.currentRoute);\n        utils.reload();\n      });\n    },\n    //撤回\n    handleRevoke: function handleRevoke(id, status) {\n      if (status == \"revokeToStart\") {\n        this.$message.warning(\"已撤回，不能再撤回\");\n        return false;\n      } // if (this.$refs.opinionText.getOpinion() == \"\") {\n      //   this.$message.warning(\"请填写撤回意见\");\n      //   return false;\n      // }\n\n\n      var data = {\n        instanceId: this.instId,\n        isHandRevoke: this.isHand //cause: this.$refs.opinionText.getOpinion()\n\n      };\n      var revokeUrl = \"storeProcess/revokeInstanceBtn\";\n      this.$refs.taskToRevoke.showDialog(revokeUrl, data); // this.$confirm(\"确认\" + this.dailogTitle + \"?\", \"提示\", {\n      //   cancelButtonText: \"取消\",\n      //   confirmButtonText: \"确定\",\n      //   type: \"warning\",\n      //   closeOnClickModal: false\n      // }).then(() => {\n      //   this.$store\n      //     .dispatch(\"storeProcess/revokeInstanceBtn\", data)\n      //     .then(isHandRevoke => {\n      //       if (this.token != null) {\n      //         window.close();\n      //       } else {\n      //         this.$router.push(\"/v-flow/v-todo\");\n      //       }\n      //     });\n      // });\n    },\n    saveRevoke: function saveRevoke() {\n      var _this7 = this;\n\n      if (this.opinion == \"\") {\n        this.$message.warning(\"请填写撤回意见\");\n        return false;\n      }\n\n      var data = {\n        instanceId: this.instId,\n        isHandRevoke: this.isHand,\n        cause: this.opinion\n      };\n      this.$store.dispatch(\"storeProcess/revokeInstanceBtn\", data).then(function () {\n        if (_this7.token != null) {\n          window.close();\n        } else {\n          _this7.$router.go(-1);\n        }\n      });\n      this.dialogFormVisible = false;\n      this.opinion = \"\";\n    },\n    exitRevoke: function exitRevoke() {\n      this.dialogFormVisible = false;\n      this.opinion = \"\";\n    },\n    //沟通反馈\n    commuFeedBack: function commuFeedBack() {\n      this.$refs.taskToFeeBack.showDialog();\n    },\n    userAddSign: function userAddSign() {\n      this.$refs.userAddSignReply.showDialog(); // if (this.$refs.opinionText.getOpinion() == \"\") {\n      //   Message.warning(\"请输入意见内容\");\n      // } else {\n      //   let files = \"\";\n      //   let zfiles = \"\";\n      //   this.$refs.fileUpload.isFinishUpload();\n      //   if (this.$refs.fileUpload && this.$refs.fileUpload.getFiles() != \"\") {\n      //     files = JSON.stringify(this.$refs.fileUpload.getFiles());\n      //   }\n      //   let data = {\n      //     procDefId: this.defId,\n      //     procInstId: this.instId,\n      //     status: \"inqu_reply\",\n      //     taskId: this.taskId,\n      //     opinion: this.$refs.opinionText.getOpinion(),\n      //     files: files,\n      //     zfiles: zfiles\n      //   };\n      //   this.$store.dispatch(\"storeProcess/userAddSign\", data).then(() => {\n      //     if (this.token != null) {\n      //       window.close();\n      //     } else {\n      //       this.$router.go(-1);\n      //     }\n      //   });\n      // }\n    },\n    //征询回复\n    taskToInquReply: function taskToInquReply() {\n      this.$refs.taskToInquReply.showDialog(); // if (this.$refs.opinionText.getOpinion() == \"\") {\n      //   Message.warning(\"请输入意见内容\");\n      // } else {\n      //   let files = \"\";\n      //   let zfiles = \"\";\n      //   this.$refs.fileUpload.isFinishUpload();\n      //   if (this.$refs.fileUpload && this.$refs.fileUpload.getFiles() != \"\") {\n      //     files = JSON.stringify(this.$refs.fileUpload.getFiles());\n      //   }\n      //   let data = {\n      //     procDefId: this.defId,\n      //     procInstId: this.instId,\n      //     status: \"inqu_reply\",\n      //     taskId: this.taskId,\n      //     opinion: this.$refs.opinionText.getOpinion(),\n      //     files: files,\n      //     zfiles: zfiles,\n      //     formData: JSON.stringify(this.$refs.formContent.data)\n      //   };\n      //   this.$store.dispatch(\"storeProcess/taskToInquReply\", data).then(() => {\n      //     if (this.token != null) {\n      //       window.close();\n      //     } else {\n      //       this.$router.go(-1);\n      //     }\n      //   });\n      // }\n    },\n    //驳回设置\n    taskToReject: function taskToReject() {\n      // 审批附件数据\n      // if (this.$refs.fileUpload && this.$refs.fileUpload.getFiles() != \"\") {\n      //   this.opinionFiles = JSON.stringify(this.$refs.fileUpload.getFiles());\n      // }\n      var parentTaskId = \"\"; //用户任务加签后的父任务ID\n\n      if (this.nodeType == \"USERTASK\" && this.tasks.bpmTask.parentId != \"0\") {\n        //用户任务加签\n        parentTaskId = this.tasks.bpmTask.parentId;\n      }\n\n      this.$refs.taskToReject.handleOpen(parentTaskId, this); //父组件调用子组件方法\n    },\n    //转办设置\n    taskToDelegate: function taskToDelegate() {\n      this.$refs.taskToDelegate.handleClose(this.opinionField, this.$refs.formContent.data, this.appendOpinion, this); //父组件调用子组件方法\n    },\n    //征询设置\n    taskToInqu: function taskToInqu() {\n      if (this.status != \"TRANSFORMEDINQU\") {\n        this.$refs.taskToInqu.showType();\n      }\n\n      this.$refs.taskToInqu.handleClose(this.opinionField, this.$refs.formContent.data, this.appendOpinion); //父组件调用子组件方法\n    },\n    //流程终止\n    taskToEndProcess: function taskToEndProcess() {\n      this.$refs.taskToEndProcess.handleClose(this); //父组件调用子组件方法\n    },\n    //流转设置\n    taskToTrans: function taskToTrans() {\n      // if (this.$refs.fileUpload && this.$refs.fileUpload.getFiles() != \"\") {\n      //   this.opinionFiles = JSON.stringify(this.$refs.fileUpload.getFiles());\n      // }\n      this.$refs.taskToTrans.handleClose(this, this.opinionField, this.$refs.formContent.data, this.appendOpinion); //父组件调用子组件方法\n    },\n    //加签设置\n    taskToAddSign: function taskToAddSign() {\n      this.$refs.taskToAddSign.handleClose(this.nodeType, this.instId, this); //父组件调用子组件方法\n    },\n    //任务延期\n    taskToDelay: function taskToDelay() {\n      this.$refs.taskToDelay.handleClose(); //父组件调用子组件方法\n    },\n    //并行审批\n    taskApproveLine: function taskApproveLine() {\n      this.$refs.taskToApproveLine.handleClose(); //父组件调用子组件方法\n    },\n    // 顺序签署\n    taskSignSequence: function taskSignSequence() {\n      this.$refs.taskToSignSequence.handleClose(); //父组件调用子组件方法\n    },\n    // 并行签署\n    taskSignLine: function taskSignLine() {\n      this.$refs.taskToSignLine.handleClose(); //父组件调用子组件方法\n    },\n    doNext: function doNext() {\n      var _this8 = this;\n\n      if (!this.text) {\n        if (this.actionName == \"opposeTrans\" || this.actionName == \"oppose\") {\n          this.text = \"反对\";\n        } else {\n          this.text = \"同意\";\n        }\n      }\n\n      var this_ = this;\n      utils.getOnlineFormData(true).then(function (formDataStr) {\n        return this_.doNextSubmit(formDataStr);\n      }).catch(function (reason) {\n        return utils.handleGetFormDataReject(reason).then(function () {\n          return _this8.doNextSubmit();\n        });\n      });\n    },\n    // doNext执行。formDataStr：字符串格式的表单数据。\n    doNextSubmit: function doNextSubmit(formDataStr) {\n      var _this = this;\n\n      var scriptResult = this.runBeforeScript(); //执行前置脚本返回false时终止按钮操作\n\n      if (scriptResult === false) return; //执行前置脚本返回的接口时先执行前置事件接口\n\n      if (scriptResult.then && typeof scriptResult.then == \"function\") {\n        scriptResult.then(function () {\n          //接口返回成功则正常执行按钮操作\n          _this.funcDoNext(formDataStr);\n        }, function (fail) {\n          //接口返回失败则终止按钮操作，并给与提示\n          _this.$message.warning(fail);\n\n          return;\n        });\n      } else {\n        //执行前置脚本返回true时正常执行按钮操作\n        _this.funcDoNext(formDataStr);\n      }\n    },\n    funcDoNext: function funcDoNext(formDataStr) {\n      var _this9 = this;\n\n      utils.closeAllNotification();\n      var data = this.handleFormData(formDataStr);\n      data.formKey = this.$refs.formContent.formKey;\n      data.opinion = this.text;\n\n      if (this.nodeType == \"USERTASK\" && this.tasks.bpmTask.parentId != \"0\") {\n        //用户任务加签\n        if (this.actionName == \"oppose\") {\n          data.addSignAction = \"opposeTrans\";\n        } else if (this.actionName == \"agree\") {\n          data.addSignAction = \"agreeTrans\";\n        }\n      }\n\n      if ((this.choiceExcutor || this.jumpType || this.$route.query.type === 'free') && !this.taskStatusArray.includes(this.status)) {\n        this.$store.dispatch(\"storeProcess/getAfterJumpNodes\", {\n          taskId: this.taskId,\n          data: data.data,\n          defId: \"\",\n          instId: \"\",\n          type: this.$route.query.type || this.jumpType\n        }).then(function (res) {\n          debugger;\n\n          if (res.afterNodes.length == 0 || res.afterNodes.length == 1 && res.afterNodes[0].excutorList != undefined && res.afterNodes[0].excutorList.length == 1) {\n            _this9.$refs.taskToComplete.showDialog(_this9.opinionField, _this9.$refs.formContent.data, _this9.appendOpinion, data);\n          } else {\n            _this9.$refs.taskSelectDestination.showDialog(data.data, data.files, data.zfiles, data.opinion, _this9.instId, _this9.jumpType);\n          }\n        });\n      } else {\n        //this.disabled = true;\n        var tipMsg = \"确认办理此任务?\";\n\n        if (this.actionName == \"agree\" && this.status == \"SIGNSEQUENCEED\") {\n          this.$http.get(\"${bpmRunTime}/runtime/task/v1/nextExecutor?taskId=\" + this.taskId).then(function (response) {\n            if (response.data.state && response.data.value) {\n              tipMsg = \"\\u4E0B\\u4E00\\u6B65\\u7684\\u6267\\u884C\\u4EBA\\u4E3A\\uFF1A\".concat(response.data.value.name, \"\\u3002<br/> \\u60A8\\u786E\\u5B9A\\u8981\\u63D0\\u4EA4\\u5417\\uFF1F\");\n            }\n\n            _this9.$refs.taskToComplete.showDialog(_this9.opinionField, _this9.$refs.formContent.data, _this9.appendOpinion, data);\n          });\n          return;\n        }\n\n        this.$refs.taskToComplete.showDialog(this.opinionField, this.$refs.formContent.data, this.appendOpinion, data);\n      }\n    },\n    //同意\n    taskAgree: function taskAgree() {\n      this.actionName = \"agree\";\n      this.doNext();\n    },\n    //同意（流转）\n    taskAgreeTrans: function taskAgreeTrans() {\n      this.actionName = \"agreeTrans\";\n      this.doNext();\n    },\n    //反对\n    taskOppose: function taskOppose() {\n      this.actionName = \"oppose\";\n      this.doNext();\n    },\n    //反对（流转）\n    taskOpposeTrans: function taskOpposeTrans() {\n      this.actionName = \"opposeTrans\";\n      this.doNext();\n    },\n    hiddenOpertion: function hiddenOpertion() {\n      if (this.$refs.btnRegion) {\n        this.$refs.btnRegion.style.display = \"none\";\n      }\n\n      this.$refs.formContent.hiddenContent();\n    },\n    //是否显示滚动条\n    isScroll: function isScroll() {\n      //屏幕宽度\n      var window_width = $(window).width(); //审批页面宽度\n\n      var from_w = $(\"main\")[0].clientWidth; //有滚动条\n\n      if (window_width > from_w) {\n        return true;\n      }\n\n      return false;\n    },\n    //挂起\n    hangUp: function hangUp() {\n      var _this10 = this;\n\n      flow.forbiddenInstance(this.instId).then(function (data) {\n        if (data.state) {\n          _this10.$message({\n            type: \"success\",\n            message: data.message\n          });\n\n          _this10.checkInstStatus();\n        }\n      });\n    },\n    //取消挂起\n    cancelHangUp: function cancelHangUp() {\n      var _this11 = this;\n\n      flow.unForbiddenInstance(this.instId).then(function (data) {\n        if (data.state) {\n          _this11.$message({\n            type: \"success\",\n            message: data.message\n          });\n\n          _this11.checkInstStatus(function () {\n            _this11.isHang = false;\n            _this11.disabled = false;\n          });\n        }\n      });\n    },\n    //跳转到下一个任务\n    nextTask: function nextTask() {\n      var _this12 = this;\n\n      var _this = this;\n\n      if (_this.$route.name.indexOf(\"reportModuleInst\") != -1) {\n        _this.$router.push(\"/statement/template/preview/\" + _this.$route.params.templateKey + \"/todo/\" + _this.$route.params.defKey + \"/true\");\n      } else {\n        this.$store.dispatch(\"storeProcess/getNextTaskByDefId\", {\n          defId: this.defId,\n          defKey: this.defKey\n        }).then(function (resp) {\n          if (resp.state) {\n            //跳转到新的待办页面\n            if (resp.value) {\n              _this12.handleOpenTask(resp.value);\n            } else {\n              _this12.$message({\n                type: \"success\",\n                message: \"该流程所属任务已处理完成\"\n              });\n\n              setTimeout(function () {\n                if (_this12.$route.name.indexOf(\"sysModuleInst\") != -1) {\n                  _this.$router.push(\"/v-flow/v-todo/\" + _this.$route.params.defKey);\n                } else {\n                  _this.$router.push(\"/v-flow/v-todo/\");\n                }\n              }, 10);\n            }\n          }\n        });\n      }\n    },\n    handleOpenTask: function handleOpenTask(row) {\n      if (row.status == \"SHARE\" || row.status == \"BACKSHARE\") {\n        if (row.identityList && row.identityList.length == 1) {\n          var url = \"/task/\" + row.id + \"/\" + row.identityList[0].id;\n          this.openAndReload(url);\n        } else {\n          var html = \"<select ref=\" + Math.random() + ' id=\"approvalLeaderSelect\" style=\"width: 200px;height: 30px;border-radius: 4px;margin: 20px 70px;\" ><option value=\"\">请选择</option>';\n          row.identityList.forEach(function (identity) {\n            html += '<option value=\"' + identity.id + '\">' + identity.name + \"</option>\";\n          });\n          html += \"</select>\";\n          var this_ = this;\n          this.$alert(html, \"请选择一个领导代为审批\", {\n            dangerouslyUseHTMLString: true,\n            beforeClose: function beforeClose(action, instance, done) {\n              if (action == \"confirm\") {\n                var se = document.getElementById(\"approvalLeaderSelect\");\n\n                if (se.selectedIndex == 0) {\n                  this.$message.warning(\"请选择代为审批的领导\");\n                } else {\n                  instance.close();\n                  this_.openAndReload(\"/task/\" + row.id + \"/\" + se[se.selectedIndex].value);\n                }\n              } else {\n                instance.close();\n              }\n            }\n          });\n        }\n      } else if (row.status == \"AGENT\" && row.ownerId != row.assigneeId && row.ownerId == this.$store.state.login.currentUser.userId) {\n        //委托任务\n        this.$router.push(\"/instRead/\" + row.procInstId + \"/agent\");\n      } else if (row.status == \"FOLLOW\") {\n        //跟踪任务\n        this.$router.push(\"/taskRead/\" + row.id + \"/FOLLOW\");\n      } else {\n        var _url = \"/task/\" + row.id + \"/0\";\n\n        if (this.$route.name.indexOf(\"reportModuleInst\") != -1) {\n          _url = \"/reportModuleInst/\" + row.id + \"/0\" + \"/\" + this.$route.params.defKey + \"/true/\" + this.$route.templateKey;\n        } else if (this.$route.name.indexOf(\"sysModuleInst\") != -1) {\n          _url = \"/sysModuleInst/\" + row.id + \"/0\" + \"/\" + this.$route.params.defKey + \"/true\";\n        }\n\n        this.openAndReload(_url);\n      }\n    },\n    openAndReload: function openAndReload(url) {\n      var _this13 = this;\n\n      this.$router.push(url);\n      setTimeout(function () {\n        _this13.$root.$children[0].reload();\n      }, 10);\n    }\n  },\n  created: function created() {\n    //兼容只显示审批页面时\n    if (this.$route.meta.single) {\n      this.isDd = true;\n    }\n\n    if (this.type == \"done\") {\n      this.dailogTitle = \"撤回\";\n      this.isHand = true;\n    } else if (this.type == \"request\") {\n      this.dailogTitle = \"撤回到发起人\";\n      this.isHand = false;\n    }\n  }\n};",null]}