日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 前端技术 > vue >内容正文

vue

SpringBoot+Vue实现前后端分离的实习管理系统

發(fā)布時間:2023/12/14 vue 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SpringBoot+Vue实现前后端分离的实习管理系统 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

文末獲取源碼

開發(fā)語言:Java
開發(fā)工具:IDEA /Eclipse
數(shù)據(jù)庫:MYSQL5.7/8.0
應(yīng)用服務(wù):Tomcat7/Tomcat8
是否Maven項目:是
后端框架:SpringBoot
前端框架:vue+element等
JDK版本:jdk1.8
項目架構(gòu):B/S架構(gòu)

前言介紹

本次設(shè)計任務(wù)是要設(shè)計一個實習(xí)管理系統(tǒng),通過這個系統(tǒng)能夠滿足實習(xí)管理及用戶的管理功能。系統(tǒng)的主要功能包括首頁,個人中心,班級管理,學(xué)生管理,教師管理,實習(xí)單位管理,實習(xí)作業(yè)管理,教師評分管理,單位成績管理,系統(tǒng)管理等。

管理員可以根據(jù)系統(tǒng)給定的賬號進行登錄,登錄后可以進入實習(xí)管理系統(tǒng)對所有模塊進行管理。包括查看和修改自己的個人信息以及登錄密碼。

該系統(tǒng)為每一個用戶都分配了一個用戶賬號,用戶通過賬號的登錄可以在系統(tǒng)中查看實習(xí)管理信息及對個人信息進行修改等功能。

總體設(shè)計

根據(jù)實習(xí)管理系統(tǒng)的功能需求,進行系統(tǒng)設(shè)計。

前臺功能:用戶進入系統(tǒng)可以實現(xiàn)首頁,系統(tǒng)公告,個人中心,后臺管理等功能進行操作;

后臺由管理員,實習(xí)單位,教師和學(xué)生,主要功能包括首頁,個人中心,班級管理,學(xué)生管理,教師管理,實習(xí)單位管理,實習(xí)作業(yè)管理,教師評分管理,單位成績管理,系統(tǒng)管理等功能;

系統(tǒng)對這些功能進行整合,產(chǎn)生的功能結(jié)構(gòu)圖如下:

前臺功能模塊?

實習(xí)管理系統(tǒng),用戶進入到系統(tǒng)首頁,可以查看首頁,系統(tǒng)公告,個人中心,后臺管理等內(nèi)容進行操作,如圖

學(xué)生注冊

在學(xué)生注冊頁面中輸入學(xué)生學(xué)號,學(xué)生姓名,密碼,確認密碼,年級,聯(lián)系電話,院系,專業(yè)等內(nèi)容進行用戶注冊操作;如圖?

個人中心

在個人中心頁面中輸入學(xué)生學(xué)號,學(xué)生姓名,密碼,年級,班級,性別,聯(lián)系電話,院系,專業(yè)等內(nèi)容進行更新信息,如圖?

??

后臺功能模塊?

后臺用戶登錄,通過填寫注冊時輸入的用戶名、密碼、選擇角色等信息進行登錄操作,如圖

?

管理員功能

管理員登錄進入實習(xí)管理系統(tǒng)可以查看首頁,個人中心,班級管理,學(xué)生管理,教師管理,實習(xí)單位管理,實習(xí)作業(yè)管理,教師評分管理,單位成績管理,系統(tǒng)管理等功能進行詳細操作,如圖?

?

班級管理

在班級管理頁面中可以查看索引,班級等內(nèi)容,并進行詳情,修改和刪除操作;如圖

?

學(xué)生管理

在學(xué)生管理頁面中可以查看索引,學(xué)生學(xué)號,學(xué)生姓名,年級,班級,性別,聯(lián)系電話,院系,專業(yè)等內(nèi)容,并進行詳情,修改和刪除操作;如圖?

教師管理

在教師管理頁面中可以查看索引,教師工號,教師姓名,性別,職稱,聯(lián)系電話等內(nèi)容,并進行詳情,修改或刪除操作;如圖?

實習(xí)單位管理

在實習(xí)單位管理頁面中可以查看索引,單位名稱,單位性質(zhì),地址,負責(zé)人,聯(lián)系電話,郵箱,單位地址等內(nèi)容,并進行詳情,修改和刪除操作;如圖?

教師評分管理

在教師評分管理頁面中可以查看索引,單位名稱,單位地址,教師工號,教師姓名,學(xué)生學(xué)號,學(xué)生姓名,實習(xí)評分,批改時間等內(nèi)容,并進行詳情,修改和刪除操作;如圖?

教師功能?

教師登錄進入實習(xí)管理系統(tǒng)可以查看首頁,個人中心,實習(xí)作業(yè)管理,教師評分管理等功能進行詳細操作,如圖

個人中心

在個人中心頁面通過填寫教師工號,教師姓名,性別,職稱,聯(lián)系電話等內(nèi)容進行個人信息修改操作;如圖?

實習(xí)作業(yè)管理

在實習(xí)作業(yè)管理頁面中可以查看索引,實習(xí)崗位,單位名稱,單位地址,學(xué)生學(xué)號,學(xué)生姓名,班級,專業(yè),院系,教師工號,教師姓名,實習(xí)時間,實習(xí)報告等內(nèi)容,并進行詳情或教師評分操作;如圖?

學(xué)生功能?

