From 7e4f5e1e9b231997a9ffcff72adb8ba4f513d649 Mon Sep 17 00:00:00 2001 From: yaojian <1161995598@qq.com> Date: Tue, 10 Mar 2026 17:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E9=A1=B5=E9=9D=A2=E8=A1=A5?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basic/basicstudent.ts | 12 + .../basicstudent/components/SimpleEdit.vue | 2 + .../basicstudent/components/StudentDetail.vue | 333 ++++++++++++++++++ src/views/basic/basicstudent/index.vue | 116 +++++- 4 files changed, 449 insertions(+), 14 deletions(-) create mode 100644 src/views/basic/basicstudent/components/StudentDetail.vue diff --git a/src/api/basic/basicstudent.ts b/src/api/basic/basicstudent.ts index bed758c..8d948c1 100644 --- a/src/api/basic/basicstudent.ts +++ b/src/api/basic/basicstudent.ts @@ -52,6 +52,18 @@ export const getObj = (id: string | number) => { }); }; +/** + * 根据学号获取学生详细信息(用于详情页面) + * @param query + */ +export const getStudentInfoDetail = (query: any) => { + return request({ + url: '/basic/basicstudentinfo/page', + method: 'get', + params: query, + }); +}; + /** * 根据学号获取信息 * @param stuNo diff --git a/src/views/basic/basicstudent/components/SimpleEdit.vue b/src/views/basic/basicstudent/components/SimpleEdit.vue index 555e9b9..7e9717e 100644 --- a/src/views/basic/basicstudent/components/SimpleEdit.vue +++ b/src/views/basic/basicstudent/components/SimpleEdit.vue @@ -35,6 +35,7 @@ const loading = ref(false); // 提交表单数据 const form = reactive({ id: '', + stuNo: '', realName: '', oldName: '', idCard: '', @@ -58,6 +59,7 @@ const openDialog = (rowData: any) => { Object.assign(form, { id: rowData.id || '', realName: rowData.realName || '', + stuNo: rowData.stuNo || '', oldName: rowData.oldName || '', idCard: rowData.idCard || '', }); diff --git a/src/views/basic/basicstudent/components/StudentDetail.vue b/src/views/basic/basicstudent/components/StudentDetail.vue new file mode 100644 index 0000000..491582e --- /dev/null +++ b/src/views/basic/basicstudent/components/StudentDetail.vue @@ -0,0 +1,333 @@ + + + + + \ No newline at end of file diff --git a/src/views/basic/basicstudent/index.vue b/src/views/basic/basicstudent/index.vue index 4d52197..446e089 100644 --- a/src/views/basic/basicstudent/index.vue +++ b/src/views/basic/basicstudent/index.vue @@ -62,8 +62,8 @@ - - + + 查询 @@ -199,7 +199,16 @@ 取消班干部 设为班干部 - 禁止进出 + + 禁止进出 + + 允许进出 @@ -291,6 +300,7 @@ import { Tickets, Medal, Lock, + Unlock, DataAnalysis, Setting, Menu, @@ -324,7 +334,7 @@ import { makeExportClassRoomHygieneMonthlyTask } from '/@/api/stuwork/file'; // 引入组件 const FormDialog = defineAsyncComponent(() => import('./form.vue')); -const DetailDialog = defineAsyncComponent(() => import('./detail.vue')); +const DetailDialog = defineAsyncComponent(() => import('./components/StudentDetail.vue')); const SimpleEditDialog = defineAsyncComponent(() => import('./components/SimpleEdit.vue')); // 定义变量内容 @@ -504,7 +514,7 @@ const searchForm = reactive({ parkingCard: '', completion: '', isUnionClass: '', - keyword: '', + total: '', }); // 配置 useTable @@ -546,7 +556,7 @@ const handleReset = () => { parkingCard: '', completion: '', isUnionClass: '', - keyword: '', + total: '', }); getDataList(); }; @@ -692,37 +702,115 @@ const handleExportCertificate = async () => { // 简单信息维护 const handleSimpleEdit = (row: any) => { - useMessage().warning('功能开发中'); + simpleEditDialogRef.value?.openDialog(row); }; // 查看详情 const handleViewDetail = (row: any) => { - useMessage().warning('功能开发中'); + detailDialogRef.value?.openDialog(row); }; // 打印证件照 const handlePrintPhoto = async (row: any) => { - useMessage().warning('功能开发中'); + if (!row.stuNo) { + useMessage().warning('学号不存在'); + return; + } + try { + const res = await prePrint(row.stuNo); + if (res.data) { + // 打开新窗口进行打印 + const printWindow = window.open('', '_blank'); + if (printWindow) { + printWindow.document.write(` + + 学生证件照打印 + +

学生证打印

+
+

姓名:${res.data.realName || row.realName || '-'}

+

学号:${res.data.stuNo || row.stuNo || '-'}

+

班级:${res.data.className || row.className || '-'}

+

身份证号:${res.data.idCard || row.idCard || '-'}

+
+