From d44d15d044c9e1b70f3dbf87b8d7a54ac8983852 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Thu, 07 May 2026 15:22:19 +0800
Subject: [PATCH] 修改
---
src/views/work/menuIndex/index.vue | 61 +++++++++++++++++++-----------
1 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/src/views/work/menuIndex/index.vue b/src/views/work/menuIndex/index.vue
index da41bf4..f0d689a 100644
--- a/src/views/work/menuIndex/index.vue
+++ b/src/views/work/menuIndex/index.vue
@@ -11,10 +11,20 @@
<span class="more-link" @click="toNoticeMng">更多 ></span>
</div>
<div class="notice-list">
- <div class="notice-item" v-for="item in noticeList" :key="item">
- <span class="notice-title" @click="openNoticeFile(item.filePath)">{{item.content}}</span>
- <span class="notice-date">{{item.publishDate}}</span>
- </div>
+
+ <template v-if="noticeLoading">
+ <div v-for="i in 6" :key="i" class="notice-item skeleton">
+ <div class="skeleton-title"></div>
+ <div class="skeleton-date"></div>
+ </div>
+ </template>
+
+ <template v-else>
+ <div class="notice-item" v-for="item in noticeList" :key="item.id">
+ <span class="notice-title" @click="openNoticeFile(item.filePath)">{{item.content}}</span>
+ <span class="notice-date">{{item.publishDate}}</span>
+ </div>
+ </template>
</div>
</div>
@@ -27,8 +37,8 @@
<div class="process-list" v-if="flowList && flowList.length>0">
<div class="process-item" v-for="process in flowList" :key="process.id">
<div class="process-info" @click="openDetail(process)">
- <span class="process-status" :class="{processing: process.type == 1,pending: process.type == 2,success: process.type == 3,normal: process.type == 4,seal: process.type == 5}">
- {{process.type == 1? '内审实施计划':process.type == 2? '培训计划':process.type == 3? '项目评审':process.type == 4?'年度检定计划':process.type == 5?'用章审批(申请)': '用章审批(待审批)'}}
+ <span class="process-status" :class="{processing: process.type == 1,pending: process.type == 2,success: process.type == 3,normal: process.type == 4,seal: process.type == 5,normal: process.type == 6,normal: process.type == 8}">
+ {{process.type == 1? '内审实施计划':process.type == 2? '培训计划':process.type == 3? '项目评审':process.type == 4?'年度检定计划':process.type == 5?'用章审批(申请)': process.type == 6? '用章审批(待审批)':process.type == 7?'颁布令':process.type == 8?'合同审批':'' }}
</span>
<span class="process-name">{{process.title}}</span>
</div>
@@ -98,8 +108,7 @@
>
<div class="card-content">
<div class="system-icon">
- <el-image v-if="getActualIndex(index) == 0" :src="system.platformPic"/>
- <el-image v-else :src="picUrl + system.platformPic"/>
+ <el-image :src="picUrl + system.platformPic"/>
</div>
<h3>{{ system.platformName }}</h3>
</div>
@@ -180,12 +189,6 @@
import userDialog from '@/views/build/conpanyFunctionConsult/staffManage/staffRegister/components/staffDialog.vue'
import editDialog from '@/views/build/conpanyFunctionConsult/infoPlatform/components/editDialog.vue'
import sealDialog from "@/views/work/sealManagement/apply/components/editDialog"
-import menu1 from '@/assets/icons/menu1.png'
-import menu2 from '@/assets/icons/menu2.png'
-import menu3 from '@/assets/icons/menu3.png'
-import menu4 from '@/assets/icons/menu4.png'
-import menu5 from '@/assets/icons/menu5.png'
-import menu6 from '@/assets/icons/menu6.png'
// 引入农历库
import * as lunarCalendar from 'lunar-calendar'
@@ -207,6 +210,8 @@
const calendarRef = ref()
const dialogRef = ref()
const noticeRef = ref();
+const noticeLoading = ref(true)
+
const userStore = useUserStore()
const state = reactive({
noticeParams: {
@@ -244,10 +249,13 @@
state.platformParams.companyId = userStore.companyId
state.isAdmin = false
}
- await getNoticeList()
- await getPlatformList()
- await getFlowList()
- await getMemo()
+ // 并行加载所有数据
+ await Promise.allSettled([
+ getNoticeList(),
+ getPlatformList(),
+ getFlowList(),
+ getMemo()
+ ])
state.platformList.forEach(system => {
cardStates.value[system.id] = {
mouseX: 0,
@@ -293,10 +301,17 @@
noticeRef.value.openDialog('review', data,state.companyList)
}
}
-function getNoticeList() {
- listNotice(state.noticeParams).then(res => {
- state.noticeList = res.data.list
- })
+async function getNoticeList() {
+ try {
+ noticeLoading.value = true
+ const res = await listNotice(state.noticeParams)
+ state.noticeList = res.data.list || []
+ } catch (error) {
+ console.error('获取通知公告失败:', error)
+ state.noticeList = []
+ } finally {
+ noticeLoading.value = false
+ }
}
const getCompanyList = async ()=>{
const queryParams = {
@@ -469,7 +484,7 @@
const lunar = lunarCalendar.solarToLunar(year, month, day)
if (lunar && lunar.lunarMonthName && lunar.lunarDayName) {
- return `${lunar.lunarMonthName}${lunar.lunarDayName}`
+ return `农历·${lunar.lunarMonthName}${lunar.lunarDayName}`
}
return ''
} catch (error) {
--
Gitblit v1.9.2