fix(接口测试): 解决场景变量引用时多选操作无响应问题

--bug=1022885 --user=赵勇 【接口测试】github#21668,api参数选择某环境变量选中操作不流畅,选中保存无效 https://www.tapd.cn/55049933/s/1334322
This commit is contained in:
fit2-zhao 2023-02-13 14:00:34 +08:00 committed by fit2-zhao
parent 285a8390de
commit 2b689effc3
2 changed files with 6 additions and 3 deletions

View File

@ -273,7 +273,9 @@ export default {
this.request.projectId = getCurrentProjectID(); this.request.projectId = getCurrentProjectID();
} }
this.request.customizeReq = this.isCustomizeReq; this.request.customizeReq = this.isCustomizeReq;
if (this.currentScenario) {
this.request.currentScenarioId = this.currentScenario.id; this.request.currentScenarioId = this.currentScenario.id;
}
// ID // ID
if (this.request.hashTree) { if (this.request.hashTree) {
this.setOwnEnvironment(this.request.hashTree); this.setOwnEnvironment(this.request.hashTree);

View File

@ -91,7 +91,6 @@
@row-click="edit" @row-click="edit"
v-loading="loading" v-loading="loading"
height="325px"> height="325px">
<el-table-column type="selection" width="38" />
<el-table-column prop="num" label="ID" sortable width="60" /> <el-table-column prop="num" label="ID" sortable width="60" />
<el-table-column prop="name" :label="$t('api_test.variable_name')" sortable show-overflow-tooltip /> <el-table-column prop="name" :label="$t('api_test.variable_name')" sortable show-overflow-tooltip />
<el-table-column prop="type" :label="$t('test_track.case.type')" width="70"> <el-table-column prop="type" :label="$t('test_track.case.type')" width="70">
@ -263,6 +262,7 @@ import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer
import MsAsideContainer from 'metersphere-frontend/src/components/MsAsideContainer'; import MsAsideContainer from 'metersphere-frontend/src/components/MsAsideContainer';
import MsContainer from 'metersphere-frontend/src/components/MsContainer'; import MsContainer from 'metersphere-frontend/src/components/MsContainer';
import { useApiStore } from '@/store'; import { useApiStore } from '@/store';
import OutsideClick from '../../automation/scenario/common/outside-click';
export default { export default {
name: 'MsApiVariableAdvance', name: 'MsApiVariableAdvance',
@ -292,6 +292,8 @@ export default {
MsContainer, MsContainer,
MsComponentConfig: () => import('../../automation/scenario/component/ComponentConfig'), MsComponentConfig: () => import('../../automation/scenario/component/ComponentConfig'),
}, },
directives: { OutsideClick },
data() { data() {
return { return {
itemValueVisible: false, itemValueVisible: false,
@ -402,7 +404,6 @@ export default {
return this.valuePlaceholder || this.$t('api_test.value'); return this.valuePlaceholder || this.$t('api_test.value');
}, },
}, },
directives: {},
mounted() { mounted() {
this.prepareData(); this.prepareData();
}, },