fix(UI自动化): 调整有关UI的环境配置

--bug=1020932 --user=张大海 【UI测试】项目设置-项目环境里,编辑环境信息-http配置,接口的添加按钮挪到外面 https://www.tapd.cn/55049933/s/1316679
--bug=1020941 --user=张大海 【系统设置】环境管理-通用配置-类型下拉未展示UI变量类型 https://www.tapd.cn/55049933/s/1316680
This commit is contained in:
zhangdahai112 2022-12-19 00:34:20 +08:00 committed by zhangdahai112
parent 5658718cdb
commit 185f8e0117
2 changed files with 46 additions and 21 deletions

View File

@ -118,9 +118,9 @@
<template slot-scope="scope">
<el-select
v-model="scope.row.type"
v-if="!scope.row.scope || scope.row.scope == 'api'"
:placeholder="$t('commons.please_select')"
size="mini"
@change="changeType(scope.row)"
>
<el-option
v-for="item in typeSelectOptions"
@ -129,6 +129,20 @@
:value="item.value"
/>
</el-select>
<el-select
v-else
v-model="scope.row.type"
:placeholder="$t('commons.please_select')"
size="mini"
>
<el-option
v-for="item in uiTypeSelectOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</ms-table-column>
@ -271,6 +285,12 @@ export default {
{value: "COUNTER", label: this.$t("api_test.automation.counter")},
{value: "RANDOM", label: this.$t("api_test.automation.random")},
],
uiTypeSelectOptions: [
{value: "STRING", label: this.$t("api_test.automation.string")},
{value: "ARRAY", label: this.$t("api_test.automation.array")},
{value: "JSON", label: this.$t("api_test.automation.json")},
{value: "NUMBER", label: this.$t("api_test.automation.number")},
],
variables: {},
selectVariable: "",
editData: {},
@ -343,6 +363,10 @@ export default {
data.files = [];
data.quotedData = "false";
}
if (!data.scope || data.scope == "ui") {
data.type = 'STRING';
}
},
valueText(data) {
switch (data.type) {

View File

@ -55,20 +55,6 @@
</el-link>
</el-row>
<ms-api-key-value :items="condition.headers" :isShowEnable="true" :suggestions="headerSuggestions"/>
<div style="margin-top: 20px">
<el-button v-if="!condition.id" type="primary" style="float: right" size="mini" @click="add">
{{ $t('commons.add') }}
</el-button>
<div v-else>
<el-button type="primary" style="float: right;margin-left: 10px" size="mini" @click="clear">
{{ $t('commons.clear') }}
</el-button>
<el-button type="primary" style="float: right" size="mini" @click="update(condition)">{{
$t('commons.update')
}}
</el-button>
</div>
</div>
</form-section>
<!-- UI 配置 -->
@ -102,14 +88,29 @@
</el-col>
</el-row>
<!-- 当前版本实现免登录是基于 cookie 的但是现在由于安全性问题绝大多数网站都不支持 cookie登录所以先屏蔽了-->
<!-- <el-row :gutter="10">-->
<!-- <el-col :span="24">-->
<!-- <ms-ui-scenario-cookie-table :items="httpConfig.cookie" ref="cookieTable"/>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- 当前版本实现免登录是基于 cookie 的但是现在由于安全性问题绝大多数网站都不支持 cookie登录所以先屏蔽了-->
<!-- <el-row :gutter="10">-->
<!-- <el-col :span="24">-->
<!-- <ms-ui-scenario-cookie-table :items="httpConfig.cookie" ref="cookieTable"/>-->
<!-- </el-col>-->
<!-- </el-row>-->
</form-section>
<div style="margin-top: 20px">
<el-button v-if="!condition.id" type="primary" style="float: right" size="mini" @click="add">
{{ $t('commons.add') }}
</el-button>
<div v-else>
<el-button type="primary" style="float: right;margin-left: 10px" size="mini" @click="clear">
{{ $t('commons.clear') }}
</el-button>
<el-button type="primary" style="float: right" size="mini" @click="update(condition)">{{
$t('commons.update')
}}
</el-button>
</div>
</div>
</el-form-item>
</div>
<div class="ms-border">