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}`);
|
return get(BASE_URL + `plugin/custom/fields/${projectId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getIssuePartTemplateWithProject(callback) {
|
export function getIssuePartTemplateWithProject(callback, reject) {
|
||||||
getCurrentProject().then((response) => {
|
getCurrentProject().then((response) => {
|
||||||
let currentProject = response.data;
|
let currentProject = response.data;
|
||||||
enableThirdPartTemplate(currentProject.id)
|
enableThirdPartTemplate(currentProject.id)
|
||||||
|
@ -273,6 +273,10 @@ export function getIssuePartTemplateWithProject(callback) {
|
||||||
.then((template) => {
|
.then((template) => {
|
||||||
if (callback)
|
if (callback)
|
||||||
callback(template, currentProject);
|
callback(template, currentProject);
|
||||||
|
}).catch((r) => {
|
||||||
|
if (reject) {
|
||||||
|
reject(r);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Promise.all([getPluginCustomFields(currentProject.id), getIssueTemplate()])
|
Promise.all([getPluginCustomFields(currentProject.id), getIssueTemplate()])
|
||||||
|
|
|
@ -393,6 +393,8 @@ export default {
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.enableThirdPartTemplate = r.data;
|
this.enableThirdPartTemplate = r.data;
|
||||||
});
|
});
|
||||||
|
}, () => {
|
||||||
|
this.result.loading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -301,6 +301,8 @@ export default {
|
||||||
});
|
});
|
||||||
getIssuePartTemplateWithProject((template) => {
|
getIssuePartTemplateWithProject((template) => {
|
||||||
this.initFields(template);
|
this.initFields(template);
|
||||||
|
}, () => {
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.getIssues();
|
this.getIssues();
|
||||||
|
@ -558,9 +560,12 @@ export default {
|
||||||
checkSyncIssues(this.loading);
|
checkSyncIssues(this.loading);
|
||||||
} else {
|
} else {
|
||||||
this.$success(this.$t('test_track.issue.sync_complete'));
|
this.$success(this.$t('test_track.issue.sync_complete'));
|
||||||
this.loading = false;
|
|
||||||
this.getIssues();
|
this.getIssues();
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
syncIssues() {
|
syncIssues() {
|
||||||
|
@ -574,6 +579,8 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getIssues();
|
this.getIssues();
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editParam() {
|
editParam() {
|
||||||
|
|
Loading…
Reference in New Issue