1 line
10 KiB
JSON
1 line
10 KiB
JSON
|
{"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: businessKe
|