Pārlūkot izejas kodu

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

XMLWAN 4 gadus atpakaļ
vecāks
revīzija
6a6e1367b8

+ 0 - 25
src/utils/tools.js Parādīt failu

175
   // console.log((shouji + (shichang - t) * weichi).toFixed(1))
175
   // console.log((shouji + (shichang - t) * weichi).toFixed(1))
176
   return (shouji + (shichang - t) * weichi).toFixed(1)
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 Parādīt failu

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

+ 22 - 13
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue Parādīt failu

30
 
30
 
31
       </el-tab-pane>
31
       </el-tab-pane>
32
       <el-tab-pane label="病历详情" name="second">
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
         <div class="commonCell">
33
         <div class="commonCell">
40
-          <p>基本信息</p>
34
+          <p style="color:#409EFF;">基本信息</p>
41
           <div class="detailMain">
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
           </div>
47
           </div>
49
         </div>
48
         </div>
50
         <div class="commonCell">
49
         <div class="commonCell">
51
-          <p>体格信息</p>
50
+          <p style="color:#409EFF;">体格信息</p>
52
           <div class="detailMain">
51
           <div class="detailMain">
53
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
52
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
54
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
53
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
57
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
56
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
58
           </div>
57
           </div>
59
         </div>
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
         <div class="commonCell">
67
         <div class="commonCell">
61
           <p>主诉</p>
68
           <p>主诉</p>
62
           <div>{{case_history.chief_conplaint}}</div>
69
           <div>{{case_history.chief_conplaint}}</div>
209
             this.case_history = response.data.data.order.case_history
216
             this.case_history = response.data.data.order.case_history
210
             console.log("历史详情",this.case_history)
217
             console.log("历史详情",this.case_history)
211
             this.order = response.data.data.order
218
             this.order = response.data.data.order
219
+            console.log('this.order',this.order)
212
 
220
 
213
 
221
 
214
             this.prescriptions = []
222
             this.prescriptions = []
319
   }
327
   }
320
 
328
 
321
   .detailMain {
329
   .detailMain {
330
+    flex: 1;
322
   span {
331
   span {
323
     display: inline-block;
332
     display: inline-block;
324
   }
333
   }

+ 50 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Parādīt failu

23
           </el-button>
23
           </el-button>
24
         </div>
24
         </div>
25
         <div>
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
                     :row-style="{ color: '#303133' }"
27
                     :row-style="{ color: '#303133' }"
28
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
28
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
29
                     highlight-current-row
29
                     highlight-current-row
69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71
                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
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
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75
 
75
 
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
       change(val) {
239
       change(val) {
214
         this.getList()
240
         this.getList()
215
-
216
-
217
       },
241
       },
218
       getList() {
242
       getList() {
219
         let params = {
243
         let params = {
236
 
260
 
237
             if(this.patientTableData.length > 0) {
261
             if(this.patientTableData.length > 0) {
238
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
262
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
263
+              this.oldCurrentRow = this.patientTableData[0]
239
               this.getPatientInfo(this.patientTableData[0])
264
               this.getPatientInfo(this.patientTableData[0])
240
             }
265
             }
241
 
266
 
395
 
420
 
396
 
421
 
397
       },
422
       },
423
+
398
       choosePatient(val) {
424
       choosePatient(val) {
399
         let isShowDailog = false
425
         let isShowDailog = false
400
         for (let i = 0; i < this.prescriptions.length; i++){
426
         for (let i = 0; i < this.prescriptions.length; i++){
403
           }
429
           }
404
         }
430
         }
405
         if(isShowDailog){
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
           this.$message.error('需要保存当前处方才能切换')
438
           this.$message.error('需要保存当前处方才能切换')
407
           return
439
           return
408
         }
440
         }
540
             this.$refs.prescriptions.setData(this.prescriptions,this.info)
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
       open(index) {
590
       open(index) {
545
         console.log("index0999999",this.prescriptions)
591
         console.log("index0999999",this.prescriptions)