From e6c62f253c32c8b5ce8a246bbae97385b8980c6a Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 30 Jul 2024 11:21:38 +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=8F=AF=E4=BB=A5=E4=BF=AE=E6=94=B9=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E9=83=A8=E5=88=86=E7=9A=84=E8=8B=B1=E6=96=87=E7=BC=A9?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/standardRegulationLibraryApi.js | 3 ++ .../lang/standardRegulationLibrary/en-us.js | 3 +- .../lang/standardRegulationLibrary/zh-cn.js | 3 +- .../MarketRegulationsFormPage.vue | 30 ++++++++++++++++--- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/api/standardRegulationLibraryApi.js b/src/api/standardRegulationLibraryApi.js index f0194e5..f8a89c0 100644 --- a/src/api/standardRegulationLibraryApi.js +++ b/src/api/standardRegulationLibraryApi.js @@ -142,6 +142,8 @@ const getMarketRegulationListByIdNoPerm = (params) => getAction('/laws/marketSta const marketRegulationListAdd = (params) => postAction('/laws/marketStandard/add', params) // 市场法规清单-基础信息-编辑 const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', params) +// 市场法规清单-改变国家地区,重新获取清单编号 +const marketRegulationGetListNumber = (params) => getAction('/laws/marketStandard/getManifestNo', params) // 市场法规清单-清单列表-获取详情列表不分页 const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params) // 市场法规清单-清单列表-调取 @@ -237,6 +239,7 @@ export { getMarketRegulationListByIdNoPerm, marketRegulationListAdd, marketRegulationListEdit, + marketRegulationGetListNumber, marketRegulationDetailListById, marketRegulationDetailTransfer, marketRegulationDetailCopy, diff --git a/src/common/lang/standardRegulationLibrary/en-us.js b/src/common/lang/standardRegulationLibrary/en-us.js index 8069f44..3cdab71 100644 --- a/src/common/lang/standardRegulationLibrary/en-us.js +++ b/src/common/lang/standardRegulationLibrary/en-us.js @@ -75,7 +75,8 @@ module.exports = { standardExist: 'The standard already exists', haveStandardExist: 'Some standards already exist', pleaseSelectAListPublish: 'Please select a list to publish', - pleaseSelectCorrectData: 'Select an unpublished or modified list to publish' + pleaseSelectCorrectData: 'Select an unpublished or modified list to publish', + listNumberEnglishPart: 'List number English abbreviation' }, // 市场清单详情列表字段 marketListField: { diff --git a/src/common/lang/standardRegulationLibrary/zh-cn.js b/src/common/lang/standardRegulationLibrary/zh-cn.js index 5399151..4423244 100644 --- a/src/common/lang/standardRegulationLibrary/zh-cn.js +++ b/src/common/lang/standardRegulationLibrary/zh-cn.js @@ -76,7 +76,8 @@ module.exports = { standardExist: '标准已经存在', haveStandardExist: '部分标准已存在', pleaseSelectAListPublish: '请选择一个清单进行发布', - pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布' + pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布', + listNumberEnglishPart: '清单编号英文缩写' }, // 市场清单详情列表字段 marketListField: { diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue index b74e274..1874a5d 100644 --- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue +++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue @@ -19,16 +19,17 @@ :tree-data="countryOptions" tree-checkable treeCheckStrictly + @change="countryChange" :placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" /> - + - - @@ -205,6 +206,7 @@ import { getMarketRegulationListById, marketRegulationDetailCopy, marketRegulationDetailTransfer, + marketRegulationGetListNumber, marketRegulationListAdd, marketRegulationListEdit } from '../../../api/standardRegulationLibraryApi' @@ -496,6 +498,24 @@ export default { } }) }, + // 国家地区改变,重新获取清单编号 + countryChange (value) { + // 重新获取清单编号 + // const value = this.form.getFieldValue('country') + console.log('--------value', value) + const param = {} + param.country = value && value.length > 0 ? value.map(item => item.value).join(',') : '' + marketRegulationGetListNumber(param).then(res => { + if (res.success) { + const result = { + manifestNo: res.message + } + this.$nextTick(() => { + this.form.setFieldsValue(pick(result, 'manifestNo')) + }) + } + }) + }, // 获取基础信息 initData (id) { this.pageLoading = true @@ -511,6 +531,8 @@ export default { return { value: item } }) } + // 从清单编号截取英文缩写 + this.model.manifestNo = this.model.manifestNo.split('-')[1] this.$nextTick(() => { this.form.setFieldsValue(pick(this.model, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file')) })