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

csx 4 gadus atpakaļ
vecāks
revīzija
4109e3d9a0

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

6
     :before-close="_close"
6
     :before-close="_close"
7
     class="detailDialog"
7
     class="detailDialog"
8
   >
8
   >
9
-    <div style="position: absolute;right:20px;">
9
+    <div style="position: absolute;right:20px;z-index:99">
10
       <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
10
       <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
12
     </div>
12
     </div>
25
           <div class="RP">
25
           <div class="RP">
26
             Rp
26
             Rp
27
           </div>
27
           </div>
28
-          <new-prescription-table ref="prescription_tables"
29
-                                  :prescription="curPrescriptions"></new-prescription-table>
28
+          <new-prescription-table ref="prescription_tables" :prescription="curPrescriptions"></new-prescription-table>
30
         </el-tabs>
29
         </el-tabs>
31
 
30
 
32
       </el-tab-pane>
31
       </el-tab-pane>
33
       <el-tab-pane label="病历详情" name="second">
32
       <el-tab-pane label="病历详情" name="second">
34
-        <div class="detailMain">
35
-          <span style="width:240px;">处方号:{{order.prescription_number}}</span>
36
-          <span style="width:200px;">医生:{{order.doctor}}</span>
37
-          <span style="width:200px;">科室:{{order.departments}}</span>
38
-          <span style="width:200px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
39
-        </div>
40
         <div class="commonCell">
33
         <div class="commonCell">
41
-          <p>基本信息</p>
34
+          <p style="color:#409EFF;">基本信息</p>
42
           <div class="detailMain">
35
           <div class="detailMain">
43
-            <span style="width:240px;">疾病名称:{{case_history.diagnostic}}</span>
44
-            <span style="width:200px;">症状:{{case_history.diagnostic}}</span>
45
-            <span style="width:200px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
46
-            <span style="width:200px;" v-if="case_history.is_infect== 1">是否传染:是</span>
47
-          <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
+            
48
 
46
 
49
           </div>
47
           </div>
50
         </div>
48
         </div>
51
         <div class="commonCell">
49
         <div class="commonCell">
52
-          <p>体格信息</p>
50
+          <p style="color:#409EFF;">体格信息</p>
53
           <div class="detailMain">
51
           <div class="detailMain">
54
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
52
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
55
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
53
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
58
             <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>
59
           </div>
57
           </div>
60
         </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>
61
         <div class="commonCell">
67
         <div class="commonCell">
62
           <p>主诉</p>
68
           <p>主诉</p>
63
           <div>{{case_history.chief_conplaint}}</div>
69
           <div>{{case_history.chief_conplaint}}</div>
76
         </div>
82
         </div>
77
         <div class="commonCell">
83
         <div class="commonCell">
78
           <p>过敏史</p>
84
           <p>过敏史</p>
79
-          <div>{{order.sick_history}}</div>
85
+          <div>{{case_history.past_history}}</div>
80
         </div>
86
         </div>
81
         <div class="commonCell">
87
         <div class="commonCell">
82
           <p>既往史</p>
88
           <p>既往史</p>
106
   import { getHisPrescriptionInfo } from '@/api/his/his'
112
   import { getHisPrescriptionInfo } from '@/api/his/his'
107
   import NewPrescriptionTable from './newPrescriptionTable'
113
   import NewPrescriptionTable from './newPrescriptionTable'
108
   import { uParseTime } from '@/utils/tools'
114
   import { uParseTime } from '@/utils/tools'
115
+ import { getAllDoctorList } from "@/api/project/project"
116
+import moment from 'moment';
109
 
117
 
110
   export default {
118
   export default {
111
     components: { NewPrescriptionTable },
119
     components: { NewPrescriptionTable },
138
         search_input: '',
146
         search_input: '',
139
         case_history:{},
147
         case_history:{},
140
         order:{},
148
         order:{},
149
+        doctorList:[],
150
+        departmentList:[]
141
       }
151
       }
142
     },
152
     },
143
     methods: {
153
     methods: {
144
       open(index){
154
       open(index){
145
         if(index == 1){
155
         if(index == 1){
146
 
156
 
157
+          //  /outpatientDoctorStation/print?record=2020-12-11&prescription_id=157&ids=157,159&patient_id=1064
147
         }else if(index == 2){
158
         }else if(index == 2){
148
-
159
+           var record_date = this.format(this.case_history.sick_date)    
160
+          this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
149
         }
161
         }
150
       },
162
       },
151
       getTimes(time,temp) {
163
       getTimes(time,temp) {
202
             this.patientInfo = response.data.data.order.patient
214
             this.patientInfo = response.data.data.order.patient
203
             this.hisPatientInfo = response.data.data.order.his_patient
215
             this.hisPatientInfo = response.data.data.order.his_patient
204
             this.case_history = response.data.data.order.case_history
216
             this.case_history = response.data.data.order.case_history
217
+            console.log("历史详情",this.case_history)
205
             this.order = response.data.data.order
218
             this.order = response.data.data.order
219
+            console.log('this.order',this.order)
206
 
220
 
207
 
221
 
208
             this.prescriptions = []
222
             this.prescriptions = []
270
         // this.clear()
284
         // this.clear()
271
         this.visible = false
285
         this.visible = false
272
       },
286
       },
287
+     getAllDoctorList(){
288
+      getAllDoctorList().then(response=>{
289
+        if(response.data.state == 1){
290
+            var doctor =  response.data.data.doctor 
291
+            this.doctorList = doctor
292
+             var department = response.data.data.department
293
+             console.log("department",department)
294
+             this.departmentList = department
295
+            }
296
+         })   
297
+      },
298
+      getDepartMent(id){
299
+         var name = ""
300
+         for(let i=0;i<this.departmentList.length;i++){
301
+           if(id == this.departmentList[i].id){
302
+              name = this.departmentList[i].name
303
+           }
304
+         }
305
+         return name
306
+      },
307
+
308
+      format(time){
309
+        moment.locale()
310
+        var times = time*1000
311
+        times = moment(times).format('YYYY-MM-DD')
312
+        return times
313
+      }
314
+    },
315
+    created(){
316
+      this.getAllDoctorList()
273
     }
317
     }
