From 17b92e9b60dda6dcc20c748046a5ff3c3958d52e Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期五, 28 八月 2026 16:19:11 +0800
Subject: [PATCH] 增加首页大屏显示
---
src/modules/report/views/screen/participation.vue | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/src/modules/report/views/screen/participation.vue b/src/modules/report/views/screen/participation.vue
index 565d355..4653c74 100644
--- a/src/modules/report/views/screen/participation.vue
+++ b/src/modules/report/views/screen/participation.vue
@@ -2,13 +2,13 @@
<div class="screen-page">
<el-row :gutter="10" class="kpi-row">
<el-col v-for="item in kpis" :key="item.label" :lg="4" :sm="12" :xs="24">
- <kpi-card v-bind="item" />
+ <kpi-card v-bind="item" :demo="isDemoField(item.field)" />
</el-col>
</el-row>
<el-row :gutter="10" class="mid-row">
<el-col :lg="14" :xs="24">
- <panel-card title="鍙備笌瓒嬪娍" sub="鍙湪浜烘暟涓庢姇閫掓鏁颁箣闂村垏鎹�">
+ <panel-card title="鍙備笌瓒嬪娍" sub="鍙湪浜烘暟涓庢姇閫掓鏁颁箣闂村垏鎹�" :demo="participationTrendDemo">
<template #extra>
<cl-select-button v-model="trendKind" :options="trendOptions" small />
</template>
@@ -16,7 +16,7 @@
</panel-card>
</el-col>
<el-col :lg="10" :xs="24">
- <panel-card title="纰崇Н鍒嗘祦杞�" sub="绗竴鐗堢敤娴佸悜锛屼笉鍋� Sankey">
+ <panel-card title="纰崇Н鍒嗘祦杞�" sub="绗竴鐗堢敤娴佸悜锛屼笉鍋� Sankey" :demo="isDemoSection('pointFlow')">
<div class="flow">
<div class="flow__node is-in">
<span>鍙戞斁</span>
@@ -49,7 +49,7 @@
<el-row :gutter="10">
<el-col :span="24">
- <panel-card title="缁勭粐鎺掕姒�" sub="浜哄潎鎸夊弬涓庝汉鏁帮紱闄㈢郴涓嶇粺璁″弬涓庣巼">
+ <panel-card title="缁勭粐鎺掕姒�" sub="浜哄潎鎸夊弬涓庝汉鏁帮紱闄㈢郴涓嶇粺璁″弬涓庣巼" :demo="rankDemo">
<template #extra>
<div class="rank-tools">
<cl-select-button v-model="rankOrg" :options="orgOptions" small />
@@ -72,9 +72,10 @@
import KpiCard from '../../components/kpi-card.vue';
import PanelCard from '../../components/panel-card.vue';
import { type RankMetric } from '../../data/screen';
-import { useChartTheme, useScreenData } from '../../hooks/use-screen';
+import { useChartTheme, useScreenData, useScreenFieldSource } from '../../hooks/use-screen';
const { data } = useScreenData();
+const { isDemoField, isDemoSection } = useScreenFieldSource();
const { textColor, mutedColor, splitColor, primary, baseGrid, axisStyle, tooltip } = useChartTheme();
const trendKind = ref<'people' | 'times'>('people');
@@ -101,14 +102,24 @@
];
const kpis = computed(() => [
- { label: '鍙備笌甯堢敓', value: data.value.kpis.totalParticipants, suffix: '浜�', fixed: 0 },
- { label: '鍙備笌鐜�', value: data.value.kpis.participateRate, suffix: '%', fixed: 1, hint: '鍙備笌浜烘暟 / 鍙傛暟 student.count.{閮ㄩ棬ID}' },
- { label: '鏈尯闂存柊澧炲弬涓�', value: data.value.kpis.newParticipants, suffix: '浜�', fixed: 0, hint: '鍖洪棿鍐呭嚭鐜拌繃鐨勫幓閲嶇敤鎴�' },
- { label: '纰崇Н鍒嗗彂鏀�', value: data.value.kpis.pointsIssued, suffix: '鍒�', fixed: 0 },
- { label: '纰崇Н鍒嗘秷璐�', value: data.value.kpis.pointsConsumed, suffix: '鍒�', fixed: 0 },
- { label: '纰崇Н鍒嗕綑棰�', value: data.value.kpis.pointsBalance, suffix: '鍒�', fixed: 0 }
+ { field: 'kpis.totalParticipants', label: '鍙備笌甯堢敓', value: data.value.kpis.totalParticipants, suffix: '浜�', fixed: 0 },
+ { field: 'kpis.participateRate', label: '鍙備笌鐜�', value: data.value.kpis.participateRate, suffix: '%', fixed: 1, hint: '鍙備笌浜烘暟 / 鍙傛暟 student.count.{閮ㄩ棬ID}' },
+ { field: 'kpis.newParticipants', label: '鏈尯闂存柊澧炲弬涓�', value: data.value.kpis.newParticipants, suffix: '浜�', fixed: 0, hint: '鍖洪棿鍐呭嚭鐜拌繃鐨勫幓閲嶇敤鎴�' },
+ { field: 'kpis.pointsIssued', label: '纰崇Н鍒嗗彂鏀�', value: data.value.kpis.pointsIssued, suffix: '鍒�', fixed: 0 },
+ { field: 'kpis.pointsConsumed', label: '纰崇Н鍒嗘秷璐�', value: data.value.kpis.pointsConsumed, suffix: '鍒�', fixed: 0 },
+ { field: 'kpis.pointsBalance', label: '纰崇Н鍒嗕綑棰�', value: data.value.kpis.pointsBalance, suffix: '鍒�', fixed: 0 }
]);
+const participationTrendDemo = computed(() =>
+ trendKind.value === 'people' ? isDemoSection('participateTrend') : isDemoSection('deliverTrend')
+);
+
+const rankDemo = computed(() => {
+ if (rankOrg.value === 'major') return isDemoSection('majorRank');
+ if (rankOrg.value === 'dept') return isDemoSection('deptRank');
+ return isDemoSection('classRank');
+});
+
const trendOption = computed(() => ({
grid: baseGrid(),
tooltip: { trigger: 'axis', ...tooltip() },
--
Gitblit v1.9.1