From 0d3c89a0c48bc710480e6974e76d9de1d93d65a0 Mon Sep 17 00:00:00 2001
From: yangbin <1796443586@qq.com>
Date: Tue, 25 Aug 2026 17:45:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E6=89=8D=E5=9F=B9=E5=85=BB=E6=96=B9?=
=?UTF-8?q?=E6=A1=88=E6=9F=A5=E8=AF=A2=E6=A1=86=E7=9A=84=20=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E5=BD=95=E5=85=A5=20=20=E6=8E=A5=E5=8F=A3=E5=AF=B9?=
=?UTF-8?q?=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../teachBusiness/trainingPlan/index.vue | 89 +++++++++++++++++--
1 file changed, 83 insertions(+), 6 deletions(-)
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%;
+}