fix(测试跟踪):修复功能用例关联devops后,级联选择保存后回显为空
--bug=1022341 --user=王旭 【测试跟踪】github#21508,功能用例关联的devops需求,保存后回显为空 https://www.tapd.cn/55049933/s/1355940
This commit is contained in:
parent
d422ccaa84
commit
c832362985
|
@ -313,8 +313,10 @@ export default {
|
|||
return this.contentObject.content.defaultValue;
|
||||
}
|
||||
},
|
||||
getStoryPlatform() {
|
||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||
getStoryPlatform(demandOptions) {
|
||||
if (!demandOptions) {
|
||||
demandOptions = this.contentObject.content.demandOptions || [];
|
||||
}
|
||||
let optionPlatform = "";
|
||||
if (demandOptions.length > 0) {
|
||||
for (let i = 0; i < demandOptions.length; i++) {
|
||||
|
@ -323,7 +325,7 @@ export default {
|
|||
break;
|
||||
}
|
||||
if (demandOptions[i].children && demandOptions[i].children.length > 0) {
|
||||
optionPlatform = this.findChilder(
|
||||
optionPlatform = this.getStoryPlatform(
|
||||
demandOptions[i].children,
|
||||
this.contentObject.content.demandId,
|
||||
);
|
||||
|
@ -332,23 +334,10 @@ export default {
|
|||
}
|
||||
return optionPlatform;
|
||||
},
|
||||
findChilder(data, demandId) {
|
||||
let optionPlatform = "";
|
||||
if (data.children && data.children.length > 0) {
|
||||
this.findChilder(
|
||||
data.children,
|
||||
demandId
|
||||
);
|
||||
getStoryLabel(demandOptions) {
|
||||
if (!demandOptions) {
|
||||
demandOptions = this.contentObject.content.demandOptions || [];
|
||||
}
|
||||
data.forEach((item) => {
|
||||
if (item.value === demandId) {
|
||||
optionPlatform = this.handleDemandOptionPlatform(item);
|
||||
}
|
||||
});
|
||||
return optionPlatform;
|
||||
},
|
||||
getStoryLabel() {
|
||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||
let optionPlatform = "";
|
||||
if (demandOptions.length > 0) {
|
||||
for (let i = 0; i < demandOptions.length; i++) {
|
||||
|
@ -357,7 +346,7 @@ export default {
|
|||
break;
|
||||
}
|
||||
if (demandOptions[i].children && demandOptions[i].children.length > 0) {
|
||||
optionPlatform = this.findDemandOptionLabelChilder(
|
||||
optionPlatform = this.getStoryLabel(
|
||||
demandOptions[i].children,
|
||||
this.contentObject.content.demandId,
|
||||
);
|
||||
|
@ -369,21 +358,6 @@ export default {
|
|||
}
|
||||
return optionPlatform;
|
||||
},
|
||||
findDemandOptionLabelChilder(data, demandId) {
|
||||
let optionPlatform = "";
|
||||
if (data.children && data.children.length > 0) {
|
||||
this.findChilder(
|
||||
data.children,
|
||||
demandId
|
||||
);
|
||||
}
|
||||
data.forEach((item) => {
|
||||
if (item.value === demandId) {
|
||||
optionPlatform = this.handleDemandOptionLabel(item);
|
||||
}
|
||||
});
|
||||
return optionPlatform;
|
||||
},
|
||||
handleDemandOptionPlatform(data) {
|
||||
if (data.platform) {
|
||||
return data.platform;
|
||||
|
|
Loading…
Reference in New Issue