From dff742610356965017d4de76f1d795829d384a9c Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Thu, 8 Dec 2022 17:27:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BDbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/mixins/process-module.js | 16 +++++++++------- .../activiti/demo/abilitydemandapply.vue | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/back/src/mixins/process-module.js b/back/src/mixins/process-module.js index 14a06306..0d303cd2 100644 --- a/back/src/mixins/process-module.js +++ b/back/src/mixins/process-module.js @@ -14,19 +14,21 @@ export default { var showType = this.$route.params.processShowType this.processVisible = true this.$nextTick(() => { - if (this.$route.params.processDefinitionKey) { + if (this.$route.params.processDefinitionKey && this.$refs.renProcessMultiple) { this.$refs.renProcessMultiple.dataForm.processDefinitionKey = this.$route.params.processDefinitionKey } - if (this.$route.params.taskId) { + if (this.$route.params.taskId && this.$refs.renProcessMultiple) { this.$refs.renProcessMultiple.dataForm.taskId = this.$route.params.taskId } - if (this.$route.params.processInstanceId) { + if (this.$route.params.processInstanceId && this.$refs.renProcessMultiple) { this.$refs.renProcessMultiple.dataForm.processInstanceId = this.$route.params.processInstanceId } - this.$refs.renProcessMultiple.dataForm.businessKey = this.$route.params.businessKey - this.$refs.renProcessMultiple.showType = showType - this.$refs.renProcessMultiple.parentObj = this - this.$refs.renProcessMultiple.callbacks = callbacks + if (this.$refs.renProcessMultiple) { + this.$refs.renProcessMultiple.dataForm.businessKey = this.$route.params.businessKey + this.$refs.renProcessMultiple.showType = showType + this.$refs.renProcessMultiple.parentObj = this + this.$refs.renProcessMultiple.callbacks = callbacks + } }) }, // 关闭当前窗口 diff --git a/back/src/views/modules/activiti/demo/abilitydemandapply.vue b/back/src/views/modules/activiti/demo/abilitydemandapply.vue index b725343e..991342bc 100644 --- a/back/src/views/modules/activiti/demo/abilitydemandapply.vue +++ b/back/src/views/modules/activiti/demo/abilitydemandapply.vue @@ -139,6 +139,12 @@ export default { // 表单属性是否可编辑 fieldDisabled: false, dataForm: { + applyUserName: '', + applyUserPhone: '', + applyUserDeptName: '', + demandSubject: '', + detailsField: '', + demandDetails: '', id: '', user: '', phone: '', @@ -146,7 +152,8 @@ export default { area: '', system: '', scene: '', - basis: '' + basis: '', + enclosure: '' }, // 审批 dialogVisible: false, @@ -159,7 +166,7 @@ export default { created () { // 将业务KEY赋值给表单 this.dataForm.id = this.$route.params.businessKey - console.log(this.$route.params) + // console.log(this.$route.params) this.init() // 流程回调 var callbacks = { @@ -202,8 +209,10 @@ export default { init () { this.visible = true this.$nextTick(() => { - this.$refs.dataForm.resetFields() - if (this.dataForm.id) { + if (this.$refs.dataForm) { + this.$refs.dataForm.resetFields() + } + if (this.dataForm && this.dataForm.id) { // 如业务KEY已存在,不允许编辑 this.fieldDisabled = true this.getInfo()