style(接口测试): 调整加载用例页面样式及交换方式

--bug=1021754 --user=赵勇 【接口测试】接口定义-TEST-选择“测试”按钮下拉菜单“加载用例”页面后-再单击“确认”显示错误 https://www.tapd.cn/55049933/s/1324845
This commit is contained in:
fit2-zhao 2023-01-10 10:52:47 +08:00 committed by fit2-zhao
parent c2529a5f58
commit 2faa8533a2
2 changed files with 38 additions and 23 deletions

View File

@ -19,28 +19,30 @@
<el-container> <el-container>
<el-main> <el-main>
<div v-for="item in apiCaseList" :key="item.id ? item.id : item.uuid"> <fieldset :disabled="loaded">
<api-case-item <div v-for="item in apiCaseList" :key="item.id ? item.id : item.uuid">
:loading="(singleLoading && singleRunId === item.id) || batchLoadingIds.indexOf(item.id) > -1" <api-case-item
@refresh="refresh" :loading="(singleLoading && singleRunId === item.id) || batchLoadingIds.indexOf(item.id) > -1"
@refreshCaseList="refreshCaseList" @refresh="refresh"
@singleRun="singleRun" @refreshCaseList="refreshCaseList"
@stop="stop" @singleRun="singleRun"
@refreshModule="refreshModule" @stop="stop"
@copyCase="copyCase" @refreshModule="refreshModule"
@showExecResult="showExecResult" @copyCase="copyCase"
@showHistory="showHistory" @showExecResult="showExecResult"
@reLoadCase="reLoadCase" @showHistory="showHistory"
:environment="environment" @reLoadCase="reLoadCase"
@setSelectedCaseId="setSelectedCaseId" :environment="environment"
:is-case-edit="isCaseEdit" @setSelectedCaseId="setSelectedCaseId"
:api="api" :is-case-edit="isCaseEdit"
:currentApi="currentApi" :api="api"
:loaded="loaded" :currentApi="currentApi"
:maintainerOptions="maintainerOptions" :loaded="loaded"
:api-case="item" :maintainerOptions="maintainerOptions"
ref="apiCaseItem" /> :api-case="item"
</div> ref="apiCaseItem" />
</div>
</fieldset>
</el-main> </el-main>
</el-container> </el-container>
</ms-drawer> </ms-drawer>
@ -233,6 +235,9 @@ export default {
this.selectCaseId = caseId; this.selectCaseId = caseId;
}, },
saveCase(hideAlert) { saveCase(hideAlert) {
if (this.loaded) {
this.close();
}
let index = 0; let index = 0;
if (this.selectCaseId && this.selectCaseId !== '') { if (this.selectCaseId && this.selectCaseId !== '') {
for (let i = 0; i < this.apiCaseList.length; i++) { for (let i = 0; i < this.apiCaseList.length; i++) {
@ -684,4 +689,15 @@ export default {
.ms-drawer-case-header :deep(.ms-drawer-header) { .ms-drawer-case-header :deep(.ms-drawer-header) {
margin-left: 0px; margin-left: 0px;
} }
fieldset {
padding: 0px;
margin: 0px;
min-width: 100%;
min-inline-size: 0px;
border: 0px;
}
.ms-fieldset .ms-step-tree-cell::-webkit-scrollbar {
width: 0 !important;
}
</style> </style>

View File

@ -114,7 +114,6 @@
<script> <script>
import { citedApiScenarioCount, getDefinitionVersions, getMockEnvironment, updateDefinition } from '@/api/definition'; import { citedApiScenarioCount, getDefinitionVersions, getMockEnvironment, updateDefinition } from '@/api/definition';
import { getLastResultDetail } from '@/api/definition-report';
import { relationGet, updateRuleRelation, versionEnableByProjectId } from '@/api/xpack'; import { relationGet, updateRuleRelation, versionEnableByProjectId } from '@/api/xpack';
import MsApiRequestForm from '../request/http/ApiHttpRequestForm'; import MsApiRequestForm from '../request/http/ApiHttpRequestForm';
import { hasLicense, hasPermission } from 'metersphere-frontend/src/utils/permission'; import { hasLicense, hasPermission } from 'metersphere-frontend/src/utils/permission';