fix(工作台): 修复工作台测试计划概览切换项目计划框显示的名称错误

This commit is contained in:
xinxin.wu 2024-12-24 16:30:48 +08:00 committed by Craftsman
parent fb89efa79e
commit d65206c4c2
1 changed files with 16 additions and 17 deletions

View File

@ -357,23 +357,6 @@
}
}
async function changeHandler(value: string[]) {
selectValue.value = value;
innerPlanId.value = value[value.length - 1];
innerProjectIds.value = [value[0]];
const planLevel = 3;
if (value.length === planLevel) {
innerGroupPlanId.value = value[value.length - 2];
} else {
innerGroupPlanId.value = '';
}
await nextTick();
labelPath.value = getLabelPath(innerPlanId.value);
initOverViewDetail();
emit('change');
}
async function loadMore(option: CascaderOption, done: (children?: CascaderOption[]) => void) {
try {
let testPlanOptionsNode = await getWorkTestPlanListUrl(option.value as string);
@ -419,6 +402,22 @@
}
}
async function changeHandler(value: string[]) {
selectValue.value = value;
innerPlanId.value = value[value.length - 1];
const [newProjectId] = value;
innerProjectIds.value = [newProjectId];
const planLevel = 3;
innerGroupPlanId.value = value.length === planLevel ? value[planLevel - 2] : '';
await nextTick();
refreshHandler(newProjectId);
labelPath.value = getLabelPath(innerPlanId.value);
emit('change');
}
function getSelectedParams() {
const [newProjectId] = innerProjectIds.value;
const selectedData = [newProjectId, innerGroupPlanId.value, innerPlanId.value];