diff --git a/frontend/src/views/teachBusiness/trainingPlan/index.vue b/frontend/src/views/teachBusiness/trainingPlan/index.vue
index 42882274f..21811aa2b 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%;
+}