feat(通用功能): 环境列表加可筛选

--story=1010818--user=郭雨琦
https://www.tapd.cn/55049933/prong/stories/view/1155049933001010818
This commit is contained in:
guoyuqi 2022-12-21 11:39:27 +08:00 committed by xiaomeinvG
parent 1768fd22d3
commit 1bf178fede
10 changed files with 11 additions and 6 deletions

View File

@ -8,7 +8,6 @@ import io.metersphere.service.definition.ApiDefinitionService;
import io.metersphere.base.domain.SwaggerUrlProject;
import io.metersphere.commons.constants.ScheduleGroup;
import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.JSON;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;

View File

@ -3,6 +3,7 @@
<div v-for="pe in data" :key="pe.id" style="margin-left: 20px">
<el-select
v-model="pe['selectEnv']"
filterable
:placeholder="$t('workspace.env_group.please_select_env')"
style="margin-top: 8px; width: 200px"
size="small">

View File

@ -40,6 +40,7 @@
:placeholder="$t('api_test.environment.select_environment')"
style="margin-top: 8px; width: 100%"
size="small"
filterable
@change="chooseEnv">
<el-option
v-for="(environment, index) in pe.envs"

View File

@ -7,6 +7,7 @@
class="environment-select"
:placeholder="$t('api_test.definition.request.run_env')"
clearable
filterable
@clear="clear">
<el-option
v-for="(environment, key) in environments"

View File

@ -5,6 +5,7 @@
size="small"
class="ms-htt-width"
:placeholder="$t('api_test.definition.request.run_env')"
filterable
@change="environmentChange"
clearable>
<el-option

View File

@ -1,6 +1,6 @@
<template>
<span>
<el-select :disabled="isReadOnly" v-model="environmentId" size="small" class="environment-select"
<el-select :disabled="isReadOnly" v-model="environmentId" size="small" class="environment-select" filterable
:placeholder="$t('api_test.definition.request.run_env')" clearable @clear="clear">
<el-option v-for="(environment, key) in environments" :key="key"
:label="environment.name"

View File

@ -1,6 +1,6 @@
<template>
<span>
<el-select :disabled="isReadOnly" v-model="environmentId" size="small" class="environment-select"
<el-select :disabled="isReadOnly" v-model="environmentId" size="small" class="environment-select" filterable
:placeholder="$t('api_test.definition.request.run_env')" clearable @clear="clear">
<el-option v-for="(environment, key) in environments" :key="key"
:label="environment.name"

View File

@ -1,7 +1,7 @@
<template>
<div v-loading="result.loading">
<div v-for="pe in data" :key="pe.id" style="margin-left: 20px;">
<el-select v-model="pe['selectEnv']" :placeholder="$t('api_test.environment.select_environment')"
<el-select v-model="pe['selectEnv']" filterable :placeholder="$t('api_test.environment.select_environment')"
style="margin-top: 8px;width: 200px;" size="small">
<el-option v-for="(environment, index) in pe.envs" :key="index"
:label="environment.name"

View File

@ -18,7 +18,8 @@
</el-radio-group>
<el-tag v-show="!pe.showEnvSelect" v-for="(itemName,index) in selectedEnvName.get(pe.id)" :key="index" size="mini"
style="margin-left: 0; margin-right: 2px;margin-top: 8px">{{ itemName }}</el-tag>
<el-select v-show="pe.showEnvSelect" v-model="pe['selectEnv']" :placeholder="$t('api_test.environment.select_environment')"
<el-select v-show="pe.showEnvSelect" v-model="pe['selectEnv']" filterable
:placeholder="$t('api_test.environment.select_environment')"
style="margin-top: 8px;width: 100%;" size="small" @change="chooseEnv">
<el-option v-for="(environment, index) in pe.envs" :key="index"
:label="environment.name"

View File

@ -1,7 +1,8 @@
<template>
<div v-loading="result.loading">
<div v-for="pe in data" :key="pe.id" style="margin-left: 20px;">
<el-select v-model="pe['selectEnv']" :placeholder="$t('workspace.env_group.please_select_env')" style="margin-top: 8px;width: 200px;" size="small">
<el-select v-model="pe['selectEnv']" filterable :placeholder="$t('workspace.env_group.please_select_env')"
style="margin-top: 8px;width: 200px;" size="small">
<el-option v-for="(environment, index) in pe.envs" :key="index"
:label="environment.name"
:value="environment.id"/>