diff --git a/frontend/src/assets/styles/education-theme.scss b/frontend/src/assets/styles/education-theme.scss index 9d57d72f..1bd7a1ce 100644 --- a/frontend/src/assets/styles/education-theme.scss +++ b/frontend/src/assets/styles/education-theme.scss @@ -335,6 +335,12 @@ button:focus-visible, border-bottom-color: #e7eeeb; } +/* 主列表与弹窗选择列表统一居中,避免未声明 align 的字段退回左对齐。 */ +body .el-table th.el-table__cell, +body .el-table td.el-table__cell { + text-align: center; +} + #app .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { background: #f2f8f5; } diff --git a/frontend/src/views/teachBusiness/trainingPlan/index.vue b/frontend/src/views/teachBusiness/trainingPlan/index.vue index 42882274..21811aa2 100644 --- a/frontend/src/views/teachBusiness/trainingPlan/index.vue +++ b/frontend/src/views/teachBusiness/trainingPlan/index.vue @@ -16,12 +16,38 @@ - + + + - + + + @@ -142,12 +168,36 @@ - + + + - + + + @@ -275,6 +325,10 @@ import { getTraining, listTraining } from '@/api/teachBusiness/training' +import { getDicts } from '@/api/system/dict/data' + +const TRAINING_TYPE_DICT_CODE = 'train_type' +const TRAINING_LEVEL_DICT_CODE = 'train_level' export default { name: 'TrainingPlan', @@ -288,6 +342,8 @@ export default { pxlx: '', pxcc: '' }, + trainingTypeOptions: [], + trainingLevelOptions: [], // 列表 tableData: [], total: 0, @@ -314,15 +370,32 @@ export default { zydh: [{ required: true, message: '请输入专业代号', trigger: 'blur' }], zymc: [{ required: true, message: '请输入专业名称', trigger: 'blur' }], zydm: [{ required: true, message: '请输入专业代码', trigger: 'blur' }], - pxcc: [{ required: true, message: '请输入培训层次', trigger: 'blur' }], - pxlx: [{ required: true, message: '请输入培训类型', trigger: 'blur' }] + pxcc: [{ required: true, message: '请选择培训层次', trigger: 'change' }], + pxlx: [{ required: true, message: '请选择培训类型', trigger: 'change' }] } } }, created() { + this.loadTrainingDictionaries() this.fetchList() }, methods: { + /** + * 从系统字典加载培训类型和培训层次,提交标签以匹配现有业务数据。 + */ + loadTrainingDictionaries() { + return Promise.all([ + getDicts(TRAINING_TYPE_DICT_CODE), + getDicts(TRAINING_LEVEL_DICT_CODE) + ]).then(([typeResponse, levelResponse]) => { + this.trainingTypeOptions = typeResponse.data || [] + this.trainingLevelOptions = levelResponse.data || [] + }).catch(() => { + this.trainingTypeOptions = [] + this.trainingLevelOptions = [] + }) + }, + /* ---------- 列表加载 ---------- */ fetchList() { this.loading = true @@ -596,4 +669,8 @@ export default { color: #f78989; } } + +.training-dict-select { + width: 100%; +} diff --git a/frontend/src/views/teachBusiness/venue/index.vue b/frontend/src/views/teachBusiness/venue/index.vue index b494473a..6c3bbefe 100644 --- a/frontend/src/views/teachBusiness/venue/index.vue +++ b/frontend/src/views/teachBusiness/venue/index.vue @@ -100,11 +100,6 @@ :close-on-click-modal="false"> - - - - - @@ -135,7 +130,15 @@ - +
+ + +
@@ -148,11 +151,6 @@ - - - - - @@ -227,7 +225,6 @@ export default { form: this.createEmptyForm() }, rules: { - jsbh: [{ required: true, message: '请输入教室编号', trigger: 'blur' }], jsmc: [{ required: true, message: '请输入教室名称', trigger: 'blur' }] } } @@ -324,7 +321,7 @@ export default { /* ---------- 新增 / 编辑 ---------- */ handleAdd() { - this.dialog.title = '新增教室' + this.dialog.title = '新增教学场地' this.dialog.form = this.createEmptyForm() this.dialog.visible = true this.$nextTick(() => { @@ -332,7 +329,7 @@ export default { }) }, handleEdit(row) { - this.dialog.title = '编辑教室' + this.dialog.title = '编辑教学场地' this.dialog.form = Object.assign({}, this.createEmptyForm(), row) this.dialog.visible = true this.$nextTick(() => { @@ -455,6 +452,28 @@ export default { } } +.number-unit-field { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + + .el-input-number { + flex: 1; + width: auto; + min-width: 0; + } + + .number-unit { + display: inline-flex; + flex: none; + align-items: center; + justify-content: center; + height: 36px; + color: #606266; + } +} + .danger-text-btn { color: #f56c6c;