计算机毕业设计 在线问诊系统 Java+SpringBoot+Vue 前后端分离 文档报告 代码讲解 安装调试

ops/2024/9/20 16:26:25/

🍊作者:计算机编程-吉哥
🍊简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。
🍊心愿:点赞 👍 收藏 ⭐评论 📝
🍅 文末获取源码联系

👇🏻 精彩专栏推荐订阅 👇🏻 不然下次找不到哟~
Java毕业设计项目~热门选题推荐《1000套》

目录

1.技术选型

2.开发工具

3.功能

3.1【角色】

3.2【前端功能模块】

3.3【后端功能模块】

4.项目演示截图

4.1 注册

4.2 首页

4.3 填写问诊信息

4.4 公告资讯

4.5 个人中心

4.6 在线问诊

4.7 诊断记录

4.8 医生

5.核心代码

5.1拦截器

5.2分页工具类

5.3文件上传下载

5.4前端请求

6.LW文档大纲参考


背景意义介绍:

在全球健康意识不断提升和医疗资源日益紧张的背景下,在线问诊系统作为一种新型的医疗服务模式,对于缓解实体医院压力、提高医疗服务效率、优化患者就医体验具有重要的现实意义。

本文介绍的在线问诊系统,采用Java作为后端开发语言,结合SpringBoot框架,确保了服务端应用的高效性和稳定性。前端则利用Vue.js技术,为用户提供了直观、易用的交互界面。系统服务于管理员、医生和患者三种角色,提供了全面的服务和管理功能。患者可以通过系统进行医生问诊、查看公告资讯,并在个人中心管理个人信息、在线问诊记录和个人收藏。医生可以通过系统进行在线问诊和诊断记录的管理。

后端管理模块为管理员提供了包括患者管理、医生管理、在线问诊管理、诊断记录管理等在内的强大工具集。这些功能的实现,不仅提高了医疗服务的组织和执行效率,也为患者提供了便捷的在线就医途径。

在线问诊系统的实现,有助于患者跨越地理限制,享受专业的医疗服务,同时也为医生提供了扩大服务范围、提高服务效率的机会。系统的数据分析和报表统计功能,还可以帮助医疗机构洞察医疗服务需求,优化资源配置。总之,该系统对于推动医疗服务的数字化转型、实现医疗资源的优化利用具有重要的战略意义。

1.技术选型

springboot、mybatisplus、vue、elementui、html、css、js、mysql、jdk1.8

2.开发工具

idea、navicat

3.功能

3.1【角色】

管理员、医生、患者

3.2【前端功能模块】

  • 登录
  • 注册
  • 首页
  • 医生(问诊)
  • 公告资讯
  • 个人中心(个人信息、修改密码、在线问诊、诊断记录、我的收藏)

3.3【后端功能模块】

  • 登录
  • 患者
  • 医生
  • 在线问诊
  • 诊断记录
  • 系统管理
  • 用户资料

4.项目演示截图

4.1 注册

4.2 首页

4.3 填写问诊信息

4.4 公告资讯

4.5 个人中心

4.6 在线问诊

4.7 诊断记录

4.8 医生

5.核心代码

5.1拦截器

