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>
|
<div>
|
||||||
<el-radio-group v-model="radio" style="width: 100%" @change="radioChange" class="radio-change">
|
<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.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>
|
</el-radio-group>
|
||||||
<div v-for="(pe, pIndex) in eventData" :key="pe.id" v-show="!radio || radio === ENV_TYPE.JSON">
|
<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">
|
<el-card shadow="never" style="margin-top: 8px; background: #f5f6f7; border-radius: 4px">
|
||||||
|
@ -26,14 +28,6 @@
|
||||||
$t('api_test.environment.choose_new_environment')
|
$t('api_test.environment.choose_new_environment')
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</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
|
<el-select
|
||||||
v-show="pe.showEnvSelect"
|
v-show="pe.showEnvSelect"
|
||||||
v-model="pe['selectEnv']"
|
v-model="pe['selectEnv']"
|
||||||
|
@ -53,9 +47,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="radio === ENV_TYPE.GROUP">
|
<div v-show="radio === ENV_TYPE.GROUP">
|
||||||
<div>
|
<div>
|
||||||
<el-select v-show="!hasOptionGroup" v-model="envGroupId" :placeholder="$t('workspace.env_group.select')" @change="chooseEnvGroup"
|
<el-select
|
||||||
style="margin-top: 8px;width: 100%;" size="small">
|
v-show="!hasOptionGroup"
|
||||||
<el-option v-for="(group, index) in groups" :key="index"
|
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"
|
:disabled="group.disabled"
|
||||||
:label="group.name"
|
:label="group.name"
|
||||||
:value="group.id" />
|
:value="group.id" />
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
v-show="hasOptionGroup"
|
v-show="hasOptionGroup"
|
||||||
v-model="envGroupId"
|
v-model="envGroupId"
|
||||||
:placeholder="$t('workspace.env_group.select')"
|
:placeholder="$t('workspace.env_group.select')"
|
||||||
style="margin-top: 8px;width: 100%;"
|
style="margin-top: 8px; width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
@change="chooseEnvGroup"
|
@change="chooseEnvGroup"
|
||||||
clearable>
|
clearable>
|
||||||
|
@ -79,18 +80,18 @@
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible="visible" append-to-body :title="$t('workspace.env_group.name')" @close="visible = false"
|
<el-dialog
|
||||||
style="height: 800px;">
|
:visible="visible"
|
||||||
|
append-to-body
|
||||||
|
:title="$t('workspace.env_group.name')"
|
||||||
|
@close="visible = false"
|
||||||
|
style="height: 800px">
|
||||||
<template>
|
<template>
|
||||||
<environment-group style="overflow-y: auto;"
|
<environment-group style="overflow-y: auto" :screen-height="'350px'" :read-only="true"></environment-group>
|
||||||
:screen-height="'350px'"
|
|
||||||
:read-only="true"
|
|
||||||
></environment-group>
|
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<!-- 对环境组选项进行分类 可用|不可用 -->
|
<!-- 对环境组选项进行分类 可用|不可用 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -101,7 +102,7 @@ import MsTag from 'metersphere-frontend/src/components/MsTag';
|
||||||
import { parseEnvironment } from 'metersphere-frontend/src/model/EnvironmentModel';
|
import { parseEnvironment } from 'metersphere-frontend/src/model/EnvironmentModel';
|
||||||
import { getEnvironmentByProjectId } from '@/api/api-environment';
|
import { getEnvironmentByProjectId } from '@/api/api-environment';
|
||||||
import EnvironmentGroup from '@/business/commons/EnvironmentGroupList';
|
import EnvironmentGroup from '@/business/commons/EnvironmentGroupList';
|
||||||
import EnvGroupWithOption from "@/business/automation/scenario/EnvGroupWithOption";
|
import EnvGroupWithOption from '@/business/automation/scenario/EnvGroupWithOption';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnvSelectPopover',
|
name: 'EnvSelectPopover',
|
||||||
|
@ -171,7 +172,7 @@ export default {
|
||||||
this.getgroups();
|
this.getgroups();
|
||||||
},
|
},
|
||||||
chooseEnvGroup(envGroupId) {
|
chooseEnvGroup(envGroupId) {
|
||||||
this.$emit("setEnvGroup", envGroupId);
|
this.$emit('setEnvGroup', envGroupId);
|
||||||
},
|
},
|
||||||
radioChange(val) {
|
radioChange(val) {
|
||||||
this.$emit('update:environmentType', val);
|
this.$emit('update:environmentType', val);
|
||||||
|
@ -280,7 +281,6 @@ export default {
|
||||||
this.eventData[index].expendStatus = 'open';
|
this.eventData[index].expendStatus = 'open';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue