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 3 gadus atpakaļ
vecāks
revīzija
c6781dca99

+ 8 - 10
src/api/patient.js Parādīt failu

@@ -276,13 +276,11 @@ export function code(id) {
276 276
   })
277 277
 }
278 278
 
279
-export function GetCoursePrintData(id) {
279
+export function GetCoursePrintData(params) {
280 280
   return request({
281 281
     url: '/api/print/course',
282 282
     method: 'Get',
283
-    params: {
284
-      id: id
285
-    }
283
+    params: params
286 284
   })
287 285
 }
288 286
 
@@ -552,11 +550,11 @@ export function deleteSummary(params) {
552 550
   })
553 551
 }
554 552
 
555
-export function createHospitalSummary(params) {
553
+export function createHospitalSummary(data) {
556 554
   return request({
557 555
     url: '/api/patient/hospitalsummary',
558
-    method: 'get',
559
-    params: params
556
+    method: 'post',
557
+    data: data
560 558
   })
561 559
 }
562 560
 
@@ -576,11 +574,11 @@ export function getHospitalSummaryDetail(id, params) {
576 574
   })
577 575
 }
578 576
 
579
-export function updateHospitalSummary(params) {
577
+export function updateHospitalSummary(data) {
580 578
   return request({
581 579
     url: '/api/patient/updatehospitalsummary',
582
-    method: 'get',
583
-    params: params
580
+    method: 'post',
581
+    data: data
584 582
   })
585 583
 }
586 584
 

+ 8 - 0
src/api/schedule.js Parādīt failu

@@ -229,3 +229,11 @@ export function getNextWeekPanels(params) {
229 229
     params: params
230 230
   })
231 231
 }
232
+
233
+export function synchroSchedule(params) {
234
+  return request({
235
+    url: '/api/schedule/synchroschedule',
236
+    method: 'get',
237
+    params: params
238
+  })
239
+}

+ 2 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Parādīt failu

@@ -1694,7 +1694,7 @@
1694 1694
 
1695 1695
                 ParamsQuery['patient'] = this.patient.id
1696 1696
                 ParamsQuery['record_date'] = this.record_date
1697
-
1697
+                 ParamsQuery['patient_id'] = this.$route.query.patient_id
1698 1698
                 if (this.prescription.creater <= 0) {
1699 1699
                   ParamsQuery['mode'] = '1'
1700 1700
                 } else {
@@ -2203,6 +2203,7 @@
2203 2203
               const ParamsQuery = arr
2204 2204
               // console.log('night', ParamsQuery)
2205 2205
               ParamsQuery['patient'] = this.patient.id
2206
+             
2206 2207
               ParamsQuery['record_date'] = this.record_date
2207 2208
               ParamsQuery['mode'] = '1'
2208 2209
               ParamsQuery['patient_id'] = this.patient.id

+ 1 - 1
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Parādīt failu

@@ -512,7 +512,7 @@
512 512
             align="center"
513 513
             label="KT/V"
514 514
             width="140"
515
-            v-if="isShow('KT/V') && org_id == 9987"
515
+            v-if="isShow('KT/V') && (org_id == 9987 || org_id ==10215 || org_id == 9800) "
516 516
           >
517 517
            <template slot-scope="scope">
518 518
               {{ scope.row.ktv ? scope.row.ktv : ""  }}

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue Parādīt failu

@@ -38,7 +38,7 @@
38 38
           <th v-if="isShow('血压监测')" width="92px">血压监测</th>
39 39
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
40 40
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
41
-          <th v-if="isShow('KT/V') && org_id == 9987" width="92px">KT/V</th>
41
+          <th v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800)" width="92px">KT/V</th>
42 42
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
43 43
 
44 44
           <th v-if="isShow('处理')" width="92px">处理</th>
@@ -85,7 +85,7 @@
85 85
           <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
86 86
           <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
87 87
           <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
88
-          <td v-if="isShow('KT/V') && org_id == 9987">{{ monitor.ktv?monitor.ktv:""}}</td>
88
+          <td v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800)">{{ monitor.ktv?monitor.ktv:""}}</td>
89 89
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
90 90
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>
91 91
           <td v-if="isShow('结果')">{{ monitor.result }}</td>

+ 141 - 141
src/xt_pages/dialysis/template/DialysisPrintOrderThirtySix.vue Parādīt failu

@@ -6,37 +6,39 @@
6 6
       <table class="table-box" style="margin-top: 10px;">
7 7
         <tbody>
8 8
           <tr>
9
-            <td width="50">姓 名:</td>
10
-            <td width="90">
9
+            <td width="40">姓名:</td>
10
+            <td width="80">
11 11
               <div class="under-line">&nbsp;{{ patientInfo.name }}</div>
12 12
             </td>
13
-            <td width="20"></td>
14
-            <td width="50">性 别:</td>
15
-            <td width="100">
13
+            <td width="10"></td>
14
+            <td width="40">性别:</td>
15
+            <td width="80">
16 16
               <div>
17 17
                 <label-box :isChecked="patientInfo_gender_1" showValue="男"></label-box>
18 18
                 <label-box :isChecked="patientInfo_gender_2" showValue="女"></label-box>
19 19
               </div>
20 20
             </td>
21 21
 
22
-            <td width="50">年 龄:</td>
22
+            <td width="40">年龄:</td>
23 23
             <td width="40">
24 24
               <div class="under-line">{{ getAge(patientInfo) }}</div>
25 25
             </td>
26 26
             <td>岁</td>
27 27
             <td width="10"></td>
28
-
28
+            <td width="60">病例号:</td>
29
+            <td width="50">
30
+              <div class="under-line">{{ patientInfo.dialysis_no }}</div>
31
+            </td>
32
+            <td width="10"></td>
29 33
             <td width="70">透析机号:</td>
30 34
             <td width="100">
31 35
               <div class="under-line">{{ getNumber() }}</div>
32 36
             </td>
33
-            <td width="30"></td>
34 37
             <td>
35 38
                 日期:<div class="under_line" style="width:50px;display: inline-block;text-align:center;">{{ queryParams.xtdate.slice(0,4) }}</div>年
36 39
                 <div class="under_line" style="width:50px;display: inline-block;text-align:center;">{{ queryParams.xtdate.slice(5,7) }}</div>月
37 40
                 <div class="under_line" style="width:50px;display: inline-block;text-align:center;">{{ queryParams.xtdate.slice(8,11) }}</div>日
38 41
             </td>
39
-            <td width='10'></td>
40 42
           </tr>
41 43
         </tbody>
42 44
       </table>
@@ -161,9 +163,9 @@
161 163
                     <td width='100'>动脉穿刺方向:</td>
162 164
                     <td width="120">
163 165
                       <div>
164
-                        <label-box :isChecked="predialysis.puncture_way.indexOf('顺穿') > -1 ? true : false" showValue="顺穿"></label-box>
166
+                        <label-box :isChecked="predialysis.puncture_way ? predialysis.puncture_way.indexOf('顺穿') > -1 ? true : false : false" showValue="顺穿"></label-box>
165 167
                         &nbsp;
166
-                        <label-box :isChecked="predialysis.puncture_way.indexOf('反穿') > -1 ? true : false" showValue="反穿"></label-box>
168
+                        <label-box :isChecked="predialysis.puncture_way ? predialysis.puncture_way.indexOf('反穿') > -1 ? true : false : false" showValue="反穿"></label-box>
167 169
                         &nbsp;
168 170
                       </div>
169 171
                     </td>
@@ -174,7 +176,35 @@
174 176
               <table class="table-box">
175 177
                 <tbody>
176 178
                   <tr>
177
-                    <td width="80"></td>
179
+                    <td width="80"><span style="font-weight:bold;">内瘘震颤</span></td>
180
+                    <td width="160">
181
+                      <div>
182
+                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-存在') > -1 ? true : false" showValue="存在"></label-box>
183
+                        &nbsp;
184
+                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-减弱') > -1 ? true : false" showValue="减弱"></label-box>
185
+                        &nbsp;
186
+                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-无') > -1 ? true : false" showValue="无"></label-box>
187
+                      </div>
188
+                    </td>
189
+                    <td width='30'></td>
190
+                    <td width='100'>穿刺针型号:</td>
191
+                    <td>
192
+                      <div class="under-line" style="text-align:left;">{{ predialysis.puncture_needle ? predialysis.puncture_needle : '/' }}</div>
193
+                      <!-- <div>
194
+                        <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>
195
+                        &nbsp;
196
+                        <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>
197
+                        &nbsp;
198
+                      </div> -->
199
+                    </td>
200
+                    <td></td>
201
+                  </tr>
202
+                </tbody>
203
+              </table>
204
+              <table class="table-box">
205
+                <tbody>
206
+                  <tr>
207
+                    <td width="10"></td>
178 208
                     <td width="85">
179 209
                       <div>
180 210
                         <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('静脉置管-临时') > -1 ? true : predialysis.blood_access_part_opera_name.indexOf('静脉置管-长期') > -1 ? true : false" showValue="静脉置管"></label-box>
@@ -222,18 +252,6 @@
222 252
               <table class="table-box">
223 253
                 <tbody>
224 254
                   <tr>
225
-                    <td width="80"></td>
226
-                    <td width="70">内瘘震颤:</td>
227
-                    <td width="160">
228
-                      <div>
229
-                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-存在') > -1 ? true : false" showValue="存在"></label-box>
230
-                        &nbsp;
231
-                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-减弱') > -1 ? true : false" showValue="减弱"></label-box>
232
-                        &nbsp;
233
-                        <label-box :isChecked="predialysis.internal_fistula.indexOf('震颤-无') > -1 ? true : false" showValue="无"></label-box>
234
-                      </div>
235
-                    </td>
236
-                    <td width='30'></td>
237 255
                     <td width='50'>导管:</td>
