From 999d8de9e972d62ae4bf2a23bcb05d7559c8c101 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 Nov 2023 13:57:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=BB=E5=AD=90=E8=A1=A8=EF=BC=88=E5=86=85?= =?UTF-8?q?=E5=B5=8C=EF=BC=89=E7=9A=84=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/demo12/index.ts | 57 ++++ .../components/Demo11StudentContactForm.vue | 5 + src/views/infra/demo12/Demo12StudentForm.vue | 183 +++++++++++++ .../components/Demo12StudentContactForm.vue | 5 + .../components/Demo12StudentContactList.vue | 63 +++++ .../components/Demo12StudentTeacherForm.vue | 5 + .../components/Demo12StudentTeacherList.vue | 67 +++++ src/views/infra/demo12/index.vue | 252 ++++++++++++++++++ 8 files changed, 637 insertions(+) create mode 100644 src/api/infra/demo12/index.ts create mode 100644 src/views/infra/demo12/Demo12StudentForm.vue create mode 100644 src/views/infra/demo12/components/Demo12StudentContactForm.vue create mode 100644 src/views/infra/demo12/components/Demo12StudentContactList.vue create mode 100644 src/views/infra/demo12/components/Demo12StudentTeacherForm.vue create mode 100644 src/views/infra/demo12/components/Demo12StudentTeacherList.vue create mode 100644 src/views/infra/demo12/index.vue diff --git a/src/api/infra/demo12/index.ts b/src/api/infra/demo12/index.ts new file mode 100644 index 00000000..33c3fb4f --- /dev/null +++ b/src/api/infra/demo12/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface Demo12StudentVO { + id: number + name: string + description: string + birthday: Date + sex: number + enabled: boolean + avatar: string + video: string + memo: string +} + +// 查询学生列表 +export const getDemo12StudentPage = async (params) => { + return await request.get({ url: `/infra/demo12-student/page`, params }) +} + +// 查询学生详情 +export const getDemo12Student = async (id: number) => { + return await request.get({ url: `/infra/demo12-student/get?id=` + id }) +} + +// 新增学生 +export const createDemo12Student = async (data: Demo12StudentVO) => { + return await request.post({ url: `/infra/demo12-student/create`, data }) +} + +// 修改学生 +export const updateDemo12Student = async (data: Demo12StudentVO) => { + return await request.put({ url: `/infra/demo12-student/update`, data }) +} + +// 删除学生 +export const deleteDemo12Student = async (id: number) => { + return await request.delete({ url: `/infra/demo12-student/delete?id=` + id }) +} + +// 导出学生 Excel +export const exportDemo12Student = async (params) => { + return await request.download({ url: `/infra/demo12-student/export-excel`, params }) +} + +// ==================== 子表(学生联系人) ==================== + +// 获得学生联系人列表 +export const getDemo12StudentContactListByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo12-student/demo12-student/list-by-student-id?studentId=` + studentId }) +} + +// ==================== 子表(学生班主任) ==================== + +// 获得学生班主任 +export const getDemo12StudentTeacherByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo12-student/demo12-student/get-by-student-id?studentId=` + studentId }) +} \ No newline at end of file diff --git a/src/views/infra/demo11/components/Demo11StudentContactForm.vue b/src/views/infra/demo11/components/Demo11StudentContactForm.vue index 1ab017e8..ba900017 100644 --- a/src/views/infra/demo11/components/Demo11StudentContactForm.vue +++ b/src/views/infra/demo11/components/Demo11StudentContactForm.vue @@ -85,6 +85,11 @@ + + + diff --git a/src/views/infra/demo12/Demo12StudentForm.vue b/src/views/infra/demo12/Demo12StudentForm.vue new file mode 100644 index 00000000..d3cb482d --- /dev/null +++ b/src/views/infra/demo12/Demo12StudentForm.vue @@ -0,0 +1,183 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentContactForm.vue b/src/views/infra/demo12/components/Demo12StudentContactForm.vue new file mode 100644 index 00000000..d71f6146 --- /dev/null +++ b/src/views/infra/demo12/components/Demo12StudentContactForm.vue @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentContactList.vue b/src/views/infra/demo12/components/Demo12StudentContactList.vue new file mode 100644 index 00000000..65ed9df1 --- /dev/null +++ b/src/views/infra/demo12/components/Demo12StudentContactList.vue @@ -0,0 +1,63 @@ + + + \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue b/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue new file mode 100644 index 00000000..d71f6146 --- /dev/null +++ b/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherList.vue b/src/views/infra/demo12/components/Demo12StudentTeacherList.vue new file mode 100644 index 00000000..55f6845b --- /dev/null +++ b/src/views/infra/demo12/components/Demo12StudentTeacherList.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/src/views/infra/demo12/index.vue b/src/views/infra/demo12/index.vue new file mode 100644 index 00000000..c5a82a4c --- /dev/null +++ b/src/views/infra/demo12/index.vue @@ -0,0 +1,252 @@ + + + \ No newline at end of file