Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
f878ab9956

+ 48 - 0
src/api/patient.js View File

@@ -551,3 +551,51 @@ export function deleteSummary(params) {
551 551
     params: params
552 552
   })
553 553
 }
554
+
555
+export function createHospitalSummary(params) {
556
+  return request({
557
+    url: '/api/patient/hospitalsummary',
558
+    method: 'get',
559
+    params: params
560
+  })
561
+}
562
+
563
+export function getHospitalSummaryList(params) {
564
+  return request({
565
+    url: '/api/patient/gethospitalsummarylist',
566
+    method: 'Get',
567
+    params: params
568
+  })
569
+}
570
+
571
+export function getHospitalSummaryDetail(id, params) {
572
+  return request({
573
+    url: '/api/patient/gethospitalsummaydetail?id=' + id,
574
+    method: 'get',
575
+    params: params
576
+  })
577
+}
578
+
579
+export function updateHospitalSummary(params) {
580
+  return request({
581
+    url: '/api/patient/updatehospitalsummary',
582
+    method: 'get',
583
+    params: params
584
+  })
585
+}
586
+
587
+export function deleteHospitalSummary(params) {
588
+  return request({
589
+    url: '/api/patient/deletehospitalsummary',
590
+    method: 'get',
591
+    params: params
592
+  })
593
+}
594
+
595
+export function getPatientInfo(params) {
596
+  return request({
597
+    url: '/api/patient/getpatientinfo',
598
+    method: 'Get',
599
+    params: params
600
+  })
601
+}

+ 11 - 0
src/router/modules/patient.js View File

@@ -225,6 +225,17 @@ export default {
225 225
       title: 'templateSummary',
226 226
       noCache: true
227 227
     }
228
+  },
229
+  {
230
+    path: '/patient/patient/hospitalSummary/print',
231
+    component: () => import('@/xt_pages/user/hospitalSummaryPrint'),
232
+    hidden: true,
233
+    is_menu: false,
234
+    name: 'templateSummary',
235
+    meta: {
236
+      title: 'templateSummary',
237
+      noCache: true
238
+    }
228 239
   }
229 240
   ]
230 241
 }

+ 30 - 32
src/xt_pages/dialysis/template/DialysisPrintOrderThirtySix.vue View File

@@ -219,33 +219,6 @@
219 219
                   </tr>
220 220
                 </tbody>
221 221
               </table>
222
-              <table class="table-box">
223
-                <tbody>
224
-                  <tr>
225
-                    <!-- <td width="190"></td> -->
226
-                    <td width='100'>穿刺针型号:</td>
227
-                    <td>
228
-                      <div class="under-line" style="text-align:left;">{{ predialysis.puncture_needle ? predialysis.puncture_needle : '/' }}</div>
229
-                      <!-- <div>
230
-                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-静脉') > -1 ? true : false" showValue="16G"></label-box>
231
-                        &nbsp;
232
-                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-静脉') > -1 ? true : false" showValue="17G"></label-box>
233
-                        &nbsp;
234
-                      </div> -->
235
-                    </td>
236
-                    <!-- <td width='80'>钝针穿刺:</td>
237
-                    <td width="140">
238
-                      <div>
239
-                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-动脉') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-动脉') > -1 ? true : false" showValue="动脉"></label-box>
240
-                        &nbsp;
241
-                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-静脉') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-静脉') > -1 ? true : false" showValue="静脉"></label-box>
242
-                        &nbsp;)
243
-                      </div>
244
-                    </td> -->
245
-                    <td></td>
246
-                  </tr>
247
-                </tbody>
248
-              </table>
249 222
               <table class="table-box">
250 223
                 <tbody>
251 224
                   <tr>
@@ -290,6 +263,33 @@
290 263
                   </tr>
291 264
                 </tbody>
292 265
               </table>
266
+              <table class="table-box">
267
+                <tbody>
268
+                  <tr>
269
+                    <!-- <td width="190"></td> -->
270
+                    <td width='100'>穿刺针型号:</td>
271
+                    <td>
272
+                      <div class="under-line" style="text-align:left;">{{ predialysis.puncture_needle ? predialysis.puncture_needle : '/' }}</div>
273
+                      <!-- <div>
274
+                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-静脉') > -1 ? true : false" showValue="16G"></label-box>
275
+                        &nbsp;
276
+                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-静脉') > -1 ? true : false" showValue="17G"></label-box>
277
+                        &nbsp;
278
+                      </div> -->
279
+                    </td>
280
+                    <!-- <td width='80'>钝针穿刺:</td>
281
+                    <td width="140">
282
+                      <div>
283
+                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-动脉') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-动脉') > -1 ? true : false" showValue="动脉"></label-box>
284
+                        &nbsp;
285
+                        <label-box :isChecked="predialysis.puncture_needle && predialysis.puncture_needle.indexOf('16G-静脉') > -1 ? true : predialysis.puncture_needle && predialysis.puncture_needle.indexOf('17G-静脉') > -1 ? true : false" showValue="静脉"></label-box>
286
+                        &nbsp;)
287
+                      </div>
288
+                    </td> -->
289
+                    <td></td>
290
+                  </tr>
291
+                </tbody>
292
+              </table>
293 293
 
