[update 标准解读流程] 翻译
This commit is contained in:
@@ -127,9 +127,15 @@ export default {
|
||||
val = e
|
||||
}
|
||||
console.log(val)
|
||||
// 返回名字
|
||||
if (this.$listeners.nameChange) {
|
||||
this.$emit('nameChange', this.getDictLabelByValue(val))
|
||||
}
|
||||
// 返回选中字典对象
|
||||
if (this.$listeners.dictChange) {
|
||||
const dictItem = this.dictOptions.find(item => item.value === val)
|
||||
this.$emit('dictChange', JSON.parse(JSON.stringify(dictItem)))
|
||||
}
|
||||
this.$emit('change', val)
|
||||
// 解决数据规则,选择自定义SQL 规则值无法输入空格
|
||||
this.$emit('input', val)
|
||||
|
||||
@@ -141,20 +141,22 @@ export default {
|
||||
}
|
||||
}
|
||||
this.arrayValue = selectedValue
|
||||
let list = selectedValue
|
||||
// 开启全选时,不把全选的value进行返回
|
||||
if (this.openSelectedAll) {
|
||||
const list = selectedValue.filter(item => item !== selectedAllValue)
|
||||
if (this.$listeners.nameChange) {
|
||||
const labelList = list.map(val => this.getDictLabelByValue(val))
|
||||
this.$emit('nameChange', labelList.join(this.spliter))
|
||||
}
|
||||
this.$emit('change', list.join(this.spliter))
|
||||
} else {
|
||||
if (this.$listeners.nameChange) {
|
||||
this.$emit('nameChange', selectedValue.map(val => this.getDictLabelByValue(val)).join(this.spliter))
|
||||
}
|
||||
this.$emit('change', selectedValue.join(this.spliter))
|
||||
list = selectedValue.filter(item => item !== selectedAllValue)
|
||||
}
|
||||
// 返回名字
|
||||
if (this.$listeners.nameChange) {
|
||||
const labelList = list.map(val => this.getDictLabelByValue(val))
|
||||
this.$emit('nameChange', labelList.join(this.spliter))
|
||||
}
|
||||
// 返回选中字典对象列表
|
||||
if (this.$listeners.dictChange) {
|
||||
const dictList = list.map(val => this.dictOptions.find(item => item.value === val))
|
||||
this.$emit('dictChange', JSON.parse(JSON.stringify(dictList)))
|
||||
}
|
||||
this.$emit('change', list.join(this.spliter))
|
||||
},
|
||||
// 通过val获取字典项
|
||||
getDictLabelByValue (val) {
|
||||
|
||||
+9
-9
@@ -200,7 +200,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'isSameAsPrevVersion_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 相对上一版变化点说明
|
||||
title: this.$t('workCenter.standardInterpretationProcess.explanationOfChangePoints'),
|
||||
@@ -228,7 +228,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'keyController_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 责任部门
|
||||
title: this.$t('workCenter.standardInterpretationProcess.responsibleDepartment'),
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'responsibleModule_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 关联部门
|
||||
title: this.$t('workCenter.standardInterpretationProcess.relatedDepartments'),
|
||||
@@ -256,35 +256,35 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'relatedModule_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 适用车型
|
||||
title: this.$t('workCenter.standardInterpretationProcess.applications'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'applications_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 动力类型
|
||||
title: this.$t('workCenter.standardInterpretationProcess.powerType'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'powerType_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 专业领域
|
||||
title: this.$t('workCenter.standardInterpretationProcess.professionalField'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'domainArea_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 配置需求
|
||||
title: this.$t('workCenter.standardInterpretationProcess.configurationRequirements'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'configurationRequirements_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 新认证车实施日期
|
||||
title: this.$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate'),
|
||||
@@ -375,7 +375,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'investigationStage_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // P3证明符合性的交付物名称
|
||||
title: this.$t('workCenter.standardInterpretationProcess.pThree'),
|
||||
|
||||
+31
-9
@@ -26,7 +26,7 @@
|
||||
<j-dict-select-tag dict-code="yn"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion')"
|
||||
@nameChange="(name) => nameChange(name, 'isSameAsPrevVersion')"
|
||||
@dictChange="(name) => dictChange(name, 'isSameAsPrevVersion')"
|
||||
v-decorator="['isSameAsPrevVersion']"/>
|
||||
</a-form-item>
|
||||
<!--相对上一版变化点说明-->
|
||||
@@ -60,7 +60,7 @@
|
||||
<j-multi-select-tag dict-code="key_controller"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.keyController')"
|
||||
@nameChange="(name) => nameChange(name, 'keyController')"
|
||||
@dictChange="(name) => dictChange(name, 'keyController')"
|
||||
v-decorator="['keyController']"/>
|
||||
</a-form-item>
|
||||
<!--责任部门-->
|
||||
@@ -79,7 +79,7 @@
|
||||
<j-multi-select-tag dict-code="responsible_module"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.responsibleDepartmentModule')"
|
||||
@nameChange="(name) => nameChange(name, 'responsibleModule')"
|
||||
@dictChange="(name) => dictChange(name, 'responsibleModule')"
|
||||
v-decorator="['responsibleModule']"/>
|
||||
</a-form-item>
|
||||
<!--关联部门-->
|
||||
@@ -98,7 +98,7 @@
|
||||
<j-multi-select-tag dict-code="related_module"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.relatedDepartmentsModule')"
|
||||
@nameChange="(name) => nameChange(name, 'relatedModule')"
|
||||
@dictChange="(name) => dictChange(name, 'relatedModule')"
|
||||
v-decorator="['relatedModule']"/>
|
||||
</a-form-item>
|
||||
<!--适用车型-->
|
||||
@@ -106,7 +106,7 @@
|
||||
<j-multi-select-tag dict-code="applicable_vehicle_type"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.applications')"
|
||||
@nameChange="(name) => nameChange(name, 'applications')"
|
||||
@dictChange="(name) => dictChange(name, 'applications')"
|
||||
v-decorator="['applications']"/>
|
||||
</a-form-item>
|
||||
<!--动力类型-->
|
||||
@@ -114,7 +114,7 @@
|
||||
<j-multi-select-tag dict-code="dynamic_type"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.powerType')"
|
||||
@nameChange="(name) => nameChange(name, 'powerType')"
|
||||
@dictChange="(name) => dictChange(name, 'powerType')"
|
||||
v-decorator="['powerType']"/>
|
||||
</a-form-item>
|
||||
<!--专业领域-->
|
||||
@@ -126,6 +126,7 @@
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
@change="treeNameChange($event, 'domainArea')"
|
||||
:replaceFields="{title: isChinese() ? 'title' : 'enTitle'}"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.professionalField')"/>
|
||||
</a-form-item>
|
||||
<!--配置需求-->
|
||||
@@ -133,7 +134,7 @@
|
||||
<j-multi-select-tag dict-code="configuration_requirements"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.configurationRequirements')"
|
||||
@nameChange="(name) => nameChange(name, 'configurationRequirements')"
|
||||
@dictChange="(name) => dictChange(name, 'configurationRequirements')"
|
||||
v-decorator="['configurationRequirements']"/>
|
||||
</a-form-item>
|
||||
<!--新认证车实施日期-->
|
||||
@@ -228,7 +229,7 @@
|
||||
<j-multi-select-tag dict-code="investigation_stage"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.investigationStage')"
|
||||
@nameChange="(name) => nameChange(name, 'investigationStage')"
|
||||
@dictChange="(name) => dictChange(name, 'investigationStage')"
|
||||
v-decorator="['investigationStage']"/>
|
||||
</a-form-item>
|
||||
<!--P3证明符合性的交付物名称-->
|
||||
@@ -271,6 +272,7 @@ import TreeSelection from '@comp/selection/TreeSelection'
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
import STreeSelect from '@comp/STreeSelect'
|
||||
import { getFormDictTreeList } from '@api/api'
|
||||
import { findNodeByField } from '@/utils/util'
|
||||
export default {
|
||||
name: 'InterpretationClauseTableModal',
|
||||
components: { STreeSelect, TreeSelection, StandardSelection, JMultipleDatePicker },
|
||||
@@ -346,6 +348,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 字典回显
|
||||
dictChange (dict, field) {
|
||||
console.log('字典回显', dict, field)
|
||||
if (Array.isArray(dict)) {
|
||||
this.model[field + '_dictText'] = dict.map(item => item.text).join(',')
|
||||
this.model[field + '_dictTextEn'] = dict.map(item => item.enText).join(',')
|
||||
} else if (dict) {
|
||||
this.model[field + '_dictText'] = dict.text
|
||||
this.model[field + '_dictTextEn'] = dict.enText
|
||||
} else {
|
||||
this.model[field + '_dictText'] = ''
|
||||
this.model[field + '_dictTextEn'] = ''
|
||||
}
|
||||
},
|
||||
// 下拉多选获取名称
|
||||
nameChange (name, field) {
|
||||
this.model[field + '_dictText'] = name
|
||||
@@ -355,15 +371,21 @@ export default {
|
||||
// 如果没有值就清空名字
|
||||
if (!depart) {
|
||||
this.model[field + '_dictText'] = ''
|
||||
this.model[field + '_dictTextEn'] = ''
|
||||
}
|
||||
},
|
||||
// 部门名称
|
||||
departNameChange (departList, field) {
|
||||
this.model[field + '_dictText'] = departList.map(item => item.text).join(',')
|
||||
this.model[field + '_dictTextEn'] = departList.map(item => item.text).join(',')
|
||||
},
|
||||
// 下拉树名称
|
||||
treeNameChange (list, field) {
|
||||
this.model[field + '_dictText'] = list.map(item => item.label).join(',')
|
||||
console.log('tree', list, field)
|
||||
// 通过value查找对应节点
|
||||
const nodes = list.map(item => findNodeByField(this.professionalFieldTreeList, item.value, 'value'))
|
||||
this.model[field + '_dictText'] = nodes.map(item => item.title).join(',')
|
||||
this.model[field + '_dictTextEn'] = nodes.map(item => item.enTitle).join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user