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> <slot name="headerRight"></slot>
</template> </template>
</ExecuteForm> </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') }} {{ t('caseManagement.caseReview.commitResult') }}
</a-button> </a-button>
<slot name="commitRight"></slot>
</div>
<a-modal <a-modal
v-model:visible="modalVisible" v-model:visible="modalVisible"
:title="t('testPlan.featureCase.startExecution')" :title="t('testPlan.featureCase.startExecution')"

View File

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

View File

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

View File

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