294 294
               <table class="table-box">
295 295
                 <tbody>
@@ -671,7 +671,7 @@
671 671
             <td>
672 672
               &nbsp;{{ monitor.blood_sugar ? monitor.blood_sugar : "" }}
673 673
             </td>
674
-            <td>
674
+            <td style="text-align:left;padding-left:5px;">
675 675
                 <span>
676 676
                     <span v-if="setAdminUserES(monitor.monitoring_nurse) == ''">{{ getAdminUser(monitor.monitoring_nurse) }}</span>
677 677
                     <img class="es-img" style="height:38px" :src="setAdminUserES(monitor.monitoring_nurse)" alt srcset v-else />
@@ -922,8 +922,6 @@
922 922
                     <td width="90" style="height:40px;">当班责任护士:</td>
923 923
                     <td width="100">
924 924
                       <div>
925
-                        <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.start_nurse)}}</span>
926
-                        <img class="es-img" style="height:38px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse)" alt="" srcset="" v-else>
927 925
                       </div>
928 926
                     </td>
929 927
                     <td width="150"></td>
@@ -959,7 +957,7 @@
959 957
           <td class="parent" style="text-align:left;padding-left:10px;">
960 958
             <div style="display:flex;height:100%;">
961 959
               <span style="width:70%;display:inline-block;">
962
-                <span v-if="advice.parent_id > 0">---></span>
960
+                <span v-if="advice.parent_id > 0">/</span>
963 961
                 <span>{{ advice.advice_name }}</span>
964 962
                 <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
965 963
                 <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
@@ -1625,7 +1623,7 @@ export default {
1625 1623
           // advice_doctor: 0,
1626 1624
           // start_time: 0,
1627 1625
           advices: []
1628
-          // exec_staff: 0,
1626
+          // exec_staff: 0, `12
1629 1627
           // exec_time: 0,
1630 1628
           // checker: 0,
1631 1629
         }

+ 11 - 11
src/xt_pages/user/components/PatientSidebar.vue View File

@@ -215,8 +215,8 @@ export default {
215 215
       }else{
216 216
         this.$router.push('/patients/patient/' + value)
217 217
       }
218
-      
219
-      
218
+
219
+
220 220
     },
