From ef7c65be0503814c137b94b5ad8fdf50ff257d33 Mon Sep 17 00:00:00 2001 From: bestlee Date: Tue, 29 Sep 2026 17:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E5=B7=A5=E7=A8=8B=E5=B8=88?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/api/statistics.ts | 14 +++++ src/views/home/modules/template1.vue | 42 ++++---------- src/views/home/modules/template4.vue | 4 +- src/views/home/modules/template9.vue | 84 ++++++++++------------------ 4 files changed, 57 insertions(+), 87 deletions(-) diff --git a/src/service/api/statistics.ts b/src/service/api/statistics.ts index db33030..6e811df 100644 --- a/src/service/api/statistics.ts +++ b/src/service/api/statistics.ts @@ -37,6 +37,20 @@ export function homeLeaderApi() { method: 'get', }); } +// 首页(系统管理员) +export function homeAdminApi() { + return request({ + url: `/api/workbench/admin`, + method: 'get', + }); +} +// 首页(质量工程师) +export function homeQualityApi() { + return request({ + url: `/api/workbench/quality`, + method: 'get', + }); +} // 变更数据中心 export function changeDataCenterApi(params: {from: string | null, to: string | null}) { diff --git a/src/views/home/modules/template1.vue b/src/views/home/modules/template1.vue index 350b916..48dca27 100644 --- a/src/views/home/modules/template1.vue +++ b/src/views/home/modules/template1.vue @@ -4,14 +4,12 @@ import { Icon } from '@iconify/vue' import { useThemeStore } from '@/store/modules/theme'; import { useRouterPush } from '@/hooks/common/router'; import { getColorWithOpacity } from '@/utils/common'; -import { systemConfigApi } from "@/service/api/system"; -import { homeApi } from "@/service/api/statistics"; +import { homeAdminApi } from "@/service/api/statistics"; const themeStore = useThemeStore(); const { routerPushByKey } = useRouterPush(); const loading = ref(false); -const isAiOpen = ref(0); // 时间显示 const clock = ref(''); let timer: any = null; @@ -54,7 +52,7 @@ const tick = () => { // 获取数据 const getData = async () => { loading.value = true; - const {data,error} = await homeApi(); + const {data,error} = await homeAdminApi(); if(!error){ homeData.value = data; console.log(data) @@ -62,25 +60,8 @@ const getData = async () => { loading.value = false; } -// 获取系统配置 -const getConfig = async () => { - const {data,error} = await systemConfigApi(); - if(!error){ - // 解析 AI 辅助功能配置 - const aiAssistGroup = data.find((group:{group_key:string}) => group.group_key === 'ai_assist'); - if (aiAssistGroup) { - console.log(aiAssistGroup.items) - const target = aiAssistGroup?.items?.find((item:any) => item.item_key === 'enabled'); - if (target) { - isAiOpen.value = Number(target.value); - } - } - } -} - onMounted(() => { tick(); - getConfig(); getData(); }) @@ -121,15 +102,14 @@ onUnmounted(() => {

待关闭确认

@@ -146,7 +126,7 @@ onUnmounted(() => {
@@ -166,14 +146,14 @@ onUnmounted(() => {

待关闭确认

变更主管部门(归口部门)专责确认 · 系统记录关闭时间

- + 关闭管理
-