系统管理员首页完成

This commit is contained in:
2026-09-30 10:29:46 +08:00
parent 3f6b16f8be
commit bcfc167905
7 changed files with 333 additions and 277 deletions
+7 -9
View File
@@ -1,15 +1,13 @@
<script setup lang="ts">
import { ref, computed } from 'vue';
import { useAppStore } from '@/store/modules/app';
import { Icon } from '@iconify/vue'
import { useThemeStore } from '@/store/modules/theme';
import { getColorWithOpacity } from '@/utils/common';
import RingChart from './modules/ringChart.vue';
import ColumnChart from './modules/columnChart.vue';
import { deptStatisticsApi } from '@/service/api/statistics';
const appStore = useAppStore();
const themeStore = useThemeStore();
const gap = computed(() => (appStore.isMobile ? 0 : 16));
const P_PERIODS = ["近一个月", "近三个月", "近半年", "近一年"];
const period = ref<(typeof P_PERIODS)[number]>("近一年");
@@ -114,7 +112,7 @@ const ADM_ARCHIVE_TAGS = [
</div>
</NCard>
<!-- 卡片数据 -->
<NGrid cols="s:1 m:4 l:4" responsive="screen" :x-gap="gap" :y-gap="16" :style="{'--theme-color': themeStore.themeColor}">
<NGrid cols="s:1 m:4 l:4" responsive="screen" :x-gap="16" :y-gap="16" :style="{'--theme-color': themeStore.themeColor}">
<NGi>
<div
class="flex-1 bg-white px-16px py-12px text-[#94a3b8]"
@@ -182,7 +180,7 @@ const ADM_ARCHIVE_TAGS = [
</NGi>
</NGrid>
<NGrid :x-gap="gap" :y-gap="16" responsive="screen" item-responsive>
<NGrid :x-gap="16" :y-gap="16" responsive="screen" item-responsive>
<NGi span="24 s:24 m:24 l:14">
<NCard :bordered="true" size="small" :content-style="{padding: 0}" :style="{ borderRadius: themeStore.themeRadius + 'px', height: '100%' }">
<p class=" text-base font-semibold border-b border-slate-100 p-3">各车间变更数量({{period}})</p>
@@ -201,7 +199,7 @@ const ADM_ARCHIVE_TAGS = [
</NGi>
</NGrid>
<NGrid :x-gap="gap" :y-gap="16" responsive="screen" item-responsive>
<NGrid :x-gap="16" :y-gap="16" responsive="screen" item-responsive>
<NGi span="24 s:24 m:24 l:8">
<NCard :bordered="true" size="small" :content-style="{padding: 0}"
:style="{
@@ -324,7 +322,7 @@ const ADM_ARCHIVE_TAGS = [
</NGi>
</NGrid>
<NGrid :x-gap="gap" :y-gap="16" responsive="screen" item-responsive>
<NGrid :x-gap="16" :y-gap="16" responsive="screen" item-responsive>
<NGi span="24 s:24 m:24 l:8">
<NCard
:bordered="true"
@@ -434,7 +432,7 @@ const ADM_ARCHIVE_TAGS = [
</NGi>
</NGrid>
<NGrid :x-gap="gap" :y-gap="16" responsive="screen" item-responsive>
<NGrid :x-gap="16" :y-gap="16" responsive="screen" item-responsive>
<NGi span="24 s:24 m:24 l:8">
<NCard :bordered="true" size="small" :content-style="{padding: 0}" :style="{ borderRadius: themeStore.themeRadius + 'px', height: '100%' }">
<p class=" text-base font-semibold border-b border-slate-100 p-3">各部门审批时长(天 · {{period}})</p>
@@ -529,7 +527,7 @@ const ADM_ARCHIVE_TAGS = [
</NGi>
</NGrid>
<NGrid :x-gap="gap" :y-gap="16" responsive="screen" item-responsive>
<NGrid :x-gap="16" :y-gap="16" responsive="screen" item-responsive>
<NGi span="24 s:24 m:24 l:24">
<NCard :bordered="true" size="small" :content-style="{padding: 0}"
:style="{