[update 标准解读流程] 表格回显

This commit is contained in:
danshihao
2024-07-12 19:43:28 +08:00
parent 028498fb16
commit 3b7e9f35f5
3 changed files with 49 additions and 2 deletions
@@ -26,6 +26,7 @@
<j-dict-select-tag dict-code="yn"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion')"
@nameChange="(name) => nameChange(name, 'isSameAsPrevVersion')"
v-decorator="['isSameAsPrevVersion']"/>
</a-form-item>
<!--相对上一版变化点说明-->
@@ -51,6 +52,7 @@
options-href="/laws/standard/partName/"
:nameStr="model.keywords_dictText"
:disabled="disabled"
@nameChange="nameChange"
v-decorator="['keywords']" />
</a-form-item>
<!--关键控制器-->
@@ -58,6 +60,7 @@
<j-multi-select-tag dict-code="key_controller"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.keyController')"
@nameChange="(name) => nameChange(name, 'keyController')"
v-decorator="['keyController']"/>
</a-form-item>
<!--责任部门-->
@@ -67,6 +70,7 @@
:disabled="disabled"
multi
treeOpera
@back="departNameChange($event, 'responsibleDepartment')"
v-decorator="['responsibleDepartment']" />
</a-form-item>
<!--责任部门专业模块-->
@@ -74,6 +78,7 @@
<j-multi-select-tag dict-code="responsible_module"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.responsibleDepartmentModule')"
@nameChange="(name) => nameChange(name, 'responsibleModule')"
v-decorator="['responsibleModule']"/>
</a-form-item>
<!--关联部门-->
@@ -83,6 +88,7 @@
:disabled="disabled"
multi
treeOpera
@back="departNameChange($event, 'relatedDepartment')"
v-decorator="['relatedDepartment']" />
</a-form-item>
<!--关联部门专业模块-->
@@ -90,6 +96,7 @@
<j-multi-select-tag dict-code="related_module"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.relatedDepartmentsModule')"
@nameChange="(name) => nameChange(name, 'relatedModule')"
v-decorator="['relatedModule']"/>
</a-form-item>
<!--适用车型-->
@@ -97,6 +104,7 @@
<j-multi-select-tag dict-code="applicable_vehicle_type"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.applications')"
@nameChange="(name) => nameChange(name, 'applications')"
v-decorator="['applications']"/>
</a-form-item>
<!--动力类型-->
@@ -104,6 +112,7 @@
<j-multi-select-tag dict-code="dynamic_type"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.powerType')"
@nameChange="(name) => nameChange(name, 'powerType')"
v-decorator="['powerType']"/>
</a-form-item>
<!--专业领域-->
@@ -114,6 +123,7 @@
:tree-data="professionalFieldTreeList"
tree-checkable
treeCheckStrictly
@change="treeNameChange($event, 'domainArea')"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.professionalField')"/>
</a-form-item>
<!--配置需求-->
@@ -121,6 +131,7 @@
<j-multi-select-tag dict-code="configuration_requirements"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.configurationRequirements')"
@nameChange="(name) => nameChange(name, 'configurationRequirements')"
v-decorator="['configurationRequirements']"/>
</a-form-item>
<!--新认证车实施日期-->
@@ -214,6 +225,7 @@
<j-multi-select-tag dict-code="investigation_stage"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.investigationStage')"
@nameChange="(name) => nameChange(name, 'investigationStage')"
v-decorator="['investigationStage']"/>
</a-form-item>
<!--P3证明符合性的交付物名称-->
@@ -291,6 +303,9 @@ export default {
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
if (typeof this.model.domainArea === 'string') {
this.model.domainArea = this.model.domainArea.split(',').map(item => ({ value: item }))
}
this.form.setFieldsValue(this.model)
})
},
@@ -319,6 +334,18 @@ export default {
this.professionalFieldTreeList = res.result || []
}
})
},
// 下拉多选获取名称
nameChange (name, field) {
this.model[field + '_dictText'] = name
},
// 部门名称
departNameChange (departList, field) {
this.model[field + '_dictText'] = departList.map(item => item.text).join(',')
},
// 下拉树名称
treeNameChange (list, field) {
this.model[field + '_dictText'] = list.map(item => item.label).join(',')
}
}
}