java">package com.interceptor;import com.alibaba.fastjson.JSONObject;
import com.annotation.IgnoreAuth;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.R;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;/*** 权限(Token)验证*/
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {public static final String LOGIN_TOKEN_KEY = "Token";@Autowiredprivate TokenService tokenService;@Overridepublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {//支持跨域请求response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");response.setHeader("Access-Control-Max-Age", "3600");response.setHeader("Access-Control-Allow-Credentials", "true");response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));// 跨域时会首先发送一个OPTIONS请求,这里我们给OPTIONS请求直接返回正常状态if (request.getMethod().equals(RequestMethod.OPTIONS.name())) {response.setStatus(HttpStatus.OK.value());return false;}IgnoreAuth annotation;if (handler instanceof HandlerMethod) {annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);} else {return true;}//从header中获取tokenString token = request.getHeader(LOGIN_TOKEN_KEY);/*** 不需要验证权限的方法直接放过*/if(annotation!=null) {return true;}TokenEntity tokenEntity = null;if(StringUtils.isNotBlank(token)) {tokenEntity = tokenService.getTokenEntity(token);}if(tokenEntity != null) {request.getSession().setAttribute("userId", tokenEntity.getUserid());request.getSession().setAttribute("role", tokenEntity.getRole());request.getSession().setAttribute("tableName", tokenEntity.getTablename());request.getSession().setAttribute("username", tokenEntity.getUsername());return true;}PrintWriter writer = null;response.setCharacterEncoding("UTF-8");response.setContentType("application/json; charset=utf-8");try {writer = response.getWriter();writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));} finally {if(writer != null){writer.close();}}return false;}
}

5.2分页工具类

java"> 
package com.utils;import java.io.Serializable;
import java.util.List;
import java.util.Map;import com.baomidou.mybatisplus.plugins.Page;/*** 分页工具类*/
public class PageUtils implements Serializable {private static final long serialVersionUID = 1L;//总记录数private long total;//每页记录数private int pageSize;//总页数private long totalPage;//当前页数private int currPage;//列表数据private List<?> list;/*** 分页* @param list        列表数据* @param totalCount  总记录数* @param pageSize    每页记录数* @param currPage    当前页数*/public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {this.list = list;this.total = totalCount;this.pageSize = pageSize;this.currPage = currPage;this.totalPage = (int)Math.ceil((double)totalCount/pageSize);}/*** 分页*/public PageUtils(Page<?> page) {this.list = page.getRecords();this.total = page.getTotal();this.pageSize = page.getSize();this.currPage = page.getCurrent();this.totalPage = page.getPages();}/** 空数据的分页*/public PageUtils(Map<String, Object> params) {Page page =new Query(params).getPage();new PageUtils(page);}public int getPageSize() {return pageSize;}public void setPageSize(int pageSize) {this.pageSize = pageSize;}public int getCurrPage() {return currPage;}public void setCurrPage(int currPage) {this.currPage = currPage;}public List<?> getList() {return list;}public void setList(List<?> list) {this.list = list;}public long getTotalPage() {return totalPage;}public void setTotalPage(long totalPage) {this.totalPage = totalPage;}public long getTotal() {return total;}public void setTotal(long total) {this.total = total;}}

5.3文件上传下载

java">package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")@IgnoreAuthpublic R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

5.4前端请求

import axios from 'axios'
import router from '@/router/router-static'
import storage from '@/utils/storage'const http = axios.create({timeout: 1000 * 86400,withCredentials: true,baseURL: '/furniture',headers: {'Content-Type': 'application/json; charset=utf-8'}
})
// 请求拦截
http.interceptors.request.use(config => {config.headers['Token'] = storage.get('Token') // 请求头带上tokenreturn config
}, error => {return Promise.reject(error)
})
// 响应拦截
http.interceptors.response.use(response => {if (response.data && response.data.code === 401) { // 401, token失效router.push({ name: 'login' })}return response
}, error => {return Promise.reject(error)
})
export default http

6.LW文档大纲参考

 具体LW如何写法,可以咨询博主,耐心分享!

你可能还有感兴趣的项目👇🏻👇🏻👇🏻

更多项目推荐:计算机毕业设计项目

如果大家有任何疑虑,请在下方咨询或评论


http://www.ppmy.cn/ops/98727.html

相关文章

什么是网络安全?网络安全防范技术包括哪些?

一、引言 在当今数字化的时代&#xff0c;网络已经成为人们生活和工作中不可或缺的一部分。然而&#xff0c;随着网络的普及和应用的广泛&#xff0c;网络安全问题也日益凸显。从个人隐私泄露到企业关键信息被盗&#xff0c;从网络欺诈到大规模的网络攻击&#xff0c;网络安全…

openssl—心脏出血漏洞

openssl—心脏出血漏洞&#xff08;CVE-2014-0160&#xff09; Heartbleed漏洞 Heartbleed&#xff08;心脏出血&#xff09;漏洞&#xff0c;是一个出现在加密程序库OpenSSL的安全漏洞&#xff0c;该程序库广泛用于实现互联网的传输层安全&#xff08;TLS&#xff09;协议。…

基于多群体的变异策略集成的差分进化

题目与关键词 英文题目&#xff1a;Differential evolution with multi-population based ensemble of mutation strategies 英文关键词&#xff1a;Evolutionary algorithm, Differential evolution, Multi-population, Ensemble of mutation strategies, Numerical optimiza…

笔试算法-编程练习-01-J-24

d这套题&#xff0c;第一题数学找规律、第二题也是掺杂一些数学的模拟、第三题是动态规划。整体题目代码量不大&#xff0c;但是比较灵活&#xff0c;考验思维的敏捷度。 一、下雪 题目描述 村子里有一些桩子&#xff0c;从左到右高度依次为1,12,123,…&#xff0c;每两颗桩子…

计算机网络-PIM-SM组播实验

一、概述 目前为止我们学习了组播转发网络中的PIM协议&#xff0c;PIM模型有两种&#xff1a; PIM-DM主要使用在网络规模较小&#xff0c;用户集中的组播网络中。 PIM-SM主要使用在网络规模较大&#xff0c;用户较为分散的组播网络中。PIM-SM基于组播模型又可以分为PIM-SM&…

【Oracle点滴积累】Oracle 19c安装Critical Patch Update for January 2023

广告位招租&#xff01; 知识无价&#xff0c;人有情&#xff0c;无偿分享知识&#xff0c;希望本条信息对你有用&#xff01; 今天和大家分享如何为Oracle 19c(未启用RMAN的单实例)安装Critical Patch Update(Patch Number:34771828)&#xff0c;本指引不包含Roll Back部分&a…

云轴科技ZStack获评 “上海市企业技术中心”认定

近日&#xff0c;上海市经济和信息化委员会公布了《上海市第32批市级企业技术中心名单》。云轴科技ZStack凭借在云计算和AI领域的持续创新和综合实力&#xff0c;获评“上海市企业技术中心”的认定。 “上海市企业技术中心”认定由上海市经济和信息化委员会、财政局、税务局及海…

c#入门篇4

目录 一、分支结构&#xff1a; if else 二、 选择结构&#xff1a; if else-if /switch-case 异常捕获&#xff08;try-catch) 三、循环结构 四、程序调试 五、类型转换 1、Convert 类 2. Parse 方法 3. TryParse 方法 六、三元表达式 一、分支结构&#xff1a; if els…