refactor(测试计划): 测试计划-用例详情-添加缺陷移动到执行结果旁边

This commit is contained in:
teukkk 2024-09-30 11:47:48 +08:00 committed by Craftsman
parent df5a657b9c
commit e357048091
4 changed files with 59 additions and 55 deletions

View File

@ -10,9 +10,12 @@
<slot name="headerRight"></slot>
</template>
</ExecuteForm>
<a-button type="primary" class="mt-[12px]" :loading="submitLoading" @click="() => submit()">
<div class="mt-[12px] flex items-center">
<a-button type="primary" :loading="submitLoading" @click="() => submit()">
{{ t('caseManagement.caseReview.commitResult') }}
</a-button>
<slot name="commitRight"></slot>
</div>
<a-modal
v-model:visible="modalVisible"
:title="t('testPlan.featureCase.startExecution')"

View File

@ -128,7 +128,7 @@
<div class="flex items-center">
<a-switch v-model:model-value="autoNext" size="small" />
<div class="mx-[8px]">{{ t('caseManagement.caseReview.autoNext') }}</div>
<a-tooltip position="top">
<a-tooltip position="tr">
<template #content>
<div>{{ t('testPlan.featureCase.autoNextTip1') }}</div>
<div>{{ t('testPlan.featureCase.autoNextTip2') }}</div>
@ -138,39 +138,40 @@
size="16"
/>
</a-tooltip>
<MsTag type="danger" theme="light" size="medium" class="ml-4">
<MsIcon type="icon-icon_defect" class="!text-[14px] text-[rgb(var(--danger-6))]" size="16" />
<span class="ml-1 text-[rgb(var(--danger-6))]"> {{ t('testPlan.featureCase.bug') }}</span>
<span class="ml-1 text-[rgb(var(--danger-6))]">{{ caseDetail.bugListCount }}</span>
</MsTag>
</div>
</div>
</template>
<template #commitRight>
<a-dropdown @select="handleSelect">
<a-button
v-if="hasAllPermission(['PROJECT_BUG:READ', 'PROJECT_TEST_PLAN:READ+EXECUTE'])"
type="outline"
size="small"
class="ml-1"
class="ml-[12px]"
>
<template #icon> <icon-plus class="text-[12px]" /> </template>
<template #icon> <MsIcon type="icon-icon_add_outlined"></MsIcon> </template>
{{ t('testPlan.featureCase.addBug') }}
</a-button>
<template #content>
<a-doption
v-permission="['PROJECT_BUG:READ+ADD']"
:disabled="!hasAnyPermission(['PROJECT_BUG:READ+ADD'])"
value="new"
>{{ t('common.newCreate') }}</a-doption
>
{{ t('testPlan.featureCase.noBugDataNewBug') }}
</a-doption>
<a-doption
v-if="createdBugCount > 0 && hasAnyPermission(['PROJECT_BUG:READ'])"
:disabled="!hasAnyPermission(['PROJECT_BUG:READ'])"
value="link"
>{{ t('common.associated') }}</a-doption
>
{{ t('caseManagement.featureCase.linkDefect') }}
</a-doption>
<a-popover v-else title="" position="left">
<a-doption
v-if="createdBugCount < 1 && hasAnyPermission(['PROJECT_BUG:READ'])"
:disabled="!hasAnyPermission(['PROJECT_BUG:READ'])"
value="link"
>{{ t('common.associated') }}</a-doption
>{{ t('caseManagement.featureCase.linkDefect') }}</a-doption
>
<template #content>
<div class="flex items-center text-[14px]">
@ -189,8 +190,6 @@
</a-popover>
</template>
</a-dropdown>
</div>
</div>
</template>
</ExecuteSubmit>
</div>

View File

@ -19,6 +19,7 @@ export default {
'testPlan.testPlanIndex.useCount': 'Use cases',
'testPlan.testPlanIndex.bugCount': 'bug count',
'testPlan.featureCase.bug': 'bug',
'testPlan.featureCase.addBug': 'Add bug',
'testPlan.testPlanIndex.belongModule': 'belong module',
'testPlan.testPlanIndex.createTime': 'create time',
'testPlan.testPlanIndex.operation': 'operation',

View File

@ -99,6 +99,7 @@ export default {
'testPlan.bugManagement.defectState': '缺陷状态',
'testPlan.featureCase.bugCount': '缺陷数',
'testPlan.featureCase.bug': '缺陷',
'testPlan.featureCase.addBug': '添加缺陷',
'testPlan.featureCase.executor': '执行人',
'testPlan.featureCase.changeExecutor': '修改执行人',
'testPlan.featureCase.batchChangeExecutor': '批量修改执行人',