From 0a58164ce2ea3f1a2b46781757d78b94b212883b Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 20 五月 2026 15:13:49 +0800
Subject: [PATCH] 工作交接/调岗申请/转正申请/请假申请/加班申请新增调用模板
---
src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
index 0019252..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,
@@ -10,7 +10,6 @@
DEPT_OPTIONS,
createEmptyForm,
loadStoredNotices,
- saveStoredNotices,
nextNoticeNo,
validateNoticeForm,
noticeTypeLabel,
@@ -20,8 +19,7 @@
} from "./noticeAnnouncementUtils.js";
export function useNoticeAnnouncement() {
- const stored = loadStoredNotices();
- const allRows = ref(stored?.length ? stored : []);
+ const allRows = ref([]);
const searchForm = reactive({
keyword: "",
@@ -151,9 +149,9 @@
},
]);
- function persist() {
- saveStoredNotices(allRows.value);
- }
+ onMounted(() => {
+ loadStoredNotices();
+ });
function handleQuery() {
tableLoading.value = true;
@@ -239,7 +237,6 @@
}
allRows.value[idx] = { ...prev, ...payload };
}
- persist();
formDialog.visible = false;
return { ok: true };
}
@@ -258,7 +255,6 @@
hit.publishTime = now;
hit.updateTime = now;
if (hit.noticeType === "emergency") hit.priority = "urgent";
- persist();
return true;
} catch {
return false;
@@ -276,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;
@@ -291,7 +286,6 @@
cancelButtonText: "鍙栨秷",
});
allRows.value = allRows.value.filter((r) => r.id !== row.id);
- persist();
return true;
} catch {
return false;
--
Gitblit v1.9.3