From 9aca49c1ffb1344f5416d793e6c9edc56179ffab Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 16 Nov 2023 23:24:03 +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=20normal=20?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=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/demo/demo03/normal/index.ts | 53 ++++++ .../codegen/components/GenerateInfoForm.vue | 2 +- .../demo/demo03/normal/Demo03StudentForm.vue | 153 ++++++++++++++++++ .../normal/components/Demo03CourseForm.vue} | 61 ++++--- .../normal/components/Demo03GradeForm.vue | 72 +++++++++ .../{demo03 => demo/demo03/normal}/index.vue | 133 +++++++++------ .../infra/demo03/DemoStudentAddressForm.vue | 58 ------- .../infra/demo03/DemoStudentAddressList.vue | 38 ----- .../infra/demo03/DemoStudentContactList.vue | 38 ----- src/views/infra/demo03/DemoStudentForm.vue | 132 --------------- 10 files changed, 402 insertions(+), 338 deletions(-) create mode 100644 src/api/infra/demo/demo03/normal/index.ts create mode 100644 src/views/infra/demo/demo03/normal/Demo03StudentForm.vue rename src/views/infra/{demo03/DemoStudentContactForm.vue => demo/demo03/normal/components/Demo03CourseForm.vue} (52%) create mode 100644 src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue rename src/views/infra/{demo03 => demo/demo03/normal}/index.vue (50%) delete mode 100644 src/views/infra/demo03/DemoStudentAddressForm.vue delete mode 100644 src/views/infra/demo03/DemoStudentAddressList.vue delete mode 100644 src/views/infra/demo03/DemoStudentContactList.vue delete mode 100644 src/views/infra/demo03/DemoStudentForm.vue diff --git a/src/api/infra/demo/demo03/normal/index.ts b/src/api/infra/demo/demo03/normal/index.ts new file mode 100644 index 00000000..f15ee1dc --- /dev/null +++ b/src/api/infra/demo/demo03/normal/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface Demo03StudentVO { + id: number + name: string + sex: number + birthday: Date + description: string +} + +// 查询学生分页 +export const getDemo03StudentPage = async (params) => { + return await request.get({ url: `/infra/demo03-student/page`, params }) +} + +// 查询学生详情 +export const getDemo03Student = async (id: number) => { + return await request.get({ url: `/infra/demo03-student/get?id=` + id }) +} + +// 新增学生 +export const createDemo03Student = async (data: Demo03StudentVO) => { + return await request.post({ url: `/infra/demo03-student/create`, data }) +} + +// 修改学生 +export const updateDemo03Student = async (data: Demo03StudentVO) => { + return await request.put({ url: `/infra/demo03-student/update`, data }) +} + +// 删除学生 +export const deleteDemo03Student = async (id: number) => { + return await request.delete({ url: `/infra/demo03-student/delete?id=` + id }) +} + +// 导出学生 Excel +export const exportDemo03Student = async (params) => { + return await request.download({ url: `/infra/demo03-student/export-excel`, params }) +} + +// ==================== 子表(学生课程) ==================== + +// 获得学生课程列表 +export const getDemo03CourseListByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId }) +} + +// ==================== 子表(学生班级) ==================== + +// 获得学生班级 +export const getDemo03GradeByStudentId = async (studentId) => { + return await request.get({ url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId }) +} \ No newline at end of file diff --git a/src/views/infra/codegen/components/GenerateInfoForm.vue b/src/views/infra/codegen/components/GenerateInfoForm.vue index a4f5ad97..d2a01cc0 100644 --- a/src/views/infra/codegen/components/GenerateInfoForm.vue +++ b/src/views/infra/codegen/components/GenerateInfoForm.vue @@ -183,7 +183,7 @@ - +

树表信息

diff --git a/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue b/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue new file mode 100644 index 00000000..00508228 --- /dev/null +++ b/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue @@ -0,0 +1,153 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo03/DemoStudentContactForm.vue b/src/views/infra/demo/demo03/normal/components/Demo03CourseForm.vue similarity index 52% rename from src/views/infra/demo03/DemoStudentContactForm.vue rename to src/views/infra/demo/demo03/normal/components/Demo03CourseForm.vue index 50c44263..b6f58572 100644 --- a/src/views/infra/demo03/DemoStudentContactForm.vue +++ b/src/views/infra/demo/demo03/normal/components/Demo03CourseForm.vue @@ -3,23 +3,23 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="0px" v-loading="formLoading" + label-width="0px" :inline-message="true" > - - + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue b/src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue new file mode 100644 index 00000000..12653b6c --- /dev/null +++ b/src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue @@ -0,0 +1,72 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo03/index.vue b/src/views/infra/demo/demo03/normal/index.vue similarity index 50% rename from src/views/infra/demo03/index.vue rename to src/views/infra/demo/demo03/normal/index.vue index afd5cbfc..52029107 100644 --- a/src/views/infra/demo03/index.vue +++ b/src/views/infra/demo/demo03/normal/index.vue @@ -8,10 +8,50 @@ :inline="true" label-width="68px" > + + + + + + + + + + + 搜索 重置 - + 新增 导出 @@ -29,37 +69,44 @@ - - + + + + - + + + + \ No newline at end of file diff --git a/src/views/infra/demo03/DemoStudentAddressForm.vue b/src/views/infra/demo03/DemoStudentAddressForm.vue deleted file mode 100644 index af4cd8f1..00000000 --- a/src/views/infra/demo03/DemoStudentAddressForm.vue +++ /dev/null @@ -1,58 +0,0 @@ - - diff --git a/src/views/infra/demo03/DemoStudentAddressList.vue b/src/views/infra/demo03/DemoStudentAddressList.vue deleted file mode 100644 index 2354db56..00000000 --- a/src/views/infra/demo03/DemoStudentAddressList.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/views/infra/demo03/DemoStudentContactList.vue b/src/views/infra/demo03/DemoStudentContactList.vue deleted file mode 100644 index 76d46116..00000000 --- a/src/views/infra/demo03/DemoStudentContactList.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/views/infra/demo03/DemoStudentForm.vue b/src/views/infra/demo03/DemoStudentForm.vue deleted file mode 100644 index fe0788c4..00000000 --- a/src/views/infra/demo03/DemoStudentForm.vue +++ /dev/null @@ -1,132 +0,0 @@ - -