From 3443d24d42fc451fce11c3aebe337e68539fcef2 Mon Sep 17 00:00:00 2001 From: yangbin <1796443586@qq.com> Date: Wed, 26 Aug 2026 10:06:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AD=A6=E5=91=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E7=B1=8D=E8=B4=AF=E5=88=97=E8=A1=A8=E9=A1=B9?= =?UTF-8?q?=E7=9A=84=E5=B1=85=E4=B8=AD=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/student/studentInfo/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/student/studentInfo/index.vue b/frontend/src/views/student/studentInfo/index.vue index 371e9a04..9f651aa9 100644 --- a/frontend/src/views/student/studentInfo/index.vue +++ b/frontend/src/views/student/studentInfo/index.vue @@ -86,7 +86,7 @@ - + From 5b8c7b0e7b5addb14e10c6c5074cfc3921076419 Mon Sep 17 00:00:00 2001 From: yangbin <1796443586@qq.com> Date: Wed, 26 Aug 2026 10:44:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=20=20=E4=BA=BA=E6=89=8D=E5=9F=B9=E5=85=BB?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E6=96=B0=E5=A2=9E=E8=A1=A8=E5=8D=95=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teachBusiness/trainingPlan/index.vue | 135 ++++++++++++++---- 1 file changed, 107 insertions(+), 28 deletions(-) diff --git a/frontend/src/views/teachBusiness/trainingPlan/index.vue b/frontend/src/views/teachBusiness/trainingPlan/index.vue index 21811aa2..41d759ad 100644 --- a/frontend/src/views/teachBusiness/trainingPlan/index.vue +++ b/frontend/src/views/teachBusiness/trainingPlan/index.vue @@ -146,24 +146,27 @@ :close-on-click-modal="false"> - - - - - - - - - - - + + + @@ -207,7 +210,20 @@ - + + + @@ -231,8 +247,21 @@ - - + + + + @@ -294,7 +323,7 @@ {{ fmtVal(detail.data.zybb) }} {{ fmtYesNo(detail.data.zgzy) }} {{ fmtVal(detail.data.zdyfl) }} - {{ fmtVal(detail.data.jxgljgbh) }} + {{ fmtVal(detail.data.jxgljgbh) }} {{ fmtVal(detail.data.gfmc) }} {{ fmtVal(detail.data.zygf) }} {{ fmtVal(detail.data.jc) }} @@ -326,6 +355,7 @@ import { listTraining } from '@/api/teachBusiness/training' import { getDicts } from '@/api/system/dict/data' +import { optionselect } from '@/api/system/dict/type' const TRAINING_TYPE_DICT_CODE = 'train_type' const TRAINING_LEVEL_DICT_CODE = 'train_level' @@ -344,6 +374,9 @@ export default { }, trainingTypeOptions: [], trainingLevelOptions: [], + majorDirectionOptions: [], + studentCategoryOptions: [], + teachingOrganizationOptions: [], // 列表 tableData: [], total: 0, @@ -367,9 +400,7 @@ export default { data: {} }, rules: { - zydh: [{ required: true, message: '请输入专业代号', trigger: 'blur' }], zymc: [{ required: true, message: '请输入专业名称', trigger: 'blur' }], - zydm: [{ required: true, message: '请输入专业代码', trigger: 'blur' }], pxcc: [{ required: true, message: '请选择培训层次', trigger: 'change' }], pxlx: [{ required: true, message: '请选择培训类型', trigger: 'change' }] } @@ -381,19 +412,66 @@ export default { }, 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 = [] + async loadTrainingDictionaries() { + const emptyResponse = { data: [] } + const [typeResponse, levelResponse, dictTypeResponse] = await Promise.all([ + getDicts(TRAINING_TYPE_DICT_CODE).catch(() => emptyResponse), + getDicts(TRAINING_LEVEL_DICT_CODE).catch(() => emptyResponse), + optionselect().catch(() => emptyResponse) + ]) + this.trainingTypeOptions = typeResponse.data || [] + this.trainingLevelOptions = levelResponse.data || [] + + const dictTypes = dictTypeResponse.data || [] + const [directionOptions, categoryOptions, organizationOptions] = await Promise.all([ + this.loadNamedDictionary(dictTypes, '专业方向'), + this.loadNamedDictionary(dictTypes, '学员类别'), + this.loadNamedDictionary(dictTypes, '教学管理机构') + ]) + this.majorDirectionOptions = directionOptions + this.studentCategoryOptions = categoryOptions + this.teachingOrganizationOptions = organizationOptions + this.mergeExistingSelectOptions() + }, + async loadNamedDictionary(dictTypes, dictName) { + const dictType = dictTypes.find(item => item.dictName === dictName) || + dictTypes.find(item => String(item.dictName || '').includes(dictName)) + if (!dictType || !dictType.dictType) { + return [] + } + try { + const response = await getDicts(dictType.dictType) + return response.data || [] + } catch (error) { + return [] + } + }, + mergeExistingSelectOptions() { + this.majorDirectionOptions = this.mergeTextOptions(this.majorDirectionOptions, 'zyfx', true) + this.studentCategoryOptions = this.mergeTextOptions(this.studentCategoryOptions, 'xylb', true) + this.teachingOrganizationOptions = this.mergeTextOptions( + this.teachingOrganizationOptions, + 'jxgljgbh', + false + ) + }, + mergeTextOptions(dictionaryOptions, fieldName, usesLabel) { + const options = dictionaryOptions.slice() + const existingValues = new Set(options.map(item => String(usesLabel ? item.dictLabel : item.dictValue))) + this.tableData.forEach(row => { + const value = row[fieldName] + if (value === '' || value === null || value === undefined || existingValues.has(String(value))) { + return + } + options.push({ + dictLabel: String(value), + dictValue: String(value) + }) + existingValues.add(String(value)) }) + return options }, /* ---------- 列表加载 ---------- */ @@ -413,6 +491,7 @@ export default { const data = response.data || {} this.tableData = data.records || [] this.total = data.total || 0 + this.mergeExistingSelectOptions() }).catch(() => { this.tableData = [] this.total = 0 From f0b8ba57ff66a7343d89fb635111aebaaddf5124 Mon Sep 17 00:00:00 2001 From: yangbin <1796443586@qq.com> Date: Wed, 26 Aug 2026 11:43:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=20=E8=AF=BE=E8=A1=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=B0=8F=E5=8D=A1=E7=89=87=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teachBusiness/timetableAdjust/index.vue | 65 +++++++++++++++---- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/teachBusiness/timetableAdjust/index.vue b/frontend/src/views/teachBusiness/timetableAdjust/index.vue index 3e1f2409..eee2dd88 100644 --- a/frontend/src/views/teachBusiness/timetableAdjust/index.vue +++ b/frontend/src/views/teachBusiness/timetableAdjust/index.vue @@ -360,7 +360,7 @@ export default { { label: '已发回', value: 2 }, { label: '已拒绝', value: 3 } ], - statCards: [], + statCards: this.createStatCards([0, 0, 0, 0]), // 新增申请 addVisible: false, addLoading: false, @@ -389,7 +389,10 @@ export default { } }, created() { - this.loadYearOptions().then(() => this.loadList()) + this.loadYearOptions().then(() => { + this.loadStatistics() + this.loadList() + }) }, methods: { /* ---------- 年度下拉(数据来自 /semester/all) ---------- */ @@ -450,12 +453,10 @@ export default { const data = response.data || {} this.tableData = data.records || [] this.total = data.total || 0 - this.refreshStatCards() this.loading = false }).catch(() => { this.tableData = [] this.total = 0 - this.refreshStatCards() this.loading = false }) }, @@ -473,18 +474,56 @@ export default { } this.loadList() }, - refreshStatCards() { - const list = this.tableData - this.statCards = [ - { title: '本页申请', value: list.length, gradient: 'linear-gradient(135deg, #00875a 0%, #00b877 100%)', filter: undefined }, - { title: '教研室待审批', value: list.filter(i => i.jyspzzt === 0).length, gradient: 'linear-gradient(135deg, #e6a23c 0%, #f8b04c 100%)', filter: 0 }, - { title: '教研室已同意', value: list.filter(i => i.jyspzzt === 1).length, gradient: 'linear-gradient(135deg, #409eff 0%, #66b1ff 100%)', filter: 1 }, - { title: '教研室已拒绝', value: list.filter(i => i.jyspzzt === 3).length, gradient: 'linear-gradient(135deg, #f56c6c 0%, #f78989 100%)', filter: 3 } + loadStatistics() { + const baseParams = { + nd: this.defaultNd, + pageNum: 1, + pageSize: 1 + } + const statusFilters = [undefined, 0, 1, 3] + const requests = statusFilters.map(status => { + const params = Object.assign({}, baseParams) + if (status !== undefined) { + params.jyspzzt = status + } + return listScheduleAdjust(params) + .then(response => Number((response.data && response.data.total) || 0)) + .catch(() => 0) + }) + return Promise.all(requests).then(counts => { + this.statCards = this.createStatCards(counts) + }) + }, + createStatCards(counts) { + return [ + { + title: '本页申请', + value: counts[0], + gradient: 'linear-gradient(135deg, #00875a 0%, #00b877 100%)', + filter: undefined + }, + { + title: '教研室待审批', + value: counts[1], + gradient: 'linear-gradient(135deg, #e6a23c 0%, #f8b04c 100%)', + filter: 0 + }, + { + title: '教研室已同意', + value: counts[2], + gradient: 'linear-gradient(135deg, #409eff 0%, #66b1ff 100%)', + filter: 1 + }, + { + title: '教研室已拒绝', + value: counts[3], + gradient: 'linear-gradient(135deg, #f56c6c 0%, #f78989 100%)', + filter: 3 + } ] }, handleStatClick(card) { - if (card.filter === undefined) return - this.queryParams.jyspzzt = this.queryParams.jyspzzt === card.filter ? undefined : card.filter + this.queryParams.jyspzzt = card.filter this.handleQuery() }, /* ---------- 新增申请 ---------- */