feat: 优化一些文字图片
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
阿梦 2026-05-27 16:09:50 +08:00
parent 705d78afd6
commit dd12737ee4
4 changed files with 146 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{ {
"welcomeBack": "欢迎回来", "welcomeBack": "欢迎回来",
"pageTitle": "智能的AI教育平台", "pageTitle": "数字化AI教育平台",
"pageDesc": "高效率、高质量的AI教育平台", "pageDesc": "高效率、高质量的AI教育平台",
"loginSuccess": "登录成功", "loginSuccess": "登录成功",
"loginSuccessDesc": "欢迎回来", "loginSuccessDesc": "欢迎回来",

View File

@ -7,15 +7,17 @@ import { preferences } from '@vben/preferences'
import { $t } from '#/locales' import { $t } from '#/locales'
const appName = computed(() => preferences.app.name) const appName = computed(() => preferences.app.name)
const logo = computed(() => preferences.logo.source) const loginLogo =
'https://lxx-web-1313840333.cos.ap-chengdu.myqcloud.com/urm/blueMode.png'
const sloganImage = computed(() => preferences.logo.source)
const clickLogo = () => {} const clickLogo = () => {}
</script> </script>
<template> <template>
<AuthPageLayout <AuthPageLayout
:app-name="appName" :app-name="appName"
:logo="logo" :logo="loginLogo"
:slogan-image="logo" :slogan-image="sloganImage"
:page-description="$t('authentication.pageDesc')" :page-description="$t('authentication.pageDesc')"
:page-title="$t('authentication.pageTitle')" :page-title="$t('authentication.pageTitle')"
:click-logo="clickLogo" :click-logo="clickLogo"

View File

@ -45,12 +45,48 @@ function formatDuration(val: any) {
return `${hh}:${mm}:${ss}` return `${hh}:${mm}:${ss}`
} }
type StudentPerformanceLevel =
| 'unsubmitted'
| 'ungraded'
| 'excellent'
| 'good'
| 'pass'
| 'fail'
| 'default'
function resolvePerformanceLevel(item: any): StudentPerformanceLevel {
if (item.status === 0) return 'unsubmitted'
if (item.gradingStatus === 0) return 'ungraded'
const level = Number(item?.level ?? item?.scoreLevel ?? 0)
if (level === 1) return 'excellent'
if (level === 2) return 'good'
if (level === 3) return 'pass'
if (level === 4) return 'fail'
const rate = Number(item?.scoreRate ?? 0)
if (rate >= 90) return 'excellent'
if (rate >= 80) return 'good'
if (rate >= 60) return 'pass'
if (rate > 0) return 'fail'
return 'default'
}
function getGradingStatusText(item: any) { function getGradingStatusText(item: any) {
if (item.status === 0) return '未提交' const performanceLevel = resolvePerformanceLevel(item)
if (item.gradingStatus === 0) return '未批改' if (performanceLevel === 'unsubmitted') return '未提交'
if (performanceLevel === 'ungraded') return '未批改'
if (performanceLevel === 'excellent') return '优秀'
if (performanceLevel === 'good') return '良好'
if (performanceLevel === 'pass') return '及格'
if (performanceLevel === 'fail') return '不及格'
return '已批改' return '已批改'
} }
function getTableRowClassName({ row }: { row: any }) {
return row.rowClass || ''
}
function getCorrectLabel(actualScore: any, score: any) { function getCorrectLabel(actualScore: any, score: any) {
if (typeof actualScore !== 'number') return '-' if (typeof actualScore !== 'number') return '-'
if (actualScore === score) return '满分' if (actualScore === score) return '满分'
@ -80,14 +116,19 @@ const rows = computed(() => {
const score = Number(item?.score ?? 0) const score = Number(item?.score ?? 0)
const duration = formatDuration(item?.costTime) const duration = formatDuration(item?.costTime)
const canView = item.status !== 0 && item.gradingStatus !== 0 const canView = item.status !== 0 && item.gradingStatus !== 0
const performanceLevel = resolvePerformanceLevel(item)
return { return {
index: idx + 1, index: idx + 1,
className: item?.className ?? item?.gradeClassName ?? '', className: item?.className ?? item?.gradeClassName ?? '',
userName: item?.userName ?? item?.name ?? item?.studentName ?? '', userName: item?.userName ?? item?.name ?? item?.studentName ?? '',
costTime: duration, costTime: duration,
costTimeMs: Number(item?.costTime ?? 0),
score, score,
scoreRate: Number(item?.scoreRate ?? 0),
scoreRateText: `${item.scoreRate.toFixed(2)}%`, scoreRateText: `${item.scoreRate.toFixed(2)}%`,
gradingStatusText: getGradingStatusText(item), gradingStatusText: getGradingStatusText(item),
performanceLevel,
rowClass: `student-row--${performanceLevel}`,
recordId: item?.recordId ?? '', recordId: item?.recordId ?? '',
canView, canView,
canRegrade: canView, canRegrade: canView,
@ -403,7 +444,7 @@ async function submitCorrection() {
<div class="student-wrapper"> <div class="student-wrapper">
<div class="student"> <div class="student">
<div class="title">学生情况</div> <div class="title">学生情况</div>
<el-table :data="rows" border> <el-table :data="rows" border :row-class-name="getTableRowClassName">
<el-table-column <el-table-column
prop="index" prop="index"
label="序号" label="序号"
@ -424,13 +465,20 @@ async function submitCorrection() {
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="costTime" prop="costTimeMs"
label="答题时长" label="答题时长"
sortable
header-align="center" header-align="center"
align="center" align="center"
/> >
<template #default="{ row }">
{{ row.costTime }}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="scoreRate"
label="得分/得分率" label="得分/得分率"
sortable
header-align="center" header-align="center"
align="center" align="center"
> >
@ -443,7 +491,16 @@ async function submitCorrection() {
label="状态" label="状态"
header-align="center" header-align="center"
align="center" align="center"
/> >
<template #default="{ row }">
<span
class="student-status-text"
:class="`student-status-text--${row.performanceLevel}`"
>
{{ row.gradingStatusText }}
</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
header-align="center" header-align="center"
@ -811,6 +868,60 @@ async function submitCorrection() {
text-align: center; text-align: center;
} }
.student-status-text {
font-weight: 600;
}
.student-status-text--unsubmitted,
.student-status-text--fail {
color: #f56c6c;
}
.student-status-text--ungraded {
color: #909399;
}
.student-status-text--excellent {
color: #67c23a;
}
.student-status-text--good {
color: #409eff;
}
.student-status-text--pass {
color: #e6a23c;
}
.student-status-text--default {
color: #606266;
}
:deep(.student-row--unsubmitted > td) {
color: #f56c6c;
background-color: #fef0f0 !important;
}
:deep(.student-row--ungraded > td) {
background-color: #f4f4f5 !important;
}
:deep(.student-row--excellent > td) {
background-color: #f0f9eb !important;
}
:deep(.student-row--good > td) {
background-color: #ecf5ff !important;
}
:deep(.student-row--pass > td) {
background-color: #fdf6ec !important;
}
:deep(.student-row--fail > td) {
background-color: #fef0f0 !important;
}
/* ========== 弹框基础 ========== */ /* ========== 弹框基础 ========== */
.paper-info { .paper-info {
padding: 10px 12px; padding: 10px 12px;

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from 'vue' import { computed, onMounted, ref } from 'vue'
import { AnalysisChartCard } from '@vben/common-ui' import { AnalysisChartCard } from '@vben/common-ui'
@ -39,6 +39,24 @@ function isEmptyCount(val: any) {
return val === undefined || val === null || val === '' return val === undefined || val === null || val === ''
} }
function toValidCount(val: any) {
if (isEmptyCount(val)) return undefined
const count = Number(val)
return Number.isFinite(count) ? count : undefined
}
const submittedStudentCount = computed(() => {
const totalCount = toValidCount(wholeSituation.value?.totalCount)
const unsubmittedCount = toValidCount(wholeSituation.value?.status0Count)
if (totalCount === undefined || unsubmittedCount === undefined) {
return undefined
}
return totalCount - unsubmittedCount
})
async function openStudentDialog(title: string, status: number) { async function openStudentDialog(title: string, status: number) {
const res = await taskMgrService.getListRecordStudentInfo(resourceId, status) const res = await taskMgrService.getListRecordStudentInfo(resourceId, status)
const list = Array.isArray(res) ? res : (res?.rows ?? res?.data ?? []) const list = Array.isArray(res) ? res : (res?.rows ?? res?.data ?? [])
@ -126,14 +144,14 @@ defineExpose({
{{ wholeSituation?.status0Count ?? '-' }} {{ wholeSituation?.status0Count ?? '-' }}
</el-link> </el-link>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="提交学生数"> <el-descriptions-item label="提交学生数">
<el-link <el-link
:disabled="isEmptyCount(wholeSituation?.status1Count)" :disabled="isEmptyCount(submittedStudentCount)"
:underline="false" :underline="false"
type="primary" type="primary"
@click="openStudentDialog('提交学生', 6)" @click="openStudentDialog('提交学生', 6)"
> >
{{ wholeSituation?.status1Count ?? '-' }} {{ submittedStudentCount ?? '-' }}
</el-link> </el-link>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="批改学生数"> <el-descriptions-item label="批改学生数">