2
0

2 کامیت‌ها 225eafdec9 ... 5809ebbb36

نویسنده SHA1 پیام تاریخ
  lmx 5809ebbb36 Merge remote-tracking branch 'origin/dev1.0' into dev1.0 8 ماه پیش
  lmx 2e3a0cf62d feat:患者信息 8 ماه پیش
2فایلهای تغییر یافته به همراه51 افزوده شده و 27 حذف شده
  1. 4 7
      admin-ui/src/views/work/patient/index.vue
  2. 47 20
      admin-ui/src/views/work/patient/search.vue

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

@@ -38,11 +38,11 @@
           <el-table-column label="出院时间" align="center" prop="dischargeTime" />
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
-              <el-button size="mini" type="text" icon="el-icon-search" @click="op('search',scope.row)" v-hasPermi="['work:dg:edit']">查看</el-button>
-                        <el-button size="mini" type="text" icon="el-icon-search" @click="()=>{checkWindowShow = true; currentPatientInfo = {id: scope.row.patId, name: scope.row.name}}">
+              <el-button size="mini" type="text" icon="el-icon-search" @click="op('search',scope.row)" v-hasPermi="['work:dg:edit']">查看就诊信息</el-button>
+              <el-button size="mini" type="text" icon="el-icon-search" @click="()=>{checkWindowShow = true; currentPatientInfo = {id: scope.row.patId, name: scope.row.name}}">
                 查看检查项目
               </el-button>
-<!--              检测项目信息弹窗-->
+          <!-- 检测项目信息弹窗 -->
               <patient-check :check-window-show.sync="checkWindowShow" :patient-info="currentPatientInfo" />
             </template>
           </el-table-column>
@@ -83,7 +83,7 @@ export default {
         patientName:undefined,
         departmentName:undefined,
       },
-            /**
+      /**
        * 控制检测项目信息弹窗是否显示
        * @type {boolean} - 取值true显示弹窗
        */
@@ -99,8 +99,6 @@ export default {
       }
     };
   },
-  watch: {
-  },
   created() {
     this.getDepartment();
   },
@@ -131,7 +129,6 @@ export default {
         url:'/work/visit/department'
       }).then((response) => {
         this.deptOptions = response.rows;
-        console.log(this.deptOptions)
       });
     },
     handleNodeClick(department){

+ 47 - 20
admin-ui/src/views/work/patient/search.vue

@@ -4,7 +4,7 @@
       <el-col :span="5">
         <!-- 左边的导航菜单 -->
         <div class="left-body">
-          <el-menu default-active="1">
+          <el-menu :default-active="activeNow" @open="activeIndex">
             <el-menu-item index="1" @click="activePatient(1)">
               <i class="el-icon-user"></i>
               <span>患者基本信息/亲属</span>
@@ -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); getDgList()" :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.toString()">
                     {{year}}年{{month}}月{{item.day}}日
                   </el-menu-item>
                 </el-submenu>
@@ -39,25 +39,25 @@
             <!-- 患者基本信息 -->
             <div class="patient-info">
               <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>
-                <el-descriptions-item label="性别">
+                <el-descriptions-item label="患者标识符" v-if="patientInfo">{{patientInfo.patientCode}}</el-descriptions-item>
+                <el-descriptions-item label="就诊卡号" v-if="patientInfo">{{patientInfo.cardNumber}}</el-descriptions-item>
+                <el-descriptions-item label="姓名" v-if="patientInfo">{{patientInfo.name}}</el-descriptions-item>
+                <el-descriptions-item label="性别" v-if="patientInfo">
                   <dict-tag :options="dict.type.patient_sex" :value="patientInfo.sex"/>
                 </el-descriptions-item>