221 221
     getList() {
222 222
       fetchAllList().then(response => {
@@ -256,7 +256,7 @@ export default {
256 256
       return sex
257 257
     },
258 258
     querySearchAsync(keyword, cb) {
259
-      
259
+
260 260
       let key = ''
261 261
       if (keyword != undefined) {
262 262
         key = keyword
@@ -299,13 +299,13 @@ export default {
299 299
   },
300 300
   created() {
301 301
     var patientKey =  window.sessionStorage.getItem('patientKey')
302
-  
302
+
303 303
     console.log("patient",patientKey)
304 304
     var query = this.$route.path
305 305
     console.log("query",this.$route.path)
306 306
     if(patientKey){
307 307
      this.treeKey = patientKey
308
-     if(query.indexOf('edit') == -1){ 
308
+     if(query.indexOf('edit') == -1){
309 309
       if (patientKey == '1-1') {
310 310
         this.$router.push({ path: '/patients/patient/' + this.id })
311 311
       } else if (patientKey == '1-2') {
@@ -340,20 +340,20 @@ export default {
340 340
           path: '/patients/patient/' + this.id + '/proeducation'
341 341
         })
342 342
       }
343
-    
343
+
344 344
      }else{
345 345
        this.treeKey = "1-1"
346
-       
346
+
347 347
      }
348 348
     }else{
349 349
        this.treeKey = this.defaultActive
350
-       
350
+
351 351
     }
352
-   
353
-    
352
+
353
+
354 354
     this.getList()
355 355
   },
356
- 
356
+
357 357
 }
358 358
 </script>
359 359
 

+ 488 - 113
src/xt_pages/user/hospitalSummary.vue View File

@@ -10,7 +10,7 @@
10 10
                                    @click="show_dialog = true">新增</el-button>
11 11
 
12 12
                         <el-button type="primary" icon="el-icon-edit-outline" size="small"
13
-                                   @click="showEdit">修改</el-button>
13
+                                   @click="toEdit">修改</el-button>
14 14
                       <el-button type="primary" icon="el-icon-printer" size="small"
15 15
                                  @click="print">打印</el-button>
16 16
                       <el-button size="small"  type="danger" @click="deleteAction">删除</el-button>
@@ -34,25 +34,25 @@
34 34
                   backgroundColor: 'rgb(245, 247, 250)',
35 35
                   color: '#606266'
36 36
                 }"
37
-                :row-style="{ color: '#303133' }" ref="inspection_table" :data="tableData"
37
+                :row-style="{ color: '#303133' }" ref="monthlyPlanTable" :data="tableData"
38 38
                         border highlight-current-row @current-change="changeCurrentRecordTwo"
39 39
                         @selection-change="selectSummary"
40 40
                         :row-class-name="tableRow"
41 41
               >
42 42
                 <el-table-column type="selection" width="60" align="center"></el-table-column>
43
-                <el-table-column label="住院小结名称" align="center">
43
+                <el-table-column label="标题" align="center">
44 44
                   <template slot-scope="scope">
45
-                   
45
+                    {{scope.row.title}}
46 46
                   </template>
47 47
                 </el-table-column>
48
-                <el-table-column label="记录时间" align="center">
48
+                <el-table-column label="记录日期" align="center">
49 49
                   <template slot-scope="scope">
50
-                    
50
+                    {{getTime(scope.row.record_date)}}
51 51
                   </template>
52 52
                 </el-table-column>
53
-                <el-table-column label="记录医生" align="center">
53
+                <el-table-column label="住院医师" align="center">
54 54
                   <template slot-scope="scope">
55
-                   
55
+                    {{getDoctor(scope.row.doctor)}}
56 56
                   </template>
57 57
                 </el-table-column>
58 58
               </el-table>
@@ -60,19 +60,61 @@
60 60
             <el-col :span="14">
61 61
               <div class="record_content_panel">
62 62
                 <div style="background-color:rgb(245, 247, 250)" class="title">住院小结内容</div>
63
-                <div style="padding:10px;border-bottom:1px solid #DCDFE6;">住院小结时间:
64
-
63
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;">标题:
64
+                   {{hosDetail.title}}
65 65
                 </div>
66 66
             
67
-                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结总结:
68
-                  
67
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院时间:
68
+                   <span v-if="hosDetail.admission_time > 0">{{getTime(hosDetail.admission_time)?getTime(hosDetail.admission_time):""}}</span> 
69 69
                  </div>
70
-                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结化验结果:
71
-                  <div>
72
-                 
73
-                  </div>
70
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院时间:
71
+                   <span v-if="hosDetail.discharge_time > 0">{{getTime(hosDetail.discharge_time)}}</span>
74 72
                 </div>
75
-
73
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">上级医师签名:
74
+                   {{getDoctor(hosDetail.dean_id)}}
75
+                </div>
76
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">住院医师签名:
77
+                   {{getDoctor(hosDetail.doctor)}}
78
+                </div>
79
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">记录日期:
80
+                  <span v-if="hosDetail.record_time > 0">{{getTime(hosDetail.record_time)}}</span> 
81
+                </div>
82
+                <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病案号:
83
+                   {{hosDetail.sick_personnel}}
84
+                </div>
85
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">X线:
86
+                   {{hosDetail.xray}}
87
+                </div>
88
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">CT:
89
+                   {{hosDetail.connecticut}}
90
+                 </div>
91
+                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">MRI:
92
+                   {{hosDetail.nuclear_magnetic_resonance}}
93
+                 </div>
94
+                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">超声:
95
+                   {{hosDetail.ultrasound}}
96
+                 </div>
97
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病理:
98
+                   {{hosDetail.pathology}}
99
+                 </div>
100
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院诊断:
101
+                   {{hosDetail.admitting_diagnosis}}
102
+                 </div>
103
+                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院诊断:
104
+                   {{hosDetail.discharge_diagnosis}}
105
+                 </div>
106
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院时病情:
107
+                   {{hosDetail.diagnosis_admission}}
108
+                 </div>
109
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊断经过:
110
+                   {{hosDetail.treatment}}
111
+                 </div>
112
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院时病情:
113
+                   {{hosDetail.illness_discharge}}
114
+                 </div>
115
+                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院医嘱:
116
+                   {{hosDetail.discharge_advice}}
117
+                 </div>
76 118
                
77 119
               </div>
78 120
             </el-col>
@@ -82,7 +124,7 @@
82 124
 
83 125
   
84 126
      
85
-        <el-dialog title="新增住院小结" width="60%" top="5vh" :visible.sync="show_dialog">
127
+      <el-dialog title="新增住院小结" width="60%" top="5vh" :visible.sync="show_dialog">
86 128
         <div>
87 129
           <div class="new_record_form">
88 130
             <div class="cell clearfix">
@@ -113,7 +155,7 @@
113 155
               <label class="title"><span class="name">上级医师签名</span>:</label>
114 156
                <el-select v-model="form.dean" placeholder="请选择">
115 157
                   <el-option
116
-                  v-for="item in docList"
158
+                  v-for="item in doctorList"
117 159
                   :key="item.admin_user_id"
118 160
                   :label="item.user_name"
119 161
                   :value="item.admin_user_id">
@@ -122,7 +164,7 @@
122 164
               <label class="title"><span class="name">住院医师签名</span>:</label>
123 165
               <el-select v-model="form.doctor" placeholder="请选择">
124 166
                   <el-option
125
-                  v-for="item in docList"
167
+                  v-for="item in doctorList"
126 168
                   :key="item.admin_user_id"
127 169
                   :label="item.user_name"
128 170
                   :value="item.admin_user_id">
@@ -277,16 +319,202 @@
277 319
           </div>
278 320
         </div>
279 321
       </el-dialog>
322
+      
323
+      <el-dialog title="编辑住院小结" width="60%" top="5vh" :visible.sync="edit_show_dialog">
324
+        <div>
325
+          <div class="new_record_form">
326
+            <div class="cell clearfix">
327
+              <label class="title"><span class="name">标题</span> : </label>
328
+               <el-input v-model="form.title" style="width:200px"></el-input>
329
+            
330
+             
331
+              <label class="title"><span class="name">入院时间</span> : </label>
332
+              <el-date-picker v-model="form.admission_time" 
333
+                    prefix-icon="el-icon-date" 
334
+                    style="width: 200px;"
335
+                    type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
336
+                    value-format="yyyy-MM-dd">
337
+              </el-date-picker>
280 338
 
281
-    
339
+            
340
+              <label class="title"><span class="name">出院时间</span> : </label>
341
+              <el-date-picker v-model="form.discharge_time"
342
+                    prefix-icon="el-icon-date" 
343
+                    style="width: 200px;"
344
+                    type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
345
+                    value-format="yyyy-MM-dd">
346
+              </el-date-picker>
282 347
 
283
-    
284
-      <multi-select-box
285
-        :propsForm="InnerDialogProps"
286
-        v-on:dialog-comfirm="innerDialogComfirm"
287
-        v-on:dialog-cancle="innerDialogCancle"
288
-      ></multi-select-box>
348
+            
349
+            </div>
350
+            <div  class="cell clearfix" style="margin-top:10px">
351
+              <label class="title"><span class="name">上级医师签名</span>:</label>
352
+               <el-select v-model="form.dean" placeholder="请选择">
353
+                  <el-option
354
+                  v-for="item in doctorList"
355
+                  :key="item.admin_user_id"
356
+                  :label="item.user_name"
357
+                  :value="item.admin_user_id">
358
+                  </el-option>
359
+              </el-select>
360
+              <label class="title"><span class="name">住院医师签名</span>:</label>
361
+              <el-select v-model="form.doctor" placeholder="请选择">
362
+                  <el-option
363
+                  v-for="item in doctorList"
364
+                  :key="item.admin_user_id"
365
+                  :label="item.user_name"
366
+                  :value="item.admin_user_id">
367
+                  </el-option>
368
+              </el-select>    
369
+              <label class="title"><span class="name">记录日期</span> : </label>
370
+              <el-date-picker v-model="form.record_date"
371
+                    prefix-icon="el-icon-date" 
372
+                    style="width: 200px;"
373
+                    type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
374
+                    value-format="yyyy-MM-dd">
375
+              </el-date-picker>   
376
+            </div>
377
+            <div class="cell clearfix" style="margin-top:10px">
378
+              <label class="title"><span class="name">病案号:</span> : </label>
379
+              <el-input v-model="form.sick_personnel" style="width:200px"></el-input>
380
+            
381
+              <label class="title"><span class="name">X线</span> : </label>
382
+              <el-input v-model="form.xray" style="width:200px"></el-input>
383
+
384
+              <label class="title"><span class="name">CT</span> : </label>
385
+              <el-input v-model="form.connecticut" style="width:200px"></el-input>
386
+            </div>
387
+
388
+            <div class="cell clearfix" style="margin-top:10px">
389
+              <label class="title"><span class="name">MRI</span> : </label>
390
+              <el-input v-model="form.nuclear_magnetic_resonance" style="width:200px"></el-input>
391
+            
392
+              <label class="title"><span class="name">超声</span> : </label>
393
+              <el-input v-model="form.ultrasound" style="width:200px"></el-input>
394
+
395
+              <label class="title"><span class="name">病理</span> : </label>
396
+              <el-input v-model="form.pathology" style="width:200px"></el-input>
397
+            </div>
398
+            
399
+            <div class="cell clearfix" style="margin-top:10px">
400
+              <label class="title"><span class="name">入院诊断</span> : </label>
401
+                <el-select v-model="form.admitting_diagnosis_id" placeholder="可选择病程模板" @change="changeAmittDiagnosis">
402
+                  <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
403
+                            :value="option.content"></el-option>
404
+                </el-select>
405
+                
406
+                 <div class="textarea_panel">
407
+                    <keep-alive>
408
+                      <editor ref="editorTen"
409
+                              id="editorTen"
410
+                              style="width: 800px"
411
+                              v-bind:r_content="form.admitting_diagnosis">
412
+                      </editor>
413
+                    </keep-alive>
414
+                </div>
415
+            </div>
416
+
417
+            <div class="cell clearfix" style="margin-top:10px">
418
+              <label class="title"><span class="name">出院诊断</span> : </label>
419
+                <el-select v-model="form.discharge_diagnosis_id" placeholder="可选择病程模板" @change="changeDischargeDiagnosis">
420
+                  <el-option v-for="(option, index) in templatesOne" :key="index" :label="option.title"
421
+                            :value="option.content"></el-option>
422
+                </el-select>
423
+
424
+               <div class="textarea_panel">
425
+                    <keep-alive>
426
+                      <editor ref="editorSeven"
427
+                              id="editorSeven"
428
+                              style="width: 800px"
429
+                              v-bind:r_content="form.discharge_diagnosis">
430
+                      </editor>
431
+                    </keep-alive>
432
+                </div>
433
+
434
+            </div>
435
+
436
+             <div class="cell clearfix" style="margin-top:10px">
437
+              <label class="title"><span class="name">入院时病情</span> : </label>
438
+                <el-select v-model="form.diagnosis_admission_id" placeholder="可选择病程模板" @change="changeDiagnosisAdmission">
439
+                  <el-option v-for="(option, index) in templatesTwo" :key="index" :label="option.title"
440
+                            :value="option.content"></el-option>
441
+                </el-select>
442
+
443
+                <div class="textarea_panel">
444
+                    <keep-alive>
445
+                      <editor ref="editorEight"
446
+                              id="editorEight"
447
+                              style="width: 800px"
448
+                              v-bind:r_content="form.diagnosis_admission">
449
+                      </editor>
450
+                    </keep-alive>
451
+                </div>
452
+            </div>
453
+
454
+            <div class="cell clearfix" style="margin-top:10px">
455
+              <label class="title"><span class="name">诊断经过</span> : </label>
456
+                <el-select v-model="form.treatment_id" placeholder="可选择病程模板" @change="changeTreatment">
457
+                  <el-option v-for="(option, index) in templatesThree" :key="index" :label="option.title"
458
+                            :value="option.content"></el-option>
459
+                </el-select>
460
+
461
+               <div class="textarea_panel">
462
+                    <keep-alive>
463
+                      <editor ref="editorNight"
464
+                              id="editorNight"
465
+                              style="width: 800px"
466
+                              v-bind:r_content="form.treatment">
467
+                      </editor>
468
+                    </keep-alive>
469
+                </div>
470
+
471
+            </div>
289 472
 
473
+            <div class="cell clearfix" style="margin-top:10px">
474
+              <label class="title"><span class="name">出院时病情</span> : </label>
475
+                <el-select v-model="form.illness_discharge_id" placeholder="可选择病程模板" @change="changeillnessDisCharge">
476
+                  <el-option v-for="(option, index) in templatesFour" :key="index" :label="option.title"
477
+                            :value="option.content"></el-option>
478
+                </el-select>
479
+
480
+               <div class="textarea_panel">
481
+                    <keep-alive>
482
+                      <editor ref="editorElement"
483
+                              id="editorElement"
484
+                              style="width: 800px"
485
+                              v-bind:r_content="form.illness_discharge">
486
+                      </editor>
487
+                    </keep-alive>
488
+                </div>
489
+            </div>
490
+
491
+            <div class="cell clearfix" style="margin-top:10px">
492
+              <label class="title"><span class="name">出院医嘱</span> : </label>
493
+                <el-select v-model="form.discharge_advice_id" placeholder="可选择病程模板" @change="changeDischargeAdvice">
494
+                  <el-option v-for="(option, index) in templatesFive" :key="index" :label="option.title"
495
+                            :value="option.content"></el-option>
496
+                </el-select>
497
+
498
+                <div class="textarea_panel">
499
+                    <keep-alive>
500
+                      <editor ref="editorTwelve"
501
+                              id="editorTwelve"
502
+                              style="width: 800px"
503
+                              v-bind:r_content="form.discharge_advice">
504
+                      </editor>
505
+                    </keep-alive>
506
+                </div>
507
+            </div>
508
+         
509
+            <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
510
+              <el-button @click="edit_show_dialog = false">取消</el-button>
511
+              <el-button type="primary"
512
+                         @click="updateAction">保存
513
+              </el-button>
514
+            </div>
515
+          </div>
516
+        </div>
517
+      </el-dialog>
290 518
     </div>
291 519
   </div>
292 520
 </template>
@@ -295,14 +523,14 @@
295 523
   import PatientSidebar from './components/PatientSidebar'
296 524
   import Editor from '@/components/Editor'
297 525
 
298
-  import {  } from '@/api/patient'
526
+  import { createHospitalSummary,getHospitalSummaryList,getHospitalSummaryDetail,updateHospitalSummary,deleteHospitalSummary } from '@/api/patient'
299 527
   import { parseTime } from '@/utils'
300 528
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
301 529
   import { uParseTime } from '@/utils/tools'
302 530
   import { getDataConfig } from '@/utils/data'
303 531
   import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
304 532
  import MsgTip from '../dialysis/details/dialog/MsgTip'
305
-
533
+  import { getAllDoctorList } from "@/api/device"
306 534
   const moment = require('moment')
307 535
   export default {
308 536
     name: 'hospitalSummary',
@@ -336,6 +564,7 @@
336 564
         show_dialog: false,
337 565
         show_edit_dialog: false,
338 566
         uploading_new_record: false,
567
+        edit_show_dialog:false,
339 568
         templates: this.$store.getters.configlist.admitting_diagnosis,
340 569
         templatesOne:this.$store.getters.configlist.discharge_diagnosis,
341 570
         templatesTwo:this.$store.getters.configlist.diagnosis_admission,
@@ -373,15 +602,23 @@
373 602
           record_date:new Date(),
374 603
           discharge_advice_id:"",
375 604
           discharge_advice:"",
605
+          connecticut:"",
606
+          nuclear_magnetic_resonance:"",
607
+          ultrasound:"",
608
+          pathology:"",
609
+          record_time:"",
376 610
         },
377 611
        tableData:[],
378 612
        docList:[],
613
+       doctorList:[],
614
+       hosDetail:{},
379 615
       }
380 616
     },
381 617
     created() {
382 618
      
383
-      console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
619
+     
384 620
       this.patient_id = this.$route.params && this.$route.params.id
621
+      console.log("患者2332323",this.patient_id)
385 622
       var now = new Date()
386 623
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
387 624
 
@@ -408,62 +645,39 @@
408 645
         (nowDay < 10 ? '0' + nowDay : nowDay)
409 646
       this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
410 647
       
411
-
412
-
648
+     this.getAllDoctorList()
649
+     this.getlist()
413 650
     },
414 651
     methods: {
415 652
       getTime(val) {
416
-         if(val == "" || val == undefined){
653
+       if(val == "" || val == undefined){
417 654
           return ""
418 655
          }else {
419 656
           return uParseTime(val, '{y}-{m}-{d}')
420 657
          }
421 658
       },
422
-      getTimeTwo(val) {
423
-         if(val == ""){
424
-          return ""
425
-         }else {
426
-          return uParseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
427
-         }
428
-      },
429
-      getTimeOne(val) {
430
-         if(val < 0){
431
-           return ""
432
-         }
433
-         if(val == ""){
434
-          return ""
435
-         }else {
436
-          return uParseTime(val, '{m}')
437
-         }
438
-      },
439
-     
440
-      
659
+
441 660
       startTimeChange(val){
442
-       console.log("val",val)
661
+       
443 662
        this.start_time = val
444
-       this.getTemplateSummaryList()
663
+       this.getlist()
445 664
       },
446 665
       endTimeChange(val){
447 666
        this.end_time = val
448
-       this.getTemplateSummaryList()
667
+       this.getlist()
449 668
       },
450 669
       print(){
451
-        this.$router.push({path:"/patient/patient/templateSummary/print?id="+this.form.id})
670
+        this.$router.push({path:"/patient/patient/hospitalSummary/print?id="+this.form.id+"&patient_id="+this.patient_id})
452 671
       },
453 672
       tableRow(){
454 673
 
455 674
        },
456
-       getTime(val) {
457
-         if(val < 0){
458
-           return ""
459
-         }
460
-         if(val == ""){
461
-          return ""
462
-         }else {
463
-          return uParseTime(val, '{y}-{m}-{d}')
464
-         }
675
+      changeCurrentRecordTwo(row){
676
+        this.form.id = row.id 
677
+        this.getHospitalSummaryDetail(row.id)
465 678
       },
466
-      changeCurrentRecordTwo(){
679
+      selectSummary(row){
680
+       console.log("row322323",row)
467 681
       },
468 682
       changeAmittDiagnosis(content){
469 683
         this.form.admitting_diagnosis = content
@@ -483,60 +697,221 @@
483 697
       changeDischargeAdvice(content){
484 698
         this.form.discharge_advice = content
485 699
       },
486
-     
487
-          // title:"",
488
-          // admission_time:new Date(),
489
-          // discharge_time:new Date(),
490
-          // sick_personnel:"",
491
-          // xray:"",
492
-          // admitting_diagnosis_id:"",
493
-          // admitting_diagnosis:"",
494
-          // discharge_diagnosis_id:"",
495
-          // discharge_diagnosis:"",
496
-          // treatment:"",
497
-          // treatment_id:"",
498
-          // diagnosis_admission_id:"",
499
-          // diagnosis_admission:"",
500
-          // illness_discharge_id:"",
501
-          // illness_discharge:"",
502
-          // dean:"",
503
-          // doctor:"",
504
-          // record_date:new Date(),
505
-      //  discharge_advice_id:"",
506
-      //     discharge_advice:"",
507 700
       createAction(){
508
-          var admitting_diagnosis_id = 0
509
-          var discharge_diagnosis_id = 0
510
-          var diagnosis_admission_id = 0
511
-          var  illness_discharge_id = 0
512
-          for(let i=0;i<this.templates.length;i++){
513
-             if(this.templates[i].content == this.form.admitting_diagnosis){
514
-                admitting_diagnosis_id = this.templates[i].value
515
-             }
701
+         
702
+         var params = {
703
+          patient_id:parseInt(this.patient_id),
704
+          title:this.form.title,
705
+          admission_time:this.getTime(this.form.admission_time),
706
+          discharge_time:this.getTime(this.form.discharge_time),
707
+          sick_personnel:this.form.sick_personnel,
708
+          xray:this.form.xray,
709
+          admitting_diagnosis_id:this.form.admitting_diagnosis_id,
710
+          admitting_diagnosis:this.form.admitting_diagnosis,
711
+          discharge_diagnosis:this.form.discharge_diagnosis,
712
+          discharge_diagnosis_id:this.form.discharge_diagnosis_id,
713
+          diagnosis_admission_id:this.form.diagnosis_admission_id,
714
+          diagnosis_admission:this.form.diagnosis_admission,
715
+          illness_discharge:this.form.illness_discharge,
716
+          illness_discharge_id:this.form.illness_discharge_id,
717
+          discharge_advice_id:this.form.discharge_advice_id,
718
+          discharge_advice:this.form.discharge_advice,
719
+          treatment_id:this.form.treatment_id,
720
+          treatment:this.form.treatment,
721
+          dean:this.form.dean,
722
+          doctor:this.form.doctor,
723
+          record_date:this.getTime(this.form.record_date),
724
+          connecticut:this.form.connecticut,
725
+          nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
726
+          ultrasound:this.form.ultrasound,
727
+          pathology:this.form.pathology,
728
+         }
729
+         console.log("oaram2322323",params)
730
+         
731
+         createHospitalSummary(params).then(response=>{
732
+            if(response.data.state == 1){
733
+              var list = response.data.data.list
734
+              this.form.title = ""
735
+              this.form.sick_personnel = ""
736
+              this.form.xray = ""
737
+              this.form.admitting_diagnosis = ""
738
+              this.form.discharge_diagnosis = ""
739
+              this.form.diagnosis_admission = ""
740
+              this.form.illness_discharge = ""
741
+              this.form.discharge_advice = ""
742
+              this.form.treatment = ""
743
+              this.form.connecticut = ""
744
+              this.form.nuclear_magnetic_resonance = ""
745
+              this.form.ultrasound = ""
746
+              this.form.pathology = ""
747
+              this.form.admitting_diagnosis_id = ""
748
+              this.form.discharge_diagnosis_id = ""
749
+              this.form.illness_discharge_id = ""
750
+              this.form.discharge_advice_id  =""
751
+              this.form.treatment_id = ""
752
+              this.$message.success("保存成功!")
753
+              this.show_dialog = false
754
+              this.getlist()
755
+            }
756
+         })
757
+      },
758
+      getAllDoctorList(){
759
+       getAllDoctorList().then(response=>{
760
+          if(response.data.state == 1){
761
+            var list = response.data.data.list
762
+
763
+            this.doctorList = list
516 764
           }
517
-          for(let i=0;i<this.templatesOne.length;i++){
518
-           if(this.templates[i].content == this.form.discharge_diagnosis){
519
-                discharge_diagnosis_id = this.templates[i].value
520
-             }
765
+       })
766
+      },
767
+      getTime(val) {
768
+         if(val == ""){
769
+          return ""
770
+         }else {
771
+          return uParseTime(val, '{y}-{m}-{d}')
772
+         }
773
+      },
774
+
775
+      getlist(){
776
+          var params = {
777
+            start_time:this.start_time,
778
+            end_time:this.end_time,
779
+            patient_id:parseInt(this.patient_id),
521 780
           }
522
-          for(let i=0;i<this.templatesTwo.length;i++){
523
-             if(this.templates[i].content == this.form.diagnosis_admission){
524
-                diagnosis_admission_id = this.templates[i].value
525
-             }
781
+         console.log("param2233223",params)
782
+        getHospitalSummaryList(params).then(response=>{
783
+           if(response.data.state ==1){
784
+             var list =  response.data.data.list
785
+             console.log("list23232",list)
786
+             this.tableData = list
787
+           }
788
+        })
789
+      },
790
+      getDoctor(id){
791
+        var name = ""
792
+        for(let i=0;i<this.doctorList.length;i++){
793
+          if(id == this.doctorList[i].admin_user_id){
794
+             name = this.doctorList[i].user_name
526 795
           }
796
+        }
797
+        return name
798
+      },
799
+      getHospitalSummaryDetail(id){
800
+        getHospitalSummaryDetail(id).then(response=>{
801
+           if(response.data.state == 1){
802
+             var detail = response.data.data.detail
803
+             this.hosDetail = detail
804
+           }
805
+        })
806
+      },
807
+      getHospitalSummaryDetailOne(id){
808
+        getHospitalSummaryDetail(id).then(response=>{
809
+           if(response.data.state == 1){
810
+             var detail = response.data.data.detail
811
+             this.form.id = detail.id
812
+             this.form.title = detail.title
813
+             this.form.patient_id = detail.patient_id
814
+             this.form.admission_time = this.getTime(detail.admission_time)
815
+             this.form.discharge_time = this.getTime(detail.discharge_time)
816
+             this.form.sick_personnel = detail.sick_personnel
817
+             this.form.xray = detail.xray
818
+             this.form.connecticut = detail.connecticut
819
+             this.form.nuclear_magnetic_resonance = detail.nuclear_magnetic_resonance
820
+             this.form.ultrasound = detail.ultrasound
821
+             this.form.pathology = detail.pathology
822
+             this.form.admitting_diagnosis_id = detail.admitting_diagnosis_id
823
+             this.form.admitting_diagnosis = detail.admitting_diagnosis
824
+             this.form.discharge_diagnosis = detail.discharge_diagnosis
825
+             this.form.discharge_diagnosis_id = detail.discharge_diagnosis_id
826
+             this.form.diagnosis_admission_id = detail.diagnosis_admission_id
827
+             this.form.diagnosis_admission = detail.diagnosis_admission
828
+             this.form.treatment_id = detail.treatment_id
829
+             this.form.treatment = detail.treatment
830
+             this.form.illness_discharge_id = detail.illness_discharge_id
831
+             this.form.illness_discharge = detail.illness_discharge
832
+             this.form.discharge_advice_id = detail.discharge_advice_id
833
+             this.form.discharge_advice = detail.discharge_advice
834
+             this.form.record_time = detail.record_time
835
+             this.form.dean = detail.dean_id
836
+             this.form.doctor = detail.doctor
837
+             this.form.record_date = detail.record_date
838
+             this.hosDetail = detail
839
+             this.edit_show_dialog = true
840
+           }
841
+        })
842
+      },
843
+      toEdit(){
844
+        this.getHospitalSummaryDetailOne(this.form.id)
845
+      },
846
+      updateAction(){
847
+         console.log("hhhahdf2332332",this.form.admission_time)
527 848
          var params = {
528
-           title:this.form.title,
529
-           admission_time:this.form.admission_time,
530
-           discharge_time:this.form.discharge_time,
531
-           sick_personnel:this.form.sick_personnel,
532
-           xray:this.form.xray,
533
-           admitting_diagnosis_id:admitting_diagnosis_id,
849
+          id:this.form.id,
850
+          patient_id:parseInt(this.patient_id),
851
+          title:this.form.title,
852
+          admission_time:this.form.admission_time,
853
+          discharge_time:this.form.discharge_time,
854
+          sick_personnel:this.form.sick_personnel,
855
+          xray:this.form.xray,
856
+          admitting_diagnosis_id:this.form.admitting_diagnosis_id,
857
+          admitting_diagnosis:this.form.admitting_diagnosis,
858
+          discharge_diagnosis:this.form.discharge_diagnosis,
859
+          discharge_diagnosis_id:this.form.discharge_diagnosis_id,
860
+          diagnosis_admission_id:this.form.diagnosis_admission_id,
861
+          diagnosis_admission:this.form.diagnosis_admission,
862
+          illness_discharge:this.form.illness_discharge,
863
+          illness_discharge_id:this.form.illness_discharge_id,
864
+          discharge_advice_id:this.form.discharge_advice_id,
865
+          discharge_advice:this.form.discharge_advice,
866
+          treatment_id:this.form.treatment_id,
867
+          treatment:this.form.treatment,
868
+          dean:this.form.dean,
869
+          doctor:this.form.doctor,
870
+          record_date:this.getTime(this.form.record_date),
871
+          connecticut:this.form.connecticut,
872
+          nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
873
+          ultrasound:this.form.ultrasound,
874
+          pathology:this.form.pathology,
534 875
          }
535
-         createHospitalSummary().then(response=>{
536
-
537
-         })
876
+        console.log("param2332233223232323",params)
877
+     
878
+        updateHospitalSummary(params).then(response=>{
879
+          if(response.data.state == 1){
880
+            var detail = response.data.data.detail
881
+            this.edit_show_dialog = false
882
+            this.getlist()
883
+          }
884
+        }) 
885
+      },
886
+      deleteAction(id,index){
887
+          this.$confirm('确认删除吗?', '删除', {
888
+            confirmButtonText: '确 定',
889
+            cancelButtonText: '取 消',
890
+            type: 'warning'
891
+         }).then(() => {
892
+            var params = {
893
+              id:this.form.id,
894
+            }
895
+            deleteHospitalSummary(params).then(response => {
896
+              if (response.data.state == 1) {
897
+                  var msg = response.data.data.msg
898
+                  this.tableData.splice(index, 1);
899
+                  this.$message.success("删除成功")
900
+              } else {
901
+                  this.$message.error("删除失败")
902
+              }
903
+            })
904
+          }).catch(() => {
905
+          }) 
538 906
       }
539
-    }
907
+    },
908
+    watch: {
909
+      tableData: function() {
910
+        this.$nextTick(function() {
911
+          this.$refs.monthlyPlanTable.setCurrentRow(this.tableData[0])
912
+        })
913
+      }
914
+    },
540 915
   
541 916
     
542 917
   }