|
|
@ -19,7 +19,9 @@ |
|
|
|
no-options-text="无数据" |
|
|
|
@select="selectTree" |
|
|
|
@open="openTree(item)" |
|
|
|
/> |
|
|
|
> |
|
|
|
<div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div> |
|
|
|
</treeselect> |
|
|
|
<!-- text / number / textarea / popover --> |
|
|
|
<!-- :validate-event="isDisabled" --> |
|
|
|
<el-input |
|
|
@ -170,6 +172,15 @@ export default { |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// 处理vue-treeSelect回显出现unknown问题 |
|
|
|
getAutoNameUnknown(name) { |
|
|
|
if (name.lastIndexOf('unknown') > -1) { |
|
|
|
// 当treeselect翻译不了值时,name中有id,截取id,去调接口或者字典查询出名字 |
|
|
|
return name.split('(')[0] |
|
|
|
} else { |
|
|
|
return name |
|
|
|
} |
|
|
|
}, |
|
|
|
getNode(list, dicName) { |
|
|
|
let data; |
|
|
|
(list || []).map(item => { |
|
|
@ -196,7 +207,7 @@ export default { |
|
|
|
await FetchFindAllSubsetById({ id: fieldInfo.dictionaryConfigId.id }).then(res => { |
|
|
|
const option = this.getNode(res, this.addOrUpdateForm[val.fieldName]) |
|
|
|
if (option) { |
|
|
|
string += '' + option[0].dicCode + val.connector |
|
|
|
string += '' + option[0].dicName + val.connector |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|