实验视图
This commit is contained in:
@@ -90,6 +90,18 @@ const modeLabels: Record<string, string> = {
|
||||
Centralized: '集中安排',
|
||||
SelfScheduled: '自主预约',
|
||||
}
|
||||
const weekdayLabels = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
||||
|
||||
function projectScheduleLabel(project: any) {
|
||||
const entry = project.scheduleEntry
|
||||
if (!entry) return modeLabels[project.arrangementMode] ?? '待安排'
|
||||
const week = project.scheduleWeek ?? '—'
|
||||
const endPeriod = entry.startPeriod + entry.periodCount - 1
|
||||
const periods = entry.periodCount === 1
|
||||
? `第 ${entry.startPeriod} 节`
|
||||
: `第 ${entry.startPeriod}—${endPeriod} 节`
|
||||
return `第 ${week} 周 · ${weekdayLabels[entry.dayOfWeek] ?? `周${entry.dayOfWeek}`} · ${periods}`
|
||||
}
|
||||
|
||||
const schemeWeightTotal = computed(() =>
|
||||
schemeForm.items.reduce((sum, item) => sum + Number(item.weight || 0), 0),
|
||||
@@ -583,7 +595,7 @@ onMounted(async () => {
|
||||
<template #default="{ row }">
|
||||
<div class="course-project-name">
|
||||
<b>{{ row.code }} · {{ row.name }}</b>
|
||||
<small>{{ modeLabels[row.arrangementMode] }}</small>
|
||||
<small>{{ projectScheduleLabel(row) }}</small>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -680,6 +692,7 @@ onMounted(async () => {
|
||||
<span>{{ detail.projectCode }} · {{ modeLabels[detail.arrangementMode] }}</span>
|
||||
<h3>{{ detail.projectName }}</h3>
|
||||
<p>{{ detail.courseCode }} · {{ detail.courseName }} · {{ detail.termName }}</p>
|
||||
<p class="project-schedule">{{ projectScheduleLabel(detail) }}</p>
|
||||
</div>
|
||||
<div class="workbench-status">
|
||||
<el-tag :type="statusTypes[detail.status] as any" effect="dark">{{ statusLabels[detail.status] }}</el-tag>
|
||||
|
||||
Reference in New Issue
Block a user