fix(测试跟踪): 关联需求缺少other选项

--bug=1023703 --user=陈建星 【测试跟踪】功能用例编辑页面,关联需求,不展示默认的other需求了 https://www.tapd.cn/55049933/s/1341502
This commit is contained in:
chenjianxing 2023-02-22 21:15:38 +08:00 committed by jianxing
parent a2adda8bf9
commit 73af1062a7

View File

@ -629,18 +629,21 @@ export default {
issueDemandList(this.projectId)
.then((r) => {
this.demandOptions = [];
this.demandList = r.data;
if (r.data) {
this.demandList = r.data;
}
this.buildDemandOptions();
})
.catch(() => {
.catch((r) => {
this.demandOptions = [];
this.addOtherOption();
});
}
},
buildDemandOptions() {
this.demandOptions = [];
this.addOtherOption();
if (this.demandList.length > 0) {
this.addOtherOption();
this.buildDemandCascaderOptions(this.demandList, this.demandOptions, []);
}
},