feat(工作台): 工作台-我的创建&我的关注接口联调
This commit is contained in:
parent
31d9ae57ab
commit
6078bcb4f5
|
@ -0,0 +1,54 @@
|
|||
import MSR from '@/api/http/index';
|
||||
|
||||
import type { ApiCaseDetail } from '@/models/apiTest/management';
|
||||
import type { ApiScenarioTableItem } from '@/models/apiTest/scenario';
|
||||
import type { BugListItem } from '@/models/bug-management';
|
||||
import type { ReviewItem } from '@/models/caseManagement/caseReview';
|
||||
import type { CaseManagementTable } from '@/models/caseManagement/featureCase';
|
||||
import type { CommonList, TableQueryParams } from '@/models/common';
|
||||
import type { PassRateCountDetail, TestPlanItem } from '@/models/testPlan/testPlan';
|
||||
|
||||
import {
|
||||
WorkbenchApiCaseListUrl,
|
||||
WorkbenchBugListUrl,
|
||||
WorkbenchCaseListUrl,
|
||||
WorkbenchReviewListUrl,
|
||||
WorkbenchScenarioListUrl,
|
||||
WorkbenchTestPlanListUrl,
|
||||
WorkbenchTestPlanStatisticUrl,
|
||||
} from '../requrls/workbench';
|
||||
|
||||
// 我的-场景列表
|
||||
export function workbenchScenarioList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<ApiScenarioTableItem>>({ url: WorkbenchScenarioListUrl, data });
|
||||
}
|
||||
|
||||
// 我的-用例评审列表
|
||||
export function workbenchReviewList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<ReviewItem>>({ url: WorkbenchReviewListUrl, data });
|
||||
}
|
||||
|
||||
// 我的-测试计划列表
|
||||
export function workbenchTestPlanList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<TestPlanItem>>({ url: WorkbenchTestPlanListUrl, data });
|
||||
}
|
||||
|
||||
// 我的-测试计划统计
|
||||
export function workbenchTestPlanStatistic(data: string[]) {
|
||||
return MSR.post<PassRateCountDetail[]>({ url: WorkbenchTestPlanStatisticUrl, data });
|
||||
}
|
||||
|
||||
// 我的-用例列表
|
||||
export function workbenchCaseList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<CaseManagementTable>>({ url: WorkbenchCaseListUrl, data });
|
||||
}
|
||||
|
||||
// 我的-缺陷列表
|
||||
export function workbenchBugList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<BugListItem>>({ url: WorkbenchBugListUrl, data });
|
||||
}
|
||||
|
||||
// 我的-接口用例列表
|
||||
export function workbenchApiCaseList(data: TableQueryParams) {
|
||||
return MSR.post<CommonList<ApiCaseDetail>>({ url: WorkbenchApiCaseListUrl, data });
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
export const WorkbenchScenarioListUrl = '/dashboard/my/scenario/page'; // 工作台-我的-场景列表
|
||||
export const WorkbenchReviewListUrl = '/dashboard/my/review/page'; // 工作台-我的-用例评审列表
|
||||
export const WorkbenchTestPlanListUrl = '/dashboard/my/plan/page'; // 工作台-我的-测试计划列表
|
||||
export const WorkbenchTestPlanStatisticUrl = '/dashboard/my/plan/statistics'; // 工作台-我的-测试计划统计
|
||||
export const WorkbenchCaseListUrl = '/dashboard/my/functional/page'; // 工作台-我的-用例列表
|
||||
export const WorkbenchBugListUrl = '/dashboard/my/bug/page'; // 工作台-我的-缺陷列表
|
||||
export const WorkbenchApiCaseListUrl = '/dashboard/my/api/page'; // 工作台-我的-接口用例列表
|
|
@ -208,7 +208,7 @@
|
|||
followLoading.value = true;
|
||||
await followScenario(scenario.value.id || '');
|
||||
scenario.value.follow = !scenario.value.follow;
|
||||
Message.success(scenario.value.follow ? t('common.unFollowSuccess') : t('common.followSuccess'));
|
||||
Message.success(scenario.value.follow ? t('common.followSuccess') : t('common.unFollowSuccess'));
|
||||
emit('updateFollow');
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||
|
||||
import { getCasePage } from '@/api/modules/api-test/management';
|
||||
import { workbenchApiCaseList } from '@/api/modules/workbench';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
|
||||
|
@ -84,6 +84,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -109,7 +110,7 @@
|
|||
sorter: true,
|
||||
},
|
||||
fixed: 'left',
|
||||
width: 150,
|
||||
width: 100,
|
||||
columnSelectorDisabled: true,
|
||||
},
|
||||
{
|
||||
|
@ -120,6 +121,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
fixed: 'left',
|
||||
width: 180,
|
||||
columnSelectorDisabled: true,
|
||||
},
|
||||
|
@ -146,7 +148,7 @@
|
|||
options: caseStatusOptions,
|
||||
filterSlotName: FilterSlotNameEnum.API_TEST_CASE_API_STATUS,
|
||||
},
|
||||
width: 150,
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
@ -158,7 +160,7 @@
|
|||
filterSlotName: FilterSlotNameEnum.API_TEST_CASE_API_LAST_EXECUTE_STATUS,
|
||||
},
|
||||
showInTable: false,
|
||||
width: 150,
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
@ -174,7 +176,8 @@
|
|||
slotName: 'createName',
|
||||
dataIndex: 'createUser',
|
||||
showInTable: true,
|
||||
width: 180,
|
||||
showTooltip: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'case.tableColumnCreateTime',
|
||||
|
@ -183,7 +186,7 @@
|
|||
width: 180,
|
||||
},
|
||||
];
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(getCasePage, {
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(workbenchApiCaseList, {
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
showSetting: false,
|
||||
|
@ -219,6 +222,13 @@
|
|||
loadList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
init();
|
||||
});
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
|
||||
import { getBugList, getCustomFieldHeader, getCustomOptionHeader } from '@/api/modules/bug-management';
|
||||
import { getCustomFieldHeader, getCustomOptionHeader } from '@/api/modules/bug-management';
|
||||
import { workbenchBugList } from '@/api/modules/workbench';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
|
@ -57,6 +58,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create' | 'my_todo';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
@ -75,7 +77,8 @@
|
|||
{
|
||||
title: 'bugManagement.bugName',
|
||||
dataIndex: 'title',
|
||||
width: 250,
|
||||
width: 180,
|
||||
fixed: 'left',
|
||||
showTooltip: true,
|
||||
showInTable: true,
|
||||
},
|
||||
|
@ -189,9 +192,10 @@
|
|||
await initFilterOptions();
|
||||
|
||||
const { propsRes, propsEvent, setLoadListParams, loadList } = useTable(
|
||||
getBugList,
|
||||
workbenchBugList,
|
||||
{
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
selectable: false,
|
||||
noDisable: false,
|
||||
showSetting: false,
|
||||
|
@ -219,7 +223,7 @@
|
|||
};
|
||||
|
||||
function handleShowDetail(id: number) {
|
||||
openNewPage(BugManagementRouteEnum.BUG_MANAGEMENT_DETAIL, { id, pId: props.project });
|
||||
openNewPage(BugManagementRouteEnum.BUG_MANAGEMENT_INDEX, { id, pId: props.project });
|
||||
}
|
||||
|
||||
function goBugList() {
|
||||
|
@ -236,6 +240,13 @@
|
|||
loadList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
init();
|
||||
});
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
import MsStatusTag from '@/components/business/ms-status-tag/index.vue';
|
||||
import passRateLine from '@/views/case-management/caseReview/components/passRateLine.vue';
|
||||
|
||||
import { getReviewList } from '@/api/modules/case-management/caseReview';
|
||||
import { workbenchReviewList } from '@/api/modules/workbench';
|
||||
import { reviewStatusMap } from '@/config/caseManagement';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
|
@ -80,6 +80,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create' | 'my_todo';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -104,7 +105,6 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showTooltip: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
|
@ -114,8 +114,9 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
fixed: 'left',
|
||||
showTooltip: true,
|
||||
width: 200,
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: 'caseManagement.caseReview.status',
|
||||
|
@ -126,7 +127,7 @@
|
|||
filterSlotName: FilterSlotNameEnum.CASE_MANAGEMENT_REVIEW_STATUS,
|
||||
},
|
||||
showDrag: true,
|
||||
width: 150,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'caseManagement.caseReview.passRate',
|
||||
|
@ -139,7 +140,7 @@
|
|||
title: 'caseManagement.caseReview.caseCount',
|
||||
dataIndex: 'caseCount',
|
||||
showDrag: true,
|
||||
width: 100,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: 'caseManagement.caseReview.type',
|
||||
|
@ -155,8 +156,9 @@
|
|||
},
|
||||
];
|
||||
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(getReviewList, {
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(workbenchReviewList, {
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
showSetting: false,
|
||||
selectable: false,
|
||||
showSelectAll: false,
|
||||
|
@ -181,6 +183,13 @@
|
|||
loadList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
init();
|
||||
});
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
import caseAndScenarioReportDrawer from '@/views/api-test/components/caseAndScenarioReportDrawer.vue';
|
||||
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
|
||||
|
||||
import { getScenarioPage } from '@/api/modules/api-test/scenario';
|
||||
import { workbenchScenarioList } from '@/api/modules/workbench';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
import { characterLimit } from '@/utils';
|
||||
|
@ -92,6 +92,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -127,8 +128,7 @@
|
|||
sorter: true,
|
||||
},
|
||||
fixed: 'left',
|
||||
width: 140,
|
||||
showTooltip: false,
|
||||
width: 100,
|
||||
columnSelectorDisabled: true,
|
||||
},
|
||||
{
|
||||
|
@ -139,6 +139,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
fixed: 'left',
|
||||
width: 134,
|
||||
showTooltip: true,
|
||||
columnSelectorDisabled: true,
|
||||
|
@ -214,7 +215,7 @@
|
|||
},
|
||||
];
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(
|
||||
getScenarioPage,
|
||||
workbenchScenarioList,
|
||||
{
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
|
@ -258,6 +259,13 @@
|
|||
loadList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
init();
|
||||
});
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
</div>
|
||||
<ms-base-table v-bind="propsRes" ref="tableRef" filter-icon-align-left class="mt-[16px]" v-on="propsEvent">
|
||||
<template #num="{ record }">
|
||||
<span type="text" class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">
|
||||
<div class="flex items-center">
|
||||
<MsButton type="text" class="float-left" style="margin-right: 4px" @click="openCase(record.id)">
|
||||
{{ record.num }}
|
||||
</span>
|
||||
</MsButton>
|
||||
</div>
|
||||
</template>
|
||||
<template #name="{ record }">
|
||||
<div class="one-line-text">{{ record.name }}</div>
|
||||
|
@ -45,6 +47,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
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 MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||
|
@ -54,7 +57,7 @@
|
|||
import caseLevel from '@/components/business/ms-case-associate/caseLevel.vue';
|
||||
import ExecuteStatusTag from '@/components/business/ms-case-associate/executeResult.vue';
|
||||
|
||||
import { getCaseList } from '@/api/modules/case-management/featureCase';
|
||||
import { workbenchCaseList } from '@/api/modules/workbench';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
|
||||
|
@ -71,6 +74,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -100,8 +104,7 @@
|
|||
'slotName': 'num',
|
||||
'sortIndex': 1,
|
||||
'fixed': 'left',
|
||||
'width': 150,
|
||||
'showTooltip': true,
|
||||
'width': 100,
|
||||
'columnSelectorDisabled': true,
|
||||
'filter-icon-align-left': true,
|
||||
},
|
||||
|
@ -111,6 +114,7 @@
|
|||
dataIndex: 'name',
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
fixed: 'left',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
},
|
||||
|
@ -123,7 +127,7 @@
|
|||
filterSlotName: FilterSlotNameEnum.CASE_MANAGEMENT_CASE_LEVEL,
|
||||
},
|
||||
showInTable: true,
|
||||
width: 150,
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
@ -174,12 +178,16 @@
|
|||
|
||||
const tableProps = ref<Partial<MsTableProps<CaseManagementTable>>>({
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
selectable: false,
|
||||
showSetting: false,
|
||||
paginationSize: 'mini',
|
||||
});
|
||||
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(getCaseList, tableProps.value, (record) => {
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(
|
||||
workbenchCaseList,
|
||||
tableProps.value,
|
||||
(record) => {
|
||||
return {
|
||||
...record,
|
||||
tags: (record.tags || []).map((item: string, i: number) => {
|
||||
|
@ -192,7 +200,8 @@
|
|||
showModuleTree: false,
|
||||
caseLevel: getCaseLevels(record.customFields),
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
|
@ -206,6 +215,17 @@
|
|||
init();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
function openCase(id: number) {
|
||||
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_CASE, { id, pId: props.project, showType: 'list' });
|
||||
}
|
||||
|
||||
function goTestCase() {
|
||||
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_CASE, {
|
||||
showType: 'list',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="cursor-pointer font-medium text-[var(--color-text-1)]" @click="goTestPlan">
|
||||
{{ t('ms.workbench.myFollowed.feature.TEST_PLAN') }}
|
||||
</div>
|
||||
<a-radio-group v-model="showType" type="button" class="file-show-type mr-2" size="small" @change="fetchData">
|
||||
<a-radio-group v-model="showType" type="button" class="file-show-type mr-2" size="small" @change="init">
|
||||
<a-radio :value="testPlanTypeEnum.ALL" class="show-type-icon p-[2px]">
|
||||
{{ t('testPlan.testPlanIndex.all') }}
|
||||
</a-radio>
|
||||
|
@ -122,7 +122,7 @@
|
|||
import PlanExpandRow from '@/views/test-plan/testPlan/components/planExpandRow.vue';
|
||||
import StatusProgress from '@/views/test-plan/testPlan/components/statusProgress.vue';
|
||||
|
||||
import { getPlanPassRate, getTestPlanList } from '@/api/modules/test-plan/testPlan';
|
||||
import { workbenchTestPlanList, workbenchTestPlanStatistic } from '@/api/modules/workbench';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
|
||||
|
@ -136,6 +136,7 @@
|
|||
const props = defineProps<{
|
||||
project: string;
|
||||
type: 'my_follow' | 'my_create' | 'my_todo';
|
||||
refreshId: string;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -153,9 +154,9 @@
|
|||
return defaultCountDetailMap.value[id]?.status;
|
||||
}
|
||||
|
||||
async function getStatistics(selectedPlanIds: (string | undefined)[]) {
|
||||
async function getStatistics(selectedPlanIds: string[]) {
|
||||
try {
|
||||
const result = await getPlanPassRate(selectedPlanIds);
|
||||
const result = await workbenchTestPlanStatistic(selectedPlanIds);
|
||||
result.forEach((item: PassRateCountDetail) => {
|
||||
defaultCountDetailMap.value[item.id] = item;
|
||||
});
|
||||
|
@ -170,7 +171,7 @@
|
|||
title: 'testPlan.testPlanIndex.ID',
|
||||
slotName: 'num',
|
||||
dataIndex: 'num',
|
||||
width: 180,
|
||||
width: 100,
|
||||
showInTable: true,
|
||||
showDrag: false,
|
||||
},
|
||||
|
@ -180,6 +181,7 @@
|
|||
dataIndex: 'name',
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
fixed: 'left',
|
||||
width: 180,
|
||||
showDrag: false,
|
||||
},
|
||||
|
@ -193,7 +195,7 @@
|
|||
},
|
||||
showInTable: true,
|
||||
showDrag: true,
|
||||
width: 150,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'testPlan.testPlanIndex.passRate',
|
||||
|
@ -229,13 +231,14 @@
|
|||
|
||||
const tableProps = ref<Partial<MsTableProps<TestPlanItem>>>({
|
||||
columns,
|
||||
scroll: { x: '100%' },
|
||||
selectable: false,
|
||||
showSetting: false,
|
||||
paginationSize: 'mini',
|
||||
showSelectorAll: false,
|
||||
});
|
||||
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(getTestPlanList, tableProps.value);
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(workbenchTestPlanList, tableProps.value);
|
||||
|
||||
const planData = computed(() => {
|
||||
return propsRes.value.data;
|
||||
|
@ -266,7 +269,7 @@
|
|||
() => planData.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
const selectedPlanIds: (string | undefined)[] = propsRes.value.data.map((e) => e.id) || [];
|
||||
const selectedPlanIds: string[] = propsRes.value.data.map((e) => e.id) || [];
|
||||
if (selectedPlanIds.length) {
|
||||
getStatistics(selectedPlanIds);
|
||||
}
|
||||
|
@ -277,7 +280,7 @@
|
|||
}
|
||||
);
|
||||
|
||||
function fetchData() {
|
||||
function init() {
|
||||
setLoadListParams({
|
||||
type: showType.value,
|
||||
projectId: props.project,
|
||||
|
@ -293,8 +296,15 @@
|
|||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.refreshId,
|
||||
() => {
|
||||
init();
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
fetchData();
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-[16px]">
|
||||
<div class="flex items-center justify-end gap-[12px]">
|
||||
<MsProjectSelect v-model:project="currentProject" class="w-[240px]" use-default-arrow-icon>
|
||||
<MsProjectSelect
|
||||
v-model:project="currentProject"
|
||||
class="w-[240px]"
|
||||
use-default-arrow-icon
|
||||
@change="handleRefresh"
|
||||
>
|
||||
<template #prefix>
|
||||
{{ t('menu.projectManagementShort') }}
|
||||
</template>
|
||||
|
@ -27,12 +32,43 @@
|
|||
<MsIcon type="icon-icon_reset_outlined" size="14" />
|
||||
</a-button>
|
||||
</div>
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" type="my_create" />
|
||||
<testCaseTable v-if="features.includes(FeatureEnum.TEST_CASE)" :project="currentProject" type="my_create" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" type="my_create" />
|
||||
<apiCaseTable v-if="features.includes(FeatureEnum.API_CASE)" :project="currentProject" type="my_create" />
|
||||
<scenarioCaseTable v-if="features.includes(FeatureEnum.API_SCENARIO)" :project="currentProject" type="my_create" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" type="my_create" />
|
||||
|
||||
<testPlanTable
|
||||
v-if="features.includes(FeatureEnum.TEST_PLAN)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
<testCaseTable
|
||||
v-if="features.includes(FeatureEnum.TEST_CASE)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
<caseReviewTable
|
||||
v-if="features.includes(FeatureEnum.CASE_REVIEW)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
<apiCaseTable
|
||||
v-if="features.includes(FeatureEnum.API_CASE)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
<scenarioCaseTable
|
||||
v-if="features.includes(FeatureEnum.API_SCENARIO)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
<bugTable
|
||||
v-if="features.includes(FeatureEnum.BUG)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_create"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -48,6 +84,7 @@
|
|||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { getGenerateId } from '@/utils';
|
||||
|
||||
import { FeatureEnum } from '@/enums/workbenchEnum';
|
||||
|
||||
|
@ -61,6 +98,7 @@
|
|||
value: key as FeatureEnum,
|
||||
}));
|
||||
const featureAll = ref(true);
|
||||
const refreshId = ref('');
|
||||
|
||||
function handleFeatureAllChange(val: boolean | (string | number | boolean)[]) {
|
||||
features.value = val ? featureOptions.map((item) => item.value) : [];
|
||||
|
@ -73,7 +111,7 @@
|
|||
}
|
||||
|
||||
function handleRefresh() {
|
||||
console.log('refresh');
|
||||
refreshId.value = getGenerateId();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-[16px]">
|
||||
<div class="flex items-center justify-end gap-[12px]">
|
||||
<MsProjectSelect v-model:project="currentProject" class="w-[240px]" use-default-arrow-icon>
|
||||
<MsProjectSelect
|
||||
v-model:project="currentProject"
|
||||
class="w-[240px]"
|
||||
use-default-arrow-icon
|
||||
@change="handleRefresh"
|
||||
>
|
||||
<template #prefix>
|
||||
{{ t('menu.projectManagementShort') }}
|
||||
</template>
|
||||
|
@ -27,12 +32,42 @@
|
|||
<MsIcon type="icon-icon_reset_outlined" size="14" />
|
||||
</a-button>
|
||||
</div>
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" type="my_follow" />
|
||||
<testCaseTable v-if="features.includes(FeatureEnum.TEST_CASE)" :project="currentProject" type="my_follow" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" type="my_follow" />
|
||||
<apiCaseTable v-if="features.includes(FeatureEnum.API_CASE)" :project="currentProject" type="my_follow" />
|
||||
<scenarioCaseTable v-if="features.includes(FeatureEnum.API_SCENARIO)" :project="currentProject" type="my_follow" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" type="my_follow" />
|
||||
<testPlanTable
|
||||
v-if="features.includes(FeatureEnum.TEST_PLAN)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<testCaseTable
|
||||
v-if="features.includes(FeatureEnum.TEST_CASE)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<caseReviewTable
|
||||
v-if="features.includes(FeatureEnum.CASE_REVIEW)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<apiCaseTable
|
||||
v-if="features.includes(FeatureEnum.API_CASE)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<scenarioCaseTable
|
||||
v-if="features.includes(FeatureEnum.API_SCENARIO)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<bugTable
|
||||
v-if="features.includes(FeatureEnum.BUG)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -48,6 +83,7 @@
|
|||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { getGenerateId } from '@/utils';
|
||||
|
||||
import { FeatureEnum } from '@/enums/workbenchEnum';
|
||||
|
||||
|
@ -61,6 +97,7 @@
|
|||
value: key as FeatureEnum,
|
||||
}));
|
||||
const featureAll = ref(true);
|
||||
const refreshId = ref('');
|
||||
|
||||
function handleFeatureAllChange(val: boolean | (string | number | boolean)[]) {
|
||||
features.value = val ? featureOptions.map((item) => item.value) : [];
|
||||
|
@ -73,7 +110,7 @@
|
|||
}
|
||||
|
||||
function handleRefresh() {
|
||||
console.log('refresh');
|
||||
refreshId.value = getGenerateId();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -27,9 +27,24 @@
|
|||
<MsIcon type="icon-icon_reset_outlined" size="14" />
|
||||
</a-button>
|
||||
</div>
|
||||
<testPlanTable v-if="features.includes(FeatureEnum.TEST_PLAN)" :project="currentProject" type="my_follow" />
|
||||
<caseReviewTable v-if="features.includes(FeatureEnum.CASE_REVIEW)" :project="currentProject" type="my_follow" />
|
||||
<bugTable v-if="features.includes(FeatureEnum.BUG)" :project="currentProject" type="my_follow" />
|
||||
<testPlanTable
|
||||
v-if="features.includes(FeatureEnum.TEST_PLAN)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<caseReviewTable
|
||||
v-if="features.includes(FeatureEnum.CASE_REVIEW)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
<bugTable
|
||||
v-if="features.includes(FeatureEnum.BUG)"
|
||||
:project="currentProject"
|
||||
:refresh-id="refreshId"
|
||||
type="my_follow"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -42,6 +57,7 @@
|
|||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { getGenerateId } from '@/utils';
|
||||
|
||||
import { FeatureEnum } from '@/enums/workbenchEnum';
|
||||
|
||||
|
@ -55,6 +71,7 @@
|
|||
value: key as FeatureEnum,
|
||||
}));
|
||||
const featureAll = ref(true);
|
||||
const refreshId = ref('');
|
||||
|
||||
function handleFeatureAllChange(val: boolean | (string | number | boolean)[]) {
|
||||
features.value = val ? featureOptions.map((item) => item.value) : [];
|
||||
|
@ -67,7 +84,7 @@
|
|||
}
|
||||
|
||||
function handleRefresh() {
|
||||
console.log('refresh');
|
||||
refreshId.value = getGenerateId();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue