feat: localize student status workflows

This commit is contained in:
biss committed 2026-10-31 18:43:36 +08:00
1 parent 5199dde008
commit 25f2a0a708
3 files changed
+39 -68

No files matched your search

+1
View File
@@ -185,6 +185,7 @@ export default {
title: 'System performance', description: 'Trace response-time costs from API endpoints into the database.', rangeAria: 'Performance report time range', refreshAria: 'Refresh performance report', notConfigured: 'Waiting for a performance data source', unavailable: 'Performance data is unavailable', fallbackNote: 'Business APIs continue operating normally. The report will not fall back to reading the academic business database.', openDashboard: 'Open monitoring platform', sampleConclusion: 'Sample conclusion', requestCount: 'Total requests', endpointP95: 'Endpoint P95', errorRate: '5xx rate', databaseP95: 'Database P95', slowQueries: 'Slow queries', queryFailures: 'Query failures', chartAria: 'Request rate and endpoint P95 trend', noSamples: 'The data source is connected, but no request metrics were received in this time range.', endpointRanking: 'Endpoint latency ranking', endpointMetrics: 'P95 / requests / 5xx', endpointCounts: '{count} requests · {errors} errors', noEndpoints: 'No endpoint metrics in this range.', databaseRanking: 'Database query ranking', databaseMetrics: 'P95 / calls / slow queries', databaseCounts: '{count} calls · {slow} slow', noDatabase: 'No database metrics in this range.', generatedAt: 'Generated {date} · Page data uses a short cache', viewTraces: 'View raw traces', requestsPerSecond: 'Requests / second', requestRate: 'Request rate', ranges: { '15m': '15 minutes', '1h': '1 hour', '24h': '24 hours', '7d': '7 days' }, notes: { waiting: 'Waiting for metric samples', failedDatabase: 'Database command failures detected', serverErrors: 'Server error rate needs attention', slowQueries: 'Queries exceeded the slow-query threshold', healthy: 'No significant anomalies in the current sample window' },
},
appUpdates: { title: 'App web hot updates', description: 'Upload a built ZIP and publish by native version and channel, retaining previous packages for fast rollback.', refresh: 'Refresh', upload: 'Upload update', boundary: 'Release boundary', webOnly: 'HTML, JavaScript, CSS, and static assets only', nativeBoundary: 'New native plugins, permissions, or Android/iOS code require a new native release', autoRollback: 'The app automatically returns to the last usable version if an update fails', allPlatforms: 'All platforms', allChannels: 'All channels', production: 'Production channel', staging: 'Staging channel', search: 'Search', version: 'Version', nativeVersionValue: 'Native {version}', target: 'Target', status: 'Status', releaseNotes: 'Release notes', bundle: 'Update bundle', time: 'Time', actions: 'Actions', rollback: 'Roll back to this version', publish: 'Publish', delete: 'Delete', active: 'Currently active', empty: 'No App hot-update packages uploaded.', previous: 'Previous batch', page: 'Batch {page}', next: 'Next batch', uploadTitle: 'Upload App hot update', platform: 'Platform', channel: 'Channel', hotVersion: 'Hot-update version', versionPlaceholder: 'For example 1.0.1', compatibleNative: 'Compatible native version', nativePlaceholder: 'Current Android version: 1.0', notesPlaceholder: 'Describe the fixes without including sensitive information.', updateZip: 'Update ZIP', selectZip: 'Select ZIP', zipHint: 'Maximum 30 MB. index.html must be directly in the ZIP root.', cancel: 'Cancel', uploadDraft: 'Upload as draft', confirmRollback: 'Confirm rollback', channels: { Production: 'Production', Staging: 'Staging' }, statuses: { Published: 'Published', Archived: 'Archived', Draft: 'Draft' }, messages: { selectZip: 'Select an update ZIP.', versionRequired: 'Enter the hot-update version and compatible native version.', uploaded: 'Update uploaded as a draft. Review it before publishing.', rollbackConfirm: 'Roll back the {platform} {native} production channel to {version}. Newly started apps will download this version.', publishConfirm: 'Publish {version}? The currently active update for the same platform, channel, and native version will be archived.', rollbackTitle: 'Confirm version rollback', publishTitle: 'Confirm update publication', rolledBack: 'Rolled back to the selected version.', published: 'Update published.', deleteConfirm: 'Permanently delete the {version} release history and ZIP package ({file})? Installed versions are unaffected, and this cannot be recovered.', deleteTitle: 'Delete update package', deleted: 'Release history and update package deleted.' } },
statusChanges: { studentTitle: 'Student status change application', reviewTitle: 'Student status change review', studentDescription: 'Apply online for suspension, resumption, or withdrawal and track every review stage.', reviewDescription: 'Review applications through counselor, college, and university levels. The final result updates the student record.', apply: 'Start application', refresh: 'Refresh queue', pendingHint: 'An application is currently in progress. Wait for it to be processed.', availableHint: 'You can submit a new student status change application.', availableTypes: 'Available applications', noAvailableTypes: 'No applications are available for the current status', actionable: 'Awaiting my review', total: 'Applications in scope', finished: 'Finished', itemUnit: 'items', securityNote: 'Only actions for the current review level are available. The server rejects every attempt to bypass levels.', applicationTitle: '{name} · {type} application', transition: '{from} → {to} · Submitted {date}', reason: 'Application statement', stepPassed: 'Passed', stepActive: 'In progress', stepWaiting: 'Waiting', latestComment: 'Latest review comment', processId: 'Process ID', cancelApplication: 'Withdraw application', reject: 'Reject', approve: 'Approve', emptyStudent: 'No student status change applications submitted', emptyReviewer: 'No student status change applications in this scope', applyTitle: 'Start student status change application', type: 'Application type', reasonPlaceholder: 'Describe the reason, expected timing, and anything the university should know (at least 10 characters)', cancel: 'Cancel', submit: 'Submit application', approveTitle: 'Approve application', rejectTitle: 'Reject application', optionalComment: 'Review comment (optional)', requiredReason: 'Rejection reason (required)', confirmApprove: 'Confirm approval', confirmReject: 'Confirm rejection', confirmCancel: 'Confirm withdrawal', types: { Suspension: 'Suspension', Resumption: 'Resumption', Withdrawal: 'Withdrawal' }, statuses: { Active: 'Active', Suspended: 'Suspended', Withdrawn: 'Withdrawn', Graduated: 'Graduated' }, states: { Submitted: 'Awaiting counselor review', CounselorApproved: 'Awaiting college review', CollegeApproved: 'Awaiting university review', Approved: 'Approved', Rejected: 'Rejected', Cancelled: 'Withdrawn' }, steps: { Submitted: 'Counselor review', CounselorApproved: 'College review', CollegeApproved: 'University approval' }, messages: { invalidApplication: 'Select a change type and enter an application statement of at least 10 characters.', submitted: 'Application submitted for counselor review.', cancelConfirm: 'Withdrawing ends this application. You can submit another one later if needed.', cancelTitle: 'Withdraw application', cancelled: 'Application withdrawn.', commentRequired: 'A review comment is required when rejecting an application.', approved: 'Review approved. The application has moved to the next stage.', rejected: 'Application rejected.' } },
api: {
'data.constraint_conflict': 'A data constraint conflict occurred.',
'server.unhandled_error': 'The server encountered an error while processing the request.',
+1
View File
@@ -185,6 +185,7 @@ export default {
title: '系统性能', description: '从接口进入数据库,定位响应时间消耗在哪里。', rangeAria: '性能报表时间范围', refreshAria: '刷新性能报表', notConfigured: '等待连接性能数据源', unavailable: '性能数据暂不可用', fallbackNote: '业务接口继续正常运行;报表不会回退读取教务业务数据库。', openDashboard: '打开监控平台', sampleConclusion: '采样结论', requestCount: '请求总量', endpointP95: '接口 P95', errorRate: '5xx 比例', databaseP95: '数据库 P95', slowQueries: '慢查询', queryFailures: '查询失败', chartAria: '请求速率与接口 P95 趋势图', noSamples: '数据源已连接,但该时间范围内尚未收到请求指标。', endpointRanking: '接口耗时排行', endpointMetrics: 'P95 / 请求量 / 5xx', endpointCounts: '{count} 次 · {errors} 错误', noEndpoints: '该范围内没有接口指标。', databaseRanking: '数据库查询排行', databaseMetrics: 'P95 / 调用量 / 慢查询', databaseCounts: '{count} 次 · {slow} 慢', noDatabase: '该范围内没有数据库指标。', generatedAt: '生成于 {date} · 页面数据采用短时缓存', viewTraces: '查看原始调用链', requestsPerSecond: '请求 / 秒', requestRate: '请求速率', ranges: { '15m': '15 分钟', '1h': '1 小时', '24h': '24 小时', '7d': '7 天' }, notes: { waiting: '等待指标样本', failedDatabase: '存在失败的数据库命令', serverErrors: '服务端错误率需要关注', slowQueries: '存在超过阈值的慢查询', healthy: '当前采样窗口内未见明显异常' },
},
appUpdates: { title: 'App 前端热更新', description: '上传构建后的 ZIP,按原生版本和通道发布;保留历史包用于快速回滚。', refresh: '刷新', upload: '上传更新包', boundary: '发布边界', webOnly: '仅限 HTML、JavaScript、CSS 和静态资源', nativeBoundary: '新增原生插件、权限或 Android/iOS 代码必须重新发版', autoRollback: '更新失败时 App 自动回退到上一个可用版本', allPlatforms: '全部平台', allChannels: '全部通道', production: '正式通道', staging: '测试通道', search: '查询', version: '版本', nativeVersionValue: '原生 {version}', target: '目标', status: '状态', releaseNotes: '更新说明', bundle: '更新包', time: '时间', actions: '操作', rollback: '回滚至此版本', publish: '发布', delete: '删除', active: '当前生效', empty: '尚未上传 App 热更新包。', previous: '上一批', page: '第 {page} 批', next: '下一批', uploadTitle: '上传 App 热更新包', platform: '平台', channel: '通道', hotVersion: '热更新版本', versionPlaceholder: '例如 1.0.1', compatibleNative: '兼容的原生版本', nativePlaceholder: '当前 Android 为 1.0', notesPlaceholder: '说明本次修复内容,不要包含敏感信息。', updateZip: '更新 ZIP', selectZip: '选择 ZIP', zipHint: '最大 30 MB,ZIP 根目录必须直接包含 index.html。', cancel: '取消', uploadDraft: '上传为草稿', confirmRollback: '确认回滚', channels: { Production: '正式', Staging: '测试' }, statuses: { Published: '已发布', Archived: '已归档', Draft: '草稿' }, messages: { selectZip: '请选择更新 ZIP。', versionRequired: '请填写热更新版本和兼容的原生版本。', uploaded: '更新包已上传为草稿,确认无误后再发布。', rollbackConfirm: '将把 {platform} {native} 的正式通道回滚到 {version}。新启动的 App 将下载此版本。', publishConfirm: '确认发布 {version}?同平台、通道和原生版本下当前生效的更新将自动归档。', rollbackTitle: '确认版本回滚', publishTitle: '确认发布更新', rolledBack: '已回滚到指定版本。', published: '更新已发布。', deleteConfirm: '将永久删除 {version} 的发布历史和 ZIP 更新包({file})。此操作不会影响已安装到设备的版本,且不可恢复。', deleteTitle: '删除更新包', deleted: '发布历史和更新包已删除。' } },
statusChanges: { studentTitle: '学籍异动申请', reviewTitle: '学籍异动审核', studentDescription: '在线办理休学、复学或退学申请,清晰跟踪每一级审核进度。', reviewDescription: '按辅导员、学院、学校三级权限逐级审核,最终结果同步学生学籍。', apply: '发起申请', refresh: '刷新队列', pendingHint: '当前有申请正在流转,请等待处理。', availableHint: '当前可以提交新的学籍异动申请。', availableTypes: '可申请业务', noAvailableTypes: '当前状态无可申请业务', actionable: '当前待我审核', total: '辖区申请总数', finished: '已结束', itemUnit: '件', securityNote: '系统仅开放当前审核层级的操作,所有越级请求都会由服务端拒绝。', applicationTitle: '{name} · {type}申请', transition: '{from} → {to} · 提交于 {date}', reason: '申请说明', stepPassed: '已通过', stepActive: '处理中', stepWaiting: '待流转', latestComment: '最近审核意见', processId: '流程编号', cancelApplication: '撤回申请', reject: '驳回', approve: '审核通过', emptyStudent: '尚未提交学籍异动申请', emptyReviewer: '当前辖区暂无学籍异动申请', applyTitle: '发起学籍异动申请', type: '申请类型', reasonPlaceholder: '请说明申请原因、预计时间以及需要学校了解的情况(至少 10 个字)', cancel: '取消', submit: '提交申请', approveTitle: '审核通过', rejectTitle: '驳回申请', optionalComment: '审核意见(选填)', requiredReason: '驳回原因(必填)', confirmApprove: '确认通过', confirmReject: '确认驳回', confirmCancel: '确认撤回', types: { Suspension: '休学', Resumption: '复学', Withdrawal: '退学' }, statuses: { Active: '在籍', Suspended: '休学', Withdrawn: '退学', Graduated: '毕业' }, states: { Submitted: '待辅导员审核', CounselorApproved: '待学院审核', CollegeApproved: '待校级审核', Approved: '已批准', Rejected: '已驳回', Cancelled: '已撤回' }, steps: { Submitted: '辅导员审核', CounselorApproved: '学院审核', CollegeApproved: '校级审批' }, messages: { invalidApplication: '请选择异动类型,并填写至少 10 个字的申请说明。', submitted: '申请已提交,等待辅导员审核。', cancelConfirm: '撤回后本次申请将结束,需要时可重新提交。', cancelTitle: '撤回申请', cancelled: '申请已撤回。', commentRequired: '驳回申请时必须填写审核意见。', approved: '审核已通过,申请进入下一环节。', rejected: '申请已驳回。' } },
api: {
'data.constraint_conflict': '数据约束冲突。',
'server.unhandled_error': '服务器处理请求时发生错误。',
+37 -68
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { computed, onMounted, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { Check, Close, Plus, RefreshRight, Stamp } from '@element-plus/icons-vue'
import http, { apiErrorMessage } from '../api/http'
import { useAuthStore } from '../stores/auth'
@@ -13,6 +14,7 @@ type ChangeState =
| 'Cancelled'
const auth = useAuthStore()
const { locale, t } = useI18n()
const isStudent = computed(() => auth.user?.roles.includes('Student') ?? false)
const changes = ref<any[]>([])
const options = ref<any | null>(null)
@@ -29,33 +31,13 @@ const actionableTotal = ref(0)
const finishedTotal = ref(0)
const pageSize = 20
const typeLabels: Record<string, string> = {
Suspension: '休学',
Resumption: '复学',
Withdrawal: '退学',
}
const statusLabels: Record<string, string> = {
Active: '在籍',
Suspended: '休学',
Withdrawn: '退学',
Graduated: '毕业',
}
const stateLabels: Record<ChangeState, string> = {
Submitted: '待辅导员审核',
CounselorApproved: '待学院审核',
CollegeApproved: '待校级审核',
Approved: '已批准',
Rejected: '已驳回',
Cancelled: '已撤回',
}
const steps = [
{ label: '辅导员审核', state: 'Submitted' },
{ label: '学院审核', state: 'CounselorApproved' },
{ label: '校级审批', state: 'CollegeApproved' },
]
const typeLabel = (value: string) => t(`statusChanges.types.${value}`)
const statusLabel = (value: string) => t(`statusChanges.statuses.${value}`)
const stateLabel = (value: string) => t(`statusChanges.states.${value}`)
const steps = computed(() => ['Submitted', 'CounselorApproved', 'CollegeApproved'].map(state => ({ state, label: t(`statusChanges.steps.${state}`) })))
function dateText(value?: string) {
if (!value) return '—'
return new Intl.DateTimeFormat('zh-CN', {
return new Intl.DateTimeFormat(locale.value, {
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', hour12: false,
}).format(new Date(value))
@@ -122,13 +104,13 @@ function openApply() {
}
async function submitApply() {
if (!applyForm.type || applyForm.reason.trim().length < 10) {
ElMessage.warning('请选择异动类型,并填写至少 10 个字的申请说明。')
ElMessage.warning(t('statusChanges.messages.invalidApplication'))
return
}
try {
await http.post('/student-status-changes', applyForm)
applyDialog.value = false
ElMessage.success('申请已提交,等待辅导员审核。')
ElMessage.success(t('statusChanges.messages.submitted'))
await load(true)
} catch (error) {
ElMessage.error(apiErrorMessage(error))
@@ -136,11 +118,11 @@ async function submitApply() {
}
async function cancel(change: any) {
try {
await ElMessageBox.confirm('撤回后本次申请将结束,需要时可重新提交。', '撤回申请', {
type: 'warning', confirmButtonText: '确认撤回',
await ElMessageBox.confirm(t('statusChanges.messages.cancelConfirm'), t('statusChanges.messages.cancelTitle'), {
type: 'warning', confirmButtonText: t('statusChanges.confirmCancel'),
})
await http.post(`/student-status-changes/${change.id}/cancel`)
ElMessage.success('申请已撤回。')
ElMessage.success(t('statusChanges.messages.cancelled'))
await load()
} catch (error: any) {
if (error !== 'cancel' && error !== 'close') ElMessage.error(apiErrorMessage(error))
@@ -154,7 +136,7 @@ function openReview(change: any, approved: boolean) {
}
async function submitReview() {
if (!reviewApproved.value && !reviewForm.comment.trim()) {
ElMessage.warning('驳回申请时必须填写审核意见。')
ElMessage.warning(t('statusChanges.messages.commentRequired'))
return
}
try {
@@ -163,7 +145,7 @@ async function submitReview() {
comment: reviewForm.comment,
})
reviewDialog.value = false
ElMessage.success(reviewApproved.value ? '审核已通过,申请进入下一环节。' : '申请已驳回。')
ElMessage.success(t(reviewApproved.value ? 'statusChanges.messages.approved' : 'statusChanges.messages.rejected'))
await load()
} catch (error) {
ElMessage.error(apiErrorMessage(error))
@@ -178,8 +160,7 @@ onMounted(load)
<section class="page-intro">
<div>
<span class="section-kicker">STUDENT RECORD TRANSFER</span>
<h2>{{ isStudent ? '学籍异动申请' : '学籍异动审核' }}</h2>
<p>{{ isStudent ? '在线办理休学、复学或退学申请,清晰跟踪每一级审核进度。' : '按辅导员、学院、学校三级权限逐级审核,最终结果同步学生学籍。' }}</p>
<h2>{{ t(isStudent ? 'statusChanges.studentTitle' : 'statusChanges.reviewTitle') }}</h2><p>{{ t(isStudent ? 'statusChanges.studentDescription' : 'statusChanges.reviewDescription') }}</p>
</div>
<el-button
v-if="isStudent"
@@ -187,28 +168,21 @@ onMounted(load)
:icon="Plus"
:disabled="options?.hasPending || !options?.types?.length"
@click="openApply"
>发起申请</el-button>
<el-button v-else :icon="RefreshRight" @click="() => load()">刷新队列</el-button>
>{{ t('statusChanges.apply') }}</el-button><el-button v-else :icon="RefreshRight" @click="() => load()">{{ t('statusChanges.refresh') }}</el-button>
</section>
<section v-if="isStudent && options" class="status-identity">
<div>
<span>CURRENT STUDENT STATUS</span>
<b>{{ statusLabels[options.status] }}</b>
<p>{{ options.hasPending ? '当前有申请正在流转,请等待处理。' : '当前可以提交新的学籍异动申请。' }}</p>
<b>{{ statusLabel(options.status) }}</b><p>{{ t(options.hasPending ? 'statusChanges.pendingHint' : 'statusChanges.availableHint') }}</p>
</div>
<div class="status-available">
<span>可申请业务</span>
<strong v-for="type in options.types" :key="type">{{ typeLabels[type] }}</strong>
<em v-if="!options.types.length">当前状态无可申请业务</em>
<span>{{ t('statusChanges.availableTypes') }}</span><strong v-for="type in options.types" :key="type">{{ typeLabel(type) }}</strong><em v-if="!options.types.length">{{ t('statusChanges.noAvailableTypes') }}</em>
</div>
</section>
<section v-if="!isStudent" class="status-review-summary">
<div><span>当前待我审核</span><b>{{ actionableTotal }}</b><small>件</small></div>
<div><span>辖区申请总数</span><b>{{ total }}</b><small>件</small></div>
<div><span>已结束</span><b>{{ finishedTotal }}</b><small>件</small></div>
<p>系统仅开放当前审核层级的操作,所有越级请求都会由服务端拒绝。</p>
<div><span>{{ t('statusChanges.actionable') }}</span><b>{{ actionableTotal }}</b><small>{{ t('statusChanges.itemUnit') }}</small></div><div><span>{{ t('statusChanges.total') }}</span><b>{{ total }}</b><small>{{ t('statusChanges.itemUnit') }}</small></div><div><span>{{ t('statusChanges.finished') }}</span><b>{{ finishedTotal }}</b><small>{{ t('statusChanges.itemUnit') }}</small></div><p>{{ t('statusChanges.securityNote') }}</p>
</section>
<section class="status-folio-list" v-loading="loading">
@@ -220,14 +194,13 @@ onMounted(load)
</div>
<div class="folio-person">
<span>{{ change.collegeName }} · {{ change.className }}</span>
<h3>{{ change.name }} · {{ typeLabels[change.type] }}申请</h3>
<p>{{ statusLabels[change.originalStatus] }} → {{ statusLabels[change.targetStatus] }} · 提交于 {{ dateText(change.submittedAt) }}</p>
<h3>{{ t('statusChanges.applicationTitle', { name: change.name, type: typeLabel(change.type) }) }}</h3><p>{{ t('statusChanges.transition', { from: statusLabel(change.originalStatus), to: statusLabel(change.targetStatus), date: dateText(change.submittedAt) }) }}</p>
</div>
<el-tag :type="stateTagType(change.state)" effect="plain">{{ stateLabels[change.state as ChangeState] }}</el-tag>
<el-tag :type="stateTagType(change.state)" effect="plain">{{ stateLabel(change.state) }}</el-tag>
</header>
<div class="folio-reason">
<span>申请说明</span>
<span>{{ t('statusChanges.reason') }}</span>
<p>{{ change.reason }}</p>
</div>
@@ -235,25 +208,24 @@ onMounted(load)
<div v-for="(step, index) in steps" :key="step.state" :class="stepClass(change, index)">
<i><el-icon v-if="stepClass(change, index).done"><Check /></el-icon><span v-else>{{ index + 1 }}</span></i>
<b>{{ step.label }}</b>
<small>{{ stepClass(change, index).done ? '已通过' : stepClass(change, index).active ? '处理中' : '待流转' }}</small>
<small>{{ t(stepClass(change, index).done ? 'statusChanges.stepPassed' : stepClass(change, index).active ? 'statusChanges.stepActive' : 'statusChanges.stepWaiting') }}</small>
</div>
</div>
<footer>
<div v-if="change.reviewComment" class="review-comment">
<span>最近审核意见</span><b>{{ change.reviewComment }}</b>
<span>{{ t('statusChanges.latestComment') }}</span><b>{{ change.reviewComment }}</b>
</div>
<div v-else class="review-comment"><span>流程编号</span><b>{{ change.id.slice(0, 8).toUpperCase() }}</b></div>
<div v-else class="review-comment"><span>{{ t('statusChanges.processId') }}</span><b>{{ change.id.slice(0, 8).toUpperCase() }}</b></div>
<div class="folio-actions">
<el-button v-if="isStudent && change.state === 'Submitted'" type="danger" plain @click="cancel(change)">撤回申请</el-button>
<el-button v-if="isStudent && change.state === 'Submitted'" type="danger" plain @click="cancel(change)">{{ t('statusChanges.cancelApplication') }}</el-button>
<template v-if="canReview(change)">
<el-button :icon="Close" type="danger" plain @click="openReview(change, false)">驳回</el-button>
<el-button :icon="Stamp" type="primary" @click="openReview(change, true)">审核通过</el-button>
<el-button :icon="Close" type="danger" plain @click="openReview(change, false)">{{ t('statusChanges.reject') }}</el-button><el-button :icon="Stamp" type="primary" @click="openReview(change, true)">{{ t('statusChanges.approve') }}</el-button>
</template>
</div>
</footer>
</article>
<el-empty v-if="!changes.length && !loading" :description="isStudent ? '尚未提交学籍异动申请' : '当前辖区暂无学籍异动申请'" />
<el-empty v-if="!changes.length && !loading" :description="t(isStudent ? 'statusChanges.emptyStudent' : 'statusChanges.emptyReviewer')" />
<el-pagination
v-if="total > pageSize"
v-model:current-page="page"
@@ -265,37 +237,34 @@ onMounted(load)
/>
</section>
<el-dialog v-model="applyDialog" title="发起学籍异动申请" width="620px">
<el-dialog v-model="applyDialog" :title="t('statusChanges.applyTitle')" width="620px">
<el-form label-position="top">
<el-form-item label="申请类型">
<el-form-item :label="t('statusChanges.type')">
<el-radio-group v-model="applyForm.type">
<el-radio-button v-for="type in options?.types" :key="type" :value="type">{{ typeLabels[type] }}</el-radio-button>
<el-radio-button v-for="type in options?.types" :key="type" :value="type">{{ typeLabel(type) }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="申请说明">
<el-input v-model="applyForm.reason" type="textarea" :rows="6" maxlength="1000" show-word-limit placeholder="请说明申请原因、预计时间以及需要学校了解的情况(至少 10 个字)" />
<el-form-item :label="t('statusChanges.reason')"><el-input v-model="applyForm.reason" type="textarea" :rows="6" maxlength="1000" show-word-limit :placeholder="t('statusChanges.reasonPlaceholder')" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="applyDialog = false">取消</el-button>
<el-button type="primary" @click="submitApply">提交申请</el-button>
<el-button @click="applyDialog = false">{{ t('statusChanges.cancel') }}</el-button><el-button type="primary" @click="submitApply">{{ t('statusChanges.submit') }}</el-button>
</template>
</el-dialog>
<el-dialog v-model="reviewDialog" :title="reviewApproved ? '审核通过' : '驳回申请'" width="600px">
<el-dialog v-model="reviewDialog" :title="t(reviewApproved ? 'statusChanges.approveTitle' : 'statusChanges.rejectTitle')" width="600px">
<div v-if="selected" class="review-target">
<span>{{ selected.studentNumber }}</span>
<b>{{ selected.name }} · {{ typeLabels[selected.type] }}申请</b>
<b>{{ t('statusChanges.applicationTitle', { name: selected.name, type: typeLabel(selected.type) }) }}</b>
<p>{{ selected.collegeName }} · {{ selected.className }}</p>
</div>
<el-form label-position="top">
<el-form-item :label="reviewApproved ? '审核意见(选填)' : '驳回原因(必填)'">
<el-form-item :label="t(reviewApproved ? 'statusChanges.optionalComment' : 'statusChanges.requiredReason')">
<el-input v-model="reviewForm.comment" type="textarea" :rows="4" maxlength="500" show-word-limit />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="reviewDialog = false">取消</el-button>
<el-button :type="reviewApproved ? 'primary' : 'danger'" @click="submitReview">{{ reviewApproved ? '确认通过' : '确认驳回' }}</el-button>
<el-button @click="reviewDialog = false">{{ t('statusChanges.cancel') }}</el-button><el-button :type="reviewApproved ? 'primary' : 'danger'" @click="submitReview">{{ t(reviewApproved ? 'statusChanges.confirmApprove' : 'statusChanges.confirmReject') }}</el-button>
</template>
</el-dialog>
</div>