From 301d47368d613de762f0d780a962656896a9f213 Mon Sep 17 00:00:00 2001 From: yang chen Date: Wed, 24 Dec 2025 10:18:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(screen):=20=E6=9B=B4=E6=96=B0=E4=B8=BB?= =?UTF-8?q?=E5=B1=8F=E5=B9=95=E7=BB=84=E4=BB=B6=E5=92=8C=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整了组件标签格式,移除多余空格 - 修复了导入语句的空格格式问题 - 更新了JSON解析的空格格式 - 修改了工作订单类型从"安全生产"为"物业服务-安全" - 增加了API响应数据的rate字段支持 - 将图表中心显示从总数改为完成率百分比 - 将状态标签从"已作废"更新为"已关闭" - 优化了背景图片的CSS配置 - 添加了空行以提高代码可读性 --- .../screen/components/RiskStatisticsPanel.vue | 21 +- src/views/screen/mainScreen.vue | 195 ++++++++++-------- 2 files changed, 115 insertions(+), 101 deletions(-) diff --git a/src/views/screen/components/RiskStatisticsPanel.vue b/src/views/screen/components/RiskStatisticsPanel.vue index 6636a80..13054ee 100644 --- a/src/views/screen/components/RiskStatisticsPanel.vue +++ b/src/views/screen/components/RiskStatisticsPanel.vue @@ -16,8 +16,8 @@
-
总数
-
{{ item.total }}
+
完成率
+
{{ item.rate }}%
@@ -55,6 +55,7 @@ type StatusKey = 'notStarted' | 'inProgress' | 'done' | 'voided' interface ChartItem { title: string total: number + rate: number status: Record } @@ -62,16 +63,16 @@ const statusList: { key: StatusKey; label: string; color: string }[] = [ { key: 'notStarted', label: '未开始', color: '#2a59ff' }, { key: 'inProgress', label: '进行中', color: '#ff8a00' }, { key: 'done', label: '已完成', color: '#1bd9ff' }, - { key: 'voided', label: '已作废', color: '#9fa0a6' } + { key: 'voided', label: '已关闭', color: '#9fa0a6' } ] const defaultChart: ChartItem[] = [ - { title: '每日检查(维保类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, - { title: '每月检查(维保类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, - { title: '每年检查(维保类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, - { title: '每日检查(巡检类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, - { title: '每月检查(巡检类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, - { title: '每年检查(巡检类)', total: 6, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } } + { title: '每日检查(维保类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, + { title: '每月检查(维保类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, + { title: '每年检查(维保类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, + { title: '每日检查(巡检类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, + { title: '每月检查(巡检类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }, + { title: '每年检查(巡检类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } } ] const tabCharts = ref>({ @@ -114,7 +115,7 @@ const buildOption = (item: ChartItem): EChartsOption => ({ { value: item.status.notStarted, name: '未开始', itemStyle: { color: '#2a59ff' }, label: { show: false } }, { value: item.status.inProgress, name: '进行中', itemStyle: { color: '#ff8a00' }, label: { show: false } }, { value: item.status.done, name: '已完成', itemStyle: { color: '#1bd9ff' }, label: { show: false } }, - { value: item.status.voided, name: '已作废', itemStyle: { color: '#9fa0a6' }, label: { show: false } } + { value: item.status.voided, name: '已关闭', itemStyle: { color: '#9fa0a6' }, label: { show: false } } ], emphasis: { scale: true, scaleSize: 4 } } diff --git a/src/views/screen/mainScreen.vue b/src/views/screen/mainScreen.vue index de25be5..f3e6610 100644 --- a/src/views/screen/mainScreen.vue +++ b/src/views/screen/mainScreen.vue @@ -15,46 +15,50 @@
- +
+ :formalEmployeeCount="dashboardData?.formalEmployeeCount || 0" + :externalStaffCount="dashboardData?.externalStaffCount || 0" + :visitorCount="dashboardData?.visitorCount || 0" + :parkStatistics="dashboardData?.parkStatistics"/> + @tab-change="handleRiskTabChange" :campus_id="query.campus_id"/>
- + + :alertDetails="dashboardData?.timeoutWorkOrders.details" + :sourceIndex="sourceIndex"/>
- +
- +