fix(测试跟踪): 公共用例库列表跳转bug

--bug=1009041 --user=王孝刚 公共用例库列表跳转bug
https://www.tapd.cn/55049933/s/1089345
This commit is contained in:
wxg0103 2022-01-04 10:29:02 +08:00 committed by 刘瑞斌
parent 7d05f30c91
commit 13f6f50918
2 changed files with 16 additions and 4 deletions

View File

@ -13,6 +13,7 @@
@refreshAll="refreshAll"
@enableTrash="enableTrash"
@enablePublic="enablePublic"
@toPublic="toPublic"
:type="'edit'"
:total='total'
:public-total="publicTotal"
@ -182,6 +183,7 @@ import TestCaseMinder from "@/business/components/track/common/minder/TestCaseMi
import IsChangeConfirm from "@/business/components/common/components/IsChangeConfirm";
import {openMinderConfirm, saveMinderConfirm} from "@/business/components/track/common/minder/minderUtils";
import TestCaseEditShow from "@/business/components/track/case/components/TestCaseEditShow";
export default {
name: "TestCase",
components: {
@ -219,9 +221,9 @@ export default {
mounted() {
this.getProject();
let routeTestCase = this.$route.params.testCase;
if(routeTestCase && routeTestCase.add===true){
if (routeTestCase && routeTestCase.add === true) {
this.addTab({name: 'add'});
}else {
} else {
this.init(this.$route);
}
},
@ -451,9 +453,9 @@ export default {
this.$warning(this.$t('commons.check_project_tip'));
return;
}
if(routeTestCase){
if (routeTestCase) {
this.editTestCase(routeTestCase);
}else if (caseId) {
} else if (caseId) {
this.$get('test/case/get/' + caseId, response => {
let testCase = response.data;
this.editTestCase(testCase);
@ -608,6 +610,14 @@ export default {
this.initApiTableOpretion = "publicEnable";
this.publicEnable = data;
},
toPublic(data) {
if (data === 'public') {
this.activeName = "public"
} else {
this.activeName = "trash"
}
}
}
};
</script>

View File

@ -148,10 +148,12 @@ export default {
enableTrash() {
this.condition.trashEnable = true;
this.$emit('enableTrash', this.condition.trashEnable);
this.$emit('toPublic', 'trash');
},
enablePublic() {
this.condition.publicEnable = true;
this.$emit('enablePublic', this.condition.publicEnable);
this.$emit('toPublic', 'public');
},
list() {
if (this.projectId) {