From 062fa5b080f9d0bdba9f1e9f2b9de81ebb24b765 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Thu, 14 Aug 2025 10:50:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/layout/components/notice/index.vue | 8 + src/store/modules/notice.ts | 13 +- src/views/design/billofQuantities/index.vue | 173 ------------------ .../design/billofQuantities/indexEdit.vue | 68 ++++--- src/views/message/config/index.vue | 65 ++++--- 6 files changed, 108 insertions(+), 221 deletions(-) diff --git a/.env.development b/.env.development index 21892b7..fe20df3 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.180:8898' +VITE_APP_BASE_API = 'http://192.168.110.159:8898' # 无人机接口地址 diff --git a/src/layout/components/notice/index.vue b/src/layout/components/notice/index.vue index 12e8289..0deeb5a 100644 --- a/src/layout/components/notice/index.vue +++ b/src/layout/components/notice/index.vue @@ -26,6 +26,9 @@ import { storeToRefs } from 'pinia'; import useNoticeStore from '@/store/modules/notice'; +const router = useRouter(); +const { proxy } = getCurrentInstance(); + const noticeStore = storeToRefs(useNoticeStore()); const { readAll } = useNoticeStore(); @@ -50,6 +53,11 @@ const onNewsClick = (item: any) => { newsList.value[item].read = true; //并且写入pinia noticeStore.state.value.notices = newsList.value; + //如果有formPath,就前往 + console.log('🚀 ~ onNewsClick ~ item.formPath:', item.formPath, newsList.value); + if (newsList.value[item].formPath) { + proxy?.$tab.openPage('/' + newsList.value[item].formPath, '', { id: newsList.value[item].businessId, type: 'view' }); + } }; // 前往通知中心点击 diff --git a/src/store/modules/notice.ts b/src/store/modules/notice.ts index de980b6..cbf4fb8 100644 --- a/src/store/modules/notice.ts +++ b/src/store/modules/notice.ts @@ -5,11 +5,22 @@ interface NoticeItem { read: boolean; message: any; time: string; + formPath?: string; + businessId?: string; } export const useNoticeStore = defineStore('notice', () => { const state = reactive({ - notices: [] as NoticeItem[] + notices: [ + { + title: '通知公告', + read: false, + message: '这是一条通知公告', + time: '2023-01-01', + formPath: 'design-management/scheme/indexEdit', + businessId: '1955636050617094146' + } + ] as NoticeItem[] }); const addNotice = (notice: NoticeItem) => { diff --git a/src/views/design/billofQuantities/index.vue b/src/views/design/billofQuantities/index.vue index 03dc600..a25aea2 100644 --- a/src/views/design/billofQuantities/index.vue +++ b/src/views/design/billofQuantities/index.vue @@ -1,82 +1,4 @@