From 982c97ab82f3beb1b4febcf014562eda34b9fc05 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 29 九月 2026 17:59:41 +0800
Subject: [PATCH] feat(ui): 江苏商贸品牌视觉与首页/登录页改版

---
 src/views/dashboard/analytics/index.vue |  210 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 130 insertions(+), 80 deletions(-)

diff --git a/src/views/dashboard/analytics/index.vue b/src/views/dashboard/analytics/index.vue
index 0687c94..f352c08 100644
--- a/src/views/dashboard/analytics/index.vue
+++ b/src/views/dashboard/analytics/index.vue
@@ -1,90 +1,140 @@
 <script lang="ts" setup>
-import type { AnalysisOverviewItem } from '../../../packages/effects/common-ui/src';
-import type { TabOption } from '../../../packages/types/src';
+import { computed } from 'vue';
+import { useRouter } from 'vue-router';
 
-import {
-  AnalysisChartCard,
-  AnalysisChartsTabs,
-  AnalysisOverview,
-} from '../../../packages/effects/common-ui/src';
-import {
-  SvgBellIcon,
-  SvgCakeIcon,
-  SvgCardIcon,
-  SvgDownloadIcon,
-} from '../../../packages/icons/src';
+import { Page } from '@vben/common-ui';
 
-import AnalyticsTrends from './analytics-trends.vue';
-import AnalyticsVisitsData from './analytics-visits-data.vue';
-import AnalyticsVisitsSales from './analytics-visits-sales.vue';
-import AnalyticsVisitsSource from './analytics-visits-source.vue';
-import AnalyticsVisits from './analytics-visits.vue';
+import { Col, Row } from 'ant-design-vue';
 
-const overviewItems: AnalysisOverviewItem[] = [
-  {
-    icon: SvgCardIcon,
-    title: '鐢ㄦ埛閲�',
-    totalTitle: '鎬荤敤鎴烽噺',
-    totalValue: 120_000,
-    value: 2000,
-  },
-  {
-    icon: SvgCakeIcon,
-    title: '璁块棶閲�',
-    totalTitle: '鎬昏闂噺',
-    totalValue: 500_000,
-    value: 20_000,
-  },
-  {
-    icon: SvgDownloadIcon,
-    title: '涓嬭浇閲�',
-    totalTitle: '鎬讳笅杞介噺',
-    totalValue: 120_000,
-    value: 8000,
-  },
-  {
-    icon: SvgBellIcon,
-    title: '浣跨敤閲�',
-    totalTitle: '鎬讳娇鐢ㄩ噺',
-    totalValue: 50_000,
-    value: 5000,
-  },
-];
+import KpiCards from './modules/kpi-cards.vue';
+import QuickActions from './modules/quick-actions.vue';
+import RecentApplications from './modules/recent-applications.vue';
+import TodoPanel from './modules/todo-panel.vue';
 
-const chartTabs: TabOption[] = [
-  {
-    label: '娴侀噺瓒嬪娍',
-    value: 'trends',
-  },
-  {
-    label: '鏈堣闂噺',
-    value: 'visits',
-  },
-];
+defineOptions({ name: 'DashboardAnalytics' });
+
+// vite.config.ts 娉ㄥ叆鐨勫叕鍙� Logo 璺緞
+declare const __APP_LOGO__: string;
+const brandLogo = __APP_LOGO__ || '/logos/JSSM.svg';
+
+const router = useRouter();
+
+const greeting = computed(() => {
+  const hour = new Date().getHours();
+  if (hour < 6) return '澶滄繁浜�';
+  if (hour < 9) return '鏃╀笂濂�';
+  if (hour < 12) return '涓婂崍濂�';
+  if (hour < 14) return '涓崍濂�';
+  if (hour < 18) return '涓嬪崍濂�';
+  return '鏅氫笂濂�';
+});
+
+const today = computed(() => {
+  const d = new Date();
+  const weekNames = ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'];
+  return `${d.getFullYear()}骞�${d.getMonth() + 1}鏈�${d.getDate()}鏃� 鏄熸湡${weekNames[d.getDay()]}`;
+});
+
+function handleNavigate(name: string) {
+  router.push({ name });
+}
 </script>
 
 <template>
