feat(测试计划): 加权限
This commit is contained in:
parent
5f6299b8d5
commit
601d659708
|
@ -36,9 +36,8 @@
|
|||
<ExecuteResult :execute-result="filterContent.key" />
|
||||
</template>
|
||||
<template #lastExecResult="{ record }">
|
||||
<!-- TODO: 修改permission -->
|
||||
<a-select
|
||||
v-if="hasAnyPermission(['PROJECT_API_DEFINITION_CASE:READ+UPDATE'])"
|
||||
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE'])"
|
||||
v-model:model-value="record.lastExecResult"
|
||||
:placeholder="t('common.pleaseSelect')"
|
||||
class="param-input w-full"
|
||||
|
@ -55,7 +54,7 @@
|
|||
</template>
|
||||
<template #operation="{ record }">
|
||||
<MsButton
|
||||
v-permission="['PROJECT_API_DEFINITION_CASE:READ+EXECUTE']"
|
||||
v-permission="['PROJECT_TEST_PLAN:READ+EXECUTE']"
|
||||
type="text"
|
||||
class="!mr-0"
|
||||
@click="toCaseDetail(record)"
|
||||
|
@ -75,16 +74,15 @@
|
|||
{{ t('common.cancelLink') }}
|
||||
</MsButton>
|
||||
</MsPopconfirm>
|
||||
<!-- TODO: 修改permission -->
|
||||
<a-divider
|
||||
v-if="props.repeatCase"
|
||||
v-permission="['PROJECT_API_DEFINITION_CASE:READ+EXECUTE']"
|
||||
v-permission="['PROJECT_TEST_PLAN:READ+ASSOCIATION']"
|
||||
direction="vertical"
|
||||
:margin="8"
|
||||
></a-divider>
|
||||
<MsButton
|
||||
v-if="props.repeatCase"
|
||||
v-permission="['PROJECT_API_DEFINITION_CASE:READ+ADD']"
|
||||
v-permission="['PROJECT_TEST_PLAN:READ+ASSOCIATION']"
|
||||
type="text"
|
||||
class="!mr-0"
|
||||
@click="handleCopyCase(record)"
|
||||
|
@ -240,7 +238,6 @@
|
|||
projectId: appStore.currentProjectId,
|
||||
});
|
||||
|
||||
// TODO: 复制的Permission
|
||||
const hasOperationPermission = computed(() =>
|
||||
hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE', 'PROJECT_TEST_PLAN:READ+ASSOCIATION'])
|
||||
);
|
||||
|
@ -360,7 +357,6 @@
|
|||
};
|
||||
}
|
||||
);
|
||||
// TODO: permission
|
||||
const batchActions = {
|
||||
baseAction: [
|
||||
{
|
||||
|
@ -371,6 +367,7 @@
|
|||
{
|
||||
label: 'testPlan.featureCase.changeExecutor',
|
||||
eventTag: 'changeExecutor',
|
||||
permission: ['PROJECT_TEST_PLAN:READ+UPDATE'],
|
||||
},
|
||||
],
|
||||
moreAction: [
|
||||
|
|
|
@ -99,7 +99,10 @@
|
|||
<div v-else-if="activeTab === 'detail'" class="align-content-start flex h-full flex-col">
|
||||
<CaseTabDetail ref="caseTabDetailRef" is-test-plan :form="caseDetail" />
|
||||
<!-- 开始执行 -->
|
||||
<div class="px-[16px] py-[8px] shadow-[0_-1px_4px_rgba(2,2,2,0.1)]">
|
||||
<div
|
||||
v-permission="['PROJECT_TEST_PLAN:READ+EXECUTE']"
|
||||
class="px-[16px] py-[8px] shadow-[0_-1px_4px_rgba(2,2,2,0.1)]"
|
||||
>
|
||||
<div class="mb-[12px] flex items-center justify-between">
|
||||
<div class="font-medium text-[var(--color-text-1)]">
|
||||
{{ t('testPlan.featureCase.startExecution') }}
|
||||
|
|
|
@ -82,9 +82,13 @@
|
|||
<StatusProgress :status-detail="countDetail" height="8px" radius="var(--border-radius-mini)" />
|
||||
</div>
|
||||
</template>
|
||||
<a-tabs v-model:active-key="activeTab" class="no-content">
|
||||
<a-tab-pane v-for="item of tabList" :key="item.key" :title="item.title" />
|
||||
</a-tabs>
|
||||
<MsTab
|
||||
v-model:active-key="activeTab"
|
||||
:get-text-func="getTabBadge"
|
||||
:content-tab-list="tabList"
|
||||
no-content
|
||||
class="relative mx-[16px] border-b"
|
||||
/>
|
||||
</MsCard>
|
||||
<!-- special-height的174: 上面卡片高度158 + mt的16 -->
|
||||
<MsCard class="mt-[16px]" :special-height="174" simple has-breadcrumb no-content-padding>
|
||||
|
@ -112,6 +116,7 @@
|
|||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsCard from '@/components/pure/ms-card/index.vue';
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsTab from '@/components/pure/ms-tab/index.vue';
|
||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
||||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
|
@ -209,6 +214,16 @@
|
|||
return fullActions.filter((e) => e.eventTag !== 'archive');
|
||||
});
|
||||
|
||||
function getTabBadge(tabKey: string) {
|
||||
switch (tabKey) {
|
||||
case 'featureCase':
|
||||
const count = detail.value.functionalCaseCount ?? 0;
|
||||
return `${count > 0 ? count : ''}`;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function archiveHandler() {
|
||||
openModal({
|
||||
type: 'warning',
|
||||
|
@ -264,8 +279,8 @@
|
|||
const activeTab = ref('featureCase');
|
||||
const tabList = ref([
|
||||
{
|
||||
key: 'featureCase',
|
||||
title: t('menu.caseManagement.featureCase'),
|
||||
value: 'featureCase',
|
||||
label: t('menu.caseManagement.featureCase'),
|
||||
},
|
||||
// TODO 先不上
|
||||
// {
|
||||
|
|
|
@ -9,22 +9,14 @@
|
|||
:placeholder="t('caseManagement.featureCase.searchTip')"
|
||||
allow-clear
|
||||
/>
|
||||
<a-dropdown-button
|
||||
<a-button
|
||||
v-permission="['PROJECT_TEST_PLAN:READ+ADD']"
|
||||
class="ml-2"
|
||||
type="primary"
|
||||
@click="handleSelect('createPlan')"
|
||||
>
|
||||
{{ t('common.newCreate') }}
|
||||
<template #icon>
|
||||
<icon-down />
|
||||
</template>
|
||||
<template #content>
|
||||
<a-doption value="Excel">
|
||||
{{ t('testPlan.testPlanIndex.newCreatePlanGroup') }}
|
||||
</a-doption>
|
||||
</template>
|
||||
</a-dropdown-button>
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div class="test-plan h-[100%]">
|
||||
|
|
Loading…
Reference in New Issue