|
|
@@ -0,0 +1,118 @@
|
|
|
+export const STORAGE_KEY = 'lab-safety-mobile-v1.2-state'
|
|
|
+
|
|
|
+export const seedState = {
|
|
|
+ currentUser: {
|
|
|
+ id: '20231001',
|
|
|
+ name: '张同学',
|
|
|
+ studentNo: '20231001',
|
|
|
+ collegeId: 'chemistry',
|
|
|
+ collegeName: '化学与化工学院',
|
|
|
+ role: 'learner',
|
|
|
+ academicYear: '2026–2027 学年'
|
|
|
+ },
|
|
|
+ courses: [
|
|
|
+ {
|
|
|
+ id: 'lab-safety-basics', name: '实验室安全基础课程', creditHours: 4, points: 10,
|
|
|
+ assessmentEnabled: true,
|
|
|
+ lessons: [
|
|
|
+ { id: 'lab-1', title: '实验室安全通识', type: 'document', requiredMinutes: 20 },
|
|
|
+ { id: 'lab-2', title: '常用消防器材使用方法', type: 'video', requiredMinutes: 25 }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'personal-protection', name: '个人防护与风险辨识', creditHours: 4, points: 10,
|
|
|
+ assessmentEnabled: false,
|
|
|
+ lessons: [{ id: 'protection-1', title: '个人防护装备规范', type: 'video', requiredMinutes: 30 }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'bio-safety-operation', name: '生物安全操作规范', creditHours: 3, points: 8,
|
|
|
+ assessmentEnabled: true,
|
|
|
+ lessons: [{ id: 'bio-1', title: '生物实验室操作规范', type: 'document', requiredMinutes: 20 }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'training-fire', name: '消防安全专题培训', creditHours: 2, points: 5,
|
|
|
+ scope: { type: 'all-school', collegeIds: [] }, assessmentEnabled: false,
|
|
|
+ lessons: [{ id: 'fire-1', title: '初起火灾处置', type: 'video', requiredMinutes: 18 }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'training-chemical', name: '化学实验室危化品管理', creditHours: 2, points: 5,
|
|
|
+ scope: { type: 'college', collegeIds: ['chemistry'] }, assessmentEnabled: false,
|
|
|
+ lessons: [{ id: 'chemical-1', title: '危化品存储要求', type: 'document', requiredMinutes: 18 }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'training-radiation', name: '辐射安全培训', creditHours: 2, points: 5,
|
|
|
+ scope: { type: 'college', collegeIds: ['physics'] }, assessmentEnabled: false,
|
|
|
+ lessons: [{ id: 'radiation-1', title: '辐射防护基础', type: 'document', requiredMinutes: 18 }]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ materials: [
|
|
|
+ { id: 'material-video-fire', title: '实验室火灾预防', type: 'video', requiredMinutes: 5, completed: false },
|
|
|
+ { id: 'material-doc-chemical', title: '千万不能碰的化学品', type: 'document', requiredMinutes: 5, completed: false },
|
|
|
+ { id: 'material-video-waste', title: '实验室废弃物分类', type: 'video', requiredMinutes: 6, completed: true }
|
|
|
+ ],
|
|
|
+ exams: [
|
|
|
+ {
|
|
|
+ id: 'graded-entry-2026', name: '实验室安全分级考试', type: '分级考试', examStatus: '进行中',
|
|
|
+ startDate: '2026-09-01', endDate: '2026-09-30', durationMinutes: 75, passScore: 70, maxAttempts: 3, attemptsUsed: 0,
|
|
|
+ formalExamOpen: true, prototypeOpen: true, creditHoursRequired: false, requiredCreditHours: null, earnedCreditHours: null,
|
|
|
+ learningTargetType: 'courseware', learningTargetId: 'lab-safety-basics', lessonId: 'lab-1', learningCompleted: false,
|
|
|
+ mockExamEnabled: false, mockExamId: null, issuedCertificateId: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'should-know-monthly-2026', name: '常规考试小月考', type: '常规考试', examStatus: '进行中',
|
|
|
+ startDate: '2026-09-01', endDate: '2026-09-30', durationMinutes: 90, passScore: 70, maxAttempts: 3, attemptsUsed: 1,
|
|
|
+ formalExamOpen: true, prototypeOpen: true, creditHoursRequired: true, requiredCreditHours: 8, earnedCreditHours: 6,
|
|
|
+ learningTargetType: 'materials', learningTargetId: null, lessonId: null, learningCompleted: false,
|
|
|
+ mockExamEnabled: true, mockExamId: 'should-know-monthly-2026-mock', mockExamCompleted: false, issuedCertificateId: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'general-safety-2026', name: '2025–2026学年实验室安全常规考试', type: '常规考试', examStatus: '进行中',
|
|
|
+ startDate: '2026-09-01', endDate: '2026-09-30', durationMinutes: 60, passScore: 60, maxAttempts: 2, attemptsUsed: 0,
|
|
|
+ formalExamOpen: true, prototypeOpen: true, creditHoursRequired: false, requiredCreditHours: null, earnedCreditHours: null,
|
|
|
+ learningTargetType: null, learningTargetId: null, lessonId: null, learningCompleted: true,
|
|
|
+ mockExamEnabled: false, mockExamId: null, issuedCertificateId: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'graded-makeup-2026', name: '实验室安全分级考试(补考安排)', type: '分级考试', examStatus: '进行中',
|
|
|
+ startDate: '2026-09-01', endDate: '2026-09-30', durationMinutes: 80, passScore: 70, maxAttempts: 3, attemptsUsed: 1,
|
|
|
+ formalExamOpen: true, prototypeOpen: true, creditHoursRequired: true, requiredCreditHours: 8, earnedCreditHours: 8,
|
|
|
+ learningTargetType: 'courseware', learningTargetId: 'personal-protection', lessonId: 'protection-1', learningCompleted: true,
|
|
|
+ mockExamEnabled: true, mockExamId: 'graded-makeup-2026-mock', mockExamCompleted: true,
|
|
|
+ formalExamResult: '未通过',
|
|
|
+ makeupArrangementId: 'graded-makeup-2026-arrangement-01', makeupPublished: true, makeupArrangementValid: true,
|
|
|
+ makeupStartTime: '2026-10-20T00:00:00+08:00', makeupEndTime: '2026-11-05T23:59:59+08:00', prototypeOpen: true,
|
|
|
+ makeupCandidateIds: ['20231001', '20239999'], makeupMaxAttempts: 2, makeupUsedAttempts: 1,
|
|
|
+ issuedCertificateId: 'graded-makeup-2026-issued'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ preExamAssignments: [
|
|
|
+ { id: 'pre-course-graded-entry', learnerId: '20231001', examId: 'graded-entry-2026', courseId: 'lab-safety-basics', status: 'pending' },
|
|
|
+ { id: 'pre-course-graded-makeup', learnerId: '20231001', examId: 'graded-makeup-2026', courseId: 'personal-protection', status: 'completed' }
|
|
|
+ ],
|
|
|
+ violationTasks: [
|
|
|
+ { id: 'violation-learning-2026-01', learnerId: '20231001', courseId: 'bio-safety-operation', status: 'pending', label: '违规处置学习' }
|
|
|
+ ],
|
|
|
+ trainings: [
|
|
|
+ { id: 'offline-fire-01', learnerId: '20231001', title: '实验室消防实操培训', date: '2026-09-18 14:00', place: '东校区-实验楼-2层-201', mentor: '李老师', status: 'pending', completed: false },
|
|
|
+ { id: 'offline-first-aid-01', learnerId: '20231001', title: '实验室急救基础培训', date: '2026-08-20 09:30', place: '东校区-培训楼-1层-101', mentor: '王老师', status: 'completed', completed: true }
|
|
|
+ ],
|
|
|
+ certificates: [
|
|
|
+ { id: 'issued-legacy-lab', learnerId: '20231001', examId: 'history-exam-2025', title: '实验室安全培训合格证书', source: '实验室安全考试', expiresAt: '2027-09-30', issued: true, imageUrl: '/static/certificate-demo.svg' },
|
|
|
+ { id: 'graded-makeup-2026-issued', learnerId: '20231001', examId: 'graded-makeup-2026', title: '实验室安全分级考试合格证书', source: '实验室安全分级考试', expiresAt: '2027-10-31', issued: true, imageUrl: '/static/certificate-demo.svg' }
|
|
|
+ ],
|
|
|
+ notices: [
|
|
|
+ { id: 'notice-1', title: '2026–2027学年实验室安全教育工作通知', date: '2026-09-01' },
|
|
|
+ { id: 'notice-2', title: '国庆假期实验室安全提示', date: '2026-09-25' }
|
|
|
+ ],
|
|
|
+ courseProgress: {},
|
|
|
+ materialProgress: {},
|
|
|
+ examRuns: {},
|
|
|
+ scoreHistory: [
|
|
|
+ { id: 'formal-graded-makeup-2026-01', examId: 'graded-makeup-2026', mode: 'formal', score: 68, correct: 68, wrong: 32, accuracy: '68%', passed: false, submitted: true, postPledgeConfirmed: true },
|
|
|
+ { id: 'makeup-graded-makeup-2026-01', examId: 'graded-makeup-2026', mode: 'makeup', score: 82, correct: 82, wrong: 18, accuracy: '82%', passed: true, submitted: true, postPledgeConfirmed: true, certificateId: 'graded-makeup-2026-issued' }
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+export function cloneSeed() {
|
|
|
+ return JSON.parse(JSON.stringify(seedState))
|
|
|
+}
|