238 256
                     <td width='60'>管腔外露</td>
239 257
                     <td width="60">
@@ -263,34 +281,6 @@
263 281
                   </tr>
264 282
                 </tbody>
265 283
               </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
-
294 284
               <table class="table-box">
295 285
                 <tbody>
296 286
                   <tr>
@@ -560,7 +550,7 @@
560 550
           <tr>
561 551
             <td width="70" style="height:40px;">主管医生:</td>
562 552
             <td width="100">
563
-                <div style="text-align: left;">
553
+                <div style="text-align: left;display: flex;align-items: center;">
564 554
                     <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
565 555
                     <img class="es-img" style="height:38px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
566 556
                 </div>
@@ -568,7 +558,7 @@
568 558
             <td width="70">预冲护士:</td>
569 559
             <td width="100">
570 560
 
571
-                <div style="text-align: left;">
561
+                <div style="text-align: left;display: flex;align-items: center;">
572 562
                     <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.washpipe_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.washpipe_nurse)}}</span>
573 563
                     <img class="es-img" style="height:38px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.washpipe_nurse)" alt="" srcset="" v-else>
574 564
                 </div>
@@ -576,7 +566,7 @@
576 566
             <td width="100">穿刺/开管护士:</td>
577 567
             <td width="100">
578 568
 
579
-                <div style="text-align: left;">
569
+                <div style="text-align: left;display: flex;align-items: center;">
580 570
                     <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.puncture_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.puncture_nurse)}}</span>
581 571
                     <img class="es-img" style="height:38px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.puncture_nurse)" alt="" srcset="" v-else>
582 572
                 </div>
@@ -584,7 +574,7 @@
584 574
             <td width="70">核对护士:</td>
585 575
             <td width="100">
586 576
 
587
-                <div style="text-align: left;">
577
+                <div style="text-align: left;display: flex;align-items: center;">
588 578
                   <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''">
589 579
                   {{ getAdminUser(check == null ? 0 : check.modifier) }}
590 580
                   </span>
@@ -623,6 +613,7 @@
623 613
             <td width="60">电导度<br/>ms/cm</td>
624 614
             <td width="40">液温<br/>℃</td>
625 615
             <td width="40">血糖<br/>mmol/L</td>
616
+            <td width="40">ktv</td>
626 617
             <td>执行护士</td>
627 618
           </tr>
628 619
 
@@ -671,8 +662,11 @@
671 662
             <td>
672 663
               &nbsp;{{ monitor.blood_sugar ? monitor.blood_sugar : "" }}
673 664
             </td>
665
+            <td>
666
+              &nbsp;{{ monitor.ktv ? monitor.ktv : "" }}
667
+            </td>
674 668
             <td style="text-align:left;padding-left:5px;">
675
-                <span>
669
+                <span style="display:flex;align-items:center;">
676 670
                     <span v-if="setAdminUserES(monitor.monitoring_nurse) == ''">{{ getAdminUser(monitor.monitoring_nurse) }}</span>
677 671
                     <img class="es-img" style="height:38px" :src="setAdminUserES(monitor.monitoring_nurse)" alt srcset v-else />
678 672
                 </span>
@@ -724,7 +718,7 @@
724 718
                     <td width="50">kt/v:</td>
725 719
                     <td width='120'>
726 720
                         <div class="under-line">
727
-                          &nbsp;
721
+                          &nbsp;{{ monitorsKtv ? monitorsKtv : '' }}
728 722
                         </div>
729 723
                     </td>
730 724
                     <td></td>
@@ -822,10 +816,10 @@
822 816
                                 <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('常规(肝素/NS)')>-1?true:false" showValue="常规(肝素/NS)"></label-box>&nbsp;
823 817
                             </td>
824 818
                             <td width="50">
825
-                                <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('1:1')>-1?true:false" showValue="1:1"></label-box>&nbsp;
819
+                                <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('1:1')>-1?true:afterdialysis.sealing_fluid_dispose.indexOf('1:1')>-1?true:false" showValue="1:1"></label-box>&nbsp;
826 820
                             </td>
827 821
                             <td width="50">
828
-                                <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('1:3')>-1?true:false" showValue="1:3"></label-box>&nbsp;
822
+                                <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('1:3')>-1?true:afterdialysis.sealing_fluid_dispose.indexOf('1:3')>-1?true:false" showValue="1:3"></label-box>&nbsp;
829 823
                             </td>
830 824
                             <td width="190">
831 825
                                 <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('特殊(尿激酶/肝素/NS)')>-1?true:false" showValue="特殊(尿激酶/肝素/NS)"></label-box>&nbsp;
@@ -922,6 +916,10 @@
922 916
                     <td width="90" style="height:40px;">当班责任护士:</td>
923 917
                     <td width="100">
924 918
                       <div>
919
+                        <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''">
920
+                        {{ getAdminUser(check == null ? 0 : check.modifier) }}
921
+                        </span>
922
+                        <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
925 923
                       </div>
926 924
                     </td>
927 925
                     <td width="150"></td>
@@ -953,40 +951,35 @@
953 951
           <td width='80'>护士签名</td>
954 952
         </tr>
955 953
         <tr v-for="(advice, advice_index) in tableAdvice" :key="advice_index" >
956
-          <td style="height:40px;line-height:40px">{{ getTime(advice.start_time, "{h}:{i}") }}</td>
954
+          <td style="height:40px;line-height:40px;padding:0 1px !important;">{{ getTime(advice.start_time, "{h}:{i}") }}</td>
957 955
           <td class="parent" style="text-align:left;padding-left:10px;">
958 956
             <div style="display:flex;height:100%;">
959
-              <span style="width:70%;display:inline-block;">
960
-                <span v-if="advice.parent_id > 0">/</span>
957
+              <span style="width:65%;display:inline-block;">
958
+                <span v-if="advice.parent_id > 0">---></span>
961 959
                 <span>{{ advice.advice_name }}</span>
962 960
                 <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
963 961
                 <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
964 962
                 <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
965
-                
966 963
                 <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
967 964
                 <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
968 965
               </span>
969
-              <span v-if="advice.parent_id == 0" style="display: flex;align-items: baseline;"><span v-if="advice.delivery_way != ''" style="transform:rotate(30deg);border-left:1px solid #000;display:inline-block;height:100%;"></span>{{ advice.delivery_way }}</span>
966
+              <span style="display: flex;align-items: baseline;">
967
+                {{ advice.delivery_way }}
968
+              </span>
970 969
             </div>
971 970
           </td>
972
-          <td>
973
-            <span v-if="setAdminUserES(advice.advice_doctor) == ''">
971
+          <td style="text-align:left;">
972
+            <span>
974 973
               {{ getAdminUser(advice.advice_doctor) }}
975 974
             </span>
976
-            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
977
-              <img style="height:38px;" :src="setAdminUserES(advice.advice_doctor)" alt srcset />
978
-            </span>
979 975
           </td>
980 976
           
981 977
           
982 978
           <td>{{ getTime(advice.execution_time, "{y}-{m}-{d} {h}:{i}") }}</td>
983
-          <td>
984
-            <span v-if="setAdminUserES(advice.execution_staff) == ''">
979
+          <td style="text-align:left;">
980
+            <span>
985 981
               {{ getAdminUser(advice.execution_staff) }}
986 982
             </span>
987
-            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
988
-              <img style="height:38px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
989
-            </span>
990 983
           </td>
991 984
         </tr>
992 985
         <tr v-for="(advice, advice_index) in projects" :key="advice_index + 'no'">
@@ -999,8 +992,8 @@
999 992
             <span v-if="setAdminUserES(advice.doctor) == ''">
1000 993
               {{ getAdminUser(advice.doctor) }}
1001 994
             </span>
1002
-            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
1003
-              <img style="height:38px;" :src="setAdminUserES(advice.doctor)" alt srcset />
995
+            <span v-else style="display:flex;align-items:center;justify-content:space-between;height:36px;padding-left:5px;">
996
+              <img style="height:20px;" :src="setAdminUserES(advice.doctor)" alt srcset />
1004 997
             </span>
1005 998
           </td>
1006 999
           
@@ -1010,8 +1003,8 @@
1010 1003
             <span v-if="setAdminUserES(advice.execution_staff) == ''">
1011 1004
               {{ getAdminUser(advice.execution_staff) }}
1012 1005
             </span>
1013
-            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
1014
-              <img style="height:38px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
1006
+            <span v-else style="display:flex;align-items:center;justify-content:space-between;height:36px;padding-left:5px;">
1007
+              <img style="height:20px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
1015 1008
             </span>
1016 1009
           </td>
1017 1010
         </tr>
@@ -1143,15 +1136,20 @@ export default {
1143 1136
       },
1144 1137
       org_id:0,
1145 1138
       tableAdvice:[],
1146
-      projects:[]
1139
+      projects:[],
1140
+      monitorsKtv:0
1147 1141
     }
1148 1142
   },