274
   }
318
   }
275
 </script>
319
 </script>
283
   }
327
   }
284
 
328
 
285
   .detailMain {
329
   .detailMain {
330
+    flex: 1;
286
   span {
331
   span {
287
     display: inline-block;
332
     display: inline-block;
288
   }
333
   }

+ 34 - 12
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
259
 
259
 
260
             if(this.patientTableData.length > 0) {
260
             if(this.patientTableData.length > 0) {
261
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
261
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
262
+              this.oldCurrentRow = this.patientTableData[0]
262
               this.getPatientInfo(this.patientTableData[0])
263
               this.getPatientInfo(this.patientTableData[0])
263
             }
264
             }
264
 
265
 
417
 
418
 
418
 
419
 
419
       },
420
       },
421
+
420
       choosePatient(val) {
422
       choosePatient(val) {
421
-        // let isShowDailog = false
422
-        // for (let i = 0; i < this.prescriptions.length; i++){
423
-        //   if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
424
-        //     isShowDailog = true
425
-        //   }
426
-        // }
427
-        // if(isShowDailog){
428
-        //   this.$message.error('需要保存当前处方才能切换')
429
-        //   return
430
-        // }
431
-        //
423
+        let isShowDailog = false
424
+        for (let i = 0; i < this.prescriptions.length; i++){
425
+          if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
426
+            isShowDailog = true
427
+          }
428
+        }
429
+        if(isShowDailog){
430
+
431
+          this.patientTableData.map((item,index) => {
432
+            if(item.patient_id == this.oldCurrentRow.patient_id){
433
+              this.$refs.tab.setCurrentRow(this.patientTableData[index])
434
+            }
435
+          })
436
+          this.$message.error('需要保存当前处方才能切换')
437
+          return
438
+        }
439
+
432
 
440
 
433
         this.patientid = val.patients.id
441
         this.patientid = val.patients.id
434
         let params = {
442
         let params = {
562
             this.$refs.prescriptions.setData(this.prescriptions,this.info)
570
             this.$refs.prescriptions.setData(this.prescriptions,this.info)
563
           }
571
           }
564
         })
572
         })
573
+      },
574
+      currentChange(currentRow, oldCurrentRow){
575
+        let isShowDailog = false
576
+        for (let i = 0; i < this.prescriptions.length; i++){
577
+          if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
578
+            isShowDailog = true
579
+          }
580
+        }
581
+        if(!isShowDailog){
582
+          this.oldCurrentRow = currentRow
583
+          return
584
+        }
585
+
586
+
565
       },
587
       },
566
       open(index) {
588
       open(index) {
567
         console.log("index0999999",this.prescriptions)
589
         console.log("index0999999",this.prescriptions)

+ 16 - 5
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue Parādīt failu

41
 
41
 
42
         <div class="printTitle">病历内容</div>
42
         <div class="printTitle">病历内容</div>
43
         <div class="recordTitle">
43
         <div class="recordTitle">
44
-            <div>科别:{{hispatient.departments?hispatient.departments:''}}</div>
44
+            <div>科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
45
             <div>姓名:{{patient.name?patient.name:''}}</div>
45
             <div>姓名:{{patient.name?patient.name:''}}</div>
46
             <div>性别:
46
             <div>性别:
47
                 <span v-if="patient.gender == 1">男</span>
47
                 <span v-if="patient.gender == 1">男</span>
102
     },
102
     },
103
     data(){
103
     data(){
104
         return{
104
         return{
105
-            educationOptions:[]
105
+            educationOptions:[],
106
+            departmentList:[]
106
         }                   
107
         }                   
107
     },
108
     },
108
     methods:{
109
     methods:{
121
                var doctor =  response.data.data.doctor
122
                var doctor =  response.data.data.doctor
122
 
123
 
123
                this.doctorList = doctor
124
                this.doctorList = doctor
124
-            //    var department = response.data.data.department
125
-            //    console.log("department",department)
126
-            //    this.departmentList = department
125
+               var department = response.data.data.department
126
+               console.log("department",department)
127
+               this.departmentList = department
127
              }
128
              }
128
            })   
129
            })   
129
        },
130
        },
156
          }
157
          }
157
       })
158
       })
158
     },
159
     },
160
+    getDeparment(id){
161
+    console.log("id---",id)
162
+     var name = ''
163
+     for(let i=0;i<this.departmentList.length;i++){
164
+         if(id == this.departmentList[i].id){
165
+            name = this.departmentList[i].name
166
+         }
167
+      }
168
+      return name
169
+    }
159
     },
170
     },
160
     created(){
171
     created(){
161
       this.educationOptions = getDataConfig("patient", "education_types");
172
       this.educationOptions = getDataConfig("patient", "education_types");