行业培训类型组件编辑bug修改

dev
wangpeng 2024-04-18 11:50:11 +08:00
parent afcf3545dd
commit 2be771dd52
1 changed files with 3 additions and 3 deletions

View File

@ -93,16 +93,16 @@ const getCurrentNode = () => {
if (props.type !== "industryType") { if (props.type !== "industryType") {
if (data.value.length === 0) return {}; if (data.value.length === 0) return {};
for (let i = 0; i < data.value.length; i++) { for (let i = 0; i < data.value.length; i++) {
if (data.value[i][keys[props.type]] === props.modelValue) { if (data.value[i][keys[props.type]] === modelValue.value) {
return data.value[i]; return data.value[i];
} }
} }
} }
return treeSelectRef.value.getCurrentNode(); return treeSelectRef.value.getCurrentNode();
}; };
const getNode = (value = getCurrentNode()) => { const getNode = () => {
if (props.type !== "industryType") return ""; if (props.type !== "industryType") return "";
return treeSelectRef.value.getNode(getCurrentNode(value)); return treeSelectRef.value.getNode(getCurrentNode() || modelValue.value);
}; };
const getIndustryTypeCurrentCheckAll = () => { const getIndustryTypeCurrentCheckAll = () => {
const name = []; const name = [];