fix(接口测试): 修复首页跳转到协议与数据不符的缺陷

--bug=1020480 --user=王孝刚 【接口测试】github
#20341接口测试首页-未覆盖链接无法根据协议类型准确筛选并显示,很容易造成误解
https://www.tapd.cn/55049933/s/1352183
This commit is contained in:
wxg0103 2023-03-17 15:13:28 +08:00 committed by 建国
parent e3921882cf
commit cc208efdfb
1 changed files with 6 additions and 3 deletions

View File

@ -579,10 +579,11 @@ export default {
this.condition.orders = getLastTableSortField(this.tableHeaderKey);
// tab
this.condition.versionId = this.currentVersion;
let protocol;
if (this.$route && this.$route.params && this.$route.params.type) {
this.condition.protocol = this.$route.params.type;
protocol = this.$route.params.type;
}
this.initTable();
this.initTable(protocol);
this.getMaintainerOptions();
this.getVersionOptions();
this.checkVersionEnable();
@ -696,7 +697,9 @@ export default {
this.selectDataCounts = 0;
this.condition.moduleIds = this.selectNodeIds;
this.condition.projectId = this.projectId;
if (this.currentProtocol != null) {
if (currentProtocol && ["HTTP", "DUBBO", "SQL", "TCP"].includes(currentProtocol)) {
this.condition.protocol = currentProtocol;
}else if (this.currentProtocol != null) {
this.condition.protocol = this.currentProtocol;
}
this.enableOrderDrag = !(this.condition.orders && this.condition.orders.length > 0);