fix(接口定义,接口自动化): 点击树节点 ,右侧Tab恢复到列表页面

This commit is contained in:
fit2-zhao 2021-03-23 19:37:48 +08:00
parent 41c46740b3
commit c02b8dff1b
2 changed files with 142 additions and 136 deletions

View File

@ -133,6 +133,9 @@
}); });
} }
} }
},
selectNodeIds() {
this.activeName = "default";
} }
}, },
methods: { methods: {

View File

@ -126,27 +126,27 @@
</div> </div>
</template> </template>
<script> <script>
import MsApiList from './components/list/ApiList'; import MsApiList from './components/list/ApiList';
import MsContainer from "../../common/components/MsContainer"; import MsContainer from "../../common/components/MsContainer";
import MsMainContainer from "../../common/components/MsMainContainer"; import MsMainContainer from "../../common/components/MsMainContainer";
import MsAsideContainer from "../../common/components/MsAsideContainer"; import MsAsideContainer from "../../common/components/MsAsideContainer";
import MsApiConfig from "./components/ApiConfig"; import MsApiConfig from "./components/ApiConfig";
import MsDebugHttpPage from "./components/debug/DebugHttpPage"; import MsDebugHttpPage from "./components/debug/DebugHttpPage";
import MsDebugJdbcPage from "./components/debug/DebugJdbcPage"; import MsDebugJdbcPage from "./components/debug/DebugJdbcPage";
import MsDebugTcpPage from "./components/debug/DebugTcpPage"; import MsDebugTcpPage from "./components/debug/DebugTcpPage";
import MsDebugDubboPage from "./components/debug/DebugDubboPage"; import MsDebugDubboPage from "./components/debug/DebugDubboPage";
import MsRunTestHttpPage from "./components/runtest/RunTestHTTPPage"; import MsRunTestHttpPage from "./components/runtest/RunTestHTTPPage";
import MsRunTestTcpPage from "./components/runtest/RunTestTCPPage"; import MsRunTestTcpPage from "./components/runtest/RunTestTCPPage";
import MsRunTestSqlPage from "./components/runtest/RunTestSQLPage"; import MsRunTestSqlPage from "./components/runtest/RunTestSQLPage";
import MsRunTestDubboPage from "./components/runtest/RunTestDubboPage"; import MsRunTestDubboPage from "./components/runtest/RunTestDubboPage";
import {checkoutTestManagerOrTestUser, getCurrentUser, getUUID} from "@/common/js/utils"; import {checkoutTestManagerOrTestUser, getCurrentUser, getUUID} from "@/common/js/utils";
import MsApiModule from "./components/module/ApiModule"; import MsApiModule from "./components/module/ApiModule";
import ApiCaseSimpleList from "./components/list/ApiCaseSimpleList"; import ApiCaseSimpleList from "./components/list/ApiCaseSimpleList";
import ApiDocumentsPage from "@/business/components/api/definition/components/list/ApiDocumentsPage"; import ApiDocumentsPage from "@/business/components/api/definition/components/list/ApiDocumentsPage";
import MsTableButton from "@/business/components/common/components/MsTableButton"; import MsTableButton from "@/business/components/common/components/MsTableButton";
import MsTabButton from "@/business/components/common/components/MsTabButton"; import MsTabButton from "@/business/components/common/components/MsTabButton";
export default { export default {
name: "ApiDefinition", name: "ApiDefinition",
@ -157,7 +157,7 @@ import MsTabButton from "@/business/components/common/components/MsTabButton";
this.changeRedirectParam(redirectIDParam); this.changeRedirectParam(redirectIDParam);
return routeParam; return routeParam;
}, },
isReadOnly(){ isReadOnly() {
return !checkoutTestManagerOrTestUser(); return !checkoutTestManagerOrTestUser();
}, },
projectId() { projectId() {
@ -221,6 +221,9 @@ import MsTabButton from "@/business/components/common/components/MsTabButton";
currentProtocol() { currentProtocol() {
this.handleCommand("CLOSE_ALL"); this.handleCommand("CLOSE_ALL");
}, },
selectNodeIds() {
this.apiDefaultTab = "default";
},
redirectID() { redirectID() {
this.renderComponent = false; this.renderComponent = false;
this.$nextTick(() => { this.$nextTick(() => {