作者主页:
编程指南针
作者简介:阿里云开发者社区特邀作者、Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师
主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助
本项目主要实现校园/公司/各类组织疫情防控管理,个人健康上报功能,分为三个角色:
管理员:主要管理学生、教师、班级、通知信息
教师:主要管理学生的健康上报信息,通知信息,请假审批信息
学生:主要进行健康上报,请假,通知查看等功能
系统通过图形报表的形式来统计相关的信息,界面美观大方,功能全面,是一个难得的前端项目。可以根据需要修改为比如公司疫情防控系统、社区疫情防控系统等等。
项目编号:BS-QD-001
1.使用vue+element+vchar框架进行前端开发
2.使用nodejs+express+mysql+socket进行后台开发
3.前后端分离开发
4.数据库采用MYSQL+REDIS进行信息的存储
编辑
编辑
下面展示一下系统功能:
管理员登陆: admin /111111
编辑
后台首页:仪表盘
编辑
学生管理功能
编辑
可以通过EXCEL表格导入学生和老师
编辑
老师管理:同样可以通过EXCEL表格导入学生和老师
编辑
通知管理:
编辑
班级管理
编辑
学生登陆系统:znzbs005/111111
编辑
查看通知
编辑
每日健康填报
编辑
请假
编辑
个人信息管理
编辑
老师登陆
编辑
通知管理
编辑
请假审批:只能审批本班学生
编辑
个人信息修改
编辑
在线聊天
编辑
编辑
以上是展示的本系统的部分功能。
核心代码展示如下:
const jwtUtil = require('../utils/jwtUtils') module.exports = class admin_dao extends require('../model/admin_mod') { /** * 根据用户类型与查询字段模糊查询 * @param req * @param resp * @returns {Promise<void>} */ static async getUsersByTypeAndChar(req, resp) { let query = req.query; let type = query.type let inputText = query.inputText let CharType = query.CharType let pageNum = query.pageNum let currPage = query.currPage let data = await this.getUsersByTypeAndCharMod(type, inputText, CharType, currPage, pageNum) let total = await this.getUsersByTypeAndCharTotal(type, inputText, CharType) resp.send({data, total: total[0].count}) } /** * 发布公告 * @param req * @param resp * @returns {Promise<void>} */ static async announce(req, resp) { let title = req.body.title let classes = req.body.classes let results = await this.announceMod(title, classes) resp.send(results) } /** * 分页获取所有通知与数量 * @param req * @param resp * @returns {Promise<void>} */ static async getAllNotice(req, resp) { let pageNum = req.query.pageNum; let currPage = req.query.currPage; let data = await this.getAllNoticeMod(pageNum, currPage) let total = await this.getAllNoticeTotal() resp.send({data, total: total[0].count}) } /** * 取该老师所属班级的全部请假单与数量(分页查询) * @param req * @param resp * @returns {Promise<void>} */ static async getLeave(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let classArr = verify.classes.split(';') let data = await this.getLeaveMod(classArr, req.query.currPage, req.query.pageNum) let total = await this.getLeaveTotal(classArr) resp.send({data, total: total[0].count}) } /** * 获取该用户请假审批与数量(分页 * @param req * @param resp * @returns {Promise<void>} */ static async getuserLeave(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_id = verify.id let data = await this.getuserLeaveMod(u_id, req.query.currPage, req.query.pageNum) let total = await this.getuserLeaveTotal(u_id) resp.send({data, total: total[0].count}) } /** * 当前请假单审批(修改审批状态) * @param req * @param resp * @returns {Promise<void>} */ static async upLeaveState(req, resp) { let results = await this.upLeaveStateMod(req.query.l_id, req.query.upState) resp.send(results) } /** *******************增值功能:公告************************** */ static async NoticeDetails(req, resp) { let n_id = req.query.n_id let users = {} //1. 获取当前公告已读人的人数 let readNum = await this.getreadNum(n_id) readNum = readNum[0].count //2. 获取当前公告已读的人的id数组,再通过id去查询用户数据 let readIdArr = await this.getreadId(n_id) if (readIdArr.length != 0) users = await this.getreadByidArr(readIdArr) //3. 获取当前通知的详情信息 let data = await this.NoticeDetailsMod(n_id) //4. 获取当前公告通知的总人数 let total = await this.NoticeDetailsTotal(data[0].class) total = total[0].count //5. 获取已读人的阅读时间与uid let idAndTime = await this.getreadTime(n_id) //将阅读时间附加到users中 for (let i = 0; i < idAndTime.length; i++) { for (let j = 0; j < users.length; j++) { if (users[i].id == idAndTime[j].u_id) users[i].readtime = idAndTime[j].readtime } } resp.send({ data, readNum, total, users }) } /** * 当前 公告删除功能(同时清空该公告的被阅读记录) * @param req * @param resp * @returns {Promise<void>} */ static async delNotice(req, resp) { let results=await this.delNoticeMod(req.query.n_id) results+=await this.delReadMod(req.query.n_id) resp.send(results) } /** * ************************增值功能:班级添加****************************** */ static async addClasses(req,resp){ let classAll = await this.getClassMod() let results= await this.addClassesMod(classAll,req.query.classes) resp.send(results) } static async getClasses(req,resp){ let data=await this.getClassMod(); resp.send(data) } static async getClassesSear(req,resp){ let classes=req.query.inputText; // console.log(req.query.pageNum) let data =await this.getClassesSearMod(classes,req.query.pageNum,req.query.currPage) let total=await this.getClassesSearTotal(classes) resp.send({data,total:total[0].count}) } }
const jwtUtil = require('../utils/jwtUtils') module.exports = class student_dao extends require('../model/student_mod') { /** * f分页获取我的通知与数量 * @param req * @param resp * @returns {Promise<void>} */ static async getNotice(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_classes = verify.classes let pageNum = req.query.pageNum let currPage = req.query.currPage let data = await this.getNoticeMod(u_classes, pageNum, currPage) let total = await this.getNoticeTotal(u_classes) resp.send({data, total: total[0].count}) } /** * 获取的我通知已读列表(供已读未读状态渲染 * @param req * @param resp * @returns {Promise<void>} */ static async getNoticeRead(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_id = verify.id let data = await this.getNoticeReadMod(u_id) resp.send(data) } /** * 已读转未读 * @param req * @param resp * @returns {Promise<void>} */ static async goweidu(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_id = verify.id let n_id = req.query.n_id let results = await this.goweiduMod(u_id, n_id) resp.send(results) } /** * 未读转已读 * @param req * @param resp * @returns {Promise<void>} */ static async goyidu(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_id = verify.id let n_id = req.query.n_id let results = await this.goyiduMod(u_id, n_id) resp.send(results) } /** * *************************健康填报表************************************** */ /** * 健康填报表提交 * @param req * @param resp * @returns {Promise<void>} */ static async sethealth(req, resp) { let body = req.body let token = body.token let temperature = body.temperature let hot = body.hot let gohubei = body.gohubei let hubeiren = body.hubeiren let fever = body.fever let leave = body.leave let hesuan = body.hesuan let mask = body.mask let masknum = body.masknum let kill = body.kill //解密 let verify = await jwtUtil.verifysync(token, globalKey) let u_id = verify.id let data = await this.sethealthMod(u_id, temperature, hot, gohubei, hubeiren, fever, leave, hesuan, mask, masknum, kill) resp.send(data) } /** * 分页获取当天填报表与总数量 * @param req * @param resp * @returns {Promise<void>} */ static async gethealthNowDayPage(req, resp) { let date = new Date(); let Month = "" if ((date.getMonth() + 1) < 10) Month = "0" + String((date.getMonth() + 1)) else Month = (date.getMonth() + 1) + "" let newDate = "" + date.getFullYear() + Month + date.getDate() let lastDate = "" + date.getFullYear() + Month + (date.getDate() + 1) let currPage = req.query.currPage let pageNum = req.query.pageNum let data = await this.gethealthNowDayPageMod(newDate, lastDate, currPage, pageNum) let total = await this.gethealthNowDayPageTotal(newDate, lastDate) resp.send({data, total: total[0].count}) } /**\ * 获取当天某用户报表 * @param req * @param resp * @returns {Promise<void>} */ static async getHealthNowDayByid(req, resp) { let verify = await jwtUtil.verifysync(req.query.token, globalKey) let u_id = verify.id let newDate = this.getNowAndLastDate().newDate let lastDate = this.getNowAndLastDate().lastDate let data = await this.getHealthNowDayByidMod(u_id, newDate, lastDate) resp.send(data) } /** * 获取当天所有填报表 * @param req * @param resp * @returns {Promise<void>} */ static async gethealthNowDay(req,resp){ let nowDate=this.getNowAndLastDate().newDate let lasDate=this.getNowAndLastDate().lastDate let data= await this.gethealthNowDayMod(nowDate,lasDate) resp.send(data) } /** * 获取当天所有填报表 * @param req * @param resp * @returns {Promise<void>} */ static async gethealthNowMonth(req,resp){ let nowDate=this.getNowAndLastDate().nowMonth let lasDate=this.getNowAndLastDate().lastMonth let data= await this.gethealthNowMonthMod(nowDate,lasDate) resp.send(data) } /** * 获取所有填报表 * @param req * @param resp * @returns {Promise<void>} */ static async getAllHealth(req,resp){ let data= await this.getAllHealthMod() resp.send(data) } /** * 学生请假表申请 * @param req * @param resp * @returns {Promise<void>} */ static async setLeave(req,resp){ let body=req.body let verify=await jwtUtil.verifysync(body.token,globalKey) let u_id=verify.id let classes=verify.classes let reason =body.reason let leavetype =body.leavetype let starttime =body.starttime let endtime =body.endtime let results=await this.setLeaveMod(u_id,classes,reason,leavetype,starttime,endtime) resp.send(results) } }