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