1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-08 17:40:23 +08:00

Update README.md

This commit is contained in:
源文雨
2023-06-14 22:08:20 +08:00
committed by GitHub
parent df8fa18996
commit 1001a15b6e

236
README.md
View File

@@ -1,163 +1,73 @@
# paper-manager
面向教师的试卷网络管理系统基于Golang+vben。项目由前端后端两大部分组成没有中间件。
# main.go
统合前后端为单一可执行文件静态访问交给前端API部分则转交后端处理。
## 参数
- **-l**: 设置监听地址与端口
## 监听处理点位
- **/api/\*\*\***: 所有信令 API
- **/file/\*\*\***: 所有上传的文件(动态文件)
- **/upload**: 上传文件接口,上传的文件会统一存至`./data/file/`以供访问
# 前端
> 位于`frontend`文件夹
基于`vben`编写前端页面并编译为静态文件以供`main.go`嵌入。
## 登录页 /login
### 登录
输入账号密码登录。登录成功后,前端将查询并缓存用户名、权限、头像、简介等信息备用,同时导航到指定的家页面。
- **课程组长**:导航到分析页`/dashboard/analysis`
- **其他人**:导航到工作台`/dashboard/workbench`
> 登录时将依次访问`/api/getLoginSalt` `/api/login` `/api/getUserInfo`
![login screen](https://user-images.githubusercontent.com/41315874/226117983-c1e69916-def0-4746-939a-5041412b755f.png)
### 忘记密码
点击`忘记密码`后填写用户名与手机号码,再点击`重置`,即可将重置消息报告给课程组长,由课程组长电话联系确认无误后,在系统中批准进行密码重置。
> 上报消息时访问`/api/resetPassword`
<table>
<tr>
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/226824943-4b8f8a24-4393-4c90-bd27-f7ca38e8f01c.png"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/226824951-ae61494c-d6ce-4358-8fa3-f6b24eee3afc.png"></td>
</tr>
<tr>
<td align="center">填写信息</td>
<td align="center">上报消息</td>
</tr>
</table>
### 注册
点击`注册`后填写用户名、手机号与密码,再点击`注册`,即可将注册消息报告给课程组长,由课程组长电话联系确认无误后,在系统中批准以所填信息创建账号。
> 上报消息时访问`/api/register`
<table>
<tr>
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/226804117-40cfe055-d4ca-440f-9129-1599a126f520.png"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/226804339-936e38df-e8ea-4d85-a29f-75f191538fee.png"></td>
</tr>
<tr>
<td align="center">填写信息</td>
<td align="center">上报消息</td>
</tr>
</table>
## 个人设置 /settings
<img align="right" src="https://user-images.githubusercontent.com/41315874/226120888-ce79c227-7f0f-4681-ab74-99ce4433d768.png" alt="settings" />
个人设置位于右上角状态栏头像的下拉列表中,点击后即可对用户自己的信息进行设置。
### 基本设置
对用户的昵称、个人简介与头像进行自定义设置。
> 上传头像时访问`/upload`
> 保存设置时访问`/api/setUserInfo`
![base setting](https://user-images.githubusercontent.com/41315874/226120541-e2cc77e7-6601-49bb-8f8e-fe6d348f210b.png)
### 安全设置
对用户的密码、联系方式进行修改。
- **密码**:导航至`/settings/password`进行设置,成功后将自动退出当前登录,同时在系统消息中通知课程组长。
- **联系方式**:导航至`/settings/contact`进行设置,成功后会在系统消息中通知课程组长。
> 设置密码时访问`/api/setPassword`
> 设置联系方式时访问`/api/setContact`
![secure setting](https://user-images.githubusercontent.com/41315874/226120560-83a8fa95-f2db-4202-8aee-a99c32b55b43.png)
## 注销
<img align="right" src="https://user-images.githubusercontent.com/41315874/226120865-9f8d57bf-3884-420e-9ff6-008f50fb52d6.png" alt="logout" />
该功能位于右上角状态栏头像的下拉列表中,点击`退出系统`后即可注销登录。
> 注销时访问`/api/logout`
## 仪表板/分析页 /dashboard/analysis
此页仅课程组长可见,向课程组长展示近一年的访问量信息。
> 载入时访问`/api/getAnnualVisits`
![analysis](https://user-images.githubusercontent.com/41315874/226802920-f6b43a7b-6191-4dcb-9f48-364c161c1cfd.png)
## 仪表板/工作台 /dashboard/workbench
显示用户收到的消息,用户可以选择`删除`已读消息。对于课程组长,还提供对`注册``重置密码`消息的快捷处理按钮`接受`,可以快速执行相应操作。下面是一个演示。
> 载入时访问`/api/getUsersCount` `/api/getMessageList`
> 处理消息时访问`/api/acceptMessage` `/api/delMessage`
### 1. 课程组长工作台
> 登入系统,修改了自己的信息,又收到了两个用户的注册请求
![workbench demo 1](https://user-images.githubusercontent.com/41315874/226808521-92b2a857-4b56-4185-b654-759e2d43d415.png)
### 2. 课程组长工作台
> 接受2人注册请求
![workbench demo 2](https://user-images.githubusercontent.com/41315874/226808582-ebea1c32-a69f-4054-8b46-8f3f5799eb9f.png)
### 3. A老师(filemgr)工作台
> 课程组长接受注册申请后,更改了个人信息
![workbench demo 3](https://user-images.githubusercontent.com/41315874/226806112-344bafc1-70f1-4408-bcd0-2cd6896c7269.png)
### 4. B老师(user)工作台
> 课程组长接受注册申请后,更改了个人信息和联系方式
![workbench demo 4](https://user-images.githubusercontent.com/41315874/226806143-ce5a833a-f30d-4f51-945e-bf4b83459758.png)
### 5. 课程组长工作台
> 最终的消息状态
![workbench demo 5](https://user-images.githubusercontent.com/41315874/226811656-a6e4238f-2dbe-4a49-a50f-3d2075838cb8.png)
## 仪表板/用户管理 /dashboard/account
此页仅课程组长可见,提供用户管理功能,可以禁用用户、编辑用户权限和信息。下面是一个管理用户的例子。
> 载入时访问`/api/getUsersList`
> 禁用账户时访问`/api/disableUser`
> 设置用户信息时访问`/api/setUserInfo`
> 设置用户权限时访问`/api/setRole`
### 1. 上一板块演示后的用户管理界面状态
![account demo 1](https://user-images.githubusercontent.com/41315874/226825676-e943d841-eb5f-4292-b4d5-a7f91cf48962.png)
### 2. 课程组长编辑filemgr用户的信息
![account demo 2](https://user-images.githubusercontent.com/41315874/226825963-0f4c70aa-d1ec-4215-a7ed-d81c540a66d4.png)
### 3. A老师(filemgr)工作台上的显示
![account demo 3](https://user-images.githubusercontent.com/41315874/226826317-daa537a7-abaf-44b0-9377-d057573223cd.png)
### 4. 课程组长禁用filemgr用户
![account demo 4](https://user-images.githubusercontent.com/41315874/226826425-66a42bcf-5a5a-455c-8aad-1117b7c3ccae.png)
### 5. filemgr用户无法登陆
![account demo 5](https://user-images.githubusercontent.com/41315874/226826516-cfdc18c7-f59f-4759-a008-7baca34f1a30.png)
### 6. filemgr用户通过重置密码向课程组长发出恢复账号申请
![account demo 6](https://user-images.githubusercontent.com/41315874/226826700-99e8a639-58db-499f-9629-756fc5e5e49f.png)
### 7. 课程组长接受申请
![account demo 7](https://user-images.githubusercontent.com/41315874/226826829-6dec3a7a-8386-4d33-aa6e-cea26cc846e9.png)
### 8. A老师(filemgr)成功登录进入工作台
![account demo 8](https://user-images.githubusercontent.com/41315874/226826932-2c365095-a35e-477f-ace7-a98452c24db4.png)
### 9. 课程组长将A老师(filemgr)的权限更改为归档代理
![account demo 9.1](https://user-images.githubusercontent.com/41315874/226829571-b390de2c-00ec-4e8d-a045-4a6edf3ae3b9.png)
![account demo 9.2](https://user-images.githubusercontent.com/41315874/226829577-1ff58c51-c816-4681-b758-c41bf4bf679f.png)
### 10. A老师(filemgr)工作台的显示
![account demo 10](https://user-images.githubusercontent.com/41315874/226829706-40c0f1d0-73d7-4752-948b-79cd709a6949.png)
## 试卷库 /filelist
# 后端
> 位于`backend`文件夹
基于标准`http`不用重框架负责提供各种API。
![试卷网络管理系统的设计与实现0 6 0gh_页面_01](https://github.com/fumiama/paper-manager/assets/41315874/2021da2b-95c4-46b2-9553-45e0324abec4)
![试卷网络管理系统的设计与实现0 6 0gh_页面_02](https://github.com/fumiama/paper-manager/assets/41315874/d1786ab5-0176-41a2-95b9-c2b4c7201f3b)
![试卷网络管理系统的设计与实现0 6 0gh_页面_03](https://github.com/fumiama/paper-manager/assets/41315874/1d6da7d2-15df-432a-851c-be383a200314)
![试卷网络管理系统的设计与实现0 6 0gh_页面_04](https://github.com/fumiama/paper-manager/assets/41315874/bc20c23d-e1a7-4025-8e82-57073b588701)
![试卷网络管理系统的设计与实现0 6 0gh_页面_05](https://github.com/fumiama/paper-manager/assets/41315874/39f2bc80-d090-46d6-b2ed-0a491a770a0c)
![试卷网络管理系统的设计与实现0 6 0gh_页面_06](https://github.com/fumiama/paper-manager/assets/41315874/ded6d81b-e751-45ff-9bf0-583446b1a201)
![试卷网络管理系统的设计与实现0 6 0gh_页面_07](https://github.com/fumiama/paper-manager/assets/41315874/58bba437-c852-424e-bce4-b853c372f73d)
![试卷网络管理系统的设计与实现0 6 0gh_页面_08](https://github.com/fumiama/paper-manager/assets/41315874/a104e0c2-969c-4b48-9254-1d9945cc456e)
![试卷网络管理系统的设计与实现0 6 0gh_页面_09](https://github.com/fumiama/paper-manager/assets/41315874/a9c1c072-baa0-4c10-81ce-6ecbdbf2f627)
![试卷网络管理系统的设计与实现0 6 0gh_页面_10](https://github.com/fumiama/paper-manager/assets/41315874/65a4dde3-d522-41b3-90ec-7fac7411e9d2)
![试卷网络管理系统的设计与实现0 6 0gh_页面_11](https://github.com/fumiama/paper-manager/assets/41315874/e6673dd1-d246-45b7-95d2-10622d8a1c7d)
![试卷网络管理系统的设计与实现0 6 0gh_页面_12](https://github.com/fumiama/paper-manager/assets/41315874/2b053d6b-521f-4020-bb61-7df16ce802ca)
![试卷网络管理系统的设计与实现0 6 0gh_页面_13](https://github.com/fumiama/paper-manager/assets/41315874/d5c7e57f-796d-4669-ba34-2d95c69033b0)
![试卷网络管理系统的设计与实现0 6 0gh_页面_14](https://github.com/fumiama/paper-manager/assets/41315874/73452f47-1305-476c-bec6-9cc4975a1f3c)
![试卷网络管理系统的设计与实现0 6 0gh_页面_15](https://github.com/fumiama/paper-manager/assets/41315874/11069ce2-dd74-462c-a24e-a128c725c7ba)
![试卷网络管理系统的设计与实现0 6 0gh_页面_16](https://github.com/fumiama/paper-manager/assets/41315874/c0b8f069-e4f2-47c2-881a-7cb62ed82afd)
![试卷网络管理系统的设计与实现0 6 0gh_页面_17](https://github.com/fumiama/paper-manager/assets/41315874/44c30bf6-7be3-4a56-b077-33e2ba80eda5)
![试卷网络管理系统的设计与实现0 6 0gh_页面_18](https://github.com/fumiama/paper-manager/assets/41315874/7275e157-dd48-4de1-ae8e-870e7f359f8b)
![试卷网络管理系统的设计与实现0 6 0gh_页面_19](https://github.com/fumiama/paper-manager/assets/41315874/90de4543-a333-430c-9be7-10cff6a38096)
![试卷网络管理系统的设计与实现0 6 0gh_页面_20](https://github.com/fumiama/paper-manager/assets/41315874/11fd2178-f044-4363-a083-aa7d051f5cb7)
![试卷网络管理系统的设计与实现0 6 0gh_页面_21](https://github.com/fumiama/paper-manager/assets/41315874/84beda7a-59bf-4c2f-b0b0-c3053f781c31)
![试卷网络管理系统的设计与实现0 6 0gh_页面_22](https://github.com/fumiama/paper-manager/assets/41315874/96c2e036-c709-4c9e-864b-39f8978ee291)
![试卷网络管理系统的设计与实现0 6 0gh_页面_23](https://github.com/fumiama/paper-manager/assets/41315874/52c66bcf-560d-4a22-9643-b5756e80e607)
![试卷网络管理系统的设计与实现0 6 0gh_页面_24](https://github.com/fumiama/paper-manager/assets/41315874/1bfd34cb-2f27-456a-b692-20d0d9f62ad4)
![试卷网络管理系统的设计与实现0 6 0gh_页面_25](https://github.com/fumiama/paper-manager/assets/41315874/c1f1f38d-c58d-4c3b-8aae-85112275b345)
![试卷网络管理系统的设计与实现0 6 0gh_页面_26](https://github.com/fumiama/paper-manager/assets/41315874/7f55a64b-ac6b-4fd1-b1c8-ef0e103d54bf)
![试卷网络管理系统的设计与实现0 6 0gh_页面_27](https://github.com/fumiama/paper-manager/assets/41315874/741e044b-ed2e-45c8-9535-d3b320518750)
![试卷网络管理系统的设计与实现0 6 0gh_页面_28](https://github.com/fumiama/paper-manager/assets/41315874/8d07281c-0b78-428a-a09b-0511072137a3)
![试卷网络管理系统的设计与实现0 6 0gh_页面_29](https://github.com/fumiama/paper-manager/assets/41315874/6d5d1f5b-8f45-4f11-8462-11fd88061be7)
![试卷网络管理系统的设计与实现0 6 0gh_页面_30](https://github.com/fumiama/paper-manager/assets/41315874/1447c59b-24bb-4425-99e4-9e66e160e853)
![试卷网络管理系统的设计与实现0 6 0gh_页面_31](https://github.com/fumiama/paper-manager/assets/41315874/a040b9be-81e2-4acb-bfa3-26b87915ff43)
![试卷网络管理系统的设计与实现0 6 0gh_页面_32](https://github.com/fumiama/paper-manager/assets/41315874/8cfe1f94-5dd9-4f54-bb25-eb51c76b4f1e)
![试卷网络管理系统的设计与实现0 6 0gh_页面_33](https://github.com/fumiama/paper-manager/assets/41315874/2cb2cc8b-3025-4ada-86fa-bada4c20baf2)
![试卷网络管理系统的设计与实现0 6 0gh_页面_34](https://github.com/fumiama/paper-manager/assets/41315874/35544551-fc15-4e0c-81bb-a4cb8afd33de)
![试卷网络管理系统的设计与实现0 6 0gh_页面_35](https://github.com/fumiama/paper-manager/assets/41315874/ef0285fc-15ef-43b6-9b61-2e459b983d97)
![试卷网络管理系统的设计与实现0 6 0gh_页面_36](https://github.com/fumiama/paper-manager/assets/41315874/cecc3eaf-c560-4197-bb33-824f5cf62866)
![试卷网络管理系统的设计与实现0 6 0gh_页面_37](https://github.com/fumiama/paper-manager/assets/41315874/8e88cdc2-44ca-4963-9cd3-d0611bc70957)
![试卷网络管理系统的设计与实现0 6 0gh_页面_38](https://github.com/fumiama/paper-manager/assets/41315874/6656c657-6913-4e04-bec6-3e54384443fa)
![试卷网络管理系统的设计与实现0 6 0gh_页面_39](https://github.com/fumiama/paper-manager/assets/41315874/6ae097b2-aecc-497f-b045-b00098cc710a)
![试卷网络管理系统的设计与实现0 6 0gh_页面_40](https://github.com/fumiama/paper-manager/assets/41315874/d6e9a52a-7621-4582-a3a2-c09a11025f4f)
![试卷网络管理系统的设计与实现0 6 0gh_页面_41](https://github.com/fumiama/paper-manager/assets/41315874/f3a7d510-cfb1-4f06-8094-169d71530cfc)
![试卷网络管理系统的设计与实现0 6 0gh_页面_42](https://github.com/fumiama/paper-manager/assets/41315874/bfeaee7a-1fd1-486d-a492-ce77b79c36a9)
![试卷网络管理系统的设计与实现0 6 0gh_页面_43](https://github.com/fumiama/paper-manager/assets/41315874/9a63e4e2-17d8-476a-a1b2-48796f22c10d)
![试卷网络管理系统的设计与实现0 6 0gh_页面_44](https://github.com/fumiama/paper-manager/assets/41315874/4a915999-3f26-4773-9bd7-efaf1da20002)
![试卷网络管理系统的设计与实现0 6 0gh_页面_45](https://github.com/fumiama/paper-manager/assets/41315874/99857fd7-5608-40af-a5de-727542e64fd5)
![试卷网络管理系统的设计与实现0 6 0gh_页面_46](https://github.com/fumiama/paper-manager/assets/41315874/e5f5a094-0ebd-4d3d-878f-90744d7ca65e)
![试卷网络管理系统的设计与实现0 6 0gh_页面_47](https://github.com/fumiama/paper-manager/assets/41315874/33d0d1d0-b125-4052-8855-4ae020b58e57)
![试卷网络管理系统的设计与实现0 6 0gh_页面_48](https://github.com/fumiama/paper-manager/assets/41315874/75bed67b-75ea-4127-aa6d-86c2640c63b5)
![试卷网络管理系统的设计与实现0 6 0gh_页面_49](https://github.com/fumiama/paper-manager/assets/41315874/0592d96b-1d97-441d-a105-9cbb38c3bc37)
![试卷网络管理系统的设计与实现0 6 0gh_页面_50](https://github.com/fumiama/paper-manager/assets/41315874/a769bee0-06bd-42c7-b0e6-ede683a0f692)
![试卷网络管理系统的设计与实现0 6 0gh_页面_51](https://github.com/fumiama/paper-manager/assets/41315874/6b346053-a782-4259-8427-e539c4e51985)
![试卷网络管理系统的设计与实现0 6 0gh_页面_52](https://github.com/fumiama/paper-manager/assets/41315874/e1032e25-5264-48fc-8394-cd3f59c98686)
![试卷网络管理系统的设计与实现0 6 0gh_页面_53](https://github.com/fumiama/paper-manager/assets/41315874/9c508423-1f32-4714-8d7b-df54149afd57)
![试卷网络管理系统的设计与实现0 6 0gh_页面_54](https://github.com/fumiama/paper-manager/assets/41315874/f06bec64-bf3a-4417-bdbc-86e76595ef70)
![试卷网络管理系统的设计与实现0 6 0gh_页面_55](https://github.com/fumiama/paper-manager/assets/41315874/8f1a7e8f-f809-40fc-b1a1-efafd5bef7e3)
![试卷网络管理系统的设计与实现0 6 0gh_页面_56](https://github.com/fumiama/paper-manager/assets/41315874/8d806f49-2143-41c6-b32f-19bf42ae4d69)
![试卷网络管理系统的设计与实现0 6 0gh_页面_57](https://github.com/fumiama/paper-manager/assets/41315874/e2b66d20-c57a-40fb-b0e1-d638382d61cc)
![试卷网络管理系统的设计与实现0 6 0gh_页面_58](https://github.com/fumiama/paper-manager/assets/41315874/9edf34c1-f31d-4bf3-baac-c1ec5c6290be)
![试卷网络管理系统的设计与实现0 6 0gh_页面_59](https://github.com/fumiama/paper-manager/assets/41315874/0d460acf-f839-407b-92b6-333e828b059e)
![试卷网络管理系统的设计与实现0 6 0gh_页面_60](https://github.com/fumiama/paper-manager/assets/41315874/84c9da38-95fc-4764-b4d7-b0c643e882b3)
![试卷网络管理系统的设计与实现0 6 0gh_页面_61](https://github.com/fumiama/paper-manager/assets/41315874/4d5d45e7-8993-42f9-9587-f64a8b75b9d3)
![试卷网络管理系统的设计与实现0 6 0gh_页面_62](https://github.com/fumiama/paper-manager/assets/41315874/2b8b5e89-bc47-4a4f-b955-8974a45d575f)
![试卷网络管理系统的设计与实现0 6 0gh_页面_63](https://github.com/fumiama/paper-manager/assets/41315874/36f5550e-2448-40a3-a437-dd3da6662554)
![试卷网络管理系统的设计与实现0 6 0gh_页面_64](https://github.com/fumiama/paper-manager/assets/41315874/1bf1aedf-3df5-48ec-91fd-34326f363117)
![试卷网络管理系统的设计与实现0 6 0gh_页面_65](https://github.com/fumiama/paper-manager/assets/41315874/aef5ad7d-5726-49f9-9e8b-7b10c4efafdc)
![试卷网络管理系统的设计与实现0 6 0gh_页面_66](https://github.com/fumiama/paper-manager/assets/41315874/cdabfc40-9e28-4ed3-9739-50299fbfcbbf)
![试卷网络管理系统的设计与实现0 6 0gh_页面_67](https://github.com/fumiama/paper-manager/assets/41315874/4853f610-2938-4026-91d4-a1552b833fc9)
![试卷网络管理系统的设计与实现0 6 0gh_页面_68](https://github.com/fumiama/paper-manager/assets/41315874/28903657-ba63-4ae7-8671-85f03f52897b)
![试卷网络管理系统的设计与实现0 6 0gh_页面_69](https://github.com/fumiama/paper-manager/assets/41315874/7c83020a-f031-4f27-93bb-ac1ed6123684)
![试卷网络管理系统的设计与实现0 6 0gh_页面_70](https://github.com/fumiama/paper-manager/assets/41315874/87823227-24b3-4237-9cd5-653884286792)
![试卷网络管理系统的设计与实现0 6 0gh_页面_71](https://github.com/fumiama/paper-manager/assets/41315874/5eb6471e-592e-4041-a885-a5b48d720e1a)
![试卷网络管理系统的设计与实现0 6 0gh_页面_72](https://github.com/fumiama/paper-manager/assets/41315874/3d117f33-884f-4754-9f1e-d2fba18c1c80)
![试卷网络管理系统的设计与实现0 6 0gh_页面_73](https://github.com/fumiama/paper-manager/assets/41315874/56c52fdc-e9d1-4a96-89db-9298471729c9)