feat: reuse translations across business views
This commit is contained in:
1 parent
93b3916b11
commit
27d12df5bc
28 files changed
+183
-183
No files matched your search
@@ -192,7 +192,7 @@ onBeforeUnmount(() => {
|
||||
<section class="page-intro">
|
||||
<div>
|
||||
<span class="section-kicker">DEGREE FLIGHT PLAN</span>
|
||||
<h2>学业规划与毕业模拟</h2>
|
||||
<h2>{{ t('studentCurriculum.planning') }}</h2>
|
||||
<p>把未来课程排进学期航线,实时检查培养方案完成度、先修顺序与毕业时间。</p>
|
||||
</div>
|
||||
<div class="page-actions">
|
||||
@@ -376,7 +376,7 @@ onBeforeUnmount(() => {
|
||||
<div class="course-flags">
|
||||
<span>{{ typeLabel(course.type) }}</span>
|
||||
<span>建议第 {{ course.recommendedSemester }} 学期</span>
|
||||
<span v-if="course.status === 'Failed'" class="failed">有未通过记录</span>
|
||||
<span v-if="course.status === 'Failed'" class="failed">{{ t('studentCurriculum.hasFailure') }}</span>
|
||||
</div>
|
||||
<p v-if="course.prerequisites.length">
|
||||
先修:
|
||||
|
||||
@@ -365,7 +365,7 @@ onMounted(() => {
|
||||
<section class="page-intro">
|
||||
<div>
|
||||
<span class="section-kicker">APPROVAL CENTER</span>
|
||||
<h2>审批工作台</h2>
|
||||
<h2>{{ t('dashboard.admin.actions.approvals.label') }}</h2>
|
||||
<p>{{ isStudent ? '从实际修读课程发起申请,查看审核进度与处理结果。' : isTeacher ? '从一个入口发起教学申请,集中追踪处理进度。' : '集中处理全部教务申请与审核任务。' }}</p>
|
||||
</div>
|
||||
<el-button :icon="Refresh" @click="load">{{ t('businessLabels.refresh') }}</el-button>
|
||||
@@ -596,7 +596,7 @@ onMounted(() => {
|
||||
</section>
|
||||
<div class="flow-arrow">→</div>
|
||||
<section class="substitution-column">
|
||||
<header><span>2</span><div><b>替代课程</b><small>已发布且成绩及格</small></div></header>
|
||||
<header><span>2</span><div><b>{{ t('equivalency.substitute') }}</b><small>已发布且成绩及格</small></div></header>
|
||||
<el-input v-model="substituteKeyword" :prefix-icon="Search" clearable placeholder="搜索课程" />
|
||||
<div v-if="filteredSubstituteCourses.length" class="mini-course-list">
|
||||
<button
|
||||
@@ -652,16 +652,16 @@ onMounted(() => {
|
||||
{{ selectedSubstitute?.courseName ?? '请选择替代课程' }} → {{ selectedOriginal?.courseName ?? '请选择被替代课程' }}
|
||||
</span>
|
||||
<el-button @click="dialog = false">{{ t('businessLabels.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="submitForm">提交申请</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="submitForm">{{ t('statusChanges.submit') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="rejectDialog" title="驳回申请" width="min(460px, calc(100vw - 24px))">
|
||||
<el-dialog v-model="rejectDialog" :title="t('statusChanges.rejectTitle')" width="min(460px, calc(100vw - 24px))">
|
||||
<el-input v-model="rejectComment" type="textarea" :rows="3" maxlength="500" show-word-limit placeholder="请填写驳回原因" />
|
||||
<template #footer>
|
||||
<el-button @click="rejectDialog = false">{{ t('businessLabels.cancel') }}</el-button>
|
||||
<el-button type="danger" @click="rejectSubmit">确认驳回</el-button>
|
||||
<el-button type="danger" @click="rejectSubmit">{{ t('statusChanges.confirmReject') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ onMounted(async () => { loading.value = true; try { await Promise.all([loadProje
|
||||
<section class="registration-page" v-loading="loading">
|
||||
<header class="page-heading"><div><p class="eyebrow">CAMPUS SERVICES</p><h2>校园支付与报名</h2><p>报名、审核、线下缴费确认和名单导出在同一闭环内完成。</p></div><el-button v-if="canManage" type="primary" @click="resetForm()">新建报名项目</el-button></header>
|
||||
<el-tabs v-model="tab"><el-tab-pane label="报名项目" name="projects"><div class="project-grid"><el-card v-for="project in projects" :key="project.id" class="project-card"><template #header><div class="card-head"><b>{{ project.name }}</b><el-tag :type="project.status === 'Published' ? 'success' : 'info'">{{ projectStatusLabel[project.status] }}</el-tag></div></template><p class="code">{{ project.code }} · {{ project.collegeName }}</p><p class="description">{{ project.description || '暂无项目说明。' }}</p><dl><div><dt>报名时间</dt><dd>{{ localDateTime(project.registrationStartsAt) }} 至 {{ localDateTime(project.registrationEndsAt) }}</dd></div><div><dt>名额 / 已确认</dt><dd>{{ project.capacity }} / {{ project.confirmedCount }} 人</dd></div><div><dt>费用</dt><dd>{{ amount(project.feeAmount) }} {{ project.requiresReview ? '· 需审核' : '· 自动受理' }}</dd></div></dl><div class="card-actions"><el-button v-if="isStudent" type="primary" :disabled="!project.isAvailableNow" @click="apply(project)">{{ project.isAvailableNow ? '立即报名' : '当前不可报名' }}</el-button><el-button v-if="canManage" @click="resetForm(project)">编辑项目</el-button></div></el-card></div><el-empty v-if="projects.length === 0" description="暂无可见报名项目" /></el-tab-pane>
|
||||
<el-tab-pane v-if="isStudent" label="我的报名与订单" name="mine"><div class="wallet"><span>校园余额</span><b>{{ amount(balance) }}</b><small>余额由管理员调整,可用于支付待缴费报名。</small></div><el-table :data="mine"><el-table-column prop="projectName" label="项目" min-width="190"/><el-table-column :label="t('businessLabels.status')" width="120"><template #default="{ row }"><el-tag :type="applicationStatus(row.status).type">{{ applicationStatus(row.status).label }}</el-tag></template></el-table-column><el-table-column label="订单" min-width="210"><template #default="{ row }"><span v-if="application(row).order">{{ amount(application(row).order!.amount) }} · {{ application(row).order!.paymentMethod === 'Offline' ? '线下缴费' : application(row).order!.paymentMethod === 'Balance' ? '余额支付' : '免费' }} · {{ application(row).order!.status === 'Paid' ? '已确认' : '待确认' }}</span><span v-else>—</span></template></el-table-column><el-table-column prop="reviewComment" :label="t('businessLabels.reviewComment')" min-width="160"/><el-table-column :label="t('businessLabels.actions')" width="160"><template #default="{ row }"><el-button v-if="application(row).status === 'PendingPayment' && application(row).order?.status === 'Pending'" link type="primary" @click="payBalance(application(row))">余额支付</el-button><el-button v-if="['PendingReview','PendingPayment','Waitlisted'].includes(application(row).status)" link type="danger" @click="cancel(application(row))">撤销</el-button></template></el-table-column></el-table><el-empty v-if="mine.length === 0" description="尚未提交报名" /></el-tab-pane>
|
||||
<el-tab-pane v-if="isStudent" label="我的报名与订单" name="mine"><div class="wallet"><span>校园余额</span><b>{{ amount(balance) }}</b><small>余额由管理员调整,可用于支付待缴费报名。</small></div><el-table :data="mine"><el-table-column prop="projectName" label="项目" min-width="190"/><el-table-column :label="t('businessLabels.status')" width="120"><template #default="{ row }"><el-tag :type="applicationStatus(row.status).type">{{ applicationStatus(row.status).label }}</el-tag></template></el-table-column><el-table-column label="订单" min-width="210"><template #default="{ row }"><span v-if="application(row).order">{{ amount(application(row).order!.amount) }} · {{ application(row).order!.paymentMethod === 'Offline' ? '线下缴费' : application(row).order!.paymentMethod === 'Balance' ? '余额支付' : '免费' }} · {{ application(row).order!.status === 'Paid' ? '已确认' : '待确认' }}</span><span v-else>—</span></template></el-table-column><el-table-column prop="reviewComment" :label="t('businessLabels.reviewComment')" min-width="160"/><el-table-column :label="t('businessLabels.actions')" width="160"><template #default="{ row }"><el-button v-if="application(row).status === 'PendingPayment' && application(row).order?.status === 'Pending'" link type="primary" @click="payBalance(application(row))">{{ t('tuition.balancePayment') }}</el-button><el-button v-if="['PendingReview','PendingPayment','Waitlisted'].includes(application(row).status)" link type="danger" @click="cancel(application(row))">{{ t('notificationDelivery.revoke') }}</el-button></template></el-table-column></el-table><el-empty v-if="mine.length === 0" description="尚未提交报名" /></el-tab-pane>
|
||||
<el-tab-pane v-if="canManage" label="审核与收款" name="manage"><div class="toolbar"><span>所有操作均按项目所属学院的数据范围限制。</span><el-select v-model="applicationProjectId" clearable filterable placeholder="全部项目" style="width:200px" @change="loadApplications(true)"><el-option v-for="project in projects" :key="project.id" :label="project.name" :value="project.id" /></el-select><el-select v-model="applicationStatusFilter" clearable :placeholder="t('businessLabels.allStatus')" style="width:140px" @change="loadApplications(true)"><el-option v-for="(label, value) in statusLabel" :key="value" :label="label" :value="value" /></el-select><el-button @click="exportApplications">{{ t('businessLabels.exportFiltered') }}</el-button></div><el-table :data="applications"><el-table-column label="项目与学生" min-width="220"><template #default="{ row }"><b>{{ application(row).projectName }}</b><small>{{ application(row).projectCode }} · {{ application(row).studentNumber }} {{ application(row).studentName }}</small></template></el-table-column><el-table-column label="报名状态" width="120"><template #default="{ row }"><el-tag :type="applicationStatus(row.status).type">{{ applicationStatus(row.status).label }}</el-tag></template></el-table-column><el-table-column label="订单" min-width="190"><template #default="{ row }"><span v-if="application(row).order">{{ application(row).order!.orderNumber }}<small>{{ amount(application(row).order!.amount) }} · {{ application(row).order!.status }}</small></span><span v-else>—</span></template></el-table-column><el-table-column prop="createdAt" label="提交时间" width="170"><template #default="{ row }">{{ localDateTime(application(row).createdAt) }}</template></el-table-column><el-table-column :label="t('businessLabels.actions')" width="190" fixed="right"><template #default="{ row }"><el-button v-if="application(row).status === 'PendingReview'" link type="success" @click="review(application(row), true)">{{ t('businessLabels.approve') }}</el-button><el-button v-if="application(row).status === 'PendingReview'" link type="danger" @click="review(application(row), false)">{{ t('businessLabels.reject') }}</el-button><el-button v-if="application(row).status === 'PendingPayment' && application(row).order?.paymentMethod === 'Offline'" link type="primary" @click="confirmOffline(application(row))">确认收款</el-button></template></el-table-column></el-table><el-pagination v-if="applicationsTotal > 0" class="pagination" background layout="total, sizes, prev, pager, next" :current-page="applicationsPage" :page-size="applicationsPageSize" :page-sizes="[20, 50, 100]" :total="applicationsTotal" @update:current-page="changeApplicationsPage" @update:page-size="changeApplicationsPageSize"/><el-empty v-if="applications.length === 0" description="暂无待处理或历史报名" /></el-tab-pane></el-tabs>
|
||||
<el-dialog v-model="dialog" :title="editingId ? '编辑报名项目' : '新建报名项目'" width="680px"><el-form label-position="top"><div class="form-grid"><el-form-item label="项目编码" required><el-input v-model="form.code" placeholder="如 CAMPUS-2026-001"/></el-form-item><el-form-item label="项目名称" required><el-input v-model="form.name"/></el-form-item><el-form-item label="报名开始" required><el-date-picker v-model="form.registrationStartsAt" type="datetime" value-format="YYYY-MM-DDTHH:mm:ss" style="width:100%"/></el-form-item><el-form-item label="报名结束" required><el-date-picker v-model="form.registrationEndsAt" type="datetime" value-format="YYYY-MM-DDTHH:mm:ss" style="width:100%"/></el-form-item><el-form-item label="名额" required><el-input-number v-model="form.capacity" :min="1" style="width:100%"/></el-form-item><el-form-item label="收费金额(元)"><el-input-number v-model="form.feeAmount" :min="0" :precision="2" style="width:100%"/></el-form-item></div><el-form-item label="项目说明"><el-input v-model="form.description" type="textarea" :rows="3"/></el-form-item><el-form-item label="受理方式"><el-switch v-model="form.requiresReview" active-text="人工审核后受理" inactive-text="直接受理"/></el-form-item><el-form-item label="发布状态"><el-radio-group v-model="form.status"><el-radio-button value="Draft">{{ t('businessLabels.draft') }}</el-radio-button><el-radio-button value="Published">{{ t('businessLabels.publish') }}</el-radio-button><el-radio-button value="Closed">{{ t('businessLabels.close') }}</el-radio-button></el-radio-group></el-form-item><div class="form-grid"><el-form-item label="联系人"><el-input v-model="form.contactName"/></el-form-item><el-form-item :label="t('businessLabels.phone')"><el-input v-model="form.contactPhone"/></el-form-item></div><el-form-item label="管理备注"><el-input v-model="form.notes" type="textarea" :rows="2"/></el-form-item></el-form><template #footer><el-button @click="dialog=false">{{ t('businessLabels.cancel') }}</el-button><el-button type="primary" @click="saveProject">{{ t('businessLabels.save') }}</el-button></template></el-dialog>
|
||||
</section>
|
||||
|
||||
Loaded 3 of 28 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user