From 97081b89ee45da49b8dbb4173ab45df031fe3c0d Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 20 五月 2026 16:58:40 +0800
Subject: [PATCH] 删除冗余和无效代码
---
src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
index c9a9d9f..67281c4 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,6 @@
READ_SCOPE_OPTIONS,
DEPT_OPTIONS,
createEmptyForm,
- createInitialMockNotices,
- loadStoredNotices,
- saveStoredNotices,
nextNoticeNo,
validateNoticeForm,
noticeTypeLabel,
@@ -21,8 +18,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 +148,13 @@
},
]);
- function persist() {
- saveStoredNotices(allRows.value);
- }
+ onMounted(() => {
+ try {
+ localStorage.removeItem("oa_notice_announcement_v1");
+ } catch {
+ /* 娓呴櫎鍘嗗彶鏈湴婕旂ず缂撳瓨 */
+ }
+ });
function handleQuery() {
tableLoading.value = true;
@@ -240,7 +240,6 @@
}
allRows.value[idx] = { ...prev, ...payload };
}
- persist();
formDialog.visible = false;
return { ok: true };
}
@@ -259,7 +258,6 @@
hit.publishTime = now;
hit.updateTime = now;
if (hit.noticeType === "emergency") hit.priority = "urgent";
- persist();
return true;
} catch {
return false;
@@ -277,7 +275,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 +289,6 @@
cancelButtonText: "鍙栨秷",
});
allRows.value = allRows.value.filter((r) => r.id !== row.id);
- persist();
return true;
} catch {
return false;
--
Gitblit v1.9.3