From 01bf07fc42bfbff94cce8f1a545b18c5b92ec33e Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 26 May 2026 09:22:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E8=AE=A1=E5=88=92=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/plan/interface/index.ts | 28 +- frontend/src/api/plan/plan.ts | 6 +- frontend/src/views/home/components/tree.vue | 94 +++-- .../components/planStatisticsPopup.vue | 385 ++++++++++++++++++ frontend/src/views/plan/planList/index.vue | 21 +- 5 files changed, 505 insertions(+), 29 deletions(-) create mode 100644 frontend/src/views/plan/planList/components/planStatisticsPopup.vue diff --git a/frontend/src/api/plan/interface/index.ts b/frontend/src/api/plan/interface/index.ts index 0460877..4f5297e 100644 --- a/frontend/src/api/plan/interface/index.ts +++ b/frontend/src/api/plan/interface/index.ts @@ -69,5 +69,31 @@ export namespace Plan { maxTime: number; } + export interface PlanStatisticsItem { + itemId: string; + itemName: string; + totalCount: number; + qualifiedCount: number; + unqualifiedCount: number; + passRate: number; + } + + export interface PlanStatistics { + planId: string; + planName: string; + totalCheckCount: number; + checkedDeviceCount: number; + firstQualifiedDeviceCount: number; + secondQualifiedDeviceCount: number; + thirdOrMoreQualifiedDeviceCount: number; + unqualifiedDeviceCount: number; + unqualifiedItemCount: number; + firstPassRate: number; + secondPassRate: number; + thirdOrMorePassRate: number; + unqualifiedRate: number; + itemDistributions: PlanStatisticsItem[]; + } + - } \ No newline at end of file + } diff --git a/frontend/src/api/plan/plan.ts b/frontend/src/api/plan/plan.ts index e172c35..6177e9e 100644 --- a/frontend/src/api/plan/plan.ts +++ b/frontend/src/api/plan/plan.ts @@ -94,6 +94,10 @@ export const staticsAnalyse = (params: { id: string[] }) => { return http.download('/adPlan/analyse', params) } +export const getPlanStatistics = (params: { planId: string }) => { + return http.post(`/adPlan/statistics`, params) +} + //根据计划id分页查询被检设 export const getDevListByPlanId = (params: any) => { return http.post(`/adPlan/listDevByPlanId`, params) @@ -159,4 +163,4 @@ export const importAndMergePlanCheckData = (params: Plan.ResPlan) => { return http.upload(`/adPlan/importAndMergePlanCheckData`, params, { timeout: 60000 * 20 }) -} \ No newline at end of file +} diff --git a/frontend/src/views/home/components/tree.vue b/frontend/src/views/home/components/tree.vue index 64cc7d1..bdad33a 100644 --- a/frontend/src/views/home/components/tree.vue +++ b/frontend/src/views/home/components/tree.vue @@ -29,7 +29,7 @@ @node-click="handleNodeClick" > + + + diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index 0440f42..cc1fba9 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -99,6 +99,16 @@ 被检设备 + + 统计 + + () const errorStandardPopup = ref() const testSourcePopup = ref() const planPopup = ref() +const planStatisticsPopupRef = ref | null>(null) const modeStore = useModeStore() const tableData = ref([]) @@ -530,7 +543,7 @@ const columns = reactive[]>([ isShow: modeStore.currentMode == '比对式' }, - { prop: 'operation', label: '操作', fixed: 'right', minWidth: 250 } + { prop: 'operation', label: '操作', fixed: 'right', minWidth: 320 } ]) function isVisible(row: Plan.ReqPlan) { @@ -654,6 +667,10 @@ const statisticalAnalysis = async (row: Partial = {}) => { useDownload(staticsAnalyse, '分析结果', [row.id], false, '.xlsx') } +const openStatistics = (row: Partial = {}) => { + planStatisticsPopupRef.value?.open(row) +} + const importSubClick = () => { const params = { title: '导入检测计划', @@ -671,4 +688,4 @@ const importResult = async (success: boolean | undefined) => { } - \ No newline at end of file +