Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 4 years ago
parent
commit
6a6e1367b8

+ 0 - 25
src/utils/tools.js View File

@@ -175,28 +175,3 @@ export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
175 175
   // console.log((shouji + (shichang - t) * weichi).toFixed(1))
176 176
   return (shouji + (shichang - t) * weichi).toFixed(1)
177 177
 }
178
-
179
-
180
-export function formatDate (date, format) {
181
-  if (/(y+)/.test(format)) {
182
-      format= format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
183
-  }
184
-  let o = {
185
-      'M+': date.getMonth() + 1,
186
-      'd+': date.getDate(),
187
-      'h+': date.getHours(),
188
-      'm+': date.getMinutes(),
189
-      's+': date.getSeconds()
190
-  };
191
-  for (let k in o) {
192
-      if (new RegExp(`(${k})`).test(format)) {
193
-          let str = o[k] + '';
194
-          format= format.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
195
-      }
196
-  }
197
-  return format;
198
-};
199
-
200
-function padLeftZero (str) {
201
-  return ('00' + str).substr(str.length);
202
-};

+ 1 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -775,6 +775,7 @@
775 775
           }
776 776
           createHisPrescription(data, params).then(response => {
777 777
             if (response.data.state == 1) {
778
+              this.$emit("change")
778 779
               this.$message.success('保存成功')
779 780
             }
780 781
           })

+ 22 - 13
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue View File

@@ -30,25 +30,24 @@
30 30
 
31 31
       </el-tab-pane>
32 32
       <el-tab-pane label="病历详情" name="second">
33
-        <div class="detailMain">
34
-          <span style="width:240px;">处方号:{{order.prescription_number}}</span>
35
-          <span style="width:200px;">医生:{{order.doctor}}</span>
36
-          <span style="width:200px;">科室:{{getDepartMent(order.departments)}}</span>
37
-          <span style="width:200px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
38
-        </div>
39 33
         <div class="commonCell">
40
-          <p>基本信息</p>
34
+          <p style="color:#409EFF;">基本信息</p>
41 35
           <div class="detailMain">
42
-            <span style="width:240px;">疾病名称:{{case_history.diagnostic}}</span>
43
-            <span style="width:200px;">症状:{{case_history.diagnostic}}</span>
44
-            <span style="width:200px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
45
-            <span style="width:200px;" v-if="case_history.is_infect== 1">是否传染:是</span>
46
-          <span style="width:200px;" v-if="case_history.is_infect != 1">是否传染:否</span>
36
+            <span style="width:260px;">处方号:{{order.prescription_number}}</span>
37
+            <span style="width:180px;">姓名:{{order.patient.name}}</span>
38
+            <span style="width:240px;">证件号:{{order.patient.id_card_no}}</span>
39
+            <span style="width:180px;">联系电话:{{order.patient.phone}}</span>
40
+            <span style="width:260px;">医生:{{order.doctor}}</span>
41
+            <span style="width:180px;">科室:{{order.departments}}</span>
42
+            <span style="width:240px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
43
+            <!-- <span style="width:180px;">疾病名称:{{case_history.diagnostic}}</span>
44
+            <span style="width:180px;">症状:{{case_history.diagnostic}}</span> -->
45
+            
47 46
 
48 47
           </div>
49 48
         </div>
50 49
         <div class="commonCell">
51
-          <p>体格信息</p>
50
+          <p style="color:#409EFF;">体格信息</p>
52 51
           <div class="detailMain">
53 52
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
54 53
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
@@ -57,6 +56,14 @@
57 56
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
58 57
           </div>
59 58
         </div>
59
+        <div class="commonCell">
60
+          <p style="color:#409EFF;">病历信息</p>
61
+          <div class="detailMain">
62
+            <span style="width:260px;" v-if="case_history.is_infect== 1">是否传染:是</span>
63
+            <span style="width:260px;" v-if="case_history.is_infect != 1">是否传染:否</span>
64
+            <span style="width:180px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
65
+          </div>
66
+        </div>
60 67
         <div class="commonCell">
61 68
           <p>主诉</p>
62 69
           <div>{{case_history.chief_conplaint}}</div>
