diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index ce2cbf93..6bb7c4eb 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -72,6 +72,7 @@ function iniData () { pageType: "info", info: {}, + eventDetailCopy: {} }; } @@ -86,6 +87,13 @@ export default { type: String, default: "info", }, + + eventDetailData: { + type: Object, + default () { + return {} + } + }, }, components: { @@ -101,7 +109,11 @@ export default { }, mounted () { - this.getApiData(); + if (this.eventId) { + this.info = JSON.parse(JSON.stringify(this.eventDetailData)); + } + // this.getApiData(); + }, methods: { @@ -114,24 +126,9 @@ export default { }, async getApiData () { - this.getEventInfo(); - }, - //加载组织数据 - async getEventInfo () { - const url = "/gov/project/icEvent/detail"; - // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail"; - const { data, code, msg } = await requestPost(url, { - icEventId: this.eventId, - }); - - if (code === 0) { - - this.info = { ...data }; - } else { - this.$message.error(msg); - } }, + }, }; diff --git a/src/views/modules/shequzhili/event/cpts/event-info.vue b/src/views/modules/shequzhili/event/cpts/event-info.vue index 84905e41..e952ece1 100644 --- a/src/views/modules/shequzhili/event/cpts/event-info.vue +++ b/src/views/modules/shequzhili/event/cpts/event-info.vue @@ -35,7 +35,8 @@

事件详情

+ :eventId="eventId" + :eventDetailData="eventDetailData">

处理

+ :eventId="eventId" + :eventDetailData="eventDetailData">
{ diff --git a/src/views/modules/shequzhili/event/cpts/process-form-replay.vue b/src/views/modules/shequzhili/event/cpts/process-form-replay.vue index 1320d10d..67810030 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-replay.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-replay.vue @@ -46,14 +46,15 @@ export default { return { btnDisable: false, formData: { + operationType: '0',//处理方式[0:已回复 1:已转项目 1:已转需求] content: '', status: '' }, status: false, - okflag: false - + okflag: false, + eventDetailCopy: {} }; }, @@ -71,16 +72,25 @@ export default { }, - props: {}, + props: { + + eventDetailData: { + type: Object, + default () { + return {} + } + }, + }, watch: {}, async mounted () { - + if (this.eventId) { + this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); + } }, methods: { - async getReplayInfo () { this.okflag = false this.$refs["ref_form1"].validate((valid, messageObj) => { diff --git a/src/views/modules/shequzhili/event/cpts/process-form.vue b/src/views/modules/shequzhili/event/cpts/process-form.vue index eb48d64a..6ab88929 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form.vue @@ -32,11 +32,13 @@
- +
- +
@@ -44,7 +46,8 @@ :eventId="eventId" :demandUserId="demandUserId" :demandUserName="demandUserName" - :demandUserMobile="demandUserMobile"> + :demandUserMobile="demandUserMobile" + :eventDetailData="eventDetailData">
@@ -67,9 +70,7 @@ export default { data () { return { - btnDisable: false, - gridList: [],//所属网格list--场所区域 - categrayList: [], + casOptions: [], iscascaderShow: 0, selCategoryArray: [ @@ -84,14 +85,15 @@ export default { }, - operationType: '1', - + operationType: '0', categoryList: [], replayInfo: {}, demand: {}, project: {}, - okflag: false + okflag: false, + + eventDetailCopy: {} }; }, @@ -132,6 +134,12 @@ export default { type: String, default: "", }, + eventDetailData: { + type: Object, + default () { + return {} + } + }, }, watch: { @@ -141,30 +149,28 @@ export default { async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId - this.loadGrid(); - this.getCategoryList() - - }, - - methods: { + await this.getCategoryList() + if (this.eventId) { + this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); + if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { + this.selCategoryArray = [] + this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId) + this.selCategoryArray.push(this.eventDetailCopy.categoryId) + + this.selCateObj = { + name: this.eventDetailCopy.categoryName, + id: this.eventDetailCopy.categoryId + } + } + } - async loadGrid () { - const url = "/gov/org/customergrid/gridoption" - let params = { - agencyId: this.agencyId - } - const { data, code, msg } = await requestPost(url, params) + }, - if (code === 0) { - this.gridList = data + methods: { - } else { - this.$message.error(msg) - } - }, async getCategoryList () { const url = "/gov/issue/issueprojectcategorydict/list" @@ -175,11 +181,11 @@ export default { if (code === 0) { let treeDataNew = this.filterTree(data) - // this.categrayList = data + //组织级联数据 ++this.iscascaderShow this.casOptions = [] - this.selCategoryArray = ["1001", "1015"] + this.casOptions = treeDataNew @@ -226,15 +232,17 @@ export default { this.categoryList = [] this.categoryList.push(this.selCategoryArray[1]) - console.log(this.categoryList) + if (this.operationType === '0') { this.$refs.ref_process_form_replay.getReplayInfo() if (this.$refs.ref_process_form_replay.okflag) { + this.replayInfo = this.$refs.ref_process_form_replay.formData - this.replayInfo.categoryId = this.selCateObj.id - this.replayInfo.categoryList = [] - this.replayInfo.categoryList.push(this.selCateObj) + + this.replayInfo.categoryId = this.categoryList[0] + this.replayInfo.categoryList = this.categoryList + this.okflag = true } else { @@ -245,10 +253,13 @@ export default { } else if (this.operationType === '1') { this.$refs.ref_process_form_project.getProjectInfo() if (this.$refs.ref_process_form_project.okflag) { + this.project = this.$refs.ref_process_form_project.formData + this.project.categoryList = [] this.project.categoryList.push(this.selCateObj) + //赋值分类信息 this.okflag = true diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue index 585657dc..5bc4f19c 100644 --- a/src/views/modules/shequzhili/event/eventList.vue +++ b/src/views/modules/shequzhili/event/eventList.vue @@ -153,6 +153,7 @@