feat: 学校管理列表"学校类型"列改为"类型"列

- 用于区分树形层级节点类型:学校/年级/班级
- 使用不同颜色的 el-tag 标签区分显示
- 同步更新需求文档中的字段说明
This commit is contained in:
神码-方晓辉 2026-02-02 17:45:44 +08:00
parent f0f94e552d
commit 20d9fd24d1
2 changed files with 5 additions and 12 deletions

View File

@ -238,7 +238,7 @@
| ---- | ---- |:---:| --------------- |
| 学校名称 | 文本 | ✓ | 最大长度100字符 |
| 学校编码 | 文本 | ✓ | 系统自动生成,唯一 |
| 类型 | 枚举 | ✓ | 学校类型(小学/中学/高中等 |
| 类型 | 枚举 | ✓ | 节点类型:学校/年级/班级(用于区分树形层级 |
| 所属区域 | 树形选择 | ✓ | 省-市-区三级 |
| 状态 | 开关 | ✓ | 启用/禁用 |
| 创建时间 | 日期时间 | - | 系统自动记录 |

View File

@ -65,9 +65,11 @@
>
<el-table-column prop="name" label="学校名称" min-width="200" show-overflow-tooltip />
<el-table-column prop="schoolCode" label="学校编码" width="130" />
<el-table-column prop="schoolType" label="学校类型" width="100" align="center">
<el-table-column prop="type" label="类型" width="80" align="center">
<template #default="{ row }">
<span v-if="row.type === 'school'">{{ schoolTypeMap[row.schoolType] || '-' }}</span>
<el-tag v-if="row.type === 'school'" type="primary" size="small">学校</el-tag>
<el-tag v-else-if="row.type === 'grade'" type="success" size="small">年级</el-tag>
<el-tag v-else type="info" size="small">班级</el-tag>
</template>
</el-table-column>
<el-table-column prop="regionName" label="所属区域" min-width="120" show-overflow-tooltip />
@ -131,15 +133,6 @@ import ClassDialog from './components/ClassDialog.vue'
import GradeDialog from './components/GradeDialog.vue'
import SchoolDialog from './components/SchoolDialog.vue'
//
const schoolTypeMap = {
'1': '小学',
'2': '初中',
'3': '高中',
'4': '九年一贯制',
'5': '完全中学'
}
//
const treeRef = ref()
const treeFilterText = ref('')