{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\task\\taskSelectDestination.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\task\\taskSelectDestination.vue","mtime":1675214577089},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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 { mapState, mapActions } from \"vuex\";\nimport HtUserSelector from \"@/components/control/HtUserSelector.vue\";\nimport utils from \"@/utils.js\";\nimport { debuglog } from \"util\";\nexport default {\n  name: \"taskSelectDestination\",\n  props: [\"taskId\", \"defId\", \"instId\", \"leaderId\"],\n  components: {\n    HtUserSelector: HtUserSelector\n  },\n  data: function data() {\n    return {\n      relatedInformationDialog: false,\n      helpDialog: false,\n      disabled: false,\n      selectNodeId: \"\",\n      files: \"\",\n      zfiles: \"\",\n      formData: \"\",\n      opinion: \"\",\n      selectDesObj: {},\n      token: utils.getUrlKey(\"token\"),\n      valHelp: \"\",\n      proInstId: \"\" //处理人时传过来的流程实例ID\n\n    };\n  },\n  computed: mapState({\n    curOrgPost: function curOrgPost(state) {\n      return state.user.postCharge;\n    }\n  }),\n  methods: {\n    //帮助\n    help: function help() {\n      this.helpDialog = true;\n    },\n    //鼠标点击页面其他其他位置不关闭弹框\n    showDialog: function showDialog(formData, files, zfiles, opinion, instId, jumpType) {\n      var _this = this;\n\n      if (this.$route.query.type === \"free\") {\n        jumpType = \"free\";\n      }\n\n      this.proInstId = instId;\n      this.files = files;\n      this.zfiles = zfiles;\n      this.opinion = opinion;\n      this.formData = formData;\n      this.selectNodeId = \"\";\n      this.selectDesObj = {};\n      this.jumpType = jumpType;\n      this.relatedInformationDialog = true;\n      this.$store.dispatch(\"storeProcess/getAfterJumpNodes\", {\n        taskId: this.taskId || \"\",\n        data: formData.data || formData,\n        defId: this.defId || \"\",\n        instId: this.instId || \"\",\n        type: this.jumpType || \"\"\n      }).then(function (data) {\n        var Base64 = require(\"js-base64\").Base64;\n\n        _this.selectDesObj = data; //此操作为改节点为设置自由跳转，通过manage端的任务跳转按钮跳过来时可提供自由跳转功能\n\n        if (_this.$route.query.type === \"free\") {\n          _this.selectDesObj.jumpType = _this.jumpType;\n          _this.selectDesObj.choiceExcutor = _this.jumpType;\n        }\n\n        if (_this.selectDesObj.afterNodes.length == 1) {\n          _this.selectNodeId = _this.selectDesObj.afterNodes[0].nodeId;\n        }\n\n        if (_this.selectDesObj.helpGlobal == \"null\") {\n          _this.selectDesObj.helpGlobal = \"\";\n        }\n\n        if (_this.selectDesObj.help == \"null\") {\n          _this.selectDesObj.help = \"\";\n        }\n\n        if (_this.selectDesObj.helpGlobal != \"\" && _this.selectDesObj.help != \"\") {\n          _this.valHelp = Base64.decode(_this.selectDesObj.help, \"utf-8\");\n        } else if (_this.selectDesObj.helpGlobal == \"\" && _this.selectDesObj.help != \"\") {\n          _this.valHelp = Base64.decode(_this.selectDesObj.help, \"utf-8\");\n        } else if (_this.selectDesObj.helpGlobal != \"\") {\n          _this.valHelp = Base64.decode(_this.selectDesObj.helpGlobal, \"utf-8\");\n        }\n      });\n    },\n    closeDailog: function closeDailog() {\n      this.relatedInformationDialog = false;\n    },\n    confirm: function confirm() {\n      var _this2 = this;\n\n      var data = {\n        data: this.formData.data || this.formData,\n        taskId: this.taskId || \"\",\n        defId: this.defId || \"\",\n        proInstId: this.instId || \"\",\n        actionName: \"agree\",\n        files: this.files,\n        zfiles: this.zfiles,\n        formType: \"inner\",\n        opinion: this.opinion,\n        agentLeaderId: this.leaderId,\n        isSendNodeUsers: \"1\"\n      };\n\n      if (this.formData.businessKey) {\n        data.formType = \"frame\";\n        data.businessKey = this.formData.businessKey;\n        data.sysCode = this.formData.sysCode;\n\n        if (this.formData.vars) {\n          data.vars = this.formData.vars;\n        }\n      } //如果用户选择看目标节点，则将节点的跳转类也传到后台\n\n\n      data.destination = this.selectNodeId;\n\n      if (!data.destination && this.selectDesObj.afterNodes && this.selectDesObj.afterNodes.length == 1) {\n        data.destination = this.selectDesObj.afterNodes[0].nodeId;\n      }\n\n      if (this.selectDesObj.jumpType) {\n        data.jumpType = this.selectDesObj.jumpType == \"select\" ? \"select\" : \"free\";\n      }\n\n      var nodeUsers = []; //遍历所有的节点将其所选择的节点。\n\n      if (this.selectDesObj && this.selectDesObj.choiceExcutor == \"candidate\") {\n        for (var index = 0; index < this.selectDesObj.afterNodes.length; index++) {\n          var node = this.selectDesObj.afterNodes[index];\n\n          if (node.selectUserIds && node.selectUserIds.length > 0) {\n            var excutorList = node.excutorList;\n            var selectusers = [];\n\n            for (var _index = 0; _index < excutorList.length; _index++) {\n              var user = excutorList[_index];\n\n              if (user && node.selectUserIds.indexOf(user.id) > -1) {\n                selectusers.push(user);\n              }\n            }\n\n            nodeUsers.push({\n              nodeId: node.nodeId,\n              executors: selectusers\n            });\n          }\n        }\n      } else if (this.selectDesObj) {\n        for (var _index2 = 0; _index2 < this.selectDesObj.afterNodes.length; _index2++) {\n          var _node = this.selectDesObj.afterNodes[_index2];\n\n          if (_node.selectUsers && _node.selectUsers.length > 0) {\n            var _excutorList = _node.selectUsers;\n            var _selectusers = [];\n\n            for (var _index3 = 0; _index3 < _excutorList.length; _index3++) {\n              var _user = _excutorList[_index3];\n\n              _selectusers.push({\n                id: _user.id,\n                name: _user.fullname,\n                type: \"user\"\n              });\n            }\n\n            nodeUsers.push({\n              nodeId: _node.nodeId,\n              executors: _selectusers\n            });\n          }\n        }\n      }\n\n      if (nodeUsers.length > 0) {\n        data.nodeUsers = JSON.stringify(nodeUsers);\n      }\n\n      if (window.urgentStateValue) {\n        data.urgentStateValue = window.urgentStateValue;\n      }\n\n      if (this.taskId) {\n        this.$confirm(\"确认办理此任务?\", \"提示\", {\n          cancelButtonText: \"取消\",\n          confirmButtonText: \"确定\",\n          type: \"warning\",\n          closeOnClickModal: false\n        }).then(function () {\n          _this2.disabled = true;\n\n          _this2.$store.dispatch(\"storeProcess/complete\", data).then(function () {\n            _this2.$router.push(\"/inst/\" + _this2.proInstId + \"/doneList\"); // if(this.token!=null){\n            //   window.close();\n            // }else{\n            //   this.$router.go(-1);\n            // }\n\n          }).catch(function () {\n            _this2.disabled = false;\n          });\n        });\n      } else {\n        if (this.curOrgPost && this.curOrgPost.org) {\n          data.startOrgId = this.curOrgPost.org.id;\n        }\n\n        this.disabled = true;\n        data.supportMobile = 1;\n        this.$store.dispatch(\"storeProcess/start\", data).then(function () {\n          if (_this2.token != null) {\n            window.close();\n          } else {\n            _this2.$router.go(-1);\n          }\n        }).catch(function () {\n          _this2.disabled = false;\n        });\n      }\n    }\n  }\n};",null]}