diff --git a/package.json b/package.json index 31fd129..8ea8298 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@electron-toolkit/preload": "^3.0.1", "@electron-toolkit/utils": "^3.0.0", "@element-plus/icons-vue": "^2.3.1", + "@vitejs/plugin-vue-jsx": "^4.0.0", "@vueuse/core": "^10.11.0", "crypto-js": "^4.2.0", "electron-dl-manager": "^3.0.0", @@ -34,8 +35,9 @@ "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "spark-md5": "^3.0.2", - "vue-cropper": "^1.0.3", - "vue-router": "^4.4.0" + "vue-cropper": "^1.1.4", + "vue-router": "^4.4.0", + "xlsx": "^0.18.5" }, "devDependencies": { "@electron-toolkit/eslint-config": "^1.0.2", diff --git a/src/renderer/src/api/classManage/index.js b/src/renderer/src/api/classManage/index.js new file mode 100644 index 0000000..14a8314 --- /dev/null +++ b/src/renderer/src/api/classManage/index.js @@ -0,0 +1,132 @@ +// 查询evaluation列表 +import request from '@/utils/request' +// 查询班级列表 +export function listClassmain(query) { + return request({ + url: '/education/classmain/list', + method: 'get', + params: query + }) +} +// 查询学生列表 +export function listClassuser(query) { + return request({ + url: '/education/classuser/list', + method: 'get', + params: query + }) +} +// 新增班级 +export function addClassmain(data) { + return request({ + url: '/education/classmain', + method: 'post', + data: data + }) +} +// 查询所有学科的列表 +export function listEvaluation(query) { + return request({ + url: '/education/evaluation/list', + method: 'get', + params: query + }) +} +// 新增小组 +export function addClassgroup(data) { + return request({ + url: '/education/classgroup', + method: 'post', + data: data + }) +} +//班级详情 +export function getClassmain(id) { + return request({ + url: '/education/classmain/' + id, + method: 'get' + }) +} +// 获取小组列表 +export function listClassgroup(query) { + return request({ + url: '/education/classgroup/list', + method: 'get', + params: query + }) +} +//删除小组 +export function delClassgroup(id) { + return request({ + url: '/education/classgroup/' + id, + method: 'delete' + }) +} +//查询小组信息 +export function getClassgroup(id) { + return request({ + url: '/education/classgroup/' + id, + method: 'get' + }) +} +//修改小组信息 +export function updateClassgroup(data) { + return request({ + url: '/education/classgroup', + method: 'put', + data: data + }) +} +//新增学生 +export function addStudentmain(data) { + return request({ + url: '/education/studentmain', + method: 'post', + data: data + }) +} +//修改学生信息 +export function updateStudentmain(data) { + return request({ + url: '/education/studentmain', + method: 'put', + data: data + }) +} +//获取学生信息 +export function getStudentmain(id) { + return request({ + url: '/education/studentmain/' + id, + method: 'get' + }) +} +//删除学生 +export function leaveClass(data) { + return request({ + url: '/education/classuser/leaveClass', + method: 'post', + data: data + }) +} +//删除学生所有数据 +export function removeStudentDataAll(id) { + return request({ + url: '/education/studentmain/removeStudent/' + id, + method: 'post' + }) +} +//删除教室 +export function delClassroom(id) { + return request({ + url: '/education/classroom/' + id, + method: 'delete' + }) +} +//导入学生 +export function addStudentmainByNameArray(data) { + return request({ + url: '/education/studentmain/addByNameArray', + method: 'post', + data: data + }) +} diff --git a/src/renderer/src/components/avatar-handle/index.vue b/src/renderer/src/components/avatar-handle/index.vue new file mode 100644 index 0000000..774955f --- /dev/null +++ b/src/renderer/src/components/avatar-handle/index.vue @@ -0,0 +1,75 @@ + + + + + 取消 + + + + + + + + + diff --git a/src/renderer/src/components/classManage/select/index.vue b/src/renderer/src/components/classManage/select/index.vue new file mode 100644 index 0000000..b8959c3 --- /dev/null +++ b/src/renderer/src/components/classManage/select/index.vue @@ -0,0 +1,23 @@ + + + + + + + diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 15351f7..59a69ec 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -25,6 +25,7 @@ 个人中心 + 班级中心 退出登录 diff --git a/src/renderer/src/store/modules/delClass.js b/src/renderer/src/store/modules/delClass.js new file mode 100644 index 0000000..cd91643 --- /dev/null +++ b/src/renderer/src/store/modules/delClass.js @@ -0,0 +1,22 @@ +/* + author: yangws + time: 2024-20-24 17:20:50 + function: 用于删除班级更新主页面 +*/ +import { defineStore } from "pinia" + +const delClassDemo = defineStore( + 'del', + { + state: () => ({ + idDelete: false + }), + actions: { + //删除提醒 + isDelClass(){ + this.idDelete = true + } + } + }) + +export default delClassDemo diff --git a/src/renderer/src/views/classManage/aside.vue b/src/renderer/src/views/classManage/aside.vue new file mode 100644 index 0000000..a6c4370 --- /dev/null +++ b/src/renderer/src/views/classManage/aside.vue @@ -0,0 +1,53 @@ + + + + + + {{item.caption}} + + + {{items.title}} + + + + + + + + + diff --git a/src/renderer/src/views/classManage/basicGroup.vue b/src/renderer/src/views/classManage/basicGroup.vue new file mode 100644 index 0000000..791b6ff --- /dev/null +++ b/src/renderer/src/views/classManage/basicGroup.vue @@ -0,0 +1,417 @@ + + + + + 新建分组 + + + + 可用分组 + + + + + + 小组名称: + + {{item.groupname}} + + + + + 共{{item.studentcount}}名学生 + + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + {{ userStore.edusubject }} + + + 请首先创建小组,完成后再点击进入添加学生 + + + + 取 消 + 确 定 + + + + + + + + + + 已选学生: + + + {{stuItem.studentname}} + {{!stuItem.choose?'设置组长':''}} + + + + + + 未选学生: + + + {{stuItem.name || stuItem.studentname}} + + + + + + + + 取 消 + 确 定 + + + + + + + diff --git a/src/renderer/src/views/classManage/classInfo.vue b/src/renderer/src/views/classManage/classInfo.vue new file mode 100644 index 0000000..f15d02b --- /dev/null +++ b/src/renderer/src/views/classManage/classInfo.vue @@ -0,0 +1,80 @@ + + + + + 删除班级 + + + + {{ classInfo.className }} + + + {{item.name}} + + 暂无 + + {{ classInfo.student.length }}人 + + + + + + + diff --git a/src/renderer/src/views/classManage/index.vue b/src/renderer/src/views/classManage/index.vue new file mode 100644 index 0000000..4ba11ad --- /dev/null +++ b/src/renderer/src/views/classManage/index.vue @@ -0,0 +1,292 @@ + + + + + + + + + + + 新增班级 + + + + + + + + + + + + + + + + + + + + + + + + {{ item.itemtitle }} + + + + + + + {{ item.label }} + + + + + {{ userStore.nickName }} + + + + + + + 取 消 + 确 定 + + + + + + + diff --git a/src/renderer/src/views/classManage/studentList.vue b/src/renderer/src/views/classManage/studentList.vue new file mode 100644 index 0000000..9bc1402 --- /dev/null +++ b/src/renderer/src/views/classManage/studentList.vue @@ -0,0 +1,454 @@ + + + + + + + 新增学生 + 导入学生 + + 点击学生头像查看学生信息 + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + 空缺 + 男生 + 女生 + + + + + + + + + + + + + + + + + + + 系统自动创建 + + + + + 系统自动创建,默认为123123 + + + + + + + 移出班级 + 删除学生 + 取 消 + 确 定 + + + + + + + 下载学生名单的Excel模板 + + + 打开下载到本地的Excel,填写学生的姓名等数据。 + + + + + 将Excel文件拖到此处,或点击上传 + + + + + + {{ item.name }} + + + + + + + + + + + + +