diff --git a/src/views/modules/shequzhili/event/cpts/event-info.vue b/src/views/modules/shequzhili/event/cpts/event-info.vue index 4458df11..cf5a7573 100644 --- a/src/views/modules/shequzhili/event/cpts/event-info.vue +++ b/src/views/modules/shequzhili/event/cpts/event-info.vue @@ -356,7 +356,6 @@ export default { this.$refs.ref_add.getEventInfo() if (this.$refs.ref_add.okflag) { - this.eventInfoData = this.$refs.ref_add.formData } else { return false @@ -369,18 +368,21 @@ export default { this.formData.operationType = this.$refs.ref_processinfo_add.operationType this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType - // this.eventInfoData.categoryList = this.$refs.ref_processinfo_add.categoryList + if (this.formData.operationType === '0') { this.project = {} this.demand = {} this.replayInfo = this.$refs.ref_processinfo_add.replayInfo console.log('replayInfo', this.replayInfo) + //回复属性赋值 this.eventInfoData.content = this.replayInfo.content this.eventInfoData.status = this.replayInfo.status - this.eventInfoData.categoryList = [] - this.eventInfoData.categoryList.push(this.replayInfo.categoryId) + if (this.replayInfo.categoryId) { + this.eventInfoData.categoryList = [] + this.eventInfoData.categoryList.push(this.replayInfo.categoryId) + } } else if (this.formData.operationType === '1') { @@ -389,17 +391,22 @@ export default { this.project = this.$refs.ref_processinfo_add.project //项目的属性同事件一样 this.project.gridId = this.eventInfoData.gridId + + if (this.project.categoryList && this.project.categoryList.length > 0) { + this.eventInfoData.categoryList = [] + this.eventInfoData.categoryList.push(this.project.categoryList[0].id) + } + console.log('projectInfo', this.project) } else if (this.formData.operationType === '2') { this.replayInfo = {} this.project = {} this.demand = this.$refs.ref_processinfo_add.demand + //需求的属性同事件一样 - this.demand.gridId = this.eventInfoData.gridId - this.demand.reportUserName = this.eventInfoData.name//上报人姓名同需求上报人姓名 - this.demand.reportUserMobile = this.eventInfoData.mobile//上报人手机号同需求上报人手机号 - this.demand.reportTime = this.eventInfoData.happenTime//上报时间 + this.eventInfoData.categoryList = [] + this.eventInfoData.categoryList.push(this.demand.categoryId) console.log('demond', this.demand) } @@ -413,7 +420,7 @@ export default { } console.log('this.formData', this.formData) - await this.submit() + // await this.submit() }, async submit () { diff --git a/src/views/modules/shequzhili/event/cpts/process-form-demand.vue b/src/views/modules/shequzhili/event/cpts/process-form-demand.vue index 5f425578..8458cdc4 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-demand.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-demand.vue @@ -363,6 +363,10 @@ export default { this.formData.reportUserName = this.eventDetailCopy.name this.formData.reportTime = this.eventDetailCopy.happenTime this.formData.gridId = this.eventDetailCopy.gridId + this.formData.demandUserId = this.eventDetailCopy.reportUserId + this.formData.demandUserName = this.eventDetailCopy.name + this.formData.demandUserMobile = this.eventDetailCopy.mobile + if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { this.selCategoryArray = [] this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId) @@ -412,7 +416,6 @@ export default { handleChangeCate () { console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data - this.formData.categoryId = this.selCateObj.id },