refactor: 组件MsStatusTag提到公共业务组件位置
This commit is contained in:
parent
f4d1a8da6c
commit
07891ec365
|
@ -8,9 +8,10 @@
|
|||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
import type { ReviewStatus } from '@/models/caseManagement/caseReview';
|
||||
import type { planStatusType } from '@/models/testPlan/testPlan';
|
||||
|
||||
const props = defineProps<{
|
||||
status: ReviewStatus;
|
||||
status: ReviewStatus | planStatusType;
|
||||
size?: 'small' | 'medium' | 'large';
|
||||
}>();
|
||||
const { t } = useI18n();
|
|
@ -1,5 +1,4 @@
|
|||
import { ReviewStatus } from '@/models/caseManagement/caseReview';
|
||||
import type { TestPlanDetail } from '@/models/testPlan/testPlan';
|
||||
import type { planStatusType, TestPlanDetail } from '@/models/testPlan/testPlan';
|
||||
|
||||
// TODO: 对照后端字段
|
||||
// 测试计划详情
|
||||
|
@ -13,7 +12,7 @@ export const testPlanDefaultDetail: TestPlanDetail = {
|
|||
repeatCase: false,
|
||||
passThreshold: 100,
|
||||
num: 0,
|
||||
status: 'PREPARED' as ReviewStatus,
|
||||
status: 'PREPARED' as planStatusType,
|
||||
followFlag: false,
|
||||
passRate: 0,
|
||||
executedCount: 0,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<a-button type="text" class="px-0" @click="review(record)">{{ record.reviewName }}</a-button>
|
||||
</template>
|
||||
<template #reviewStatus="{ record }">
|
||||
<statusTag :status="record.reviewStatus || 'PREPARED'" />
|
||||
<MsStatusTag :status="record.reviewStatus || 'PREPARED'" />
|
||||
</template>
|
||||
<template #status="{ record }">
|
||||
<MsIcon
|
||||
|
@ -39,7 +39,7 @@
|
|||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
import statusTag from '@/views/case-management/caseReview/components/statusTag.vue';
|
||||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
|
||||
import { getDetailCaseReviewPage } from '@/api/modules/case-management/featureCase';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<a-button type="text" class="px-0" @click="goToPlan(record)">{{ record.testPlanNum }}</a-button>
|
||||
</template>
|
||||
<template #planStatus="{ record }">
|
||||
<statusTag :status="record.planStatus" />
|
||||
<MsStatusTag :status="record.planStatus" />
|
||||
</template>
|
||||
<template #statusFilter="{ columnConfig }">
|
||||
<a-trigger
|
||||
|
@ -118,7 +118,7 @@
|
|||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
import ExecuteResult from '@/components/business/ms-case-associate/executeResult.vue';
|
||||
import statusTag from '@/views/case-management/caseReview/components/statusTag.vue';
|
||||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
|
||||
import { getLinkedCaseTestPlanList } from '@/api/modules/case-management/featureCase';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
</a-tooltip>
|
||||
</template>
|
||||
<template #status="{ record }">
|
||||
<statusTag :status="record.status" size="small" />
|
||||
<MsStatusTag :status="record.status" size="small" />
|
||||
</template>
|
||||
<template #reviewPassRule="{ record }">
|
||||
<a-tag
|
||||
|
@ -221,8 +221,8 @@
|
|||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
||||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
import passRateLine from '../passRateLine.vue';
|
||||
import statusTag from '../statusTag.vue';
|
||||
import deleteReviewModal from './deleteReviewModal.vue';
|
||||
import ModuleTree from './moduleTree.vue';
|
||||
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
: t('caseManagement.caseReview.multi')
|
||||
}}
|
||||
</div>
|
||||
<statusTag :status="(reviewDetail.status as ReviewStatus)" class="mx-[16px]" />
|
||||
<MsStatusTag :status="(reviewDetail.status as ReviewStatus)" class="mx-[16px]" />
|
||||
</template>
|
||||
<template #headerRight>
|
||||
<div class="mr-[16px] flex items-center">
|
||||
|
@ -150,12 +150,12 @@
|
|||
import MsSplitBox from '@/components/pure/ms-split-box/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';
|
||||
import AssociateDrawer from './components/create/associateDrawer.vue';
|
||||
import CaseTable from './components/detail/caseTable.vue';
|
||||
import CaseTree from './components/detail/caseTree.vue';
|
||||
import deleteReviewModal from './components/index/deleteReviewModal.vue';
|
||||
import passRateLine from './components/passRateLine.vue';
|
||||
import statusTag from './components/statusTag.vue';
|
||||
|
||||
import {
|
||||
associateReviewCase,
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
<statusTag :status="filterContent.value" />
|
||||
</template>
|
||||
<template #status="{ record }">
|
||||
<statusTag :status="record.status" />
|
||||
<MsStatusTag :status="record.status" />
|
||||
</template>
|
||||
|
||||
<!-- <template #passRate="{ record }">
|
||||
|
@ -241,12 +241,12 @@
|
|||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
||||
import MsTag from '@/components/pure/ms-tag/ms-tag.vue';
|
||||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
import ActionModal from './actionModal.vue';
|
||||
import BatchEditModal from './batchEditModal.vue';
|
||||
import BatchMoveOrCopy from './batchMoveOrCopy.vue';
|
||||
import ScheduledModal from './scheduledModal.vue';
|
||||
import StatusProgress from './statusProgress.vue';
|
||||
import statusTag from '@/views/case-management/caseReview/components/statusTag.vue';
|
||||
|
||||
import {
|
||||
archivedPlan,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
hide-divider
|
||||
>
|
||||
<template #headerLeft>
|
||||
<statusTag :status="(detail.status as ReviewStatus)" />
|
||||
<MsStatusTag :status="detail.status" />
|
||||
<a-tooltip :content="`[${detail.num}]${detail.name}`">
|
||||
<div class="one-line-text ml-[4px] max-w-[360px] gap-[4px] font-medium text-[var(--color-text-1)]">
|
||||
<span>[{{ detail.num }}]</span>
|
||||
|
@ -86,15 +86,14 @@
|
|||
import MsIcon from '@/components/pure/ms-icon-font/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';
|
||||
import BugManagement from './bugManagement/index.vue';
|
||||
import passRateLine from '@/views/case-management/caseReview/components/passRateLine.vue';
|
||||
import statusTag from '@/views/case-management/caseReview/components/statusTag.vue';
|
||||
|
||||
import { getTestPlanDetail } from '@/api/modules/test-plan/testPlan';
|
||||
import { testPlanDefaultDetail } from '@/config/testPlan';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
import type { ReviewStatus } from '@/models/caseManagement/caseReview';
|
||||
import type { TestPlanDetail } from '@/models/testPlan/testPlan';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
Loading…
Reference in New Issue