From 9251f709dc2a0d278ef2c0cdd76a244bfefc5784 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Thu, 12 Sep 2024 13:15:53 +0800 Subject: [PATCH] fix: 责任单位修改 --- src/views/toCarryOutLegislativeReforms/reform/index.vue | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue index ce8dba5..2c2257c 100644 --- a/src/views/toCarryOutLegislativeReforms/reform/index.vue +++ b/src/views/toCarryOutLegislativeReforms/reform/index.vue @@ -7,6 +7,7 @@ <searchBar v-if="searchType" :search-type="'reform'" + :initialization-data="initializationData" @handleSearch="handleSearchBut" @handleAdd="handleOpenDialog(null, 'add')" /> @@ -566,6 +567,9 @@ parseInt(item.dataKey) === this.editEscalationUnitData.polluteType ) return data ? data.dataValue : '' + }, + initializationData () { + return this.$route.query } }, watch: { @@ -574,10 +578,32 @@ } }, created () { - this.handleSearch({ isInvalid: 0, state: [9, 20, 30] }) + if (Object.entries(this.$route.query).length === 0) { + this.handleSearch({ isInvalid: 0, state: [9, 20, 30] }) + } else { + let state = [] + let changeType = null + let startTime = this.initializationData.startTime + let endTime = this.initializationData.endTime + if (this.initializationData.type === 'total') { + state = [] + } else if (this.initializationData.type === 'unComplete') { + state = [9, 20, 30] + } else if (this.initializationData.type === 'complete') { + state = [40] + } else if (this.initializationData.type === 'overdue') { + state = [] + changeType = 2 + } + this.handleSearch({ isInvalid: 0, state: state, changeType: changeType, startTime: startTime, endTime: endTime }) + } this.getUnitList() this.getContaminateList() }, + // mounted () { + // console.log('this.$route.query', this.$route.query) + // this.initializationData = this.$route.query + // }, methods: { getaddressAndLnt (position, address) { if (this.mapType === 'edit') { -- Gitblit v1.8.0