diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 92108450d5..6ebbe31ccb 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1550,8 +1550,9 @@ public class TestPlanService { BufferedReader bufferedReader = new BufferedReader(isr); String line = null; while (null != (line = bufferedReader.readLine())) { - line = line.replace("\"#report\"", JSONObject.toJSONString(report)); -// line = line.replace("\"#preview\"", JSONObject.toJSONString(previews)); + if (line.contains("\"#report\"")) { + line = line.replace("\"#report\"", JSONObject.toJSONString(report)); + } line += "\n"; byte[] lineBytes = line.getBytes(StandardCharsets.UTF_8); int start = 0; diff --git a/frontend/src/business/components/settings/router.js b/frontend/src/business/components/settings/router.js index 457b4bb2ba..0cace1c021 100644 --- a/frontend/src/business/components/settings/router.js +++ b/frontend/src/business/components/settings/router.js @@ -42,16 +42,16 @@ export default { component: () => import('@/business/components/settings/workspace/template/IssuesTemplateList'), meta: {workspaceTemplate: true, title: 'workspace.issue_template_manage', permissions: ['WORKSPACE_TEMPLATE:READ+ISSUE_TEMPLATE']}, }, - { - path: 'workspace/template/report', - name: 'testCaseReportTemplate', - component: () => import('@/business/components/settings/workspace/template/TestCaseReportTemplate'), - meta: { - workspaceTemplate: true, - title: 'test_track.plan_view.report_template', - permissions: ['WORKSPACE_TEMPLATE:READ+REPORT_TEMPLATE'] - } - }, + // { + // path: 'workspace/template/report', + // name: 'testCaseReportTemplate', + // component: () => import('@/business/components/settings/workspace/template/TestCaseReportTemplate'), + // meta: { + // workspaceTemplate: true, + // title: 'test_track.plan_view.report_template', + // permissions: ['WORKSPACE_TEMPLATE:READ+REPORT_TEMPLATE'] + // } + // }, { path: 'testresourcepool', component: () => import('@/business/components/settings/system/TestResourcePool'), diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index 0104a7f8de..b0c5aba841 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -195,13 +195,8 @@ - + @exec="openReport(scope.row)"/> @@ -227,14 +222,13 @@ - - {{ $t('test_track.plan.plan_delete_tip') }} + @@ -247,8 +241,6 @@ import MsTableOperatorButton from "../../../common/components/MsTableOperatorBut import MsTableOperator from "../../../common/components/MsTableOperator"; import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem"; import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem"; -import TestReportTemplateList from "../view/comonents/TestReportTemplateList"; -import TestCaseReportView from "../view/comonents/report/TestCaseReportView"; import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm"; import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-components"; import { @@ -267,16 +259,16 @@ import MsTag from "@/business/components/common/components/MsTag"; import MsTestPlanScheduleMaintain from "@/business/components/track/plan/components/ScheduleMaintain"; import {getCurrentProjectID, getCurrentUserId, hasPermission} from "@/common/js/utils"; import PlanRunModeWithEnv from "@/business/components/track/plan/common/PlanRunModeWithEnv"; +import TestPlanReportReview from "@/business/components/track/report/components/TestPlanReportReview"; export default { name: "TestPlanList", components: { + TestPlanReportReview, MsTag, HeaderLabelOperate, HeaderCustom, MsDeleteConfirm, - TestCaseReportView, - TestReportTemplateList, PlanStageTableItem, PlanStatusTableItem, MsTestPlanScheduleMaintain, @@ -446,13 +438,8 @@ export default { this.saveSortField(this.tableHeaderKey,this.condition.orders); this.initTableData(); }, - openTestReportTemplate(data) { - this.$refs.testReportTemplateList.open(data.id); - }, - openReport(planId, reportId) { - if (reportId) { - this.$refs.testCaseReportView.open(planId, reportId); - } + openReport(plan) { + this.$refs.testCaseReportView.open(plan); }, scheduleTask(row) { row.redirectFrom = "testPlan"; diff --git a/frontend/src/business/components/track/report/components/TestPlanReportReview.vue b/frontend/src/business/components/track/report/components/TestPlanReportReview.vue new file mode 100644 index 0000000000..422b920238 --- /dev/null +++ b/frontend/src/business/components/track/report/components/TestPlanReportReview.vue @@ -0,0 +1,97 @@ + + + + +