fix(测试跟踪): 缺陷列表接口调用失败取消遮罩层
This commit is contained in:
parent
fac9c3eda7
commit
b8e33d0ba4
|
@ -263,7 +263,7 @@ export function getPluginCustomFields(projectId) {
|
|||
return get(BASE_URL + `plugin/custom/fields/${projectId}`);
|
||||
}
|
||||
|
||||
export function getIssuePartTemplateWithProject(callback) {
|
||||
export function getIssuePartTemplateWithProject(callback, reject) {
|
||||
getCurrentProject().then((response) => {
|
||||
let currentProject = response.data;
|
||||
enableThirdPartTemplate(currentProject.id)
|
||||
|
@ -273,6 +273,10 @@ export function getIssuePartTemplateWithProject(callback) {
|
|||
.then((template) => {
|
||||
if (callback)
|
||||
callback(template, currentProject);
|
||||
}).catch((r) => {
|
||||
if (reject) {
|
||||
reject(r);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Promise.all([getPluginCustomFields(currentProject.id), getIssueTemplate()])
|
||||
|
|
|
@ -393,6 +393,8 @@ export default {
|
|||
.then(r => {
|
||||
this.enableThirdPartTemplate = r.data;
|
||||
});
|
||||
}, () => {
|
||||
this.result.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -301,6 +301,8 @@ export default {
|
|||
});
|
||||
getIssuePartTemplateWithProject((template) => {
|
||||
this.initFields(template);
|
||||
}, () => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
this.getIssues();
|
||||
|
@ -558,10 +560,13 @@ export default {
|
|||
checkSyncIssues(this.loading);
|
||||
} else {
|
||||
this.$success(this.$t('test_track.issue.sync_complete'));
|
||||
this.loading = false;
|
||||
|
||||
this.getIssues();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
syncIssues() {
|
||||
this.loading = true;
|
||||
|
@ -574,6 +579,8 @@ export default {
|
|||
this.loading = false;
|
||||
this.getIssues();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
editParam() {
|
||||
|
|
Loading…
Reference in New Issue