1149 1143
   methods: {
1150 1144
     getBloodFlow(id){
1151 1145
         let BloodFlowOptions = getDataConfig('hemodialysis', 'blood_flow')
1152
-        if (id in BloodFlowOptions) {
1153
-            return BloodFlowOptions[id].name
1154
-        }
1146
+        let name = ''
1147
+        BloodFlowOptions.map(item => {
1148
+          if(item.id == id){
1149
+            name = item.name
1150
+          }
1151
+        })
1152
+        return name
1155 1153
     },
1156 1154
     getComplication(complication){
1157 1155
         if(complication.indexOf(',') == -1){
@@ -1415,8 +1413,9 @@ export default {
1415 1413
           // this.advices = response.data.data.advices
1416 1414
 
1417 1415
           this.advices =  response.data.data.advices.concat(response.data.data.doctorAdvice)
1418
-
1419
-          this.monitors = response.data.data.monitors
1416
+          let monitors = response.data.data.monitors
1417
+          this.monitors = JSON.parse(JSON.stringify(response.data.data.monitors))
1418
+          this.monitorsKtv = monitors.length > 0 ? monitors[monitors.length - 1].ktv : ''
1420 1419
           this.summary = response.data.data.summary
1421 1420
           this.org_template_info = response.data.data.org_template_info
1422 1421
           // 配置超滤量和置换量是否要显示0还是空
@@ -1432,9 +1431,10 @@ export default {
1432 1431
           this.jilurow = this.monitors.length + 1
1433 1432
           this.projects = response.data.data.projects
1434 1433
           var doctorAdevieInfo = response.data.data.advices
1434
+          console.log('doctorAdevieInfo',doctorAdevieInfo)
1435 1435
           var tableAdvice = doctorAdevieInfo
1436
-          if (tableAdvice.length + this.projects.length < 30) {
1437
-            var nl = 30 - (tableAdvice.length + this.projects.length)
1436
+          if (tableAdvice.length + this.projects.length < 28) {
1437
+            var nl = 28 - (tableAdvice.length + this.projects.length)
1438 1438
             for (let index = 0; index < nl; index++) {
1439 1439
               this.projects.push([])
1440 1440
             }
@@ -1443,60 +1443,60 @@ export default {
1443 1443
 
1444 1444
 
1445 1445
 
1446
-          this.advice_jilurow = this.advices.length + 1
1447
-
1448
-          var childMap = {}
1449
-          for (const index in this.advices) {
1450
-            if (this.advices[index].parent_id == 0) {
1451
-              continue
1452
-            }
1453
-            if (!(this.advices[index].parent_id in childMap)) {
1454
-              childMap[this.advices[index].parent_id] = []
1455
-            }
1456
-            childMap[this.advices[index].parent_id].push(this.advices[index])
1457
-          }
1458
-
1459
-          var advices = []
1460
-          for (const index in this.advices) {
1461
-            if (this.advices[index].parent_id > 0) {
1462
-              continue
1463
-            }
1464
-            var item = this.advices[index]
1465
-            if (item.id in childMap) {
1466
-              item.children = childMap[item.id]
1467
-            } else {
1468
-              item.children = []
1469
-            }
1470
-            advices.push(item)
1471
-          }
1472
-
1473
-          var leftAdvice = []
1474
-          var rightAdvice = []
1475
-          var adlen = advices.length
1476
-
1477
-          var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1478
-          for (var i = 0; i < halfLen; i++) {
1479
-            leftAdvice.push(advices[i])
1480
-            rightAdvice.push(advices[i + halfLen])
1481
-          }
1482
-          if (halfLen < 5) {
1483
-            var nl = 5 - leftAdvice.length
1484
-            for (let index = 0; index < nl; index++) {
1485
-              leftAdvice.push([])
1486
-            }
1487
-            var nl = 5 - rightAdvice.length
1488
-            for (let index = 0; index < nl; index++) {
1489
-              rightAdvice.push([])
1490
-            }
1491
-          }
1492
-
1493
-          this.advices = []
1494
-          for (var i = 0; i < halfLen; i++) {
1495
-            var item = []
1496
-            item.push(leftAdvice[i])
1497
-            item.push(rightAdvice[i])
1498
-            this.advices.push(item)
1499
-          }
1446
+          // this.advice_jilurow = this.advices.length + 1
1447
+
1448
+          // var childMap = {}
1449
+          // for (const index in this.advices) {
1450
+          //   if (this.advices[index].parent_id == 0) {
1451
+          //     continue
1452
+          //   }
1453
+          //   if (!(this.advices[index].parent_id in childMap)) {
1454
+          //     childMap[this.advices[index].parent_id] = []
1455
+          //   }
1456
+          //   childMap[this.advices[index].parent_id].push(this.advices[index])
1457
+          // }
1458
+
1459
+          // var advices = []
1460
+          // for (const index in this.advices) {
1461
+          //   if (this.advices[index].parent_id > 0) {
1462
+          //     continue
1463
+          //   }
1464
+          //   var item = this.advices[index]
1465
+          //   if (item.id in childMap) {
1466
+          //     item.children = childMap[item.id]
1467
+          //   } else {
1468
+          //     item.children = []
1469
+          //   }
1470
+          //   advices.push(item)
1471
+          // }
1472
+
1473
+          // var leftAdvice = []
1474
+          // var rightAdvice = []
1475
+          // var adlen = advices.length
1476
+
1477
+          // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1478
+          // for (var i = 0; i < halfLen; i++) {
1479
+          //   leftAdvice.push(advices[i])
1480
+          //   rightAdvice.push(advices[i + halfLen])
1481
+          // }
1482
+          // if (halfLen < 5) {
1483
+          //   var nl = 5 - leftAdvice.length
1484
+          //   for (let index = 0; index < nl; index++) {
1485
+          //     leftAdvice.push([])
1486
+          //   }
1487
+          //   var nl = 5 - rightAdvice.length
1488
+          //   for (let index = 0; index < nl; index++) {
1489
+          //     rightAdvice.push([])
1490
+          //   }
1491
+          // }
1492
+
1493
+          // this.advices = []
1494
+          // for (var i = 0; i < halfLen; i++) {
1495
+          //   var item = []
1496
+          //   item.push(leftAdvice[i])
1497
+          //   item.push(rightAdvice[i])
1498
+          //   this.advices.push(item)
1499
+          // }
1500 1500
           this.loading = false
1501 1501
 
1502 1502
           this.doctor_advices =

+ 19 - 4
src/xt_pages/user/courseOfDisease.vue Parādīt failu

@@ -218,7 +218,9 @@
218 218
         selectingRows: [],
219 219
         table_current_index: -1,
220 220
         edit_current_id: 0,
221
-        edit_title: ''
221
+        edit_title: '',
222
+        ids:"",
223
+        idArr:[],
222 224
       }
223 225
     },
224 226
     created() {
@@ -366,6 +368,14 @@
366 368
       },
367 369
 
368 370
       didSelectionChange: function(selectRows) {
371
+       
372
+        var arr = []
373
+        for(let i=0;i<selectRows.length;i++){
374
+           arr.push(selectRows[i].id)
375
+        }
376
+        var newArr = arr.join(',') 
377
+        this.ids = newArr
378
+        console.log("select23322332",this.ids)
369 379
         this.selectingRows = selectRows
370 380
       },
371 381
       deleteAction: function() {
@@ -422,12 +432,17 @@
422 432
         row.index = rowIndex
423 433
       }, onRowClick(row, event, column) {
424 434
         this.table_current_index = row.index
425
-      },print(){
426
-        if (this.table_current_index == -1) {
435
+      },
436
+      print(){
437
+        // if (this.table_current_index == -1) {
438
+        //   this.$message.error('请选择要打印的病程')
439
+        //   return
440
+        // }
441
+        if(this.ids.length == 0){
427 442
           this.$message.error('请选择要打印的病程')
428 443
           return
429 444
         }
430
-        this.$router.push({ path: "/course/print?id="+this.records[this.table_current_index].id});
445
+        this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
431 446
       }
432 447
     }
433 448
   }

+ 30 - 20
src/xt_pages/user/coursePrint.vue Parādīt failu

@@ -24,35 +24,39 @@
24 24
             </div>
25 25
 
26 26
             <div style="flex:1;text-align: center;">
27
-              床位:
28
-              <div  style="width: 120px;text-align: left;display:inline-block;">{{patient.DialysisSchedule&&patient.DialysisSchedule.device_number?patient.DialysisSchedule.device_number.number:''}}</div>
27
+              透析号:
28
+                <div  style="width: 120px;text-align: left;display:inline-block;">
29
+                  {{patient.dialysis_no?patient.dialysis_no:"/"}}
30
+                </div>
29 31
             </div>
30 32
 
31 33
             <div  style="flex:1;text-align: center;">
32 34
               住院号:
33
-              <div style="width: 100px;text-align: left;display:inline-block;" v-if="patient.admission_number">
34
-                {{patient.admission_number}}
35
-              </div>
36
-              <div style="width: 100px;;display:inline-block;" v-else>
37
-                {{'/'}}
35
+              <div style="width: 100px;text-align: left;display:inline-block;">
36
+                 {{patient.admission_number?patient.admission_number:"/"}}
38 37
               </div>
38
+           
39 39
             </div>
40 40
 
41 41
           </div>
42
-          <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;">
42
+          <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;" v-for="(item,index) in this.record" :key="index">
43 43
             <div class="inline_block">
44
-              <div>{{getTime(record.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
44
+              <div>{{getTime(item.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
45 45
             </div>
46 46
             <div class="inline_block" style="margin-left: 30px">
47
-              <div>{{record.title}}</div>
47
+              <div>{{item.title}}</div>
48
+            </div>
49
+
50
+             <div class="inline_block" style="width:100%;">
51
+              <div v-html="item.content" class="printP">{{item.content}}</div>
48 52
             </div>
49 53
           </div>
50 54
 
51
-          <div class="row" style="padding: 2px 0;line-height:24px;">
55
+          <!-- <div class="row" style="padding: 2px 0;line-height:24px;">
52 56
             <div class="inline_block" style="width:100%;">
53
-              <div v-html="record.content" class="printP">{{record.content}}</div>
57
+              <div v-html="item.content" class="printP">{{item.content}}</div>
54 58
             </div>
55
-          </div>
59
+          </div> -->
56 60
 
57 61
         </div>
58 62
       </div>
@@ -81,7 +85,7 @@
81 85
 
82 86
         loading: false,
83 87
         orgname: '',
84
-        record: {},
88
+        record:[],
85 89
         patient: {}
86 90
       }
87 91
     },
@@ -92,16 +96,22 @@
92 96
     },
93 97
     mounted() {
94 98
       this.loading = true
95
-      var id = this.$route.query.id
96
-      if (id == 0) {
97
-        this.$router.back(-1)
98
-        return
99
+      var ids = this.$route.query.ids
100
+      var patient_id = parseInt(this.$route.query.patient_id)
101
+      var params = {
102
+          ids:ids,
103
+          patient_id:patient_id,
99 104
       }
100
-      GetCoursePrintData(id).then(rs => {
105
+      console.log("para2333223233223",params)
106
+      GetCoursePrintData(params).then(rs => {
101 107
         var resp = rs.data
102 108
         if (resp.state == 1) {
103 109
           this.record = resp.data.record
104
-          this.record.content = resp.data.record.content.replace(new RegExp('<p>','g'),"<div>").replace(new RegExp('</p>','g'),"</div>")
110
+          console.log("h2232323223",this.record)
111
+          // for(let i=0;i<this.record.length;i++){
112
+          //   this.record[i].content = this.record[i].content.replace(new RegExp('<p>','g'),"<div>").replace(new RegExp('</p>','g'),"</div>")
113
+          // }
114
+          console.log("h2232323223",this.record)
105 115
           this.patient = resp.data.patient
106 116
 
107 117
           this.loading = false

+ 289 - 60
src/xt_pages/user/hospitalSummary.vue Parādīt failu

@@ -7,7 +7,7 @@
7 7
         <div>
8 8
                     <span style="margin-left: 10px;float:right;">
9 9
                         <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
10
-                                   @click="show_dialog = true">新增</el-button>
10
+                                   @click="addAction">新增</el-button>
11 11
 
12 12
                         <el-button type="primary" icon="el-icon-edit-outline" size="small"
13 13
                                    @click="toEdit">修改</el-button>
@@ -77,7 +77,7 @@
77 77
                    {{getDoctor(hosDetail.doctor)}}
78 78
                 </div>
79 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> 
80
+                  <span v-if="hosDetail.record_date > 0">{{getTime(hosDetail.record_date)}}</span> 
81 81
                 </div>
82 82
                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病案号:
83 83
                    {{hosDetail.sick_personnel}}
@@ -98,22 +98,22 @@
98 98
                    {{hosDetail.pathology}}
99 99
                  </div>
100 100
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院诊断:
101
-                   {{hosDetail.admitting_diagnosis}}
101
+                   <span v-html="hosDetail.admitting_diagnosis"></span> 
102 102
                  </div>
103 103
                   <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院诊断:
104
-                   {{hosDetail.discharge_diagnosis}}
104
+                   <span v-html="hosDetail.discharge_diagnosis"></span>
105 105
                  </div>
106 106
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院时病情:
107
-                   {{hosDetail.diagnosis_admission}}
107
+                   <span v-html="hosDetail.diagnosis_admission"></span>
108 108
                  </div>
109 109
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊断经过:
110
-                   {{hosDetail.treatment}}
110
+                   <span v-html="hosDetail.treatment"></span> 
111 111
                  </div>
112 112
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院时病情:
113
-                   {{hosDetail.illness_discharge}}
113
+                   <span v-html="hosDetail.illness_discharge"></span> 
114 114
                  </div>
115 115
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院医嘱:
116
-                   {{hosDetail.discharge_advice}}
116
+                    <span v-html="hosDetail.discharge_advice"></span>
117 117
                  </div>
118 118
                
119 119
               </div>
@@ -247,7 +247,7 @@
247 247
                 <div class="textarea_panel">
248 248
                     <keep-alive>
249 249
                       <editor ref="editorTwo"
250
-                              id="editorsTwo"
250
+                              id="editorTwo"
251 251
                               style="width: 800px"
252 252
                               v-bind:r_content="form.diagnosis_admission">
253 253
                       </editor>
@@ -284,7 +284,7 @@
284 284
                <div class="textarea_panel">
285 285
                     <keep-alive>
286 286
                       <editor ref="editorFive"
287
-                              id="editorsFive"
287
+                              id="editorFive"
288 288
                               style="width: 800px"
289 289
                               v-bind:r_content="form.illness_discharge">
290 290
                       </editor>
@@ -302,7 +302,7 @@
302 302
                 <div class="textarea_panel">
303 303
                     <keep-alive>
304 304
                       <editor ref="editorSix"
305
-                              id="editorsSix"
305
+                              id="editorSix"
306 306
                               style="width: 800px"
307 307
                               v-bind:r_content="form.discharge_advice">
308 308
                       </editor>
@@ -442,8 +442,8 @@
442 442
 
443 443
                 <div class="textarea_panel">
444 444
                     <keep-alive>
445
-                      <editor ref="editorEight"
446
-                              id="editorEight"
445
+                      <editor ref="editorSixty"
446
+                              id="editorSixty"
447 447
                               style="width: 800px"
448 448
                               v-bind:r_content="form.diagnosis_admission">
449 449
                       </editor>
@@ -479,8 +479,8 @@
479 479
 
480 480
                <div class="textarea_panel">
481 481
                     <keep-alive>
482
-                      <editor ref="editorElement"
483
-                              id="editorElement"
482
+                      <editor ref="editorThirty"
483
+                              id="editorThirty"
484 484
                               style="width: 800px"
485 485
                               v-bind:r_content="form.illness_discharge">
486 486
                       </editor>
@@ -583,8 +583,8 @@
583 583
         form:{
584 584
           id:0,
585 585
           title:"",
586
-          admission_time:new Date(),
587
-          discharge_time:new Date(),
586
+          admission_time:this.getTime(new Date()),
587
+          discharge_time:this.getTime(new Date()),
588 588
           sick_personnel:"",
589 589
           xray:"",
590 590
           admitting_diagnosis_id:"",
@@ -599,7 +599,7 @@
599 599
           illness_discharge:"",
600 600
           dean:"",
601 601
           doctor:"",
602
-          record_date:new Date(),
602
+          record_date:this.getTime(new Date()),
603 603
           discharge_advice_id:"",
604 604
           discharge_advice:"",
605 605
           connecticut:"",
@@ -612,13 +612,14 @@
612 612
        docList:[],
613 613
        doctorList:[],
614 614
        hosDetail:{},
615
+       ids:"",
615 616
       }
616 617
     },
617 618
     created() {
618 619
      
619
-     
620
+ 
620 621
       this.patient_id = this.$route.params && this.$route.params.id
621
-      console.log("患者2332323",this.patient_id)
622
+      console.log("患者2332323",this.$store.getters.configlist.admitting_diagnosis)
622 623
       var now = new Date()
623 624
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
624 625
 
@@ -673,61 +674,140 @@
673 674
 
674 675
        },
675 676
       changeCurrentRecordTwo(row){
676
-        this.form.id = row.id 
677
-        this.getHospitalSummaryDetail(row.id)
677
+       
678
+        this.form.id = 0
679
+        if(row!=null){
680
+          this.form.id = row.id 
681
+          this.getHospitalSummaryDetail(row.id)
682
+        }
678 683
       },
679 684
       selectSummary(row){
680
-       console.log("row322323",row)
685
+        var arr = []
686
+        for(let i=0;i<row.length;i++){
687
+          arr.push(row[i].id)
688
+        }
689
+       var ids = arr.join(",")
690
+       this.ids = ids
681 691
       },
682 692
       changeAmittDiagnosis(content){
693
+        
683 694
         this.form.admitting_diagnosis = content
684 695
       },
685 696
       changeDischargeDiagnosis(content){
697
+       
686 698
          this.form.discharge_diagnosis = content
687 699
       },
688 700
       changeDiagnosisAdmission(content){
701
+      
689 702
        this.form.diagnosis_admission = content
690 703
       },
691 704
       changeTreatment(content){
705
+       
692 706
         this.form.treatment = content
693 707
       },
694 708
       changeillnessDisCharge(content){
709
+      
695 710
         this.form.illness_discharge = content
696 711
       },
697 712
       changeDischargeAdvice(content){
713
+      
698 714
         this.form.discharge_advice = content
699 715
       },
700 716
       createAction(){
717
+         console.log("hh23h",this.templates)
718
+         var admitting_diagnosis_id = ""
719
+         var discharge_diagnosis_id = ""
720
+         var diagnosis_admission_id = ""
721
+         var treatment_id = ""
722
+         var illness_discharge_id=""
723
+         var discharge_advice_id= ""
724
+         
725
+         if(this.templates!=undefined){
726
+            for(let i=0;i<this.templates.length;i++){
727
+            if(this.form.admitting_diagnosis_id == this.templates[i].content){
728
+            
729
+                admitting_diagnosis_id = this.templates[i].title
730
+              }
731
+          }
732
+         }
733
+       
734
+         if(this.templatesOne!=undefined){
735
+          for(let i=0;i<this.templatesOne.length;i++){
736
+           if(this.form.discharge_diagnosis_id == this.templatesOne[i].content){
737
+              discharge_diagnosis_id = this.templatesOne[i].title
738
+            }
739
+          }
740
+         }
741
+         
742
+         if(this.templatesTwo!=undefined){
743
+          for(let i=0;i<this.templatesTwo.length;i++){
744
+            if(this.form.diagnosis_admission_id == this.templatesTwo[i].content){
745
+                diagnosis_admission_id = this.templatesTwo[i].title
746
+              }
747
+          }
748
+         }
749
+        
750
+        if(this.templatesThree!=undefined){
751
+         for(let i=0;i<this.templatesThree.length;i++){
752
+           if(this.form.treatment_id == this.templatesThree[i].content){
753
+              treatment_id = this.templatesThree[i].title
754
+            }
755
+         }
756
+        }
757
+        
758
+        if(this.templatesFour!=undefined){
759
+          for(let i=0;i<this.templatesFour.length;i++){
760
+           if(this.form.illness_discharge_id == this.templatesFour[i].content){
761
+              illness_discharge_id = this.templatesFour[i].title
762
+            }
763
+         }
764
+        }
701 765
          
766
+        if(this.templatesFive!=undefined){
767
+         for(let i=0;i<this.templatesFive.length;i++){
768
+           if(this.form.discharge_advice_id == this.templatesFive[i].content){
769
+              discharge_advice_id = this.templatesFive[i].title
770
+            }
771
+         }
772
+        }
773
+
774
+       
775
+         if(this.form.doctor == ""){
776
+            this.form.doctor = 0
777
+         }
778
+         if(this.form.dean == ""){
779
+           this.form.dean = 0
780
+         }
781
+         console.log("hhj232322323",this.form.admitting_diagnosis_id)
702 782
          var params = {
703 783
           patient_id:parseInt(this.patient_id),
704 784
           title:this.form.title,
705
-          admission_time:this.getTime(this.form.admission_time),
706
-          discharge_time:this.getTime(this.form.discharge_time),
785
+          admission_time:this.form.admission_time,
786
+          discharge_time:this.form.discharge_time,
707 787
           sick_personnel:this.form.sick_personnel,
708 788
           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,
789
+          admitting_diagnosis_id:admitting_diagnosis_id,
790
+          admitting_diagnosis:this.$refs.editor.content,
791
+          discharge_diagnosis:this.$refs.editorOne.content,
792
+          discharge_diagnosis_id:discharge_diagnosis_id,
793
+          diagnosis_admission_id:diagnosis_admission_id,
794
+          diagnosis_admission:this.$refs.editorTwo.content,
795
+          illness_discharge:this.$refs.editorFive.content,
796
+          illness_discharge_id:illness_discharge_id,
797
+          discharge_advice_id:discharge_advice_id,
798
+          discharge_advice:this.$refs.editorSix.content,
799
+          treatment_id:treatment_id,
800
+          treatment:this.$refs.editorFour.content,
721 801
           dean:this.form.dean,
722 802
           doctor:this.form.doctor,
723
-          record_date:this.getTime(this.form.record_date),
803
+          record_date:this.form.record_date,
724 804
           connecticut:this.form.connecticut,
725 805
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
726 806
           ultrasound:this.form.ultrasound,
727 807
           pathology:this.form.pathology,
728 808
          }
729 809
          console.log("oaram2322323",params)
730
-         
810
+        
731 811
          createHospitalSummary(params).then(response=>{
732 812
             if(response.data.state == 1){
733 813
               var list = response.data.data.list
@@ -800,6 +880,7 @@
800 880
         getHospitalSummaryDetail(id).then(response=>{
801 881
            if(response.data.state == 1){
802 882
              var detail = response.data.data.detail
883
+            
803 884
              this.hosDetail = detail
804 885
            }
805 886
         })
@@ -808,6 +889,13 @@
808 889
         getHospitalSummaryDetail(id).then(response=>{
809 890
            if(response.data.state == 1){
810 891
              var detail = response.data.data.detail
892
+             console.log("detial323232232323322323",detail)
893
+             if(detail.doctor == 0){
894
+               this.form.doctor = ""
895
+             }
896
+             if(detail.dean == 0){
897
+               this.form.dean = ""
898
+             }
811 899
              this.form.id = detail.id
812 900
              this.form.title = detail.title
813 901
              this.form.patient_id = detail.patient_id
@@ -822,20 +910,21 @@
822 910
              this.form.admitting_diagnosis_id = detail.admitting_diagnosis_id
823 911
              this.form.admitting_diagnosis = detail.admitting_diagnosis
824 912
              this.form.discharge_diagnosis = detail.discharge_diagnosis
913
+             console.log("出院争端233232",detail.discharge_diagnosis_id)
825 914
              this.form.discharge_diagnosis_id = detail.discharge_diagnosis_id
826 915
              this.form.diagnosis_admission_id = detail.diagnosis_admission_id
827 916
              this.form.diagnosis_admission = detail.diagnosis_admission
917
+             console.log("详情233232232323",this.form.diagnosis_admission)
828 918
              this.form.treatment_id = detail.treatment_id
829 919
              this.form.treatment = detail.treatment
830 920
              this.form.illness_discharge_id = detail.illness_discharge_id
831 921
              this.form.illness_discharge = detail.illness_discharge
832 922
              this.form.discharge_advice_id = detail.discharge_advice_id
833 923
              this.form.discharge_advice = detail.discharge_advice
834
-             this.form.record_time = detail.record_time
924
+             this.form.record_time = this.getTime(detail.record_time)
925
+             this.form.record_date = this.getTime(detail.record_date)
835 926
              this.form.dean = detail.dean_id
836 927
              this.form.doctor = detail.doctor
837
-             this.form.record_date = detail.record_date
838
-             this.hosDetail = detail
839 928
              this.edit_show_dialog = true
840 929
            }
841 930
         })
@@ -844,7 +933,115 @@
844 933
         this.getHospitalSummaryDetailOne(this.form.id)
845 934
       },
846 935
       updateAction(){
847
-         console.log("hhhahdf2332332",this.form.admission_time)
936
+         var admitting_diagnosis_id = this.form.admitting_diagnosis_id
937
+         var discharge_diagnosis_id = this.form.discharge_diagnosis_id
938
+         var diagnosis_admission_id = this.form.diagnosis_admission_id
939
+         var treatment_id = this.form.treatment_id
940
+         var illness_discharge_id= this.form.illness_discharge_id
941
+         var discharge_advice_id= this.form.discharge_advice_id
942
+
943
+         if(this.templates!=undefined){
944
+            for(let i=0;i<this.templates.length;i++){
945
+            if(this.form.admitting_diagnosis_id == this.templates[i].content){
946
+            
947
+                admitting_diagnosis_id = this.templates[i].title
948
+              }
949
+          }
950
+         }
951
+        
952
+        
953
+         if(this.templatesOne!=undefined){
954
+          for(let i=0;i<this.templatesOne.length;i++){
955
+           if(this.form.discharge_diagnosis_id == this.templatesOne[i].content){
956
+              discharge_diagnosis_id = this.templatesOne[i].title
957
+            }
958
+          }
959
+         }
960
+        console.log("6666666",this.form.diagnosis_admission_id)
961
+        console.log("777777777",this.templatesTwo)
962
+        console.log("8888888",this.$refs.editorSixty.content)
963
+         if(this.templatesTwo!=undefined){
964
+          for(let i=0;i<this.templatesTwo.length;i++){
965
+            if(this.form.diagnosis_admission_id == this.templatesTwo[i].content){
966
+                diagnosis_admission_id = this.templatesTwo[i].title
967
+              }
968
+          }
969
+         }
970
+        
971
+        if(this.templatesThree!=undefined){
972
+           for(let i=0;i<this.templatesThree.length;i++){
973
+           if(this.form.treatment_id == this.templatesThree[i].content){
974
+              treatment_id = this.templatesThree[i].title
975
+            }
976
+         }
977
+        }
978
+         console.log("99999999",this.templatesFour)
979
+         console.log("88888888",this.form.illness_discharge_id)
980
+         console.log("ffffffff",this.$refs.editorThirty.content)
981
+        if(this.templatesFour!=undefined){
982
+            for(let i=0;i<this.templatesFour.length;i++){
983
+           if(this.form.illness_discharge_id == this.templatesFour[i].content){
984
+              illness_discharge_id = this.templatesFour[i].title
985
+            }
986
+         }
987
+        }
988
+
989
+       if(this.templatesFive!=undefined){
990
+         for(let i=0;i<this.templatesFive.length;i++){
991
+           if(this.form.discharge_advice_id == this.templatesFive[i].content){
992
+              discharge_advice_id = this.templatesFive[i].title
993
+            }
994
+         }
995
+       }
996
+    
997
+
998
+      
999
+        if(this.form.doctor == ""){
1000
+            this.form.doctor = 0
1001
+         }
1002
+         if(this.form.dean == ""){
1003
+           this.form.dean = 0
1004
+         }
1005
+        var admitting_diagnosis = ""
1006
+        var discharge_diagnosis = ""
1007
+        var diagnosis_admission = ""
1008
+        var discharge_advice = ""
1009
+        var treatment = ""
1010
+        var illness_discharge = ""
1011
+        if(this.$refs.editorTen.content == ""){
1012
+            admitting_diagnosis = this.form.admitting_diagnosis
1013
+         }else{
1014
+            admitting_diagnosis = this.$refs.editorTen.content
1015
+         }
1016
+         if(this.$refs.editorSeven.content== ""){
1017
+            discharge_diagnosis = this.form.discharge_diagnosis
1018
+         }else{
1019
+           discharge_diagnosis = this.$refs.editorSeven.content
1020
+         }
1021
+
1022
+         if(this.$refs.editorSixty.content == ""){
1023
+            diagnosis_admission = this.form.diagnosis_admission
1024
+         }else{
1025
+           diagnosis_admission = this.$refs.editorSixty.content 
1026
+         }
1027
+         
1028
+         if(this.$refs.editorThirty.content == ""){
1029
+            illness_discharge = this.form.illness_discharge
1030
+         }else{
1031
+           illness_discharge = this.$refs.editorThirty.content
1032
+         }
1033
+
1034
+         if(this.$refs.editorTwelve.content == ""){
1035
+            discharge_advice = this.form.discharge_advice
1036
+         }else{
1037
+            discharge_advice = this.$refs.editorTwelve.content
1038
+         }
1039
+
1040
+         if(this.$refs.editorNight.content == ""){
1041
+            treatment = this.form.treatment
1042
+         }else{
1043
+            treatment = this.$refs.editorNight.content
1044
+         }
848 1045
          var params = {
849 1046
           id:this.form.id,
850 1047
           patient_id:parseInt(this.patient_id),
@@ -853,18 +1050,18 @@
853 1050
           discharge_time:this.form.discharge_time,
854 1051
           sick_personnel:this.form.sick_personnel,
855 1052
           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,
1053
+          admitting_diagnosis_id:admitting_diagnosis_id,
1054
+          admitting_diagnosis:admitting_diagnosis,
1055
+          discharge_diagnosis:discharge_diagnosis,
1056
+          discharge_diagnosis_id:discharge_diagnosis_id,
1057
+          diagnosis_admission_id:diagnosis_admission_id,
1058
+          diagnosis_admission:diagnosis_admission,
1059
+          illness_discharge:illness_discharge,
1060
+          illness_discharge_id:illness_discharge_id,
1061
+          discharge_advice_id:discharge_advice_id,
1062
+          discharge_advice:discharge_advice,
1063
+          treatment_id:treatment_id,
1064
+          treatment:treatment,
868 1065
           dean:this.form.dean,
869 1066
           doctor:this.form.doctor,
870 1067
           record_date:this.getTime(this.form.record_date),
@@ -872,30 +1069,36 @@
872 1069
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
873 1070
           ultrasound:this.form.ultrasound,
874 1071
           pathology:this.form.pathology,
1072
+          record_date:this.form.record_date,
875 1073
          }
876
-        console.log("param2332233223232323",params)
877
-     
1074
+        console.log("比你强2332322323232",params)
1075
+   
878 1076
         updateHospitalSummary(params).then(response=>{
879 1077
           if(response.data.state == 1){
880 1078
             var detail = response.data.data.detail
881 1079
             this.edit_show_dialog = false
1080
+            // this.$refs.monthlyPlanTable.setCurrentRow(detail)
882 1081
             this.getlist()
883 1082
           }
884 1083
         }) 
885 1084
       },
886
-      deleteAction(id,index){
1085
+      deleteAction(){
1086
+          if(this.ids.length == 0){
1087
+            this.$message.error("请勾选需要删除的数据")
1088
+            return false
1089
+          }
887 1090
           this.$confirm('确认删除吗?', '删除', {
888 1091
             confirmButtonText: '确 定',
889 1092
             cancelButtonText: '取 消',
890 1093
             type: 'warning'
891 1094
          }).then(() => {
892 1095
             var params = {
893
-              id:this.form.id,
1096
+              ids:this.ids,
894 1097
             }
895 1098
             deleteHospitalSummary(params).then(response => {
896 1099
               if (response.data.state == 1) {
897 1100
                   var msg = response.data.data.msg
898
-                  this.tableData.splice(index, 1);
1101
+                  this.getlist()
899 1102
                   this.$message.success("删除成功")
900 1103
               } else {
901 1104
                   this.$message.error("删除失败")
@@ -903,6 +1106,32 @@
903 1106
             })
904 1107
           }).catch(() => {
905 1108
           }) 
1109
+      },
1110
+      addAction(){
1111
+        this.form.title = ""
1112
+        this.form.sick_personnel = ""
1113
+        this.form.xray = ""
1114
+        this.form.admitting_diagnosis = ""
1115
+        this.form.discharge_diagnosis = ""
1116
+        this.form.diagnosis_admission = ""
1117
+        this.form.illness_discharge = ""
1118
+        this.form.discharge_advice = ""
1119
+        this.form.treatment = ""
1120
+        this.form.connecticut = ""
1121
+        this.form.nuclear_magnetic_resonance = ""
1122
+        this.form.ultrasound = ""
1123
+        this.form.pathology = ""
1124
+        this.form.admitting_diagnosis_id = ""
1125
+        this.form.discharge_diagnosis_id = ""
1126
+        this.form.illness_discharge_id = ""
1127
+        this.form.discharge_advice_id  =""
1128
+        this.form.treatment_id = "" 
1129
+        this.form.dean = ""
1130
+        this.form.doctor = ""
1131
+        this.form.admission_time = this.getTime(new Date())
1132
+        this.form.admission_time = this.getTime(new Date()),
1133
+        this.form.discharge_time = this.getTime(new Date()),
1134
+        this.show_dialog = true
906 1135
       }
907 1136
     },
908 1137
     watch: {

+ 36 - 35
src/xt_pages/user/hospitalSummaryPrint.vue Parādīt failu

@@ -7,38 +7,39 @@
7 7
     <div class="dialysis-print-order">
8 8
       <div class="order-yy-name"></div>
9 9
       <div class="order-title">{{ orgname }}出院小结</div>
10
+      <div style="margin-float:right">病案号:{{hosDetail.sick_personnel}}</div>
10 11
       <div>
11 12
         <table class="print-table" border="1" style="margin-top: 10px;">
12 13
           <tr>
13
-            <td style="text-align:center;width:170px" colspan="1">
14
+            <td style="text-align:center;width:50px" colspan="1">
14 15
               姓名:
15 16
             </td>
16
-             <td style="text-align:center;width:170px" colspan="1">
17
+             <td style="text-align:center;width:50px" colspan="1">
17 18
               <span style="display:inline-block;margin-left:10px;">
18 19
                {{patient.name}}
19 20
               </span>
20 21
             </td>
21
-            <td style="text-align:center;" colspan="1">
22
+            <td style="text-align:center;width:50px" colspan="1">
22 23
               性别:
23 24
             </td>
24
-             <td style="text-align:center;" colspan="1">
25
+             <td style="text-align:center;width:50px" colspan="1">
25 26
               <span style="display:inline-block;margin-left:10px;">
26 27
                 <span v-if="patient.gender == 1">男</span>
27 28
                 <span v-if="patient.gender == 2">女</span>
28 29
               </span>
29 30
             </td>
30
-            <td style="text-align:center;" colspan="1">
31
+            <td style="text-align:center;width:50px" colspan="1">
31 32
               年龄:
32 33
             </td>
33
-            <td style="text-align:center;" colspan="1">
34
+            <td style="text-align:center;width:50px" colspan="1">
34 35
               <span style="display:inline-block;margin-left:10px;">
35 36
                  {{getNewAge(patient.id_card_no)}}
36 37
               </span>
37 38
             </td>
38
-            <td style="text-align:center;" colspan="1">
39
+            <td style="text-align:center;width:50px" colspan="1">
39 40
               婚姻:
40 41
             </td>
41
-             <td style="text-align:center;" colspan="1">
42
+             <td style="text-align:center;width:50px" colspan="1">
42 43
               <span style="display:inline-block;margin-left:10px;">
43 44
                  <span v-if="patient.marital_status == 0">未婚</span>
44 45
                  <span v-if="patient.marital_status == 1">已婚</span>
@@ -47,18 +48,18 @@
47 48
                  <span v-if="patient.marital_status == 4">丧偶</span>
48 49
               </span>
49 50
             </td>
50
-             <td style="text-align:center;" colspan="1">
51
+             <td style="text-align:center;width:50px" colspan="1">
51 52
               职业: 
52 53
             </td>
53
-             <td style="text-align:center;" colspan="1">
54
+             <td style="text-align:center;width:50px" colspan="1">
54 55
               <span style="display:inline-block;margin-left:10px;">
55 56
                {{getProfession(patient.profession)?getProfession(patient.profession):''}}
56 57
               </span>
57 58
             </td>
58
-             <td style="text-align:center;" colspan="1">
59
+             <td style="text-align:center;width:50px" colspan="1">
59 60
               电话:
60 61
             </td>
61
-             <td style="text-align:center;" colspan="1">
62
+             <td style="text-align:center;width:50px" colspan="1">
62 63
               <span style="display:inline-block;margin-left:10px;">
63 64
                 {{patient.phone}}
64 65
               </span>
@@ -85,28 +86,28 @@
85 86
                 {{getTime(hosDetail.admission_time)}}
86 87
               </span>
87 88
             </td>
88
-            <td style="text-align:center;width:170px" colspan="2">
89
+            <td style="text-align:center;width:100px" colspan="2">
89 90
               出院时间:
90 91
             </td>
91
-            <td style="text-align:center;width:170px" colspan="2">
92
+            <td style="text-align:center;width:100px" colspan="2">
92 93
               <span style="display:inline-block;margin-left:10px;">
93 94
                 {{getTime(hosDetail.discharge_time)}}
94 95
               </span>
95 96
             </td>
96
-            <td style="text-align:center;" colspan="1">
97
+            <td style="text-align:center;width:100px"  colspan="1">
97 98
               住院天数:
98 99
             </td>
99
-            <td style="text-align:center;" colspan="1">
100
+            <td style="text-align:center;width:50px" colspan="1">
100 101
               <span style="display:inline-block;margin-left:10px;">
101 102
                {{getTimeDay(hosDetail.admission_time,hosDetail.discharge_time)}}
102 103
                
103 104
               </span>
104 105
             </td>
105
-            <td style="text-align:center;" colspan="2">
106
+            <td style="text-align:center;width:50px" colspan="2">
106 107
               转归:
107 108
             
108 109
             </td>
109
-            <td style="text-align:center;" colspan="1">
110
+            <td style="text-align:center;width:50px" colspan="1">
110 111
               <span style="display:inline-block;margin-left:10px;">
111 112
                 <span v-if="patient.lapseto == 1">留治</span>
112 113
                 <span v-if="patient.lapseto == 2">转归</span>
@@ -115,45 +116,45 @@
115 116
             
116 117
           </tr>
117 118
           <tr>
118
-            <td style="text-align:center;width:170px" colspan="2">
119
+            <td style="text-align:center;width:50px" colspan="1">
119 120
               检查号:
120 121
             </td>
121
-            <td style="text-align:center;" colspan="1">
122
+            <td style="text-align:center;width:50px" colspan="2">
122 123
               X线:
123 124
             </td>
124
-            <td style="text-align:center;" colspan="1">
125
+            <td style="text-align:center;width:50px" colspan="1">
125 126
               <span style="display:inline-block;margin-left:10px;">
126 127
                 {{hosDetail.xray}}
127 128
               </span>
128 129
             </td>
129
-            <td style="text-align:center;" colspan="1">
130
+            <td style="text-align:center;width:50px" colspan="1">
130 131
               CT:
131 132
             </td>
132
-            <td style="text-align:center;" colspan="1">
133
+            <td style="text-align:center;width:50px" colspan="1">
133 134
               <span style="display:inline-block;margin-left:10px;">
134 135
                 {{hosDetail.connecticut}}
135 136
               </span>
136 137
             </td>
137
-            <td style="text-align:center;" colspan="1">
138
+            <td style="text-align:center;width:50px" colspan="1">
138 139
               MRI:
139 140
             </td>
140
-             <td style="text-align:center;" colspan="1">
141
+             <td style="text-align:center;width:50px" colspan="1">
141 142
               <span style="display:inline-block;margin-left:10px;">
142 143
                 {{hosDetail.nuclear_magnetic_resonance}}
143 144
               </span>
144 145
             </td>
145
-             <td style="text-align:center;" colspan="1">
146
+             <td style="text-align:center;width:50px" colspan="1">
146 147
               超声:
147 148
             </td>
148
-             <td style="text-align:center;" colspan="1">
149
+             <td style="text-align:center;width:50px" colspan="1">
149 150
               <span style="display:inline-block;margin-left:10px;">
150 151
                 {{hosDetail.ultrasound}}
151 152
               </span>
152 153
             </td>
153
-             <td style="text-align:center;" colspan="1">
154
+             <td style="text-align:center;width:50px" colspan="1">
154 155
               病理:
155 156
             </td>
156
-             <td style="text-align:center;" colspan="1">
157
+             <td style="text-align:center;width:50px" colspan="1">
157 158
               <span style="display:inline-block;margin-left:10px;">
158 159
                 {{hosDetail.pathology}}
159 160
               </span>
@@ -168,7 +169,7 @@
168 169
             </td>   
169 170
             <td style="text-align:center;" colspan="11">
170 171
               <span style="display:inline-block;margin-left:10px;">
171
-                {{hosDetail.admitting_diagnosis_id}}
172
+                <span v-html="hosDetail.admitting_diagnosis"></span>
172 173
               </span>
173 174
             </td>   
174 175
           </tr>
@@ -179,7 +180,7 @@
179 180
              <td style="text-align:center;width:170px" colspan="11">
180 181
              
181 182
               <span style="display:inline-block;margin-left:10px;">
182
-                {{hosDetail.discharge_diagnosis_id}}
183
+               <span v-html="hosDetail.discharge_diagnosis"></span>  
183 184
               </span>
184 185
             </td>
185 186
             
@@ -191,7 +192,7 @@
191 192
            <td style="text-align:center;width:170px" colspan="11">
192 193
             
193 194
               <span style="display:inline-block;margin-left:10px;">
194
-                 {{hosDetail.diagnosis_admission_id}}
195
+                 <span v-html="hosDetail.diagnosis_admission"></span>
195 196
               </span>
196 197
             </td>
197 198
             
@@ -204,7 +205,7 @@
204 205
             </td>
205 206
             <td style="text-align:center;width:170px" colspan="11">
206 207
               <span style="display:inline-block;margin-left:10px;">
207
-                {{hosDetail.treatment}}
208
+               <span v-html="hosDetail.treatment"></span> 
208 209
               </span>
209 210
             </td>
210 211
             
@@ -216,7 +217,7 @@
216 217
             <td style="text-align:center;width:170px" colspan="11">
217 218
             
218 219
               <span style="display:inline-block;margin-left:10px;">
219
-                {{hosDetail.illness_discharge}}
220
+               <span v-html="hosDetail.illness_discharge"></span> 
220 221
               </span>
221 222
             </td>
222 223
           
@@ -228,7 +229,7 @@
228 229
             </td>
229 230
             <td style="text-align:center;width:170px" colspan="11">
230 231
               <span style="display:inline-block;margin-left:10px;">
231
-                {{hosDetail.discharge_advice}}
232
+                <span v-html="hosDetail.discharge_advice"></span> 
232 233
               </span>
233 234
             </td>
234 235
             

+ 11 - 11
src/xt_pages/user/templateSummary.vue Parādīt failu

@@ -331,7 +331,7 @@
331 331
                                 v-bind:r_content="form.template_plan_content">
332 332
                         </editor>
333 333
                     </keep-alive>
334
-                    
334
+
335 335
                   </el-row> -->
336 336
                   <el-row>
337 337
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
@@ -672,7 +672,7 @@
672 672
               <el-form-item>
673 673
                 <span>选择检验检查时间:</span>
674 674
                 <div>
675
-                
675
+
676 676
                  <el-form-item label="时间:">
677 677
                    <el-radio-group style="padding: 10px;"  v-model="radio" @change="changeRadio">
678 678
                       <el-radio :label="1">月份</el-radio>
@@ -966,8 +966,8 @@
966 966
       }
967 967
     },
968 968
     created() {
969
-     
970
-      console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
969
+
970
+      // console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
971 971
       this.patient_id = this.$route.params && this.$route.params.id
972 972
       var now = new Date()
973 973
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
@@ -1207,7 +1207,7 @@
1207 1207
               end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
1208 1208
             }
1209 1209
             if(this.quartype == 2){
1210
-              start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")   
1210
+              start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")
1211 1211
               end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
1212 1212
             }
1213 1213
             if(this.quartype == 3){
@@ -1219,8 +1219,8 @@
1219 1219
               end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
1220 1220
             }
1221 1221
           }
1222
-         
1223
-        
1222
+
1223
+
1224 1224
           console.log("start_time",start_time)
1225 1225
           console.log("end_time",end_time)
1226 1226
           var params = {
@@ -1350,7 +1350,7 @@
1350 1350
         console.log("年",year)
1351 1351
         var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
1352 1352
         console.log("月",this.$refs)
1353
-      
1353
+
1354 1354
 
1355 1355
          var params = {
1356 1356
             title:this.form.title,
@@ -1425,7 +1425,7 @@
1425 1425
         })
1426 1426
       },
1427 1427
       getTemplateSummaryList(){
1428
-        
1428
+
1429 1429
           var params = {
1430 1430
             patient_id:this.patient_id,
1431 1431
             start_time:this.start_time,
@@ -1646,8 +1646,8 @@
1646 1646
             inspect_date:this.projectIndate,
1647 1647
          }
1648 1648
          console.log("parawm232323223",params)
1649
-        
1650
-       
1649
+
1650
+
1651 1651
         UpdateTemplateSummary(params).then(response=>{
1652 1652
           if(response.data.state == 1){
1653 1653
             var list = response.data.data.list

+ 16 - 11
src/xt_pages/workforce/components/template_table.vue Parādīt failu

@@ -301,6 +301,7 @@
301 301
     },
302 302
     watch: {
303 303
       'device_numbers': function() {
304
+        console.log("中国人民2333232333323322332",this.device_numbers)
304 305
         this.opera_device_numbers = this.makeDeviceNumbers(this.device_numbers)
305 306
         this.origin_device_numbers = this.makeDeviceNumbers(this.device_numbers)
306 307
       },
@@ -461,23 +462,27 @@
461 462
       //     }
462 463
       // },
463 464
       makeDeviceNumbers: function(device_numbers) {
465
+        
464 466
         var maked_device_numbers = []
465 467
         var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
466 468
         var time_types = [1, 2, 3] // 上下晚
467 469
         for (let index = 0; index < device_numbers.length; index++) {
468 470
           const device_number = device_numbers[index]
469
-          var zone = {
470
-            id: device_number.zone.id,
471
-            name: device_number.zone.name,
472
-            type: device_number.zone.type
473
-          }
474
-          var device = {
475
-            id: device_number.id,
476
-            number: device_number.number,
477
-            group_id: device_number.group_id,
478
-            zone_id: device_number.zone_id,
479
-            zone: zone
471
+          if(device_number.zone!=null){
472
+            var zone = {
473
+              id: device_number.zone.id,
474
+              name: device_number.zone.name,
475
+              type: device_number.zone.type
476
+            }
477
+            var device = {
478
+              id: device_number.id,
479
+              number: device_number.number,
480
+              group_id: device_number.group_id,
481
+              zone_id: device_number.zone_id,
482
+              zone: zone
483
+            }
480 484
           }
485
+         
481 486
 
482 487
           // 以 weekday_timetype 为 key,{pid: 0, name: "", treat_mode_id: 0, treat_mode: ""} 为 value,加入到 maked_device_numbers 中
483 488
           for (let w_i = 0; w_i < weekdays.length; w_i++) {

+ 176 - 9
src/xt_pages/workforce/template.vue Parādīt failu

@@ -103,6 +103,7 @@
103 103
 
104 104
 
105 105
         <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
106
+        <!-- <el-button size="small" icon="el-icon-setting" type="primary" @click="setData">同步数据</el-button> -->
106 107
       </div>
107 108
       <!-- </el-col> -->
108 109
     </div>
@@ -131,6 +132,30 @@
131 132
       <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
132 133
                               @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
133 134
     </div>
135
+
136
+     <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
137
+            <el-form :model="form"  ref="form" label-width="90px" :rules="rules">
138
+                <el-form-item label="同步周次:">
139
+                   <el-radio v-model="form.firstWeek" label="1">第一周</el-radio>
140
+                   <el-radio v-model="form.firstWeek" label="2">第二周</el-radio>
141
+                </el-form-item>
142
+                <el-form-item label="同步到 :">
143
+                  <el-select v-model="form.copyWeek" placeholder="请选择" required  prop="copyWeek">
144
+                      <el-option
145
+                      v-for="item in typeOptions"
146
+                      :key="item.value"
147
+                      :label="item.label"
148
+                      :value="item.value">
149
+                      </el-option>
150
+                  </el-select>
151
+                </el-form-item>
152
+
153
+            </el-form>
154
+            <div slot="footer" class="dialog-footer">
155
+                <el-button @click="newVisible=false">取 消</el-button>
156
+                <el-button type="primary" @click="submitAction('form')">保 存</el-button>
157
+            </div>
158
+      </el-dialog>
134 159
   </div>
135 160
 </template>
136 161
 
@@ -139,7 +164,7 @@
139 164
   import TemplateTable from './components/template_table'
140 165
   import { getTemplateInitData } from '@/api/schedule_template/patient'
141 166
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
142
-  import { exportScheduleTemplate, getWeekPanels,initDate } from '@/api/schedule'
167
+  import { exportScheduleTemplate, getWeekPanels,initDate,synchroSchedule } from '@/api/schedule'
143 168
   import ScheduleTemplateUploadExcel from './components/scheduleTemplateUploadExcel/index'
144 169
   import { generateLog } from '@/api/config'
145 170
 
@@ -192,11 +217,62 @@
192 217
         },
193 218
         firstWeekData:[],
194 219
         secondWeekData:[],
195
-        tableList:[]
220
+        tableList:[],
221
+        newVisible:false,
222
+        weekList: [],
223
+        currentFirstDate1: '',
224
+        rules: {
225
+           copyWeek: [{ required: true, message: "请选择复制时间段", trigger: "blur" }],
226
+         },
227
+        weekNum:'',
228
+        weekDayArr:[],
229
+        todayDate:'',
230
+        clen:7,
231
+        nowYear: new Date().getFullYear(),
232
+        schedule_week:0,
233
+        newDay:[],
234
+        typeOptions:[],
235
+        timeOptions:[],
236
+        form:{
237
+         firstWeek:"1",
238
+         secondWeek:"",
239
+         copyWeek:''
240
+         
241
+        },
242
+        rules: {
243
+          copyWeek: [{ required: true, message: "请选择同步时间段", trigger: "blur" }],
244
+        }
196 245
       }
197 246
     },
198 247
     created() {
248
+      let year = new Date().getFullYear()
249
+     let month = new Date().getMonth() + 1
250
+     let date = new Date().getDate()
251
+     this.weekNum = this.getYearWeek(year,month,date)
252
+     this.todayDate=this.formatDate(new Date())
253
+     this.setDate(new Date())
254
+
255
+     for (var i = 0; i <= 9; i++) {
256
+       this.setDate1(this.addDate(this.currentDate, 7))
257
+     }
258
+     let newNum = 0
259
+     for(let i = 0; i < this.weekList.length; i++){
260
+         if(this.weekNum + i + 1 <= 53){
261
+             let num = this.weekNum + i 
262
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
263
+             this.typeOptions.push({value:i,label:str})
264
+            let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
265
+            this.timeOptions.push({value:i,label:stt})
266
+        }else{
267
+
268
+            newNum++
269
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + newNum + ')'
270
+            this.typeOptions.push({value:i,label:str})
271
+            let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
272
+            this.timeOptions.push({value:i,label:stt})
273
+          }
199 274
 
275
+      }
200 276
       this.getWeekPanels()
201 277
       this.getInitDate()
202 278
       getTemplateInitData().then(rs => {
@@ -217,7 +293,7 @@
217 293
           this.template_mode = mode
218 294
           this.origin_mode = mode.mode
219 295
           this.device_numbers = device_numbers
220
-     
296
+         
221 297
           this.patients = patients
222 298
          
223 299
           this.first_template = templates[0]
@@ -248,7 +324,68 @@
248 324
       })
249 325
     },
250 326
     methods: {
251
-      refresh(){
327
+      getYearWeek(year,month,date){
328
+      /*
329
+          dateNow是当前日期
330
+          dateFirst是当年第一天
331
+          dataNumber是当前日期是今年第多少天
332
+          用dataNumber + 当前年的第一天的周差距的和在除以7就是本年第几周
333
+      */
334
+      let dateNow = new Date(year, parseInt(month) - 1, date);
335
+      let dateFirst = new Date(year, 0, 1);
336
+      let dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 86400000);
337
+     
338
+      return Math.ceil((dataNumber + ((dateFirst.getDay() + 1) - 1)) / 7);
339
+      },
340
+      getTimestamp(time) { //把时间日期转成时间戳
341
+      return (new Date(time)).getTime() / 1000
342
+    },
343
+
344
+      formatDate(date){
345
+          var year = date.getFullYear()+'.'
346
+          var month = (date.getMonth()+1)+'.';
347
+          var day = date.getDate();
348
+          return year+month+day
349
+      },
350
+      formatDateTwo(date){
351
+          var year = date.getFullYear()+'.'
352
+          var month = (date.getMonth()+1)+'.';
353
+          var day = date.getDate();
354
+          return year+month+day
355
+      },
356
+      addDate(date,n){
357
+          date.setDate(date.getDate()+n);
358
+          return date;
359
+      },
360
+          //
361
+      setDate(date){
362
+          var week = date.getDay()-1;
363
+          date = this.addDate(date,week*-1);
364
+          this.currentFirstDate = new Date(date);
365
+          this.currentDate = new Date(date)
366
+          for(var i = 0;i<this.clen; i++){
367
+              this.weekDayArr.push(this.formatDate(i==0 ? date : this.addDate(date,1)))
368
+          }
369
+      },
370
+      setDate1 (date) {
371
+          var week = date.getDay() - 1
372
+        
373
+          date = this.addDate(date, week * -1)
374
+         
375
+          this.currentDate = new Date(date)
376
+          let arr1 = []
377
+          for (var i = 0; i < this.clen; i++) {
378
+              arr1.push(this.formatDate(i == 0 ? date : this.addDate(date, 1)))
379
+          }
380
+          this.weekList.push(arr1)
381
+          
382
+          let num = this.weekNum
383
+          this.currentFirstDate1 = num + 1
384
+      },
385
+      getTimestamp(time) { //把时间日期转成时间戳
386
+        return (new Date(time)).getTime() / 1000
387
+      },
388
+    refresh(){
252 389
         getTemplateInitData().then(rs => {
253 390
           var resp = rs.data
254 391
           if (resp.state == 1) {
@@ -573,11 +710,6 @@
573 710
           return
574 711
         }
575 712
 
576
-
577
-
578
-
579
-
580
-
581 713
         let is_system_zone = true
582 714
         let is_device_number = true
583 715
         let zones = []
@@ -2601,6 +2733,41 @@
2601 2733
           this.downloadLoading = false
2602 2734
         })
2603 2735
 
2736
+      },
2737
+      setData(){
2738
+       this.newVisible = true
2739
+      },
2740
+      submitAction(){
2741
+          var template_id = 0
2742
+           if(this.form.firstWeek == 1){
2743
+             template_id  = this.first_template
2744
+           }
2745
+           if(this.form.firstWeek == 2){
2746
+             template_id = this.second_template
2747
+           }
2748
+           var label = ""
2749
+           for(let i=0;i<this.timeOptions.length;i++){
2750
+               if(this.form.copyWeek == this.timeOptions[i].value){
2751
+                 label = this.timeOptions[i].label
2752
+               }
2753
+            }
2754
+           var start = label.split('~')
2755
+           var copy_startime = this.getTimestamp(start[0])
2756
+           var copy_endtime = this.getTimestamp(start[1])
2757
+           var params = {
2758
+             template_id:template_id.id,
2759
+             copy_startime:copy_startime,
2760
+             copy_endtime:copy_endtime,
2761
+           }
2762
+          console.log("param232323223",params)
2763
+        synchroSchedule(params).then(response=>{
2764
+          if(response.data.state == 1){
2765
+            var msg = response.data.data.msg
2766
+            this.$message.success("同步成功!")
2767
+            this.newVisible = false
2768
+          }
2769
+        })
2770
+ 
2604 2771
       }
2605 2772
     }
2606 2773
   }