refactor(接口定义): 接口定义列表,请求类型下拉框优化

--bug=1014500 --user=王孝刚 【接口测试】接口定义列表,请求类型下拉框优化
https://www.tapd.cn/55049933/s/1193658
This commit is contained in:
wxg0103 2022-07-04 11:17:19 +08:00 committed by f2c-ci-robot[bot]
parent 0eebb5289a
commit e65f0b92b3
2 changed files with 7 additions and 16 deletions

View File

@ -16,6 +16,7 @@ export function getProtocolFilter(protocolType) {
} else if (protocolType === "TCP") { } else if (protocolType === "TCP") {
return [ return [
{text: 'TCP', value: 'TCP'}, {text: 'TCP', value: 'TCP'},
{text: 'ESB', value: 'ESB'}
]; ];
} else if (protocolType === "SQL") { } else if (protocolType === "SQL") {
return [ return [
@ -23,7 +24,6 @@ export function getProtocolFilter(protocolType) {
]; ];
} else if (protocolType === "DUBBO") { } else if (protocolType === "DUBBO") {
return [ return [
{text: 'DUBBO', value: 'DUBBO'},
{text: 'dubbo://', value: 'dubbo://'}, {text: 'dubbo://', value: 'dubbo://'},
]; ];
} else { } else {

View File

@ -411,20 +411,7 @@ export default {
{text: this.$t('test_track.review.pass'), value: '通过'}, {text: this.$t('test_track.review.pass'), value: '通过'},
{text: this.$t('test_track.review.un_pass'), value: '未通过'}, {text: this.$t('test_track.review.un_pass'), value: '未通过'},
], ],
methodFilters: [ methodFilters: [],
{text: 'GET', value: 'GET'},
{text: 'POST', value: 'POST'},
{text: 'PUT', value: 'PUT'},
{text: 'PATCH', value: 'PATCH'},
{text: 'DELETE', value: 'DELETE'},
{text: 'OPTIONS', value: 'OPTIONS'},
{text: 'HEAD', value: 'HEAD'},
{text: 'CONNECT', value: 'CONNECT'},
{text: 'DUBBO', value: 'DUBBO'},
{text: 'dubbo://', value: 'dubbo://'},
{text: 'SQL', value: 'SQL'},
{text: 'TCP', value: 'TCP'},
],
userFilters: [], userFilters: [],
versionFilters: [], versionFilters: [],
valueArr: { valueArr: {
@ -521,7 +508,7 @@ export default {
this.getMaintainerOptions(); this.getMaintainerOptions();
this.getVersionOptions(); this.getVersionOptions();
this.checkVersionEnable(); this.checkVersionEnable();
this.getProtocolFilter();
// //
if (this.$route.query.resourceId) { if (this.$route.query.resourceId) {
@ -542,6 +529,7 @@ export default {
} }
}, },
currentProtocol() { currentProtocol() {
this.getProtocolFilter();
this.currentPage = 1; this.currentPage = 1;
initCondition(this.condition, false); initCondition(this.condition, false);
this.closeCaseModel(); this.closeCaseModel();
@ -568,6 +556,9 @@ export default {
}, },
}, },
methods: { methods: {
getProtocolFilter() {
this.methodFilters = getProtocolFilter(this.currentProtocol);
},
getProjectName() { getProjectName() {
this.$get('project/get/' + this.projectId, response => { this.$get('project/get/' + this.projectId, response => {
let project = response.data; let project = response.data;