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 5e276b6426
commit 41ab6604dc
1 changed files with 6 additions and 3 deletions

View File

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