├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── jsconfig.json
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
└── 流程图.png
├── src
├── App.vue
├── api
│ └── api.js
├── assets
│ ├── background.png
│ ├── home
│ │ ├── all-icon.png
│ │ ├── attendance-icon.png
│ │ ├── auth-icon.png
│ │ ├── avatar.png
│ │ ├── background.png
│ │ ├── cloud1.png
│ │ ├── cloud2.png
│ │ ├── cloud3.png
│ │ ├── cloud4.png
│ │ ├── cloud5.png
│ │ ├── home-icon.png
│ │ ├── leave-icon.png
│ │ ├── logout-icon.png
│ │ ├── pass-icon.png
│ │ ├── real-icon.png
│ │ ├── search-icon.png
│ │ └── search-menu.png
│ ├── login
│ │ ├── login-background.png
│ │ ├── login-hover.png
│ │ └── login-image.png
│ └── logo.png
├── components
│ ├── CheckAttendance.vue
│ ├── CheckLeave.vue
│ ├── Course.vue
│ ├── Empower.vue
│ ├── HomePart.vue
│ ├── Overview.vue
│ ├── Sidebar.vue
│ └── Student.vue
├── main.js
├── pages
│ ├── Home.vue
│ ├── Login.vue
│ └── Register.vue
├── router
│ └── index.js
└── utils
│ └── request.js
├── tree.py
└── vue.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 ROBINRUGAN
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UU考勤教师端 - uuAttendance for Teachers
2 |
3 | > 本项目是一个跨平台考勤系统,主要提供课前请假、教师审批、考勤申诉、督导点名、定位签到、指定督导等功能,分为学生端/督导端,和教师端。教师端实现考勤查询、教师审批和督导授权,采用VUE进行开发。
4 | >
5 | > 学生端/督导端App仓库地址:https://github.com/klxiaoniu/UUAttendance
6 | >
7 | > 后端仓库地址:https://github.com/flying-pig-z/uuAttendance
8 | ## 1.UU考勤的流程图
9 |
10 | [](https://github.com/ROBINRUGAN/uu-attendance/blob/main/public/%E6%B5%81%E7%A8%8B%E5%9B%BE.png)
11 |
12 | ## 2.教师端技术栈
13 |
14 | - 使用渐进式框架VUE进行组件化开发,代码可维护性强,性能较好,兼容性强。
15 | - 采用MVVM技术架构实现用户界面和业务逻辑分离。
16 | - 封装Axios,简化网络操作和接口调用,提高代码的可维护性、可读性和可测试性。
17 | - 使用ElementUI,确保了在大规模数据和复杂应用中的高性能,也大大简化前端开发。
18 | - 使用Jszip解析数据,实现考勤数据excel导出功能。
19 |
20 | ## 3.教师端项目目录树
21 |
22 | ```bash
23 | uuAttendance/
24 | ├────dist //打包后的文件
25 | ├────node_modules //所导入的模块
26 | ├────public/ //公共文件
27 | │ ├────favicon.ico
28 | │ └────index.html
29 | ├────README.md //项目说明
30 | ├────src/
31 | │ ├────api/ //封装接口
32 | │ │ └────api.js
33 | │ ├────App.vue //根组件
34 | │ ├────assets/ //静态图片资源
35 | │ │ ├────home/
36 | │ │ └────login/
37 | │ ├────components/ //组件
38 | │ │ ├────CheckAttendance.vue //考勤申诉审核模块
39 | │ │ ├────CheckLeave.vue //请假审核模块
40 | │ │ ├────Course.vue //基于课程的考勤情况查询模块
41 | │ │ ├────Empower.vue //督导指定及授权模块
42 | │ │ ├────HomePart.vue //主页以及快捷导航模块
43 | │ │ ├────Sidebar.vue //侧边栏模块
44 | │ │ └────Student.vue //基于学生的考勤情况查询模块
45 | │ ├────main.js //入口文件
46 | │ ├────pages/ //页面
47 | │ │ ├────Home.vue //整体页面
48 | │ │ ├────Login.vue //登录页面
49 | │ │ └────Register.vue //注册页面
50 | │ ├────router/ //路由封装
51 | │ │ └────index.js
52 | │ └────utils/ //工具类
53 | │ └────request.js //封装axios
54 | ├────.gitignore //git忽略文件
55 | ├────babel.config.js //babel配置文件
56 | ├────jsconfig.json //js配置文件
57 | ├────LICENSE //开源协议
58 | ├────package-lock.json //包版本锁定文件
59 | ├────package.json //包管理文件
60 | └────vue.config.js //vue配置文件
61 | ```
62 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "esnext",
5 | "baseUrl": "./",
6 | "moduleResolution": "node",
7 | "paths": {
8 | "@/*": [
9 | "src/*"
10 | ]
11 | },
12 | "lib": [
13 | "esnext",
14 | "dom",
15 | "dom.iterable",
16 | "scripthost"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "uu-attendance",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^1.5.1",
12 | "core-js": "^3.8.3",
13 | "element-ui": "^2.15.14",
14 | "jszip": "^3.10.1",
15 | "vue": "^2.6.14",
16 | "vue-router": "^3.6.5"
17 | },
18 | "devDependencies": {
19 | "@babel/core": "^7.12.16",
20 | "@babel/eslint-parser": "^7.12.16",
21 | "@vue/cli-plugin-babel": "~5.0.0",
22 | "@vue/cli-plugin-eslint": "~5.0.0",
23 | "@vue/cli-service": "~5.0.0",
24 | "babel-plugin-component": "^1.1.1",
25 | "eslint": "^7.32.0",
26 | "eslint-plugin-vue": "^8.0.3",
27 | "vue-template-compiler": "^2.6.14"
28 | },
29 | "eslintConfig": {
30 | "root": true,
31 | "env": {
32 | "node": true
33 | },
34 | "extends": [
35 | "plugin:vue/essential",
36 | "eslint:recommended"
37 | ],
38 | "parserOptions": {
39 | "parser": "@babel/eslint-parser"
40 | },
41 | "rules": {}
42 | },
43 | "browserslist": [
44 | "> 1%",
45 | "last 2 versions",
46 | "not dead"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | UU考勤 - 多端考勤系统ヾ(≧▽≦*)o
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/public/流程图.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/public/流程图.png
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
42 |
43 |
--------------------------------------------------------------------------------
/src/api/api.js:
--------------------------------------------------------------------------------
1 | import {
2 | service
3 | } from "@/utils/request";
4 |
5 | export function Semester(){
6 | return service.request({
7 | method: "get",
8 | url: `/courseDetails/dataColumn`,
9 | })
10 | }
11 |
12 | export function Login(data) {
13 | return service.request({
14 | method: "post",
15 | url: `/user/login`,
16 | data
17 | })
18 | }
19 | export function Register(data) {
20 | return service.request({
21 | method: "post",
22 | url: `/user/email/register`,
23 | data
24 | })
25 | }
26 | export function GetCode(data) {
27 | return service.request({
28 | method: "get",
29 | url: `/user/email/verificationCode?email=${data.email}`
30 | })
31 | }
32 | export function Logout() {
33 | return service.request({
34 | method: "post",
35 | url: `/user/logout`,
36 | })
37 | }
38 | export function CourseList(data) {
39 | return service.request({
40 | method: "get",
41 | url: `/courseDetails/coursedetailList?semester=${data.semester}`,
42 | })
43 | }
44 |
45 | export function CourseSearch(data) {
46 | const {
47 | courseName,
48 | semester,
49 | week,
50 | weekday,
51 | beginSection,
52 | endSection,
53 | pageSize,
54 | pageNo
55 | } = data;
56 |
57 | // 使用条件运算符来确保查询参数不是undefined
58 | const queryParams = [
59 | `courseName=${courseName}`,
60 | `semester=${semester}`,
61 | `week=${week}`,
62 | `weekday=${weekday}`,
63 | `beginSection=${beginSection}`,
64 | `endSection=${endSection}`,
65 | `pageSize=${pageSize}`,
66 | `pageNo=${pageNo}`,
67 | ].filter(param => param !== undefined).join('&');
68 |
69 | const url = `/courseAttendances/courseAttendanceList?${queryParams}`;
70 |
71 | return service.request({
72 | method: "get",
73 | url: url,
74 | });
75 | }
76 |
77 | export function ExportCourseSearch(data) {
78 | const {
79 | courseName,
80 | semester,
81 | week,
82 | weekday,
83 | beginSection,
84 | endSection
85 | } = data;
86 |
87 | // 使用条件运算符来确保查询参数不是undefined
88 | const queryParams = [
89 | `courseName=${courseName}`,
90 | `semester=${semester}`,
91 | `week=${week}`,
92 | `weekday=${weekday}`,
93 | `beginSection=${beginSection}`,
94 | `endSection=${endSection}`
95 | ].filter(param => param !== undefined).join('&');
96 |
97 | const url = `/courseAttendances/export/courseAttendanceList?${queryParams}`;
98 |
99 | return service.request({
100 | method: "get",
101 | url: url,
102 | responseType: 'blob'
103 | });
104 | }
105 |
106 | export function StudentSearch(data) {
107 | const {
108 | courseName,
109 | semester,
110 | studentNo,
111 | pageSize,
112 | pageNo
113 | } = data;
114 |
115 | // 使用条件运算符来确保查询参数不是 undefined
116 | const queryParams = [
117 | `courseName=${courseName}`,
118 | `semester=${semester}`,
119 | `studentNo=${studentNo}`,
120 | `pageSize=${pageSize}`,
121 | `pageNo=${pageNo}`
122 | ].filter(param => param !== undefined).join('&');
123 |
124 | const url = `/courseAttendances/studentAttendanceList?${queryParams}`;
125 |
126 | return service.request({
127 | method: "get",
128 | url: url,
129 | });
130 | }
131 |
132 | export function ExportStudentSearch(data) {
133 | const {
134 | courseName,
135 | semester,
136 | studentNo
137 | } = data;
138 |
139 | // 使用条件运算符来确保查询参数不是 undefined
140 | const queryParams = [
141 | `courseName=${courseName}`,
142 | `semester=${semester}`,
143 | `studentNo=${studentNo}`
144 | ].filter(param => param !== undefined).join('&');
145 |
146 | const url = `/courseAttendances/export/studentAttendanceList?${queryParams}`;
147 |
148 | return service.request({
149 | method: "get",
150 | url: url,
151 | responseType: 'blob'
152 | });
153 | }
154 |
155 | export function AttendanceAppeal(data) {
156 | return service.request({
157 | method: "get",
158 | url: `/attendanceAppeals/teaAttendanceAppealSummary?pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
159 | })
160 | }
161 | export function AttendanceDetail(data) {
162 | return service.request({
163 | method: "get",
164 | url: `/attendanceAppeals/${data.id}/attendanceAppealDetail`,
165 | })
166 | }
167 | export function AttendanceCheck(data) {
168 | return service.request({
169 | method: "put",
170 | url: `/attendanceAppeals/${data.id}?status=${data.status}`,
171 | })
172 | }
173 | export function LeaveAppeal(data) {
174 | return service.request({
175 | method: "get",
176 | url: `/leaves/teaLeaveSummary?pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
177 | })
178 | }
179 | export function LeaveDetail(data) {
180 | return service.request({
181 | method: "get",
182 | url: `/leaves/${data.id}/leaveDetail`,
183 | })
184 | }
185 | export function LeaveCheck(data) {
186 | return service.request({
187 | method: "put",
188 | url: `/leaves/${data.id}?status=${data.status}`,
189 | })
190 | }
191 | export function EmpowerList(data) {
192 | return service.request({
193 | method: "get",
194 | url: `/courseAttendances/student?semester=${data.semester}&courseName=${data.courseName}`,
195 | })
196 | }
197 | export function Assign(data) {
198 | return service.request({
199 | method: "post",
200 | url: `/supervisiontasks`,
201 | data
202 | })
203 | }
204 | export function Dismiss(data) {
205 | return service.request({
206 | method: "delete",
207 | url: `/supervisiontasks`,
208 | data
209 | })
210 | }
--------------------------------------------------------------------------------
/src/assets/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/background.png
--------------------------------------------------------------------------------
/src/assets/home/all-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/all-icon.png
--------------------------------------------------------------------------------
/src/assets/home/attendance-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/attendance-icon.png
--------------------------------------------------------------------------------
/src/assets/home/auth-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/auth-icon.png
--------------------------------------------------------------------------------
/src/assets/home/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/avatar.png
--------------------------------------------------------------------------------
/src/assets/home/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/background.png
--------------------------------------------------------------------------------
/src/assets/home/cloud1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/cloud1.png
--------------------------------------------------------------------------------
/src/assets/home/cloud2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/cloud2.png
--------------------------------------------------------------------------------
/src/assets/home/cloud3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/cloud3.png
--------------------------------------------------------------------------------
/src/assets/home/cloud4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/cloud4.png
--------------------------------------------------------------------------------
/src/assets/home/cloud5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/cloud5.png
--------------------------------------------------------------------------------
/src/assets/home/home-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/home-icon.png
--------------------------------------------------------------------------------
/src/assets/home/leave-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/leave-icon.png
--------------------------------------------------------------------------------
/src/assets/home/logout-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/logout-icon.png
--------------------------------------------------------------------------------
/src/assets/home/pass-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/pass-icon.png
--------------------------------------------------------------------------------
/src/assets/home/real-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/real-icon.png
--------------------------------------------------------------------------------
/src/assets/home/search-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/search-icon.png
--------------------------------------------------------------------------------
/src/assets/home/search-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/home/search-menu.png
--------------------------------------------------------------------------------
/src/assets/login/login-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/login/login-background.png
--------------------------------------------------------------------------------
/src/assets/login/login-hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/login/login-hover.png
--------------------------------------------------------------------------------
/src/assets/login/login-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/login/login-image.png
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROBINRUGAN/uu-attendance/4bd6137ad02527d54fa6bab3a0cf624504cb69f2/src/assets/logo.png
--------------------------------------------------------------------------------
/src/components/CheckAttendance.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
12 |
13 |
课程:{{ check.courseName }}
14 |
理由:{{ check.reason }}
15 |
16 |
27 | {{
28 | check.status === "1"
29 | ? "已通过"
30 | : check.status === "2"
31 | ? "未通过"
32 | : "待审核"
33 | }}
34 |
35 |
36 |
37 |
47 |
48 |
49 |
50 |
51 |
姓名:{{ name }}
52 |
学号:{{ no }}
53 |
54 | 时间:{{ time }}
55 | 课程:{{ course }}
56 | 理由:{{ excuse }}
57 | 图片:
58 |
59 |
70 |
71 |
72 |
76 |
77 |
78 |
79 |
80 |
205 |
206 |
--------------------------------------------------------------------------------
/src/components/CheckLeave.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
12 |
13 |
课程:{{ check.courseName }}
14 |
理由:{{ check.reason }}
15 |
16 |
27 | {{
28 | check.status === "1"
29 | ? "已通过"
30 | : check.status === "2"
31 | ? "未通过"
32 | : "待审核"
33 | }}
34 |
35 |
36 |
37 |
47 |
48 |
49 |
50 |
51 |
姓名:{{ name }}
52 |
学号:{{ no }}
53 |
54 | 时间:{{ time }}
55 | 课程:{{ course }}
56 | 理由:{{ excuse }}
57 | 图片:
58 |
59 |
70 |
71 |
72 |
76 |
77 |
78 |
79 |
80 |
202 |
203 |
--------------------------------------------------------------------------------
/src/components/Course.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
20 |
24 |
34 |
38 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 学生学号
49 | 姓名
50 | 已签到次数
51 | 未签到次数
52 | 已缺勤次数
53 | 已请假次数
54 |
55 |
56 |
57 | {{ student.studentName }}
58 | {{ student.studentNo }}
59 | {{ student.signedCount }}
60 | {{ student.nocheckCount }}
61 | {{ student.absentCount }}
62 | {{ student.leaveCount }}
63 |
64 |
65 |
75 |
76 |
77 |
78 |
79 |
181 |
182 |
--------------------------------------------------------------------------------
/src/components/Empower.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
20 |
21 |
22 |
23 |
24 |
25 | 上课时长:1-16周
26 | 上课时间:周一、周三、周五
27 | 上课人数:99人
28 |
29 |
30 |
31 | {{ student.studentNo }}
32 | {{ student.studentName }}
33 |
40 |
47 |
48 |
49 |
59 |
60 |
61 |
62 |
63 |
172 |
173 |
--------------------------------------------------------------------------------
/src/components/HomePart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
当前时间:
6 |
{{ date }}
7 |
8 |
9 |
当前学期:
10 |
{{ semester }}
11 |
12 |
13 |
{{ name }}老师您好:
14 |
15 |
16 |
课程
查询
17 |
18 | 通过搜索,查询某课程某学生的考勤情况
19 |
20 |
21 |
22 |
23 |
24 |
25 |
学生
查询
26 |
27 | 可通过搜索,了解某节课学生的考勤情况
28 |
29 |
30 |
31 |
32 |
33 |
34 |
考勤
申诉
35 |
对学生的考勤申诉进行审核
36 |
37 |
38 |
39 |
40 |
41 |
审核
请假
42 |
对学生的请假申诉进行审核
43 |
44 |
45 |
46 |
47 |
48 |
督导
指定
49 |
50 | 选择、删除、查询本课程的督导
51 |
52 |
53 |
54 |
55 |
56 |
57 |
92 |
93 |
--------------------------------------------------------------------------------
/src/components/Overview.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 | 学号:
11 |
12 |
13 |
14 | 姓名:
15 |
16 |
17 |
18 |
19 |
20 |
21 | 上课时长:1-16周
22 | 上课时间:周一、周三、周五
23 | 上课人数:99人
24 |
25 |
26 |
27 | {{ student.id }}
28 | {{ student.name }}
29 |
30 |
31 |
41 |
42 |
43 |
44 |
45 |
89 |
90 |
--------------------------------------------------------------------------------
/src/components/Sidebar.vue:
--------------------------------------------------------------------------------
1 |
2 |
87 |
88 |
89 |
111 |
112 |
--------------------------------------------------------------------------------
/src/components/Student.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
20 |
21 | 学号:
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | 学生学号
31 | 姓名
32 | 周数
33 | 星期
34 | 签到情况
35 |
36 |
37 |
38 | {{ student.studentNo }}
39 | {{ student.studentName }}
40 | {{ computedWeek(student.week) }}
41 | {{ computedWeekday(student.weekday) }}
42 | {{ computedStatus(student.status) }}
43 |
44 |
45 |
55 |
56 |
57 |
58 |
59 |
263 |
264 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import VueRouter from 'vue-router'
4 | import router from './router'
5 | import ElementUI from 'element-ui'
6 | import 'element-ui/lib/theme-chalk/index.css';
7 | Vue.config.productionTip = false
8 | Vue.use(ElementUI)
9 | Vue.use(VueRouter)
10 | new Vue({
11 | render: h => h(App),
12 | router,
13 | }).$mount('#app')
14 |
--------------------------------------------------------------------------------
/src/pages/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/src/pages/Login.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
58 |
59 |
--------------------------------------------------------------------------------
/src/pages/Register.vue:
--------------------------------------------------------------------------------
1 |
2 |
36 |
37 |
38 |
97 |
98 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import VueRouter from "vue-router";
2 | import Login from "../pages/Login";
3 | import Register from "../pages/Register";
4 | import Home from "../pages/Home";
5 | import Overview from "../components/Overview";
6 | import HomePart from "../components/HomePart";
7 | import Course from "../components/Course";
8 | import Student from "../components/Student";
9 | import Empower from "../components/Empower";
10 | import CheckAttendance from "../components/CheckAttendance";
11 | import CheckLeave from "../components/CheckLeave";
12 | export default new VueRouter({
13 | mode: 'history',
14 | routes: [{
15 | path: '/login',
16 | component: Login
17 | },
18 | {
19 | path: '/register',
20 | component: Register
21 | },
22 | {
23 | path: '/',
24 | component: Home,
25 | children: [{
26 | path: 'overview',
27 | component: Overview
28 | },
29 | {
30 | path: 'home',
31 | component: HomePart
32 | },
33 | {
34 | path: 'course',
35 | component: Course
36 | },
37 | {
38 | path: 'student',
39 | component: Student
40 | },
41 | {
42 | path: 'empower',
43 | component: Empower
44 | },
45 | {
46 | path: 'check-attendance',
47 | component: CheckAttendance
48 | },
49 | {
50 | path: 'check-leave',
51 | component: CheckLeave
52 | }
53 | ],
54 | redirect: '/home'
55 |
56 | }
57 | // {
58 | // path: '/userCenter',
59 | // component: UserCenter,
60 | // children: [{
61 | // path: 'myInfo',
62 | // component: MyInfo
63 | // },
64 | // {
65 | // path: 'starredGoods',
66 | // component: StarredGoods
67 |
68 | // }, {
69 | // path: 'buyerBidOrder',
70 | // component: BuyerBidOrder
71 |
72 | // }, {
73 | // path: 'soldGoods',
74 | // component: SoldGoods
75 |
76 | // },
77 | // ],
78 | // redirect: 'userCenter/myInfo'
79 | // },
80 | ]
81 | })
--------------------------------------------------------------------------------
/src/utils/request.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | // 创建axios,赋给变量service
3 | export const service = axios.create({
4 | //baseURL: `http://7602941z7e.goho.co:43483/`, // http://192.168.0.106:8080/devApi/ == http://www.web-jshtml.cn/productapi/productapi
5 | baseURL: `http://111.229.173.12:9090/`,
6 | // baseURL: `http://localhost:5000/`,
7 | timeout: 150000, // 超时
8 | crossDomain: true,
9 | });
10 |
11 | //添加请求拦截器
12 | service.interceptors.request.use(
13 | //在发请求之前打上token和跨域的标记
14 | function (config) {
15 | //在这里,代码将 "Access-Control-Allow-Origin" 的值设置为 "*",
16 | // 意味着允许所有的源(即任意域名)进行跨域访问。这种配置通常用于开发
17 | // 和测试环境,以便允许任何源发起跨域请求。
18 | config.headers['Access-Control-Allow-Origin'] = '*';
19 | config.headers['Access-Control-Allow-Credentials'] = true;
20 | let token = window.localStorage.getItem("token")
21 | if (token) {
22 | //我们headers里面的令牌取名叫Authorization
23 | config.headers.Authorization = token;
24 | }
25 | return config;
26 | },
27 | function (error) {
28 | //返回一个被拒绝的 Promise 对象,并将错误 error 作为拒绝的原因
29 | return Promise.resolve(error.response.data);
30 | }
31 | );
32 | //添加响应拦截器
33 | service.interceptors.response.use(
34 | function (response) {
35 | //使用响应数据返回响应;
36 | const data = response;
37 | // 如果data有东西,就返回data.data,如果没有就返回response
38 | if (data) {
39 | return Promise.resolve(data.data);
40 | }
41 | return response;
42 | },
43 | function (error) {
44 | //返回一个被拒绝的 Promise 对象,并将错误 error 作为拒绝的原因
45 | return Promise.resolve(error.response.data);
46 | }
47 | );
48 | // 将service 导出
49 | export default service;
--------------------------------------------------------------------------------
/tree.py:
--------------------------------------------------------------------------------
1 | import re
2 | from pathlib import Path
3 | from pathlib import WindowsPath
4 | from typing import Optional, List
5 |
6 |
7 | class DirectionTree:
8 | def __init__(self,
9 | direction_name: str = 'WorkingDirection',
10 | direction_path: str = '.',
11 | ignore_list: Optional[List[str]] = None):
12 | self.owner: WindowsPath = Path(direction_path)
13 | self.tree: str = direction_name + '/\n'
14 | self.ignore_list = ignore_list
15 | if ignore_list is None:
16 | self.ignore_list = []
17 | self.direction_ergodic(path_object=self.owner, n=0)
18 |
19 | def tree_add(self, path_object: WindowsPath, n=0, last=False):
20 | if n > 0:
21 | if last:
22 | self.tree += '│' + (' │' * (n - 1)) + ' └────' + path_object.name
23 | else:
24 | self.tree += '│' + (' │' * (n - 1)) + ' ├────' + path_object.name
25 | else:
26 | if last:
27 | self.tree += '└' + ('──' * 2) + path_object.name
28 | else:
29 | self.tree += '├' + ('──' * 2) + path_object.name
30 | if path_object.is_file():
31 | self.tree += '\n'
32 | return False
33 | elif path_object.is_dir():
34 | self.tree += '/\n'
35 | return True
36 |
37 | def filter_file(self, file):
38 | for item in self.ignore_list:
39 | if re.fullmatch(item, file.name):
40 | return False
41 | return True
42 |
43 | def direction_ergodic(self, path_object: WindowsPath, n=0):
44 | dir_file: list = list(path_object.iterdir())
45 | dir_file.sort(key=lambda x: x.name.lower())
46 | dir_file = [f for f in filter(self.filter_file, dir_file)]
47 | for i, item in enumerate(dir_file):
48 | if i + 1 == len(dir_file):
49 | if self.tree_add(item, n, last=True):
50 | self.direction_ergodic(item, n + 1)
51 | else:
52 | if self.tree_add(item, n, last=False):
53 | self.direction_ergodic(item, n + 1)
54 |
55 |
56 | if __name__ == '__main__':
57 | i_l = [
58 | '\.git', '__pycache__', 'test.+', 'venv', '.+\.whl', '\.idea', '.+\.jpg', '.+\.png',
59 | 'image', 'css', 'admin', 'db.sqlite3'
60 | ]
61 | tree = DirectionTree(ignore_list=i_l, direction_path='./')
62 | print(tree.tree)
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | const { defineConfig } = require('@vue/cli-service')
2 | module.exports = defineConfig({
3 |
4 | transpileDependencies: true,
5 | lintOnSave: false,
6 | devServer: {
7 | open: false, // 编译完成是否打开网页
8 | host: '0.0.0.0', // 指定使用地址,默认localhost,0.0.0.0代表可以被外界访问
9 | port: 9091, // 访问端口
10 | proxy: {
11 | // "/socket.io": {
12 |
13 | // //target: "http://7602941z7e.goho.co:43483/", //API服务器的地址
14 | // target:"http://api.mewtopia.cn:5000/",
15 | // // target:"http://localhost:5000/",
16 | // changeOrigin: true,
17 | // pathRewrite: {
18 | // "^/socket.io": ''
19 | // }
20 | // }
21 | }
22 | },
23 | })
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------