[fix uat124] 市场法规清单-新增、编辑页面 展示市场清单+市场清单编码的全部信息

This commit is contained in:
fengchenchen
2024-09-12 14:26:03 +08:00
parent 19e7b9386b
commit df196d504e
3 changed files with 67 additions and 22 deletions
@@ -71,6 +71,7 @@ module.exports = {
releaseTime: 'Published Date',
listState: 'Status',
customName: 'Custom Name',
customNameLastText: '车型需满足标准法规清单',
securityClass: 'Confidential Level',
listDeclaration: 'Manifest Declaration',
templateName: 'Market regulation list import template',
@@ -71,6 +71,7 @@ module.exports = {
releaseTime: '发布时间',
listState: '清单状态',
customName: '自定义名称',
customNameLastText: '车型需满足标准法规清单',
securityClass: '密级',
listDeclaration: '清单说明',
templateName: '市场法规清单导入模板',
@@ -25,25 +25,32 @@
</a-form-item>
</a-col>
<!-- 清单编号英文缩写 -->
<a-col :span="12" v-if="isShowManifestNo">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:labelCol="labelCol"
:wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:maxLength="192"
v-decorator="['manifestNo', validatorRules.manifestNo]" />
</a-form-item>
</a-col>
<!--<template v-if="isShowManifestNo">-->
<a-form-item class="block-form-item" :label="$t('standardRegulationLibrary.marketRegulationsList.listNumber')"
:labelCol="lineLabelCol"
:wrapperCol="lineWrapperCol">
<!--固定的编码-->
<span>BZFG-</span>
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:maxLength="192"
v-decorator="['manifestNo', validatorRules.manifestNo]" />
<!--后端生成的序号-->
<span>-{{model.columnNo}}</span>
</a-form-item>
<!--</template>-->
<!-- 自定义名称 -->
<a-col :span="12">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.customName')"
:labelCol="labelCol"
:wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.customName')"
:maxLength="200"
v-decorator="['customColumnName', validatorRules.customColumnName]" />
</a-form-item>
</a-col>
<!--<a-col :span="24">-->
<a-form-item class="block-form-item" :label="$t('standardRegulationLibrary.marketRegulationsList.listName')"
:labelCol="lineLabelCol"
:wrapperCol="lineWrapperCol">
<!--国家地区-->
<span>{{model.countryName}}</span>
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.customName')"
:maxLength="200"
v-decorator="['customColumnName', validatorRules.customColumnName]" />
<span>{{ $t('standardRegulationLibrary.marketRegulationsList.customNameLastText') }}</span>
</a-form-item>
<!--</a-col>-->
<!-- 驾驶位置 -->
<a-col :span="12">
<a-form-item :labelCol="labelCol"
@@ -256,7 +263,7 @@ export default {
SecurityClass,
pageLoading: false,
form: this.$form.createForm(this),
model: { manifest: {}, lists: [] },
model: { manifest: {}, lists: [], columnNo: 'XXX', countryName: '' },
queryParam: {},
countryOptions: [], // 国家下拉选择
labelCol: {
@@ -512,17 +519,33 @@ export default {
// const value = this.form.getFieldValue('country')
console.log('--------value', value)
const param = {}
param.country = value && value.length > 0 ? value.map(item => item.value).join(',') : ''
if (value && value.length > 0) {
param.country = value.map(item => item.value).join(',')
this.model.countryName = value.map(item => item.label).join('')
} else {
param.country = ''
this.model.countryName = ''
}
marketRegulationGetListNumber(param).then(res => {
if (res.success) {
const noText = res.message ? res.message.split(',')[0] : ''
const result = {
manifestNo: res.message
manifestNo: noText
}
// 显示清单编号英文名称缩写
this.isShowManifestNo = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(result, 'manifestNo'))
})
} else {
const result = {
manifestNo: ''
}
this.$nextTick(() => {
this.form.setFieldsValue(pick(result, 'manifestNo'))
})
}
})
},
@@ -540,14 +563,22 @@ export default {
this.model.country = this.model.country.split(',').map(item => {
return { value: item }
})
// 清单名称
this.model.countryName = this.model.country_dictText.split(',').join('')
}
// 清单编号的转换
const manifestNoAll = this.model.manifestNo
// 从清单编号截取英文缩写
this.model.manifestNo = this.model.manifestNo.split('-')[1]
this.model.manifestNo = manifestNoAll.split('-')[1]
// 清单标号 里面的序号
this.model.columnNo = manifestNoAll.split('-')[2]
// 显示清单编号英文名称缩写
this.isShowManifestNo = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
})
this.$forceUpdate()
}
}).finally(() => {
this.pageLoading = false
@@ -715,4 +746,16 @@ export default {
z-index: 999;
}
}
/deep/.block-form-item{
clear: both;
.ant-form-item-children {
display: flex;
align-items: center;
input {
flex: 1;
margin: 0 10px;
}
}
}
</style>