From 05592577ffc5826ded42ee5ab0a711932c2a9291 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 12 Nov 2023 22:33:38 +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=E6=99=AE?= =?UTF-8?q?=E9=80=9A=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 (cherry picked from commit f0f78860255d1b3190556cd4dbd500c69d8a4b1f) --- .eslintrc.js | 3 +- src/api/infra/demo11/index.ts | 57 ++++ src/views/infra/demo11/Demo11StudentForm.vue | 183 +++++++++++++ .../components/Demo11StudentContactForm.vue | 169 ++++++++++++ .../components/Demo11StudentTeacherForm.vue | 122 +++++++++ src/views/infra/demo11/index.vue | 252 ++++++++++++++++++ 6 files changed, 785 insertions(+), 1 deletion(-) create mode 100644 src/api/infra/demo11/index.ts create mode 100644 src/views/infra/demo11/Demo11StudentForm.vue create mode 100644 src/views/infra/demo11/components/Demo11StudentContactForm.vue create mode 100644 src/views/infra/demo11/components/Demo11StudentTeacherForm.vue create mode 100644 src/views/infra/demo11/index.vue diff --git a/.eslintrc.js b/.eslintrc.js index a622b555..70c91784 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -67,6 +67,7 @@ module.exports = defineConfig({ } ], 'vue/multi-word-component-names': 'off', - 'vue/no-v-html': 'off' + 'vue/no-v-html': 'off', + 'prettier/prettier': 'off' // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件 } }) diff --git a/src/api/infra/demo11/index.ts b/src/api/infra/demo11/index.ts new file mode 100644 index 00000000..4c4c7b4e --- /dev/null +++ b/src/api/infra/demo11/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface Demo11StudentVO { + id: number + name: string + description: string + birthday: Date + sex: number + enabled: boolean + avatar: string + video: string + memo: string +} + +// 查询学生列表 +export const getDemo11StudentPage = async (params) => { + return await request.get({ url: `/infra/demo11-student/page`, params }) +} + +// 查询学生详情 +export const getDemo11Student = async (id: number) => { + return await request.get({ url: `/infra/demo11-student/get?id=` + id }) +} + +// 新增学生 +export const createDemo11Student = async (data: Demo11StudentVO) => { + return await request.post({ url: `/infra/demo11-student/create`, data }) +} + +// 修改学生 +export const updateDemo11Student = async (data: Demo11StudentVO) => { + return await request.put({ url: `/infra/demo11-student/update`, data }) +} + +// 删除学生 +export const deleteDemo11Student = async (id: number) => { + return await request.delete({ url: `/infra/demo11-student/delete?id=` + id }) +} + +// 导出学生 Excel +export const exportDemo11Student = async (params) => { + return await request.download({ url: `/infra/demo11-student/export-excel`, params }) +} + +// ==================== 子表(学生联系人) ==================== + +// 获得学生联系人列表 +export const getDemo11StudentContactListByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo11-student/demo11-student/list-by-student-id?studentId=` + studentId }) +} + +// ==================== 子表(学生班主任) ==================== + +// 获得学生班主任 +export const getDemo11StudentTeacherByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo11-student/demo11-student/get-by-student-id?studentId=` + studentId }) +} \ No newline at end of file diff --git a/src/views/infra/demo11/Demo11StudentForm.vue b/src/views/infra/demo11/Demo11StudentForm.vue new file mode 100644 index 00000000..39c21a2b --- /dev/null +++ b/src/views/infra/demo11/Demo11StudentForm.vue @@ -0,0 +1,183 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo11/components/Demo11StudentContactForm.vue b/src/views/infra/demo11/components/Demo11StudentContactForm.vue new file mode 100644 index 00000000..1ab017e8 --- /dev/null +++ b/src/views/infra/demo11/components/Demo11StudentContactForm.vue @@ -0,0 +1,169 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue b/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue new file mode 100644 index 00000000..a8697be1 --- /dev/null +++ b/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue @@ -0,0 +1,122 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo11/index.vue b/src/views/infra/demo11/index.vue new file mode 100644 index 00000000..36529eb9 --- /dev/null +++ b/src/views/infra/demo11/index.vue @@ -0,0 +1,252 @@ + + + \ No newline at end of file