From 28f7c1945e345588dc1f05326c2af6e2d525e783 Mon Sep 17 00:00:00 2001 From: yaojian <1161995598@qq.com> Date: Wed, 4 Mar 2026 14:54:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=B8=AA=E6=AF=95=E4=B8=9A=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/stuwork/stugraducheck.ts | 50 +++++ src/views/stuwork/stugraducheck/index.vue | 237 +++++++++++++++++++++- 2 files changed, 279 insertions(+), 8 deletions(-) diff --git a/src/api/stuwork/stugraducheck.ts b/src/api/stuwork/stugraducheck.ts index 342b46b..7eb0b56 100644 --- a/src/api/stuwork/stugraducheck.ts +++ b/src/api/stuwork/stugraducheck.ts @@ -119,3 +119,53 @@ export const queryScoreSummaryPage = (params: any) => { params }) } + +// ========== 单个学生确认接口 ========== + +/** + * 单个学生学分确认详情 + * @param stuNo 学号 + */ +export const confirmScoreByStuNo = (stuNo: string) => { + return request({ + url: '/stuwork/stugraducheck/confirmScoreByStuNo', + method: 'get', + params: { stuNo } + }) +} + +/** + * 单个学生操行确认详情 + * @param stuNo 学号 + */ +export const confirmConductByStuNo = (stuNo: string) => { + return request({ + url: '/stuwork/stugraducheck/confirmConductByStuNo', + method: 'get', + params: { stuNo } + }) +} + +/** + * 单个学生违纪确认详情 + * @param stuNo 学号 + */ +export const confirmPunishByStuNo = (stuNo: string) => { + return request({ + url: '/stuwork/stugraducheck/confirmPunishByStuNo', + method: 'get', + params: { stuNo } + }) +} + +/** + * 单个学生等级工确认详情 + * @param stuNo 学号 + */ +export const confirmSkillByStuNo = (stuNo: string) => { + return request({ + url: '/stuwork/stugraducheck/confirmSkillByStuNo', + method: 'get', + params: { stuNo } + }) +} diff --git a/src/views/stuwork/stugraducheck/index.vue b/src/views/stuwork/stugraducheck/index.vue index bddbf12..2061948 100644 --- a/src/views/stuwork/stugraducheck/index.vue +++ b/src/views/stuwork/stugraducheck/index.vue @@ -173,6 +173,36 @@ + + + + + @@ -234,7 +264,6 @@ - @@ -242,6 +271,134 @@ 关闭 + + + +
+ + + {{ detailData.stuNo }} + {{ detailData.realName }} + {{ detailData.classNo }} + {{ detailData.majorLevelName }} + + + + + + + + + + + + + +
+ + +
@@ -249,7 +406,7 @@ import { reactive, ref, computed, onMounted } from 'vue' import { useRoute } from 'vue-router' import { BasicTableProps, useTable } from '/@/hooks/table' -import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill, solidifyConduct, solidifyScore } from '/@/api/stuwork/stugraducheck' +import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill, solidifyConduct, solidifyScore, confirmScoreByStuNo, confirmConductByStuNo, confirmPunishByStuNo, confirmSkillByStuNo } from '/@/api/stuwork/stugraducheck' import { getDeptList } from '/@/api/basic/basicclass' import TableColumnControl from '/@/components/TableColumnControl/index.vue' import { @@ -261,7 +418,11 @@ import { Search, Grid, DataAnalysis, - Finished + Finished, + Setting, + ArrowDown, + Warning, + Medal } from '@element-plus/icons-vue' import { useTableColumnControl } from '/@/hooks/tableColumn' import { useMessage } from '/@/hooks/message' @@ -293,13 +454,28 @@ const confirmTypeLabel = computed(() => { return map[confirmResult.value.confirmType] || '确认结果' }) +// 单个学生详情对话框 +const detailDialogVisible = ref(false) +const detailLoading = ref(false) +const detailType = ref('') +const detailData = ref({}) +const detailTitle = computed(() => { + const map: Record = { + score: '学分确认详情', + conduct: '操行确认详情', + punish: '违纪确认详情', + skill: '等级工确认详情' + } + return map[detailType.value] || '详情' +}) + // 毕业年份:当前年前后各 5 年 const graduYearOptions = computed(() => { const y = new Date().getFullYear() return Array.from({ length: 11 }, (_, i) => y - 5 + i) }) -// 表格列配置(与其它页面一致,icon 写在列上) +// 表格列配置 const tableColumns = [ { prop: 'stuNo', label: '学号', icon: UserFilled }, { prop: 'realName', label: '姓名', icon: UserFilled }, @@ -321,7 +497,7 @@ const { handleColumnOrderChange } = useTableColumnControl(tableColumns, route.path) -// 搜索表单(与接口文档一致:graduYear, status, type, stuNo, realName, deptCode, classCode 等) +// 搜索表单 const searchForm = reactive({ graduYear: '', status: '', @@ -473,7 +649,7 @@ const handleSolidifyConduct = async () => { } try { await ElMessageBox.confirm( - `确定要固化 ${searchForm.graduYear} 年毕业学生的操行考核数据吗?这将汇总所有学生的操行分并存储到缓存中。`, + `确定要固化 ${searchForm.graduYear} 年毕业学生的操行考核数据吗?`, '固化操行考核', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' } ) @@ -498,7 +674,7 @@ const handleSolidifyScore = async () => { } try { await ElMessageBox.confirm( - `确定要固化 ${searchForm.graduYear} 年毕业学生的学分数据吗?这将汇总所有学生的学分情况并存储到缓存中。`, + `确定要固化 ${searchForm.graduYear} 年毕业学生的学分数据吗?`, '固化学分', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' } ) @@ -515,6 +691,39 @@ const handleSolidifyScore = async () => { } } +// 单个学生确认详情 +const handleDetailConfirm = async (type: string, row: any) => { + detailType.value = type + detailDialogVisible.value = true + detailLoading.value = true + detailData.value = { stuNo: row.stuNo, realName: row.realName, classNo: row.classNo } + + try { + let res: any + switch (type) { + case 'score': + res = await confirmScoreByStuNo(row.stuNo) + break + case 'conduct': + res = await confirmConductByStuNo(row.stuNo) + break + case 'punish': + res = await confirmPunishByStuNo(row.stuNo) + break + case 'skill': + res = await confirmSkillByStuNo(row.stuNo) + break + } + if (res.data) { + detailData.value = res.data + } + } catch (err: any) { + useMessage().error(err.msg || '查询失败') + } finally { + detailLoading.value = false + } +} + onMounted(() => { loadDeptList() }) @@ -522,4 +731,16 @@ onMounted(() => { + +.detail-desc { + margin-bottom: 16px; +} + +.detail-alert { + margin-top: 16px; +} + +.confirm-stats { + margin-bottom: 20px; +} + \ No newline at end of file