style: 调整功能用例页面样式新建&断言样式&接口管理新建

This commit is contained in:
xinxin.wu 2024-04-25 12:11:20 +08:00 committed by 刘瑞斌
parent 73ca28a9ba
commit 0e5c550b70
6 changed files with 43 additions and 18 deletions

View File

@ -456,13 +456,13 @@
title: 'ms.assertion.expression',
dataIndex: 'expression',
slotName: 'expression',
width: 300,
},
{
title: 'ms.assertion.matchCondition',
dataIndex: 'condition',
slotName: 'condition',
options: statusCodeOptions,
width: 150,
},
{
title: 'ms.assertion.matchValue',
@ -475,7 +475,7 @@
title: '',
slotName: 'operation',
fixed: 'right',
width: 130,
width: 80,
moreAction: [
{
eventTag: 'copy',
@ -702,6 +702,7 @@
config: RegexExtract | JSONPathExtract | XPathExtract,
matchResult: Record<string, any>
) {
debugger;
condition.value.jsonPathAssertion.assertions = condition.value.jsonPathAssertion.assertions?.map((e: Param) => {
if (e.id === activeRecord.value.id) {
return {

View File

@ -7,7 +7,7 @@
type="primary"
@click="handleSelect('newApi')"
>
{{ t('apiTestDebug.newApi') }}
{{ t('common.newCreate') }}
<template #icon>
<icon-down />
</template>

View File

@ -23,7 +23,7 @@
type="primary"
@click="handleSelect('newApi')"
>
{{ t('apiTestManagement.newApi') }}
{{ t('common.newCreate') }}
<template #icon>
<icon-down />
</template>

View File

@ -503,4 +503,7 @@
height: 100%;
height: 1000px;
}
:deep(.step-tree-node-title) {
width: 100%;
}
</style>

View File

@ -15,7 +15,8 @@
emit('newScenario');
}
"
>{{ t('apiScenario.createScenario') }}</a-button
>
{{ t('common.newCreate') }}</a-button
>
</div>
<div class="folder" @click="setActiveFolder('all')">

View File

@ -11,19 +11,26 @@
allow-clear
:max-length="255"
/>
<a-dropdown position="br">
<a-button class="ml-2" type="primary">
{{ t('common.newCreate') }}
</a-button>
<template #content>
<a-doption v-permission="['FUNCTIONAL_CASE:READ+ADD']" @click="caseDetail">{{
t('caseManagement.featureCase.creatingCase')
}}</a-doption>
<a-doption v-permission="['FUNCTIONAL_CASE:READ+IMPORT']" @click="importCase('Excel')">{{
t('caseManagement.featureCase.importExcel')
}}</a-doption>
<a-dropdown-button
v-if="hasAllPermission(['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+IMPORT'])"
class="ml-2"
type="primary"
@click="handleSelect('newCase')"
>
{{ t('common.newCreate') }}
<template #icon>
<icon-down />
</template>
</a-dropdown>
<template #content>
<a-doption
v-permission="['FUNCTIONAL_CASE:READ+IMPORT']"
value="Excel"
@click="handleSelect('import', 'Excel')"
>
{{ t('caseManagement.featureCase.importExcel') }}
</a-doption>
</template>
</a-dropdown-button>
</div>
<div class="case h-[38px]">
@ -163,7 +170,7 @@
import { useI18n } from '@/hooks/useI18n';
import useAppStore from '@/store/modules/app';
import useFeatureCaseStore from '@/store/modules/case/featureCase';
import { hasAnyPermission } from '@/utils/permission';
import { hasAllPermission, hasAnyPermission } from '@/utils/permission';
import type { CaseModuleQueryParams, CreateOrUpdateModule, ValidateInfo } from '@/models/caseManagement/featureCase';
import { TableQueryParams } from '@/models/common';
@ -408,6 +415,19 @@
}
}
function handleSelect(value: string | number | Record<string, any> | undefined, type?: 'Excel' | 'Xmind') {
switch (value) {
case 'newCase':
caseDetail();
break;
case 'import':
importCase(type as 'Excel' | 'Xmind');
break;
default:
break;
}
}
function dragUpdate() {
caseTableRef.value.emitTableParams();
}