@ -12,6 +12,9 @@
< el -select v-model ="questionQuery.type" placeholder="全部题型" clearable @change="loadQuestions" >
< el -select v-model ="questionQuery.type" placeholder="全部题型" clearable @change="loadQuestions" >
< el -option v -for = " item in typeOptions " :key ="item.value" :label ="item.label" :value ="item.value" / >
< el -option v -for = " item in typeOptions " :key ="item.value" :label ="item.label" :value ="item.value" / >
< / e l - s e l e c t >
< / e l - s e l e c t >
< el -select v-model ="questionQuery.taskKey" placeholder="全部项目" clearable @change="loadQuestions" style="width: 190px" >
< el -option v -for = " item in projectOptions " :key ="item.taskKey" : label = "`${item.projectName} / ${item.taskName}`" :value ="item.taskKey" / >
< / e l - s e l e c t >
< el -input v -model = " questionQuery.keyword " placeholder = "搜索题干" clearable :prefix-icon ="Search" @keyup.enter ="loadQuestions" / >
< el -input v -model = " questionQuery.keyword " placeholder = "搜索题干" clearable :prefix-icon ="Search" @keyup.enter ="loadQuestions" / >
< el -button :icon ="Search" @click ="loadQuestions" > 查 询 < / el -button >
< el -button :icon ="Search" @click ="loadQuestions" > 查 询 < / el -button >
< div class = "toolbar-spacer" / >
< div class = "toolbar-spacer" / >
@ -40,50 +43,43 @@
< el -table v-loading ="loading" :data="questions" class="data-table" >
< el -table v-loading ="loading" :data="questions" class="data-table" >
< el -table -column label = "题型" width = "110" > < template # default = "{ row }" > < el -tag :type ="typeTone[row.type]" > { { typeName [ row . type ] } } < / e l - t a g > < / t e m p l a t e > < / e l - t a b l e - c o l u m n >
< el -table -column label = "题型" width = "110" > < template # default = "{ row }" > < el -tag :type ="typeTone[row.type]" > { { typeName [ row . type ] } } < / e l - t a g > < / t e m p l a t e > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "stem" label = "题干" min -width = " 420 " show -overflow -tooltip / >
< el -table -column prop = "stem" label = "题干" min -width = " 420 " show -overflow -tooltip / >
< el -table -column label = "题目来源" width = "110" > < template # default = "{ row }" > < el -tag : type = "row.sourceType === 'PLATFORM' ? 'success' : 'info'" > { { row . sourceType === 'PLATFORM' ? '平台题库' : '教师自建' } } < / e l - t a g > < / t e m p l a t e > < / e l - t a b l e - c o l u m n >
< el -table -column label = "正确答案" min -width = " 150 " > < template # default = "{ row }" > { { displayAnswer ( row . answer ) } } < / template > < / e l - t a b l e - c o l u m n >
< el -table -column label = "正确答案" min -width = " 150 " > < template # default = "{ row }" > { { displayAnswer ( row . answer ) } } < / template > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "updatedAt" label = "更新时间" width = "180" > < template # default = "{ row }" > { { formatTime ( row . updatedAt ) } } < / template > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "updatedAt" label = "更新时间" width = "180" > < template # default = "{ row }" > { { formatTime ( row . updatedAt ) } } < / template > < / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" width = "150" fixed = "right" > < template # default = "{ row }" >
< el -table -column label = "操作" width = "150" fixed = "right" > < template # default = "{ row }" >
< el -button link type = "primary" @click ="openQuestion(row)" > 编 辑 < / el -button >
< el -button link type = "primary" @click ="openQuestion(row)" > {{ row.sourceType = = = ' PLATFORM ' ? ' 查 看 ' : ' 编 辑 ' }} < / el -button >
< el -button link type = "danger" @click ="removeQuestion(row)"> 删 除 < / el -button >
< el -button v-if ="row.sourceType !== 'PLATFORM'" link type="danger" @click ="removeQuestion(row)"> 删 除 < / el -button >
< / template > < / e l - t a b l e - c o l u m n >
< / template > < / e l - t a b l e - c o l u m n >
< template # empty > < el -empty class = "table-empty" :image-size ="92" description = "暂无题目" / > < / template >
< template # empty > < el -empty class = "table-empty" :image-size ="92" description = "暂无题目" / > < / template >
< / e l - t a b l e >
< / e l - t a b l e >
< / e l - t a b - p a n e >
< / e l - t a b - p a n e >
< el -tab -pane label = "考评管理" name = "exams" >
< el -tab -pane label = "考评管理" name = "exams" >
< section class = "toolbar" aria -label = " 考 试 筛 选 " >
< section class = "assessment-toolbar" aria -label = " 考 试 筛 选 " >
< el -input v -model = " examKeyword " placeholder = "搜索考试名称" clearable :prefix-icon ="Search" @keyup.enter ="loadExams" / >
< div class = "assessment-search" > < el -input v-model ="examKeyword" placeholder="请输入考试名称" clearable @keyup.enter="loadExams" /><el-button type="primary" :icon="Search" @click="loadExams" > 搜 索 < / el -button > < / div >
< el -button :icon ="Search" @click ="loadExams" > 查 询 < / el -button >
< el -button class = "assessment-create" type = "primary" :icon ="Plus" @click ="$router.push('/exam/manage/new')" > 新 建 考 试 < / el -button >
< / section >
< section v-loading ="loading" class="assessment-list" >
< article v-for ="row in exams" :key="row.id" class="assessment-card" >
< div class = "assessment-cover" > < el -icon > < PictureFilled / > < / e l - i c o n > < / d i v >
< div class = "assessment-info" > < h3 > { { row . name } } < / h3 > < p > 起止时间 : { { formatTime ( row . startTime ) } } - { { formatTime ( row . endTime ) } } < / p > < p > 考试时长 : { { row . durationMinutes || durationBetween ( row ) } } 分钟 < / p > < / div >
< div class = "assessment-status" > 状态 : < span :class ="`status-${row.status.toLowerCase()}`" > { { statusMeta [ row . status ] ? . label } } < / span > < / div >
< div class = "assessment-actions" >
< el -button v-if ="row.status === 'NOT_STARTED'" type="primary" @click="withdraw(row)" > 撤 回 < / el -button >
< el -button v-if ="['DRAFT','IN_PROGRESS'].includes(row.status)" type="primary" @click="$router.push(`/exam/manage/${row.id}`)" > 编 辑 < / el -button >
< el -button v-if ="row.status === 'IN_PROGRESS'" type="primary" @click="$router.push(`/exam/review/${row.id}`)" > 指 定 人 回 退 < / el -button >
< template v-if ="row.status === 'ENDED'"><el-button type="primary" @click="$router.push(`/exam/review/${row.id}`)">评阅</el-button><el-button type="primary" @click="$router.push(`/exam/analysis/${row.id}`)">分析</el-button><el-dropdown @command="(command) => handleExport(command, row)"><el-button type="primary">导出<el-icon class="el-icon--right"><ArrowDown /></el-icon></el-button><template #dropdown><el-dropdown-menu><el-dropdown-item command="paper">空白试卷</el-dropdown-item><el-dropdown-item command="scores">班级成绩</el-dropdown-item><el-dropdown-item command="submissions">全部答卷</el-dropdown-item></el-dropdown-menu></template></el-dropdown><el-button type="primary" @click="removeExam(row)" > 删 除 < / el -button > < / template >
< / div >
< / article >
< el -empty v -if = " ! exams.length " class = "table-empty" :image-size ="92" description = "暂无考试" / >
< / section >
< / section >
< el -table v-loading ="loading" :data="exams" class="data-table" >
< el -table -column prop = "name" label = "考试名称" min -width = " 210 " / >
< el -table -column label = "考试时间" min -width = " 320 " > < template # default = "{ row }" > { { formatTime ( row . startTime ) } } 至 { { formatTime ( row . endTime ) } } < / template > < / e l - t a b l e - c o l u m n >
< el -table -column label = "试卷" width = "150" > < template # default = "{ row }" > { { row . questionCount || 0 } } 题 / { { row . totalScore || 0 } } 分 < / template > < / e l - t a b l e - c o l u m n >
< el -table -column label = "班级" width = "90" > < template # default = "{ row }" > { { row . classCount || 0 } } 个 < / template > < / e l - t a b l e - c o l u m n >
< el -table -column label = "状态" width = "110" > < template # default = "{ row }" > < el -tag :type ="statusMeta[row.status]?.tone" > { { statusMeta [ row . status ] ? . label } } < / e l - t a g > < / t e m p l a t e > < / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" min -width = " 330 " fixed = "right" > < template # default = "{ row }" >
< el -button v-if ="['DRAFT','IN_PROGRESS'].includes(row.status)" link type="primary" @click="$router.push(`/exam/manage/${row.id}`)" > 编 辑 < / el -button >
< el -button v-if ="row.status === 'DRAFT'" link type="success" @click="publish(row)" > 发 布 < / el -button >
< el -button v-if ="row.status === 'NOT_STARTED'" link @click="withdraw(row)" > 撤 回 < / el -button >
< el -button v-if ="row.status === 'IN_PROGRESS'" link type="warning" @click="$router.push(`/exam/review/${row.id}`)" > 指 定 人 回 退 < / el -button >
< template v-if ="row.status === 'ENDED'" >
< el -button link type = "primary" @click ="$router.push(`/exam/review/${row.id}`)" > 评 阅 < / el -button >
< el -button link type = "primary" @click ="$router.push(`/exam/analysis/${row.id}`)" > 分 析 < / el -button >
< el -dropdown @ command = "(command) => handleExport(command, row)" >
< el -button link type = "primary" > 导出 < el -icon class = "el-icon--right" > < ArrowDown / > < / e l - i c o n > < / e l - b u t t o n >
< template # dropdown > < el -dropdown -menu > < el -dropdown -item command = "paper" > 空白试卷 < / e l - d r o p d o w n - i t e m > < e l - d r o p d o w n - i t e m c o m m a n d = " s c o r e s " > 班 级 成 绩 < / e l - d r o p d o w n - i t e m > < e l - d r o p d o w n - i t e m c o m m a n d = " s u b m i s s i o n s " > 全 部 答 卷 < / e l - d r o p d o w n - i t e m > < / e l - d r o p d o w n - m e n u > < / t e m p l a t e >
< / e l - d r o p d o w n >
< el -button link type = "danger" @click ="removeExam(row)" > 删 除 < / el -button >
< / template >
< / template > < / e l - t a b l e - c o l u m n >
< template # empty > < el -empty class = "table-empty" :image-size ="92" description = "暂无考试" / > < / template >
< / e l - t a b l e >
< / e l - t a b - p a n e >
< / e l - t a b - p a n e >
< / e l - t a b s >
< / e l - t a b s >
< el -dialog v -model = " questionDialog " : title = "question Form.id ? '编辑题目' : '新增题目'" width = "760px" class = "teacher-dialog" destroy -on -close >
< el -dialog v -model = " questionDialog " : title = "questionReadonly ? '查看题目' : (questionForm.id ? '编辑题目' : '新增题目')" width = "760px" class = "teacher-dialog" destroy -on -close >
< el -form ref = "questionFormRef" :model ="questionForm" :rules ="questionRules" label -width = " 92px " >
< el -form ref = "questionFormRef" :model ="questionForm" :rules ="questionRules" label -width = " 92px " :disabled ="questionReadonly" >
< el -form -item label = "题型" prop = "type" > < el -radio -group v-model ="questionForm.type" @change="resetAnswer"><el-radio-button v-for="item in typeOptions" :key="item.value" :label="item.value" > {{ item.label }} < / el -radio -button > < / e l - r a d i o - g r o u p > < / e l - f o r m - i t e m >
< el -form -item label = "题型" prop = "type" > < el -radio -group v-model ="questionForm.type" @change="resetAnswer"><el-radio-button v-for="item in typeOptions" :key="item.value" :label="item.value" > {{ item.label }} < / el -radio -button > < / e l - r a d i o - g r o u p > < / e l - f o r m - i t e m >
< el -form -item label = "归属项目" > < el -select v-model ="questionForm.taskKey" placeholder="可选项目" clearable style="width: 100%" > < el -option v -for = " item in projectOptions " :key ="item.taskKey" : label = "`${item.projectName} / ${item.taskName}`" :value ="item.taskKey" / > < / e l - s e l e c t > < / e l - f o r m - i t e m >
< el -form -item label = "题干" prop = "stem" > < el -input v -model = " questionForm.stem " type = "textarea" :rows ="4" maxlength = "2000" show -word -limit / > < / e l - f o r m - i t e m >
< el -form -item label = "题干" prop = "stem" > < el -input v -model = " questionForm.stem " type = "textarea" :rows ="4" maxlength = "2000" show -word -limit / > < / e l - f o r m - i t e m >
< el -form -item v-if ="isChoice" label="选项" >
< el -form -item v-if ="isChoice" label="选项" >
< div class = "option-editor" >
< div class = "option-editor" >
@ -104,7 +100,7 @@
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "答案解析" > < el -input v -model = " questionForm.analysis " type = "textarea" :rows ="3" / > < / e l - f o r m - i t e m >
< el -form -item label = "答案解析" > < el -input v -model = " questionForm.analysis " type = "textarea" :rows ="3" / > < / e l - f o r m - i t e m >
< / e l - f o r m >
< / e l - f o r m >
< template # footer > < el -button @click ="questionDialog=false" > 取消 < / el -button > < el -button type = "primary" :loading ="saving" @click ="saveQuestion"> 保 存 < / el -button > < / template >
< template # footer > < el -button @click ="questionDialog=false" > 关闭 < / el -button > < el -button v-if ="!questionReadonly" type="primary" :loading="saving" @click ="saveQuestion"> 保 存 < / el -button > < / template >
< / e l - d i a l o g >
< / e l - d i a l o g >
< / main >
< / main >
< / template >
< / template >
@ -113,31 +109,32 @@
import { computed , onMounted , reactive , ref } from "vue" ;
import { computed , onMounted , reactive , ref } from "vue" ;
import { useRouter } from "vue-router" ;
import { useRouter } from "vue-router" ;
import { ElMessage , ElMessageBox } from "element-plus" ;
import { ElMessage , ElMessageBox } from "element-plus" ;
import { ArrowDown , Delete , Download , Paperclip , P lus, Search , Upload } from "@element-plus/icons-vue" ;
import { ArrowDown , Delete , Download , Paperclip , P ictureFilled, P lus, Search , Upload } from "@element-plus/icons-vue" ;
import { saveAs } from "file-saver" ;
import { saveAs } from "file-saver" ;
import * as examApi from "@/api/exam" ;
import * as examApi from "@/api/exam" ;
const router = useRouter ( ) ;
const router = useRouter ( ) ;
const activeTab = ref ( "questions" ) ;
const activeTab = ref ( "questions" ) ;
const loading = ref ( false ) ; const saving = ref ( false ) ; const importing = ref ( false ) ; const questions = ref ( [ ] ) ; const exams = ref ( [ ] ) ; const examKeyword = ref ( "" ) ;
const loading = ref ( false ) ; const saving = ref ( false ) ; const importing = ref ( false ) ; const questions = ref ( [ ] ) ; const exams = ref ( [ ] ) ; const examKeyword = ref ( "" ) ; const projectOptions = ref ( [ ] ) ;
const questionDialog = ref ( false ) ; const questionFormRef = ref ( ) ;
const questionDialog = ref ( false ) ; const questionFormRef = ref ( ) ; const questionReadonly = ref ( false ) ;
const importInput = ref ( ) ; const importFormat = ref ( "word" ) ;
const importInput = ref ( ) ; const importFormat = ref ( "word" ) ;
const importAccept = computed ( ( ) => importFormat . value === "word" ? ".docx" : ".xls,.xlsx" ) ;
const importAccept = computed ( ( ) => importFormat . value === "word" ? ".docx" : ".xls,.xlsx" ) ;
const typeOptions = [ { label : "单选题" , value : "SINGLE" } , { label : "多选题" , value : "MULTIPLE" } , { label : "判断题" , value : "TRUE_FALSE" } , { label : "简答题" , value : "SHORT_ANSWER" } ] ;
const typeOptions = [ { label : "单选题" , value : "SINGLE" } , { label : "多选题" , value : "MULTIPLE" } , { label : "判断题" , value : "TRUE_FALSE" } , { label : "简答题" , value : "SHORT_ANSWER" } ] ;
const typeName = Object . fromEntries ( typeOptions . map ( ( item ) => [ item . value , item . label ] ) ) ;
const typeName = Object . fromEntries ( typeOptions . map ( ( item ) => [ item . value , item . label ] ) ) ;
const typeTone = { SINGLE : "" , MULTIPLE : "success" , TRUE _FALSE : "warning" , SHORT _ANSWER : "info" } ;
const typeTone = { SINGLE : "" , MULTIPLE : "success" , TRUE _FALSE : "warning" , SHORT _ANSWER : "info" } ;
const statusMeta = { DRAFT : { label : "未发布" , tone : "info" } , NOT _STARTED : { label : "未开始" , tone : "" } , IN _PROGRESS : { label : "进行中" , tone : "success" } , ENDED : { label : "已结束" , tone : "warning" } } ;
const statusMeta = { DRAFT : { label : "未发布" , tone : "info" } , NOT _STARTED : { label : "未开始" , tone : "" } , IN _PROGRESS : { label : "进行中" , tone : "success" } , ENDED : { label : "已结束" , tone : "warning" } } ;
const questionQuery = reactive ( { type : "" , keyword: "" } ) ;
const questionQuery = reactive ( { type : "" , taskKey: "" , keyword: "" } ) ;
const emptyQuestion = ( ) => ( { id : null , t ype: "SINGLE" , stem : "" , options : [ { label : "A" , content : "" } , { label : "B" , content : "" } , { label : "C" , content : "" } , { label : "D" , content : "" } ] , answer : [ ] , analysis : "" , attachmentName : "" , attachmentUrl : "" } ) ;
const emptyQuestion = ( ) => ( { id : null , t askKey: "" , t ype: "SINGLE" , stem : "" , options : [ { label : "A" , content : "" } , { label : "B" , content : "" } , { label : "C" , content : "" } , { label : "D" , content : "" } ] , answer : [ ] , analysis : "" , attachmentName : "" , attachmentUrl : "" } ) ;
const questionForm = reactive ( emptyQuestion ( ) ) ;
const questionForm = reactive ( emptyQuestion ( ) ) ;
const questionRules = { type : [ { required : true , message : "请选择题型" } ] , stem : [ { required : true , message : "请输入题干" } ] , answer : [ { required : true , message : "请输入参考答案" } ] } ;
const questionRules = { type : [ { required : true , message : "请选择题型" } ] , stem : [ { required : true , message : "请输入题干" } ] , answer : [ { required : true , message : "请输入参考答案" } ] } ;
const isChoice = computed ( ( ) => [ "SINGLE" , "MULTIPLE" ] . includes ( questionForm . type ) ) ;
const isChoice = computed ( ( ) => [ "SINGLE" , "MULTIPLE" ] . includes ( questionForm . type ) ) ;
const singleAnswer = computed ( { get : ( ) => questionForm . answer ? . [ 0 ] || "" , set : ( value ) => { questionForm . answer = value ? [ value ] : [ ] ; } } ) ;
const singleAnswer = computed ( { get : ( ) => questionForm . answer ? . [ 0 ] || "" , set : ( value ) => { questionForm . answer = value ? [ value ] : [ ] ; } } ) ;
onMounted ( ( ) => Promise . all ( [ loadQuestions ( ) , loadExams ( ) ] ) ) ;
onMounted ( ( ) => Promise . all ( [ loadQuestions ( ) , loadExams ( ) , loadProjects ( ) ] ) ) ;
async function loadProjects ( ) { try { projectOptions . value = ( await examApi . getQuestionProjects ( ) ) . data || [ ] ; } catch ( e ) { projectOptions . value = [ ] ; } }
async function loadQuestions ( ) { loading . value = true ; try { questions . value = ( await examApi . getQuestions ( questionQuery ) ) . data || [ ] ; } finally { loading . value = false ; } }
async function loadQuestions ( ) { loading . value = true ; try { questions . value = ( await examApi . getQuestions ( questionQuery ) ) . data || [ ] ; } finally { loading . value = false ; } }
async function loadExams ( ) { loading . value = true ; try { exams . value = ( await examApi . getTeacherExams ( { keyword : examKeyword . value } ) ) . data || [ ] ; } finally { loading . value = false ; } }
async function loadExams ( ) { loading . value = true ; try { exams . value = ( await examApi . getTeacherExams ( { keyword : examKeyword . value } ) ) . data || [ ] ; } finally { loading . value = false ; } }
function openQuestion ( row ) { Object . assign ( questionForm , row ? JSON . parse ( JSON . stringify ( row ) ) : emptyQuestion ( ) ) ; if ( ! Array . isArray ( questionForm . answer ) && isChoice . value ) questionForm . answer = [ ] ; questionDialog . value = true ; }
function openQuestion ( row ) { questionReadonly . value = row ? . sourceType === 'PLATFORM' ; Object . assign ( questionForm , row ? JSON . parse ( JSON . stringify ( row ) ) : emptyQuestion ( ) ) ; if ( ! Array . isArray ( questionForm . answer ) && isChoice . value ) questionForm . answer = [ ] ; questionDialog . value = true ; }
function resetAnswer ( ) { questionForm . answer = questionForm . type === "TRUE_FALSE" ? true : questionForm . type === "SHORT_ANSWER" ? "" : [ ] ; }
function resetAnswer ( ) { questionForm . answer = questionForm . type === "TRUE_FALSE" ? true : questionForm . type === "SHORT_ANSWER" ? "" : [ ] ; }
function toggleMultiple ( label , checked ) { questionForm . answer = checked ? [ ... new Set ( [ ... questionForm . answer , label ] ) ] : questionForm . answer . filter ( ( item ) => item !== label ) ; }
function toggleMultiple ( label , checked ) { questionForm . answer = checked ? [ ... new Set ( [ ... questionForm . answer , label ] ) ] : questionForm . answer . filter ( ( item ) => item !== label ) ; }
function addOption ( ) { questionForm . options . push ( { label : String . fromCharCode ( 65 + questionForm . options . length ) , content : "" } ) ; }
function addOption ( ) { questionForm . options . push ( { label : String . fromCharCode ( 65 + questionForm . options . length ) , content : "" } ) ; }
@ -155,6 +152,7 @@ async function removeExam(row) { await ElMessageBox.confirm(`确认永久删除
async function handleExport ( command , row ) { const actions = { paper : [ examApi . exportExamPaper , ` ${ row . name } 试卷.docx ` ] , scores : [ examApi . exportExamScores , ` ${ row . name } 班级成绩.xlsx ` ] , submissions : [ examApi . exportExamSubmissions , ` ${ row . name } 全部试卷.zip ` ] } ; const [ action , filename ] = actions [ command ] ; saveAs ( await action ( row . id ) , filename ) ; if ( command === "submissions" ) loadExams ( ) ; }
async function handleExport ( command , row ) { const actions = { paper : [ examApi . exportExamPaper , ` ${ row . name } 试卷.docx ` ] , scores : [ examApi . exportExamScores , ` ${ row . name } 班级成绩.xlsx ` ] , submissions : [ examApi . exportExamSubmissions , ` ${ row . name } 全部试卷.zip ` ] } ; const [ action , filename ] = actions [ command ] ; saveAs ( await action ( row . id ) , filename ) ; if ( command === "submissions" ) loadExams ( ) ; }
function displayAnswer ( value ) { if ( Array . isArray ( value ) ) return value . join ( "、" ) ; if ( value === true ) return "正确" ; if ( value === false ) return "错误" ; return value || "-" ; }
function displayAnswer ( value ) { if ( Array . isArray ( value ) ) return value . join ( "、" ) ; if ( value === true ) return "正确" ; if ( value === false ) return "错误" ; return value || "-" ; }
function formatTime ( value ) { return value ? new Date ( value ) . toLocaleString ( "zh-CN" , { hour12 : false } ) . replaceAll ( "/" , "-" ) : "-" ; }
function formatTime ( value ) { return value ? new Date ( value ) . toLocaleString ( "zh-CN" , { hour12 : false } ) . replaceAll ( "/" , "-" ) : "-" ; }
function durationBetween ( row ) { if ( ! row . startTime || ! row . endTime ) return 0 ; return Math . max ( 0 , Math . round ( ( new Date ( row . endTime ) . getTime ( ) - new Date ( row . startTime ) . getTime ( ) ) / 60000 ) ) ; }
< / script >
< / script >
< style scoped lang = "scss" >
< style scoped lang = "scss" >
@ -318,6 +316,102 @@ function formatTime(value) { return value ? new Date(value).toLocaleString("zh-C
background : rgba ( 2 , 16 , 27 , 0.62 ) ;
background : rgba ( 2 , 16 , 27 , 0.62 ) ;
}
}
. assessment - toolbar {
display : flex ;
align - items : center ;
justify - content : center ;
gap : 34 px ;
margin : 0 auto 26 px ;
padding : 14 px 0 18 px ;
}
. assessment - search {
display : flex ;
gap : 24 px ;
width : min ( 560 px , 70 vw ) ;
}
. assessment - search . el - input {
flex : 1 ;
}
. assessment - create {
min - width : 148 px ;
}
. assessment - list {
display : grid ;
gap : 18 px ;
min - height : 220 px ;
}
. assessment - card {
display : grid ;
grid - template - columns : 86 px minmax ( 260 px , 1.25 fr ) minmax ( 120 px , .65 fr ) minmax ( 330 px , 1.3 fr ) ;
align - items : center ;
gap : 20 px ;
min - height : 126 px ;
padding : 18 px 24 px ;
border : 1 px solid rgba ( 55 , 166 , 216 , .24 ) ;
border - radius : 10 px ;
background : linear - gradient ( 100 deg , rgba ( 4 , 31 , 49 , .9 ) , rgba ( 3 , 19 , 32 , .74 ) ) ;
box - shadow : 0 8 px 26 px rgba ( 0 , 0 , 0 , .13 ) , inset 0 1 px 0 rgba ( 152 , 229 , 255 , .04 ) ;
}
. assessment - cover {
display : grid ;
width : 76 px ;
height : 76 px ;
place - items : center ;
border : 5 px solid rgba ( 196 , 207 , 214 , .85 ) ;
color : # 1 faddd ;
background : linear - gradient ( 150 deg , # f4f8fb 0 34 % , # 1 ba5d5 35 % 100 % ) ;
}
. assessment - cover . el - icon {
font - size : 48 px ;
filter : drop - shadow ( 0 2 px 0 rgba ( 255 , 255 , 255 , .7 ) ) ;
}
. assessment - info h3 {
margin : 0 0 8 px ;
color : # f2fbff ;
font - size : 20 px ;
font - weight : 700 ;
}
. assessment - info p {
margin : 4 px 0 ;
color : # b9d5e5 ;
font - size : 15 px ;
}
. assessment - status {
color : # a9cee0 ;
font - size : 15 px ;
white - space : nowrap ;
}
. assessment - status span { color : # 32 b9f0 ; }
. assessment - status . status - ended { color : # f5b04c ; }
. assessment - status . status - in _progress { color : # 49 d79d ; }
. assessment - actions { display : flex ; flex - wrap : wrap ; justify - content : flex - end ; gap : 10 px ; }
. assessment - actions . el - button { min - width : 96 px ; }
@ media ( max - width : 1120 px ) {
. assessment - card { grid - template - columns : 76 px minmax ( 240 px , 1 fr ) minmax ( 100 px , .6 fr ) ; }
. assessment - actions { grid - column : 2 / - 1 ; justify - content : flex - start ; }
}
@ media ( max - width : 760 px ) {
. assessment - toolbar { align - items : stretch ; flex - direction : column ; gap : 12 px ; }
. assessment - search { width : 100 % ; }
. assessment - card { grid - template - columns : 64 px 1 fr ; padding : 14 px ; }
. assessment - cover { width : 62 px ; height : 62 px ; }
. assessment - cover . el - icon { font - size : 38 px ; }
. assessment - status , . assessment - actions { grid - column : 1 / - 1 ; justify - content : flex - start ; }
}
: deep ( . data - table th . el - table _ _cell ) {
: deep ( . data - table th . el - table _ _cell ) {
height : 50 px ;
height : 50 px ;
padding : 0 ;
padding : 0 ;