164 lines
6.7 KiB
TypeScript
164 lines
6.7 KiB
TypeScript
export const ARCHIVE_REPORT_CSS = `
|
|
@page { size: A4; margin: 0; }
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0; background: #eef3f8; color: #101828;
|
|
font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
|
|
-webkit-print-color-adjust: exact; print-color-adjust: exact;
|
|
}
|
|
.section {
|
|
position: relative; width: 210mm; max-width: 100%;
|
|
margin: 0 auto 18px; padding: 14mm 15mm 10mm;
|
|
background: #fff;
|
|
}
|
|
.section-cover {
|
|
height: 297mm; overflow: hidden;
|
|
page-break-after: always; break-after: page;
|
|
}
|
|
.frame {
|
|
position: absolute; inset: 14mm; border: 1px solid #cfe0f2; pointer-events: none;
|
|
}
|
|
.header {
|
|
position: relative; z-index: 1; display: flex; align-items: center;
|
|
height: 39px; padding-bottom: 8px; border-bottom: 1px solid #cfe0f2;
|
|
page-break-after: avoid; break-after: avoid;
|
|
}
|
|
.logo {
|
|
width: 24px; height: 24px; border-radius: 6px;
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
margin-right: 8px; color: #fff; background: #155aa8;
|
|
font-weight: 800; font-size: 11px;
|
|
}
|
|
.brand { font-size: 10px; font-weight: 700; }
|
|
.page-kicker { margin-left: auto; font-size: 10px; color: #667085; }
|
|
.footer {
|
|
position: absolute; left: 15mm; right: 15mm; bottom: 8mm; z-index: 1;
|
|
display: flex; justify-content: space-between;
|
|
border-top: 1px solid #cfe0f2; padding-top: 5px;
|
|
font-size: 10px; color: #667085;
|
|
}
|
|
h1, h2, h3, p { margin: 0; }
|
|
h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
|
|
.section-title { font-size: 24px; line-height: 1.24; font-weight: 800; }
|
|
.source { font-size: 12px; color: #667085; padding-bottom: 2px; }
|
|
.title-row {
|
|
display: flex; align-items: flex-end; justify-content: space-between;
|
|
margin: 26px 0 17px;
|
|
page-break-after: avoid; break-after: avoid;
|
|
}
|
|
.cover-title { margin-top: 60px; font-size: 34px; line-height: 1.22; font-weight: 800; }
|
|
.cover-subtitle { margin-top: 22px; font-size: 16px; color: #667085; }
|
|
.cover-main {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 63px;
|
|
}
|
|
.cover-name-card {
|
|
min-height: 174px; border: 1px solid #cfe0f2;
|
|
border-left: 5px solid #155aa8; padding: 22px 24px;
|
|
}
|
|
.cover-name {
|
|
font-size: 44px; line-height: 1.14; font-weight: 800; color: #155aa8;
|
|
}
|
|
.cover-desc { margin-top: 22px; font-size: 16px; color: #667085; }
|
|
.cover-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
.cover-cell {
|
|
min-height: 61px; border: 1px solid #cfe0f2; padding: 11px 14px;
|
|
}
|
|
.label { font-size: 11px; color: #667085; margin-bottom: 8px; }
|
|
.value { font-size: 14px; line-height: 1.5; font-weight: 700; }
|
|
.toc { margin-top: 58px; }
|
|
.toc-row {
|
|
display: grid; grid-template-columns: 48px 1fr; align-items: center;
|
|
height: 47px; border-bottom: 1px solid #cfe0f2;
|
|
}
|
|
.toc-index { color: #155aa8; font-size: 15px; font-weight: 800; }
|
|
.toc-name { font-size: 14px; font-weight: 800; }
|
|
.toc-page { text-align: right; color: #667085; font-size: 12px; }
|
|
.watermark {
|
|
position: absolute; right: 36px; bottom: 82px; color: #eaf1fb;
|
|
font-size: 56px; font-weight: 900; writing-mode: vertical-rl;
|
|
}
|
|
.grid-2 {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.grid-4 {
|
|
display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.card {
|
|
border: 1px solid #cfe0f2; padding: 14px; background: #fff;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.card h3 { font-size: 16px; margin-bottom: 14px; }
|
|
.data-table {
|
|
width: 100%; border-collapse: collapse; table-layout: fixed;
|
|
}
|
|
.data-table th, .data-table td {
|
|
border: 1px solid #d6e3f2; padding: 8px 9px; font-size: 12px;
|
|
line-height: 1.55; vertical-align: top; text-align: left;
|
|
}
|
|
.data-table th {
|
|
background: #eaf3fd; color: #173f6f; font-weight: 800; white-space: nowrap;
|
|
}
|
|
.data-table td { overflow-wrap: anywhere; word-break: break-word; }
|
|
.data-table .nowrap { white-space: nowrap; }
|
|
.data-table tr { page-break-inside: avoid; break-inside: avoid; }
|
|
.metric {
|
|
min-height: 88px; border: 1px solid #cfe0f2; padding: 13px 14px;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.metric .label { margin-bottom: 7px; }
|
|
.metric strong {
|
|
display: block; color: #155aa8; font-size: 27px; line-height: 1.16;
|
|
margin-bottom: 10px;
|
|
}
|
|
.metric p {
|
|
color: #667085; font-size: 12px; line-height: 1.45;
|
|
}
|
|
.summary-row {
|
|
display: grid; grid-template-columns: 92px 1fr; gap: 12px;
|
|
padding: 14px 0; border-bottom: 1px solid #d6e3f2;
|
|
font-size: 13px; line-height: 1.6;
|
|
}
|
|
.summary-row:last-child { border-bottom: 0; }
|
|
.summary-row strong { color: #155aa8; }
|
|
.note {
|
|
margin-top: 14px; padding: 12px 16px; border-left: 4px solid #155aa8;
|
|
background: #eef5ff; color: #173f6f; font-size: 12px; line-height: 1.7;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.line-chart {
|
|
width: 100%; height: 180px; display: block;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.bar-chart {
|
|
width: 100%; height: 150px; display: block;
|
|
page-break-inside: avoid; break-inside: avoid;
|
|
}
|
|
.status {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
width: 18px; height: 18px; border-radius: 5px; margin-right: 6px;
|
|
color: #fff; font-size: 11px; font-weight: 800;
|
|
}
|
|
.present { background: #18a77d; }
|
|
.leave { background: #f15b75; }
|
|
.late { background: #f59e0b; }
|
|
.absent { background: #dc2626; }
|
|
.progress-row {
|
|
display: grid; grid-template-columns: 72px 1fr 42px; align-items: center;
|
|
gap: 8px; margin: 10px 0; font-size: 12px;
|
|
}
|
|
.progress-track {
|
|
height: 11px; border-radius: 999px; background: #dfeaf6; overflow: hidden;
|
|
}
|
|
.progress-track i {
|
|
display: block; height: 100%; border-radius: 999px;
|
|
background: linear-gradient(90deg, #155aa8, #2e7df0);
|
|
}
|
|
.muted { color: #667085; }
|
|
@media print {
|
|
body { background: #fff; }
|
|
.section { margin: 0; box-shadow: none; }
|
|
}
|
|
`;
|