學(xué)生登錄進入實習(xí)管理系統(tǒng)可以查看首頁,個人中心,實習(xí)作業(yè)管理,教師評分管理單位成績管理等功能進行詳細操作,如圖

實習(xí)作業(yè)管理

在實習(xí)作業(yè)管理頁面中可以查看索引,實習(xí)崗位,單位名稱,單位地址,學(xué)生學(xué)號,學(xué)生姓名,班級,專業(yè),院系,教師工號,教師姓名,實習(xí)時間,實習(xí)報告等內(nèi)容,并進行詳情,修改或刪除操作;如圖

?

單位成績管理

在單位成績管理頁面中可以查看索引,學(xué)生學(xué)號,學(xué)生姓名,工作態(tài)度,任務(wù)完成率,工作積極性,考核結(jié)果,單位名稱,提交時間等內(nèi)容,并進行詳情操作;如圖?

實習(xí)單位功能?

實習(xí)單位登錄進入實習(xí)管理系統(tǒng)可以查看首頁,個人中心,實習(xí)作業(yè)管理,單位成績管理等功能進行詳細操作,如圖

個人中心

在個人中心頁面通過填寫單位名稱,單位性質(zhì),地址,負責(zé)人,聯(lián)系電話,郵箱,單位地址等內(nèi)容進行個人信息修改操作;如圖?

實習(xí)作業(yè)管理

在實習(xí)作業(yè)管理頁面中可以查看索引,實習(xí)崗位,單位名稱,單位地址,學(xué)生學(xué)號,學(xué)生姓名,班級,專業(yè),院系,教師工號,教師姓名,實習(xí)時間,實習(xí)報告等內(nèi)容,并進行詳情或單位成績操作;如圖?

部分核心代碼:?

教師

/*** 教師* 后端接口* @author * @email * @date 2022-02-22 12:29:31*/ @RestController @RequestMapping("/jiaoshi") public class JiaoshiController {@Autowiredprivate JiaoshiService jiaoshiService;@Autowiredprivate TokenService tokenService;/*** 登錄*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {JiaoshiEntity user = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("賬號或密碼不正確");}String token = tokenService.generateToken(user.getId(), username,"jiaoshi", "管理員" );return R.ok().put("token", token);}/*** 注冊*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody JiaoshiEntity jiaoshi){//ValidatorUtils.validateEntity(jiaoshi);JiaoshiEntity user = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));if(user!=null) {return R.error("注冊用戶已存在");}Long uId = new Date().getTime();jiaoshi.setId(uId);jiaoshiService.insert(jiaoshi);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 獲取用戶的session用戶信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");JiaoshiEntity user = jiaoshiService.selectById(id);return R.ok().put("data", user);}/*** 密碼重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){JiaoshiEntity user = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", username));if(user==null) {return R.error("賬號不存在");}user.setMima("123456");jiaoshiService.updateById(user);return R.ok("密碼已重置為:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,JiaoshiEntity jiaoshi,HttpServletRequest request){EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();PageUtils page = jiaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaoshi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,JiaoshiEntity jiaoshi, HttpServletRequest request){EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();PageUtils page = jiaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaoshi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( JiaoshiEntity jiaoshi){EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();ew.allEq(MPUtil.allEQMapPre( jiaoshi, "jiaoshi")); return R.ok().put("data", jiaoshiService.selectListView(ew));}/*** 查詢*/@RequestMapping("/query")public R query(JiaoshiEntity jiaoshi){EntityWrapper< JiaoshiEntity> ew = new EntityWrapper< JiaoshiEntity>();ew.allEq(MPUtil.allEQMapPre( jiaoshi, "jiaoshi")); JiaoshiView jiaoshiView = jiaoshiService.selectView(ew);return R.ok("查詢教師成功").put("data", jiaoshiView);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){JiaoshiEntity jiaoshi = jiaoshiService.selectById(id);return R.ok().put("data", jiaoshi);}/*** 前端詳情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){JiaoshiEntity jiaoshi = jiaoshiService.selectById(id);return R.ok().put("data", jiaoshi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){jiaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(jiaoshi);JiaoshiEntity user = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));if(user!=null) {return R.error("用戶已存在");}jiaoshi.setId(new Date().getTime());jiaoshiService.insert(jiaoshi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){jiaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(jiaoshi);JiaoshiEntity user = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));if(user!=null) {return R.error("用戶已存在");}jiaoshi.setId(new Date().getTime());jiaoshiService.insert(jiaoshi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){//ValidatorUtils.validateEntity(jiaoshi);jiaoshiService.updateById(jiaoshi);//全部更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){jiaoshiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<JiaoshiEntity> wrapper = new EntityWrapper<JiaoshiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = jiaoshiService.selectCount(wrapper);return R.ok().put("count", count);}}

上傳文件

/*** 上傳文件映射表*/ @RestController @RequestMapping("file") @SuppressWarnings({"unchecked","rawtypes"}) public class FileController{@Autowiredprivate ConfigService configService;/*** 上傳文件*/@RequestMapping("/upload")public 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);/*** 如果使用idea或者eclipse重啟項目,發(fā)現(xiàn)之前上傳的圖片或者文件丟失,將下面一行代碼注釋打開* 請將以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替換成你本地項目的upload路徑,* 并且項目路徑不能存在中文、空格等特殊字符*/ // FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路徑以后請將該行最前面的//注釋去掉**/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()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/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);}}

總結(jié)

以上是生活随笔為你收集整理的SpringBoot+Vue实现前后端分离的实习管理系统的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。