fix(测试计划): 修复测试计划报告缺陷跳转详情

This commit is contained in:
xinxin.wu 2024-07-18 18:36:02 +08:00 committed by 刘瑞斌
parent 039572994c
commit 56686a2bad
1 changed files with 18 additions and 1 deletions

View File

@ -1,22 +1,32 @@
<template> <template>
<MsBaseTable v-bind="propsRes" v-on="propsEvent"> </MsBaseTable> <MsBaseTable v-bind="propsRes" v-on="propsEvent">
<template #num="{ record }">
<MsButton :disabled="!props.isPreview" type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
</template>
</MsBaseTable>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { TableSortable } from '@arco-design/web-vue'; import { TableSortable } from '@arco-design/web-vue';
import { cloneDeep } from 'lodash-es'; import { cloneDeep } from 'lodash-es';
import MsButton from '@/components/pure/ms-button/index.vue';
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 { getReportBugList, getReportShareBugList } from '@/api/modules/test-plan/report'; import { getReportBugList, getReportShareBugList } from '@/api/modules/test-plan/report';
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useOpenNewPage from '@/hooks/useOpenNewPage';
import { ReportBugItem } from '@/models/testPlan/report';
import { BugManagementRouteEnum } from '@/enums/routeEnum';
import { ReportCardTypeEnum } from '@/enums/testPlanReportEnum'; import { ReportCardTypeEnum } from '@/enums/testPlanReportEnum';
import { detailTableExample } from '@/views/test-plan/report/detail/component/reportConfig'; import { detailTableExample } from '@/views/test-plan/report/detail/component/reportConfig';
const { openNewPage } = useOpenNewPage();
const { t } = useI18n(); const { t } = useI18n();
const props = defineProps<{ const props = defineProps<{
@ -84,6 +94,13 @@
loadList(); loadList();
} }
//
function toDetail(record: ReportBugItem) {
openNewPage(BugManagementRouteEnum.BUG_MANAGEMENT_INDEX, {
id: record.id,
});
}
watch( watch(
[() => props.reportId, () => props.isPreview], [() => props.reportId, () => props.isPreview],
() => { () => {