fix(接口定义): 修复选择导出变量提示错误的缺陷 (#18109)

--bug=1017017 --user=王孝刚 【接口测试】接口自动化场景变量不勾选变量点击导出提示信息错误
https://www.tapd.cn/55049933/s/1247845

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-09-20 19:48:08 +08:00 committed by GitHub
parent 795cc45f6e
commit 4945e0b01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 44 deletions

View File

@ -60,60 +60,60 @@
<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
ref="variableTable"
v-loading="loading" v-loading="loading"
row-key="id"
:data="variables"
:total="variables.length"
:screen-height="screenHeight"
:batch-operators="batchButtons" :batch-operators="batchButtons"
:remember-order="true" :data="variables"
:highlightCurrentRow="true"
:fields.sync="fields"
:field-key="tableHeaderKey" :field-key="tableHeaderKey"
:fields.sync="fields"
:highlightCurrentRow="true"
:remember-order="true"
:screen-height="screenHeight"
:total="variables.length"
row-key="id"
@handleRowClick="handleRowClick" @handleRowClick="handleRowClick"
@refresh="onChange" @refresh="onChange">
ref="variableTable">
<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"
sortable
label="ID" label="ID"
min-width="60"> min-width="60"
prop="num"
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>
@ -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 = [];