From c3e83bad678ff77665a9a6107b3924d2d0177f3d Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 8 Jul 2024 11:24:56 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E5=B8=82=E5=9C=BA=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95-=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MarketRegulationsDetailPage.vue | 7 +++++-- .../MarketRegulationsFormPage.vue | 11 ++++++++--- .../modules/HistoryVersionModal.vue | 8 ++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue index 2e9efc1..2c01e61 100644 --- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue +++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue @@ -295,7 +295,8 @@ export default { url: { list: '/laws/marketStandardDetail/page' }, - disableMixinCreated: true + disableMixinCreated: true, + historyVersions: [] // 历史版本数据 } }, beforeRouteUpdate (to, from, next) { @@ -306,6 +307,7 @@ export default { this.ids = to.query.ids.split(',') this.filters.manifestId = to.query.ids this.initData(to.query.ids) + this.loadData() next() } else { next() @@ -332,6 +334,7 @@ export default { getMarketRegulationListById(param).then(res => { if (res.success) { this.model = Object.assign({}, res.result.manifest) + this.historyVersions = JSON.parse(JSON.stringify(res.result.historyVersions)) } }).finally(() => { this.loading = false @@ -348,7 +351,7 @@ export default { }, // 点击历史版本 clickHistoryVersion () { - this.$refs.historyVersionModal.open(this.model) + this.$refs.historyVersionModal.open(this.model.id, this.historyVersions) } } } diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue index 546cc6f..458e9aa 100644 --- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue +++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue @@ -459,7 +459,8 @@ export default { delete: '/laws/marketStandardDetail/delete' }, disableMixinCreated: true, - importData: {} + importData: {}, + historyVersions: [] // 历史版本 } }, mounted () { @@ -489,6 +490,7 @@ export default { getMarketRegulationListById(param).then(res => { if (res.success) { this.model = Object.assign({}, res.result.manifest) + this.historyVersions = JSON.parse(JSON.stringify(res.result.historyVersions)) if (this.model.country) { this.model.country = this.model.country.split(',').map(item => { return { value: item } @@ -504,7 +506,7 @@ export default { }, // 点击历史版本 clickHistoryVersion () { - this.$refs.historyVersionModal.open(this.model) + this.$refs.historyVersionModal.open(this.model.id, this.historyVersions) }, // 下一步或提交, 提交基础信息 handleNext () { @@ -530,6 +532,9 @@ export default { if (!this.model.id) { // 没有id,是新增会返回id,用于下方表格处理 this.model.id = res.message + this.filters.manifestId = this.model.id + // 更新清单编号 + this.initData(this.model.id) } this.showList = true } else { @@ -648,7 +653,7 @@ export default { } .content-wrapper { - height: calc(100% - 52px); + height: 100%; box-sizing: border-box; overflow: auto; padding: 32px 20px; diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/modules/HistoryVersionModal.vue b/src/views/standardRegulationLibrary/marketRegulationsList/modules/HistoryVersionModal.vue index 96f0b50..fd66a33 100644 --- a/src/views/standardRegulationLibrary/marketRegulationsList/modules/HistoryVersionModal.vue +++ b/src/views/standardRegulationLibrary/marketRegulationsList/modules/HistoryVersionModal.vue @@ -54,10 +54,10 @@ export default { } }, methods: { - open (model) { + open (manifestId, historyVersions) { this.visible = true - this.model = Object.assign({}, model) - this.dataSource = this.model.historyVersions.map(item => { + this.model.id = manifestId + this.dataSource = historyVersions.map(item => { return { version: item } }) }, @@ -67,7 +67,7 @@ export default { path: '/standardRegulationLibrary/marketRegulationsList/marketRegulationsDetailPage', query: { title: this.$t('view'), - ids: this.model.manifest.id, + ids: this.model.id, manifestVersion: record.version } })