refactor(测试计划): 测试规划脑图-用例数节点和测试点节点的区分

This commit is contained in:
teukkk 2024-10-18 17:03:10 +08:00 committed by Craftsman
parent 9b53716bac
commit 222606dbb5
1 changed files with 9 additions and 8 deletions

View File

@ -622,8 +622,9 @@
const node: PlanMinderNode = window.minder.getSelectedNode();
let associateType: string = '';
let nodeDataType = node?.data?.type;
if (!extraVisible.value) {
//
const isCaseCountTag = node.data?.resource?.[0] === caseCountTag;
if (isCaseCountTag) {
//
nodeDataType = node?.parent?.data?.type;
}
if (nodeDataType === PlanMinderCollectionType.SCENARIO) {
@ -631,8 +632,8 @@
} else {
associateType = param?.associateType ?? nodeDataType;
}
if (extraVisible.value) {
//
if (!isCaseCountTag) {
//
node.data.associateDTOS = [
{
...cloneDeep(param),
@ -640,7 +641,7 @@
},
];
} else if (node.parent?.data) {
//
//
node.parent.data.associateDTOS = [
{
...cloneDeep(param),
@ -677,10 +678,10 @@
*/
function associateCase() {
const node: PlanMinderNode = window.minder.getSelectedNode();
if (extraVisible.value) {
activePlanSet.value = node;
} else if (node.parent) {
if (node.data?.resource?.[0] === caseCountTag) {
activePlanSet.value = node.parent as PlanMinderNode;
} else {
activePlanSet.value = node;
}
currentSelectCase.value = (activePlanSet.value?.data.type as unknown as CaseLinkEnum) || CaseLinkEnum.FUNCTIONAL;
setCaseSelectedSet();