瀏覽代碼

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

csx 4 年之前
父節點
當前提交
4109e3d9a0

+ 63 - 18
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue 查看文件

@@ -6,7 +6,7 @@
6 6
     :before-close="_close"
7 7
     class="detailDialog"
8 8
   >
9
-    <div style="position: absolute;right:20px;">
9
+    <div style="position: absolute;right:20px;z-index:99">
10 10
       <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
11 11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
12 12
     </div>
@@ -25,31 +25,29 @@
25 25
           <div class="RP">
26 26
             Rp
27 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 29
         </el-tabs>
31 30
 
32 31
       </el-tab-pane>
33 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 33
         <div class="commonCell">
41
-          <p>基本信息</p>
34
+          <p style="color:#409EFF;">基本信息</p>
42 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 47
           </div>
50 48
         </div>
51 49
         <div class="commonCell">
52
-          <p>体格信息</p>
50
+          <p style="color:#409EFF;">体格信息</p>
53 51
           <div class="detailMain">
54 52
             <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
55 53
             <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
@@ -58,6 +56,14 @@
58 56
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
59 57
           </div>
60 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 67
         <div class="commonCell">
62 68
           <p>主诉</p>
63 69
           <div>{{case_history.chief_conplaint}}</div>
@@ -76,7 +82,7 @@
76 82
         </div>
77 83
         <div class="commonCell">
78 84
           <p>过敏史</p>
79
-          <div>{{order.sick_history}}</div>
85
+          <div>{{case_history.past_history}}</div>
80 86
         </div>
81 87
         <div class="commonCell">
82 88
           <p>既往史</p>
@@ -106,6 +112,8 @@
106 112
   import { getHisPrescriptionInfo } from '@/api/his/his'
107 113
   import NewPrescriptionTable from './newPrescriptionTable'
108 114
   import { uParseTime } from '@/utils/tools'
115
+ import { getAllDoctorList } from "@/api/project/project"
116
+import moment from 'moment';
109 117
 
110 118
   export default {
111 119
     components: { NewPrescriptionTable },
@@ -138,14 +146,18 @@
138 146
         search_input: '',
139 147
         case_history:{},
140 148
         order:{},
149
+        doctorList:[],
150
+        departmentList:[]
141 151
       }
142 152
     },
143 153
     methods: {
144 154
       open(index){
145 155
         if(index == 1){
146 156
 
157
+          //  /outpatientDoctorStation/print?record=2020-12-11&prescription_id=157&ids=157,159&patient_id=1064
147 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 163
       getTimes(time,temp) {
@@ -202,7 +214,9 @@
202 214
             this.patientInfo = response.data.data.order.patient
203 215
             this.hisPatientInfo = response.data.data.order.his_patient
204 216
             this.case_history = response.data.data.order.case_history
217
+            console.log("历史详情",this.case_history)
205 218
             this.order = response.data.data.order
219
+            console.log('this.order',this.order)
206 220
 
207 221
 
208 222
             this.prescriptions = []
@@ -270,6 +284,36 @@
270 284
         // this.clear()
271 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 319
 </script>
@@ -283,6 +327,7 @@
283 327
   }
284 328
 
285 329
   .detailMain {
330
+    flex: 1;
286 331
   span {
287 332
     display: inline-block;
288 333
   }

+ 34 - 12
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

@@ -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
@@ -259,6 +259,7 @@
259 259
 
260 260
             if(this.patientTableData.length > 0) {
261 261
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
262
+              this.oldCurrentRow = this.patientTableData[0]
262 263
               this.getPatientInfo(this.patientTableData[0])
263 264
             }
264 265
 
@@ -417,18 +418,25 @@
417 418
 
418 419
 
419 420
       },
421
+
420 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 441
         this.patientid = val.patients.id
434 442
         let params = {
@@ -562,6 +570,20 @@
562 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 588
       open(index) {
567 589
         console.log("index0999999",this.prescriptions)

+ 16 - 5
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue 查看文件

@@ -41,7 +41,7 @@
41 41
 
42 42
         <div class="printTitle">病历内容</div>
43 43
         <div class="recordTitle">
44
-            <div>科别:{{hispatient.departments?hispatient.departments:''}}</div>
44
+            <div>科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
45 45
             <div>姓名:{{patient.name?patient.name:''}}</div>
46 46
             <div>性别:
47 47
                 <span v-if="patient.gender == 1">男</span>
@@ -102,7 +102,8 @@ export default {
102 102
     },
103 103
     data(){
104 104
         return{
105
-            educationOptions:[]
105
+            educationOptions:[],
106
+            departmentList:[]
106 107
         }                   
107 108
     },
108 109
     methods:{
@@ -121,9 +122,9 @@ export default {
121 122
                var doctor =  response.data.data.doctor
122 123
 
123 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,6 +157,16 @@ export default {
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 171
     created(){
161 172
       this.educationOptions = getDataConfig("patient", "education_types");