222 lines
26 KiB
Vue
222 lines
26 KiB
Vue
<script setup lang="ts">
|
|
import { useI18n } from 'vue-i18n'
|
|
const { t } = useI18n()
|
|
import { computed, onMounted, reactive, ref } from 'vue'
|
|
import { ElMessage } from 'element-plus'
|
|
import { Download, Plus, Promotion, Refresh, Search, Upload } from '@element-plus/icons-vue'
|
|
import http, { apiErrorMessage } from '../api/http'
|
|
import { downloadApiFile } from '../api/excel'
|
|
import { useAuthStore } from '../stores/auth'
|
|
|
|
type ResultRow = { studentNumber: string; studentName?: string; collegeName?: string; className?: string; attemptNumber?: number; score: number | null; level: string; isPassed: boolean | null; notes: string }
|
|
const auth = useAuthStore()
|
|
const isStudent = computed(() => auth.user?.roles.includes('Student'))
|
|
const loading = ref(false)
|
|
const batches = ref<any[]>([])
|
|
const batchKeyword = ref('')
|
|
const batchStatus = ref<number | undefined>()
|
|
const batchMetricKind = ref<number | undefined>()
|
|
const batchDateRange = ref<string[]>([])
|
|
const batchPage = ref(1)
|
|
const batchPageSize = 20
|
|
const batchTotal = ref(0)
|
|
const batchCursors = ref<string[]>([])
|
|
const nextBatchCursor = ref<string>()
|
|
const batchHasMore = ref(false)
|
|
const selected = ref<any>(null)
|
|
const results = ref<ResultRow[]>([])
|
|
const resultPage = ref(1)
|
|
const resultPageSize = 30
|
|
const resultCursors = ref<string[]>([])
|
|
const nextResultCursor = ref<string>()
|
|
const resultHasMore = ref(false)
|
|
const resultTotal = ref(0)
|
|
const resultKeyword = ref('')
|
|
const resultGrade = ref<number>()
|
|
const resultCollegeId = ref('')
|
|
const resultMajorId = ref('')
|
|
const resultClassId = ref('')
|
|
const resultFilterOptions = ref<any>({ grades: [], colleges: [], majors: [], classes: [] })
|
|
const resultFilterBatchId = ref('')
|
|
const mine = reactive({ best: [] as any[], history: [] as any[] })
|
|
const dialog = ref(false)
|
|
const publishDialog = ref(false)
|
|
const saving = ref(false)
|
|
const form = reactive({ examCode: '', name: '', organizer: '', examDate: new Date().toISOString().slice(0, 10), metricKind: 3, maxScore: 100, levelOptions: '' })
|
|
const selectedMetricKind = computed(() => Number(selected.value?.metricKind ?? 0))
|
|
const isScoreMetric = computed(() => selectedMetricKind.value === 3)
|
|
const isLevelMetric = computed(() => selectedMetricKind.value === 2)
|
|
const isPassMetric = computed(() => selectedMetricKind.value === 1)
|
|
const resultMajors = computed(() => resultFilterOptions.value.majors.filter((item: any) => !resultCollegeId.value || item.collegeId === resultCollegeId.value))
|
|
const resultClasses = computed(() => resultFilterOptions.value.classes.filter((item: any) =>
|
|
(!resultGrade.value || item.grade === resultGrade.value) &&
|
|
(!resultMajorId.value ? !resultCollegeId.value || resultMajors.value.some((major: any) => major.id === item.majorId) : item.majorId === resultMajorId.value)))
|
|
function metricKindValue(kind: unknown) {
|
|
if (typeof kind === 'string') return ({ PassFail: 1, Level: 2, Score: 3 } as Record<string, number>)[kind] ?? Number(kind)
|
|
return Number(kind)
|
|
}
|
|
function batchStatusValue(status: unknown) {
|
|
if (typeof status === 'string') return ({ Draft: 1, Published: 2 } as Record<string, number>)[status] ?? Number(status)
|
|
return Number(status)
|
|
}
|
|
function normalizeBatch(batch: any) {
|
|
return { ...batch, metricKind: metricKindValue(batch.metricKind), status: batchStatusValue(batch.status) }
|
|
}
|
|
|
|
async function load(resetPage = false) {
|
|
loading.value = true
|
|
try {
|
|
if (isStudent.value) Object.assign(mine, (await http.get('/other-exams/mine')).data)
|
|
else {
|
|
if (resetPage) {
|
|
batchPage.value = 1
|
|
batchCursors.value = []
|
|
nextBatchCursor.value = undefined
|
|
}
|
|
const response = (await http.get('/other-exams/batches', {
|
|
params: {
|
|
keyword: batchKeyword.value.trim() || undefined,
|
|
status: batchStatus.value,
|
|
metricKind: batchMetricKind.value,
|
|
examDateFrom: batchDateRange.value[0] || undefined,
|
|
examDateTo: batchDateRange.value[1] || undefined,
|
|
cursor: batchCursors.value.at(-1),
|
|
pageSize: batchPageSize,
|
|
},
|
|
})).data
|
|
batches.value = response.items.map(normalizeBatch)
|
|
batchTotal.value = response.total
|
|
batchHasMore.value = response.hasMore
|
|
nextBatchCursor.value = response.nextCursor
|
|
}
|
|
} catch (error) { ElMessage.error(apiErrorMessage(error)) } finally { loading.value = false }
|
|
}
|
|
async function nextBatchPage() {
|
|
if (!nextBatchCursor.value || loading.value) return
|
|
batchCursors.value.push(nextBatchCursor.value)
|
|
batchPage.value += 1
|
|
await load()
|
|
}
|
|
async function previousBatchPage() {
|
|
if (!batchCursors.value.length || loading.value) return
|
|
batchCursors.value.pop()
|
|
batchPage.value -= 1
|
|
await load()
|
|
}
|
|
async function openBatch(row: any, resetPage = true) {
|
|
if (resetPage) {
|
|
resultPage.value = 1
|
|
resultCursors.value = []
|
|
nextResultCursor.value = undefined
|
|
}
|
|
try {
|
|
if (resultFilterBatchId.value !== row.id) {
|
|
resultFilterOptions.value = (await http.get(`/other-exams/batches/${row.id}/result-filter-options`)).data
|
|
resultFilterBatchId.value = row.id
|
|
resultKeyword.value = ''; resultGrade.value = undefined; resultCollegeId.value = ''; resultMajorId.value = ''; resultClassId.value = ''
|
|
}
|
|
const data = (await http.get(`/other-exams/batches/${row.id}`, { params: resultRequestParams(true) })).data
|
|
const metricKind = metricKindValue(data.batch.metricKind)
|
|
data.batch.metricKind = [1, 2, 3].includes(metricKind) ? metricKind : 3
|
|
selected.value = data.batch
|
|
results.value = data.results.items.map((item: any) => ({ ...item, score: item.score ?? null, level: item.level ?? '', notes: item.notes ?? '' }))
|
|
resultTotal.value = data.results.total
|
|
resultHasMore.value = data.results.hasMore
|
|
nextResultCursor.value = data.results.nextCursor
|
|
} catch (error) { ElMessage.error(apiErrorMessage(error)) }
|
|
}
|
|
function resultRequestParams(includePage: boolean) { return { keyword: resultKeyword.value.trim() || undefined, grade: resultGrade.value, collegeId: resultCollegeId.value || undefined, majorId: resultMajorId.value || undefined, administrativeClassId: resultClassId.value || undefined, cursor: includePage ? resultCursors.value.at(-1) : undefined, pageSize: includePage ? resultPageSize : undefined } }
|
|
function onResultCollegeChange() { resultMajorId.value = ''; resultClassId.value = '' }
|
|
function onResultMajorChange() { resultClassId.value = '' }
|
|
async function searchResults() { if (selected.value) await openBatch(selected.value, true) }
|
|
async function exportResults() { if (!selected.value) return; try { await downloadApiFile(`/other-exams/batches/${selected.value.id}/export.xlsx`, t('otherExams.exportFile', { name: selected.value.name }), { params: resultRequestParams(false) }); ElMessage.success(t('otherExams.exported')) } catch (error) { ElMessage.error(apiErrorMessage(error)) } }
|
|
async function nextResultPage() {
|
|
if (!selected.value || !nextResultCursor.value || loading.value) return
|
|
resultCursors.value.push(nextResultCursor.value); resultPage.value += 1
|
|
await openBatch(selected.value, false)
|
|
}
|
|
async function previousResultPage() {
|
|
if (!selected.value || !resultCursors.value.length || loading.value) return
|
|
resultCursors.value.pop(); resultPage.value -= 1
|
|
await openBatch(selected.value, false)
|
|
}
|
|
function addResult() { results.value.push({ studentNumber: '', studentName: '', collegeName: '', className: '', score: null, level: '', isPassed: null, notes: '' }) }
|
|
async function lookupStudent(row: ResultRow | any) {
|
|
row.studentName = ''; row.collegeName = ''; row.className = ''
|
|
if (!row.studentNumber.trim()) return
|
|
try {
|
|
const { data } = await http.get('/other-exams/students/lookup', { params: { studentNumber: row.studentNumber.trim() } })
|
|
row.studentNumber = data.studentNumber; row.studentName = data.name; row.collegeName = data.collegeName; row.className = data.className
|
|
} catch { ElMessage.warning(t('otherExams.studentNotFound', { number: row.studentNumber })) }
|
|
}
|
|
async function saveResults() {
|
|
saving.value = true
|
|
try {
|
|
await http.put(`/other-exams/batches/${selected.value.id}/results`, { results: results.value.map(row => ({ studentNumber: row.studentNumber, score: isScoreMetric.value ? row.score : null, level: isLevelMetric.value ? row.level : null, isPassed: isPassMetric.value ? row.isPassed : null, notes: row.notes })) })
|
|
ElMessage.success(t('otherExams.saved')); await openBatch(selected.value, false); await load()
|
|
} catch (error) { ElMessage.error(apiErrorMessage(error)) } finally { saving.value = false }
|
|
}
|
|
async function publish() {
|
|
publishDialog.value = true
|
|
}
|
|
async function confirmPublish() {
|
|
saving.value = true
|
|
try {
|
|
await http.post(`/other-exams/batches/${selected.value.id}/publish`)
|
|
publishDialog.value = false
|
|
ElMessage.success(t('otherExams.published'))
|
|
await openBatch(selected.value)
|
|
await load()
|
|
} catch (error) {
|
|
ElMessage.error(t('otherExams.publishFailed', { error: apiErrorMessage(error) }))
|
|
} finally { saving.value = false }
|
|
}
|
|
async function createBatch() {
|
|
try { await http.post('/other-exams/batches', form); dialog.value = false; ElMessage.success(t('otherExams.created')); await load() }
|
|
catch (error) { ElMessage.error(apiErrorMessage(error)) }
|
|
}
|
|
async function downloadTemplate() {
|
|
try {
|
|
await downloadApiFile(`/other-exams/batches/${selected.value.id}/template`, t('otherExams.templateFile'))
|
|
} catch (error) { ElMessage.error(apiErrorMessage(error)) }
|
|
}
|
|
async function importExcel(event: Event) {
|
|
const input = event.target as HTMLInputElement; const file = input.files?.[0]; input.value = ''
|
|
if (!file) return
|
|
const data = new FormData(); data.append('file', file)
|
|
try { await http.post(`/other-exams/batches/${selected.value.id}/import`, data, { headers: { 'Content-Type': 'multipart/form-data' } }); ElMessage.success(t('otherExams.imported')); await openBatch(selected.value, false); await load() }
|
|
catch (error) { ElMessage.error(apiErrorMessage(error)) }
|
|
}
|
|
function metricName(kind: number | string) { const value = metricKindValue(kind); return value === 1 ? t('otherExams.passMetric') : value === 2 ? t('otherExams.levelMetric') : t('otherExams.scoreMetric') }
|
|
function displayResult(row: any) { const kind = metricKindValue(row.metricKind); return kind === 3 ? `${row.score} / ${row.maxScore}` : kind === 2 ? row.level : row.isPassed ? t('otherExams.pass') : t('otherExams.fail') }
|
|
onMounted(load)
|
|
</script>
|
|
|
|
<template>
|
|
<div class="other-exams-page">
|
|
<section class="exam-hero"><div><span class="kicker">{{ t('otherExams.kicker') }}</span><h1>{{ t('otherExams.title') }}</h1><p>{{ isStudent ? t('otherExams.studentDescription') : t('otherExams.managerDescription') }}</p></div><el-button v-if="!isStudent" type="primary" :icon="Plus" @click="dialog = true">{{ t('otherExams.newSession') }}</el-button></section>
|
|
<template v-if="isStudent">
|
|
<section class="result-board"><div class="board-title"><div><span class="kicker">{{ t('otherExams.summary') }}</span><h2>{{ t('otherExams.myBest') }}</h2></div><span class="board-note">{{ t('otherExams.comparisonHint') }}</span></div><el-table :data="mine.best" v-loading="loading"><el-table-column prop="examName" :label="t('businessLabels.exam')" min-width="180"/><el-table-column prop="examCode" :label="t('businessLabels.examCode')" width="130"/><el-table-column prop="examDate" :label="t('businessLabels.examDate')" width="120"/><el-table-column :label="t('otherExams.best')" min-width="150"><template #default="{ row }"><strong class="best-value">{{ displayResult(row) }}</strong></template></el-table-column><el-table-column prop="notes" :label="t('businessLabels.notes')" min-width="200"><template #default="{ row }">{{ row.notes || '—' }}</template></el-table-column><el-table-column prop="attemptNumber" :label="t('businessLabels.attempts')" width="100"/></el-table><el-empty v-if="!loading && !mine.best.length" :description="t('otherExams.emptyPublished')"/></section>
|
|
<section class="result-board history-board"><div class="board-title"><div><span class="kicker">{{ t('otherExams.historyKicker') }}</span><h2>{{ t('otherExams.historyTitle') }}</h2></div><span class="board-note">{{ t('otherExams.historyHint') }}</span></div><el-table :data="mine.history" v-loading="loading"><el-table-column prop="examName" :label="t('businessLabels.exam')" min-width="180"/><el-table-column prop="examCode" :label="t('businessLabels.examCode')" width="130"/><el-table-column prop="examDate" :label="t('businessLabels.examDate')" width="120"/><el-table-column prop="attemptNumber" :label="t('otherExams.attemptNumber')" width="110"/><el-table-column :label="t('businessLabels.result')" min-width="140"><template #default="{ row }">{{ displayResult(row) }}</template></el-table-column><el-table-column prop="notes" :label="t('businessLabels.notes')" min-width="200"><template #default="{ row }">{{ row.notes || '—' }}</template></el-table-column><el-table-column prop="publishedAt" :label="t('businessLabels.publishedAt')" width="170"/></el-table></section>
|
|
</template>
|
|
<template v-else>
|
|
<section class="batch-panel"><div class="panel-heading"><div><span class="kicker">{{ t('otherExams.sessions') }}</span><h2>{{ t('otherExams.sessions') }}</h2></div><span>{{ t('otherExams.openHint') }}</span></div><div class="batch-filters"><el-input v-model="batchKeyword" clearable :placeholder="t('otherExams.batchSearch')" @keyup.enter="load(true)" @clear="load(true)"/><el-select v-model="batchStatus" clearable :placeholder="t('businessLabels.allStatus')" @change="load(true)"><el-option :label="t('businessLabels.draft')" :value="1"/><el-option :label="t('businessLabels.published')" :value="2"/></el-select><el-select v-model="batchMetricKind" clearable :placeholder="t('otherExams.allMetrics')" @change="load(true)"><el-option :label="t('businessLabels.passMetric')" :value="1"/><el-option :label="t('businessLabels.levelMetric')" :value="2"/><el-option :label="t('businessLabels.scoreMetric')" :value="3"/></el-select><el-date-picker v-model="batchDateRange" type="daterange" value-format="YYYY-MM-DD" :start-placeholder="t('businessLabels.startDate')" :end-placeholder="t('businessLabels.endDate')" @change="load(true)"/><el-button :icon="Search" @click="load(true)">{{ t('businessLabels.search') }}</el-button><el-button :icon="Refresh" @click="() => load()">{{ t('businessLabels.refresh') }}</el-button></div><el-table :data="batches" v-loading="loading" @row-click="row => openBatch(row)"><el-table-column prop="examCode" :label="t('businessLabels.examCode')" width="140"/><el-table-column prop="name" :label="t('businessLabels.examName')" min-width="190"/><el-table-column prop="examDate" :label="t('businessLabels.examDate')" width="120"/><el-table-column :label="t('businessLabels.metric')" width="100"><template #default="{ row }">{{ metricName(row.metricKind) }}</template></el-table-column><el-table-column prop="resultCount" :label="t('otherExams.entered')" width="90"/><el-table-column :label="t('businessLabels.status')" width="120"><template #default="{ row }"><el-tag :type="row.status === 2 ? 'success' : 'info'">{{ row.status === 2 ? t('otherExams.publicationCount', { count: row.publicationCount }) : t('otherExams.draft') }}</el-tag></template></el-table-column></el-table><div v-if="batchCursors.length || batchHasMore" class="cursor-pager"><el-button size="small" :disabled="!batchCursors.length || loading" @click="previousBatchPage">{{ t('businessLabels.previous') }}</el-button><span>{{ t('otherExams.page', { page: batchPage }) }}</span><el-button size="small" type="primary" :disabled="!batchHasMore || loading" @click="nextBatchPage">{{ t('businessLabels.next') }}</el-button></div></section>
|
|
<section v-if="selected" class="editor-panel"><div class="editor-heading"><div><span class="kicker">{{ selected.examCode }}</span><h2>{{ selected.name }}</h2><p>{{ selected.organizer || t('otherExams.noOrganizer') }} · {{ selected.examDate }} · {{ metricName(selected.metricKind) }}{{ selected.metricKind === 3 ? t('otherExams.maxScoreSuffix', { score: selected.maxScore }) : '' }}</p></div><div class="editor-actions"><el-button :icon="Download" @click="downloadTemplate">{{ t('businessLabels.importTemplate') }}</el-button><label class="upload-button"><Upload />{{ t('businessLabels.batchImport') }}<input type="file" accept=".xlsx,.xls" @change="importExcel" /></label><el-button :icon="Plus" @click="addResult">{{ t('businessLabels.newRow') }}</el-button><el-button type="primary" :loading="saving" @click="saveResults">{{ t('businessLabels.saveRecords') }}</el-button><el-button type="success" :icon="Promotion" @click="publish">{{ t('businessLabels.publish') }}</el-button></div></div><div class="batch-filters"><el-input v-model="resultKeyword" clearable :placeholder="t('businessLabels.studentSearch')" @keyup.enter="searchResults"/><el-select v-model="resultGrade" clearable :placeholder="t('businessLabels.allGrades')" @change="resultClassId=''"><el-option v-for="value in resultFilterOptions.grades" :key="value" :label="t('otherExams.grade', { year: value })" :value="value"/></el-select><el-select v-model="resultCollegeId" clearable filterable :placeholder="t('businessLabels.allColleges')" @change="onResultCollegeChange"><el-option v-for="item in resultFilterOptions.colleges" :key="item.id" :label="item.name" :value="item.id"/></el-select><el-select v-model="resultMajorId" clearable filterable :placeholder="t('businessLabels.allMajors')" @change="onResultMajorChange"><el-option v-for="item in resultMajors" :key="item.id" :label="item.name" :value="item.id"/></el-select><el-select v-model="resultClassId" clearable filterable :placeholder="t('businessLabels.allClasses')"><el-option v-for="item in resultClasses" :key="item.id" :label="item.name" :value="item.id"/></el-select><el-button :icon="Search" type="primary" @click="searchResults">{{ t('businessLabels.filter') }}</el-button><el-button :icon="Download" @click="exportResults">{{ t('businessLabels.exportFiltered') }}</el-button></div><div class="editor-hint">{{ t('otherExams.editorHint') }}</div><el-table :data="results" class="score-table"><el-table-column :label="t('businessLabels.studentNumber')" min-width="150" fixed><template #default="{ row }"><el-input v-model="row.studentNumber" :placeholder="t('businessLabels.inputStudentNumber')" @blur="lookupStudent(row)" /></template></el-table-column><el-table-column :label="t('businessLabels.name')" width="110"><template #default="{ row }"><span :class="{ 'unresolved': row.studentNumber && !row.studentName }">{{ row.studentName || t('otherExams.lookupPending') }}</span></template></el-table-column><el-table-column :label="t('businessLabels.college')" min-width="150"><template #default="{ row }">{{ row.collegeName || '—' }}</template></el-table-column><el-table-column :label="t('businessLabels.class')" min-width="150"><template #default="{ row }">{{ row.className || '—' }}</template></el-table-column><el-table-column v-if="selected.metricKind === 3" :label="t('businessLabels.score')" width="150"><template #default="{ row }"><el-input-number v-model="row.score" :min="0" :max="selected.maxScore" :precision="2" controls-position="right" :placeholder="t('businessLabels.inputScore')" /></template></el-table-column><el-table-column v-if="selected.metricKind === 2" :label="t('businessLabels.level')" width="150"><template #default="{ row }"><el-select v-model="row.level" :placeholder="t('businessLabels.selectLevel')"><el-option v-for="level in (selected.levelOptions || '').split(',').filter(Boolean)" :key="level" :label="level" :value="level" /></el-select></template></el-table-column><el-table-column v-if="selected.metricKind === 1" :label="t('businessLabels.examResult')" width="150"><template #default="{ row }"><el-select v-model="row.isPassed" :placeholder="t('businessLabels.selectResult')"><el-option :label="t('businessLabels.pass')" :value="true"/><el-option :label="t('businessLabels.fail')" :value="false"/></el-select></template></el-table-column><el-table-column :label="t('businessLabels.attempts')" width="100"><template #default="{ row }"><span class="auto-attempt">{{ row.attemptNumber || t('otherExams.automatic') }}</span></template></el-table-column><el-table-column :label="t('businessLabels.notes')" min-width="180"><template #default="{ row }"><el-input v-model="row.notes" :placeholder="t('businessLabels.optional')" /></template></el-table-column></el-table><div v-if="resultCursors.length || resultHasMore" class="cursor-pager"><span>{{ t('otherExams.total', { count: resultTotal }) }}</span><el-button size="small" :disabled="!resultCursors.length || loading" @click="previousResultPage">{{ t('businessLabels.previous') }}</el-button><span>{{ t('otherExams.page', { page: resultPage }) }}</span><el-button size="small" type="primary" :disabled="!resultHasMore || loading" @click="nextResultPage">{{ t('businessLabels.next') }}</el-button></div><el-empty v-if="!results.length" :description="t('otherExams.emptyEditor')" /></section>
|
|
</template>
|
|
<el-dialog v-model="dialog" :title="t('otherExams.createTitle')" width="600px"><el-form label-width="100px"><el-form-item :label="t('businessLabels.examCode')" required><el-input v-model="form.examCode" :placeholder="t('otherExams.codeHint')" /></el-form-item><el-form-item :label="t('businessLabels.examName')" required><el-input v-model="form.name" :placeholder="t('otherExams.nameHint')" /></el-form-item><el-form-item :label="t('businessLabels.organizer')"><el-input v-model="form.organizer" /></el-form-item><el-form-item :label="t('businessLabels.examDate')"><el-date-picker v-model="form.examDate" type="date" value-format="YYYY-MM-DD" /></el-form-item><el-form-item :label="t('businessLabels.metric')"><el-select v-model="form.metricKind"><el-option :label="t('businessLabels.scoreMetric')" :value="3"/><el-option :label="t('businessLabels.levelMetric')" :value="2"/><el-option :label="t('businessLabels.passFail')" :value="1"/></el-select></el-form-item><el-form-item v-if="form.metricKind === 3" :label="t('businessLabels.maxScore')"><el-input-number v-model="form.maxScore" :min="1" /></el-form-item><el-form-item v-if="form.metricKind === 2" :label="t('otherExams.levelOrder')"><el-input v-model="form.levelOptions" :placeholder="t('otherExams.levelOrderHint')" /></el-form-item></el-form><template #footer><el-button @click="dialog = false">{{ t('businessLabels.cancel') }}</el-button><el-button type="primary" @click="createBatch">{{ t('otherExams.create') }}</el-button></template></el-dialog>
|
|
<el-dialog v-model="publishDialog" :title="t('otherExams.publishTitle')" width="460px" :close-on-click-modal="false"><div class="publish-confirm"><strong>{{ t('otherExams.publishConfirm', { name: selected?.name }) }}</strong><p>{{ t('otherExams.publishHint') }}</p></div><template #footer><el-button @click="publishDialog = false">{{ t('businessLabels.cancel') }}</el-button><el-button type="success" :loading="saving" @click="confirmPublish">{{ t('businessLabels.confirmPublish') }}</el-button></template></el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.other-exams-page { --ink:#172b3a; --muted:#718391; --line:#dce6e9; --teal:#087f78; --navy:#193b68; padding-bottom:40px; }
|
|
.exam-hero { display:flex; justify-content:space-between; align-items:end; gap:24px; padding:26px 0 24px; border-bottom:1px solid var(--line); margin-bottom:20px; }
|
|
.kicker { color:var(--teal); font-size:11px; letter-spacing:.17em; font-weight:800; }.exam-hero h1,.board-title h2,.panel-heading h2,.editor-heading h2 { color:var(--ink); margin:7px 0; letter-spacing:-.025em; }.exam-hero h1 { font-size:32px; }.exam-hero p,.editor-heading p { color:var(--muted); margin:0; line-height:1.7; }.result-board,.batch-panel,.editor-panel { background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 30px rgba(32,61,73,.06); margin-bottom:18px; overflow:hidden; }.board-title,.panel-heading { display:flex; justify-content:space-between; align-items:center; padding:20px 22px 14px; }.board-title h2,.panel-heading h2,.editor-heading h2 { font-size:20px; }.board-note,.panel-heading>span { color:var(--muted); font-size:13px; }.history-board { opacity:.96; }.best-value { color:var(--navy); font-variant-numeric:tabular-nums; }.editor-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:20px 22px 14px; }.editor-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }.upload-button { display:inline-flex; align-items:center; gap:5px; border:1px solid #dcdfe6; border-radius:4px; padding:8px 14px; color:#606266; cursor:pointer; font-size:14px; }.upload-button:hover { color:var(--navy); border-color:var(--navy); }.upload-button input { display:none; }.editor-hint { margin:0 22px 14px; padding:11px 14px; border-left:3px solid #d4a72c; background:#fff9e8; color:#786223; font-size:13px; }.auto-attempt { display:inline-flex; align-items:center; padding:4px 8px; border-radius:20px; background:#edf6f5; color:var(--teal); font-size:12px; }.unresolved { color:#c27b18; }.score-table :deep(.el-input-number) { width:125px; }.score-table :deep(.el-table__cell) { padding:12px 0; }
|
|
@media (max-width:760px) { .exam-hero,.editor-heading,.board-title,.panel-heading { display:block; }.exam-hero .el-button { margin-top:16px; }.editor-actions { justify-content:flex-start; margin-top:16px; }.board-note,.panel-heading>span { display:block; margin-top:5px; }.editor-hint { margin-left:14px; margin-right:14px; } }
|
|
.editor-heading > div:first-child { min-width: 0; }
|
|
.batch-filters { display:flex; flex-wrap:wrap; gap:8px; padding:0 22px 16px; }.batch-filters .el-input { max-width:280px; }.batch-filters .el-select { width:120px; }.cursor-pager { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:14px 22px; color:var(--muted); font-size:13px; }
|
|
.editor-actions { flex: 0 0 auto; }
|
|
.upload-button { flex: 0 0 auto; min-width: 112px; white-space: nowrap; justify-content: center; line-height: 1.4; }
|
|
.publish-confirm { color:var(--ink); line-height:1.7; }.publish-confirm p { margin:8px 0 0; color:var(--muted); font-size:13px; }
|
|
</style>
|