fix: 编辑相同用例只开一个tab
This commit is contained in:
parent
4bfb95e0d3
commit
049eddd540
|
@ -429,6 +429,8 @@ export default {
|
|||
this.$refs.nodeTree.decrease(id);
|
||||
},
|
||||
editTestCase(testCase) {
|
||||
const index = this.tabs.find(p => p.testCaseInfo && p.testCaseInfo.id === testCase.id);
|
||||
if (!index) {
|
||||
this.type = "edit";
|
||||
this.testCaseReadOnly = false;
|
||||
if (testCase.label !== "redirect") {
|
||||
|
@ -440,6 +442,9 @@ export default {
|
|||
let hasEditPermission = hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
|
||||
this.$set(testCase, 'rowClickHasPermission', hasEditPermission);
|
||||
this.addTab({name: 'edit', testCaseInfo: testCase});
|
||||
} else {
|
||||
this.activeName = index.name;
|
||||
}
|
||||
},
|
||||
handleCaseCreateOrEdit(data, type) {
|
||||
if (this.$refs.minder) {
|
||||
|
|
Loading…
Reference in New Issue