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

View File

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