fix: 工作空间无项目时报错

This commit is contained in:
chenjianxing 2021-03-24 22:21:51 +08:00
parent 6dd49752fc
commit f80f6c74d1
3 changed files with 13 additions and 9 deletions

View File

@ -64,10 +64,11 @@ export default {
},
methods: {
search() {
let projectID = this.projectId;
this.result = this.$get("/api/faliureCaseAboutTestPlan/"+projectID+"/10", response => {
if (this.projectId) {
this.result = this.$get("/api/faliureCaseAboutTestPlan/"+ this.projectId +"/10", response => {
this.tableData = response.data;
});
}
},
redirect(pageType,param){
switch (pageType){

View File

@ -88,10 +88,11 @@ export default {
methods: {
search() {
let projectID = this.projectId;
this.result = this.$get("/api/runningTask/"+projectID+"/"+this.callFrom, response => {
if (this.projectId) {
this.result = this.$get("/api/runningTask/"+ this.projectId +"/"+this.callFrom, response => {
this.tableData = response.data;
});
}
},
closeTaskConfirm(row){

View File

@ -120,7 +120,9 @@ export default {
},
init() {
let selectProjectId = this.projectId;
if (!selectProjectId) {
return;
}
this.$get("/track/count/" + selectProjectId, response => {
this.trackCountData = response.data;
});