fix_切换Api_Definition和Api_Automation,无法保留已打开的标签 --bug=1007800 --user=王孝刚 [Github#7580-接口测试]切换Api Definition和Api Automation,无法保留已打开的标签(1.13.2尚且有此特性) https://www.tapd.cn/55049933/s/1066585

This commit is contained in:
wxg0103 2021-11-12 10:26:03 +08:00 committed by fit2-zhao
parent 63fec6e0a2
commit 35ab38981b
2 changed files with 5 additions and 3 deletions

View File

@ -387,7 +387,6 @@ export default {
});
},
'$route'(to, from) { // ctrl s
window.location.reload();
if (to.path.indexOf('/api/definition') === -1) {
if (this.$refs && this.$refs.apiConfig) {
this.$refs.apiConfig.forEach(item => {

View File

@ -59,7 +59,7 @@
<script>
import MsTag from "@/business/components/common/components/MsTag";
import {getCurrentProjectID} from "@/common/js/utils";
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/search/search-components";
import {API_STATUS} from "@/business/components/api/definition/model/JsonData";
import ApiStatus from "@/business/components/api/definition/components/list/ApiStatus";
@ -197,9 +197,12 @@ export default {
}
},
redirect(pageType, param) {
//api
//UUID
let uuid = getUUID();
switch (pageType) {
case "api":
this.$router.push('/api/definition?resourceId=' + param)
this.$router.push('/api/definition/' + uuid + '?resourceId=' + param)
break;
case "apiCase":
this.$emit('redirectPage', 'api', 'apiTestCase', 'singleList:' + param);