From e50f7c8760642472248f3b6ae0ff481a9ee0854b Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Thu, 4 Jul 2024 18:10:39 +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?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../MarketRegulationsFormPage.vue | 14 +--
.../MarketRegulationsList.vue | 2 +-
.../modules/MarketRegulationsModal.vue | 90 ++++++++++++++-----
3 files changed, 78 insertions(+), 28 deletions(-)
diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
index 9602e36..ef319a9 100644
--- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
+++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
@@ -382,7 +382,7 @@ export default {
title: this.$t('standardRegulationLibrary.marketListField.applicableCountryRegion'),
align: 'center',
width: 180,
- dataIndex: 'applicableCountryRegion_dictText',
+ dataIndex: 'country_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 适用车型
@@ -410,7 +410,7 @@ export default {
title: this.$t('standardRegulationLibrary.marketListField.type'),
align: 'center',
width: 180,
- dataIndex: 'stanardClass_dictText',
+ dataIndex: 'type_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 动力类型
@@ -755,13 +755,13 @@ export default {
form.standardNumber = result.standard_number // 标准编号
form.standardName = result.standard_name // 标准名称
form.standardEnglishName = result.standard_english_name // 标准英文名称
- form.stanardClass = result.standard_class // 标准类型
- form.stanardClass_dictText = result.standard_class_dictText // 标准类型
+ form.type = result.type // 标准类型
+ form.type_dictText = result.type_dictText // 标准类型
form.newProductImplDate = result.new_product_impl_date // 新生产车实施日期
form.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期
form.registrationDate = result.registration_date // 注册日期
- form.applicableCountryRegion = result.applicable_market // 适用国家/地区
- form.applicableCountryRegion_dictText = result.applicable_market_dictText // 适用国家/地区
+ form.country = result.applicable_market // 适用国家/地区
+ form.country_dictText = result.applicable_market_dictText // 适用国家/地区
form.mainDept = result.main_dept // 主控部门
form.mainDept_dictText = result.main_dept_dictText // 主控部门
form.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块
@@ -873,7 +873,7 @@ export default {
'newProductImplDate', // 新生产车实施日期
'newAuthImplDate', // 新认证车实施日期
'registrationDate', // 注册日期
- 'applicableCountryRegion', // 适用国家/地区
+ 'country', // 适用国家/地区
'authenticationObject', // 认证对象
'mainDept', // 主控部门
'mainDeptProfMode', // 主控部门专业模块
diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsList.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsList.vue
index 315a19d..cd9bdc2 100644
--- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsList.vue
+++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsList.vue
@@ -243,7 +243,7 @@ export default {
url: {
list: '/laws/marketStandard/page',
exportXlsUrl: '/laws/marketStandard/exportXls',
- delete: ''
+ delete: '/laws/marketStandard/delete'
}
}
},
diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/modules/MarketRegulationsModal.vue b/src/views/standardRegulationLibrary/marketRegulationsList/modules/MarketRegulationsModal.vue
index 3205971..7722014 100644
--- a/src/views/standardRegulationLibrary/marketRegulationsList/modules/MarketRegulationsModal.vue
+++ b/src/views/standardRegulationLibrary/marketRegulationsList/modules/MarketRegulationsModal.vue
@@ -38,7 +38,7 @@
+ v-decorator.trim="[ 'type', validatorRules.type ]" />
@@ -61,11 +61,11 @@
@@ -86,36 +86,46 @@
-
-
-
-
@@ -225,7 +235,7 @@ export default {
validateTrigger: 'change'
},
// 适用国家/地区
- applicableCountryRegion: {
+ country: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.applicableCountryRegion')
@@ -287,16 +297,16 @@ export default {
this.visible = true
this.model = Object.assign({}, record)
// 处理适用国家/地区格式
- if (this.model.applicableCountryRegion) {
- this.model.applicableCountryRegion = this.model.applicableCountryRegion.split(',').map(item => {
+ if (this.model.country) {
+ this.model.country = this.model.country.split(',').map(item => {
return { value: item }
})
} else {
- this.model.applicableCountryRegion = []
+ this.model.country = []
}
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'standardNumber', 'standardName', 'standardEnglishName',
- 'stanardClass', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'applicableCountryRegion',
+ 'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country',
'authenticationObject', 'certifyTheDeliverables', 'mainDept', 'mainDeptProfMode', 'associateDept',
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType'))
})
@@ -319,15 +329,15 @@ export default {
form.standardId = result.id
form.standardName = result.standard_name // 标准名称
form.standardEnglishName = result.standard_english_name // 标准英文名称
- form.stanardClass = result.standard_class // 标准类型
- form.stanardClass_dictText = result.standard_class_dictText // 标准类型
+ form.type = result.type // 标准类型
+ form.type_dictText = result.type_dictText // 标准类型
form.newProductImplDate = result.new_product_impl_date // 新生产车实施日期
form.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期
form.registrationDate = result.registration_date // 注册日期
- form.applicableCountryRegion = result.applicable_market ? (result.applicable_market.split(',').map(item => {
+ form.country = result.applicable_market ? (result.applicable_market.split(',').map(item => {
return { value: item }
})) : [] // 适用国家/地区
- form.applicableCountryRegion_dictText = result.applicable_market_dictText // 适用国家/地区
+ form.country_dictText = result.applicable_market_dictText // 适用国家/地区
form.mainDept = result.main_dept // 主控部门
form.mainDept_dictText = result.main_dept_dictText // 主控部门
form.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块
@@ -343,7 +353,7 @@ export default {
this.model = Object.assign({}, form)
this.$nextTick(() => {
this.form.setFieldsValue(pick(form, 'standardName', 'standardEnglishName',
- 'stanardClass', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'applicableCountryRegion',
+ 'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country',
'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode', 'applicableVehicle', 'dynamicType'))
})
}
@@ -351,9 +361,49 @@ export default {
this.confirmLoading = false
})
},
+ // 主控部门回调
+ mainDeptBack (value) {
+ if (value && value.length > 0) {
+ this.model.mainDept_dictText = value.map(item => item.text).join(',')
+ } else {
+ this.model.mainDept_dictText = ''
+ }
+ },
+ // 关联部门回调
+ associateDeptBack (value) {
+ if (value && value.length > 0) {
+ this.model.associateDept_dictText = value.map(item => item.text).join(',')
+ } else {
+ this.model.associateDept_dictText = ''
+ }
+ },
+ // 主控部门专业模块改变
+ mainDeptProfModeChange (value) {
+ const valueArr = value.split(this.$refs.mainDeptProfMode.spliter)
+ const arr = this.$refs.mainDeptProfMode.dictOptions.filter(item => valueArr.includes(item.value))
+ this.model.mainDeptProfMode_dictText = arr.map(item => item.title).join(',')
+ },
+ // 关联部门专业模块改变
+ associateDeptProfModeChange (value) {
+ const valueArr = value.split(this.$refs.associateDeptProfMode.spliter)
+ const arr = this.$refs.associateDeptProfMode.dictOptions.filter(item => valueArr.includes(item.value))
+ this.model.associateDeptProfMode_dictText = arr.map(item => item.title).join(',')
+ },
+ // 适用车型改变
+ applicableVehicleChange (value) {
+ const valueArr = value.split(this.$refs.applicableVehicle.spliter)
+ const arr = this.$refs.applicableVehicle.dictOptions.filter(item => valueArr.includes(item.value))
+ this.model.applicableVehicle_dictText = arr.map(item => item.title).join(',')
+ },
+ // 动力类型改变
+ dynamicTypeChange (value) {
+ const valueArr = value.split(this.$refs.dynamicType.spliter)
+ const arr = this.$refs.dynamicType.dictOptions.filter(item => valueArr.includes(item.value))
+ this.model.dynamicType_dictText = arr.map(item => item.title).join(',')
+ },
// 适用国家/地区改变
- applicableCountryRegionChange (value) {
- this.model.applicableCountryRegion_dictText = value.map(item => item.label).join(',')
+ countryChange (value) {
+ this.model.country_dictText = value.map(item => item.label).join(',')
},
// 认证对象改变
authenticationObjectChange (value) {
@@ -384,7 +434,7 @@ export default {
this.confirmLoading = true
const param = Object.assign({}, values)
// 处理适用国家/地区格式
- param.applicableCountryRegion = param.applicableCountryRegion.map(item => item.value).join(',')
+ param.country = param.country.map(item => item.value).join(',')
this.$emit('ok', { ...this.model, ...param })
this.close()
this.confirmLoading = false