-  <div class="p-5">
-    <AnalysisOverview :items="overviewItems" />
-    <AnalysisChartsTabs :tabs="chartTabs" class="mt-5">
-      <template #trends>
-        <AnalyticsTrends />
-      </template>
-      <template #visits>
-        <AnalyticsVisits />
-      </template>
-    </AnalysisChartsTabs>
-
-    <div class="mt-5 w-full md:flex">
-      <AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="璁块棶鏁伴噺">
-        <AnalyticsVisitsData />
-      </AnalysisChartCard>
-      <AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="璁块棶鏉ユ簮">
-        <AnalyticsVisitsSource />
-      </AnalysisChartCard>
-      <AnalysisChartCard class="mt-5 md:mt-0 md:w-1/3" title="璁块棶鏉ユ簮">
-        <AnalyticsVisitsSales />
-      </AnalysisChartCard>
+  <Page auto-content-height>
+    <!-- 娆㈣繋鏍忥細钘忛潚搴� + 閲戣壊鎻忚竟 -->
+    <div class="elite-hero mb-6">
+      <img alt="" class="elite-hero-mark" :src="brandLogo" />
+      <div class="relative z-10 flex flex-wrap items-center justify-between gap-4">
+        <div>
+          <h1 class="elite-hero-title">{{ greeting }}锛屾杩庡洖鏉�</h1>
+          <p class="elite-hero-date">{{ today }}</p>
+        </div>
+        <div class="elite-status">
+          <span class="elite-status-dot"></span>
+          绯荤粺杩愯涓�
+        </div>
+      </div>
     </div>
-  </div>
+
+    <!-- 绯荤粺鎸囨爣 -->
+    <KpiCards @navigate="handleNavigate" />
+
+    <!-- 寰呭姙 + 蹇嵎鍏ュ彛 -->
+    <Row :gutter="16" class="mb-4">
+      <Col :lg="14" :md="24" :sm="24" :xl="14" :xs="24" class="mb-4">
+        <TodoPanel @navigate="handleNavigate" />
+      </Col>
+      <Col :lg="10" :md="24" :sm="24" :xl="10" :xs="24" class="mb-4">
+        <QuickActions @navigate="handleNavigate" />
+      </Col>
+    </Row>
+
+    <!-- 鏈�杩戣棰樼敵鎶� -->
+    <RecentApplications @navigate="handleNavigate" />
+  </Page>
 </template>
+
+<style scoped>
+/* ===== 娆㈣繋鏍� ===== */
+.elite-hero {
+  position: relative;
+  overflow: hidden;
+  border-radius: 12px;
+  padding: 30px 34px;
+  background:
+    radial-gradient(circle at 88% 12%, rgba(212, 175, 55, 0.08), transparent 50%),
+    linear-gradient(135deg, #123156 0%, #0f2440 58%, #0b1c33 100%);
+  border: 1px solid rgba(212, 175, 55, 0.24);
+  box-shadow: 0 4px 18px rgba(15, 36, 64, 0.12);
+}
+
+/* 鍙充晶娣℃贰鐨勫窘鏍囨按鍗� */
+.elite-hero-mark {
+  position: absolute;
+  top: 50%;
+  right: 168px;
+  width: 118px;
+  height: 118px;
+  pointer-events: none;
+  opacity: 0.05;
+  transform: translateY(-50%);
+}
+
+.elite-hero-title {
+  margin: 0;
+  font-size: 22px;
+  font-weight: 600;
+  letter-spacing: 2px;
+  color: #f5f0e4;
+}
+
+.elite-hero-date {
+  margin: 8px 0 0;
+  font-size: 13px;
+  letter-spacing: 1px;
+  color: rgba(212, 175, 55, 0.85);
+}
+
+.elite-status {
+  display: inline-flex;
+  align-items: center;
+  gap: 8px;
+  padding: 7px 16px;
+  font-size: 12.5px;
+  letter-spacing: 1px;
+  color: #f0e2b8;
+  background: rgba(212, 175, 55, 0.12);
+  border: 1px solid rgba(212, 175, 55, 0.38);
+  border-radius: 999px;
+}
+
+/* 闈欐�佺姸鎬佺偣锛屼笉鍋氳剦鍐插姩鐢� */
+.elite-status-dot {
+  display: inline-flex;
+  width: 7px;
+  height: 7px;
+  border-radius: 999px;
+  background: #d4af37;
+}
+</style>

--
Gitblit v1.9.3