Ver código fonte

Merge branch 'dev1.0' of http://123.207.73.252:3000/lsw/hospital into dev1.0

Ciallo 8 meses atrás
pai
commit
4edeb26ffb

+ 7 - 4
admin-ui/src/views/work/patient/index.vue

@@ -95,8 +95,10 @@ export default {
     /** 查询患者列表*/
     getList(){
       this.get({
-        url:'/work/pv1/patientCard',
-        data:this.queryParams
+        url:'/work/visit/patientCard',
+        data: {
+          ...this.queryParams
+        }
       }).then((response)=>{
         this.patientList = response.rows;
         this.total = response.total;
@@ -105,9 +107,10 @@ export default {
     /** 查询部门 */
     getDepartment() {
       this.get({
-        url:'/work/pv1/department'
+        url:'/work/visit/department'
       }).then((response) => {
         this.deptOptions = response.rows;
+        console.log(this.deptOptions)
       });
     },
     handleNodeClick(department){
@@ -119,7 +122,7 @@ export default {
     },
     op(tag, row) {
       if (tag === 'search') {
-        this.iframe({ obj: search, param: {id:row.patientId,cardId:row.cardId, name:row.name, department:row.department}, title:'查看患者信息',width: '90%', height: '90%'});
+        this.iframe({ obj: search, param: {id:row.patId, cardId:row.cardId, name:row.name, department:row.department}, title:'查看患者信息',width: '90%', height: '90%'});
       }
     },
     handleQuery() {

+ 26 - 33
admin-ui/src/views/work/patient/search.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="container" style="height: 80vh; width: 95vw">
+  <div class="container" style="height: 80vh; width: 87vw">
     <el-row :gutter="10">
       <el-col :span="5">
         <!-- 左边的导航菜单 -->
@@ -22,7 +22,7 @@
                   <template slot="title">
                     <span>{{month}}月</span>
                   </template>
-                  <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2)" :key="item.id" :index="item.id">
+                  <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2); getDgList()" :key="item.id" :index="item.id">
                     {{year}}年{{month}}月{{item.day}}日
                   </el-menu-item>
                 </el-submenu>
@@ -38,7 +38,7 @@
           <div class="patient-info-nk" v-if="active === 1">
             <!-- 患者基本信息 -->
             <div class="patient-info">
-              <el-descriptions  style="width: 100%" title="患者信息" :column="3" border>
+              <el-descriptions  style="width: 69vw; margin-top: 10px" title="患者信息" :column="3" border>
                 <el-descriptions-item label="患者标识符">{{patientInfo.patientCode}}</el-descriptions-item>
                 <el-descriptions-item label="就诊卡号">{{patientInfo.cardNumber}}</el-descriptions-item>
                 <el-descriptions-item label="姓名">{{patientInfo.name}}</el-descriptions-item>
@@ -62,7 +62,7 @@
             </div>
             <!-- 患者亲属 -->
             <div class="patient-nk" style="margin-top: 10px">
-              <el-table height="calc(75vh - 270px)" width="67vw" :data="nkList">
+              <el-table style="width:69vw;" height="calc(75vh - 270px)"  :data="nkList" highlight-current-row>
                 <el-table-column label="姓名" align="center" prop="name"></el-table-column>
                 <el-table-column label="所属关系" align="center" prop="kinship"></el-table-column>
                 <el-table-column label="近亲地址" align="center" prop="address"></el-table-column>
@@ -77,7 +77,7 @@
           <div class="dg-info" v-if="active === 2">
             <!-- 单次就诊的详细信息 -->
             <div class="pv">
-              <el-descriptions :column="3" border height="calc(90vh - 273px)" title="就诊信息">
+              <el-descriptions :column="3" border style="width: 69vw; margin-top: 10px"  title="就诊信息">
                 <el-descriptions-item label="患者类别">
                   <dict-tag :options="dict.type.patient_category" :value="pvList.patientCategory"></dict-tag>
                 </el-descriptions-item>
@@ -102,8 +102,9 @@
             </div>
             <!-- 诊断结果列表 -->
             <div class="dg" style="margin-top: 10px">
-              <el-table width="67vw" height="calc(75vh - 270px)" :data="dgList">
-                <el-table-column label="诊断名称" align="center" prop="diagnosticCode"></el-table-column>
+              <el-table style=" width:69vw;" height="calc(75vh - 270px)" :data="dgList" highlight-current-row>
+                <el-table-column label="诊断名称" align="center" prop="diagnosticName"></el-table-column>
+                <el-table-column label="诊断代码" align="center" prop="diagnosticCode"></el-table-column>
                 <el-table-column label="诊断时间" align="center" prop="diagnosisTime"></el-table-column>
                 <el-table-column label="诊断类型" align="center" prop="diagnosticType">
                   <template slot-scope="scope">
@@ -130,13 +131,16 @@ export default {
   dicts: ['patient_category','diagnostic_type', 'diagnostic_category_code','hospital_status','discharge_method','patient_sex','patient_marital'],
   data(){
     return{
-      isGrouped: false,
+      //groupDates的变量
       year:undefined,
       month:undefined,
       day:undefined,
       id:undefined,
+      //显示的界面标记
       active:1,
+      //获取就诊时间的记录
       timeList:null,
+      //处理时间的分组
       groupedDates: {},
       //亲属表数据总条数
       totalNk:0,
@@ -155,7 +159,8 @@ export default {
       //查询参数
       queryParams:{
         pageNum:1,
-        pageSize:10
+        pageSize:10,
+        visitId:undefined,
       }
     }
   },
@@ -165,22 +170,22 @@ export default {
     this.getTime();
     this.getPatient();
     this.activePatient(1);
+    this.getNkList();
   },
   methods:{
     activePatient(sign) {
       if (sign === 1) {
-        this.getNkList();
         this.active = sign;
       }
       if (sign === 2) {
-        this.getDgList();
         this.active = sign;
       }
     },
     /** 查询某一次的就诊信息 */
     getCard(id){
+      this.queryParams.visitId = id;
       this.get({
-        url:'/work/pv1/list',
+        url:'/work/visit/list',
         data:{
           id:id
         }
@@ -190,28 +195,24 @@ export default {
     },
     /** 查询某科室某个病人的就诊记录 */
     getTime(){
-      console.log("1")
       this.get({
-        url:'/work/pv1/list',
+        url:'/work/visit/list',
         data:{
-          patientId:this.param.id,
+          patId:this.param.id,
           department:this.param.department
         }
       }).then( (response) => {
+        console.log(typeof response.rows[0].id)
         this.timeList = response.rows;
+        console.log(this.timeList)
         this.groupDates(this.timeList);
       })
     },
     groupDates(dates) {
-      console.log("2")
-      console.log(this.isGrouped)
-      if (this.isGrouped) {
-        return;
-      }
       dates.forEach(date => {
         this.year = date.admissionTime.substring(0, 4);
-        this.month = date.admissionTime.substring(4, 6);
-        this.day = date.admissionTime.substring(6, 8);
+        this.month = date.admissionTime.substring(5, 7);
+        this.day = date.admissionTime.substring(8, 10);
         this.id = date.id;
         if (!this.groupedDates[this.year]) {
           this.groupedDates[this.year] = {};
@@ -221,26 +222,22 @@ export default {
         }
         this.groupedDates[this.year][this.month].push({id: this.id, day: this.day});
       })
-      this.isGrouped = true;
       this.$forceUpdate();
     },
     /** 查询患者信息 */
     getPatient(){
-      console.log("3")
       this.get({
         url:'/work/patient/detail/'+this.param.id,
       }).then((response)=>{
         this.patientInfo = response.data;
-        console.log(this.patientInfo)
       })
     },
     /** 查询亲属表 */
     getNkList() {
-      console.log("4")
       this.get({
         url:'/work/nk/list',
         data:{
-          patientId:this.param.id,
+          patId:this.param.id,
           ...this.queryParams
         }
       }).then((response)=>{
@@ -250,13 +247,9 @@ export default {
     },
     /** 查询诊断记录表 */
     getDgList(){
-      console.log("5")
       this.get({
-        url:'/work/dg/list',
-        data:{
-          patientId:this.patientInfo.id,
-          ...this.queryParams
-        }
+        url:'/work/diagnosis/list',
+        data: this.queryParams
       }).then((response)=>{
         this.dgList = response.rows;
         this.totalDg = response.total;

+ 6 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_UserController.java

@@ -10,6 +10,7 @@ import com.ruoyi.web.work.service.IBindUserService;
 import com.ruoyi.web.work.service.IUserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -44,15 +45,16 @@ public class Api_UserController extends BaseController {
         return bindUserService.remove(id);
     }
 
+    @ApiOperation(value = "切换就诊人")
     @GetMapping(value = "/bind/change/{id}")
-    public AjaxResult change(@PathVariable("id") Long id) throws ServerException {
+    public AjaxResult change(@ApiParam(value = "就诊人ID", required = true) @PathVariable("id") Long id) throws ServerException {
         return bindUserService.change(id);
     }
 
+    @ApiOperation(value = "就诊人列表")
     @GetMapping("/bind/list")
-    public AjaxResult list(BindUser bindUser) {
-        bindUser.setUserId(getUser().getId());
-        List<BindUser> list = bindUserService.selectList(bindUser);
+    public AjaxResult list() {
+        List<BindUser> list = bindUserService.selectList(new BindUser().setUserId(getUser().getId()));
         return AjaxResult.success(list);
     }