北斗应用技术培训报名系统

This commit is contained in:
2026-03-27 17:39:28 +08:00
commit 08422bade5
75 changed files with 13629 additions and 0 deletions

45
src/stores/examMsg.js Normal file
View File

@@ -0,0 +1,45 @@
import { defineStore } from 'pinia';
import { parse, stringify } from 'zipson';
const examMsgActiveStore = defineStore('examMsg', {
state: () => ({
// 持久化数据
activeIndex: "1",
offset: 1,
limit: 10,
dataCount: 0,
pageCount: 0,
searchOptions: {
uid: "",
exam_name: "",
status: "",
application_end: "",
exam_start: "",
exam_end: "",
},
sortOptions: {
application_end: false,
exam_start: false,
exam_end: false,
},
dialogSearchVisible: false,
dialogSortVisible: false,
dialogOperationVisible: false
}),
persist: {
enabled: true, // Store 中数据持久化生效
strategies: [
{
key: 'examMsgActive', // 存储的 key
storage: localStorage, // 存储位置
paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段
serializer: {
deserialize: parse,
serialize: stringify,
},
}
]
},
});
export default examMsgActiveStore;