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(() => {

待关闭确认

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

- + 关闭管理
-