fix(测试跟踪):功能用例关联的devops需求,保存后显示异常
--bug=1022341 --user=王旭 【测试跟踪】github#21508,功能用例关联的devops需求,保存后回显为空 https://www.tapd.cn/55049933/s/1355940
This commit is contained in:
parent
6e1a573ec7
commit
a53347707a
|
@ -315,30 +315,74 @@ export default {
|
||||||
},
|
},
|
||||||
getStoryPlatform() {
|
getStoryPlatform() {
|
||||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||||
|
let optionPlatform = "";
|
||||||
if (demandOptions.length > 0) {
|
if (demandOptions.length > 0) {
|
||||||
let demand = demandOptions.find((item) => {
|
for (let i = 0; i < demandOptions.length; i++) {
|
||||||
return item.value === this.contentObject.content.demandId;
|
if (demandOptions[i].value === this.contentObject.content.demandId) {
|
||||||
|
optionPlatform = this.handleDemandOptionPlatform(demandOptions[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (demandOptions[i].children && demandOptions[i].children.length > 0) {
|
||||||
|
optionPlatform = this.findChilder(
|
||||||
|
demandOptions[i].children,
|
||||||
|
this.contentObject.content.demandId,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return optionPlatform;
|
||||||
|
},
|
||||||
|
findChilder(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.handleDemandOptionPlatform(item);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (demand) {
|
return optionPlatform;
|
||||||
return this.handleDemandOptionPlatform(demand);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
getStoryLabel() {
|
getStoryLabel() {
|
||||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||||
|
let optionPlatform = "";
|
||||||
if (demandOptions.length > 0) {
|
if (demandOptions.length > 0) {
|
||||||
let demand = demandOptions.find((item) => {
|
for (let i = 0; i < demandOptions.length; i++) {
|
||||||
return item.value === this.contentObject.content.demandId;
|
if (demandOptions[i].value === this.contentObject.content.demandId) {
|
||||||
|
optionPlatform = this.handleDemandOptionLabel(demandOptions[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (demandOptions[i].children && demandOptions[i].children.length > 0) {
|
||||||
|
optionPlatform = this.findDemandOptionLabelChilder(
|
||||||
|
demandOptions[i].children,
|
||||||
|
this.contentObject.content.demandId,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (demandOptions[i].value === "other") {
|
||||||
|
optionPlatform = this.$t("test_track.case.other");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (demand) {
|
return optionPlatform;
|
||||||
if (demand.value === "other") {
|
|
||||||
return this.$t("test_track.case.other");
|
|
||||||
}
|
|
||||||
return this.handleDemandOptionLabel(demand);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
},
|
||||||
handleDemandOptionPlatform(data) {
|
handleDemandOptionPlatform(data) {
|
||||||
if (data.platform) {
|
if (data.platform) {
|
||||||
|
|
Loading…
Reference in New Issue