fix: 场景步骤展示项目名改成跨项目的

This commit is contained in:
wenyann 2021-05-13 19:12:30 +08:00 committed by 刘瑞斌
parent d9dbae7dab
commit 6d908c9eb7
2 changed files with 20 additions and 8 deletions

View File

@ -214,16 +214,19 @@
},
isCustomizeReq() {
if (this.request.referenced == undefined || this.request.referenced === 'Created') {
return true
return true;
}
return false;
},
isDeletedOrRef() {
if (this.request.referenced != undefined && this.request.referenced === 'Deleted' || this.request.referenced === 'REF') {
return true
return true;
}
return false;
},
projectId() {
return this.$store.state.projectId;
},
},
methods: {
getEnvironments() {
@ -351,8 +354,11 @@
})
},
getProjectName(id) {
const project = this.projectList.find(p => p.id === id);
return project ? project.name : "";
if (this.projectId !== id) {
const project = this.projectList.find(p => p.id === id);
return project ? project.name : "";
}
}
}
}

View File

@ -98,10 +98,13 @@
computed: {
isDeletedOrRef() {
if (this.scenario.referenced != undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') {
return true
return true;
}
return false;
}
},
projectId() {
return this.$store.state.projectId;
},
},
methods: {
remove() {
@ -155,8 +158,11 @@
}
},
getProjectName(id) {
const project = this.projectList.find(p => p.id === id);
return project ? project.name : "";
if (this.projectId !== id) {
const project = this.projectList.find(p => p.id === id);
return project ? project.name : "";
}
}
}
}