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,6 +19,7 @@
<el-container> <el-container>
<el-main> <el-main>
<fieldset :disabled="loaded">
<div v-for="item in apiCaseList" :key="item.id ? item.id : item.uuid"> <div v-for="item in apiCaseList" :key="item.id ? item.id : item.uuid">
<api-case-item <api-case-item
:loading="(singleLoading && singleRunId === item.id) || batchLoadingIds.indexOf(item.id) > -1" :loading="(singleLoading && singleRunId === item.id) || batchLoadingIds.indexOf(item.id) > -1"
@ -41,6 +42,7 @@
:api-case="item" :api-case="item"
ref="apiCaseItem" /> ref="apiCaseItem" />
</div> </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';