{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\ren-process-start\\src\\ren-process-start.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\ren-process-start\\src\\ren-process-start.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n\nimport qs from 'qs'\nexport default {\n name: 'RenProcessStart',\n data () {\n return {\n formUrl: '',\n instanceIdUrl: '',\n formName: null,\n rootObj: null,\n dataForm: {\n processDefinitionKey: ''\n },\n // 回调函数\n callbacks: {\n startProcessSuccessCallback: null,\n startProcessErrorCallback: null,\n formSaveSuccessCallback: null,\n formSaveErrorCallback: null\n }\n }\n },\n components: {\n },\n created () {\n this.$nextTick(() => {\n this.formUrl = this.saveFormUrl\n this.instanceIdUrl = this.updateInstanceIdUrl\n this.formName = this.dataFormName\n })\n },\n props: {\n saveFormUrl: String,\n updateInstanceIdUrl: String,\n dataFormName: String\n },\n watch: {\n saveFormUrl (val) {\n this.formUrl = val\n },\n updateInstanceIdUrl (val) {\n this.instanceIdUrl = val\n },\n dataFormName (val) {\n this.formName = val\n }\n },\n methods: {\n // 启动流程事件\n processStartHandle () {\n if (!this.formUrl) {\n return this.$message.error(this.$t('process.formURLError'))\n }\n if (!this.dataForm.processDefinitionKey) {\n return this.$message.error(this.$t('process.keyError'))\n }\n if (!this.formName) {\n return this.$message.error(this.$t('process.formNameError'))\n }\n this.rootObj.$refs[this.formName].validate((valid) => {\n if (!valid) {\n return false\n }\n this.$http.get(`/activiti/process/lastestPage`, {\n params: {\n key: this.dataForm.processDefinitionKey\n }\n }).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n if (!res.data.list || res.data.list.length <= 0) {\n return this.$message.error(this.$t('process.notExistError'))\n }\n this.$http['post'](this.formUrl, this.rootObj[this.formName]).then(({ data: res }) => {\n if (res.code !== 0) {\n this.$message.error(res.msg)\n if (this.callbacks.formSaveErrorCallback) {\n this.callbacks.formSaveErrorCallback(res)\n }\n }\n if (this.callbacks.formSaveSuccessCallback) {\n this.callbacks.formSaveSuccessCallback(res)\n }\n if (!res.data.businessKey) {\n return this.$message.error(this.$t('process.businessKeyError'))\n // this.startProcess(this.dataForm.processDefinitionKey, null, this.rootObj[this.formName])\n } else {\n this.startProcess(this.dataForm.processDefinitionKey, res.data.businessKey, this.rootObj[this.formName])\n }\n }).catch(() => {})\n }).catch(() => {})\n })\n },\n // 启动流程\n startProcess (processDefinitionKey, businessKey, formData) {\n var data = {\n processDefinitionKey: processDefinitionKey,\n businessKey: businessKey,\n variables: formData\n }\n this.$http['post']('/activiti/running/startOfBusinessKey', data).then(({ data: res }) => {\n if (res.code !== 0) {\n if (this.callbacks.startProcessErrorCallback) {\n this.callbacks.startProcessErrorCallback(res.data)\n }\n }\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: () => {\n if (this.callbacks.startProcessSuccessCallback) {\n this.callbacks.startProcessSuccessCallback(res.data)\n }\n }\n })\n if (this.instanceIdUrl) {\n var params = qs.stringify({\n processInstanceId: res.data.processInstanceId,\n processDefinitionKey: processDefinitionKey,\n businessKey: businessKey\n })\n this.$http['post'](this.instanceIdUrl + '?' + params).then(({ data: res }) => {})\n }\n }).catch(() => {})\n }\n }\n}\n",{"version":3,"sources":["ren-process-start.vue"],"names":[],"mappings":";;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"ren-process-start.vue","sourceRoot":"src/components/ren-process-start/src","sourcesContent":["\n {{ $t('process.createInstance') }}\n\n\n\n"]}]}