feat(admin): 联动用户、预约、排班和部门统计的只读预览

This commit is contained in:
2026-12-01 16:52:47 +08:00
parent e1681f8d13
commit ff55e1568e
23 changed files with 2045 additions and 488 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ const port = Number(process.argv[2] ?? 5178), host = '127.0.0.1'
const origin = `http://${host}:${port}`
const csp = "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self' data: blob:; font-src 'self' data:; media-src 'none'; frame-src 'none'; worker-src 'none'; form-action 'none'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'"
const types = {'.js':'application/javascript','.css':'text/css','.svg':'image/svg+xml','.woff2':'font/woff2','.woff':'font/woff','.png':'image/png','.jpg':'image/jpeg','.webp':'image/webp','.gif':'image/gif','.ttf':'font/ttf'}
const routes = new Set(['/','/admin','/admin/','/admin/workbench','/admin/order'])
const routes = new Set(['/','/admin','/admin/','/admin/workbench','/admin/order','/admin/members','/admin/members/detail','/admin/appointments','/admin/roster','/admin/dept-stats'])
async function serve(req,res) {
res.setHeader('Content-Security-Policy',csp); res.setHeader('Cache-Control','no-store'); res.setHeader('X-Content-Type-Options','nosniff'); res.setHeader('Referrer-Policy','no-referrer')
const send=(status,type,body)=>{ res.writeHead(status,{'Content-Type':type}); res.end(req.method==='HEAD' ? undefined : body) }