| | |
| | | { value: "106", label: "人力资源部" }, |
| | | ]; |
| | | |
| | | export const STORAGE_KEY = "oa_notice_announcement_v1"; |
| | | |
| | | export function noticeTypeLabel(v) { |
| | | return NOTICE_TYPE_OPTIONS.find((x) => x.value === v)?.label || v || "—"; |
| | | } |
| | |
| | | createTime: "", |
| | | updateTime: "", |
| | | }; |
| | | } |
| | | |
| | | /** @deprecated 不再注入演示数据,初始列表为空 */ |
| | | export function createInitialMockNotices() { |
| | | return []; |
| | | } |
| | | |
| | | export function loadStoredNotices() { |
| | | try { |
| | | const raw = localStorage.getItem(STORAGE_KEY); |
| | | if (!raw) return null; |
| | | const data = JSON.parse(raw); |
| | | return Array.isArray(data) ? data : null; |
| | | } catch { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | export function saveStoredNotices(rows) { |
| | | try { |
| | | localStorage.setItem(STORAGE_KEY, JSON.stringify(rows)); |
| | | } catch { |
| | | /* ignore */ |
| | | } |
| | | } |
| | | |
| | | export function nextNoticeNo() { |