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 4056b9b37e
commit f4686e7096
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -91,7 +91,6 @@
@row-click="edit"
v-loading="loading"
height="325px">
<el-table-column type="selection" width="38" />
<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="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 MsContainer from 'metersphere-frontend/src/components/MsContainer';
import { useApiStore } from '@/store';
import OutsideClick from '../../automation/scenario/common/outside-click';
export default {
name: 'MsApiVariableAdvance',
@ -292,6 +292,8 @@ export default {
MsContainer,
MsComponentConfig: () => import('../../automation/scenario/component/ComponentConfig'),
},
directives: { OutsideClick },
data() {
return {
itemValueVisible: false,
@ -402,7 +404,6 @@ export default {
return this.valuePlaceholder || this.$t('api_test.value');
},
},
directives: {},
mounted() {
this.prepareData();
},