{"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\\taskToDelegate.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\flow\\task\\taskToDelegate.vue","mtime":1675214577151},{"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":456789000000},{"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":["import \"core-js/modules/es6.regexp.split\";\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 OpinionText from \"@/components/common/opinionText.vue\";\nimport FileUpload from \"@/components/common/fileUpload.vue\";\nimport HtUserSelector from \"@/components/control/HtUserSelector.vue\";\nimport { Message } from \"element-ui\";\nimport utils from \"@/utils.js\";\nexport default {\n  name: \"taskToDelegate\",\n  props: [\"taskId\"],\n  components: {\n    OpinionText: OpinionText,\n    FileUpload: FileUpload,\n    HtUserSelector: HtUserSelector\n  },\n  data: function data() {\n    return {\n      disabled: false,\n      delegateDialog: false,\n      users: \"\",\n      token: utils.getUrlKey(\"token\"),\n      text: \"\",\n      //意见内容\n      boData: \"\",\n      //boData数据\n      opinionField: \"\",\n      //要回填的字段\n      appendStr: true,\n      initBoAttr: '',\n      appendOpinion: false,\n      //是否覆盖审批意见\n      flowThis: \"\",\n      //flowAction的this,\n      wrap: \"\\n\"\n    };\n  },\n  computed: mapState({\n    rows: function rows(state) {\n      return state.storeProcess.rows;\n    }\n  }),\n  methods: {\n    //获取意见\n    getOpinion: function getOpinion(opinion) {\n      this.text = opinion;\n      var opinioValue = this.$refs.opinionText.getOpinion();\n      if (this.opinionField && document.querySelector(\"[model-name='data.\" + this.opinionField + \"']\")) {\n        var currentUser = this.$store.state.user.currentUserDetail.user;\n        var moment = require(\"moment\");\n        var boData = this.boData;\n        var 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 + this.wrap + currentUser.fullname + \" \" + moment().format(\"YYYY-MM-DD HH:mm:ss\");\n          }\n        } else {\n          if (opinioValue) {\n            opinioValue += this.wrap + 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 + this.wrap + this.wrap + 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        /*else if (filed.length==3 &&boData[filed[0]][filed[1]].length>0){//处理子表\r\n          for (let i = 0; i <boData[filed[0]][filed[1]].length ; i++) {\r\n            boData[filed[0]][filed[1]][i][filed[2]]=opinioValue;\r\n          }\r\n        }*/\n      }\n    },\n    //鼠标点击页面其他其他位置不关闭弹框\n    handleClose: function handleClose(opinionField, boData, appendOpinion, _this) {\n      if (opinionField && document.querySelector(\"[model-name='data.\" + opinionField + \"']\")) {\n        var con = document.querySelector(\"[model-name='data.\" + opinionField + \"']\").__vue__;\n        if (con && con.isEditor) {\n          this.wrap = \"<br>\";\n        }\n      }\n      this.flowThis = _this;\n      this.delegateDialog = true;\n      this.opinionField = opinionField;\n      this.boData = boData;\n      this.appendOpinion = appendOpinion;\n    },\n    //取消\n    cancel: function cancel() {\n      this.delegateDialog = false;\n      this.getOpinion(\"\");\n    },\n    //确认\n    confirm: function confirm() {\n      var _this2 = this;\n      if (this.users == \"\" || this.users == null) {\n        Message.warning(\"请选择转办人员\");\n        return;\n      } else if (this.$refs.opinionText.getOpinion() == \"\") {\n        Message.warning(\"请填写转办说明\");\n        return;\n      }\n      this.disabled = true;\n      var userId = \"\";\n      for (var i = 0; i < this.users.length; i++) {\n        userId = userId + this.users[i].id + \",\";\n      }\n      userId = userId.substring(0, userId.length - 1);\n      var files = \"\";\n      if (this.$refs.fileUpload.getFiles() != \"\") {\n        files = JSON.stringify(this.$refs.fileUpload.getFiles());\n      }\n      var data = {\n        taskId: this.taskId,\n        messageType: \"inner\",\n        opinion: this.$refs.opinionText.getOpinion(),\n        files: files,\n        userId: userId,\n        formData: JSON.stringify(this.$parent.$refs.formContent.data)\n      };\n      data.formKey = this.flowThis.$refs.formContent.formKey;\n      this.$store.dispatch(\"storeProcess/delegate\", data).then(function () {\n        if (_this2.token != null) {\n          window.close();\n        } else {\n          _this2.$router.push(\"/v-flow/v-todo\");\n          //this.$router.go(-1);\n        }\n      }).finally(function () {\n        _this2.disabled = false;\n      });\n    }\n  }\n};",null]}