fix(接口定义): 修复选择导出变量提示错误的缺陷 (#18108)
--bug=1017017 --user=王孝刚 【接口测试】接口自动化场景变量不勾选变量点击导出提示信息错误 https://www.tapd.cn/55049933/s/1247845 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
1ea79ac2a3
commit
27f4b59144
|
@ -60,61 +60,61 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div style="border:1px #DCDFE6 solid; min-height: 400px;border-radius: 4px ;width: 100% ;">
|
<div style="border:1px #DCDFE6 solid; min-height: 400px;border-radius: 4px ;width: 100% ;">
|
||||||
<ms-table
|
<ms-table
|
||||||
v-loading="loading"
|
ref="variableTable"
|
||||||
row-key="id"
|
v-loading="loading"
|
||||||
:data="variables"
|
:batch-operators="batchButtons"
|
||||||
:total="variables.length"
|
:data="variables"
|
||||||
:screen-height="screenHeight"
|
:field-key="tableHeaderKey"
|
||||||
:batch-operators="batchButtons"
|
:fields.sync="fields"
|
||||||
:remember-order="true"
|
:highlightCurrentRow="true"
|
||||||
:highlightCurrentRow="true"
|
:remember-order="true"
|
||||||
:fields.sync="fields"
|
:screen-height="screenHeight"
|
||||||
:field-key="tableHeaderKey"
|
:total="variables.length"
|
||||||
@handleRowClick="handleRowClick"
|
row-key="id"
|
||||||
@refresh="onChange"
|
@handleRowClick="handleRowClick"
|
||||||
ref="variableTable">
|
@refresh="onChange">
|
||||||
<span v-for="item in fields" :key="item.key">
|
<span v-for="item in fields" :key="item.key">
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="num"
|
:field="item"
|
||||||
:field="item"
|
:fields-width="fieldsWidth"
|
||||||
:fields-width="fieldsWidth"
|
label="ID"
|
||||||
sortable
|
min-width="60"
|
||||||
label="ID"
|
prop="num"
|
||||||
min-width="60">
|
sortable>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="name"
|
:field="item"
|
||||||
:field="item"
|
:fields-width="fieldsWidth"
|
||||||
:fields-width="fieldsWidth"
|
:label="$t('api_test.variable_name')"
|
||||||
:label="$t('api_test.variable_name')"
|
min-width="100"
|
||||||
min-width="100"
|
prop="name"
|
||||||
sortable>
|
sortable>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="type"
|
:field="item"
|
||||||
:field="item"
|
:fields-width="fieldsWidth"
|
||||||
:fields-width="fieldsWidth"
|
:label="$t('test_track.case.type')"
|
||||||
:label="$t('test_track.case.type')"
|
min-width="70"
|
||||||
min-width="70"
|
prop="type"
|
||||||
sortable>
|
sortable>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ types.get(scope.row.type) }}</span>
|
<span>{{ types.get(scope.row.type) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="value"
|
:field="item"
|
||||||
:field="item"
|
:fields-width="fieldsWidth"
|
||||||
:fields-width="fieldsWidth"
|
:label="$t('api_test.value')"
|
||||||
:label="$t('api_test.value')"
|
prop="value"
|
||||||
sortable>
|
sortable>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="description"
|
:field="item"
|
||||||
:field="item"
|
:fields-width="fieldsWidth"
|
||||||
:fields-width="fieldsWidth"
|
:label="$t('commons.description')"
|
||||||
:label="$t('commons.description')"
|
min-width="70"
|
||||||
min-width="70"
|
prop="description"
|
||||||
sortable>
|
sortable>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
</span>
|
</span>
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
@ -276,7 +276,7 @@ export default {
|
||||||
},
|
},
|
||||||
exportVariable() {
|
exportVariable() {
|
||||||
if (this.$refs.variableTable.selectIds.length < 1) {
|
if (this.$refs.variableTable.selectIds.length < 1) {
|
||||||
this.$warning(this.$t('api_test.environment.select_environment'));
|
this.$warning(this.$t('api_test.environment.select_variable'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let variablesJson = [];
|
let variablesJson = [];
|
||||||
|
@ -564,7 +564,7 @@ export default {
|
||||||
this.variables.forEach(item => {
|
this.variables.forEach(item => {
|
||||||
if (this.searchType && this.searchType != "" && this.selectVariable && this.selectVariable != "") {
|
if (this.searchType && this.searchType != "" && this.selectVariable && this.selectVariable != "") {
|
||||||
if ((item.type && item.type.toLowerCase().indexOf(this.searchType.toLowerCase()) == -1 && this.searchType != 'ALL')
|
if ((item.type && item.type.toLowerCase().indexOf(this.searchType.toLowerCase()) == -1 && this.searchType != 'ALL')
|
||||||
|| (item.name && item.name.toLowerCase().indexOf(this.selectVariable.toLowerCase()) == -1)) {
|
|| (item.name && item.name.toLowerCase().indexOf(this.selectVariable.toLowerCase()) == -1)) {
|
||||||
item.hidden = true;
|
item.hidden = true;
|
||||||
} else {
|
} else {
|
||||||
item.hidden = undefined;
|
item.hidden = undefined;
|
||||||
|
|
Loading…
Reference in New Issue