-                <el-descriptions-item label="身份证号" prop="sfzh">{{patientInfo.sfzh}}</el-descriptions-item>
-                <el-descriptions-item label="出生时间" prop="birthDate">{{patientInfo.birthDate}}</el-descriptions-item>
-                <el-descriptions-item label="居住地址" prop="address">{{patientInfo.address}}</el-descriptions-item>
-                <el-descriptions-item label="联系电话" prop="phone">{{patientInfo.phone}}</el-descriptions-item>
-                <el-descriptions-item label="婚姻状况" prop="marital">
+                <el-descriptions-item label="身份证号" v-if="patientInfo">{{patientInfo.sfzh}}</el-descriptions-item>
+                <el-descriptions-item label="出生时间" v-if="patientInfo">{{patientInfo.birthDate}}</el-descriptions-item>
+                <el-descriptions-item label="居住地址" v-if="patientInfo">{{patientInfo.address}}</el-descriptions-item>
+                <el-descriptions-item label="联系电话" v-if="patientInfo">{{patientInfo.phone}}</el-descriptions-item>
+                <el-descriptions-item label="婚姻状况" v-if="patientInfo">
                   <dict-tag :options="dict.type.patient_marital" :value="patientInfo.marital" />
                 </el-descriptions-item>
-                <el-descriptions-item label="民族" prop="nation">{{patientInfo.nation}}</el-descriptions-item>
-                <el-descriptions-item label="职业" prop="career">{{patientInfo.career}}</el-descriptions-item>
-                <el-descriptions-item label="国籍" prop="nationality">{{patientInfo.nationality}}</el-descriptions-item>
-                <el-descriptions-item label="病历号" prop="blh">{{patientInfo.blh}}</el-descriptions-item>
-                <el-descriptions-item label="病人卡号" prop="brkh">{{patientInfo.brkh}}</el-descriptions-item>
-                <el-descriptions-item label="婴儿序号" prop="yexh">{{patientInfo.yexh}}</el-descriptions-item>
+                <el-descriptions-item label="民族" v-if="patientInfo">{{patientInfo.nation}}</el-descriptions-item>
+                <el-descriptions-item label="职业" v-if="patientInfo">{{patientInfo.career}}</el-descriptions-item>
+                <el-descriptions-item label="国籍" v-if="patientInfo">{{patientInfo.nationality}}</el-descriptions-item>
+                <el-descriptions-item label="病历号" v-if="patientInfo">{{patientInfo.blh}}</el-descriptions-item>
+                <el-descriptions-item label="病人卡号" v-if="patientInfo">{{patientInfo.brkh}}</el-descriptions-item>
+                <el-descriptions-item label="婴儿序号" v-if="patientInfo">{{patientInfo.yexh}}</el-descriptions-item>
               </el-descriptions>
             </div>
             <!-- 患者亲属 -->
@@ -128,9 +128,15 @@
 
 <script>
 export default {
+  computed: {
+    index() {
+      return index
+    }
+  },
   dicts: ['patient_category','diagnostic_type', 'diagnostic_category_code','hospital_status','discharge_method','patient_sex','patient_marital'],
   data(){
     return{
+      activeNow:'1',
       //groupDates的变量
       year:undefined,
       month:undefined,
@@ -167,15 +173,33 @@ export default {
   watch:{
   },
   created() {
+    this.getNowDg();
     this.getTime();
     this.getPatient();
-    this.activePatient(1);
     this.getNkList();
   },
   methods:{
+    activeIndex(){
+      this.activeNow = this.pvList.id.toString()
+      this.active = 2
+      this.queryParams.visitId = this.pvList.id;
+      this.getDgList()
+    },
+    /** 获取当前选中的就诊记录 */
+    getNowDg(){
+      this.get({
+        url:'work/visit/list',
+        data:{
+          cardId:this.param.cardId
+        }
+      }).then((response)=>{
+        this.pvList = response.rows[0];
+      })
+    },
     activePatient(sign) {
       if (sign === 1) {
         this.active = sign;
+        this.activeNow = '1';
       }
       if (sign === 2) {
         this.active = sign;
@@ -183,6 +207,9 @@ export default {
     },
     /** 查询某一次的就诊信息 */
     getCard(id){
+      if(id === this.pvList.id){
+        return;
+      }
       this.queryParams.visitId = id;
       this.get({
         url:'/work/visit/list',
@@ -191,6 +218,8 @@ export default {
         }
       }).then((response)=>{
         this.pvList = response.rows[0];
+        this.activeNow = this.pvList.id.toString();
+        this.getDgList();
       })
     },
     /** 查询某科室某个病人的就诊记录 */
@@ -202,9 +231,7 @@ export default {
           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);
       })
     },