[update] 市场法规清单

This commit is contained in:
lideqin
2024-07-04 09:59:19 +08:00
parent 7de893a24b
commit 844e3ced69
@@ -17,7 +17,8 @@
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%" style="width: 100%"
:tree-data="countryOptions" :tree-data="countryOptions"
:label-in-value="false" tree-checkable
treeCheckStrictly
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" /> :placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -47,9 +48,12 @@
<a-form-item :labelCol="labelCol" <a-form-item :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('standardRegulationLibrary.marketRegulationsList.drivingPosition')"> :label="$t('standardRegulationLibrary.marketRegulationsList.drivingPosition')">
<j-dict-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]" <!-- <j-dict-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]"-->
dict-code="driving_position" <!-- dict-code="driving_position"-->
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" /> <!-- :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" />-->
<j-multi-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]"
dict-code="driving_position"
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 密级 --> <!-- 密级 -->
@@ -838,32 +842,46 @@ export default {
// 提交 // 提交
handleSubmit () { handleSubmit () {
if (this.loading) return if (this.loading) return
const requiredField = [ this.form.validateFields((err, values) => {
'standardNumber', // 标准编号 if (err) {
'standardName', // 标准名称 return
'newProductImplDate', // 新生产车实施日期 }
'newAuthImplDate', // 新认证车实施日期 let tableErr = false
'registrationDate', // 注册日期 // 校验表格是否至少有一条数据
'applicableCountryRegion', // 适用国家/地区 if (this.dataList.length <= 0) {
'authenticationObject', // 认证对象 this.$message.warning(this.$t('addAtLeastOneRowOfData'))
'mainDept', // 主控部门 tableErr = true
'mainDeptProfMode', // 主控部门专业模块 return
'applicableVehicle', // 适用车型 }
'dynamicType' // 动力类型 // 校验表格必填项是否都填写了
] const requiredField = [
for (const item of this.dataList) { 'standardNumber', // 标准编号
for (const filed of requiredField) { 'standardName', // 标准名称
if (!item[filed]) { 'newProductImplDate', // 新生产车实施日期
this.$message.warning(this.$t('pleaseCompleteTableInfo')) 'newAuthImplDate', // 新认证车实施日期
return 'registrationDate', // 注册日期
'applicableCountryRegion', // 适用国家/地区
'authenticationObject', // 认证对象
'mainDept', // 主控部门
'mainDeptProfMode', // 主控部门专业模块
'applicableVehicle', // 适用车型
'dynamicType' // 动力类型
]
for (const item of this.dataList) {
for (const filed of requiredField) {
if (!item[filed]) {
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
tableErr = true
return
}
} }
} }
} if (!err && !tableErr) {
this.form.validateFields((err, values) => {
if (!err) {
this.loading = true this.loading = true
const param = {} const param = {}
param.manifest = Object.assign({}, values) param.manifest = Object.assign({}, values)
// 国家/地区是树选择,需要处理格式
param.manifest.country = param.manifest.country.map(item => item.value).join(',')
let func let func
if (this.model.manifest.id) { if (this.model.manifest.id) {
param.manifest.id = this.model.manifest.id param.manifest.id = this.model.manifest.id