@@ -209,6 +216,7 @@ import moment from 'moment';
209 216
             this.case_history = response.data.data.order.case_history
210 217
             console.log("历史详情",this.case_history)
211 218
             this.order = response.data.data.order
219
+            console.log('this.order',this.order)
212 220
 
213 221
 
214 222
             this.prescriptions = []
@@ -319,6 +327,7 @@ import moment from 'moment';
319 327
   }
320 328
 
321 329
   .detailMain {
330
+    flex: 1;
322 331
   span {
323 332
     display: inline-block;
324 333
   }

+ 50 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -23,7 +23,7 @@
23 23
           </el-button>
24 24
         </div>
25 25
         <div>
26
-          <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' border style="width: 100%;"
26
+          <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' @current-change='currentChange' border style="width: 100%;"
27 27
                     :row-style="{ color: '#303133' }"
28 28
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
29 29
                     highlight-current-row
@@ -69,7 +69,7 @@
69 69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70 70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71 71
                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72
-                          v-if="titleType == '电子处方'" style="flex:1;"></desk-prescription>
72
+                          v-if="titleType == '电子处方'" style="flex:1;" v-on:change="changeTab"></desk-prescription>
73 73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74 74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75 75
 
@@ -209,11 +209,35 @@
209 209
         }
210 210
 
211 211
 
212
+      },changeTab(){
213
+        this.radio = 2
214
+        let params = {
215
+          'record_date': this.record_date,
216
+          'type': this.radio
217
+        }
218
+        this.patientTableData = []
219
+        getSchedulePatientList(params).then(response => {
220
+          if (response.data.state == 0) {
221
+            this.$message.error(response.data.msg)
222
+            return false
223
+          } else {
224
+            this.patientTableData = response.data.data.list
225
+            this.patientTableDataTwo = response.data.data.list
226
+            this.cal_one = response.data.data.total_one
227
+            this.cal_two =  response.data.data.total_two
228
+            this.admin_info =  response.data.data.info
229
+           for (let i = 0; i< this.patientTableData.length; i++){
230
+             if(this.patientTableData[i].patients.id == this.patientid){
231
+               this.$refs.tab.setCurrentRow(this.patientTableData[i])
232
+             }
233
+           }
234
+
235
+          }
236
+        })
237
+
212 238
       },
213 239
       change(val) {
214 240
         this.getList()
215
-
216
-
217 241
       },
218 242
       getList() {
219 243
         let params = {
@@ -236,6 +260,7 @@
236 260
 
237 261
             if(this.patientTableData.length > 0) {
238 262
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
263
+              this.oldCurrentRow = this.patientTableData[0]
239 264
               this.getPatientInfo(this.patientTableData[0])
240 265
             }
241 266
 
@@ -395,6 +420,7 @@
395 420
 
396 421
 
397 422
       },
423
+
398 424
       choosePatient(val) {
399 425
         let isShowDailog = false
400 426
         for (let i = 0; i < this.prescriptions.length; i++){
@@ -403,6 +429,12 @@
403 429
           }
404 430
         }
405 431
         if(isShowDailog){
432
+
433
+          this.patientTableData.map((item,index) => {
434
+            if(item.patient_id == this.oldCurrentRow.patient_id){
435
+              this.$refs.tab.setCurrentRow(this.patientTableData[index])
436
+            }
437
+          })
406 438
           this.$message.error('需要保存当前处方才能切换')
407 439
           return
408 440
         }
@@ -540,6 +572,20 @@
540 572
             this.$refs.prescriptions.setData(this.prescriptions,this.info)
541 573
           }
542 574
         })
575
+      },
576
+      currentChange(currentRow, oldCurrentRow){
577
+        let isShowDailog = false
578
+        for (let i = 0; i < this.prescriptions.length; i++){
579
+          if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
580
+            isShowDailog = true
581
+          }
582
+        }
583
+        if(!isShowDailog){
584
+          this.oldCurrentRow = currentRow
585
+          return
586
+        }
587
+
588
+
543 589
       },
544 590
       open(index) {
545 591
         console.log("index0999999",this.prescriptions)