From 1cf342fa23a6c34bd9dd1ff4e416cd255c044fdd Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 02 四月 2026 11:41:17 +0800
Subject: [PATCH] Merge branch 'dev_银川_中盛建材' of http://114.132.189.42:9002/r/product-inventory-management into dev_银川_中盛建材

---
 src/views/index.vue | 2369 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 1,584 insertions(+), 785 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index 154c476..cf17886 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -1,802 +1,1601 @@
 <template>
-	<div class="dashboard">
-		<!-- 椤堕儴妯悜涓ゆ爮 -->
-		<div class="dashboard-top">
-			<!-- 宸︼細浼佷笟淇℃伅+涓夊ぇ鏁版嵁鍗$墖锛堜笂涓嬫帓鍒楋級 -->
-			<div class="top-left">
-				<div class="company-info">
-					<div class="section-title">鐧婚檰淇℃伅</div>
-					<div style="display: flex;align-items: center;gap: 20px">
-						<img :src="userStore.avatar" class="avatar" alt=""/>
-						<div class="company-card">
-							<div class="company-name">{{userStore.name}}</div>
-							<div class="company-meta">{{userStore.roleName}}</div>
-						</div>
-						<div style="display: flex;align-items: center;gap: 8px">
-							<el-icon color="#5053B5" size="22"><Clock /></el-icon>
-							<span>鐧婚檰鏃ユ湡锛歿{userStore.currentLoginTime}}</span>
-						</div>
-					</div>
-				</div>
-				<div class="data-cards">
-					<div class="data-card sales">
-						<div class="data-title">閿�鍞暟鎹�</div>
-						<div class="data-num">
-							<div>
-								<div class="data-desc">鏈湀閿�鍞/鍏�</div>
-								<div class="data-value">{{businessInfo.monthSaleMoney}}</div>
-							</div>
-							<div>
-								<div class="data-desc">鏈紑绁ㄩ噾棰�/鍏�</div>
-								<div class="data-value">{{businessInfo.monthSaleHaveMoney}}</div>
-							</div>
-						</div>
-						
-					</div>
-					<div class="data-card purchase">
-						<div class="data-title">閲囪喘鏁版嵁</div>
-						<div class="data-num">
-							<div>
-								<div class="data-desc">鏈湀閲囪喘棰�/鍏�</div>
-								<div class="data-value">{{businessInfo.monthPurchaseMoney}}</div>
-							</div>
-							<div>
-								<div class="data-desc">寰呬粯娆鹃噾棰�/鍏�</div>
-								<div class="data-value">{{businessInfo.monthPurchaseHaveMoney}}</div>
-							</div>
-						</div>
-					</div>
-					<div class="data-card inventory">
-						<div class="data-title">搴撳瓨鏁版嵁</div>
-						<div class="data-num">
-							<div>
-								<div class="data-desc">褰撳墠搴撳瓨鎬婚噺/浠�</div>
-								<div class="data-value">{{businessInfo.inventoryNum}}</div>
-							</div>
-							<div>
-								<div class="data-desc">浠婃棩鍏ュ簱/浠�</div>
-								<div class="data-value">{{businessInfo.todayInventoryNum}}</div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-			<!-- 鍙筹細寰呭姙浜嬮」 -->
-			<div class="todo-panel">
-				<div class="section-title">寰呭姙浜嬮」</div>
-				<ul class="todo-list" v-if="todoList.length > 0">
-					<li v-for="item in todoList" :key="item.id">
-						<div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px">
-							<div style="display: flex;justify-content: space-between;align-items: center;">
-								<div class="todo-title">寰呭姙缂栧彿锛歿{item.approveId}}</div>
-								<div class="todo-division">閮ㄩ棬锛歿{item.approveDeptName}}</div>
-								<div class="todo-time">{{item.approveTime}}</div>
-							</div>
-							<div class="todo-division">寰呭姙浜嬬敱锛歿{item.approveReason}}</div>
-						</div>
-					</li>
-				</ul>
-				<div v-else style="text-align: center">
-					鏆傛棤鏁版嵁
-				</div>
-			</div>
-		</div>
-		
-		<!-- 涓儴妯悜涓ゆ爮 -->
-		<div class="dashboard-row">
-			<div class="main-panel">
-				<div class="section-title">瀹㈡埛鍚堝悓閲戦鍒嗘瀽</div>
-				<div class="contract-summary">
-					<div class="contract-info">
-						<img src="../assets/images/khtitle.png" alt="" style="width: 42px"/>
-						<div class="contract-card">
-							<div class="contract-name">鎬诲悎鍚岄噾棰�(鍏�)</div>
-							<div class="contract-meta">
-								<div class="main-amount">{{sum}}</div>
-								<div>鍛ㄥ悓姣�: <span class="up">{{yny}}% </span> 鏃ョ幆姣�: <span class="up">{{chain}}% </span></div>
-							</div>
-						</div>
-					</div>
-				</div>
-				<div style="display: flex;align-items: center;gap: 20px;justify-content: space-evenly;height: 180px;margin-top: 20px">
-					<div>
-						<Echarts ref="chart" :legend="pieLegend" :chartStyle="chartStylePie"
-										 :series="materialPieSeries"
-										 :tooltip="pieTooltip"></Echarts>
-					</div>
-					<ul class="contract-list">
-						<li v-for="item in materialPieSeries[0].data" :key="item.name">
-							<div style="display: flex;align-items: center;justify-content: space-between;width: 100%">
-								<div class="line" :style="{color: item.itemStyle.color}">鈼弡{item.name}}</div>
-								<div style="width: 70px">{{item.rate}}%</div>
-								<div>锟{item.value}}</div>
-							</div>
-						</li>
-					</ul>
-				</div>
-			</div>
-			<div class="main-panel">
-				<div style="display: flex;justify-content: space-between;">
-					<div class="section-title">搴旀敹搴斾粯缁熻</div>
-					<el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">
-						<el-radio-button label="鎸夊懆" :value="1" />
-						<el-radio-button label="鎸夋湀" :value="2" />
-						<el-radio-button label="鎸夊搴�" :value="3" />
-					</el-radio-group>
-				</div>
-				<Echarts ref="chart"
-								 :color="barColors2"
-								 :chartStyle="chartStyle"
-								 :grid="grid"
-								 :series="barSeries"
-								 :tooltip="tooltip"
-								 :xAxis="xAxis"
-								 :yAxis="yAxis"
-								 style="height: 260px"></Echarts>
-			</div>
-		</div>
-		
-		<!-- 搴曢儴妯悜涓ゆ爮 -->
-		<div class="dashboard-row">
-			<div class="main-panel">
-				<div class="section-title">璐ㄩ噺缁熻</div>
-				<div class="quality-cards">
-					<div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{qualityStatisticsObject.supplierNum}}浠�</span></div>
-					<div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{qualityStatisticsObject.processNum}}浠�</span></div>
-					<div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{qualityStatisticsObject.factoryNum}}浠�</span></div>
-				</div>
-				<Echarts ref="chart"
-								 :chartStyle="chartStyle"
-								 :grid="grid"
-								 :legend="barLegend"
-								 :series="barSeries1"
-								 :tooltip="tooltip"
-								 :xAxis="xAxis1"
-								 :yAxis="yAxis1"
-								 style="height: 260px"></Echarts>
-			</div>
-			<div class="main-panel">
-				<div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>
-				<Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="lineLegend" :series="lineSeries"
-								 :tooltip="tooltipLine" :xAxis="xAxis2" :yAxis="yAxis2" style="height: 270px;"></Echarts>
-			</div>
-		</div>
-	</div>
+  <div class="home-page">
+    <div class="top-bar">
+      <div class="user-box">
+        <img :src="userStore.avatar"
+             class="avatar"
+             alt="" />
+        <div>
+          <div class="hello">{{ userStore.roleName || "绯荤粺绠$悊鍛�" }}锛屼綘濂�</div>
+          <div class="sub">鐧诲綍鏃堕棿锛歿{ userStore.currentLoginTime }}</div>
+        </div>
+      </div>
+      <div class="top-actions">
+        <span class="refresh-time">鏁版嵁鏇存柊鏃堕棿锛歿{ lastUpdatedAt || "-" }}</span>
+        <el-button size="small"
+                   type="primary"
+                   plain
+                   @click="refreshDashboardData">鍒锋柊鏁版嵁</el-button>
+        <!-- <el-button size="small"
+                   plain
+                   @click="configDialogVisible = true">棣栭〉閰嶇疆</el-button> -->
+      </div>
+    </div>
+    <div class="content-grid">
+      <div class="left-col">
+        <section class="section-card">
+          <div class="section-title-row">
+            <div class="section-title">蹇嵎鎿嶄綔</div>
+            <el-button size="small"
+                       type="primary"
+                       link
+                       @click="openShortcutDialog">娣诲姞蹇嵎鍏ュ彛</el-button>
+          </div>
+          <div class="quick-grid">
+            <el-button v-for="item in shortcuts"
+                       :key="`${item.label}-${item.path}`"
+                       :type="item.invalid ? 'danger' : 'default'"
+                       @click="goTo(item.path)">
+              {{ item.label }}
+            </el-button>
+          </div>
+        </section>
+        <!-- <section class="section-card">
+          <div class="section-title">閲嶇偣寰呭姙</div>
+          <div class="todo-row"
+               v-for="todo in todos"
+               :key="todo.title">
+            <el-tag size="small"
+                    :type="todo.type">{{ todo.level }}</el-tag>
+            <span>{{ todo.title }}</span>
+          </div>
+        </section> -->
+        <section class="section-card">
+          <div class="section-title">缁忚惀鍏虫敞</div>
+          <div class="focus-row"
+               v-for="item in businessFocus"
+               :key="item.name">
+            <span class="focus-name">{{ item.name }}</span>
+            <span class="focus-value">{{ item.value }}</span>
+          </div>
+        </section>
+        <section class="section-card flex-fill-card">
+          <div class="section-title-row">
+            <div class="section-title">鍖哄煙閿�鍞噾棰濆垎鏋�</div>
+            <el-radio-group v-model="chartProductType2"
+                            size="small"
+                            @change="fetchSalesAmountChartData">
+              <el-radio-button label="鏉挎潗">鏉挎潗</el-radio-button>
+              <el-radio-button label="鐮屽潡">鐮屽潡</el-radio-button>
+            </el-radio-group>
+          </div>
+          <Echarts :chartStyle="chartStyle"
+                   :grid="grid"
+                   :tooltip="barTooltip"
+                   :xAxis="salesAmountXAxis"
+                   :yAxis="salesAmountYAxis"
+                   :series="salesAmountSeries"
+                   style="height: 90%" />
+        </section>
+      </div>
+      <div class="right-col">
+        <!-- <section class="section-card"
+                 v-if="isSectionVisible('trendCards')">
+          <div class="section-title">鏈�杩�7澶╁叧閿寚鏍囪秼鍔�</div>
+          <div class="trend-cards">
+            <div class="trend-card clickable"
+                 v-for="card in recentTrendCards"
+                 :key="card.key"
+                 @click="handleTrendCardClick(card)">
+              <div class="trend-head">
+                <span class="trend-label">{{ card.label }}</span>
+                <span class="trend-rate"
+                      :class="trendClass(card.change)">
+                  {{ card.change > 0 ? "+" : "" }}{{ card.change.toFixed(1) }}%
+                </span>
+              </div>
+              <div class="trend-value">{{ card.latest }} {{ card.unit }}</div>
+              <div class="sparkline">
+                <span v-for="(v, idx) in card.values"
+                      :key="`${card.key}-${idx}`"
+                      class="sparkline-bar"
+                      :style="{ height: `${calcBarHeight(v, card.values)}%` }" />
+              </div>
+            </div>
+          </div>
+        </section> -->
+        <section class="section-card"
+                 v-if="isSectionVisible('planTrend')">
+          <div class="section-title-row">
+            <div class="section-title">璁″垝涓庣敓浜ц秼鍔�</div>
+            <el-radio-group v-model="chartRangePlan"
+                            size="small"
+                            @change="loadPlanTrend">
+              <el-radio-button :label="1">鏃�</el-radio-button>
+              <el-radio-button :label="2">鍛�</el-radio-button>
+              <el-radio-button :label="3">鏈�</el-radio-button>
+            </el-radio-group>
+          </div>
+          <Echarts :chartStyle="chartStyle"
+                   :legend="planLegend"
+                   :grid="grid"
+                   :tooltip="lineTooltip"
+                   :xAxis="planXAxis"
+                   :yAxis="valueYAxis"
+                   :series="planSeries"
+                   style="height: 300px" />
+        </section>
+        <div class="row-two"
+             v-if="isSectionVisible('qualityChart') || isSectionVisible('costChart')">
+          <section class="section-card"
+                   v-if="isSectionVisible('qualityChart')">
+            <div class="section-title">浠婂勾鑳借�楃敤閲忚秼鍔�</div>
+            <Echarts :chartStyle="chartStyle"
+                     :grid="grid"
+                     :tooltip="barTooltip"
+                     :xAxis="energyConsumptionXAxis"
+                     :yAxis="valueYAxis"
+                     :series="energyConsumptionSeries"
+                     style="height: 260px" />
+          </section>
+          <section class="section-card"
+                   v-if="isSectionVisible('costChart')">
+            <div class="section-title">浠婂勾鑳借�楃被鍨嬪崰姣�</div>
+            <Echarts :chartStyle="chartStyle"
+                     :tooltip="pieTooltip"
+                     :series="energyTypeSeries"
+                     style="height: 260px" />
+          </section>
+        </div>
+        <!-- <section class="section-card"
+                 v-if="isSectionVisible('warningCenter')">
+          <div class="section-title">寮傚父棰勮涓績</div>
+          <div class="warning-row"
+               v-for="item in warningList"
+               :key="item.id">
+            <div class="warning-left">
+              <el-tag size="small"
+                      :type="item.levelType">{{ item.levelText }}</el-tag>
+              <span class="warning-title">{{ item.title }}</span>
+            </div>
+            <el-button link
+                       type="danger"
+                       @click="goTo(item.path)">澶勭悊</el-button>
+          </div>
+          <el-empty v-if="warningList.length === 0"
+                    description="鏆傛棤寮傚父棰勮"
+                    :image-size="80" />
+        </section> -->
+        <section class="section-card mini-table-wrap"
+                 v-if="isSectionVisible('planTable')">
+          <div class="section-title">鏈�杩戞姤宸�</div>
+          <el-table :data="reportingTable"
+                    size="small"
+                    stripe
+                    :loading="reportingTableLoading">
+            <el-table-column prop="productNo"
+                             label="鎶ュ伐缂栧彿"
+                             min-width="150" />
+            <el-table-column prop="schedule"
+                             label="鐝粍"
+                             min-width="80">
+              <template #default="{ row }">
+                <el-tag :type="row.schedule === '鐧界彮' ? 'primary' : 'warning'">{{ row.schedule || '-' }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="postName"
+                             label="鍒涘缓浜�"
+                             min-width="100" />
+            <el-table-column prop="createTime"
+                             label="鎶ュ伐鏃堕棿"
+                             min-width="150">
+              <template #default="{ row }">
+                {{ row.createTime ? dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="productName"
+                             label="浜у搧"
+                             min-width="120">
+              <template #default="{ row }">
+                <el-tag :type="row.productName === '鐮屽潡' ? 'primary' : 'warning'">{{ row.productName || '-' }}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="totalQuantity"
+                             label="鐢熶骇鏁伴噺"
+                             min-width="100">
+              <template #default="{ row }">
+                <span style="color:rgba(18, 148, 212, 0.8);">{{ row.totalQuantity || '-' }}</span> 鏂�
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity"
+                             label="鍚堟牸鏁伴噺"
+                             min-width="100">
+              <template #default="{ row }">
+                <span style="color:rgba(0, 228, 99, 0.8);">{{ row.quantity || '-' }}</span> 鏂�
+              </template>
+            </el-table-column>
+          </el-table>
+        </section>
+      </div>
+    </div>
+    <el-dialog v-model="shortcutDialogVisible"
+               title="娣诲姞蹇嵎鍏ュ彛锛堟渶澶�6涓級"
+               width="680px">
+      <div class="shortcut-form-row">
+        <el-tree-select v-model="selectedPagePath"
+                        placeholder="璇烽�夋嫨椤甸潰锛堢洰褰曚笉鍙�夛級"
+                        filterable
+                        clearable
+                        check-strictly
+                        node-key="value"
+                        :data="menuTreeOptions"
+                        :props="{ label: 'label', value: 'value', children: 'children', disabled: 'disabled' }"
+                        style="grid-column: span 2" />
+        <el-button type="success"
+                   @click="addShortcutBySelect">閫夋嫨娣诲姞</el-button>
+      </div>
+      <el-table :data="shortcuts"
+                size="small"
+                border>
+        <el-table-column prop="label"
+                         label="鍚嶇О"
+                         min-width="220" />
+        <el-table-column label="鐘舵��"
+                         min-width="80">
+          <template #default="{ row }">
+            <el-tag size="small"
+                    :type="row.invalid ? 'danger' : 'success'">{{ row.invalid ? "鏃犳晥" : "鏈夋晥" }}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="鎿嶄綔"
+                         min-width="90"
+                         align="center">
+          <template #default="{ $index }">
+            <el-button link
+                       type="danger"
+                       @click="removeShortcut($index)">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+    <el-dialog v-model="configDialogVisible"
+               title="棣栭〉妯″潡閰嶇疆"
+               width="520px">
+      <el-checkbox-group v-model="enabledSectionKeys"
+                         class="config-check-group">
+        <el-checkbox v-for="item in sectionConfigOptions"
+                     :key="item.key"
+                     :label="item.key">
+          {{ item.label }}
+        </el-checkbox>
+      </el-checkbox-group>
+      <template #footer>
+        <el-button @click="configDialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary"
+                   @click="saveSectionConfig">淇濆瓨</el-button>
+      </template>
+    </el-dialog>
+  </div>
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue'
-import Echarts from "@/components/Echarts/echarts.vue";
-import * as echarts from 'echarts';
-import useUserStore from "@/store/modules/user.js";
-import {
-	analysisCustomerContractAmounts, getAmountHalfYear,
-	getBusiness,
-	homeTodos,
-	qualityStatistics,
-	statisticsReceivablePayable
-} from "@/api/viewIndex.js";
+  import { computed, onMounted, reactive, ref } from "vue";
+  import { useRouter } from "vue-router";
+  import { ElMessage } from "element-plus";
+  import Echarts from "@/components/Echarts/echarts.vue";
+  import useUserStore from "@/store/modules/user.js";
+  import usePermissionStore from "@/store/modules/permission";
+  import {
+    expenseCompositionAnalysis,
+    getProgressStatistics,
+    homeTodos,
+    orderCount,
+    processDataProductionStatistics,
+    qualityInspectionStatistics,
+    nonComplianceWarning,
+    getManageStatistics,
+  } from "@/api/viewIndex.js";
+  import { energyConsumptionDetailStatistics } from "@/api/energyManagement/energyType";
+  import { getSalesAmountAnalysis } from "@/api/reportAnalysis/salesStatistics";
+  import { productionReportListPage } from "@/api/productionManagement/productionReporting.js";
+  import dayjs from "dayjs";
 
-const userStore = useUserStore()
+  const router = useRouter();
+  const userStore = useUserStore();
+  const permissionStore = usePermissionStore();
 
-const businessInfo = ref({
-	inventoryNum: 0,
-	monthPurchaseHaveMoney: 0,
-	monthPurchaseMoney: 0,
-	monthSaleHaveMoney: 0,
-	monthSaleMoney: 0,
-	todayInventoryNum: 0,
-})
-const qualityStatisticsObject = ref({
-	supplierNum: 0,
-	processNum: 0,
-	factoryNum: 0,
-})
-const sum = ref(0)
-const yny = ref(0)
-const chain = ref(0)
+  const SHORTCUT_STORAGE_KEY = "home-shortcuts-v1";
 
-const pieLegend = reactive({
-	show: false,
-})
-const barSeries = ref([
-	{
-		type: 'bar',
-		data: [],
-		label: {
-			show: true,
-		}
-	},
-])
-const barSeries1 = ref([
-	{
-		name: '鍘熸潗鏂欎笉鍚堟牸鏁�',
-		type: 'bar',
-		barGap: 0,
-		emphasis: {
-			focus: 'series'
-		},
-		data: []
-	},
-	{
-		name: '杩囩▼涓嶅悎鏍兼暟',
-		type: 'bar',
-		emphasis: {
-			focus: 'series'
-		},
-		data: []
-	},
-	{
-		name: '鍑哄巶涓嶅悎鏍兼暟',
-		type: 'bar',
-		emphasis: {
-			focus: 'series'
-		},
-		data: []
-	},
-])
-const chartStyle = {
-	width: '100%',
-	height: '100%' // 璁剧疆鍥捐〃瀹瑰櫒鐨勯珮搴�
-}
-const chartStylePie = {
-	width: '140%',
-	height: '140%' // 璁剧疆鍥捐〃瀹瑰櫒鐨勯珮搴�
-}
-const grid = {
-	left: '3%',
-		right: '4%',
-		bottom: '3%',
-		containLabel: true
-}
-const barLegend = {
-	show: true,
-	data: ['鍘熸潗鏂欎笉鍚堟牸鏁�', '杩囩▼涓嶅悎鏍兼暟', '鍑哄巶涓嶅悎鏍兼暟']
-}
-const barLegend1 = {
-	show: true,
-	data: ['棰勪粯璐︽', '搴斾粯璐︽', '棰勬敹璐︽', '搴旀敹璐︽']
-}
-const lineLegend = {
-	show: true,
-	data: ['寮�绁�', '鍥炴']
-}
-const tooltip = {
-	trigger: 'axis',
-	axisPointer: {
-		type: 'shadow'
-	}
-}
-const xAxis = [{
-	type: 'value',
-}]
-const xAxis1 = ref([{
-	type: 'category',
-	axisTick: { show: false },
-	data: []
-}])
-const yAxis = [{
-	type: 'category',
-	data: [ '搴斾粯璐︽', '搴旀敹璐︽',]
-}]
-const yAxis1 = [{
-	type: 'value'
-}]
-const pieTooltip = reactive({
-	trigger: 'item',
-	formatter: function (params) {
-		// 鍔ㄦ�佺敓鎴愭彁绀轰俊鎭紝鍩轰簬鏁版嵁椤圭殑 name 灞炴��
-		const description = params.name === '鏈湀鍥炴閲戦' ? '鏈湀鍥炴閲戦' : '搴旀敹娆鹃噾棰�';
-		return `${description} ${formatNumber(params.value)}鍏� ${params.percent}%`;
-	},
-	position: 'right'
-})
-const materialPieSeries = ref([
-	{
-		type: 'pie',
-		radius: ['66%', '90%'],
-		avoidLabelOverlap: false,
-		itemStyle: {
-			borderColor: '#fff',
-			borderWidth: 2
-		},
-		label: {
-			show: false
-		},
-		data: []
-	}
-])
-const lineSeries = ref([
-	{
-		type: 'line',
-		data: [],
-		label: {
-			show: true
-		},
-    showSymbol: true, // 鏄剧ず鍦嗙偣
-	},
-])
-const tooltipLine = {
-	trigger: 'axis',
-}
-const yAxis2 = ref([
-	{
-		type: 'value',
-	}
-])
-const xAxis2 = ref([
-	{
-		type: 'category',
-		data: [],
-		axisLabel: {
-			interval: 0,
-			formatter: function(value) {
-				return value.replace(/~/g, '\n');
-			},
-		}
-	}
-])
+  const defaultShortcuts = [
+    { label: "涓荤敓浜ц鍒�", path: "/productionManagement/productionPlan" },
+    { label: "鐢熶骇璁㈠崟", path: "/productionManagement/productionOrder" },
+    { label: "鐢熶骇鎶ュ伐", path: "/productionManagement/productionReporting" },
+    { label: "杩囩▼妫�", path: "/qualityManagement/processInspection" },
+    { label: "鐢熶骇鑳借��", path: "/energyManagement/productionEnergyConsumption" },
+    { label: "鐢熶骇鎴愭湰", path: "/costAccounting/productionCostAccounting" },
+    { label: "鏍囧噯vs瀹為檯", path: "/costAccounting/stdVsActCostAnalysis" },
+    { label: "鍐崇瓥鍒嗘瀽", path: "/reportAnalysis/dataDashboard" },
+  ];
 
-// 寰呭姙浜嬮」
-const todoList = ref([])
-const radio1 = ref(1)
+  const isRouteValid = path => {
+    if (!path || !path.startsWith("/")) return false;
+    const resolved = router.resolve(path);
+    return resolved.matched && resolved.matched.length > 0;
+  };
 
-// 鍥捐〃寮曠敤
-const barChart = ref(null)
-const lineChart = ref(null)
-const barColors2 = ['#5181DB', '#D369E0', '#F2CA6D', '#60CCA8']
-
-// 闅忔満棰滆壊鐢熸垚鍑芥暟
-const getRandomColor = () => {
-  return '#' + Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0');
-}
-
-onMounted(() => {
-	getBusinessData()
-	analysisCustomer()
-	todoInfoS()
-	statisticsReceivable()
-	qualityStatisticsInfo()
-	getAmountHalfYearNum()
-})
-// 鏁版嵁缁熻
-const getBusinessData = () => {
-	getBusiness().then((res) => {
-		businessInfo.value = {...res.data}
-	})
-}
-// 鍚堝悓閲戦
-const analysisCustomer = () => {
-	analysisCustomerContractAmounts().then((res) => {
-		sum.value = res.data.sum
-		yny.value = res.data.yny
-		chain.value = res.data.chain
-    // 涓烘瘡涓暟鎹」鍒嗛厤闅忔満棰滆壊
-    materialPieSeries.value[0].data = res.data.item.map(item => ({
+  const withValidFlag = list =>
+    list.map(item => ({
       ...item,
-      itemStyle: { color: getRandomColor() }
+      invalid: !isRouteValid(item.path),
+    }));
+
+  const pageOptions = router
+    .getRoutes()
+    .filter(route => {
+      const hasTitle = Boolean(route.meta?.title);
+      const validPath =
+        route.path && route.path.startsWith("/") && !route.path.includes(":");
+      const isVisibleMenu = !route.meta?.hidden && route.path !== "/index";
+      const notSpecial =
+        !route.path.includes("redirect") &&
+        route.path !== "/login" &&
+        route.path !== "/register" &&
+        route.path !== "/401" &&
+        !route.path.includes(":pathMatch");
+      return hasTitle && validPath && isVisibleMenu && notSpecial;
+    })
+    .map(route => ({
+      title: route.meta.title,
+      path: route.path,
     }))
-	})
-}
-// 寰呭姙浜嬮」
-const todoInfoS = () => {
-	homeTodos().then((res) => {
-		todoList.value = res.data
-	})
-}
-// 搴斾粯搴旀敹缁熻
-const statisticsReceivable = (type) => {
-	console.log(type)
-	statisticsReceivablePayable({type: radio1.value}).then((res) => {
-		barSeries.value[0].data = [
-			// { value: res.data.prepayMoney, itemStyle: { color: barColors2[0] } },
-			{ value: res.data.payableMoney, itemStyle: { color: barColors2[0] } },
-			// { value: res.data.advanceMoney, itemStyle: { color: barColors2[2] } },
-			{ value: res.data.receivableMoney, itemStyle: { color: barColors2[1] } }
-		]
-	})
-}
-// 璐ㄦ缁熻
-const qualityStatisticsInfo = () => {
-	qualityStatistics().then((res) => {
-		res.data.item.forEach(item => {
-			xAxis1.value[0].data.push(item.date)
-			barSeries1.value[0].data.push(item.supplierNum)
-			barSeries1.value[1].data.push(item.processNum)
-			barSeries1.value[2].data.push(item.factoryNum)
-		})
-		qualityStatisticsObject.value.supplierNum = res.data.supplierNum
-		qualityStatisticsObject.value.processNum = res.data.processNum
-		qualityStatisticsObject.value.factoryNum = res.data.factoryNum
-	})
-}
-const getAmountHalfYearNum = async () => {
-	const res = await getAmountHalfYear()
-	console.log(res)
-	const monthName = []
-	const receiptAmount = []
-	const invoiceAmount = []
-	res.data.forEach(item => {
-		monthName.push(item.month)
-		receiptAmount.push(item.receiptAmount)
-		invoiceAmount.push(item.invoiceAmount)
-	})
-	// 姝g‘鍝嶅簲寮忚祴鍊硷細鍒涘缓鏂扮殑 xAxis 鍜� series 瀵硅薄
-	xAxis2.value[0].data = monthName
-	xAxis2.value[0].data = monthName.map(item => item.replace(/~/g, '\n~'));
-	lineSeries.value = [
-		{
-			name: '寮�绁�',
-			type: 'line',
-			data: receiptAmount,
-			stack: 'Total',
-			areaStyle: {
-				color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-					{
-						offset: 0,
-						color: 'rgba(131, 207, 255, 1)'
-					},
-					{
-						offset: 1,
-						color: 'rgba(186, 228, 255, 1)'
-					}
-				])
-			},
-			itemStyle: {
-				color: '#2D99FF',
-				borderColor: '#2D99FF'
-			},
-			emphasis: {
-				focus: 'series'
-			},
-			lineStyle: {
-				width: 0
-			},
-			showSymbol: true,
-		},
-		{
-			name: '鍥炴',
-			type: 'line',
-			data: invoiceAmount,
-			stack: 'Total',
-			lineStyle: {
-				width: 0
-			},
-			itemStyle: {
-				color: '#83CFFF',
-				borderColor: '#83CFFF'
-			},
-			showSymbol: true,
-			areaStyle: {
-				color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-					{
-						offset: 0,
-						color: 'rgba(54, 153, 255, 1)'
-					},
-					{
-						offset: 1,
-						color: 'rgba(89, 169, 254, 1)'
-					}
-				])
-			},
-			emphasis: {
-				focus: 'series'
-			},
-		}
-	]
-}
+    .sort((a, b) => a.path.localeCompare(b.path));
+
+  const normalizePath = path => String(path || "").replace(/\/+/g, "/");
+  const joinPath = (parentPath, childPath) => {
+    if (!childPath) return normalizePath(parentPath || "/");
+    if (String(childPath).startsWith("/")) return normalizePath(childPath);
+    return normalizePath(`${parentPath || ""}/${childPath}`);
+  };
+
+  const buildMenuTreeOptions = (routes = [], parentPath = "") => {
+    const result = [];
+    routes.forEach(route => {
+      if (!route || route.hidden) return;
+      const fullPath = joinPath(parentPath, route.path);
+      const children = buildMenuTreeOptions(route.children || [], fullPath);
+      const title = route.meta?.title;
+      if (!title && children.length > 0) {
+        result.push(...children);
+        return;
+      }
+      if (!title) return;
+      result.push({
+        label: title,
+        value: fullPath,
+        disabled: children.length > 0,
+        children,
+      });
+    });
+    return result;
+  };
+
+  const menuTreeOptions = computed(() =>
+    buildMenuTreeOptions(permissionStore.sidebarRouters || [])
+  );
+  const selectableMenuMap = computed(() => {
+    const map = new Map();
+    const walk = (list = []) => {
+      list.forEach(item => {
+        if (!item.disabled) map.set(item.value, item.label);
+        if (item.children?.length) walk(item.children);
+      });
+    };
+    walk(menuTreeOptions.value);
+    return map;
+  });
+
+  const keywordMap = {
+    涓荤敓浜ц鍒�: ["鐢熶骇璁″垝", "productionPlan"],
+    鐢熶骇璁㈠崟: ["鐢熶骇璁㈠崟", "productionOrder"],
+    鐢熶骇鎶ュ伐: ["鎶ュ伐", "productionReporting"],
+    杩囩▼妫�: ["杩囩▼妫�", "processInspection"],
+    鐢熶骇鑳借��: ["鐢熶骇鑳借��", "productionEnergyConsumption"],
+    鐢熶骇鎴愭湰: ["鐢熶骇鎴愭湰", "productionCostAccounting"],
+    鏍囧噯vs瀹為檯: ["鏍囧噯", "瀹為檯", "stdVsActCostAnalysis"],
+    鍐崇瓥鍒嗘瀽: ["鍐崇瓥", "鐪嬫澘", "dataDashboard"],
+  };
+
+  const findRouteByKeywords = (keywords = []) => {
+    const lowerKeywords = keywords.map(k => String(k).toLowerCase());
+    return pageOptions.find(item => {
+      const title = String(item.title || "").toLowerCase();
+      const path = String(item.path || "").toLowerCase();
+      return lowerKeywords.some(k => title.includes(k) || path.includes(k));
+    });
+  };
+
+  const getPathByKeywords = (keywords = []) =>
+    findRouteByKeywords(keywords)?.path || "";
+
+  const getRecommendedShortcuts = () => {
+    const list = defaultShortcuts
+      .map(item => {
+        const matched = findRouteByKeywords(
+          keywordMap[item.label] || [item.label]
+        );
+        return matched ? { label: item.label, path: matched.path } : null;
+      })
+      .filter(Boolean);
+    return list.length > 0 ? list : defaultShortcuts;
+  };
+
+  const tryRepairSavedShortcut = item => {
+    const matched = findRouteByKeywords(keywordMap[item.label] || [item.label]);
+    if (matched) return { label: item.label, path: matched.path };
+    return item;
+  };
+
+  const getSavedShortcuts = () => {
+    const recommended = getRecommendedShortcuts();
+    try {
+      const saved = localStorage.getItem(SHORTCUT_STORAGE_KEY);
+      if (!saved) return recommended;
+      const parsed = JSON.parse(saved);
+      if (!Array.isArray(parsed) || parsed.length === 0) return recommended;
+      return parsed.map(item => tryRepairSavedShortcut(item));
+    } catch (error) {
+      return recommended;
+    }
+  };
+
+  const shortcuts = reactive(withValidFlag(getSavedShortcuts().slice(0, 6)));
+  const shortcutDialogVisible = ref(false);
+  const configDialogVisible = ref(false);
+  const selectedPagePath = ref("");
+  const lastUpdatedAt = ref("");
+  const pendingFilter = ref("all");
+  const chartRangePlan = ref(3);
+  const chartRangeQuality = ref(2);
+
+  const routePathMap = {
+    plan: getPathByKeywords(["鐢熶骇璁″垝", "productionPlan"]),
+    order: getPathByKeywords(["鐢熶骇璁㈠崟", "productionOrder"]),
+    processInspection: getPathByKeywords(["杩囩▼妫�", "processInspection"]),
+    meter: getPathByKeywords(["鎶勮〃", "meterCollection", "鑳借��"]),
+    dispatch: getPathByKeywords(["鐢熶骇璋冨害", "productionDispatching"]),
+  };
+
+  const persistShortcuts = () => {
+    localStorage.setItem(
+      SHORTCUT_STORAGE_KEY,
+      JSON.stringify(
+        shortcuts.slice(0, 6).map(({ label, path }) => ({ label, path }))
+      )
+    );
+  };
+
+  const todos = reactive([]);
+
+  const businessFocus = reactive([
+    { name: "鐢熶骇璁㈠崟鎬绘暟", value: "-" },
+    { name: "宸插畬鎴愯鍗曟暟", value: "-" },
+    { name: "鏈畬鎴愯鍗曟暟", value: "-" },
+    { name: "閮ㄥ垎瀹屾垚璁㈠崟鏁�", value: "-" },
+    { name: "鏉ユ枡妫�鎬绘暟", value: "-" },
+    // { name: "杩囩▼妫�鎬绘暟", value: "-" },
+  ]);
+
+  const pendingTasks = reactive([]);
+  const warningList = reactive([]);
+  const SECTION_CONFIG_KEY = "home-sections-v1";
+  const sectionConfigOptions = [
+    { key: "trendCards", label: "鏈�杩�7澶╄秼鍔垮崱" },
+    { key: "planTrend", label: "璁″垝涓庣敓浜ц秼鍔垮浘" },
+    { key: "qualityChart", label: "璐ㄦ寮傚父鍒嗗竷鍥�" },
+    { key: "costChart", label: "鑳借�椾笌鎴愭湰缁撴瀯鍥�" },
+    { key: "warningCenter", label: "寮傚父棰勮涓績" },
+    { key: "planTable", label: "鐢熶骇璁″垝鎵ц鏄庣粏琛�" },
+  ];
+  const enabledSectionKeys = ref(sectionConfigOptions.map(i => i.key));
+
+  const chartStyle = { width: "100%", height: "100%" };
+  const grid = { left: "3%", right: "4%", bottom: "3%", containLabel: true };
+  const lineTooltip = { trigger: "axis" };
+  const barTooltip = { trigger: "axis", axisPointer: { type: "shadow" } };
+  const pieTooltip = { trigger: "item" };
+
+  const valueYAxis = [{ type: "value" }];
+  const planXAxis = [{ type: "category", data: [] }];
+  const qualityXAxis = [{ type: "category", data: [] }];
+
+  const planLegend = { show: true, data: ["璁″垝閲�", "涓嬪彂閲�", "瀹屾垚閲�"] };
+  const costLegend = {
+    show: true,
+    orient: "vertical",
+    right: 10,
+    top: "center",
+    data: ["鑳借�楁垚鏈�", "鐢熶骇鎴愭湰", "璐ㄩ噺鎹熷け鎴愭湰", "鍏朵粬鎴愭湰"],
+  };
+
+  const planSeries = reactive([
+    { name: "璁″垝閲�", type: "line", smooth: true, data: [] },
+    { name: "涓嬪彂閲�", type: "line", smooth: true, data: [] },
+    { name: "瀹屾垚閲�", type: "line", smooth: true, data: [] },
+  ]);
+
+  const qualitySeries = reactive([
+    {
+      name: "寮傚父鏁�",
+      type: "bar",
+      barWidth: 26,
+      itemStyle: { color: "#e67e22", borderRadius: [6, 6, 0, 0] },
+      data: [],
+    },
+  ]);
+
+  const costSeries = reactive([
+    {
+      type: "pie",
+      radius: ["45%", "68%"],
+      center: ["35%", "50%"],
+      label: { formatter: "{b}: {d}%" },
+      data: [],
+    },
+  ]);
+
+  // 鑳借�楃被鍨嬪崰姣旀暟鎹�
+  const energyTypeSeries = reactive([
+    {
+      type: "pie",
+      radius: ["40%", "70%"],
+      center: ["50%", "50%"],
+      avoidLabelOverlap: false,
+      itemStyle: {
+        borderRadius: 10,
+        borderColor: "#fff",
+        borderWidth: 2,
+      },
+      label: {
+        show: true,
+        formatter: "{b}: {d}%",
+      },
+      data: [
+        { value: 0, name: "姘�", itemStyle: { color: "#409EFF" } },
+        { value: 0, name: "鐢�", itemStyle: { color: "#E6A23C" } },
+        { value: 0, name: "姘�", itemStyle: { color: "#F56C6C" } },
+      ],
+    },
+  ]);
+
+  // 鑳借�楃敤閲忚秼鍔垮浘琛�
+  const energyConsumptionXAxis = reactive({
+    type: "category",
+    data: [],
+    axisLabel: {
+      rotate: 45,
+    },
+  });
+
+  const energyConsumptionSeries = reactive([
+    {
+      name: "鐢ㄦ按閲�",
+      type: "bar",
+      data: [],
+      itemStyle: { color: "#409EFF" },
+    },
+    {
+      name: "鐢ㄧ數閲�",
+      type: "bar",
+      data: [],
+      itemStyle: { color: "#E6A23C" },
+    },
+    {
+      name: "鐢ㄦ皵閲�",
+      type: "bar",
+      data: [],
+      itemStyle: { color: "#67C23A" },
+    },
+  ]);
+
+  // 閿�鍞噾棰濆浘琛�
+  const chartProductType2 = ref("鐮屽潡");
+  const salesAmountChartData = ref({
+    dates: [],
+    customerTrends: [],
+  });
+
+  const salesAmountXAxis = reactive({
+    type: "value",
+    axisLabel: {
+      interval: "auto",
+      formatter: value => {
+        // 鏍煎紡鍖栭噾棰濓紝鏄剧ず涓烘洿鏄撹鐨勫舰寮�
+        if (value >= 10000) {
+          return (value / 10000).toFixed(0) + "涓�";
+        }
+        return value;
+      },
+    },
+    axisTick: {
+      interval: "auto",
+    },
+  });
+
+  const salesAmountYAxis = reactive({
+    type: "category",
+    data: [],
+    axisLabel: {
+      rotate: 0,
+    },
+  });
+
+  const salesAmountSeries = reactive([]);
+
+  // 鑾峰彇閿�鍞噾棰濆垎鏋愬浘琛ㄦ暟鎹�
+  const fetchSalesAmountChartData = async () => {
+    try {
+      const response = await getSalesAmountAnalysis({
+        type: chartProductType2.value,
+        days: "骞�", // 榛樿骞�
+      });
+      if (response?.data) {
+        salesAmountChartData.value = response.data;
+        updateSalesAmountChart();
+      }
+    } catch (error) {
+      console.error("鑾峰彇閿�鍞噾棰濆垎鏋愬浘琛ㄦ暟鎹け璐�:", error);
+      // 浣跨敤妯℃嫙鏁版嵁
+      salesAmountChartData.value = {
+        dates: [
+          "2026-01-01",
+          "2025-01-01",
+          "2024-01-01",
+          "2023-01-01",
+          "2022-01-01",
+        ],
+        customerTrends: [
+          { 鍐呰挋鍙�: 100, 閾跺窛: 200, 鑷彁: 300, 鍏朵粬: 150, 鍏ㄩ儴: 750 },
+          { 鍐呰挋鍙�: 80, 閾跺窛: 180, 鑷彁: 280, 鍏朵粬: 130, 鍏ㄩ儴: 670 },
+          { 鍐呰挋鍙�: 90, 閾跺窛: 190, 鑷彁: 290, 鍏朵粬: 140, 鍏ㄩ儴: 710 },
+          { 鍐呰挋鍙�: 70, 閾跺窛: 170, 鑷彁: 270, 鍏朵粬: 120, 鍏ㄩ儴: 630 },
+          { 鍐呰挋鍙�: 110, 閾跺窛: 210, 鑷彁: 310, 鍏朵粬: 160, 鍏ㄩ儴: 790 },
+        ],
+      };
+      updateSalesAmountChart();
+    }
+  };
+
+  // 鏇存柊閿�鍞噾棰濆浘琛�
+  const updateSalesAmountChart = () => {
+    const { customerTrends = [] } = salesAmountChartData.value;
+
+    // 璁$畻姣忎釜閿�鍞尯鍩熺殑鎬婚攢鍞锛堣繃婊ゆ帀"鍏ㄩ儴"锛�
+    const areaTotalMap = new Map();
+    customerTrends.forEach(item => {
+      Object.keys(item).forEach(key => {
+        // 杩囨护鎺�"鍏ㄩ儴"閿�鍞尯鍩�
+        if (key !== "鍏ㄩ儴") {
+          const value = item[key] || 0;
+          if (areaTotalMap.has(key)) {
+            areaTotalMap.set(key, areaTotalMap.get(key) + value);
+          } else {
+            areaTotalMap.set(key, value);
+          }
+        }
+      });
+    });
+
+    // 杞崲涓烘暟缁�
+    const salesAreas = Array.from(areaTotalMap.keys());
+
+    const colors = [
+      "#00A4ED",
+      "#34D8F7",
+      "#4A8BFF",
+      "#8A6BFF",
+      "#C8C447",
+      "#FF6B6B",
+    ];
+
+    // 鏇存柊Y杞存暟鎹紙鐜板湪鏄攢鍞尯鍩燂級
+    salesAmountYAxis.data = salesAreas;
+
+    // 鏇存柊绯诲垪鏁版嵁锛堟瘡涓攢鍞尯鍩熺殑鎬婚攢鍞锛�
+    salesAmountSeries.splice(0, salesAmountSeries.length);
+    salesAmountSeries.push({
+      name: "閿�鍞噾棰�",
+      data: salesAreas.map(area => areaTotalMap.get(area)),
+      type: "bar",
+      itemStyle: { color: "#00A4ED" },
+    });
+  };
+
+  // 妯℃嫙鑳借�楁暟鎹�
+  const energyData = reactive({
+    water: 120,
+    electricity: 350,
+    gas: 80,
+  });
+
+  // 鏇存柊鑳借�楃被鍨嬪崰姣斿浘琛ㄥ拰鑳借�楃敤閲忚秼鍔垮浘琛�
+  const updateEnergyTypeChart = () => {
+    // 鏋勫缓鍙傛暟锛氫粖骞寸殑骞村垵鍒板勾鏈互鍙婂ぉ鏁�
+    const currentYear = new Date().getFullYear();
+    const params = {
+      startDate: `${currentYear}-01-01`,
+      endDate: `${currentYear}-12-31`,
+      days: 365,
+      state: "骞�",
+    };
+
+    // 璋冪敤鎺ュ彛鑾峰彇鏁版嵁
+    energyConsumptionDetailStatistics(params)
+      .then(res => {
+        if (res.code === 200) {
+          const data = res.data;
+          // 澶勭悊鑳借�楃被鍨嬪崰姣旀暟鎹�
+          const energyTypeData = data.energyCostDtos || [];
+
+          // 璁$畻鍚勮兘鑰楃被鍨嬬殑鎬绘秷鑰楅噺
+          let total = 0;
+          const typeMap = {
+            姘�: 0,
+            鐢�: 0,
+            姘�: 0,
+          };
+
+          // 鍑嗗鑳借�楃敤閲忚秼鍔垮浘琛ㄦ暟鎹�
+          const dates = [];
+          const waterConsumptionData = [];
+          const electricityConsumptionData = [];
+          const gasConsumptionData = [];
+
+          energyTypeData.forEach(item => {
+            // 鏀堕泦鏃ユ湡鍜屽悇鑳借�楃被鍨嬫暟鎹�
+            if (item.meterReadingDate) {
+              dates.push(item.meterReadingDate);
+              waterConsumptionData.push(item.waterConsumption || 0);
+              electricityConsumptionData.push(item.electricityConsumption || 0);
+              gasConsumptionData.push(item.gasConsumption || 0);
+            }
+
+            // 璁$畻鎬绘秷鑰楅噺
+            if (item.waterConsumption)
+              typeMap.姘� += Number(item.waterConsumption);
+            if (item.electricityConsumption)
+              typeMap.鐢� += Number(item.electricityConsumption);
+            if (item.gasConsumption) typeMap.姘� += Number(item.gasConsumption);
+          });
+
+          total = typeMap.姘� + typeMap.鐢� + typeMap.姘�;
+
+          // 鏇存柊鑳借�楃被鍨嬪崰姣斿浘琛ㄦ暟鎹�
+          energyTypeSeries[0].data = [
+            {
+              value: total > 0 ? ((typeMap.姘� / total) * 100).toFixed(2) : 0,
+              name: "姘�",
+              itemStyle: { color: "#409EFF" },
+            },
+            {
+              value: total > 0 ? ((typeMap.鐢� / total) * 100).toFixed(2) : 0,
+              name: "鐢�",
+              itemStyle: { color: "#E6A23C" },
+            },
+            {
+              value: total > 0 ? ((typeMap.姘� / total) * 100).toFixed(2) : 0,
+              name: "姘�",
+              itemStyle: { color: "#F56C6C" },
+            },
+          ];
+
+          // 鏇存柊鑳借�楃敤閲忚秼鍔垮浘琛ㄦ暟鎹�
+          energyConsumptionXAxis.data = dates;
+          energyConsumptionSeries[0].data = waterConsumptionData;
+          energyConsumptionSeries[1].data = electricityConsumptionData;
+          energyConsumptionSeries[2].data = gasConsumptionData;
+        }
+      })
+      .catch(err => {
+        console.error("鑾峰彇鑳借�楁暟鎹紓甯革細", err);
+      });
+  };
+
+  // 鎶ュ伐琛ㄦ牸鏁版嵁
+  const reportingTable = ref([]);
+  const reportingTableLoading = ref(false);
+
+  // 鑾峰彇鏈�杩戞姤宸ユ暟鎹�
+  const fetchReportingData = () => {
+    reportingTableLoading.value = true;
+    productionReportListPage({
+      current: 1,
+      size: 5, // 鍙樉绀烘渶杩�5鏉�
+    })
+      .then(res => {
+        if (res.code === 200) {
+          console.log(res.data.records || []);
+          reportingTable.value = res.data.records || [];
+        } else {
+          reportingTable.value = [];
+        }
+      })
+      .catch(error => {
+        console.error("鑾峰彇鎶ュ伐鏁版嵁澶辫触:", error);
+        reportingTable.value = [];
+      })
+      .finally(() => {
+        reportingTableLoading.value = false;
+      });
+  };
+  const recentTrendCards = reactive([
+    {
+      key: "planIssued",
+      label: "璁″垝涓嬪彂閲�",
+      unit: "鍗�",
+      values: [0, 0, 0, 0, 0, 0, 0],
+      latest: 0,
+      change: 0,
+    },
+    {
+      key: "qualityRaw",
+      label: "鏉ユ枡妫�鏁伴噺",
+      unit: "鏉�",
+      values: [0, 0, 0, 0, 0, 0, 0],
+      latest: 0,
+      change: 0,
+    },
+    {
+      key: "qualityProcess",
+      label: "杩囩▼妫�鏁伴噺",
+      unit: "鏉�",
+      values: [0, 0, 0, 0, 0, 0, 0],
+      latest: 0,
+      change: 0,
+    },
+    {
+      key: "qualityFactory",
+      label: "鎴愬搧妫�鏁伴噺",
+      unit: "鏉�",
+      values: [0, 0, 0, 0, 0, 0, 0],
+      latest: 0,
+      change: 0,
+    },
+  ]);
+
+  const toNumber = value => {
+    const num = Number(value);
+    return Number.isFinite(num) ? num : 0;
+  };
+
+  const pickFirstNumber = (obj, keys = []) => {
+    for (const key of keys) {
+      if (obj && obj[key] !== undefined && obj[key] !== null)
+        return toNumber(obj[key]);
+    }
+    return 0;
+  };
+
+  const updateArray = (target, list) => {
+    target.splice(0, target.length, ...list);
+  };
+
+  const toFixedOne = num => Number(num || 0).toFixed(1);
+
+  const normalizeSeven = (list = []) => {
+    const nums = list.map(i => toNumber(i));
+    if (nums.length >= 7) return nums.slice(-7);
+    return [...Array(7 - nums.length).fill(0), ...nums];
+  };
+
+  const calcTrend = (list = []) => {
+    if (!Array.isArray(list) || list.length === 0)
+      return { latest: 0, change: 0 };
+    const first = toNumber(list[0]);
+    const latest = toNumber(list[list.length - 1]);
+    if (first === 0) return { latest, change: latest > 0 ? 100 : 0 };
+    return { latest, change: ((latest - first) / first) * 100 };
+  };
+
+  const setTrendCard = (key, values) => {
+    const target = recentTrendCards.find(i => i.key === key);
+    if (!target) return;
+    const series = normalizeSeven(values);
+    const { latest, change } = calcTrend(series);
+    target.values = series;
+    target.latest = latest;
+    target.change = Number(toFixedOne(change));
+  };
+
+  const trendClass = change => (change > 0 ? "up" : change < 0 ? "down" : "flat");
+
+  const calcBarHeight = (value, list) => {
+    const max = Math.max(...list, 1);
+    return Math.max(18, Math.round((toNumber(value) / max) * 100));
+  };
+
+  const filteredPendingTasks = computed(() => {
+    if (pendingFilter.value === "high")
+      return pendingTasks.filter(i => i.level === "楂�");
+    if (pendingFilter.value === "mine") {
+      const currentUserName = String(userStore?.name || "").toLowerCase();
+      const currentUserId = String(userStore?.userId || "");
+      return pendingTasks.filter(i => {
+        const ownerName = String(i.ownerName || "").toLowerCase();
+        const ownerId = String(i.ownerId || "");
+        return (
+          (currentUserName && ownerName && ownerName.includes(currentUserName)) ||
+          (currentUserId && ownerId === currentUserId)
+        );
+      });
+    }
+    return pendingTasks;
+  });
+
+  const isSectionVisible = key => enabledSectionKeys.value.includes(key);
+
+  const goTo = path => {
+    if (!isRouteValid(path)) {
+      ElMessage.warning("褰撳墠鑿滃崟鏈厤缃椤甸潰鎴栨棤璁块棶鏉冮檺");
+      return;
+    }
+    router.push(path);
+  };
+
+  const handleTrendCardClick = card => {
+    const mapping = {
+      planIssued: routePathMap.plan || routePathMap.order,
+      qualityRaw: routePathMap.processInspection,
+      qualityProcess: routePathMap.processInspection,
+      qualityFactory: routePathMap.processInspection,
+    };
+    const target = mapping[card.key];
+    if (!target) {
+      ElMessage.warning("鏈厤缃彲璺宠浆椤甸潰");
+      return;
+    }
+    const query =
+      card.key === "planIssued"
+        ? { dateType: String(chartRangePlan.value), source: "homeTrend" }
+        : { dateType: String(chartRangeQuality.value), source: "homeTrend" };
+    router.push({ path: target, query });
+  };
+
+  const openShortcutDialog = () => {
+    shortcutDialogVisible.value = true;
+  };
+
+  const addShortcutBySelect = () => {
+    if (shortcuts.length >= 6) {
+      ElMessage.warning("蹇嵎鍏ュ彛鏈�澶氬彧鑳芥坊鍔�6涓�");
+      return;
+    }
+    if (!selectedPagePath.value) {
+      ElMessage.warning("璇峰厛閫夋嫨椤甸潰");
+      return;
+    }
+    if (shortcuts.some(item => item.path === selectedPagePath.value)) {
+      ElMessage.warning("璇ュ揩鎹峰叆鍙e凡瀛樺湪");
+      return;
+    }
+    const label = selectableMenuMap.value.get(selectedPagePath.value);
+    if (!label) {
+      ElMessage.warning("璇烽�夋嫨鍙坊鍔犵殑椤甸潰锛岀洰褰曡妭鐐逛笉鍙��");
+      return;
+    }
+    shortcuts.push({
+      label,
+      path: selectedPagePath.value,
+      invalid: !isRouteValid(selectedPagePath.value),
+    });
+    persistShortcuts();
+    selectedPagePath.value = "";
+  };
+
+  const removeShortcut = index => {
+    shortcuts.splice(index, 1);
+    persistShortcuts();
+    ElMessage.success("宸插垹闄ゅ揩鎹峰叆鍙�");
+  };
+
+  const loadHomeTodos = async () => {
+    // try {
+    //   const res = await homeTodos();
+    //   const list = Array.isArray(res?.data) ? res.data : [];
+    //   const mapped = list.slice(0, 4).map((item, idx) => {
+    //     const text =
+    //       item?.approveReason || item?.approveTypeName || `寰呭鐞嗕簨椤� ${idx + 1}`;
+    //     const levelType = idx === 0 ? "danger" : idx <= 2 ? "warning" : "success";
+    //     const level = idx === 0 ? "楂�" : idx <= 2 ? "涓�" : "浣�";
+    //     return { level, title: text, type: levelType };
+    //   });
+    //   updateArray(todos, mapped);
+    //   const pendingMapped = list.slice(0, 4).map((item, idx) => {
+    //     const title =
+    //       item?.approveReason || item?.approveTypeName || `寰呭鐞嗕簨椤� ${idx + 1}`;
+    //     const path = inferTodoPath(item);
+    //     return {
+    //       id: item?.id || `${idx}-${title}`,
+    //       title,
+    //       level: idx === 0 ? "楂�" : idx <= 2 ? "涓�" : "浣�",
+    //       type: idx === 0 ? "danger" : idx <= 2 ? "warning" : "success",
+    //       path,
+    //       ownerId: item?.approveUserId || item?.userId || "",
+    //       ownerName: item?.approveUserName || item?.userName || "",
+    //     };
+    //   });
+    //   updateArray(pendingTasks, pendingMapped);
+    // } catch (error) {
+    //   console.error("homeTodos鎺ュ彛鑾峰彇澶辫触:", error);
+    // }
+  };
+
+  const loadOrderAndProgress = async () => {
+    // try {
+    //   const [orderRes, progressRes] = await Promise.allSettled([
+    //     orderCount(),
+    //     getProgressStatistics(),
+    //   ]);
+    //   if (orderRes.status === "fulfilled") {
+    //     const items = Array.isArray(orderRes.value?.data)
+    //       ? orderRes.value.data
+    //       : [];
+    //     const byName = Object.fromEntries(
+    //       items.map(i => [String(i?.name || "").replace(/\s/g, ""), i?.value])
+    //     );
+    //     businessFocus[0].value = `${
+    //       pickFirstNumber(byName, ["鐢熶骇璁㈠崟鏁�", "鐢熶骇璁㈠崟鎬绘暟", "鎬昏鍗曟暟"]) || 0
+    //     } 鍗昤;
+    //     businessFocus[1].value = `${
+    //       pickFirstNumber(byName, ["宸插畬鎴愯鍗曟暟"]) || 0
+    //     } 鍗昤;
+    //     businessFocus[2].value = `${
+    //       pickFirstNumber(byName, ["寰呯敓浜ц鍗曟暟", "鏈畬鎴愯鍗曟暟"]) || 0
+    //     } 鍗昤;
+    //     businessFocus[3].value = `${
+    //       pickFirstNumber(byName, ["閮ㄥ垎瀹屾垚璁㈠崟鏁�"]) || 0
+    //     } 鍗昤;
+    //   }
+    //   if (progressRes.status === "fulfilled") {
+    //     const p = progressRes.value?.data || {};
+    //     const detail = Array.isArray(p.completedOrderDetails)
+    //       ? p.completedOrderDetails
+    //       : [];
+    //     const rows = detail.slice(0, 6).map((item, index) => {
+    //       const qty = pickFirstNumber(item, ["quantity", "planQuantity"]);
+    //       const done = pickFirstNumber(item, [
+    //         "completeQuantity",
+    //         "completedQuantity",
+    //       ]);
+    //       return {
+    //         planNo: item.npsNo || item.productionPlanNo || `NO-${index + 1}`,
+    //         product: item.productCategory || item.productName || "-",
+    //         qty,
+    //         issued: done,
+    //         status:
+    //           qty > 0 && done >= qty ? "宸插畬鎴�" : done > 0 ? "鎵ц涓�" : "寰呬笅鍙�",
+    //       };
+    //     });
+    //     updateArray(planTable, rows);
+    //     setTrendCard(
+    //       "planIssued",
+    //       detail
+    //         .slice(-7)
+    //         .map(i =>
+    //           pickFirstNumber(i, [
+    //             "completeQuantity",
+    //             "completedQuantity",
+    //             "issueNum",
+    //           ])
+    //         )
+    //     );
+    //   }
+    // } catch (error) {
+    //   console.error("orderCount/getProgressStatistics鎺ュ彛鑾峰彇澶辫触:", error);
+    // }
+  };
+
+  const inferTodoPath = todo => {
+    const text = `${todo?.approveTypeName || ""}${
+      todo?.approveReason || ""
+    }`.toLowerCase();
+    if (text.includes("璁″垝")) return routePathMap.plan || routePathMap.order;
+    if (text.includes("璁㈠崟")) return routePathMap.order || routePathMap.plan;
+    if (text.includes("杩囩▼妫�") || text.includes("璐ㄦ"))
+      return routePathMap.processInspection || routePathMap.plan;
+    if (text.includes("鑳借��") || text.includes("鎶勮〃"))
+      return routePathMap.meter || routePathMap.plan;
+    return routePathMap.plan || routePathMap.order || "";
+  };
+
+  const loadPlanTrend = async () => {
+    // try {
+    //   const res = await processDataProductionStatistics({
+    //     type: chartRangePlan.value,
+    //   });
+    //   const list = Array.isArray(res?.data) ? res.data : [];
+    //   planXAxis[0].data = list.map(
+    //     (i, index) => i.processName || `宸ュ簭${index + 1}`
+    //   );
+    //   planSeries[0].data = list.map(i =>
+    //     pickFirstNumber(i, ["totalInput", "input", "planNum"])
+    //   );
+    //   planSeries[1].data = list.map(i =>
+    //     pickFirstNumber(i, ["totalOutput", "output", "issueNum"])
+    //   );
+    //   planSeries[2].data = list.map(i =>
+    //     pickFirstNumber(i, ["totalScrap", "scrap", "completeNum"])
+    //   );
+    // } catch (error) {
+    //   console.error("processDataProductionStatistics鎺ュ彛鑾峰彇澶辫触:", error);
+    // }
+  };
+
+  const loadQualityData = async () => {
+    // try {
+    //   const res = await qualityInspectionStatistics({
+    //     type: chartRangeQuality.value,
+    //   });
+    //   const data = res?.data || {};
+    //   const items = Array.isArray(data.item) ? data.item : [];
+    //   if (items.length > 0) {
+    //     qualityXAxis[0].data = items.map(i => i.date || i.name || "-");
+    //     qualitySeries[0].data = items.map(i =>
+    //       pickFirstNumber(i, [
+    //         "supplierNum",
+    //         "processNum",
+    //         "factoryNum",
+    //         "totalNum",
+    //       ])
+    //     );
+    //     setTrendCard(
+    //       "qualityRaw",
+    //       items.map(i => pickFirstNumber(i, ["supplierNum"]))
+    //     );
+    //     setTrendCard(
+    //       "qualityProcess",
+    //       items.map(i => pickFirstNumber(i, ["processNum"]))
+    //     );
+    //     setTrendCard(
+    //       "qualityFactory",
+    //       items.map(i => pickFirstNumber(i, ["factoryNum"]))
+    //     );
+    //   } else {
+    //     qualityXAxis[0].data = ["鏉ユ枡妫�", "杩囩▼妫�", "鎴愬搧妫�"];
+    //     qualitySeries[0].data = [
+    //       pickFirstNumber(data, ["supplierNum"]),
+    //       pickFirstNumber(data, ["processNum"]),
+    //       pickFirstNumber(data, ["factoryNum"]),
+    //     ];
+    //     setTrendCard("qualityRaw", [pickFirstNumber(data, ["supplierNum"])]);
+    //     setTrendCard("qualityProcess", [pickFirstNumber(data, ["processNum"])]);
+    //     setTrendCard("qualityFactory", [pickFirstNumber(data, ["factoryNum"])]);
+    //   }
+    //   businessFocus[4].value = `${pickFirstNumber(data, [
+    //     "supplierNum",
+    //     "totalNum",
+    //   ])} 鏉;
+    //   businessFocus[5].value = `${pickFirstNumber(data, ["processNum"])} 鏉;
+    // } catch (error) {
+    //   console.error("qualityInspectionStatistics鎺ュ彛鑾峰彇澶辫触:", error);
+    // }
+  };
+
+  const loadWarningCenter = async () => {
+    // try {
+    //   const res = await nonComplianceWarning();
+    //   const list = Array.isArray(res?.data) ? res.data : [];
+    //   const mapped = list.slice(0, 6).map((item, idx) => {
+    //     const levelNum = toNumber(item.level ?? item.warningLevel ?? 2);
+    //     const levelType =
+    //       levelNum >= 3 ? "danger" : levelNum === 2 ? "warning" : "info";
+    //     const levelText = levelNum >= 3 ? "楂�" : levelNum === 2 ? "涓�" : "浣�";
+    //     const title =
+    //       item.name || item.title || item.paramName || `寮傚父棰勮 ${idx + 1}`;
+    //     const text = `${title}${item.processName || ""}${
+    //       item.orderNo || ""
+    //     }`.toLowerCase();
+    //     const path = text.includes("璐ㄦ")
+    //       ? routePathMap.processInspection
+    //       : text.includes("璁㈠崟")
+    //       ? routePathMap.order
+    //       : routePathMap.processInspection ||
+    //         routePathMap.order ||
+    //         routePathMap.plan;
+    //     return {
+    //       id: item.id || `${idx}-${title}`,
+    //       levelType,
+    //       levelText,
+    //       title,
+    //       path,
+    //     };
+    //   });
+    //   updateArray(warningList, mapped);
+    // } catch (error) {
+    //   console.error("nonComplianceWarning鎺ュ彛鑾峰彇澶辫触:", error);
+    //   updateArray(warningList, []);
+    // }
+  };
+
+  const initSectionConfig = () => {
+    try {
+      const raw = localStorage.getItem(SECTION_CONFIG_KEY);
+      if (!raw) return;
+      const parsed = JSON.parse(raw);
+      if (Array.isArray(parsed) && parsed.length > 0) {
+        enabledSectionKeys.value = parsed.filter(k =>
+          sectionConfigOptions.some(i => i.key === k)
+        );
+      }
+    } catch (error) {
+      console.error("璇诲彇棣栭〉閰嶇疆澶辫触:", error);
+    }
+  };
+
+  const saveSectionConfig = () => {
+    if (enabledSectionKeys.value.length === 0) {
+      ElMessage.warning("鑷冲皯淇濈暀涓�涓ā鍧�");
+      return;
+    }
+    localStorage.setItem(
+      SECTION_CONFIG_KEY,
+      JSON.stringify(enabledSectionKeys.value)
+    );
+    configDialogVisible.value = false;
+    ElMessage.success("棣栭〉閰嶇疆宸蹭繚瀛�");
+  };
+
+  const loadCostComposition = async () => {
+    // try {
+    //   const res = await expenseCompositionAnalysis({ type: 1 });
+    //   const list = Array.isArray(res?.data) ? res.data : [];
+    //   const mapped = list.map(i => ({
+    //     name: i.name || "鏈懡鍚�",
+    //     value: pickFirstNumber(i, ["value", "amount", "cost"]),
+    //   }));
+    //   costSeries[0].data = mapped;
+    // } catch (error) {
+    //   console.error("expenseCompositionAnalysis鎺ュ彛鑾峰彇澶辫触:", error);
+    // }
+  };
+  const loadManageStatistics = async () => {
+    try {
+      const res = await getManageStatistics();
+      const data = res?.data || {};
+      businessFocus[0].value = `${pickFirstNumber(data, ["total"])} 鏉;
+      businessFocus[1].value = `${pickFirstNumber(data, ["completed"])} 鏉;
+      businessFocus[2].value = `${pickFirstNumber(data, ["uncompleted"])} 鏉;
+      businessFocus[3].value = `${pickFirstNumber(data, [
+        "partialCompleted",
+      ])} 鏉;
+      businessFocus[4].value = `${pickFirstNumber(data, [
+        "materialInspection",
+      ])} 鏉;
+      // businessFocus[5].value = `${pickFirstNumber(data, [""])} 鏉;
+    } catch (error) {
+      console.error("manageStatistics鎺ュ彛鑾峰彇澶辫触:", error);
+    }
+  };
+
+  const refreshDashboardData = () => {
+    // loadHomeTodos();
+    // loadOrderAndProgress();
+    // loadPlanTrend();
+    // loadQualityData();
+    // loadCostComposition();
+    // loadWarningCenter();
+    loadManageStatistics();
+    updateEnergyTypeChart();
+    fetchSalesAmountChartData();
+    fetchReportingData();
+    lastUpdatedAt.value = new Date().toLocaleString();
+  };
+
+  onMounted(() => {
+    // initSectionConfig();
+    refreshDashboardData();
+  });
 </script>
 
 <style scoped>
-.dashboard {
-	background: #f5f7fa;
-	min-height: 100vh;
-	padding: 20px;
-	box-sizing: border-box;
-}
-.dashboard-top {
-	display: flex;
-	gap: 20px;
-	margin-bottom: 20px;
-}
-.company-info {
-	display: flex;
-	flex-direction: column;
-	gap: 8px;
-	padding: 20px;
-	min-width: 0;
-	background-color: #EFF2FB; /* 浣跨敤鎸囧畾鐨勮儗鏅鑹� */
-	background-image: url("../assets/images/denglu.png");
-	background-size: cover;
-	background-position: center;
-	background-repeat: no-repeat;
-	border-radius: 12px;
-	height: 138px;
-}
-.avatar {
-	width: 60px;
-	height: 60px;
-	border-radius: 50%;
-	object-fit: contain;
-	background: #fff;
-	border: 1px solid #eee;
-}
-.company-card {
-	display: flex;
-	flex-direction: column;
-	gap: 10px;
-	position: relative;
-	padding-right: 15px;
-}
+  .home-page {
+    min-height: 100vh;
+    background: #f5f7fb;
+    padding: 20px;
+  }
 
-.company-card::after {
-	content: '';
-	position: absolute;
-	right: 0;
-	top: 0;
-	bottom: 0;
-	width: 1px;
-	background-color: #C9C5C5;
-	border-radius: 2px;
-}
-.company-name {
-	font-weight: 400;
-	font-size: 16px;
-	color: #161A9A;
-}
-.company-meta {
-	font-weight: 400;
-	font-size: 12px;
-	color: #818185;
-}
-.data-cards {
-	display: flex;
-	gap: 16px;
-	justify-content: flex-start;
-	background: #ffffff;
-	border-radius: 12px;
-	padding: 20px;
-}
-.data-title {
-	font-weight: 700;
-	font-size: 26px;
-	color: #FFFFFF;
-}
-.data-num {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	margin-top: 20px;
-}
-.data-card {
-	background: #fff;
-	border-radius: 12px;
-	padding: 14px 10px 10px 10px;
-	min-width: 160px;
-	box-shadow: 0 2px 8px #eee;
-	display: flex;
-	flex-direction: column;
-	width: 32%;
-	height: 140px;
-}
-.data-card.sales {
-	background-image: url("../assets/images/xioashoushuju.png");
-	background-size: cover;
-	background-position: center;
-	background-repeat: no-repeat;
-}
-.data-card.purchase {
-	background-image: url("../assets/images/caigou.png");
-	background-size: cover;
-	background-position: center;
-	background-repeat: no-repeat;
-}
-.data-card.inventory {
-	background-image: url("../assets/images/kucun.png");
-	background-size: cover;
-	background-position: center;
-	background-repeat: no-repeat;
-}
-.data-desc {
-	font-weight: 500;
-	font-size: 13px;
-	color: #FFFFFF;
-}
-.data-value {
-	font-size: 18px;
-	font-weight: 500;
-	margin: 10px 0;
-	color: #FFFFFF;
-}
-.top-left {
-	display: flex;
-	flex-direction: column;
-	gap: 20px;
-	width: 50%;
-}
-.todo-panel {
-	background: #fff;
-	border-radius: 12px;
-	padding: 20px;
-	width: 50%;
-}
-.todo-list {
-	list-style: none;
-	padding: 0;
-	margin: 0;
-	font-size: 15px;
-	overflow-y: auto;
-	height: 260px;
-}
-.todo-list li {
-	border-radius: 8px;
-	margin-bottom: 12px;
-	padding: 8px 20px;
-	height: 74px;
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-	background: rgba(225,227,250,0.62);
-}
-.todo-title {
-	font-weight: 400;
-	font-size: 12px;
-	color: #000000;
-	position: relative;
-}
-.todo-title::before {
-	content: ''; /* 蹇呴渶锛岃〃绀鸿繖閲屾湁涓�涓唴瀹� */
-	position: absolute;
-	left: -10px; /* 瀹氫綅鍒板乏渚� */
-	top: 50%; /* 鍨傜洿灞呬腑 */
-	transform: translateY(-50%); /* 寰皟鍨傜洿灞呬腑 */
-	width: 6px; /* 鍦嗙殑鐩村緞 */
-	height: 6px; /* 鍦嗙殑鐩村緞 */
-	background: #498CEB;
-	border-radius: 50%; /* 璁╁叾鍙樻垚鍦嗗舰 */
-}
-.todo-division {
-	font-weight: 400;
-	font-size: 12px;
-	color: #000000;
-}
-.todo-time {
-	font-weight: 400;
-	font-size: 12px;
-	color: #000000;
-}
-.todo-meta {
-	color: #888;
-	font-size: 13px;
-}
-.dashboard-row {
-	display: flex;
-	gap: 20px;
-	margin-bottom: 20px;
-}
-.main-panel {
-	background: #fff;
-	border-radius: 12px;
-	padding: 20px;
-	flex: 1;
-	min-width: 0;
-	display: flex;
-	flex-direction: column;
-}
-.section-title {
-	position: relative;
-	font-size: 18px;
-	color: #333;
-	padding-left: 10px;
-	margin-bottom: 10px;
-	font-weight: 700;
-}
+  .top-bar {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    gap: 16px;
+    background: #fff;
+    border-radius: 12px;
+    padding: 16px;
+    margin-bottom: 16px;
+  }
 
-.section-title::before {
-	position: absolute;
-	left: 0;
-	top: 4px;
-	content: '';
-	width: 4px;
-	height: 18px;
-	background-color: #002FA7;
-	border-radius: 2px;
-}
-.contract-info {
-	display: flex;
-	align-items: center;
-	gap: 20px;
-	height: 90px;
-	background: rgba(245,245,245,0.59);
-	width: 100%;
-	border-radius: 10px;
-	padding: 10px 30px;
-}
-.contract-summary {
-	display: flex;
-	align-items: center;
-	gap: 30px;
-}
-.contract-card {
-	display: flex;
-	flex-direction: column;
-	gap: 10px;
-}
-.contract-name {
-	font-weight: 400;
-	font-size: 14px;
-	color: #050505;
-}
-.contract-meta {
-	display: flex;
-	align-items: center;
-	width: 100%;
-	gap: 80px;
-}
-.main-amount {
-	font-size: 24px;
-	color: rgba(51,50,50,0.85);
-}
-.up { color: #e57373; }
-.contract-list {
-	margin-top: 16px;
-	font-size: 14px;
-	color: #666;
-	list-style: none;
-	padding: 0;
-}
-.line {
-	position: relative;
-	width: 250px;
-}
-.line::after {
-	content: '';
-	position: absolute;
-	right: 12px;
-	top: 0;
-	bottom: 0;
-	width: 1px;
-	background-color: #C9C5C5;
-	border-radius: 2px;
-}
-.contract-list li {
-	margin-top: 10px;
-}
-.quality-cards {
-	display: flex;
-	gap: 12px;
-	margin-bottom: 12px;
-}
-.quality-card {
-	border-radius: 8px;
-	padding: 15px 10px 10px 50px;
-	font-weight: 400;
-	font-size: 12px;
-	color: rgba(0,0,0,0.67);
-	width: 236px;
-	height: 49px;
-	background-size: cover;
-	background-position: center;
-	background-repeat: no-repeat;
-}
-.quality-card.one {
-	background-image: url("../assets/images/yuancailiao.png");
-}
-.quality-card.two {
-	background-image: url("../assets/images/guocheng.png");
-}
-.quality-card.three {
-	background-image: url("../assets/images/chuchang.png");
-	
-}
-.quality-card span {
-	color: #4fc3f7;
-	font-weight: bold;
-	margin-left: 6px;
-}
-.chart {
-	width: 100%;
-	height: 220px;
-	margin-top: 10px;
-}
+  .top-actions {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+  }
+
+  .refresh-time {
+    font-size: 12px;
+    color: #7b8794;
+  }
+
+  .user-box {
+    display: flex;
+    align-items: center;
+    gap: 12px;
+  }
+
+  .avatar {
+    width: 54px;
+    height: 54px;
+    border-radius: 50%;
+    object-fit: cover;
+  }
+
+  .hello {
+    font-size: 18px;
+    font-weight: 700;
+    color: #1f2d3d;
+  }
+
+  .sub {
+    margin-top: 4px;
+    color: #6b7785;
+    font-size: 13px;
+  }
+
+  .content-grid {
+    display: grid;
+    grid-template-columns: 320px 1fr;
+    gap: 16px;
+    align-items: stretch;
+  }
+
+  .left-col,
+  .right-col {
+    display: flex;
+    flex-direction: column;
+  }
+
+  .section-card {
+    background: #fff;
+    border-radius: 12px;
+    padding: 16px;
+    margin-bottom: 16px;
+    box-shadow: 0 2px 10px rgba(20, 35, 90, 0.06);
+  }
+
+  .flex-fill-card {
+    flex: 1;
+  }
+
+  .section-title {
+    position: relative;
+    padding-left: 10px;
+    margin-bottom: 14px;
+    font-size: 16px;
+    font-weight: 700;
+    color: #243447;
+  }
+
+  .section-title-row {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+
+  .section-title::before {
+    content: "";
+    position: absolute;
+    left: 0;
+    top: 4px;
+    width: 4px;
+    height: 16px;
+    border-radius: 2px;
+    background: #409eff;
+  }
+
+  .quick-grid {
+    display: grid;
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+    gap: 10px;
+  }
+
+  .quick-grid :deep(.el-button) {
+    margin-left: 0;
+  }
+
+  .shortcut-form-row {
+    display: grid;
+    grid-template-columns: 1fr 1.5fr auto;
+    gap: 10px;
+    margin-bottom: 12px;
+  }
+
+  .todo-row {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    margin-bottom: 10px;
+    font-size: 13px;
+    color: #3b4a5b;
+  }
+
+  .focus-row {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 8px 0;
+    border-bottom: 1px dashed #e8edf5;
+  }
+
+  .focus-row:last-child {
+    border-bottom: none;
+  }
+
+  .focus-name {
+    font-size: 13px;
+    color: #516174;
+  }
+
+  .focus-value {
+    font-weight: 700;
+    color: #1f2d3d;
+  }
+
+  .task-row {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    gap: 10px;
+    padding: 8px 0;
+    border-bottom: 1px dashed #e8edf5;
+  }
+
+  .task-row:last-child {
+    border-bottom: none;
+  }
+
+  .task-left {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+  }
+
+  .task-title {
+    font-size: 13px;
+    color: #3d4d5f;
+  }
+
+  .row-two {
+    display: grid;
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+    gap: 16px;
+  }
+
+  .trend-cards {
+    display: grid;
+    grid-template-columns: repeat(4, minmax(0, 1fr));
+    gap: 12px;
+  }
+
+  .trend-card {
+    border: 1px solid #e8edf5;
+    border-radius: 10px;
+    padding: 12px;
+  }
+
+  .trend-card.clickable {
+    cursor: pointer;
+    transition: all 0.2s ease;
+  }
+
+  .trend-card.clickable:hover {
+    border-color: #8eb8ff;
+    background: #f6f9ff;
+  }
+
+  .trend-head {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+
+  .trend-label {
+    font-size: 13px;
+    color: #5f6b7a;
+  }
+
+  .trend-rate {
+    font-size: 12px;
+    font-weight: 700;
+  }
+
+  .trend-rate.up {
+    color: #67c23a;
+  }
+
+  .trend-rate.down {
+    color: #f56c6c;
+  }
+
+  .trend-rate.flat {
+    color: #909399;
+  }
+
+  .trend-value {
+    margin-top: 6px;
+    font-size: 20px;
+    color: #1f2d3d;
+    font-weight: 700;
+  }
+
+  .sparkline {
+    margin-top: 10px;
+    height: 48px;
+    display: flex;
+    align-items: flex-end;
+    gap: 4px;
+  }
+
+  .sparkline-bar {
+    flex: 1;
+    min-height: 6px;
+    border-radius: 3px 3px 0 0;
+    background: linear-gradient(180deg, #82b1ff 0%, #409eff 100%);
+  }
+
+  .warning-row {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    gap: 10px;
+    padding: 8px 0;
+    border-bottom: 1px dashed #e8edf5;
+  }
+
+  .warning-row:last-child {
+    border-bottom: none;
+  }
+
+  .warning-left {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+  }
+
+  .warning-title {
+    font-size: 13px;
+    color: #3d4d5f;
+  }
+
+  .config-check-group {
+    display: grid;
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+    gap: 10px 16px;
+  }
+
+  .mini-table-wrap :deep(.el-table th) {
+    background: #f8fbff;
+  }
+
+  @media (max-width: 1100px) {
+    .content-grid {
+      grid-template-columns: 1fr;
+    }
+
+    .row-two {
+      grid-template-columns: 1fr;
+    }
+
+    .trend-cards {
+      grid-template-columns: repeat(2, minmax(0, 1fr));
+    }
+  }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3