From 352f7bbb74f1b6c57b3d3e576849d0565932fbd4 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 20 五月 2026 16:50:36 +0800
Subject: [PATCH] 审批模板集成页面
---
src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
index c9a9d9f..1858fdb 100644
--- a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
+++ b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
@@ -1,7 +1,7 @@
import { Search } from "@element-plus/icons-vue";
import dayjs from "dayjs";
import { ElMessageBox } from "element-plus";
-import { computed, reactive, ref, watch } from "vue";
+import { computed, onMounted, reactive, ref, watch } from "vue";
import {
NOTICE_TYPE_OPTIONS,
PRIORITY_OPTIONS,
@@ -9,9 +9,7 @@
READ_SCOPE_OPTIONS,
DEPT_OPTIONS,
createEmptyForm,
- createInitialMockNotices,
loadStoredNotices,
- saveStoredNotices,
nextNoticeNo,
validateNoticeForm,
noticeTypeLabel,
@@ -21,8 +19,7 @@
} from "./noticeAnnouncementUtils.js";
export function useNoticeAnnouncement() {
- const stored = loadStoredNotices();
- const allRows = ref(stored?.length ? stored : createInitialMockNotices());
+ const allRows = ref([]);
const searchForm = reactive({
keyword: "",
@@ -152,9 +149,9 @@
},
]);
- function persist() {
- saveStoredNotices(allRows.value);
- }
+ onMounted(() => {
+ loadStoredNotices();
+ });
function handleQuery() {
tableLoading.value = true;
@@ -240,7 +237,6 @@
}
allRows.value[idx] = { ...prev, ...payload };
}
- persist();
formDialog.visible = false;
return { ok: true };
}
@@ -259,7 +255,6 @@
hit.publishTime = now;
hit.updateTime = now;
if (hit.noticeType === "emergency") hit.priority = "urgent";
- persist();
return true;
} catch {
return false;
@@ -277,7 +272,6 @@
if (!hit) return;
hit.publishStatus = "withdrawn";
hit.updateTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
- persist();
return true;
} catch {
return false;
@@ -292,7 +286,6 @@
cancelButtonText: "鍙栨秷",
});
allRows.value = allRows.value.filter((r) => r.id !== row.id);
- persist();
return true;
} catch {
return false;
--
Gitblit v1.9.3