From 18be83519df4d12e95d203c803aebb87a72df1d1 Mon Sep 17 00:00:00 2001 From: LiuQAQQWQ <1109326957@qq.com> Date: Thu, 4 Dec 2025 09:39:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8A=A5=E5=90=8D=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/api/stuBaseInfo.ts | 26 ++ admin/src/views/stuBaseInfo/edit.vue | 333 ++++++++++++++ admin/src/views/stuBaseInfo/index.vue | 230 ++++++++++ admin/src/views/student/info/edit.vue | 22 +- pc/api/enrollment.ts | 60 +-- pc/assets/styles/public.scss | 1 - pc/constants/menu.ts | 7 +- pc/layouts/components/footer/index.vue | 75 +++- pc/layouts/components/header/index.vue | 126 +++++- pc/layouts/components/main/index.vue | 83 +++- pc/layouts/default.vue | 4 +- pc/pages/policy/[type].vue | 2 +- pc/pages/user/enrollment.vue | 594 ++++++++++++++++++++----- 13 files changed, 1362 insertions(+), 201 deletions(-) create mode 100644 admin/src/api/stuBaseInfo.ts create mode 100644 admin/src/views/stuBaseInfo/edit.vue create mode 100644 admin/src/views/stuBaseInfo/index.vue diff --git a/admin/src/api/stuBaseInfo.ts b/admin/src/api/stuBaseInfo.ts new file mode 100644 index 0000000..2201aa0 --- /dev/null +++ b/admin/src/api/stuBaseInfo.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 学生基本信息列表 +export function stuBaseInfoLists(params?: Record) { + return request.get({ url: '/stuBaseInfo/list', params }) +} + +// 学生基本信息详情 +export function stuBaseInfoDetail(params: Record) { + return request.get({ url: '/stuBaseInfo/detail', params }) +} + +// 学生基本信息新增 +export function stuBaseInfoAdd(params: Record) { + return request.post({ url: '/stuBaseInfo/add', params }) +} + +// 学生基本信息编辑 +export function stuBaseInfoEdit(params: Record) { + return request.post({ url: '/stuBaseInfo/edit', params }) +} + +// 学生基本信息删除 +export function stuBaseInfoDelete(params: Record) { + return request.post({ url: '/stuBaseInfo/del', params }) +} diff --git a/admin/src/views/stuBaseInfo/edit.vue b/admin/src/views/stuBaseInfo/edit.vue new file mode 100644 index 0000000..b249e0f --- /dev/null +++ b/admin/src/views/stuBaseInfo/edit.vue @@ -0,0 +1,333 @@ + + diff --git a/admin/src/views/stuBaseInfo/index.vue b/admin/src/views/stuBaseInfo/index.vue new file mode 100644 index 0000000..b6da538 --- /dev/null +++ b/admin/src/views/stuBaseInfo/index.vue @@ -0,0 +1,230 @@ + + diff --git a/admin/src/views/student/info/edit.vue b/admin/src/views/student/info/edit.vue index 7d9b275..4d2f4b4 100644 --- a/admin/src/views/student/info/edit.vue +++ b/admin/src/views/student/info/edit.vue @@ -18,10 +18,10 @@ - - - - + + + + @@ -36,10 +36,10 @@ v-model="formData.studentStatus" placeholder="请选择学生状态: " > - - - - + + + + @@ -51,9 +51,9 @@ v-model="formData.politicalStatus" placeholder="请选择政治面貌: " > - - - + + + diff --git a/pc/api/enrollment.ts b/pc/api/enrollment.ts index f1abe1b..0c6582d 100644 --- a/pc/api/enrollment.ts +++ b/pc/api/enrollment.ts @@ -3,24 +3,7 @@ * @return { Promise } 包含学生基本信息的响应 */ export function getStudentBaseInfo() { - // 模拟后端数据 - return new Promise((resolve) => { - setTimeout(() => { - resolve({ - data: { - name: '张三', - gender: 'male', - idCard: '110101201001011234', - phone: '13800138000', - address: '北京市海淀区XX街道XX小区', - emergencyContact: '李四', - emergencyPhone: '13900139000' - } - }) - }, 500) // 模拟网络延迟 - }) - // 真实接口(后端恢复后启用) - // return $request.get({ url: '/enrollment/studentInfo', params }) + return $request.get({ url: '/enrollment/studentBaseInfo' }) } /** @@ -29,19 +12,14 @@ export function getStudentBaseInfo() { * @return { Promise } 更新结果 */ export function updateStudentBaseInfo(params: any) { - // 模拟后端数据 - return new Promise((resolve) => { - setTimeout(() => { - resolve({ - data: { - success: true, - message: '信息保存成功' - } - }) - }, 500) - }) - // 真实接口(后端恢复后启用) - // return $request.post({ url: '/enrollment/studentInfo', params }) + return $request.post({ url: '/enrollment/studentBaseInfo', params }) +} + +/** + * @description 提交报名信息(对应"提交报名"按钮) + */ +export function submitEnrollmentInfo() { + return $request.post({ url: '/enrollment/submit' }) } /** @@ -49,23 +27,5 @@ export function updateStudentBaseInfo(params: any) { * @return { Promise } 包含所有步骤状态的响应 */ export function getEnrollmentProcessStatus() { - // 模拟后端数据 - return new Promise((resolve) => { - setTimeout(() => { - resolve({ - data: { - label: '审核完毕', - type: 'success', - steps: [ - { completed: true, time: '2025-05-01 10:30:00' }, - { completed: true, time: '2025-05-01 10:30:00' }, - { completed: false, time: '' }, - { completed: false, time: '' } - ] - } - }) - }, 500) - }) - // 真实接口(后端恢复后启用) - // return $request.get({ url: '/enrollment/processStatus' }) + return $request.get({ url: '/enrollment/processStatus' }) } diff --git a/pc/assets/styles/public.scss b/pc/assets/styles/public.scss index 64bb2a5..c3cc374 100644 --- a/pc/assets/styles/public.scss +++ b/pc/assets/styles/public.scss @@ -1,6 +1,5 @@ body { @apply text-base text-tx-primary bg-page; - min-width: 1200px; } body, html { diff --git a/pc/constants/menu.ts b/pc/constants/menu.ts index 32fad86..ca19088 100644 --- a/pc/constants/menu.ts +++ b/pc/constants/menu.ts @@ -5,8 +5,11 @@ export const NAVBAR = [ }, { name: '管理后台', - path: '/admin', - component: 'admin' + path: 'http://192.168.123.110:5173/workbench' + }, + { + name: '接口文档', + path: 'http://192.168.123.111:8084/doc.html#/home' } ] diff --git a/pc/layouts/components/footer/index.vue b/pc/layouts/components/footer/index.vue index 674c42d..58c5952 100644 --- a/pc/layouts/components/footer/index.vue +++ b/pc/layouts/components/footer/index.vue @@ -1,21 +1,29 @@ + - + diff --git a/pc/layouts/components/header/index.vue b/pc/layouts/components/header/index.vue index e720f7a..cfba116 100644 --- a/pc/layouts/components/header/index.vue +++ b/pc/layouts/components/header/index.vue @@ -1,19 +1,130 @@ + + \ No newline at end of file diff --git a/pc/layouts/components/main/index.vue b/pc/layouts/components/main/index.vue index 99c5dad..6e392fb 100644 --- a/pc/layouts/components/main/index.vue +++ b/pc/layouts/components/main/index.vue @@ -1,8 +1,21 @@ + + +// 响应式判断 +const isMobile = ref(false) +const showMobileMenu = ref(false) + +const checkMobile = () => { + isMobile.value = window.outerWidth < 768 // 使用 Tailwind 的 md 断点 +} + +onMounted(() => { + checkMobile() + window.addEventListener('resize', checkMobile) +}) + +onUnmounted(() => { + window.removeEventListener('resize', checkMobile) +}) + +// 路由变化时关闭移动端菜单 +watch(() => route.path, () => { + if (isMobile.value) { + showMobileMenu.value = false + } +}) + \ No newline at end of file diff --git a/pc/layouts/default.vue b/pc/layouts/default.vue index 693aefc..a7e5992 100644 --- a/pc/layouts/default.vue +++ b/pc/layouts/default.vue @@ -1,5 +1,5 @@