| 1 |
- {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\components\\ren-process-running\\src\\ren-task-handle.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\components\\ren-process-running\\src\\ren-task-handle.vue","mtime":1581948664000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import debounce from 'lodash/debounce';\nimport qs from 'qs';\nexport default {\n data: function data() {\n return {\n visible: false,\n handleType: '',\n handleTitle: '',\n dataForm: {\n comment: '',\n taskId: ''\n },\n // 回调函数\n callbacks: {\n taskHandleSuccessCallback: null,\n taskHandleErrorCallback: null\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n comment: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }]\n };\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n this.visible = true;\n if (this.handleType === 'complete') {\n this.handleTitle = this.$t('process.completeTask');\n } else if (this.handleType === 'reject') {\n this.handleTitle = this.$t('process.rejectTask');\n } else if (this.handleType === 'termination') {\n this.handleTitle = this.$t('process.terminationTask');\n }\n this.$nextTick(function () {\n _this.$refs['dataForm'].resetFields();\n });\n },\n // 表单提交\n dataFormSubmitHandle: function dataFormSubmitHandle() {\n if (this.handleType === 'complete') {\n this.completeTask();\n } else if (this.handleType === 'reject') {\n this.rejectTask();\n } else if (this.handleType === 'termination') {\n this.terminationTask();\n }\n },\n // 驳回\n rejectTask: debounce(function () {\n var _this2 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n if (!_this2.dataForm.taskId) {\n return false;\n }\n var params = qs.stringify({\n 'taskId': _this2.dataForm.taskId,\n 'comment': _this2.dataForm.comment\n });\n _this2.$http['post']('/act/task/backToFirst?', params).then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n _this2.$message.error(res.msg);\n if (_this2.callbacks.taskHandleErrorCallback) {\n _this2.callbacks.taskHandleErrorCallback(res);\n }\n return;\n }\n _this2.$message({\n message: _this2.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this2.visible = false;\n if (_this2.callbacks.taskHandleSuccessCallback) {\n _this2.callbacks.taskHandleSuccessCallback(res);\n }\n }\n });\n });\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n }),\n // 通过\n completeTask: debounce(function () {\n var _this3 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n if (!_this3.dataForm.taskId) {\n return false;\n }\n var params = qs.stringify({\n 'taskId': _this3.dataForm.taskId,\n 'comment': _this3.dataForm.comment\n });\n _this3.$http.post('/act/task/complete?' + params).then(function (_ref2) {\n var res = _ref2.data;\n if (res.code !== 0) {\n _this3.$message.error(res.msg);\n if (_this3.callbacks.taskHandleErrorCallback) {\n _this3.callbacks.taskHandleErrorCallback(res);\n }\n return;\n }\n _this3.$message({\n message: _this3.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this3.visible = false;\n if (_this3.callbacks.taskHandleSuccessCallback) {\n _this3.callbacks.taskHandleSuccessCallback(res);\n }\n }\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n }),\n // 终止\n terminationTask: debounce(function () {\n var _this4 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n if (!_this4.dataForm.taskId) {\n return false;\n }\n var task = qs.stringify({\n taskId: _this4.dataForm.taskId,\n comment: _this4.dataForm.comment\n });\n _this4.$http['post']('/act/task/endProcess', task).then(function (_ref3) {\n var res = _ref3.data;\n if (res.code !== 0) {\n _this4.$message.error(res.msg);\n if (_this4.callbacks.taskHandleErrorCallback) {\n _this4.callbacks.taskHandleErrorCallback(res);\n }\n return;\n }\n _this4.$message({\n message: _this4.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this4.visible = false;\n if (_this4.callbacks.taskHandleSuccessCallback) {\n _this4.callbacks.taskHandleSuccessCallback(res);\n }\n }\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n })\n }\n};",{"version":3,"names":["debounce","qs","data","visible","handleType","handleTitle","dataForm","comment","taskId","callbacks","taskHandleSuccessCallback","taskHandleErrorCallback","computed","dataRule","required","message","$t","trigger","methods","init","_this","$nextTick","$refs","resetFields","dataFormSubmitHandle","completeTask","rejectTask","terminationTask","_this2","validate","valid","params","stringify","$http","then","_ref","res","code","$message","error","msg","type","duration","onClose","_this3","post","_ref2","catch","_this4","task","_ref3"],"sources":["src/components/ren-process-running/src/ren-task-handle.vue"],"sourcesContent":["<template>\r\n <el-dialog :visible.sync=\"visible\" :title=\"handleTitle\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\r\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" :label-width=\"$i18n.locale === 'en-US' ? '120px' : '80px'\">\r\n <el-form-item :label=\"$t('process.comment')\" prop=\"comment\">\r\n <el-input type=\"textarea\" v-model=\"dataForm.comment\" :placeholder=\"$t('process.comment')\"></el-input>\r\n </el-form-item>\r\n </el-form>\r\n <template slot=\"footer\">\r\n <el-button @click=\"visible = false\">{{ $t('cancel') }}</el-button>\r\n <el-button type=\"primary\" @click=\"dataFormSubmitHandle()\">{{ $t('confirm') }}</el-button>\r\n </template>\r\n </el-dialog>\r\n</template>\r\n\r\n<script>\r\nimport debounce from 'lodash/debounce'\r\nimport qs from 'qs'\r\nexport default {\r\n data () {\r\n return {\r\n visible: false,\r\n handleType: '',\r\n handleTitle: '',\r\n dataForm: {\r\n comment: '',\r\n taskId: ''\r\n },\r\n // 回调函数\r\n callbacks: {\r\n taskHandleSuccessCallback: null,\r\n taskHandleErrorCallback: null\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n comment: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n if (this.handleType === 'complete') {\r\n this.handleTitle = this.$t('process.completeTask')\r\n } else if (this.handleType === 'reject') {\r\n this.handleTitle = this.$t('process.rejectTask')\r\n } else if (this.handleType === 'termination') {\r\n this.handleTitle = this.$t('process.terminationTask')\r\n }\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n })\r\n },\r\n // 表单提交\r\n dataFormSubmitHandle () {\r\n if (this.handleType === 'complete') {\r\n this.completeTask()\r\n } else if (this.handleType === 'reject') {\r\n this.rejectTask()\r\n } else if (this.handleType === 'termination') {\r\n this.terminationTask()\r\n }\r\n },\r\n // 驳回\r\n rejectTask: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n if (!this.dataForm.taskId) {\r\n return false\r\n }\r\n var params = qs.stringify({\r\n 'taskId': this.dataForm.taskId,\r\n 'comment': this.dataForm.comment\r\n })\r\n this.$http['post']('/act/task/backToFirst?', params).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n this.$message.error(res.msg)\r\n if (this.callbacks.taskHandleErrorCallback) {\r\n this.callbacks.taskHandleErrorCallback(res)\r\n }\r\n return\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n if (this.callbacks.taskHandleSuccessCallback) {\r\n this.callbacks.taskHandleSuccessCallback(res)\r\n }\r\n }\r\n })\r\n })\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false }),\r\n // 通过\r\n completeTask: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n if (!this.dataForm.taskId) {\r\n return false\r\n }\r\n var params = qs.stringify({\r\n 'taskId': this.dataForm.taskId,\r\n 'comment': this.dataForm.comment\r\n })\r\n this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n this.$message.error(res.msg)\r\n if (this.callbacks.taskHandleErrorCallback) {\r\n this.callbacks.taskHandleErrorCallback(res)\r\n }\r\n return\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n if (this.callbacks.taskHandleSuccessCallback) {\r\n this.callbacks.taskHandleSuccessCallback(res)\r\n }\r\n }\r\n })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false }),\r\n // 终止\r\n terminationTask: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n if (!this.dataForm.taskId) {\r\n return false\r\n }\r\n var task = qs.stringify({\r\n taskId: this.dataForm.taskId,\r\n comment: this.dataForm.comment\r\n })\r\n this.$http['post']('/act/task/endProcess', task).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n this.$message.error(res.msg)\r\n if (this.callbacks.taskHandleErrorCallback) {\r\n this.callbacks.taskHandleErrorCallback(res)\r\n }\r\n return\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n if (this.callbacks.taskHandleSuccessCallback) {\r\n this.callbacks.taskHandleSuccessCallback(res)\r\n }\r\n }\r\n })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false })\r\n }\r\n}\r\n</script>\r\n"],"mappings":"AAeA,OAAAA,QAAA;AACA,OAAAC,EAAA;AACA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,OAAA;MACAC,UAAA;MACAC,WAAA;MACAC,QAAA;QACAC,OAAA;QACAC,MAAA;MACA;MACA;MACAC,SAAA;QACAC,yBAAA;QACAC,uBAAA;MACA;IACA;EACA;EACAC,QAAA;IACAC,QAAA,WAAAA,SAAA;MACA;QACAN,OAAA,GACA;UAAAO,QAAA;UAAAC,OAAA,OAAAC,EAAA;UAAAC,OAAA;QAAA;MAEA;IACA;EACA;EACAC,OAAA;IACAC,IAAA,WAAAA,KAAA;MAAA,IAAAC,KAAA;MACA,KAAAjB,OAAA;MACA,SAAAC,UAAA;QACA,KAAAC,WAAA,QAAAW,EAAA;MACA,gBAAAZ,UAAA;QACA,KAAAC,WAAA,QAAAW,EAAA;MACA,gBAAAZ,UAAA;QACA,KAAAC,WAAA,QAAAW,EAAA;MACA;MACA,KAAAK,SAAA;QACAD,KAAA,CAAAE,KAAA,aAAAC,WAAA;MACA;IACA;IACA;IACAC,oBAAA,WAAAA,qBAAA;MACA,SAAApB,UAAA;QACA,KAAAqB,YAAA;MACA,gBAAArB,UAAA;QACA,KAAAsB,UAAA;MACA,gBAAAtB,UAAA;QACA,KAAAuB,eAAA;MACA;IACA;IACA;IACAD,UAAA,EAAA1B,QAAA;MAAA,IAAA4B,MAAA;MACA,KAAAN,KAAA,aAAAO,QAAA,WAAAC,KAAA;QACA,KAAAA,KAAA;UACA;QACA;QACA,KAAAF,MAAA,CAAAtB,QAAA,CAAAE,MAAA;UACA;QACA;QACA,IAAAuB,MAAA,GAAA9B,EAAA,CAAA+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