From 3a901e69d32387738cb626c2c28804138ee2aa12 Mon Sep 17 00:00:00 2001 From: congcong Date: Sat, 18 Apr 2020 17:30:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/views/MenZhen.vue | 663 +++++++++++++++++++++++++ front/src/router/index.js | 7 +- 2 files changed, 669 insertions(+), 1 deletion(-) create mode 100644 front/src/components/views/MenZhen.vue diff --git a/front/src/components/views/MenZhen.vue b/front/src/components/views/MenZhen.vue new file mode 100644 index 0000000..f35b1f0 --- /dev/null +++ b/front/src/components/views/MenZhen.vue @@ -0,0 +1,663 @@ + + + + + \ No newline at end of file diff --git a/front/src/router/index.js b/front/src/router/index.js index f890778..f2d5c69 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -2,6 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' import HelloWorld from '@/components/views/HelloWorld' import Yiji from '@/components/views/Yiji' +import MenZhen from '@/components/views/MenZhen' Vue.use(Router) export default new Router({ @@ -16,6 +17,10 @@ export default new Router({ name: 'Yiji', component: Yiji }, - + { + path: '/menzhen/', + name: 'MenZhen', + component: MenZhen + } ] }) -- Gitee From 8f54fb3c3280a18b4e6b7da8b741794c0071d481 Mon Sep 17 00:00:00 2001 From: congcong Date: Sat, 18 Apr 2020 17:47:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../back/controller/MenZhenController.java | 21 +++++++++++++++++++ .../com/his/back/service/MenZhenService.java | 16 ++++++++++++++ .../serviceImpl/MenZhenServiceimpl.java | 19 +++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 back/src/main/java/com/his/back/controller/MenZhenController.java create mode 100644 back/src/main/java/com/his/back/service/MenZhenService.java create mode 100644 back/src/main/java/com/his/back/service/serviceImpl/MenZhenServiceimpl.java diff --git a/back/src/main/java/com/his/back/controller/MenZhenController.java b/back/src/main/java/com/his/back/controller/MenZhenController.java new file mode 100644 index 0000000..b46c111 --- /dev/null +++ b/back/src/main/java/com/his/back/controller/MenZhenController.java @@ -0,0 +1,21 @@ +package com.his.back.controller; + +import com.his.back.service.MenZhenService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.his.back.pojo.member; + +@RestController +@CrossOrigin(origins = "*", maxAge = 3600) +@RequestMapping("/menZhen") +public class MenZhenController { + @Autowired + MenZhenService menZhenService; + + @RequestMapping("/find") + public member find(@RequestParam String content){ + System.out.println("find ->content: "+content); + System.out.println("-> member: "+menZhenService.find("%"+content+"%").toString()); + return menZhenService.find("%"+content+"%"); + } +} diff --git a/back/src/main/java/com/his/back/service/MenZhenService.java b/back/src/main/java/com/his/back/service/MenZhenService.java new file mode 100644 index 0000000..678678a --- /dev/null +++ b/back/src/main/java/com/his/back/service/MenZhenService.java @@ -0,0 +1,16 @@ +package com.his.back.service; + +import com.his.back.pojo.member; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public interface MenZhenService { + /** + * 通过患者的姓名或者病历号查找患者 + * @param content + * @return + */ + member find(String content); +} diff --git a/back/src/main/java/com/his/back/service/serviceImpl/MenZhenServiceimpl.java b/back/src/main/java/com/his/back/service/serviceImpl/MenZhenServiceimpl.java new file mode 100644 index 0000000..5cfba5b --- /dev/null +++ b/back/src/main/java/com/his/back/service/serviceImpl/MenZhenServiceimpl.java @@ -0,0 +1,19 @@ +package com.his.back.service.serviceImpl; + +import com.his.back.service.MenZhenService; +import com.his.back.dao.memberMapper; +import com.his.back.pojo.member; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MenZhenServiceimpl implements MenZhenService{ + @Autowired + memberMapper memberMapper; + + @Override + public member find(String content){ + return memberMapper.find(content); + } + +} -- Gitee From e933528ae448d310d49dd6f2b068bd181b59edfa Mon Sep 17 00:00:00 2001 From: congcong Date: Sat, 18 Apr 2020 18:00:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E9=97=A8=E8=AF=8A=E5=8C=BB=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/views/HelloWorld.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/front/src/components/views/HelloWorld.vue b/front/src/components/views/HelloWorld.vue index 6f37cae..03ee2d1 100644 --- a/front/src/components/views/HelloWorld.vue +++ b/front/src/components/views/HelloWorld.vue @@ -100,7 +100,17 @@ export default { }else if(find.userType=='caiwu'){ }else if(find.userType=='menzhen'){ - + if(find.userType!=this.userForm.type){ + this.$message({ + showClose: true, + message: '用户类型不符', + type: 'warn' + }); + console.log("type error!"); + }else{ + sessionStorage.setItem("user",JSON.stringify(find)); + this.$router.push({path: '/menzhen', replace: true}); + } }else if(find.userType=='yiji'){ if(find.userType!=this.userForm.type){ this.$message({ -- Gitee