refactor(接口测试): 默认环境去除详情展示
--bug=1028768 --user=赵勇 【接口测试】场景列表-批量执行-默认环境展示了环境明细 https://www.tapd.cn/55049933/s/1403943 Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
7c5367234e
commit
1d6e4ef4a8
|
@ -2,7 +2,9 @@
|
|||
<div>
|
||||
<el-radio-group v-model="radio" style="width: 100%" @change="radioChange" class="radio-change">
|
||||
<el-radio :label="ENV_TYPE.JSON">{{ $t('workspace.env_group.env_list') }}</el-radio>
|
||||
<el-radio :label="ENV_TYPE.GROUP" v-if="isScenario">{{ $t('workspace.env_group.name') }}<i class="el-icon-tickets mode-span" @click="viewGroup"></i></el-radio>
|
||||
<el-radio :label="ENV_TYPE.GROUP" v-if="isScenario"
|
||||
>{{ $t('workspace.env_group.name') }}<i class="el-icon-tickets mode-span" @click="viewGroup"></i
|
||||
></el-radio>
|
||||
</el-radio-group>
|
||||
<div v-for="(pe, pIndex) in eventData" :key="pe.id" v-show="!radio || radio === ENV_TYPE.JSON">
|
||||
<el-card shadow="never" style="margin-top: 8px; background: #f5f6f7; border-radius: 4px">
|
||||
|
@ -26,14 +28,6 @@
|
|||
$t('api_test.environment.choose_new_environment')
|
||||
}}</el-radio>
|
||||
</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']"
|
||||
|
@ -53,9 +47,16 @@
|
|||
</div>
|
||||
<div v-show="radio === ENV_TYPE.GROUP">
|
||||
<div>
|
||||
<el-select v-show="!hasOptionGroup" v-model="envGroupId" :placeholder="$t('workspace.env_group.select')" @change="chooseEnvGroup"
|
||||
style="margin-top: 8px;width: 100%;" size="small">
|
||||
<el-option v-for="(group, index) in groups" :key="index"
|
||||
<el-select
|
||||
v-show="!hasOptionGroup"
|
||||
v-model="envGroupId"
|
||||
:placeholder="$t('workspace.env_group.select')"
|
||||
@change="chooseEnvGroup"
|
||||
style="margin-top: 8px; width: 100%"
|
||||
size="small">
|
||||
<el-option
|
||||
v-for="(group, index) in groups"
|
||||
:key="index"
|
||||
:disabled="group.disabled"
|
||||
:label="group.name"
|
||||
:value="group.id" />
|
||||
|
@ -64,7 +65,7 @@
|
|||
v-show="hasOptionGroup"
|
||||
v-model="envGroupId"
|
||||
:placeholder="$t('workspace.env_group.select')"
|
||||
style="margin-top: 8px;width: 100%;"
|
||||
style="margin-top: 8px; width: 100%"
|
||||
size="small"
|
||||
@change="chooseEnvGroup"
|
||||
clearable>
|
||||
|
@ -79,18 +80,18 @@
|
|||
</el-option-group>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-dialog :visible="visible" append-to-body :title="$t('workspace.env_group.name')" @close="visible = false"
|
||||
style="height: 800px;">
|
||||
<el-dialog
|
||||
:visible="visible"
|
||||
append-to-body
|
||||
:title="$t('workspace.env_group.name')"
|
||||
@close="visible = false"
|
||||
style="height: 800px">
|
||||
<template>
|
||||
<environment-group style="overflow-y: auto;"
|
||||
:screen-height="'350px'"
|
||||
:read-only="true"
|
||||
></environment-group>
|
||||
<environment-group style="overflow-y: auto" :screen-height="'350px'" :read-only="true"></environment-group>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!-- 对环境组选项进行分类 可用|不可用 -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -101,7 +102,7 @@ import MsTag from 'metersphere-frontend/src/components/MsTag';
|
|||
import { parseEnvironment } from 'metersphere-frontend/src/model/EnvironmentModel';
|
||||
import { getEnvironmentByProjectId } from '@/api/api-environment';
|
||||
import EnvironmentGroup from '@/business/commons/EnvironmentGroupList';
|
||||
import EnvGroupWithOption from "@/business/automation/scenario/EnvGroupWithOption";
|
||||
import EnvGroupWithOption from '@/business/automation/scenario/EnvGroupWithOption';
|
||||
|
||||
export default {
|
||||
name: 'EnvSelectPopover',
|
||||
|
@ -171,7 +172,7 @@ export default {
|
|||
this.getgroups();
|
||||
},
|
||||
chooseEnvGroup(envGroupId) {
|
||||
this.$emit("setEnvGroup", envGroupId);
|
||||
this.$emit('setEnvGroup', envGroupId);
|
||||
},
|
||||
radioChange(val) {
|
||||
this.$emit('update:environmentType', val);
|
||||
|
@ -280,7 +281,6 @@ export default {
|
|||
this.eventData[index].expendStatus = 'open';
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue