Explorar el Código

feat:患者就诊信息页面修改

lll20312 hace 8 meses
padre
commit
acfc38223e

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

@@ -1,10 +1,10 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
     <!-- 行容器 -->
     <!-- 行容器 -->
-    <el-row :gutter="20">
+    <el-row :gutter="20" style="height: 100%">
       <!-- 列容器 -->
       <!-- 列容器 -->
       <!-- 左边的列表,显示各个科室 -->
       <!-- 左边的列表,显示各个科室 -->
-      <el-col :span="4" style="box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%); border-right: 1px solid #f1f2f4; overflow-y: auto">
+      <el-col :span="4" style="box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%); border-right: 1px solid #f1f2f4; overflow-y: auto; height: 100%">
         <el-menu v-for="(item,index) in deptOptions">
         <el-menu v-for="(item,index) in deptOptions">
           <el-menu-item @click="handleNodeClick(item.department)" :key="index">
           <el-menu-item @click="handleNodeClick(item.department)" :key="index">
             <span slot="title">{{item.department}}</span>
             <span slot="title">{{item.department}}</span>
@@ -12,7 +12,7 @@
         </el-menu>
         </el-menu>
       </el-col>
       </el-col>
       <!-- 患者诊断记录列表 -->
       <!-- 患者诊断记录列表 -->
-      <el-col :span="20">
+      <el-col :span="20" style="height: 100%">
         <el-form :model="queryParams" ref="queryForm" :inline="true" >
         <el-form :model="queryParams" ref="queryForm" :inline="true" >
           <el-form-item prop="physician">
           <el-form-item prop="physician">
             <el-input v-model="queryParams.physician" placeholder="请输入主治医生" clearable @keyup.enter.native="handleQuery" class="se" />
             <el-input v-model="queryParams.physician" placeholder="请输入主治医生" clearable @keyup.enter.native="handleQuery" class="se" />
@@ -25,7 +25,7 @@
             <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
             <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
-        <el-table :data="patientList" border @selection-change="selects" height="calc(100vh - 270px)">
+        <el-table :data="patientList" border @selection-change="selects" height="calc(100vh - 230px)">
           <el-table-column type="selection" width="55" align="center" />
           <el-table-column type="selection" width="55" align="center" />
           <el-table-column label="科室" align="center" prop="department" />
           <el-table-column label="科室" align="center" prop="department" />
           <el-table-column label="患者姓名" align="center" prop="name" />
           <el-table-column label="患者姓名" align="center" prop="name" />
@@ -119,7 +119,7 @@ export default {
     },
     },
     op(tag, row) {
     op(tag, row) {
       if (tag === 'search') {
       if (tag === 'search') {
-        this.iframe({ obj: search, param: {id:row.patientId,cardId:row.cardId, name:row.name, department:row.department}, title:'查看患者信息',width: '100%', height: '100%'});
+        this.iframe({ obj: search, param: {id:row.patientId,cardId:row.cardId, name:row.name, department:row.department}, title:'查看患者信息',width: '90%', height: '90%'});
       }
       }
     },
     },
     handleQuery() {
     handleQuery() {

+ 29 - 35
admin-ui/src/views/work/patient/search.vue

@@ -18,7 +18,7 @@
                 <template slot="title">
                 <template slot="title">
                   <span>{{year}}年</span>
                   <span>{{year}}年</span>
                 </template>
                 </template>
-                <el-submenu v-for="(days,month) in mouths" :key="month" :index="month.toString()">
+                <el-submenu v-for="(days,month) in mouths" :key="month" :index="year.toString() + month.toString()">
                   <template slot="title">
                   <template slot="title">
                     <span>{{month}}月</span>
                     <span>{{month}}月</span>
                   </template>
                   </template>
@@ -62,7 +62,7 @@
             </div>
             </div>
             <!-- 患者亲属 -->
             <!-- 患者亲属 -->
             <div class="patient-nk" style="margin-top: 10px">
             <div class="patient-nk" style="margin-top: 10px">
-              <el-table height="calc(75vh - 190px)" width="69vw" :data="nkList">
+              <el-table height="calc(75vh - 270px)" width="67vw" :data="nkList">
                 <el-table-column label="姓名" align="center" prop="name"></el-table-column>
                 <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="kinship"></el-table-column>
                 <el-table-column label="近亲地址" align="center" prop="address"></el-table-column>
                 <el-table-column label="近亲地址" align="center" prop="address"></el-table-column>
@@ -102,7 +102,7 @@
             </div>
             </div>
             <!-- 诊断结果列表 -->
             <!-- 诊断结果列表 -->
             <div class="dg" style="margin-top: 10px">
             <div class="dg" style="margin-top: 10px">
-              <el-table width="69vw" height="calc(75vh - 190px)" :data="dgList">
+              <el-table width="67vw" height="calc(75vh - 270px)" :data="dgList">
                 <el-table-column label="诊断名称" align="center" prop="diagnosticCode"></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="diagnosisTime"></el-table-column>
                 <el-table-column label="诊断类型" align="center" prop="diagnosticType">
                 <el-table-column label="诊断类型" align="center" prop="diagnosticType">
@@ -131,6 +131,10 @@ export default {
   data(){
   data(){
     return{
     return{
       isGrouped: false,
       isGrouped: false,
+      year:undefined,
+      month:undefined,
+      day:undefined,
+      id:undefined,
       active:1,
       active:1,
       timeList:null,
       timeList:null,
       groupedDates: {},
       groupedDates: {},
@@ -158,13 +162,13 @@ export default {
   watch:{
   watch:{
   },
   },
   created() {
   created() {
-    this.activePatient(1);
     this.getTime();
     this.getTime();
+    this.getPatient();
+    this.activePatient(1);
   },
   },
   methods:{
   methods:{
-    async activePatient(sign) {
+    activePatient(sign) {
       if (sign === 1) {
       if (sign === 1) {
-        this.getPatient();
         this.getNkList();
         this.getNkList();
         this.active = sign;
         this.active = sign;
       }
       }
@@ -186,39 +190,43 @@ export default {
     },
     },
     /** 查询某科室某个病人的就诊记录 */
     /** 查询某科室某个病人的就诊记录 */
     getTime(){
     getTime(){
-      this.ajax({
+      console.log("1")
+      this.get({
         url:'/work/pv1/list',
         url:'/work/pv1/list',
         data:{
         data:{
           patientId:this.param.id,
           patientId:this.param.id,
           department:this.param.department
           department:this.param.department
         }
         }
-      }).then((response)=>{
+      }).then( (response) => {
         this.timeList = response.rows;
         this.timeList = response.rows;
         this.groupDates(this.timeList);
         this.groupDates(this.timeList);
       })
       })
     },
     },
-    groupDates(dates){
+    groupDates(dates) {
+      console.log("2")
+      console.log(this.isGrouped)
       if (this.isGrouped) {
       if (this.isGrouped) {
-        // 如果已经获取了就诊日期数据,直接返回
         return;
         return;
       }
       }
       dates.forEach(date => {
       dates.forEach(date => {
-        let year = date.admissionTime.substring(0, 4);
-        let month = date.admissionTime.substring(4, 6);
-        let day = date.admissionTime.substring(6, 8);
-        let id = date.id;
-        if (!this.groupedDates[year]) {
-          this.groupedDates[year] = {};
+        this.year = date.admissionTime.substring(0, 4);
+        this.month = date.admissionTime.substring(4, 6);
+        this.day = date.admissionTime.substring(6, 8);
+        this.id = date.id;
+        if (!this.groupedDates[this.year]) {
+          this.groupedDates[this.year] = {};
         }
         }
-        if (!this.groupedDates[year][month]) {
-          this.groupedDates[year][month] = [];
+        if (!this.groupedDates[this.year][this.month]) {
+          this.groupedDates[this.year][this.month] = [];
         }
         }
-        this.groupedDates[year][month].push({id: id, day: day});
+        this.groupedDates[this.year][this.month].push({id: this.id, day: this.day});
       })
       })
       this.isGrouped = true;
       this.isGrouped = true;
+      this.$forceUpdate();
     },
     },
     /** 查询患者信息 */
     /** 查询患者信息 */
     getPatient(){
     getPatient(){
+      console.log("3")
       this.get({
       this.get({
         url:'/work/patient/detail/'+this.param.id,
         url:'/work/patient/detail/'+this.param.id,
       }).then((response)=>{
       }).then((response)=>{
@@ -226,19 +234,9 @@ export default {
         console.log(this.patientInfo)
         console.log(this.patientInfo)
       })
       })
     },
     },
-    /** 查询某一次就诊信息 */
-    getPvList(){
-      this.get({
-        url:'/work/pv1/list',
-        data:{
-          cardId:this.param.cardId
-        }
-      }).then((response)=>{
-        this.pvList = response.rows[0];
-      })
-    },
     /** 查询亲属表 */
     /** 查询亲属表 */
     getNkList() {
     getNkList() {
+      console.log("4")
       this.get({
       this.get({
         url:'/work/nk/list',
         url:'/work/nk/list',
         data:{
         data:{
@@ -252,6 +250,7 @@ export default {
     },
     },
     /** 查询诊断记录表 */
     /** 查询诊断记录表 */
     getDgList(){
     getDgList(){
+      console.log("5")
       this.get({
       this.get({
         url:'/work/dg/list',
         url:'/work/dg/list',
         data:{
         data:{
@@ -266,8 +265,3 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
-
-
-<style scoped lang="scss">
-
-</style>