diff --git a/.eslintrc.js b/.eslintrc.js index f2977df6..70c91784 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,7 +21,7 @@ module.exports = defineConfig({ 'plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended', 'prettier', - 'plugin:prettier/recommended', + 'plugin:prettier/recommended', '@unocss' ], rules: { @@ -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