From 4e413a10e621a34235a6f520f8b97cd77cc00c95 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 9 Nov 2023 23:10:54 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E4=B8=BB=E5=AD=90=E8=A1=A8=EF=BC=9A?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=AD=98=E5=82=A8=EF=BC=8C=E5=87=86=E5=A4=87?= =?UTF-8?q?=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/demo02/index.ts | 35 ++++ .../infra/demo02/DemoStudentContactForm.vue | 71 ++++++++ src/views/infra/demo02/DemoStudentForm.vue | 97 +++++++++++ src/views/infra/demo02/index.vue | 159 ++++++++++++++++++ 4 files changed, 362 insertions(+) create mode 100644 src/api/infra/demo02/index.ts create mode 100644 src/views/infra/demo02/DemoStudentContactForm.vue create mode 100644 src/views/infra/demo02/DemoStudentForm.vue create mode 100644 src/views/infra/demo02/index.vue diff --git a/src/api/infra/demo02/index.ts b/src/api/infra/demo02/index.ts new file mode 100644 index 00000000..b575dba4 --- /dev/null +++ b/src/api/infra/demo02/index.ts @@ -0,0 +1,35 @@ +import request from '@/config/axios' + +export interface DemoStudentVO { + id: number +} + +// 查询学生列表 +export const getDemoStudentPage = async (params) => { + return await request.get({ url: `/infra/demo-student/page`, params }) +} + +// 查询学生详情 +export const getDemoStudent = async (id: number) => { + return await request.get({ url: `/infra/demo-student/get?id=` + id }) +} + +// 新增学生 +export const createDemoStudent = async (data: DemoStudentVO) => { + return await request.post({ url: `/infra/demo-student/create`, data }) +} + +// 修改学生 +export const updateDemoStudent = async (data: DemoStudentVO) => { + return await request.put({ url: `/infra/demo-student/update`, data }) +} + +// 删除学生 +export const deleteDemoStudent = async (id: number) => { + return await request.delete({ url: `/infra/demo-student/delete?id=` + id }) +} + +// 导出学生 Excel +export const exportDemoStudent = async (params) => { + return await request.download({ url: `/infra/demo-student/export-excel`, params }) +} diff --git a/src/views/infra/demo02/DemoStudentContactForm.vue b/src/views/infra/demo02/DemoStudentContactForm.vue new file mode 100644 index 00000000..98c97fab --- /dev/null +++ b/src/views/infra/demo02/DemoStudentContactForm.vue @@ -0,0 +1,71 @@ + + diff --git a/src/views/infra/demo02/DemoStudentForm.vue b/src/views/infra/demo02/DemoStudentForm.vue new file mode 100644 index 00000000..62303dc0 --- /dev/null +++ b/src/views/infra/demo02/DemoStudentForm.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/infra/demo02/index.vue b/src/views/infra/demo02/index.vue new file mode 100644 index 00000000..ae46f8b4 --- /dev/null +++ b/src/views/infra/demo02/index.vue @@ -0,0 +1,159 @@ + + + From d45ebd4fcfb0bac96a575b5f594248e5b85f8778 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 10 Nov 2023 00:20:00 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E4=B8=BB=E5=AD=90=E8=A1=A8=EF=BC=9A?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=AD=98=E5=82=A8=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B7=91=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/demo02/DemoStudentContactForm.vue | 54 +++++++++++-------- src/views/infra/demo02/DemoStudentForm.vue | 26 ++++++--- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/src/views/infra/demo02/DemoStudentContactForm.vue b/src/views/infra/demo02/DemoStudentContactForm.vue index 98c97fab..145b4889 100644 --- a/src/views/infra/demo02/DemoStudentContactForm.vue +++ b/src/views/infra/demo02/DemoStudentContactForm.vue @@ -1,22 +1,15 @@ diff --git a/src/views/infra/demo02/DemoStudentForm.vue b/src/views/infra/demo02/DemoStudentForm.vue index 884788dc..1bb6d7ea 100644 --- a/src/views/infra/demo02/DemoStudentForm.vue +++ b/src/views/infra/demo02/DemoStudentForm.vue @@ -16,14 +16,14 @@ - - - - - 地址信息 - 其它信息 - + + + + + 地址信息 + 其它信息 + @@ -305,6 +325,10 @@ const props = defineProps({ table: { type: Object as PropType>, default: () => null + }, + columns: { + type: Array as unknown as PropType, + default: () => null } }) @@ -323,9 +347,10 @@ const formData = ref({ treeParentCode: '', treeName: '', tplCategory: '', - subTableName: '', - subTableFkName: '', - genType: '' + genType: '', + masterTableId: undefined, + subJoinColumnId: undefined, + subJoinMany: undefined }) const rules = reactive({ @@ -336,41 +361,27 @@ const rules = reactive({ businessName: [required], businessPackage: [required], className: [required], - classComment: [required] + classComment: [required], + masterTableId: [required], + subJoinColumnId: [required], + subJoinMany: [required] }) -const tables = ref([]) -const subColumns = ref([]) +const tables = ref([]) // 表定义列表 const menus = ref([]) const menuTreeProps = { label: 'name' } -/** 选择子表名触发 */ -const subSelectChange = () => { - formData.value.subTableFkName = '' -} - -/** 选择生成模板触发 */ -const tplSelectChange = (value) => { - if (value !== 1) { - // TODO 芋艿:暂时不考虑支持树形结构 - message.error( - '暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发' - ) - return false - } - if (value !== 'sub') { - formData.value.subTableName = '' - formData.value.subTableFkName = '' - } -} - watch( () => props.table, - (table) => { + async (table) => { if (!table) return formData.value = table as any + // 加载表列表 + if (table.dataSourceConfigId >= 0) { + tables.value = await CodegenApi.getCodegenTableList(formData.value.dataSourceConfigId) + } }, { deep: true, @@ -380,6 +391,7 @@ watch( onMounted(async () => { try { + // 加载菜单 const resp = await MenuApi.getSimpleMenusList() menus.value = handleTree(resp) } catch {} diff --git a/src/views/infra/demo12/Demo12StudentForm.vue b/src/views/infra/demo12/Demo12StudentForm.vue index d3cb482d..af4e2733 100644 --- a/src/views/infra/demo12/Demo12StudentForm.vue +++ b/src/views/infra/demo12/Demo12StudentForm.vue @@ -42,7 +42,7 @@ - + diff --git a/src/views/infra/demo12/components/Demo12StudentContactForm.vue b/src/views/infra/demo12/components/Demo12StudentContactForm.vue index d71f6146..e246678b 100644 --- a/src/views/infra/demo12/components/Demo12StudentContactForm.vue +++ b/src/views/infra/demo12/components/Demo12StudentContactForm.vue @@ -1,5 +1,155 @@ \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentContactList.vue b/src/views/infra/demo12/components/Demo12StudentContactList.vue index 65ed9df1..b9b1e717 100644 --- a/src/views/infra/demo12/components/Demo12StudentContactList.vue +++ b/src/views/infra/demo12/components/Demo12StudentContactList.vue @@ -1,6 +1,14 @@ \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue b/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue index d71f6146..92e2b373 100644 --- a/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue +++ b/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue @@ -1,5 +1,155 @@ \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherList.vue b/src/views/infra/demo12/components/Demo12StudentTeacherList.vue index 55f6845b..d0594534 100644 --- a/src/views/infra/demo12/components/Demo12StudentTeacherList.vue +++ b/src/views/infra/demo12/components/Demo12StudentTeacherList.vue @@ -1,6 +1,14 @@ \ No newline at end of file diff --git a/src/views/infra/demo12/index.vue b/src/views/infra/demo12/index.vue index c5a82a4c..47ec7f21 100644 --- a/src/views/infra/demo12/index.vue +++ b/src/views/infra/demo12/index.vue @@ -94,7 +94,14 @@ - + @@ -157,6 +164,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/infra/demo01/index.vue b/src/views/infra/demo/demo01/index.vue similarity index 72% rename from src/views/infra/demo01/index.vue rename to src/views/infra/demo/demo01/index.vue index fb35b561..55751e1b 100644 --- a/src/views/infra/demo01/index.vue +++ b/src/views/infra/demo/demo01/index.vue @@ -17,16 +17,6 @@ class="!w-240px" /> - - - - - - - - 新增 @@ -84,7 +59,7 @@ plain @click="handleExport" :loading="exportLoading" - v-hasPermi="['infra:demo01-student:export']" + v-hasPermi="['infra:demo01-contact:export']" > 导出 @@ -97,26 +72,20 @@ - - - - + + - - 编辑 @@ -138,7 +107,7 @@ link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['infra:demo01-student:delete']" + v-hasPermi="['infra:demo01-contact:delete']" > 删除 @@ -155,32 +124,29 @@ - + + +/** 获得示例分类树 */ +const getDemo02CategoryTree = async () => { + demo02CategoryTree.value = [] + const data = await Demo02CategoryApi.getDemo02CategoryList() + const root: Tree = { id: 0, name: '顶级示例分类', children: [] } + root.children = handleTree(data, 'id', 'parentId') + demo02CategoryTree.value.push(root) +} + \ No newline at end of file diff --git a/src/views/infra/demo02/index.vue b/src/views/infra/demo/demo02/index.vue similarity index 51% rename from src/views/infra/demo02/index.vue rename to src/views/infra/demo/demo02/index.vue index 89fd656b..e46c77dc 100644 --- a/src/views/infra/demo02/index.vue +++ b/src/views/infra/demo/demo02/index.vue @@ -8,10 +8,35 @@ :inline="true" label-width="68px" > + + + + + + 搜索 重置 - + 新增 导出 + + 展开/折叠 + - + + + + \ No newline at end of file diff --git a/src/views/infra/demo02/DemoStudentAddressForm.vue b/src/views/infra/demo02/DemoStudentAddressForm.vue deleted file mode 100644 index 6d031406..00000000 --- a/src/views/infra/demo02/DemoStudentAddressForm.vue +++ /dev/null @@ -1,126 +0,0 @@ - - diff --git a/src/views/infra/demo02/DemoStudentContactForm.vue b/src/views/infra/demo02/DemoStudentContactForm.vue deleted file mode 100644 index 5f173f14..00000000 --- a/src/views/infra/demo02/DemoStudentContactForm.vue +++ /dev/null @@ -1,177 +0,0 @@ - - diff --git a/src/views/infra/demo02/bak/DemoStudentAddressForm.vue b/src/views/infra/demo02/bak/DemoStudentAddressForm.vue deleted file mode 100644 index af4cd8f1..00000000 --- a/src/views/infra/demo02/bak/DemoStudentAddressForm.vue +++ /dev/null @@ -1,58 +0,0 @@ - - From 9aca49c1ffb1344f5416d793e6c9edc56179ffab Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 16 Nov 2023 23:24:03 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E4=B8=BB=E5=AD=90=E8=A1=A8=20normal?= =?UTF-8?q?=20=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 @@ - - From 6c405ba42039fd849a387e53df0799419d7a6000 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 16 Nov 2023 23:48:20 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E4=B8=BB=E5=AD=90=E8=A1=A8=20inner?= =?UTF-8?q?=20=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/inner/index.ts | 53 ++++ src/api/infra/demo11/index.ts | 57 ---- src/api/infra/demo12/index.ts | 95 ------ .../demo03/inner/Demo03StudentForm.vue} | 116 ++++---- .../inner/components/Demo03CourseForm.vue | 100 +++++++ .../inner/components/Demo03CourseList.vue | 51 ++++ .../inner/components/Demo03GradeForm.vue | 72 +++++ .../inner/components/Demo03GradeList.vue | 55 ++++ .../{demo11 => demo/demo03/inner}/index.vue | 90 +++--- .../infra/demo04/DemoStudentAddressForm.vue | 58 ---- .../infra/demo04/DemoStudentAddressList.vue | 39 --- .../infra/demo04/DemoStudentContactForm.vue | 96 ------ .../infra/demo04/DemoStudentContactList.vue | 70 ----- src/views/infra/demo04/DemoStudentForm.vue | 132 --------- src/views/infra/demo04/index.vue | 184 ------------ src/views/infra/demo11/Demo11StudentForm.vue | 183 ------------ .../components/Demo11StudentContactForm.vue | 174 ----------- .../components/Demo11StudentTeacherForm.vue | 122 -------- src/views/infra/demo12/Demo12StudentForm.vue | 183 ------------ .../components/Demo12StudentContactList.vue | 148 ---------- .../components/Demo12StudentTeacherForm.vue | 155 ---------- .../components/Demo12StudentTeacherList.vue | 148 ---------- src/views/infra/demo12/index.vue | 278 ------------------ src/views/infra/testDemo/index.vue | 4 - 24 files changed, 423 insertions(+), 2240 deletions(-) create mode 100644 src/api/infra/demo/demo03/inner/index.ts delete mode 100644 src/api/infra/demo11/index.ts delete mode 100644 src/api/infra/demo12/index.ts rename src/views/infra/{demo12/components/Demo12StudentContactForm.vue => demo/demo03/inner/Demo03StudentForm.vue} (61%) create mode 100644 src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue create mode 100644 src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue create mode 100644 src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue create mode 100644 src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue rename src/views/infra/{demo11 => demo/demo03/inner}/index.vue (74%) delete mode 100644 src/views/infra/demo04/DemoStudentAddressForm.vue delete mode 100644 src/views/infra/demo04/DemoStudentAddressList.vue delete mode 100644 src/views/infra/demo04/DemoStudentContactForm.vue delete mode 100644 src/views/infra/demo04/DemoStudentContactList.vue delete mode 100644 src/views/infra/demo04/DemoStudentForm.vue delete mode 100644 src/views/infra/demo04/index.vue delete mode 100644 src/views/infra/demo11/Demo11StudentForm.vue delete mode 100644 src/views/infra/demo11/components/Demo11StudentContactForm.vue delete mode 100644 src/views/infra/demo11/components/Demo11StudentTeacherForm.vue delete mode 100644 src/views/infra/demo12/Demo12StudentForm.vue delete mode 100644 src/views/infra/demo12/components/Demo12StudentContactList.vue delete mode 100644 src/views/infra/demo12/components/Demo12StudentTeacherForm.vue delete mode 100644 src/views/infra/demo12/components/Demo12StudentTeacherList.vue delete mode 100644 src/views/infra/demo12/index.vue delete mode 100644 src/views/infra/testDemo/index.vue diff --git a/src/api/infra/demo/demo03/inner/index.ts b/src/api/infra/demo/demo03/inner/index.ts new file mode 100644 index 00000000..f15ee1dc --- /dev/null +++ b/src/api/infra/demo/demo03/inner/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/api/infra/demo11/index.ts b/src/api/infra/demo11/index.ts deleted file mode 100644 index 4c4c7b4e..00000000 --- a/src/api/infra/demo11/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -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/api/infra/demo12/index.ts b/src/api/infra/demo12/index.ts deleted file mode 100644 index 3f2be47e..00000000 --- a/src/api/infra/demo12/index.ts +++ /dev/null @@ -1,95 +0,0 @@ -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 getDemo12StudentContactPage = async (params) => { - return await request.get({ url: `/infra/demo12-student/demo12-student-contact/page`, params }) -} -// 新增学生联系人 -export const createDemo12StudentContact = async (data) => { - return await request.post({ url: `/infra/demo12-student/demo12-student-contact/create`, data }) -} - -// 修改学生联系人 -export const updateDemo12StudentContact = async (data) => { - return await request.put({ url: `/infra/demo12-student/demo12-student-contact/update`, data }) -} - -// 删除学生联系人 -export const deleteDemo12StudentContact = async (id: number) => { - return await request.delete({ url: `/infra/demo12-student/demo12-student-contact/delete?id=` + id }) -} - -// 获得学生联系人 -export const getDemo12StudentContact = async (id: number) => { - return await request.get({ url: `/infra/demo12-student/demo12-student-contact/get?id=` + id }) -} - -// ==================== 子表(学生班主任) ==================== - -// 获得学生班主任分页 -export const getDemo12StudentTeacherPage = async (params) => { - return await request.get({ url: `/infra/demo12-student/demo12-student-teacher/page`, params }) -} -// 新增学生班主任 -export const createDemo12StudentTeacher = async (data) => { - return await request.post({ url: `/infra/demo12-student/demo12-student-teacher/create`, data }) -} - -// 修改学生班主任 -export const updateDemo12StudentTeacher = async (data) => { - return await request.put({ url: `/infra/demo12-student/demo12-student-teacher/update`, data }) -} - -// 删除学生班主任 -export const deleteDemo12StudentTeacher = async (id: number) => { - return await request.delete({ url: `/infra/demo12-student/demo12-student-teacher/delete?id=` + id }) -} - -// 获得学生班主任 -export const getDemo12StudentTeacher = async (id: number) => { - return await request.get({ url: `/infra/demo12-student/demo12-student-teacher/get?id=` + id }) -} \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentContactForm.vue b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue similarity index 61% rename from src/views/infra/demo12/components/Demo12StudentContactForm.vue rename to src/views/infra/demo/demo03/inner/Demo03StudentForm.vue index e246678b..fe9327b9 100644 --- a/src/views/infra/demo12/components/Demo12StudentContactForm.vue +++ b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue @@ -10,8 +10,16 @@ - - + + + + {{ dict.label }} + + - - - - - - - - - {{ dict.label }} - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue b/src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue new file mode 100644 index 00000000..d912fc5d --- /dev/null +++ b/src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue @@ -0,0 +1,51 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue b/src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue new file mode 100644 index 00000000..e0eeb192 --- /dev/null +++ b/src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue @@ -0,0 +1,72 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue b/src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue new file mode 100644 index 00000000..96905414 --- /dev/null +++ b/src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue @@ -0,0 +1,55 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo11/index.vue b/src/views/infra/demo/demo03/inner/index.vue similarity index 74% rename from src/views/infra/demo11/index.vue rename to src/views/infra/demo/demo03/inner/index.vue index 36529eb9..4ce6037d 100644 --- a/src/views/infra/demo11/index.vue +++ b/src/views/infra/demo/demo03/inner/index.vue @@ -17,16 +17,6 @@ class="!w-240px" /> - - - - - - - - 新增 @@ -84,7 +59,7 @@ plain @click="handleExport" :loading="exportLoading" - v-hasPermi="['infra:demo11-student:export']" + v-hasPermi="['infra:demo03-student:export']" > 导出 @@ -95,9 +70,26 @@ + + + + - + + + - - - - - - - - - + 编辑 @@ -139,7 +119,7 @@ link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['infra:demo11-student:delete']" + v-hasPermi="['infra:demo03-student:delete']" > 删除 @@ -156,32 +136,32 @@ - + diff --git a/src/views/infra/demo04/DemoStudentAddressList.vue b/src/views/infra/demo04/DemoStudentAddressList.vue deleted file mode 100644 index 92143456..00000000 --- a/src/views/infra/demo04/DemoStudentAddressList.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/src/views/infra/demo04/DemoStudentContactForm.vue b/src/views/infra/demo04/DemoStudentContactForm.vue deleted file mode 100644 index c8744eb0..00000000 --- a/src/views/infra/demo04/DemoStudentContactForm.vue +++ /dev/null @@ -1,96 +0,0 @@ - - diff --git a/src/views/infra/demo04/DemoStudentContactList.vue b/src/views/infra/demo04/DemoStudentContactList.vue deleted file mode 100644 index b944c407..00000000 --- a/src/views/infra/demo04/DemoStudentContactList.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - diff --git a/src/views/infra/demo04/DemoStudentForm.vue b/src/views/infra/demo04/DemoStudentForm.vue deleted file mode 100644 index fe0788c4..00000000 --- a/src/views/infra/demo04/DemoStudentForm.vue +++ /dev/null @@ -1,132 +0,0 @@ - - diff --git a/src/views/infra/demo04/index.vue b/src/views/infra/demo04/index.vue deleted file mode 100644 index 9a6b8bfe..00000000 --- a/src/views/infra/demo04/index.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - diff --git a/src/views/infra/demo11/Demo11StudentForm.vue b/src/views/infra/demo11/Demo11StudentForm.vue deleted file mode 100644 index 39c21a2b..00000000 --- a/src/views/infra/demo11/Demo11StudentForm.vue +++ /dev/null @@ -1,183 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/infra/demo11/components/Demo11StudentContactForm.vue b/src/views/infra/demo11/components/Demo11StudentContactForm.vue deleted file mode 100644 index ba900017..00000000 --- a/src/views/infra/demo11/components/Demo11StudentContactForm.vue +++ /dev/null @@ -1,174 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue b/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue deleted file mode 100644 index a8697be1..00000000 --- a/src/views/infra/demo11/components/Demo11StudentTeacherForm.vue +++ /dev/null @@ -1,122 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/infra/demo12/Demo12StudentForm.vue b/src/views/infra/demo12/Demo12StudentForm.vue deleted file mode 100644 index af4e2733..00000000 --- a/src/views/infra/demo12/Demo12StudentForm.vue +++ /dev/null @@ -1,183 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentContactList.vue b/src/views/infra/demo12/components/Demo12StudentContactList.vue deleted file mode 100644 index b9b1e717..00000000 --- a/src/views/infra/demo12/components/Demo12StudentContactList.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue b/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue deleted file mode 100644 index 92e2b373..00000000 --- a/src/views/infra/demo12/components/Demo12StudentTeacherForm.vue +++ /dev/null @@ -1,155 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/infra/demo12/components/Demo12StudentTeacherList.vue b/src/views/infra/demo12/components/Demo12StudentTeacherList.vue deleted file mode 100644 index d0594534..00000000 --- a/src/views/infra/demo12/components/Demo12StudentTeacherList.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/infra/demo12/index.vue b/src/views/infra/demo12/index.vue deleted file mode 100644 index 47ec7f21..00000000 --- a/src/views/infra/demo12/index.vue +++ /dev/null @@ -1,278 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/infra/testDemo/index.vue b/src/views/infra/testDemo/index.vue deleted file mode 100644 index ca6a5b07..00000000 --- a/src/views/infra/testDemo/index.vue +++ /dev/null @@ -1,4 +0,0 @@ - - From a42d0695fec0e2831c5b3b09593c93059ce67703 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 17 Nov 2023 13:21:17 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E4=B8=BB=E5=AD=90=E8=A1=A8=20erp=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/erp/index.ts | 91 +++++++ .../demo/demo03/erp/Demo03StudentForm.vue | 121 +++++++++ .../erp/components/Demo03CourseForm.vue | 99 +++++++ .../erp/components/Demo03CourseList.vue | 126 +++++++++ .../demo03/erp/components/Demo03GradeForm.vue | 99 +++++++ .../demo03/erp/components/Demo03GradeList.vue | 126 +++++++++ src/views/infra/demo/demo03/erp/index.vue | 243 ++++++++++++++++++ 7 files changed, 905 insertions(+) create mode 100644 src/api/infra/demo/demo03/erp/index.ts create mode 100644 src/views/infra/demo/demo03/erp/Demo03StudentForm.vue create mode 100644 src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue create mode 100644 src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue create mode 100644 src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue create mode 100644 src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue create mode 100644 src/views/infra/demo/demo03/erp/index.vue diff --git a/src/api/infra/demo/demo03/erp/index.ts b/src/api/infra/demo/demo03/erp/index.ts new file mode 100644 index 00000000..d408b630 --- /dev/null +++ b/src/api/infra/demo/demo03/erp/index.ts @@ -0,0 +1,91 @@ +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 getDemo03CoursePage = async (params) => { + return await request.get({ url: `/infra/demo03-student/demo03-course/page`, params }) +} +// 新增学生课程 +export const createDemo03Course = async (data) => { + return await request.post({ url: `/infra/demo03-student/demo03-course/create`, data }) +} + +// 修改学生课程 +export const updateDemo03Course = async (data) => { + return await request.put({ url: `/infra/demo03-student/demo03-course/update`, data }) +} + +// 删除学生课程 +export const deleteDemo03Course = async (id: number) => { + return await request.delete({ url: `/infra/demo03-student/demo03-course/delete?id=` + id }) +} + +// 获得学生课程 +export const getDemo03Course = async (id: number) => { + return await request.get({ url: `/infra/demo03-student/demo03-course/get?id=` + id }) +} + +// ==================== 子表(学生班级) ==================== + +// 获得学生班级分页 +export const getDemo03GradePage = async (params) => { + return await request.get({ url: `/infra/demo03-student/demo03-grade/page`, params }) +} +// 新增学生班级 +export const createDemo03Grade = async (data) => { + return await request.post({ url: `/infra/demo03-student/demo03-grade/create`, data }) +} + +// 修改学生班级 +export const updateDemo03Grade = async (data) => { + return await request.put({ url: `/infra/demo03-student/demo03-grade/update`, data }) +} + +// 删除学生班级 +export const deleteDemo03Grade = async (id: number) => { + return await request.delete({ url: `/infra/demo03-student/demo03-grade/delete?id=` + id }) +} + +// 获得学生班级 +export const getDemo03Grade = async (id: number) => { + return await request.get({ url: `/infra/demo03-student/demo03-grade/get?id=` + id }) +} \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue new file mode 100644 index 00000000..29f1370d --- /dev/null +++ b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue @@ -0,0 +1,121 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue b/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue new file mode 100644 index 00000000..de1c06de --- /dev/null +++ b/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue @@ -0,0 +1,99 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue new file mode 100644 index 00000000..7e06ee64 --- /dev/null +++ b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue b/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue new file mode 100644 index 00000000..abba0032 --- /dev/null +++ b/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue @@ -0,0 +1,99 @@ + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue b/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue new file mode 100644 index 00000000..b12f1889 --- /dev/null +++ b/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/src/views/infra/demo/demo03/erp/index.vue b/src/views/infra/demo/demo03/erp/index.vue new file mode 100644 index 00000000..8fdc7b42 --- /dev/null +++ b/src/views/infra/demo/demo03/erp/index.vue @@ -0,0 +1,243 @@ + + + \ No newline at end of file