Procházet zdrojové kódy

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

XMLWAN před 3 roky
rodič
revize
a142528f37

+ 19 - 1
src/api/schedule.js Zobrazit soubor

@@ -172,8 +172,26 @@ export function getRemindPrintList(params){
172 172
 export function getScheduleList(params){
173 173
   
174 174
   return request({
175
-    url:"/api/schedule/getschedulelist",
175
+    url:"/api/schedule/getbloodschedulelist",
176 176
     method:"get",
177 177
     params:params,
178 178
   })
179
+}
180
+
181
+export function getPrintList(params){
182
+   
183
+  return request({
184
+    url:"/api/schedule/getprintlist",
185
+    method:"Get",
186
+    params:params,
187
+  })
188
+}
189
+
190
+export function getAllZoneList(params){
191
+  
192
+  return request({
193
+    url:"/api/schedule/getallzonelist",
194
+    method:"get",
195
+    params:params
196
+  })
179 197
 }

+ 11 - 0
src/router/modules/dialysis.js Zobrazit soubor

@@ -58,6 +58,17 @@ export default {
58 58
         noCache: true
59 59
       }
60 60
     },
61
+    {
62
+      path: '/dialysis/signPrint',
63
+      component: () => import('@/xt_pages/dialysis/signPrint'),
64
+      name: '标签打印',
65
+      hidden: true,
66
+      is_menu: false,
67
+      meta: {
68
+        title: '标签打印',
69
+        noCache: true
70
+      }
71
+    },
61 72
     {
62 73
       path: '/dialysis/consumableDrugs',
63 74
       component: () => import('@/xt_pages/dialysis/consumableDrugs'),

+ 22 - 11
src/router/modules/workforce.js Zobrazit soubor

@@ -82,16 +82,27 @@ export default {
82 82
         noCache: true
83 83
       }
84 84
     },
85
-    // {
86
-    //   path: '/schedule/remind/print/setting',
87
-    //   component: () => import('@/xt_pages/workforce/remind_print_setting'),
88
-    //   name: 'remind_print_setting',
89
-    //   hidden: true,
90
-    //   is_menu: false,
91
-    //   meta: {
92
-    //     title: 'remind_print_setting',
93
-    //     noCache: true
94
-    //   }
95
-    // },
85
+    {
86
+      path: '/schedule/remind/print/setting',
87
+      component: () => import('@/xt_pages/workforce/remind_print_setting'),
88
+      name: 'remind_print_setting',
89
+      hidden: true,
90
+      is_menu: false,
91
+      meta: {
92
+        title: 'remind_print_setting',
93
+        noCache: true
94
+      }
95
+    },
96
+    {
97
+      path: '/scheduleTablePrint',
98
+      component: () => import('@/xt_pages/workforce/scheduleTablePrint'),
99
+      name: 'scheduleTablePrint',
100
+      hidden: true,
101
+      is_menu: false,
102
+      meta: {
103
+        title: 'scheduleTablePrint',
104
+        noCache: true
105
+      }
106
+    },
96 107
   ]
97 108
 }

+ 1 - 1
src/views/layout/Layout.vue Zobrazit soubor

@@ -123,7 +123,7 @@ export default {
123 123
   },
124 124
   created(){
125 125
     console.log('permission_routers',this.permission_routers);
126
-    let menzhen = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','hospitalStation'];
126
+    let menzhen = ['hospitalStation','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord',];
127 127
     let bingli = ['User','createPatient'];
128 128
     let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
129 129
     let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement'];

+ 1 - 1
src/views/layout/components/Sidebar/index.vue Zobrazit soubor

@@ -69,7 +69,7 @@ export default {
69 69
     navTitle:{
70 70
       handler(newVal,oldVal){
71 71
         if(newVal == '门诊管理'){
72
-          let nameArr = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','hospitalStation'];
72
+          let nameArr = ['hospitalStation','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord',];
73 73
           // console.log('permission_routers',this.permission_routers)
74 74
           let routerArr = [];
75 75
           this.permission_routers.map(item => {

+ 12 - 3
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Zobrazit soubor

@@ -588,7 +588,7 @@
588 588
               <el-input v-model="form.dosage_of_anticoagulants"></el-input>
589 589
           </el-form-item>
590 590
         </el-col>
591
-        
591
+
592 592
 
593 593
         <el-col :span="8" v-if="isShow('并发症其他')">
594 594
           <el-form-item label="并发症其他: ">
@@ -603,7 +603,7 @@
603 603
         </el-col>
604 604
         <el-col :span="8" v-if="isShow('透析相关高血压')">
605 605
             <el-form-item label="透析相关高血压:">
606
-        
606
+
607 607
              <el-select v-model="form.hypertenison">
608 608
               <el-option :key="0" label="请选择" :value="0"></el-option>
609 609
               <el-option
@@ -681,7 +681,7 @@
681 681
             </el-form-item>
682 682
         </el-col>
683 683
       </el-form>
684
-         
684
+
685 685
 
686 686
       <span slot="footer" class="dialog-footer">
687 687
         <el-button @click="hide">取 消</el-button>
@@ -1209,6 +1209,7 @@ export default {
1209 1209
 
1210 1210
     // 数据开始
1211 1211
     show(predialysis,last_after) {
1212
+      console.log("predialysis",predialysis)
1212 1213
       this.isVisibility = true
1213 1214
       this.predialysis = predialysis
1214 1215
       this.form.observation_content = predialysis.observation_content
@@ -1220,6 +1221,14 @@ export default {
1220 1221
       if(predialysis.id > 0){
1221 1222
         this.form.hypopiesia = predialysis.hypopiesia.toString()
1222 1223
       }
1224
+      if(predialysis.id > 0){
1225
+         this.form.hypertenison = predialysis.hypertenison.toString()
1226
+      }
1227
+      if(predialysis.id > 0){
1228
+        this.form.hypopiesia = predialysis.hypopiesia.toString()
1229
+      }
1230
+
1231
+
1223 1232
       this.form.leave_office_method = predialysis.leave_office_method
1224 1233
       this.form.lapse = predialysis.lapse
1225 1234
       // console.log("透后", predialysis);

+ 4 - 1
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue Zobrazit soubor

@@ -313,7 +313,10 @@ export default {
313 313
       return false;
314 314
     },
315 315
     show(accepts) {
316
-    
316
+      console.log("accepts333333",accepts)
317
+      if(accepts.id > 0){
318
+        accepts.tumble = accepts.tumble.toString()
319
+      }
317 320
       this.accepts = accepts;
318 321
       // console.log("accepts", accepts);
319 322
       var arr = [];

+ 49 - 3
src/xt_pages/dialysis/dialysisDoctorAdvice.vue Zobrazit soubor

@@ -2,13 +2,24 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+       <el-button
6
+          size="small"
7
+          icon="el-icon-printer"
8
+          :disabled="selecting_schs.length == 0"
9
+          @click="signPrintAction"
10
+          type="primary"
11
+          style="float:right"
12
+        >标签打印
13
+      </el-button>
5 14
       <el-button
6 15
           size="small"
7 16
           icon="el-icon-printer"
8 17
           :disabled="selecting_schs.length == 0"
9 18
           @click="batchPrintAction"
10 19
           type="primary"
11
-          >打印</el-button>
20
+          >医嘱打印
21
+      </el-button>
22
+   
12 23
     </div>
13 24
     <div class="app-container">
14 25
       <!-- <div class="filter-container">
@@ -111,6 +122,11 @@
111 122
             <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
112 123
           </template>
113 124
         </el-table-column>
125
+        <el-table-column  label="分区床位" width="100">
126
+          <template slot-scope="scope" >
127
+              {{scope.row.zone_name}}/{{scope.row.number}}
128
+          </template>
129
+        </el-table-column>
114 130
         <el-table-column prop="date" label="透析器" align="center" min-width="26px">
115 131
           <template slot-scope="scope">
116 132
             <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
@@ -513,6 +529,8 @@ export default {
513 529
                     it.zoneId = item.device_number.zone.id
514 530
                     it.dialysis_no = item.patient.dialysis_no
515 531
                     it.mode_id = item.mode_id
532
+                    it.number = item.device_number.number
533
+                    it.zone_name = item.device_number.zone.name
516 534
                     arr.push(it)
517 535
                 })
518 536
             })
@@ -575,6 +593,8 @@ export default {
575 593
                     it.zoneId = item.device_number.zone.id
576 594
                     it.dialysis_no = item.patient.dialysis_no
577 595
                     it.mode_id = item.mode_id
596
+                    it.number = item.device_number.number
597
+                    it.zone_name = item.device_number.zone.name
578 598
                     arr.push(it)
579 599
                 })
580 600
             })
@@ -662,7 +682,7 @@ export default {
662 682
       for (let index = 0; index < this.selecting_schs.length; index++) {
663 683
         sch_ids.push(this.selecting_schs[index].patient_id);
664 684
       }
665
-    //   console.log("sch_ids",sch_ids)
685
+  
666 686
       this.$store.dispatch("SetAdviceIDs", sch_ids);
667 687
        var name = ""
668 688
         for(let i=0;i<this.deliveryWay.length;i++){
@@ -675,6 +695,31 @@ export default {
675 695
        }
676 696
       this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
677 697
 
698
+    },
699
+    signPrintAction:function(){
700
+      if (this.selecting_schs.length === 0) {
701
+        this.$message.error("请至少选择一条需要打印的内容");
702
+        return false;
703
+      }
704
+      // 模板ID为6
705
+      var sch_ids = [];
706
+
707
+      for (let index = 0; index < this.selecting_schs.length; index++) {
708
+        sch_ids.push(this.selecting_schs[index].patient_id);
709
+      }
710
+  
711
+      this.$store.dispatch("SetAdviceIDs", sch_ids);
712
+       var name = ""
713
+        for(let i=0;i<this.deliveryWay.length;i++){
714
+            if(this.delivery_way == this.deliveryWay[i].id){
715
+              name = this.deliveryWay[i].name
716
+            }
717
+        }
718
+        if(name == '全部'){
719
+          name = ""
720
+       }
721
+      this.$router.push({ path: "/dialysis/signPrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
722
+
678 723
     },
679 724
     batchPrintActionOne: function() {
680 725
       if (this.selecting_schs.length === 0) {
@@ -868,7 +913,8 @@ export default {
868 913
     handleSelectionChange(val){
869 914
         // console.log('val',val)
870 915
         this.selecting_schs = val;
871
-    }
916
+    },
917
+    
872 918
   },
873 919
   components: {
874 920
     BreadCrumb

+ 692 - 0
src/xt_pages/dialysis/signPrint.vue Zobrazit soubor

@@ -0,0 +1,692 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;" v-show="show">
12
+            <div id="dialysisTable">
13
+                <div v-for="(item, index) in list" :key="index">
14
+                    <div class="signPrint" v-for="it in item.doctor_advice" style="page-break-after: always;">
15
+                        <div>分区/床位号:{{item.device_number.zone.name}}/{{item.device_number.number}}</div>  
16
+                        <div>姓名:{{item.patient.name}}</div>  
17
+                        <div>医嘱内容:{{ it.advice_name }}</div>  
18
+                        <div>给药途径:{{it.execution_frequency}}</div>  
19
+                        <div>执行频率:{{it.delivery_way}}</div>  
20
+                        <div>打印时间:{{time}}</div>   
21
+                    </div>  
22
+                </div>
23
+            </div>
24
+        </div>
25
+
26
+          <div class="app-container" style="background-color: white;" v-show="showOne">
27
+            <div id="dialysisTable">
28
+                <div v-for="(item, index) in list" :key="index">
29
+                    <div class="signPrint" v-for="it in item.doctor_advice" style="page-break-after: always;">
30
+                        <div>分区/床位号:{{item.device_number.zone.name}}/{{item.device_number.number}}</div>  
31
+                        <div>姓名:{{item.patient.name}}</div>  
32
+                        <div>医嘱内容:{{getAdvice(item.doctor_advice)}}</div>  
33
+                        <div>给药途径:{{item.doctor_advice[0].execution_frequency}}</div>  
34
+                        <div>执行频率:{{item.doctor_advice[0].delivery_way}}</div>  
35
+                        <div>打印时间:{{time}}</div>   
36
+                    </div>  
37
+                  
38
+                </div>
39
+            </div>
40
+        </div>
41
+    </div>
42
+</template>
43
+
44
+<script>
45
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
46
+import { getSchedualDoctors } from '@/api/advice'
47
+import { parseTime } from '@/utils'
48
+import print from 'print-js'
49
+const moment = require('moment')
50
+export default {
51
+    components:{
52
+        BreadCrumb
53
+    },
54
+    data(){
55
+        return{
56
+            crumbs: [
57
+                { path: false, name: '耗材药品' },
58
+                { path: false, name: '打印' }
59
+            ],
60
+            tableData:[],
61
+            start_time:"",
62
+            end_time:"",
63
+            print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
64
+
65
+            zone_selected: 0,
66
+            scheduleMap:[],
67
+            time:'',
68
+            show:true,
69
+            showOne:false,
70
+            delivery_way:"",
71
+            list:[]
72
+        }
73
+    },
74
+    methods:{
75
+        printAction: function() {
76
+            const style = '@media print { .dialysisTable{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
77
+
78
+            printJS({
79
+            printable: 'dialysisTable',
80
+            type: 'html',
81
+            documentTitle: '  ',
82
+            style: style,
83
+            scanStyles: false
84
+            })
85
+        },
86
+        requestSchedualDoctors (time) {
87
+            let newTime =  moment(time).format('YYYY-MM-DD')
88
+            getSchedualDoctors({
89
+            date: newTime,
90
+            patient_type: 0,
91
+            advice_type: 2,
92
+            delivery_way:this.delivery_way,
93
+            }).then(rs => {
94
+                var resp = rs.data
95
+                if (resp.state == 1) {
96
+                this.admin_user = resp.data.adminUser
97
+                var config = resp.data.config
98
+                if(config.is_open == 0 || config.is_open == 2){
99
+                
100
+                   var schedulesArr = resp.data.scheduals
101
+                   let schedules = []
102
+                   var ids = this.$store.getters.temp_params.advice_ids
103
+                   console.log('ids',ids)
104
+                   schedulesArr.map(item => {
105
+                   if(ids.indexOf(item.patient_id) > -1){
106
+                        schedules.push(item)
107
+                    }
108
+                    
109
+                })
110
+               
111
+                for (let i = 0; i < schedules.length; i++) {
112
+                    schedules[i].dialysis_no = schedules[i].patient.dialysis_no
113
+                }
114
+           
115
+
116
+                var arr = []
117
+                for (let j = 0; j < schedules.length; j++) {
118
+                    arr.push(schedules[j].dialysis_no)
119
+                }
120
+                arr.sort(function (a, b) {
121
+                    return a - b
122
+                })
123
+               
124
+
125
+                var arrTwo = []
126
+                for (let i = 0; i < arr.length; i++) {
127
+                    for (let j = 0; j < schedules.length; j++) {
128
+                    if (arr[i] == schedules[j].dialysis_no) {
129
+                        arrTwo.push(schedules[j])
130
+                    }
131
+                    }
132
+                }
133
+
134
+                arrTwo.map((item, index) => {
135
+                  
136
+                    item.doctor_advice.sort(this.compare('start_time'))
137
+                })
138
+                
139
+
140
+                const res = new Map()
141
+                let a = arrTwo.filter(
142
+                    a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
143
+                )
144
+
145
+               
146
+
147
+                schedules = a
148
+                var zoneMap = {}
149
+                var scheduleMap = {}
150
+                for (let index = 0; index < schedules.length; index++) {
151
+                    const schedule = schedules[index]
152
+                    if (schedule.doctor_advice.length == 0) {
153
+                    continue
154
+                    }
155
+                    if (scheduleMap[schedule.device_number.zone.name] == null) {
156
+                    scheduleMap[schedule.device_number.zone.name] = []
157
+                    }
158
+                    scheduleMap[schedule.device_number.zone.name].push(schedule)
159
+                    if (zoneMap[schedule.device_number.zone.name] == null) {
160
+                    zoneMap[schedule.device_number.zone.name] =schedule.device_number.zone}
161
+                }
162
+
163
+                var zones = []
164
+                zones.push({ value: 0, text: '全部分区' })
165
+                for (var zoneName in zoneMap) {
166
+                    zones.push({ value: zoneMap[zoneName].id, text: zoneName })
167
+                }
168
+
169
+                zones = zones.sort(function (a, b) {
170
+                    return a.value > b.value
171
+                })
172
+                this.zones = zones
173
+                for (var key in scheduleMap) {
174
+                    let mapArr = scheduleMap[key]
175
+                    for (let i = 0; i < mapArr.length; i++) {
176
+                    mapArr[i]['new_advice'] = []
177
+                    }
178
+                }
179
+
180
+                for (var key in scheduleMap) {
181
+                    let mapArr = scheduleMap[key]
182
+                    for (let i = 0; i < mapArr.length; i++) {
183
+                    var maps = mapArr[i]
184
+                    var resp_advices = maps.doctor_advice
185
+                    if (resp_advices.length > 0) {
186
+                        var newGroupObject = function () {
187
+                        return Object.assign(
188
+                            {},
189
+                            {
190
+                            group_no: 0,
191
+                            advices: []
192
+                            }
193
+                        )
194
+                        }
195
+                        var initGroupBlock = function (group, advice) {
196
+                        group.group_no = advice.groupno
197
+                        }
198
+
199
+                        var advice_groups = []
200
+                        var group = newGroupObject()
201
+                        for (let index = 0; index < resp_advices.length; index++) {
202
+                        const advice = resp_advices[index]
203
+                        if (advice.groupno == 0) {
204
+                            // 老版本的医嘱
205
+                            if (advice.parent_id > 0) {
206
+                            if (advice_groups.length > 0) {
207
+                                var parent_group = advice_groups[advice_groups.length - 1]
208
+                                if (parent_group.advices.length > 0) {
209
+                                if (parent_group.advices[0].id == advice.parent_id) {
210
+                                    parent_group.advices.push(advice)
211
+                                }
212
+                                }
213
+                            }
214
+                            continue
215
+                            } else {
216
+                            if (group.group_no > 0) {
217
+                                advice_groups.push(group)
218
+                                group = newGroupObject()
219
+                            }
220
+
221
+                            initGroupBlock(group, advice)
222
+                            group.advices.push(advice)
223
+                            advice_groups.push(group)
224
+                            group = newGroupObject()
225
+                            continue
226
+                            }
227
+                        } else {
228
+                            if (group.group_no > 0 && group.group_no != advice.groupno) {
229
+                            advice_groups.push(group)
230
+                            group = newGroupObject()
231
+                            }
232
+                            if (group.group_no == 0) {
233
+                            initGroupBlock(group, advice)
234
+                            }
235
+                            if (group.group_no == advice.groupno) {
236
+                            group.advices.push(advice)
237
+                            }
238
+                        }
239
+                        }
240
+                        if (group.group_no > 0) {
241
+                        // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
242
+                        advice_groups.push(group)
243
+                        }
244
+                        advice_groups = advice_groups
245
+                    } else {
246
+                        advice_groups = []
247
+                    }
248
+                    maps.new_advice = advice_groups
249
+                    }
250
+                 }
251
+                console.log("scheduleMap999999999999",schedules)
252
+                  this.list = schedules
253
+                }
254
+               
255
+                 if(config.is_open == 1){
256
+                   var schedulesArr = resp.data.hisAdvices
257
+                   let schedules = []
258
+                   var ids = this.$store.getters.temp_params.advice_ids
259
+                   console.log('ids',ids)
260
+                   schedulesArr.map(item => {
261
+                    if(ids.indexOf(item.patient_id) > -1){
262
+                        schedules.push(item)
263
+                    }
264
+                    
265
+                })
266
+               
267
+                for (let i = 0; i < schedules.length; i++) {
268
+                    schedules[i].dialysis_no = schedules[i].patient.dialysis_no
269
+                }
270
+           
271
+
272
+                var arr = []
273
+                for (let j = 0; j < schedules.length; j++) {
274
+                    arr.push(schedules[j].dialysis_no)
275
+                }
276
+                arr.sort(function (a, b) {
277
+                    return a - b
278
+                })
279
+               
280
+
281
+                var arrTwo = []
282
+                for (let i = 0; i < arr.length; i++) {
283
+                    for (let j = 0; j < schedules.length; j++) {
284
+                    if (arr[i] == schedules[j].dialysis_no) {
285
+                        arrTwo.push(schedules[j])
286
+                    }
287
+                    }
288
+                }
289
+
290
+                arrTwo.map((item, index) => {
291
+                  
292
+                    item.doctor_advice.sort(this.compare('start_time'))
293
+                })
294
+                
295
+
296
+                const res = new Map()
297
+                let a = arrTwo.filter(
298
+                    a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
299
+                )
300
+
301
+               
302
+
303
+                schedules = a
304
+                var zoneMap = {}
305
+                var scheduleMap = {}
306
+                for (let index = 0; index < schedules.length; index++) {
307
+                    const schedule = schedules[index]
308
+                    if (schedule.doctor_advice.length == 0) {
309
+                    continue
310
+                    }
311
+                    if (scheduleMap[schedule.device_number.zone.name] == null) {
312
+                    scheduleMap[schedule.device_number.zone.name] = []
313
+                    }
314
+                    scheduleMap[schedule.device_number.zone.name].push(schedule)
315
+                    if (zoneMap[schedule.device_number.zone.name] == null) {
316
+                    zoneMap[schedule.device_number.zone.name] =
317
+                        schedule.device_number.zone
318
+                    }
319
+                }
320
+             
321
+                var zones = []
322
+                zones.push({ value: 0, text: '全部分区' })
323
+                for (var zoneName in zoneMap) {
324
+                    zones.push({ value: zoneMap[zoneName].id, text: zoneName })
325
+                }
326
+
327
+                zones = zones.sort(function (a, b) {
328
+                    return a.value > b.value
329
+                })
330
+                this.zones = zones
331
+                for (var key in scheduleMap) {
332
+                    let mapArr = scheduleMap[key]
333
+                    for (let i = 0; i < mapArr.length; i++) {
334
+                    mapArr[i]['new_advice'] = []
335
+                    }
336
+                }
337
+
338
+                for (var key in scheduleMap) {
339
+                    let mapArr = scheduleMap[key]
340
+                    for (let i = 0; i < mapArr.length; i++) {
341
+                    var maps = mapArr[i]
342
+                    var resp_advices = maps.doctor_advice
343
+                    if (resp_advices.length > 0) {
344
+                        var newGroupObject = function () {
345
+                        return Object.assign(
346
+                            {},
347
+                            {
348
+                            group_no: 0,
349
+                            advices: []
350
+                            }
351
+                        )
352
+                        }
353
+                        var initGroupBlock = function (group, advice) {
354
+                        group.group_no = advice.groupno
355
+                        }
356
+
357
+                        var advice_groups = []
358
+                        var group = newGroupObject()
359
+                        for (let index = 0; index < resp_advices.length; index++) {
360
+                        const advice = resp_advices[index]
361
+                        if (advice.groupno == 0) {
362
+                            // 老版本的医嘱
363
+                            if (advice.parent_id > 0) {
364
+                            if (advice_groups.length > 0) {
365
+                                var parent_group = advice_groups[advice_groups.length - 1]
366
+                                if (parent_group.advices.length > 0) {
367
+                                if (parent_group.advices[0].id == advice.parent_id) {
368
+                                    parent_group.advices.push(advice)
369
+                                }
370
+                                }
371
+                            }
372
+                            continue
373
+                            } else {
374
+                            if (group.group_no > 0) {
375
+                                advice_groups.push(group)
376
+                                group = newGroupObject()
377
+                            }
378
+
379
+                            initGroupBlock(group, advice)
380
+                            group.advices.push(advice)
381
+                            advice_groups.push(group)
382
+                            group = newGroupObject()
383
+                            continue
384
+                            }
385
+                        } else {
386
+                            if (group.group_no > 0 && group.group_no != advice.groupno) {
387
+                            advice_groups.push(group)
388
+                            group = newGroupObject()
389
+                            }
390
+                            if (group.group_no == 0) {
391
+                            initGroupBlock(group, advice)
392
+                            }
393
+                            if (group.group_no == advice.groupno) {
394
+                            group.advices.push(advice)
395
+                            }
396
+                        }
397
+                        }
398
+                        if (group.group_no > 0) {
399
+                        // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
400
+                        advice_groups.push(group)
401
+                        }
402
+                        advice_groups = advice_groups
403
+                    } else {
404
+                        advice_groups = []
405
+                    }
406
+                    maps.new_advice = advice_groups
407
+                    }
408
+                 }
409
+                
410
+                     this.list = schedules
411
+                     this.scheduleMap = scheduleMap  
412
+                 }
413
+                console.log("this.list",this.list)
414
+                
415
+                }
416
+            })
417
+        },
418
+        compare (property) {
419
+            return function (a, b) {
420
+                var value1 = a[property]
421
+                var value2 = b[property]
422
+                return value1 - value2
423
+            }
424
+        },
425
+        parseTime: function (time, layout) {
426
+            if (time == 0) {
427
+                return ''
428
+            }
429
+            return parseTime(time, layout)
430
+        },
431
+        getName (val) {
432
+            for (let i = 0; i < this.admin_user.length; i++) {
433
+                if (this.admin_user[i].id == val) {
434
+                    return this.admin_user[i].name
435
+                }
436
+            }
437
+        },
438
+        getAdvice: function(doctor_advice) {
439
+          if (doctor_advice.length > 0) {
440
+            let name = "";
441
+            for (let i = 0; i < doctor_advice.length; i++) {
442
+            let prescribing_number = "";
443
+            let single_dose = "";
444
+            let drug_spec = "";
445
+
446
+            if (doctor_advice[i].prescribing_number > 0) {
447
+                prescribing_number =
448
+                doctor_advice[i].prescribing_number +
449
+                doctor_advice[i].prescribing_number_unit;
450
+            }
451
+            if (doctor_advice[i].single_dose > 0) {
452
+                single_dose =
453
+                " 单次用量 " +
454
+                doctor_advice[i].single_dose +
455
+                doctor_advice[i].single_dose_unit;
456
+            }
457
+
458
+            if (doctor_advice[i].drug_spec > 0) {
459
+                drug_spec =
460
+                doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
461
+            }
462
+
463
+            name =
464
+                name +
465
+                doctor_advice[i].advice_name +
466
+                " " +
467
+                drug_spec +
468
+                " " +
469
+                prescribing_number +
470
+                " " +
471
+                single_dose +
472
+                " " +
473
+                doctor_advice[i].delivery_way +
474
+                " " +
475
+                doctor_advice[i].execution_frequency +
476
+                " " +
477
+                doctor_advice[i].remark +
478
+                "\n";
479
+
480
+            // if (doctor_advice[i].child.length > 0) {
481
+            //     for (let a = 0; a < doctor_advice[i].child.length; a++) {
482
+            //     if (doctor_advice[i].child[a].prescribing_number > 0) {
483
+            //         doctor_advice[i].child[a]["presc"] =
484
+            //         doctor_advice[i].child[a].prescribing_number +
485
+            //         doctor_advice[i].child[a].prescribing_number_unit;
486
+            //     } else {
487
+            //         doctor_advice[i].child[a]["presc"] = "";
488
+            //     }
489
+
490
+            //     if (doctor_advice[i].child[a].single_dose > 0) {
491
+            //         doctor_advice[i].child[a]["single"] =
492
+            //         " " +
493
+            //         " 单次用量 " +
494
+            //         " " +
495
+            //         doctor_advice[i].child[a].single_dose +
496
+            //         doctor_advice[i].child[a].single_dose_unit;
497
+            //     } else {
498
+            //         doctor_advice[i].child[a]["single"] = "";
499
+            //     }
500
+
501
+            //     name =
502
+            //         name +
503
+            //         "▲" +
504
+            //         doctor_advice[i].child[a].advice_name +
505
+            //         "" +
506
+            //         doctor_advice[i].child[a].advice_desc +
507
+            //         doctor_advice[i].child[a].drug_spec_unit +
508
+            //         doctor_advice[i].child[a].presc +
509
+            //         doctor_advice[i].child[a].single +
510
+            //         "\n";
511
+            //     }
512
+            // }
513
+        }
514
+        return name;
515
+      }else{
516
+        return ""
517
+      }
518
+    },
519
+    },
520
+    computed: {
521
+    filtedScheduals: function () {
522
+        var scheduleMap = new Object()
523
+        if (this.zone_selected == 0) {
524
+            for (const key in this.scheduleMap) {
525
+            scheduleMap[key] = this.scheduleMap[key]
526
+            }
527
+        } else {
528
+            var zone_name = this.zones[this.zone_selected].text
529
+            scheduleMap[zone_name] = this.scheduleMap[zone_name]
530
+        }
531
+
532
+        if (this.schedule_type_selected != 0) {
533
+            var _scheduleMap = {}
534
+            for (const key in scheduleMap) {
535
+            var origin_schedules = scheduleMap[key]
536
+            var schedules = []
537
+            for (let index = 0; index < origin_schedules.length; index++) {
538
+                const schedule = origin_schedules[index]
539
+                if (schedule.schedule_type == this.schedule_type_selected) {
540
+                schedules.push(schedule)
541
+                }
542
+            }
543
+            if (schedules.length > 0) {
544
+                _scheduleMap[key] = schedules
545
+            }
546
+            }
547
+
548
+            scheduleMap = _scheduleMap
549
+        }
550
+        for (var key in scheduleMap) {
551
+            let mapArr = scheduleMap[key]
552
+            for (let i = 0; i < mapArr.length; i++) {
553
+            mapArr[i]['new_advice'] = []
554
+            }
555
+        }
556
+
557
+        for (var key in scheduleMap) {
558
+            let mapArr = scheduleMap[key]
559
+            for (let i = 0; i < mapArr.length; i++) {
560
+            var maps = mapArr[i]
561
+            var resp_advices = maps.doctor_advice
562
+            if (resp_advices.length > 0) {
563
+                var newGroupObject = function () {
564
+                return Object.assign(
565
+                    {},
566
+                    {
567
+                    group_no: 0,
568
+                    advices: []
569
+                    }
570
+                )
571
+                }
572
+                var initGroupBlock = function (group, advice) {
573
+                group.group_no = advice.groupno
574
+                }
575
+
576
+                var advice_groups = []
577
+                var group = newGroupObject()
578
+                for (let index = 0; index < resp_advices.length; index++) {
579
+                const advice = resp_advices[index]
580
+                if (advice.groupno == 0) {
581
+                    // 老版本的医嘱
582
+                    if (advice.parent_id > 0) {
583
+                    if (advice_groups.length > 0) {
584
+                        var parent_group = advice_groups[advice_groups.length - 1]
585
+                        if (parent_group.advices.length > 0) {
586
+                        if (parent_group.advices[0].id == advice.parent_id) {
587
+                            parent_group.advices.push(advice)
588
+                        }
589
+                        }
590
+                    }
591
+                    continue
592
+                    } else {
593
+                    if (group.group_no > 0) {
594
+                        advice_groups.push(group)
595
+                        group = newGroupObject()
596
+                    }
597
+
598
+                    initGroupBlock(group, advice)
599
+                    group.advices.push(advice)
600
+                    advice_groups.push(group)
601
+                    group = newGroupObject()
602
+                    continue
603
+                    }
604
+                } else {
605
+                    if (group.group_no > 0 && group.group_no != advice.groupno) {
606
+                    advice_groups.push(group)
607
+                    group = newGroupObject()
608
+                    }
609
+                    if (group.group_no == 0) {
610
+                    initGroupBlock(group, advice)
611
+                    }
612
+                    if (group.group_no == advice.groupno) {
613
+                    group.advices.push(advice)
614
+                    }
615
+                }
616
+                }
617
+                if (group.group_no > 0) {
618
+                // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
619
+                advice_groups.push(group)
620
+                }
621
+                advice_groups = advice_groups
622
+            } else {
623
+                advice_groups = []
624
+            }
625
+            maps.new_advice = advice_groups
626
+            }
627
+        }
628
+        console.log("222222",scheduleMap)
629
+        return scheduleMap
630
+        },
631
+    
632
+    },
633
+    created(){
634
+      var time = this.$route.query.time
635
+      var delivery_way = this.$route.query.delivery_way
636
+      console.log("delivery_Way",delivery_way)
637
+      this.delivery_way = delivery_way
638
+      this.time = moment(time).format('YYYY-MM-DD')
639
+      console.log(11,this.$route.query)
640
+      this.requestSchedualDoctors(time)
641
+    }
642
+}
643
+</script>
644
+
645
+
646
+<style rel="stylesheet/scss" lang="scss" scoped>
647
+.signPrint{
648
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
649
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
650
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
651
+    margin-bottom: 20px;
652
+    padding: 20px 10px;
653
+}
654
+.dialysisTable{
655
+    width:960px;
656
+    margin: 0 auto;
657
+    text-align: center;
658
+    border-collapse: collapse;
659
+}
660
+.order_title_panl {
661
+    text-align: center;
662
+
663
+    .main_title {
664
+      font-size: 18px;
665
+      line-height: 40px;
666
+      font-weight: 500;
667
+    }
668
+}
669
+.dialysisTable tr{
670
+    padding: 10px 0;
671
+}
672
+.dialysisTable th {
673
+    color: #000;
674
+    padding: 0;
675
+    margin: 0;
676
+    height: 30px;
677
+}
678
+.dialysisTable tr td {
679
+    padding: 12px 0;
680
+}
681
+.subadvice_content {
682
+    text-align: left;
683
+    padding-left: 25px !important;
684
+    padding-right: 5px !important;
685
+}
686
+.advice_content {
687
+    text-align: left;
688
+    padding-left: 5px !important;
689
+    padding-right: 5px !important;
690
+    padding: 15px 5px !important;
691
+}
692
+</style>

+ 10 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyEight.vue Zobrazit soubor

@@ -35,7 +35,7 @@
35 35
         <span v-else>出血部位:无</span>
36 36
       </div>
37 37
       <div class="lineHeight">
38
-          <div class="widthLength25">是否跌倒:暂无</div>
38
+          <div class="widthLength25">是否跌倒:{{ receiverTreatmentAccess.tumble == 1 ? '是' : '否' }}</div>
39 39
           <div class="widthLength25">跌倒预防措施:{{ receiverTreatmentAccess.precaution ? receiverTreatmentAccess.precaution : '/' }}</div>
40 40
           <div class="widthLength25">跌倒风险:
41 41
               <span v-if="receiverTreatmentAccess.danger_level == 1">无</span>
@@ -97,9 +97,16 @@
97 97
           </div>
98 98
           <div class="widthLength25">T:{{ afterdialysis.temperature ? afterdialysis.temperature : '' }}℃</div>
99 99
           <div class="widthLength25">意识:
100
-
100
+            <span v-for="(item, index) in consciousness_arr" :key="index">
101
+              <span v-if="afterdialysis.consciousness == item.id">{{ item.name }}</span>
102
+            </span>
103
+          </div>
104
+          <div class="widthLength25">跌倒风险:
105
+            <span v-if="afterdialysis.fallrisk == 1">无</span>
106
+            <span v-if="afterdialysis.fallrisk == 2">低风险</span>
107
+            <span v-if="afterdialysis.fallrisk == 3">中度风险</span>
108
+            <span v-if="afterdialysis.fallrisk == 4">高风险</span>
101 109
           </div>
102
-          <div class="widthLength25">跌倒风险:</div>
103 110
       </div>
104 111
       <div class="lineHeight">
105 112
           <div class="widthLength25">实际进食量:{{ afterdialysis.dialysis_during ? afterdialysis.dialysis_during : '' }} g</div>

+ 1 - 1
src/xt_pages/outpatientCharges/listPrint.vue Zobrazit soubor

@@ -464,4 +464,4 @@
464 464
   .newContainer::-webkit-scrollbar {
465 465
     height: 15px !important;
466 466
   }
467
-</style>
467
+</style>

+ 16 - 0
src/xt_pages/outpatientCharges/summary.vue Zobrazit soubor

@@ -473,6 +473,22 @@
473 473
 
474 474
               var hifmi_pay = 0.00;
475 475
 
476
+              if(order.setl_detail.length > 0){
477
+                var jsonObj = JSON.parse(order.setl_detail);
478
+                for (let i = 0; i < jsonObj.length; i++) {
479
+                  if (order.insutype == '310') {
480
+                    if (jsonObj[i].fund_pay_type == '310300') {
481
+                      hifmi_pay = jsonObj[i].fund_payamt
482
+                    }
483
+
484
+                  } else if (order.insutype == '390')
485
+                    if (order.fund_pay_type == '390200') {
486
+                      hifmi_pay = jsonObj[i].fund_payamt
487
+                    }
488
+                }
489
+              }
490
+              var hifmi_pay = 0.00;
491
+
476 492
               if(order.setl_detail.length > 0){
477 493
                 var jsonObj = JSON.parse(order.setl_detail);
478 494
                 for (let i = 0; i < jsonObj.length; i++) {

+ 10 - 10
src/xt_pages/qcd/basicInformationAnalysis.vue Zobrazit soubor

@@ -256,7 +256,7 @@
256 256
                 </span>
257 257
                 <span v-if="lapsetoType == 0 || lapsetoType == 2"><p>转出:{{outTotal}}人({{(outTotal/patientCount*100).toFixed(1)}}%)</p>
258 258
                  <el-progress :percentage="(outTotal/patientCount*100).toFixed(1)"></el-progress>
259
-                </span> 
259
+                </span>
260 260
               </div>
261 261
             </div>
262 262
             <div class="infoOne">
@@ -709,7 +709,7 @@ export default {
709 709
       //获取本月当前机构的透析模式
710 710
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
711 711
       const endDate = moment(new Date()).format('YYYY-MM-DD')
712
-     
712
+
713 713
       var now = new Date()
714 714
       var nowMonth = now.getMonth(); //当前月
715 715
       var nowYear = now.getFullYear(); //当前年
@@ -720,7 +720,7 @@ export default {
720 720
       //本月的结束时间
721 721
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
722 722
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
723
-     // console.log("本月最后一天",timeEnd)
723
+      // console.log("本月最后一天",timeEnd)
724 724
       //本月
725 725
       if(state == 0){
726 726
        //统计透析总量
@@ -745,7 +745,7 @@ export default {
745 745
         this.listQuery.start_time = ""
746 746
         this.listQuery.end_time = ""
747 747
         const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
748
-       
748
+
749 749
         var startunitx = Date.parse(startDate)/1000
750 750
         // console.log("开始时间搓",startunitx)
751 751
         const endDate = moment(new Date()).format('YYYY-MM-DD')
@@ -929,7 +929,7 @@ export default {
929 929
     },
930 930
     //统计转归
931 931
     getTotalLapseCount(startDate,endDate,lapsetoType,sourceType ){
932
-   
932
+
933 933
        this.modesDataTwo.series = []
934 934
        this.modesDataTwo.xAxis = []
935 935
       getTotalLapseCount(startDate,endDate,lapsetoType,sourceType).then(response=>{
@@ -939,7 +939,7 @@ export default {
939 939
              {name:"转出",count:0}
940 940
            ]
941 941
           var patients =  response.data.data.patients
942
-      
942
+
943 943
           this.rollOutTotal = patients.length
944 944
 
945 945
           var patienttwo = response.data.data.patienttwo
@@ -948,7 +948,7 @@ export default {
948 948
           this.patientCount = count
949 949
 
950 950
           var rollout = response.data.data.rollout
951
-        
951
+
952 952
 
953 953
           for(let i=0;i<arr.length;i++){
954 954
             arr[0].count = this.rollOutTotal
@@ -1000,7 +1000,7 @@ export default {
1000 1000
       getTotalAgeCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
1001 1001
          if(response.data.state == 1){
1002 1002
           var ageCount =  response.data.data.ageCount
1003
-        
1003
+
1004 1004
           var arr = []
1005 1005
           arr =  ageCount.sort(this.compare('age'))
1006 1006
           this.ageCount = arr
@@ -1022,7 +1022,7 @@ export default {
1022 1022
       getTotalDialysisCount(timeStar,timeEnd,lapsetoType,sourceType).then(response=>{
1023 1023
          if(response.data.state == 1){
1024 1024
            var dataage =  response.data.data.dataage
1025
-          
1025
+
1026 1026
            this.dialysisAge = dataage
1027 1027
 
1028 1028
          }
@@ -1153,7 +1153,7 @@ export default {
1153 1153
           start_time:this.start,
1154 1154
           end_time:this.end,
1155 1155
           mode_id:this.mode_id,
1156
-          
1156
+
1157 1157
         }
1158 1158
         this.modesData.series = []
1159 1159
         this.modesData.xAxis = []

+ 4 - 2
src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue Zobrazit soubor

@@ -10,6 +10,8 @@
10 10
         <div class="dialysis-print-order">
11 11
          <div class="order-yy-name" style="font-weight:bold;">{{orgName}}</div>
12 12
           <div class="order-title" style="font-weight:normal;">药品出库登记表</div>
13
+         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
14
+          <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
13 15
 
14 16
           <div style="float: right;margin-bottom: 1px;">{{getDateTwo()}}</div>
15 17
 
@@ -68,8 +70,8 @@
68 70
             <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
69 71
           </div>
70 72
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
71
-            <div style="width:70px;">科室:</div><div style="width:100px;"></div>
72
-            <div style="width:70px;">领料人:</div><div style="width:100px;"></div>
73
+            <div style="width:50px;">科室:</div><div style="width:60px;"></div>
74
+            <div style="width:70px;">领料人:</div><div style="width:60px;"></div>
73 75
             <div style="width:80px;">审批:</div><div style="width:100px;"></div>
74 76
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
75 77
             <div style="width:50px;">审核:</div><div style="width:100px;">徐立琼</div>

+ 26 - 29
src/xt_pages/workforce/appointment.vue Zobrazit soubor

@@ -68,6 +68,7 @@
68 68
     <div class="position">
69 69
       <bread-crumb :crumbs="crumbs"></bread-crumb>
70 70
         <div style="display:flex;align-items:center">
71
+          <el-button @click="printTable">打印表格</el-button>
71 72
           <schedule-upload-excel style="margin-right:10px;" :on-success='handleSuccess' ></schedule-upload-excel>
72 73
           <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
73 74
             导出模版
@@ -121,7 +122,7 @@
121 122
       <!-- </el-col>
122 123
     </el-row> -->
123 124
 
124
-      <table-data :week-time="activeName" :partitions-prop="partitions" :schedule-zone-row-prop="scheduleZoneRow"
125
+      <table-data ref="tableData" :week-time="activeName" :partitions-prop="partitions" :schedule-zone-row-prop="scheduleZoneRow"
125 126
                   :schedule-zone-prop="scheduleZone" title="" @event1="changePartition" @event2="changeSchedule"></table-data>
126 127
 
127 128
 
@@ -226,7 +227,9 @@
226 227
       UploadExcel
227 228
     },
228 229
     methods: {
229
-
230
+      printTable(){
231
+        this.$router.push({path: '/scheduleTablePrint'})
232
+      },
230 233
       generateTxt: function(log) {
231 234
         var content = ''
232 235
         var errlog = log.err_logs
@@ -287,7 +290,7 @@
287 290
             return false
288 291
           }
289 292
           var partitions = response.data.data.partitions
290
-          console.log("分区",partitions)
293
+          // console.log("分区",partitions)
291 294
           this.theWeek.thisWeek = response.data.data.theWeek
292 295
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
293 296
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
@@ -507,14 +510,13 @@
507 510
             }
508 511
             i++
509 512
           }
510
-          console.log("listw22222222",list)
511 513
             var data = []
512 514
 
513 515
           this.tableList.map(item=>{
514 516
             data.push(Object.values(item))
515 517
 
516 518
           })
517
-          console.log("data",data)
519
+        
518 520
           
519 521
           const filename = '排班模版'
520 522
         
@@ -529,8 +531,6 @@
529 531
           }
530 532
           
531 533
           if(this.export_type == 1){
532
-
533
-            console.log("44444444",this.tableList)
534 534
             //  const multiHeader = [['区号', '机号', '周一'+"("+this.newDay[0]+")" , '', '', '周二'+"("+this.newDay[1]+")", '', '', '周三'+"("+this.newDay[2]+")" , '', '', '周四'+"("+this.newDay[3]+")" , '', '', '周五'+"("+this.newDay[4]+")" , '', '', '周六'+"("+this.newDay[5]+")" , '', '', '周日'+"("+this.newDay[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
535 535
             //  const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
536 536
             //  const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
@@ -566,7 +566,7 @@
566 566
               data.push(Object.values(item))
567 567
 
568 568
             })
569
-            console.log("data",data)
569
+            // console.log("data",data)
570 570
             
571 571
             const filename = '排班模版'
572 572
            
@@ -593,7 +593,7 @@
593 593
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
594 594
 
595 595
           var data = []
596
-          console.log("33333",this.tableList)
596
+          // console.log("33333",this.tableList)
597 597
          
598 598
          this.tableList.map(item=>{
599 599
            data.push(Object.values(item))
@@ -618,10 +618,7 @@
618 618
       formatJson(filterVal, jsonData) {
619 619
         return jsonData.map(v =>
620 620
           filterVal.map(j => {
621
-            console.log(v)
622
-            console.log(j)
623
-            console.log(v[j])
624
-
621
+        
625 622
             if (j === 'timestamp') {
626 623
               return parseTime(v[j])
627 624
             } else {
@@ -2130,11 +2127,11 @@
2130 2127
               partition_id:this.partition_id,
2131 2128
               schedule_type:this.schedule_type
2132 2129
             }
2133
-           console.log("params2222",params)
2130
+          //  console.log("params2222",params)
2134 2131
          getThreeWeekList(params).then(response=>{
2135 2132
            if(response.data.state == 1){
2136 2133
              var partitions =  response.data.data.partitions
2137
-             console.log("数据22222",this.partitions)
2134
+            //  console.log("数据22222",this.partitions)
2138 2135
 
2139 2136
              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
2140 2137
               var list = []
@@ -2302,16 +2299,16 @@
2302 2299
               var lastWeek = []
2303 2300
               var next_start = this.getNextWeekOne(1)
2304 2301
               var nextstart = this.getTimestamp(next_start) - 28800
2305
-              console.log("下周开始时间",nextstart)
2302
+              // console.log("下周开始时间",nextstart)
2306 2303
               var next_end = this.getNextWeek(1)
2307 2304
               var nextend = this.getTimestamp(next_end) - 28800
2308
-              console.log("下周结束时间",nextend)
2305
+              // console.log("下周结束时间",nextend)
2309 2306
               var last_start = this.getNextWeekOne(2)
2310 2307
               var last_end = this.getNextWeek(2)
2311 2308
               var laststart = this.getTimestamp(last_start) - 28800
2312
-              console.log("下下周数据时间",laststart)
2309
+              // console.log("下下周数据时间",laststart)
2313 2310
               var lastend = this.getTimestamp(last_end) - 28800
2314
-              console.log("下下周数据时间",lastend)
2311
+              // console.log("下下周数据时间",lastend)
2315 2312
                
2316 2313
               if(this.export_type == 0){
2317 2314
                 for(let i = 0;i<scheduleList.length;i++){
@@ -2428,7 +2425,7 @@
2428 2425
               }
2429 2426
              }
2430 2427
 
2431
-             console.log("list5555555555",list)
2428
+            //  console.log("list5555555555",list)
2432 2429
 
2433 2430
              if(nextWeek.length > 0 ){
2434 2431
                for(let i=0;i<list.length;i++){
@@ -2531,7 +2528,7 @@
2531 2528
               }
2532 2529
              }
2533 2530
 
2534
-             console.log("nextWeek",nextWeek)
2531
+            //  console.log("nextWeek",nextWeek)
2535 2532
 
2536 2533
              if(lastWeek.length > 0 ){
2537 2534
                for(let i=0;i<list.length;i++){
@@ -2692,7 +2689,7 @@
2692 2689
       
2693 2690
      
2694 2691
 
2695
-         console.log("33333333",this.newDay)
2692
+        //  console.log("33333333",this.newDay)
2696 2693
          this.export_type = 1
2697 2694
          this.getThreeWeekList()
2698 2695
        },
@@ -2770,16 +2767,16 @@
2770 2767
                 let weekOfday = parseInt(moment().format('d')) 
2771 2768
                 start_time =  this.getTimestamp(moment().subtract(weekOfday + 6, 'days').format('YYYY-MM-DD')) -28800
2772 2769
                 end_time =  this.getTimestamp(moment().subtract(weekOfday, 'days').format('YYYY-MM-DD')) -28800
2773
-                console.log("start",start_time)
2774
-                console.log("end",end_time)
2770
+                // console.log("start",start_time)
2771
+                // console.log("end",end_time)
2775 2772
              }
2776 2773
             
2777 2774
             //本周
2778 2775
              if(this.form.lastweek == "2"){
2779 2776
                 start_time = this.getTimestamp(this.weekDayArr[0])
2780 2777
                 end_time = this.getTimestamp(this.weekDayArr[6])
2781
-                console.log("start",start_time)
2782
-                console.log("end",end_time)
2778
+                // console.log("start",start_time)
2779
+                // console.log("end",end_time)
2783 2780
              }
2784 2781
 
2785 2782
             var label = ""
@@ -2798,7 +2795,7 @@
2798 2795
               copy_startime:copy_startime,
2799 2796
               copy_endtime:copy_endtime,
2800 2797
             }
2801
-           console.log("时间",params)
2798
+         
2802 2799
          
2803 2800
            this.$refs[formName].validate(valid=>{
2804 2801
               if(valid){
@@ -2817,11 +2814,11 @@
2817 2814
     },
2818 2815
     created() {
2819 2816
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
2820
-     console.log("开始时间",start_time)
2817
+   
2821 2818
      this.start_time = start_time
2822 2819
 
2823 2820
      var end_time = this.getNextWeek(2)
2824
-     console.log("结束时间222222",end_time)
2821
+   
2825 2822
      this.end_time = end_time
2826 2823
       this.getWeekPanels()
2827 2824
       this.getInitDate()

+ 171 - 34
src/xt_pages/workforce/components/nextTableWeeks.vue Zobrazit soubor

@@ -25,7 +25,8 @@
25 25
           </li>
26 26
         </ul>
27 27
       </div>
28
-      
28
+    </div>
29
+    <div class="cell clearfix">
29 30
       <div  class="title"><span class="name">班 次</span> :</div>
30 31
       <div class="time">
31 32
         <ul class>
@@ -40,6 +41,36 @@
40 41
         </ul>
41 42
       </div>
42 43
     </div>
44
+    <div class="cell clearfix">
45
+      <div  class="title"><span class="name">处方状态</span> :</div>
46
+      <div class="time">
47
+        <ul class>
48
+          <li
49
+            :class="item.id == pre_status ? 'active' : ''"
50
+            @click="selectPreList(item.id)"
51
+            v-for="item in preStatusList"
52
+            :key="item.id"
53
+          >
54
+            {{ item.name }}
55
+          </li>
56
+        </ul>
57
+      </div>
58
+    </div>
59
+    <div class="cell clearfix">
60
+      <div  class="title"><span class="name">分区</span> :</div>
61
+      <div class="time">
62
+        <ul class>
63
+          <li
64
+            :class="item.id == zone ? 'active' : ''"
65
+            @click="selectZoneList(item.id)"
66
+            v-for="item in zoneList"
67
+            :key="item.id"
68
+          >
69
+            {{ item.name }}
70
+          </li>
71
+        </ul>
72
+      </div>
73
+    </div>
43 74
     <el-table
44 75
       :row-style="{ color: '#303133' }"
45 76
       :data="scheduleData"
@@ -50,6 +81,23 @@
50 81
       }"
51 82
       style="width: 100%"
52 83
     >
84
+      <el-table-column label="透析处方" min-width="100" align="center">
85
+        <template slot-scope="scope">
86
+          <span v-if="scope.row.prescription.id > 0">已确认</span>
87
+          <span v-if="scope.row.prescription.id == 0">未确认</span>
88
+        </template>
89
+      </el-table-column>
90
+      <el-table-column label="星期" min-width="100" align="center">
91
+        <template slot-scope="scope">
92
+           <span v-if="scope.row.schedule_week == 0">周日</span>
93
+           <span v-if="scope.row.schedule_week == 1">周一</span>
94
+           <span v-if="scope.row.schedule_week == 2">周二</span>
95
+           <span v-if="scope.row.schedule_week == 3">周三</span>
96
+           <span v-if="scope.row.schedule_week == 4">周四</span>
97
+           <span v-if="scope.row.schedule_week == 5">周五</span>
98
+           <span v-if="scope.row.schedule_week == 6">周六</span>
99
+        </template>
100
+      </el-table-column>
53 101
       <el-table-column label="姓名" min-width="100" align="center">
54 102
         <template slot-scope="scope">
55 103
           {{ scope.row.patient }}
@@ -87,27 +135,18 @@
87 135
           <span v-if="scope.row.prescription.dialysis_irrigation!=''">{{scope.row.prescription.dialysis_irrigation}}</span>
88 136
         </template>
89 137
       </el-table-column>
90
-      <el-table-column label="抗凝剂" min-width="100" align="center">
138
+      <el-table-column label="抗凝剂(商品名称)" min-width="100" align="center">
91 139
         <template slot-scope="scope">
92 140
           <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
93
-          <span v-if="scope.row.prescription.anticoagulant === 2"
94
-            >普通肝素</span
95
-          >
96
-          <span v-if="scope.row.prescription.anticoagulant === 3"
97
-            >低分子肝素</span
98
-          >
99
-          <span v-if="scope.row.prescription.anticoagulant === 4"
100
-            >阿加曲班</span
101
-          >
102
-          <span v-if="scope.row.prescription.anticoagulant === 5"
103
-            >枸橼酸钠</span
104
-          >
105
-          <span v-if="scope.row.prescription.anticoagulant === 6"
106
-            >低分子肝素钙</span
107
-          >
108
-          <span v-if="scope.row.prescription.anticoagulant === 7"
109
-            >低分子肝素钠</span
110
-          >
141
+          <span v-if="scope.row.prescription.anticoagulant === 2">普通肝素</span>
142
+          <span v-if="scope.row.prescription.anticoagulant === 3" >低分子肝素</span>
143
+          <span v-if="scope.row.prescription.anticoagulant === 4">阿加曲班</span>
144
+          <span v-if="scope.row.prescription.anticoagulant === 5">枸橼酸钠</span>
145
+          <span v-if="scope.row.prescription.anticoagulant === 6">低分子肝素钙</span>
146
+          <span v-if="scope.row.prescription.anticoagulant === 7">低分子肝素钠</span>
147
+         <span v-if="scope.row.prescription.antioxidant_commodity_name!=''">
148
+             (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
149
+          </span>
111 150
         </template>
112 151
       </el-table-column>
113 152
       <el-table-column label="总量" min-width="100" align="center">
@@ -152,9 +191,8 @@
152 191
 
153 192
       <el-table-column label="长期医嘱" min-width="440" align="center">
154 193
         <template slot-scope="scope">
155
-          <span style="white-space: pre">{{
156
-            getAdvice(scope.row.doctor_advice)
157
-          }}</span>
194
+          <span style="white-space: pre" v-if="scope.row.doctoradvice.length>0">{{getAdvice(scope.row.doctoradvice)}}</span>
195
+          <span style="white-space: pre" v-if="scope.row.hisdoctoradviceinfo.length>0">{{getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
158 196
         </template>
159 197
       </el-table-column>
160 198
     </el-table>
@@ -162,7 +200,7 @@
162 200
 </template>
163 201
 
164 202
 <script>
165
-import { getNextScheduleWeekDay } from "@/api/schedule";
203
+import { getNextScheduleWeekDay,getAllZoneList } from "@/api/schedule";
166 204
 import WeekItem from "./WeekItem";
167 205
 const moment = require('moment')
168 206
 export default {
@@ -177,6 +215,7 @@ export default {
177 215
   data() {
178 216
     return {
179 217
       weekArr: [
218
+        { id: 0, name: "全部" },
180 219
         { id: 1, name: "周一" },
181 220
         { id: 2, name: "周二" },
182 221
         { id: 3, name: "周三" },
@@ -207,7 +246,15 @@ export default {
207 246
       },
208 247
       scheduleData: [],
209 248
       modeOptions: null,
210
-       org_id:0
249
+      org_id:0,
250
+      pre_status:0,
251
+      preStatusList:[
252
+        {id:0,name:"全部"},
253
+        {id:1,name:"已确认"},
254
+        {id:2,name:"未确认"},
255
+      ],
256
+      zone:"",
257
+      zoneList:[{id:0,name:"全部"}],
211 258
     };
212 259
   },
213 260
   watch: {
@@ -222,7 +269,7 @@ export default {
222 269
   methods: {
223 270
     printAction() {
224 271
       this.$router.push({
225
-        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
272
+        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone+"&prestatus="+this.pre_status
226 273
       });
227 274
     },
228 275
    compare(property) {
@@ -242,6 +289,7 @@ export default {
242 289
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
243 290
           week_type:this.week_type,
244 291
           week_time:this.week_time,
292
+          zone:this.zone,
245 293
         }
246 294
         // const params = {
247 295
         //   start_time:1609603200,
@@ -254,12 +302,37 @@ export default {
254 302
         this.scheduleData = [];
255 303
         if (response.data.state == 1) {
256 304
           var scheduleData = response.data.data.schedule;
257
-          for(let i=0;i<scheduleData.length;i++){
258
-             scheduleData[i].sort = scheduleData[i].number.sort
259
-           }
260
-          var arr =   scheduleData.sort(this.compare('sort'))
261
-           console.log("元旦快乐",arr)
262
-          this.scheduleData = arr
305
+          if(this.pre_status == 0){
306
+              for(let i=0;i<scheduleData.length;i++){
307
+              scheduleData[i].sort = scheduleData[i].number.sort
308
+            }
309
+            var arr =   scheduleData.sort(this.compare('sort'))
310
+            console.log("元旦快乐",arr)
311
+            this.scheduleData = arr
312
+          }
313
+          if(this.pre_status == 1){
314
+            var newList = []
315
+            for(let i=0;i<scheduleData.length;i++){
316
+              if(scheduleData.prescription.id > 0){
317
+                 newList.push(scheduleData[i])
318
+              } 
319
+            }
320
+            var arr =   newList.sort(this.compare('sort'))
321
+            console.log("元旦快乐",arr)
322
+            this.scheduleData = arr
323
+          }
324
+
325
+          if(this.pre_status == 2){
326
+            var newList = []
327
+            for(let i=0;i<scheduleData.length;i++){
328
+              if(scheduleData.prescription.id == 0){
329
+                 newList.push(scheduleData[i])
330
+              } 
331
+            }
332
+            var arr =   newList.sort(this.compare('sort'))
333
+            console.log("元旦快乐",arr)
334
+            this.scheduleData = arr
335
+          }
263 336
         
264 337
          
265 338
         } else {
@@ -313,7 +386,14 @@ export default {
313 386
        this.week_time = type
314 387
        this.getNextScheduleWeekDay()
315 388
     },
316
-
389
+    selectPreList(type){
390
+      this.pre_status = type
391
+      this.getNextScheduleWeekDay()
392
+    },
393
+    selectZoneList(type){
394
+       this.zone = type
395
+       this.getNextScheduleWeekDay()
396
+    },
317 397
     getSchedulesType: function(type) {
318 398
       let type_name = "";
319 399
       switch (type) {
@@ -407,6 +487,62 @@ export default {
407 487
         }
408 488
         return name;
409 489
       }
490
+    },
491
+      getAdviceOne: function(doctor_advice) {
492
+      if (doctor_advice != null) {
493
+        let name = "";
494
+        for (let i = 0; i < doctor_advice.length; i++) {
495
+          let prescribing_number = "";
496
+          let single_dose = "";
497
+          let drug_spec = "";
498
+
499
+          if (doctor_advice[i].prescribing_number > 0) {
500
+            prescribing_number =
501
+              doctor_advice[i].prescribing_number +
502
+              doctor_advice[i].prescribing_number_unit;
503
+          }
504
+          if (doctor_advice[i].single_dose > 0) {
505
+            single_dose =
506
+              " 单次用量 " +
507
+              doctor_advice[i].single_dose +
508
+              doctor_advice[i].single_dose_unit;
509
+          }
510
+
511
+          if (doctor_advice[i].drug_spec > 0) {
512
+            drug_spec =
513
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
514
+          }
515
+
516
+          name =
517
+            name +
518
+            doctor_advice[i].advice_name +
519
+            " " +
520
+            drug_spec +
521
+            " " +
522
+            prescribing_number +
523
+            " " +
524
+            single_dose +
525
+            " " +
526
+            doctor_advice[i].delivery_way +
527
+            " " +
528
+            doctor_advice[i].execution_frequency +
529
+            " " +
530
+            doctor_advice[i].remark +
531
+            "\n";
532
+
533
+          
534
+        }
535
+        return name;
536
+      }
537
+    },
538
+    getAllZoneList(){
539
+      getAllZoneList().then(response=>{
540
+         if(response.data.state == 1){
541
+            var zonelist = response.data.data.zoneList
542
+            this.zoneList.push(...zonelist)
543
+           
544
+         }
545
+      })
410 546
     }
411 547
   },
412 548
   components: {
@@ -415,13 +551,14 @@ export default {
415 551
   created() {
416 552
     this.modeOptions = this.$store.getters.treatment_mode;
417 553
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
418
-    console.log("抗凝机", this.anticoagulants_confit);
419 554
     this.week_type = new Date().getDay();
420 555
     if (this.week_type == 0) {
421 556
       this.week_type = 7;
422 557
     }
558
+    this.getAllZoneList()
423 559
     this.getNextScheduleWeekDay();
424 560
     this.org_id = this.$store.getters.xt_user.org.id
561
+   
425 562
   }
426 563
 };
427 564
 </script>

+ 225 - 29
src/xt_pages/workforce/components/tableData.vue Zobrazit soubor

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div id="table_data">
3
-    <!-- <div style="margin-bottom:-30px">
3
+    <div style="margin-bottom:-30px;margin-left:300px">
4 4
       <span>分区:</span>
5 5
        <el-select v-model="partition_id" placeholder="请选择" @change="changePartiton">
6 6
         <el-option
@@ -10,7 +10,7 @@
10 10
           :value="item.id">
11 11
          </el-option>
12 12
         </el-select>
13
-       <span style="margin-left:100px">班次:</span>
13
+       <!-- <span style="margin-left:100px">班次:</span>
14 14
        <el-select v-model="schedule_type" placeholder="请选择" @change="changeSchedule_type">
15 15
         <el-option
16 16
           v-for="item in options"
@@ -18,8 +18,8 @@
18 18
           :label="item.name"
19 19
           :value="item.id">
20 20
          </el-option>
21
-       </el-select>
22
-    </div> -->
21
+       </el-select> -->
22
+    </div>
23 23
    
24 24
     <div class="cell clearfix" v-if="weekTime == 'thisWeek' || weekTime == 'nextWeek'  || weekTime == 'nextTwoWeek' ">
25 25
       <el-input
@@ -129,7 +129,6 @@
129 129
       :height="tableContainHeight"
130 130
       ref="table"
131 131
       style="width: 100%;cursor: pointer;"
132
-      
133 132
     >
134 133
       <el-table-column
135 134
         prop="area"
@@ -617,6 +616,7 @@
617 616
 
618 617
 <script>
619 618
 import { uParseTime } from "@/utils/tools";
619
+import print from 'print-js'
620 620
 
621 621
 import {
622 622
   CancelSchedule,
@@ -643,10 +643,10 @@ export default {
643 643
       type: Array,
644 644
       dafault: []
645 645
     },
646
-    scheduleZoneProp: {
647
-      type: Array,
648
-      dafault: []
649
-    },
646
+    // scheduleZoneProp: {
647
+    //   type: Array,
648
+    //   dafault: []
649
+    // },
650 650
     partitionsProp: {
651 651
       type: Object,
652 652
       dafault: {}
@@ -688,7 +688,7 @@ export default {
688 688
       tzDialogVisible: false,
689 689
       msDialogVisible: false,
690 690
       jhDialogVisible: false,
691
-      scheduleZone: this.scheduleZoneProp,
691
+     // scheduleZone: this.scheduleZoneProp,
692 692
       scheduleZoneRow: -1,
693 693
       partitions: [],
694 694
       jihaos: [],
@@ -758,17 +758,24 @@ export default {
758 758
         {id:2,name:"下午"},
759 759
         {id:3,name:"晚上"},
760 760
       ],
761
-      partition_id:"",
761
+      partition_id:0,
762 762
       schedule_type:"",
763 763
       zones:[{id:0,name:"全部"}],
764
-      theType:""
764
+      theType:"",
765
+      scheduleZone:[],
766
+      theWeek: {
767
+        lastWeek: 0,
768
+        thisWeek: 0,
769
+        nextWeek: 0,
770
+        nextTwoWeek: 0
771
+      },
765 772
     };
766 773
   },
767 774
 
768 775
   watch: {
769 776
     weekTime: function() {
770 777
       var theType = this.weekType(this.weekTime);
771
-      console.log("999999999",theType)
778
+      // console.log("999999999",theType)
772 779
       this.theType = theType
773 780
       this.getSchedules();
774 781
     },
@@ -789,6 +796,196 @@ export default {
789 796
     }
790 797
   },
791 798
   methods: {
799
+       getWeekPanels() {
800
+        this.scheduleZone=[]
801
+        getWeekPanels(1,this.partition_id).then(response => {
802
+          if (response.data.state == 0) {
803
+            return false
804
+          }
805
+          var partitions = response.data.data.partitions
806
+          console.log("分区",partitions)
807
+          console.log("scheduleZoneRow",this.scheduleZoneRow)
808
+          this.theWeek.thisWeek = response.data.data.theWeek
809
+          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
810
+          this.theWeek.nextWeek = this.theWeek.thisWeek + 1
811
+          this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
812
+          var that = this
813
+          if (partitions.length > 0) {
814
+            partitions.forEach(function(partition) {
815
+              if (partition.jihaos.length == 0) {
816
+                return false
817
+              }
818
+              that.scheduleZoneRow.push(partition.jihaos.length)
819
+
820
+              that.partitions[partition.id] = partition
821
+              
822
+              console.log("partition",partition)
823
+
824
+             
825
+              partition.jihaos.forEach(function(jihao) {
826
+                var thisPa = {
827
+                  area: partition.name,
828
+                  zone_id: partition.id,
829
+                  zone_type: partition.type,
830
+                  cut: jihao.number,
831
+                  jihao_id: jihao.id,
832
+                  Mon_M: {
833
+                    schedule_id: 0,
834
+                    mode_id: 0,
835
+                    mode_name: '',
836
+                    patient_id: 0,
837
+                    patient: ''
838
+                  },
839
+                  Mon_A: {
840
+                    schedule_id: 0,
841
+                    mode_id: 0,
842
+                    mode_name: '',
843
+                    patient_id: 0,
844
+                    patient: ''
845
+                  },
846
+                  Mon_N: {
847
+                    schedule_id: 0,
848
+                    mode_id: 0,
849
+                    mode_name: '',
850
+                    patient_id: 0,
851
+                    patient: ''
852
+                  },
853
+                  Tue_M: {
854
+                    schedule_id: 0,
855
+                    mode_id: 0,
856
+                    mode_name: '',
857
+                    patient_id: 0,
858
+                    patient: ''
859
+                  },
860
+                  Tue_A: {
861
+                    schedule_id: 0,
862
+                    mode_id: 0,
863
+                    mode_name: '',
864
+                    patient_id: 0,
865
+                    patient: ''
866
+                  },
867
+                  Tue_N: {
868
+                    schedule_id: 0,
869
+                    mode_id: 0,
870
+                    mode_name: '',
871
+                    patient_id: 0,
872
+                    patient: ''
873
+                  },
874
+                  Wed_M: {
875
+                    schedule_id: 0,
876
+                    mode_id: 0,
877
+                    mode_name: '',
878
+                    patient_id: 0,
879
+                    patient: ''
880
+                  },
881
+                  Wed_A: {
882
+                    schedule_id: 0,
883
+                    mode_id: 0,
884
+                    mode_name: '',
885
+                    patient_id: 0,
886
+                    patient: ''
887
+                  },
888
+                  Wed_N: {
889
+                    schedule_id: 0,
890
+                    mode_id: 0,
891
+                    mode_name: '',
892
+                    patient_id: 0,
893
+                    patient: ''
894
+                  },
895
+                  Thurs_M: {
896
+                    schedule_id: 0,
897
+                    mode_id: 0,
898
+                    mode_name: '',
899
+                    patient_id: 0,
900
+                    patient: ''
901
+                  },
902
+                  Thurs_A: {
903
+                    schedule_id: 0,
904
+                    mode_id: 0,
905
+                    mode_name: '',
906
+                    patient_id: 0,
907
+                    patient: ''
908
+                  },
909
+                  Thurs_N: {
910
+                    schedule_id: 0,
911
+                    mode_id: 0,
912
+                    mode_name: '',
913
+                    patient_id: 0,
914
+                    patient: ''
915
+                  },
916
+                  Fri_M: {
917
+                    schedule_id: 0,
918
+                    mode_id: 0,
919
+                    mode_name: '',
920
+                    patient_id: 0,
921
+                    patient: ''
922
+                  },
923
+                  Fri_A: {
924
+                    schedule_id: 0,
925
+                    mode_id: 0,
926
+                    mode_name: '',
927
+                    patient_id: 0,
928
+                    patient: ''
929
+                  },
930
+                  Fri_N: {
931
+                    schedule_id: 0,
932
+                    mode_id: 0,
933
+                    mode_name: '',
934
+                    patient_id: 0,
935
+                    patient: ''
936
+                  },
937
+                  Sat_M: {
938
+                    schedule_id: 0,
939
+                    mode_id: 0,
940
+                    mode_name: '',
941
+                    patient_id: 0,
942
+                    patient: ''
943
+                  },
944
+                  Sat_A: {
945
+                    schedule_id: 0,
946
+                    mode_id: 0,
947
+                    mode_name: '',
948
+                    patient_id: 0,
949
+                    patient: ''
950
+                  },
951
+                  Sat_N: {
952
+                    schedule_id: 0,
953
+                    mode_id: 0,
954
+                    mode_name: '',
955
+                    patient_id: 0,
956
+                    patient: ''
957
+                  },
958
+                  Sun_A: {
959
+                    schedule_id: 0,
960
+                    mode_id: 0,
961
+                    mode_name: '',
962
+                    patient_id: 0,
963
+                    patient: ''
964
+                  },
965
+                  Sun_N: {
966
+                    schedule_id: 0,
967
+                    mode_id: 0,
968
+                    mode_name: '',
969
+                    patient_id: 0,
970
+                    patient: ''
971
+                  },
972
+                  Sun_M: {
973
+                    schedule_id: 0,
974
+                    mode_id: 0,
975
+                    mode_name: '',
976
+                    patient_id: 0,
977
+                    patient: ''
978
+                  },
979
+                  total: 0
980
+                }
981
+                // tha.scheduleZone = []
982
+                that.scheduleZone.push(thisPa)
983
+              })
984
+            })
985
+            console.log("分区列表22222222222222",this.scheduleZone)
986
+          }
987
+        })
988
+     },
792 989
     cellClass({ row, column, rowIndex, columnIndex }) {
793 990
       if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
794 991
         return "";
@@ -910,6 +1107,7 @@ export default {
910 1107
           partition_id:this.partition_id,
911 1108
           schedule_type:this.schedule_type,
912 1109
         }
1110
+
913 1111
       getSchedules(params).then(response => {
914 1112
         if (response.data.state == 1) {
915 1113
           this.weekTitle = response.data.data.weekTitle;
@@ -917,9 +1115,11 @@ export default {
917 1115
           this.toDay = response.data.data.today;
918 1116
           var theSchedules = response.data.data.schdules;
919 1117
           
920
-        
1118
+          // console.log("分区2222222222",this.scheduleZone)
1119
+          
921 1120
         
922 1121
           var that = this;
1122
+          console.log('that.scheduleZonethat.scheduleZone',that.scheduleZone)
923 1123
           this.scheduleZone.forEach(function(zone, index) {
924 1124
            
925 1125
             that.scheduleZone[index].Mon_M = {
@@ -1061,7 +1261,7 @@ export default {
1061 1261
                   );
1062 1262
 
1063 1263
                   if (weekPath.length == 2) {
1064
-                    console.log(schedule);
1264
+                   
1065 1265
 
1066 1266
                     var weekPathKey = weekPath[0] + "_" + weekPath[1];
1067 1267
                     that.scheduleZone[index][weekPathKey] = {
@@ -1077,12 +1277,14 @@ export default {
1077 1277
                           : that.modeOptions[schedule.mode_id].name
1078 1278
                     };
1079 1279
                     that.scheduleZone[index].total += 1;
1280
+                    
1080 1281
                   }
1081 1282
                 }
1082 1283
               });
1083 1284
             }
1084 1285
 
1085 1286
           });
1287
+          
1086 1288
         } else {
1087 1289
           this.$message.error("网络错误");
1088 1290
           return false;
@@ -1265,9 +1467,8 @@ export default {
1265 1467
     },
1266 1468
     clickThis(row, column, cell, event) {
1267 1469
       // debugger
1268
-      console.log("aaa",column.property);
1269 1470
       var week = this.weekDay(column.property);
1270
-      console.log("week",week);
1471
+  
1271 1472
 
1272 1473
       if (week[0] == -1 || week[1] == -1) {
1273 1474
         return false;
@@ -1288,7 +1489,6 @@ export default {
1288 1489
       this.currentData.bed_name = row.cut;
1289 1490
       this.currentData.partition_type = row.zone_type;
1290 1491
 
1291
-      console.log(this.currentData);
1292 1492
 
1293 1493
       if (row[column.property].schedule_id > 0) {
1294 1494
         this.currentData.mode_id = row[column.property].mode_id;
@@ -1329,8 +1529,6 @@ export default {
1329 1529
             }
1330 1530
           }
1331 1531
 
1332
-          // console.log(this.scheduleZone)
1333
-
1334 1532
           this.changeSchedule.change_action = "change_device";
1335 1533
           this.changeScheduleActon(formName);
1336 1534
 
@@ -1518,7 +1716,7 @@ export default {
1518 1716
               this.current_devices = this.zone_device_map[this.zone_name];
1519 1717
               this.device_id = this.current_devices[0].id;
1520 1718
             }
1521
-            console.log(this.current_devices);
1719
+         
1522 1720
 
1523 1721
             this.zone_device_options = [
1524 1722
               { values: this.zone_names },
@@ -1526,7 +1724,6 @@ export default {
1526 1724
               { values: this.current_devices }
1527 1725
             ];
1528 1726
 
1529
-            console.log(this.current_devices);
1530 1727
           } else {
1531 1728
           }
1532 1729
         })
@@ -1604,9 +1801,6 @@ export default {
1604 1801
                   if (this.zone_names.length > 0) {
1605 1802
                     this.zone_name = this.zone_names[0];
1606 1803
                     this.current_devices = this.zone_device_map[this.zone_name];
1607
-
1608
-                    console.log(this.zone_device_map[this.zone_name]);
1609
-
1610 1804
                     this.device_id = this.current_devices[0].id;
1611 1805
                   }
1612 1806
                   this.zone_device_options = [
@@ -2006,21 +2200,22 @@ export default {
2006 2200
     changePartiton(val){
2007 2201
      this.$emit('event1', val)
2008 2202
       this.partition_id = val
2203
+      this.getWeekPanels()
2009 2204
       this.getSchedules()
2205
+    
2010 2206
     },
2011 2207
     changeSchedule_type(val){
2012 2208
      this.$emit('event2', val)
2013 2209
      this.schedule_type = val
2014 2210
      this.getSchedules()
2015
-    }
2211
+    },
2016 2212
   },
2017 2213
   components: {
2018 2214
     ScheduleItem
2019 2215
   },
2020 2216
   mounted() {
2021
-    console.log('this.tableContainHeight,',this.$refs.table.$el.offsetTop);
2022
-    this.tableContainHeight =
2023
-      window.innerHeight - this.$refs.table.$el.offsetTop - 120;
2217
+  
2218
+    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 120;
2024 2219
     console.log(this.tableContainHeight);
2025 2220
     // var theType = this.weekType(this.weekTime);
2026 2221
     // this.getSchedules(theType);
@@ -2040,6 +2235,7 @@ export default {
2040 2235
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2041 2236
   // },
2042 2237
   created() {
2238
+    this.getWeekPanels()
2043 2239
     this.changeScheduleType(1)
2044 2240
     rowNumber = 0;
2045 2241
     this.modeOptions = this.$store.getters.treatment_mode;

+ 500 - 88
src/xt_pages/workforce/components/tableWeeks.vue Zobrazit soubor

@@ -1,6 +1,14 @@
1 1
 <template>
2 2
   <div>
3 3
     <div class="cell clearfix" style="float: right">
4
+      <el-button
5
+        style="float: right"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="signPrint()"
9
+        type="primary"
10
+        >标签打印
11
+      </el-button>
4 12
       <el-button
5 13
         style="float: right"
6 14
         size="small"
@@ -9,6 +17,15 @@
9 17
         type="primary"
10 18
         >打印
11 19
       </el-button>
20
+
21
+      <el-button
22
+       style="float: right"
23
+       size="small"
24
+       icon="el-icon-printer"
25
+       @click="printActionSetting()"
26
+       type="primary">
27
+        打印设置
28
+      </el-button>
12 29
     </div>
13 30
 
14 31
     <div class="cell clearfix">
@@ -25,8 +42,9 @@
25 42
           </li>
26 43
         </ul>
27 44
       </div>
28
-
29
-      <div  class="title"><span class="name">班 次</span> :</div>
45
+    </div>
46
+    <div  class="cell clearfix">
47
+     <div  class="title"><span class="name">班 次</span> :</div>
30 48
       <div class="time">
31 49
         <ul class>
32 50
           <li
@@ -40,6 +58,36 @@
40 58
         </ul>
41 59
       </div>
42 60
     </div>
61
+    <div  class="cell clearfix">
62
+     <div  class="title"><span class="name">处方状态</span> :</div>
63
+      <div class="time">
64
+        <ul class>
65
+          <li
66
+            :class="item.id == pre_status ? 'active' : ''"
67
+            @click="selectPreStatus(item.id)"
68
+            v-for="item in preStatus"
69
+            :key="item.id"
70
+          >
71
+            {{ item.name }}
72
+          </li>
73
+        </ul>
74
+      </div>
75
+    </div>
76
+    <div class="cell clearfix">
77
+      <div  class="title"><span class="name">分区</span> :</div>
78
+      <div class="time">
79
+        <ul class>
80
+          <li
81
+            :class="item.id == zone ? 'active' : ''"
82
+            @click="selectZoneList(item.id)"
83
+            v-for="item in zoneList"
84
+            :key="item.id"
85
+          >
86
+            {{ item.name }}
87
+          </li>
88
+        </ul>
89
+      </div>
90
+    </div>
43 91
     <el-table
44 92
       :row-style="{ color: '#303133' }"
45 93
       :data="scheduleData"
@@ -50,9 +98,26 @@
50 98
       }"
51 99
       style="width: 100%"
52 100
     >
101
+     <el-table-column label="透析处方" min-width="100" align="center">
102
+        <template slot-scope="scope">
103
+           <span v-if="scope.row.prescription.id>0">已确定</span>
104
+           <span v-if="scope.row.prescription.id == 0">未确定</span>
105
+        </template>
106
+      </el-table-column>
107
+      <el-table-column label="星期" min-width="100" align="center">
108
+        <template slot-scope="scope">
109
+           <span v-if="scope.row.schedule_week == 0">周日</span>
110
+           <span v-if="scope.row.schedule_week == 1">周一</span>
111
+           <span v-if="scope.row.schedule_week == 2">周二</span>
112
+           <span v-if="scope.row.schedule_week == 3">周三</span>
113
+           <span v-if="scope.row.schedule_week == 4">周四</span>
114
+           <span v-if="scope.row.schedule_week == 5">周五</span>
115
+           <span v-if="scope.row.schedule_week == 6">周六</span>
116
+        </template>
117
+      </el-table-column>
53 118
       <el-table-column label="姓名" min-width="100" align="center">
54 119
         <template slot-scope="scope">
55
-          {{ scope.row.patient }}
120
+          {{ scope.row.patient.name }}
56 121
         </template>
57 122
       </el-table-column>
58 123
       <el-table-column label="分区" min-width="70" align="center">
@@ -88,27 +153,18 @@
88 153
         </template>
89 154
       </el-table-column>
90 155
 
91
-      <el-table-column label="抗凝剂" min-width="100" align="center">
156
+      <el-table-column label="抗凝剂(商品名称)" min-width="70" align="center">
92 157
         <template slot-scope="scope">
93 158
           <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
94
-          <span v-if="scope.row.prescription.anticoagulant === 2"
95
-            >普通肝素</span
96
-          >
97
-          <span v-if="scope.row.prescription.anticoagulant === 3"
98
-            >低分子肝素</span
99
-          >
100
-          <span v-if="scope.row.prescription.anticoagulant === 4"
101
-            >阿加曲班</span
102
-          >
103
-          <span v-if="scope.row.prescription.anticoagulant === 5"
104
-            >枸橼酸钠</span
105
-          >
106
-          <span v-if="scope.row.prescription.anticoagulant === 6"
107
-            >低分子肝素钙</span
108
-          >
109
-          <span v-if="scope.row.prescription.anticoagulant === 7"
110
-            >低分子肝素钠</span
111
-          >
159
+          <span v-if="scope.row.prescription.anticoagulant === 2">普通肝素</span>
160
+          <span v-if="scope.row.prescription.anticoagulant === 3">低分子肝素</span>
161
+          <span v-if="scope.row.prescription.anticoagulant === 4">阿加曲班</span>
162
+          <span v-if="scope.row.prescription.anticoagulant === 5">枸橼酸钠</span>
163
+          <span v-if="scope.row.prescription.anticoagulant === 6">低分子肝素钙</span>
164
+          <span v-if="scope.row.prescription.anticoagulant === 7">低分子肝素钠</span>
165
+          <span v-if="scope.row.prescription.antioxidant_commodity_name!=''">
166
+             (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
167
+          </span>
112 168
         </template>
113 169
       </el-table-column>
114 170
       <el-table-column label="总量" min-width="100" align="center">
@@ -148,22 +204,78 @@
148 204
               ? scope.row.prescription.anticoagulant_zongliang + "iu"
149 205
               : ""
150 206
           }}</span>
207
+        
151 208
         </template>
152 209
       </el-table-column>
153 210
 
154 211
       <el-table-column label="长期医嘱" min-width="440" align="center">
155 212
         <template slot-scope="scope">
156
-          <span style="white-space: pre">{{
157
-            getAdvice(scope.row.doctor_advice)
158
-          }}</span>
213
+          <span style="white-space: pre">
214
+             <span v-if="scope.row.doctoradvice.length >0">{{ getAdvice(scope.row.doctoradvice)}}</span>
215
+             <span v-if="scope.row.hisdoctoradviceinfo.length>0">{{ getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
216
+          </span>
159 217
         </template>
160 218
       </el-table-column>
161 219
     </el-table>
220
+
221
+    <el-dialog
222
+      title="打印设置"
223
+      :visible.sync="dialogVisible"
224
+      width="30%"
225
+      >
226
+     <span>
227
+       <ul>
228
+         <li> 
229
+          <el-checkbox v-model="prescription_status">透析处方状态</el-checkbox>
230
+         </li>
231
+         <li>
232
+          <el-checkbox v-model="week">星期</el-checkbox>
233
+         </li>
234
+         <li>
235
+          <el-checkbox v-model="name">姓名</el-checkbox>
236
+         </li>
237
+         <li>
238
+          <el-checkbox v-model="zone">分区</el-checkbox>
239
+         </li>
240
+         <li>
241
+          <el-checkbox v-model="classes">班次</el-checkbox>
242
+         </li>
243
+         <li>
244
+          <el-checkbox v-model="number">机号</el-checkbox>
245
+         </li>
246
+         <li>
247
+          <el-checkbox v-model="mode">透析模式</el-checkbox>
248
+         </li>
249
+         <li>
250
+          <el-checkbox v-model="dialyzers">透析器</el-checkbox>
251
+         </li>
252
+         <li>
253
+          <el-checkbox v-model="perfusion_apparatus">灌流器</el-checkbox>
254
+         </li>
255
+         <li>
256
+          <el-checkbox v-model="anticoagulant">抗凝剂(商品名称)</el-checkbox>
257
+         </li>
258
+         <li>
259
+          <el-checkbox v-model="anticoagulant_zongliang">总量</el-checkbox>
260
+         </li>
261
+         <li>
262
+          <el-checkbox v-model="doctor_advice">长期医嘱</el-checkbox>
263
+         </li>
264
+       </ul>
265
+      
266
+     </span>
267
+     <span slot="footer" class="dialog-footer">
268
+      <el-button @click="dialogVisible = false">取 消</el-button>
269
+      <el-button type="primary" @click="saveRemindPrint">保 存</el-button>
270
+     </span>
271
+   </el-dialog>
272
+
273
+    
162 274
   </div>
163 275
 </template>
164 276
 
165 277
 <script>
166
-import { getSchedules, getScheduleWeekDay } from "@/api/schedule";
278
+import { getSchedules, getScheduleWeekDay,saveRemindPrint,getRemindPrintList,getScheduleList,getAllZoneList } from "@/api/schedule";
167 279
 import WeekItem from "./WeekItem";
168 280
 
169 281
 export default {
@@ -178,6 +290,7 @@ export default {
178 290
   data() {
179 291
     return {
180 292
       weekArr: [
293
+        { id: 0, name: "全部" },
181 294
         { id: 1, name: "周一" },
182 295
         { id: 2, name: "周二" },
183 296
         { id: 3, name: "周三" },
@@ -190,12 +303,18 @@ export default {
190 303
 
191 304
       week_type: "1",
192 305
       week_time:0,
306
+      pre_status:0,
193 307
       weekTimes:[
194 308
         {id:0,name:"全部"},
195 309
         {id:1,name:"上午"},
196 310
         {id:2,name:"下午"},
197 311
         {id:3,name:"晚上"},
198 312
       ],
313
+      preStatus:[
314
+        {id:0,name:"全部"},
315
+        {id:1,name:"已确认"},
316
+        {id:2,name:"未确认"}
317
+      ],
199 318
       weekTitle: ["", "", "", "", "", "", ""],
200 319
       weekData: {
201 320
         Monday: [],
@@ -208,7 +327,37 @@ export default {
208 327
       },
209 328
       scheduleData: [],
210 329
       modeOptions: null,
211
-      org_id:0
330
+      org_id:0,
331
+      dialogVisible:false,
332
+      prescription_status:false,
333
+      week:false,
334
+      name:false,
335
+      zone:false,
336
+      classes:false,
337
+      number:false,
338
+      mode:false,
339
+      dialyzers:false,
340
+      perfusion_apparatus:false,
341
+      anticoagulant:false,
342
+      anticoagulant_zongliang:false,
343
+      doctor_advice:false,
344
+      form:{
345
+        id:0,
346
+        prescription_status:"",
347
+        week:"",
348
+        name:"",
349
+        zone:"",
350
+        classes:"",
351
+        number:"",
352
+        mode:"",
353
+        dialyzers:"",
354
+        perfusion_apparatus:"",
355
+        anticoagulant:"",
356
+        anticoagulant_zongliang:"",
357
+        doctor_advice:"",
358
+      },
359
+      zone:0,
360
+      zoneList:[{id:0,name:"全部"}]
212 361
     };
213 362
   },
214 363
   watch: {
@@ -222,9 +371,14 @@ export default {
222 371
   methods: {
223 372
     printAction() {
224 373
       this.$router.push({
225
-        path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time
374
+        path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone
226 375
       });
227 376
     },
377
+    signPrint(){
378
+      this.$router.push({
379
+        path:"/schedule/remind/print/setting?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone+"&prestatus="+this.pre_status
380
+      })
381
+    },
228 382
     compare(property) {
229 383
        return function (a, b) {
230 384
           var value1 = a[property];
@@ -233,11 +387,11 @@ export default {
233 387
       }
234 388
      },
235 389
     getScheduleWeekDay() {
236
-        const params = {
237
-          week_type:this.week_type,
238
-          week_time:this.week_time,
239
-        }
240
-
390
+     
391
+      const params = {
392
+        week_type:this.week_type,
393
+        week_time:this.week_time,
394
+       }
241 395
       getScheduleWeekDay(params).then(response => {
242 396
         this.scheduleData = [];
243 397
         if (response.data.state == 1) {
@@ -248,7 +402,7 @@ export default {
248 402
           var arr = scheduleData.sort(this.compare('sort'))
249 403
 
250 404
           var arr =   scheduleData.sort(this.compare('sort'))
251
-        //  console.log("元旦快乐",arr)
405
+       
252 406
           this.scheduleData = arr
253 407
         } else {
254 408
           this.$message.error("网络错误");
@@ -257,47 +411,54 @@ export default {
257 411
       });
258 412
     },
259 413
 
260
-    // getSchedules(weekType) {
261
-    //   getSchedules(weekType).then(response => {
262
-    //     this.scheduleData = []
263
-    //     if (response.data.state == 1) {
264
-    //       this.weekTitle = response.data.data.weekTitle
265
-    //       var theSchedules = response.data.data.schdules
266
-    //       var that = this
267
-    //       theSchedules.forEach(function(schedule) {
268
-    //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
269
-    //         var weekPath = that.weekPath(schedule.schedule_week)
270
-    //         if (weekPath.length > 0) {
271
-    //           that.weekData[weekPath].push(schedule)
272
-    //         }
273
-    //       })
274
-    //       var rowNum = 0
275
-    //       console.log(that.weekData)
276
-    //       for (var index in that.weekData) {
277
-    //         var thisLen = that.weekData[index].length
278
-    //         rowNum = rowNum >= thisLen ? rowNum : thisLen
279
-    //       }
280
-    //       console.log(rowNum)
281
-    //       for (let index = 0; index < rowNum; index++) {
282
-    //         var dataItem = {}
283
-    //         for (var weekIndex in that.weekData) {
284
-    //           var weekItem = that.weekData[weekIndex].shift()
285
-    //           console.log('weekItem', weekItem)
286
-    //           if (typeof (weekItem) != 'undefined') {
287
-    //             dataItem[weekIndex] = weekItem
288
-    //           }
289
-    //         }
290
-    //         that.scheduleData.push(dataItem)
291
-    //       }
292
-    //
293
-    //       console.log(that.scheduleData)
294
-    //
295
-    //     } else {
296
-    //       this.$message.error('网络错误')
297
-    //       return false
298
-    //     }
299
-    //   })
300
-    // },
414
+    getScheduleList(){
415
+        const params = {
416
+          week_type:this.week_type,
417
+          week_time:this.week_time,
418
+          zone:this.zone,
419
+        }
420
+       
421
+       getScheduleList(params).then(response=>{
422
+         if(response.data.state ==1){
423
+           console.log("22333333333",this.pre_status)
424
+           var list = response.data.data.list
425
+           if(this.pre_status == 0){
426
+             
427
+            for(let i=0;i<list.length;i++){
428
+                list[i].sort = list[i].number.sort
429
+            }
430
+
431
+            var arr = list.sort(this.compare('sort'))
432
+              console.log("list2222999999999",list)
433
+            this.scheduleData = arr
434
+           }
435
+           if(this.pre_status == 1){
436
+              var newList = []
437
+              for(let i=0;i<list.length;i++){
438
+                if(list[i].prescription.id > 0){
439
+                   newList.push(list[i])
440
+                }
441
+              }
442
+              var arr = newList.sort(this.compare('sort'))
443
+              this.scheduleData = arr
444
+           }
445
+
446
+           if(this.pre_status == 2){
447
+              var newList = []
448
+              for(let i=0;i<list.length;i++){
449
+                if(list[i].prescription.id ==0){
450
+                   newList.push(list[i])
451
+                }
452
+              }
453
+              var arr = newList.sort(this.compare('sort'))
454
+              this.scheduleData = arr
455
+           }
456
+         
457
+          }
458
+       })
459
+    },
460
+
461
+   
301 462
     weekType(weekTime) {
302 463
       var theType = 2;
303 464
       switch (weekTime) {
@@ -336,16 +497,21 @@ export default {
336 497
     },
337 498
     selectWeekType(type) {
338 499
       this.week_type = type;
339
-      // let params = {
340
-      //   week_type: this.week_type
341
-      // };
342
-      this.getScheduleWeekDay();
500
+      this.getScheduleList()
343 501
     },
502
+
344 503
     selectWeekTime(type){
345 504
        this.week_time = type
346
-       this.getScheduleWeekDay()
505
+      this.getScheduleList()
506
+    },
507
+    selectPreStatus(type){
508
+       this.pre_status = type
509
+       this.getScheduleList()
510
+    },
511
+   selectZoneList(type){
512
+       this.zone = type
513
+       this.getScheduleList()
347 514
     },
348
-
349 515
     getSchedulesType: function(type) {
350 516
       let type_name = "";
351 517
       switch (type) {
@@ -362,7 +528,8 @@ export default {
362 528
       return type_name;
363 529
     },
364 530
     getAdvice: function(doctor_advice) {
365
-      if (doctor_advice != null) {
531
+     
532
+      if (doctor_advice.length > 0) {
366 533
         let name = "";
367 534
         for (let i = 0; i < doctor_advice.length; i++) {
368 535
           let prescribing_number = "";
@@ -438,7 +605,256 @@ export default {
438 605
           }
439 606
         }
440 607
         return name;
608
+      }else{
609
+        return ""
441 610
       }
611
+    },
612
+    getAdviceOne: function(doctor_advice) {
613
+     
614
+      if (doctor_advice.length > 0) {
615
+        let name = "";
616
+        for (let i = 0; i < doctor_advice.length; i++) {
617
+          let prescribing_number = "";
618
+          let single_dose = "";
619
+          let drug_spec = "";
620
+
621
+          if (doctor_advice[i].prescribing_number > 0) {
622
+            prescribing_number =
623
+              doctor_advice[i].prescribing_number +
624
+              doctor_advice[i].prescribing_number_unit;
625
+          }
626
+          if (doctor_advice[i].single_dose > 0) {
627
+            single_dose =
628
+              " 单次用量 " +
629
+              doctor_advice[i].single_dose +
630
+              doctor_advice[i].single_dose_unit;
631
+          }
632
+
633
+          if (doctor_advice[i].drug_spec > 0) {
634
+            drug_spec =
635
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
636
+          }
637
+
638
+          name =
639
+            name +
640
+            doctor_advice[i].advice_name +
641
+            " " +
642
+            drug_spec +
643
+            " " +
644
+            prescribing_number +
645
+            " " +
646
+            single_dose +
647
+            " " +
648
+            doctor_advice[i].delivery_way +
649
+            " " +
650
+            doctor_advice[i].execution_frequency +
651
+            " " +
652
+            doctor_advice[i].remark +
653
+            "\n";
654
+        }
655
+        return name;
656
+      }else{
657
+        return ""
658
+      }
659
+    },
660
+    printActionSetting(){
661
+       this.getlist()
662
+       this.dialogVisible = true
663
+
664
+    },
665
+    saveRemindPrint(){
666
+       console.log("455555555",this.perfusion_apparatus)
667
+
668
+      if(this.perfusion_apparatus == true){
669
+         console.log("3333")
670
+          this.form.perfusion_apparatus = 1
671
+       }
672
+       if(this.perfusion_apparatus == false){
673
+          this.form.perfusion_apparatus = 2
674
+       }
675
+       if(this.prescription_status == true){
676
+         this.form.prescription_status = 1
677
+       }
678
+       if(this.prescription_status == false){
679
+         this.form.prescription_status = 2
680
+       }
681
+       if(this.week == true){
682
+          this.form.week = 1
683
+       }
684
+       if(this.week == false){
685
+          this.form.week = 2
686
+       }
687
+       if(this.name == true){
688
+         this.form.name = 1
689
+       }
690
+       if(this.name == false){
691
+          this.form.name = 2
692
+       }
693
+       if(this.zone == true){
694
+         this.form.zone = 1
695
+       }
696
+       if(this.zone == false){
697
+          this.form.zone = 2
698
+       }
699
+       if(this.classes == true){
700
+         this.form.classes = 1
701
+       }
702
+       if(this.classes == false){
703
+         this.form.classes = 2
704
+       }
705
+       if(this.number == true){
706
+          this.form.number = 1
707
+       }
708
+       if(this.number == false){
709
+         this.form.number = 2
710
+       }
711
+       if(this.mode == true){
712
+           this.form.mode = 1
713
+       }
714
+       if(this.mode == false){
715
+         this.form.mode = 2
716
+       }
717
+       if(this.dialyzers == true){
718
+          this.form.dialyzers = 1
719
+       }
720
+       if(this.dialyzers == false){
721
+          this.form.dialyzers = 2
722
+       }
723
+     
724
+       if(this.anticoagulant == true){
725
+          this.form.anticoagulant = 1
726
+       }
727
+       if(this.anticoagulant == false){
728
+         this.form.anticoagulant = 2
729
+       }
730
+       if(this.anticoagulant_zongliang == true){
731
+          this.form.anticoagulant_zongliang  = 1
732
+       }
733
+       if(this.anticoagulant_zongliang == false){
734
+          this.form.anticoagulant_zongliang = 2
735
+       }
736
+       if(this.doctor_advice == true){
737
+          this.form.doctor_advice =1
738
+       }
739
+       if(this.doctor_advice == false){
740
+          this.form.doctor_advice = 2
741
+       }
742
+       console.log("555555555",this.form.prescription_status)
743
+        var params = {
744
+          id:this.form.id,
745
+          prescription_status:this.form.prescription_status,
746
+          week:this.form.week,
747
+          name:this.form.name,
748
+          zone:this.form.zone,
749
+          classes:this.form.classes,
750
+          number:this.form.number,
751
+          mode:this.form.mode,
752
+          dialyzers:this.form.dialyzers,
753
+          perfusion_apparatus:this.form.perfusion_apparatus,
754
+          anticoagulant:this.form.anticoagulant,
755
+          anticoagulant_zongliang:this.form.anticoagulant_zongliang,
756
+          doctor_advice:this.form.doctor_advice,
757
+        }
758
+       console.log("params",params)
759
+      saveRemindPrint(params).then(response=>{
760
+          if(response.data.state == 1){
761
+             var settting = response.data.data.setting
762
+             this.$message.success("保存成功")
763
+             this.dialogVisible = false
764
+             this.getlist()
765
+          }
766
+      })
767
+    },
768
+    getlist(){
769
+      getRemindPrintList().then(response=>{
770
+         if(response.data.state == 1){
771
+            var list = response.data.data.list
772
+            console.log("list222332",list)
773
+            if(list.anticoagulant == 1){
774
+              console.log("进来22222")
775
+              this.anticoagulant = true
776
+            }
777
+            if(list.anticoagulant == 2){
778
+               this.anticoagulant = false
779
+            }
780
+            if(list.anticoagulant_zongliang == 1){
781
+              this.anticoagulant_zongliang = true
782
+            }
783
+            if(list.anticoagulant_zongliang == 2){
784
+               this.anticoagulant_zongliang = false 
785
+            }
786
+            if(list.classes == 1 ){
787
+                this.classes = true
788
+            }
789
+            if(list.classes == 2){
790
+                this.classes = false
791
+            }
792
+            if(list.dialyzers == 1){
793
+               this.dialyzers = true
794
+            }
795
+            if(list.dialyzers == 2){
796
+               this.dialyzers = false
797
+            }
798
+            if(list.doctor_advice == 1){
799
+               this.doctor_advice = true
800
+            }
801
+            if(list.doctor_advice == 2){
802
+               this.doctor_advice = false
803
+            }
804
+            if(list.name == 1){
805
+               this.name = true
806
+            }
807
+            if(list.name == 2){
808
+               this.name = false
809
+            }
810
+            if(list.number == 1){
811
+               this.number = true
812
+            }
813
+            if(list.number == 2){
814
+              this.number = false
815
+            }
816
+            if(list.perfusion_apparatus == 1){
817
+              this.perfusion_apparatus = true
818
+            }
819
+            if(list.perfusion_apparatus == 2){
820
+               this.perfusion_apparatus = false
821
+            }
822
+            if(list.prescription_status == 1){
823
+               this.prescription_status = true
824
+            }
825
+            if(list.prescription_status == 2){
826
+               this.prescription_status = false
827
+            }
828
+            if(list.week == 1){
829
+               this.week = true
830
+            } 
831
+            if(list.week == 2){
832
+               this.week = false
833
+            }
834
+            if(list.zone == 1){
835
+               this.zone = true
836
+            }
837
+            if(list.zone == 2){
838
+               this.zone = false
839
+            }
840
+            if(list.mode ==1){
841
+               this.mode = true
842
+            }
843
+            if(list.mode == 2){
844
+              this.mode = false
845
+            }
846
+            this.form.id = list.id
847
+         }
848
+      })
849
+    },
850
+    getAllZoneList(){
851
+      getAllZoneList().then(response=>{
852
+         if(response.data.state == 1){
853
+            var zonelist = response.data.data.zoneList
854
+            this.zoneList.push(...zonelist)
855
+           
856
+         }
857
+      })
442 858
     }
443 859
   },
444 860
   components: {
@@ -447,17 +863,13 @@ export default {
447 863
   created() {
448 864
     this.modeOptions = this.$store.getters.treatment_mode;
449 865
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
450
-    console.log("抗凝机", this.anticoagulants_confit);
451 866
     this.week_type = new Date().getDay();
452 867
     if (this.week_type == 0) {
453 868
       this.week_type = 7;
454 869
     }
455
-    // let params = {
456
-    //   week_type: this.week_type
457
-    // };
458
-    this.getScheduleWeekDay();
459
-    console.log("org2222222",this.$store.getters.xt_user.org.id)
460 870
     this.org_id = this.$store.getters.xt_user.org.id
871
+    this.getScheduleList()
872
+     this.getAllZoneList()
461 873
   }
462 874
 };
463 875
 </script>

+ 114 - 37
src/xt_pages/workforce/next_remind_print.vue Zobrazit soubor

@@ -25,52 +25,55 @@
25 25
             <table class="table">
26 26
               <thead>
27 27
                 <tr>
28
-                  <!-- <td :width="td_1_width">姓名</td>
29
-                  <td :width="td_1_width">分区</td>
30
-                  <td :width="td_1_width">班次</td>
31
-                  <td :width="td_1_width">机号</td>
32
-                  <td :width="td_1_width">透析模式</td>
33
-                  <td :width="td_2_width">透析器</td>
34
-                  <td :width="td_2_width">抗凝剂</td>
35
-                  <td :width="td_2_width">低分子肝素</td>
36
-                  <td :width="td_4_width">长期医嘱</td> -->
37
-                  <td width="100">姓名</td>
38
-                  <td width="70">分区</td>
39
-                  <td width="70">班次</td>
40
-                  <td width="70">机号</td>
41
-                  <td width="120">透析模式</td>
42
-                  <td width="100">透析器/灌流器</td>
43
-                  <td width="120">抗凝剂</td>
44
-                  <td width="100">总量</td>
45
-                  <td width="300">长期医嘱</td>
28
+                  <td width="100" v-if="printObj.week == 1">星期</td>
29
+                  <td width="100" v-if="printObj.name == 1">姓名</td>
30
+                  <td width="70" v-if="printObj.zone == 1">分区</td>
31
+                  <td width="70" v-if="printObj.classes == 1">班次</td>
32
+                  <td width="70" v-if="printObj.number == 1">机号</td>
33
+                  <td width="120" v-if="printObj.prescription_status == 1">透析模式</td>
34
+                  <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
35
+                  <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
36
+                  <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
37
+                  <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
46 38
                 </tr>
47 39
               </thead>
48 40
               <tbody>
49 41
               <tr v-for="(main_collection, index) in scheduleData" :key="index">
50
-                <td :width="td_1_width">{{ main_collection.patient}}</td>
51
-                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
52
-                <td :width="td_1_width">
42
+                <td :width="td_1_width" v-if="printObj.week == 1">
43
+                  <span v-if="main_collection.schedule_week == 0">周日</span>
44
+                  <span v-if="main_collection.schedule_week == 1">周一</span>
45
+                  <span v-if="main_collection.schedule_week == 2">周二</span>
46
+                  <span v-if="main_collection.schedule_week == 3">周三</span>
47
+                  <span v-if="main_collection.schedule_week == 4">周四</span>
48
+                  <span v-if="main_collection.schedule_week == 5">周五</span>
49
+                  <span v-if="main_collection.schedule_week == 6">周六</span>
50
+                </td>
51
+                <td :width="td_1_width" v-if="printObj.name == 1">{{ main_collection.patient}}</td>
52
+                <td :width="td_1_width" v-if="printObj.zone == 1">{{ main_collection.zone.name }}</td>
53
+                <td :width="td_1_width" v-if="printObj.classes == 1">
53 54
                   {{getSchedulesType(main_collection.schedule_type)}}
54 55
                 </td>
55
-                <td :width="td_1_width">
56
+                <td :width="td_1_width" v-if="printObj.number == 1">
56 57
                   {{main_collection.number.number}}
57 58
 
58 59
                 </td>
59
-                <td :width="td_1_width">
60
+                <td :width="td_1_width"  v-if="printObj.prescription_status == 1">
60 61
                   {{modeOptions[main_collection.mode_id].name}}
61 62
                 </td>
62
-                <td :width="td_1_width">
63
+                <td :width="td_1_width" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">
63 64
                   <span v-if="org_id!=9987">{{main_collection.prescription.dialyzer_perfusion_apparatus}}</span> 
64 65
                   {{main_collection.prescription.dialysis_dialyszers}} 
65 66
                   <span v-if="main_collection.prescription.dialysis_dialyszers!='' && main_collection.prescription.dialysis_irrigation!=''">/</span>
66 67
                   <span v-if="main_collection.prescription.dialysis_irrigation!=''"> {{main_collection.prescription.dialysis_irrigation}}</span>
67 68
 
68 69
                 </td>
69
-                <td :width="td_1_width">
70
+                <td :width="td_1_width" v-if="printObj.anticoagulant==1">
70 71
                   {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
71
-
72
+                  <span v-if="main_collection.prescription.antioxidant_commodity_name!=''">
73
+                    (<span>{{main_collection.prescription.antioxidant_commodity_name}}</span>)
74
+                  </span>
72 75
                 </td>
73
-                <td :width="td_1_width">
76
+                <td :width="td_1_width"  v-if="printObj.anticoagulant_zongliang == 1">
74 77
                   <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
75 78
                   <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
76 79
                   <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
@@ -79,8 +82,9 @@
79 82
                   <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
80 83
                   <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
81 84
                 </td>
82
-                <td :width="td_4_width" style="text-align:left" >
83
-                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
85
+                <td :width="td_4_width" style="text-align:left"  v-if="printObj.doctor_advice == 1">
86
+                  <span style="white-space: pre" v-if="main_collection.doctor_advice.length>0">{{getAdvice(main_collection.doctor_advice)}}</span>
87
+                  <span style="white-space: pre" v-if="main_collection.hisdoctoradviceinfo.length>0">{{getAdviceOne(main_collection.hisdoctoradviceinfo)}}</span>
84 88
                 </td>
85 89
               </tr>
86 90
               </tbody>
@@ -93,7 +97,7 @@
93 97
 </template>
94 98
 
95 99
 <script>
96
-  import { getNextScheduleWeekDay } from '@/api/schedule'
100
+  import { getNextScheduleWeekDay,getPrintList } from '@/api/schedule'
97 101
   import { parseTime } from '@/utils'
98 102
   import { uParseTime } from '@/utils/tools'
99 103
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
@@ -120,13 +124,17 @@
120 124
         start_time:moment().week(moment().week() + 1).startOf('week').unix(),
121 125
         end_time:moment().week(moment().week() + 1).endOf('week').unix(),
122 126
         org_id:0,
123
-        now_time:0
127
+        now_time:0,
128
+        zone:"",
129
+        pre_status:0,
130
+        printObj:{}
124 131
       }
125 132
     },
126 133
     components: {
127 134
       BreadCrumb
128 135
     },
129 136
     created() {
137
+     this.getPrintList()
130 138
      this.org_id = this.$store.getters.xt_user.org.id
131 139
      this.currentDate = this.getCurrentDate()
132 140
    
@@ -134,12 +142,14 @@
134 142
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
135 143
       this.week_type = this.$route.query.week_type
136 144
       this.week_time  = this.$route.query.week_time
137
-      
145
+      this.zone = this.$route.query.zone
146
+      this.pre_status = this.$route.query.prestatus
138 147
       const params = {
139 148
           week_type:this.week_type,
140 149
           week_time:this.week_time,
141 150
           start_time:this.start_time,
142 151
           end_time:this.end_time,
152
+          zone:this.zone,
143 153
         }
144 154
 
145 155
         //  const params = {
@@ -157,12 +167,37 @@
157 167
         if (resp.state == 1) {
158 168
          var scheduleData = resp.data.schedule
159 169
 
160
-         for(let i=0;i<scheduleData.length;i++){
161
-             scheduleData[i].sort = scheduleData[i].number.sort
170
+          if(this.pre_status == 0){
171
+              for(let i=0;i<scheduleData.length;i++){
172
+              scheduleData[i].sort = scheduleData[i].number.sort
173
+            }
174
+            var arr =   scheduleData.sort(this.compare('sort'))
175
+            console.log("打印",arr)
176
+            this.scheduleData = arr
177
+          }
178
+          if(this.pre_status == 1){
179
+            var newList = []
180
+            for(let i=0;i<scheduleData.length;i++){
181
+              if(scheduleData.prescription.id > 0){
182
+                 newList.push(scheduleData[i])
183
+              } 
184
+            }
185
+            var arr =   newList.sort(this.compare('sort'))
186
+            console.log("打印",arr)
187
+            this.scheduleData = arr
188
+          }
189
+
190
+          if(this.pre_status == 2){
191
+            var newList = []
192
+            for(let i=0;i<scheduleData.length;i++){
193
+              if(scheduleData.prescription.id == 0){
194
+                 newList.push(scheduleData[i])
195
+              } 
196
+            }
197
+            var arr =   newList.sort(this.compare('sort'))
198
+            console.log("打印",arr)
199
+            this.scheduleData = arr
162 200
           }
163
-          var arr = scheduleData.sort(this.compare('sort'))
164
-          console.log("打印数据",arr)
165
-          this.scheduleData = arr
166 201
         } else {
167 202
           this.$message.error(resp.msg)
168 203
         }
@@ -229,6 +264,39 @@
229 264
         }
230 265
 
231 266
       },
267
+
268
+      getAdviceOne:function(doctor_advice) {
269
+        if (doctor_advice != null) {
270
+
271
+        let name = ""
272
+        for (let i = 0; i< doctor_advice.length; i++) {
273
+
274
+          let prescribing_number = ''
275
+          let single_dose = ''
276
+          let drug_spec = ''
277
+
278
+          if (doctor_advice[i].prescribing_number > 0) {
279
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
280
+          }
281
+          if (doctor_advice[i].single_dose > 0) {
282
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
283
+          }
284
+
285
+          if (doctor_advice[i].drug_spec > 0) {
286
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
287
+          }
288
+
289
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
290
+
291
+       
292
+        }
293
+          return name
294
+
295
+
296
+        }
297
+
298
+      },
299
+
232 300
       printAction: function() {
233 301
         const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
234 302
 
@@ -318,6 +386,15 @@
318 386
           return uParseTime(val, '{y}-{m}-{d}')
319 387
          }
320 388
       },
389
+     getPrintList(){
390
+      getPrintList().then(response=>{
391
+         if(response.data.state == 1){
392
+           var list = response.data.data.list
393
+           console.log("list222222222",list)
394
+           this.printObj = list
395
+         }
396
+      })
397
+     }
321 398
     }
322 399
   }
323 400
 </script>

+ 128 - 85
src/xt_pages/workforce/remind_print.vue Zobrazit soubor

@@ -24,52 +24,55 @@
24 24
             <table class="table">
25 25
               <thead>
26 26
                 <tr>
27
-                  <!-- <td :width="td_1_width">姓名</td>
28
-                  <td :width="td_1_width">分区</td>
29
-                  <td :width="td_1_width">班次</td>
30
-                  <td :width="td_1_width">机号</td>
31
-                  <td :width="td_1_width">透析模式</td>
32
-                  <td :width="td_2_width">透析器</td>
33
-                  <td :width="td_2_width">抗凝剂</td>
34
-                  <td :width="td_2_width">低分子肝素</td>
35
-                  <td :width="td_4_width">长期医嘱</td> -->
36
-                  <td width="100">姓名</td>
37
-                  <td width="70">分区</td>
38
-                  <td width="70">班次</td>
39
-                  <td width="70">机号</td>
40
-                  <td width="120">透析模式</td>
41
-                  <td width="100">透析器/灌流器</td>
42
-                  <td width="120">抗凝剂</td>
43
-                  <td width="100">总量</td>
44
-                  <td width="300">长期医嘱</td>
27
+                  <td width="100" v-if="printObj.week == 1">星期</td>
28
+                  <td width="100" v-if="printObj.name == 1">姓名</td>
29
+                  <td width="70" v-if="printObj.zone == 1">分区</td>
30
+                  <td width="70" v-if="printObj.classes == 1">班次</td>
31
+                  <td width="70" v-if="printObj.number == 1">机号</td>
32
+                  <td width="120" v-if="printObj.prescription_status == 1">透析模式</td>
33
+                  <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
34
+                  <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
35
+                  <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
36
+                  <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
45 37
                 </tr>
46 38
               </thead>
47 39
               <tbody>
48 40
               <tr v-for="(main_collection, index) in scheduleData" :key="index">
49
-                <td :width="td_1_width">{{ main_collection.patient}}</td>
50
-                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
51
-                <td :width="td_1_width">
41
+                <td :width="td_1_width" v-if="printObj.week == 1">
42
+                  <span v-if="main_collection.schedule_week == 0">周日</span>
43
+                  <span v-if="main_collection.schedule_week == 1">周一</span>
44
+                  <span v-if="main_collection.schedule_week == 2">周二</span>
45
+                  <span v-if="main_collection.schedule_week == 3">周三</span>
46
+                  <span v-if="main_collection.schedule_week == 4">周四</span>
47
+                  <span v-if="main_collection.schedule_week == 5">周五</span>
48
+                  <span v-if="main_collection.schedule_week == 6">周六</span>
49
+                </td>
50
+                <td :width="td_1_width" v-if="printObj.name == 1">{{ main_collection.patient.name}}</td>
51
+                <td :width="td_1_width" v-if="printObj.zone == 1">{{ main_collection.zone.name }}</td>
52
+                <td :width="td_1_width" v-if="printObj.classes == 1">
52 53
                   {{getSchedulesType(main_collection.schedule_type)}}
53 54
                 </td>
54
-                <td :width="td_1_width">
55
+                <td :width="td_1_width" v-if="printObj.number == 1">
55 56
                   {{main_collection.number.number}}
56 57
 
57 58
                 </td>
58
-                <td :width="td_1_width">
59
+                <td :width="td_1_width" v-if="printObj.prescription_status == 1">
59 60
                   {{modeOptions[main_collection.mode_id].name}}
60 61
                 </td>
61
-                <td :width="td_1_width">
62
+                <td :width="td_1_width" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus ==1">
62 63
                   <span v-if="org_id!=9987">{{main_collection.prescription.dialyzer_perfusion_apparatus}}</span>
63 64
                   {{main_collection.prescription.dialysis_dialyszers}}
64 65
                   <span v-if="main_collection.prescription.dialysis_dialyszers!=''&& main_collection.prescription.dialysis_irrigation!='' ">/</span>
65 66
                   <span v-if="main_collection.prescription.dialysis_irrigation!=''">{{main_collection.prescription.dialysis_irrigation}}</span>
66 67
 
67 68
                 </td>
68
-                <td :width="td_1_width">
69
+                <td :width="td_1_width" v-if="printObj.anticoagulant == 1">
69 70
                   {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
70
-
71
+                  <span v-if="main_collection.prescription.antioxidant_commodity_name!=''">
72
+                    (<span>{{main_collection.prescription.antioxidant_commodity_name}}</span>)
73
+                  </span>
71 74
                 </td>
72
-                <td :width="td_1_width">
75
+                <td :width="td_1_width" v-if="printObj.anticoagulant_zongliang == 1">
73 76
                   <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
74 77
                   <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
75 78
                   <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
@@ -78,8 +81,9 @@
78 81
                   <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
79 82
                   <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
80 83
                 </td>
81
-                <td :width="td_4_width" style="text-align:left" >
82
-                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
84
+                <td :width="td_4_width" style="text-align:left"  v-if="printObj.doctor_advice == 1">
85
+                  <span style="white-space: pre" v-if="main_collection.doctoradvice.length>0">{{getAdvice(main_collection.doctoradvice)}}</span>
86
+                   <span style="white-space: pre" v-if="main_collection.hisdoctoradviceinfo.length>0">{{ getAdviceOne(main_collection.hisdoctoradviceinfo)}}</span>
83 87
                 </td>
84 88
               </tr>
85 89
               </tbody>
@@ -92,7 +96,7 @@
92 96
 </template>
93 97
 
94 98
 <script>
95
-  import { getScheduleWeekDay } from '@/api/schedule'
99
+  import { getScheduleList,getPrintList } from '@/api/schedule'
96 100
   import { parseTime } from '@/utils'
97 101
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
98 102
   import print from 'print-js'
@@ -115,76 +119,76 @@
115 119
         modeOptions: null,
116 120
         anticoagulants_confit:null,
117 121
         currentDate:'',
118
-        org_id:0
122
+        org_id:0,
123
+        printObj:{},
124
+        week_time:0,
125
+        zone:0,
119 126
       }
120 127
     },
121 128
     components: {
122 129
       BreadCrumb
123 130
     },
124 131
     created() {
125
-     this.org_id = this.$store.getters.xt_user.org.id
132
+      this.getPrintList()
133
+      this.org_id = this.$store.getters.xt_user.org.id
126 134
     //  this.currentDate = this.getCurrentDate()
127 135
       this.modeOptions = this.$store.getters.treatment_mode
128 136
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
129 137
       this.week_type = this.$route.query.week_type
130 138
       this.week_time  = this.$route.query.week_time
131
-
139
+      this.zone = this.$route.query.zone
132 140
       const params = {
133 141
           week_type:this.week_type,
134 142
           week_time:this.week_time,
143
+          zone:this.zone,
135 144
         }
136 145
        console.log("params",params)
137
-      getScheduleWeekDay(params).then(rs => {
138
-        var resp = rs.data
139
-        console.log(resp)
140
-        
141
-        if (resp.state == 1) {
142
-          var scheduleData = resp.data.schdules
143
-          let a = resp.data.day
144
-          console.log("a",a)
145
-          var myDate = new Date(a);
146
-          var year = myDate.getFullYear(); //年
147
-          var month = myDate.getMonth() + 1; //月
148
-          var day = myDate.getDate(); //日
149
-          var days = myDate.getDay();
150
-          switch(days) {
151
-          case 1:
152
-            days = '星期一';
153
-            break;
154
-          case 2:
155
-            days = '星期二';
156
-            break;
157
-          case 3:
158
-            days = '星期三';
159
-            break;
160
-          case 4:
161
-            days = '星期四';
162
-            break;
163
-          case 5:
164
-            days = '星期五';
165
-            break;
166
-          case 6:
167
-            days = '星期六';
168
-            break;
169
-          case 0:
170
-            days = '星期日';
171
-            break;
172
-        }
173
-        var str = year + "年" + month + "月" + day + "日  " + days;
174
-        this.currentDate = str
175
-           console.log("树",scheduleData)
176
-          for(let i=0;i<scheduleData.length;i++){
177
-             scheduleData[i].sort = scheduleData[i].number.sort
146
+       getScheduleList(params).then(response=>{
147
+         if(response.data.state ==1){
148
+           var list = response.data.data.list
149
+           for(let i=0;i<list.length;i++){
150
+              list[i].sort = list[i].number.sort
151
+           }
152
+           var arr = list.sort(this.compare('sort'))
153
+            
154
+             this.scheduleData = arr
155
+            
156
+             let a = response.data.data.day
157
+              console.log("a",a)
158
+              var myDate = new Date(a);
159
+              var year = myDate.getFullYear(); //年
160
+              var month = myDate.getMonth() + 1; //月
161
+              var day = myDate.getDate(); //日
162
+              var days = myDate.getDay();
163
+              switch(days) {
164
+              case 1:
165
+                days = '星期一';
166
+                break;
167
+              case 2:
168
+                days = '星期二';
169
+                break;
170
+              case 3:
171
+                days = '星期三';
172
+                break;
173
+              case 4:
174
+                days = '星期四';
175
+                break;
176
+              case 5:
177
+                days = '星期五';
178
+                break;
179
+              case 6:
180
+                days = '星期六';
181
+                break;
182
+              case 0:
183
+                days = '星期日';
184
+                break;
178 185
           }
179
-          var arr = scheduleData.sort(this.compare('sort'))
180
-          console.log("打印数据",arr)
181
-          this.scheduleData = arr
182
-        } else {
183
-          this.$message.error(resp.msg)
184
-        }
185
-      }).catch(err => {
186
-        this.$message.error(err)
187
-      })
186
+          var str = year + "年" + month + "月" + day + "日  " + days;
187
+          this.currentDate = str
188
+          }
189
+       })
190
+       
191
+      
188 192
     },
189 193
     methods: {
190 194
       getAdvice:function(doctor_advice) {
@@ -241,6 +245,38 @@
241 245
         }
242 246
 
243 247
       },
248
+      getAdviceOne:function(doctor_advice) {
249
+        if (doctor_advice != null) {
250
+
251
+        let name = ""
252
+        for (let i = 0; i< doctor_advice.length; i++) {
253
+
254
+          let prescribing_number = ''
255
+          let single_dose = ''
256
+          let drug_spec = ''
257
+
258
+          if (doctor_advice[i].prescribing_number > 0) {
259
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
260
+          }
261
+          if (doctor_advice[i].single_dose > 0) {
262
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
263
+          }
264
+
265
+          if (doctor_advice[i].drug_spec > 0) {
266
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
267
+          }
268
+
269
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
270
+
271
+        
272
+        }
273
+          return name
274
+
275
+
276
+        }
277
+
278
+      },
279
+     
244 280
       printAction: function() {
245 281
         const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
246 282
 
@@ -320,8 +356,15 @@
320 356
             return value1 - value2;
321 357
         }
322 358
       },
323
-    }
324
-
359
+     getPrintList(){
360
+      getPrintList().then(response=>{
361
+         if(response.data.state == 1){
362
+           var list = response.data.data.list
363
+           this.printObj = list
364
+         }
365
+      })
366
+     }
367
+    },
325 368
   }
326 369
 </script>
327 370
 

+ 378 - 2
src/xt_pages/workforce/remind_print_setting.vue Zobrazit soubor

@@ -1,3 +1,379 @@
1
-<div class="main-contain">
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="table_panel">
21
+            <div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
22
+              <div class="signPrint">
23
+                <div>分区/床位号:{{main_collection.zone.name}}/{{main_collection.number.number}}</div> 
24
+                <div>姓名:{{main_collection.patient.name}}</div> 
25
+                <div>抗凝剂: {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}} </div> 
26
+                <div>总量:  
27
+                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
28
+                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
29
+                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
30
+                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
31
+                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
32
+                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
33
+                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
34
+                </div> 
35
+                <div>用法:透析备用</div> 
36
+                <div>打印时间:{{currentDate}}</div>
37
+              </div>
38
+           </div>
39
+          </div>
40
+        </div>
41
+      </div>
42
+    </div>
43
+  </div>
44
+</template>
45
+
46
+<script>
47
+  import { getScheduleList,getPrintList } from '@/api/schedule'
48
+  import { parseTime } from '@/utils'
49
+  import { uParseTime } from '@/utils/tools'
50
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
51
+  import print from 'print-js'
52
+  const moment = require('moment') 
53
+  export default {
54
+    name: 'SchedulePrint',
55
+    data() {
56
+      return {
57
+        crumbs: [
58
+          { path: false, name: '排班提醒' },
59
+          { path: false, name: '排班提醒打印' }
60
+        ],
61
+        scheduleData:[],
62
+        week_type: 0,
63
+        day:'',
64
+        td_1_width: '10%',
65
+        td_2_width: '10%',
66
+        td_3_width: '25%',
67
+        td_4_width: '45%',
68
+        modeOptions: null,
69
+        anticoagulants_confit:null,
70
+        currentDate:'',
71
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
72
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
73
+        org_id:0,
74
+        now_time:0,
75
+        zone:"",
76
+        pre_status:0,
77
+        printObj:{}
78
+      }
79
+    },
80
+    components: {
81
+      BreadCrumb
82
+    },
83
+    created() {
84
+     this.getPrintList()
85
+     this.org_id = this.$store.getters.xt_user.org.id
86
+     this.currentDate = this.getCurrentDate()
2 87
    
3
-</div>
88
+      this.modeOptions = this.$store.getters.treatment_mode
89
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
90
+      this.week_type = this.$route.query.week_type
91
+      this.week_time  = this.$route.query.week_time
92
+      this.zone = this.$route.query.zone
93
+      this.pre_status = this.$route.query.prestatus
94
+     const params = {
95
+          week_type:this.week_type,
96
+          week_time:this.week_time,
97
+          zone:this.zone,
98
+        }
99
+       console.log("params",params)
100
+       getScheduleList(params).then(response=>{
101
+         if(response.data.state ==1){
102
+           var list = response.data.data.list
103
+           for(let i=0;i<list.length;i++){
104
+              list[i].sort = list[i].number.sort
105
+           }
106
+           var arr = list.sort(this.compare('sort'))
107
+            
108
+             this.scheduleData = arr
109
+            
110
+             let a = response.data.data.day
111
+              console.log("a",a)
112
+              var myDate = new Date(a);
113
+              var year = myDate.getFullYear(); //年
114
+              var month = myDate.getMonth() + 1; //月
115
+              var day = myDate.getDate(); //日
116
+              var days = myDate.getDay();
117
+              switch(days) {
118
+              case 1:
119
+                days = '星期一';
120
+                break;
121
+              case 2:
122
+                days = '星期二';
123
+                break;
124
+              case 3:
125
+                days = '星期三';
126
+                break;
127
+              case 4:
128
+                days = '星期四';
129
+                break;
130
+              case 5:
131
+                days = '星期五';
132
+                break;
133
+              case 6:
134
+                days = '星期六';
135
+                break;
136
+              case 0:
137
+                days = '星期日';
138
+                break;
139
+          }
140
+          var str = year + "年" + month + "月" + day + "日  " + days;
141
+          this.currentDate = str
142
+          }
143
+       })
144
+
145
+      var now_time = parseInt(this.week_type) * 86400 + this.start_time
146
+      console.log("now",now_time)
147
+      this.now_time = now_time
148
+    },
149
+    methods: {
150
+      getAdvice:function(doctor_advice) {
151
+        if (doctor_advice != null) {
152
+
153
+        let name = ""
154
+        for (let i = 0; i< doctor_advice.length; i++) {
155
+
156
+          let prescribing_number = ''
157
+          let single_dose = ''
158
+          let drug_spec = ''
159
+
160
+          if (doctor_advice[i].prescribing_number > 0) {
161
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
162
+          }
163
+          if (doctor_advice[i].single_dose > 0) {
164
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
165
+          }
166
+
167
+          if (doctor_advice[i].drug_spec > 0) {
168
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
169
+          }
170
+
171
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
172
+
173
+          if (doctor_advice[i].child.length > 0) {
174
+
175
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
176
+
177
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
178
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
179
+              } else {
180
+                doctor_advice[i].child[a]['presc'] = ''
181
+              }
182
+
183
+              if (doctor_advice[i].child[a].single_dose > 0) {
184
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
185
+              } else {
186
+                doctor_advice[i].child[a]['single'] = ''
187
+              }
188
+
189
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
190
+                + doctor_advice[i].child[a].advice_desc
191
+                + doctor_advice[i].child[a].drug_spec_unit
192
+                + doctor_advice[i].child[a].presc
193
+                + doctor_advice[i].child[a].single + "\n"
194
+            }
195
+
196
+          }
197
+        }
198
+          return name
199
+
200
+
201
+        }
202
+
203
+      },
204
+      printAction: function() {
205
+        const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
206
+
207
+        printJS({
208
+          printable: 'print_content',
209
+          type: 'html',
210
+          documentTitle: '  ',
211
+          style: style,
212
+          scanStyles: false
213
+        })
214
+      }, getSchedulesType: function(type) {
215
+        let type_name = ''
216
+        switch (type) {
217
+          case 1:
218
+            type_name = '上午'
219
+            break
220
+          case 2:
221
+            type_name = '下午'
222
+            break
223
+          case 3:
224
+            type_name = '晚上'
225
+            break
226
+        }
227
+        return type_name
228
+      },
229
+      getCurrentDate: function () {
230
+        console.log(this.$route.query.week_type)
231
+        var myDate = new Date();
232
+        var year = myDate.getFullYear(); //年
233
+        var month = myDate.getMonth() + 1; //月
234
+        var day = myDate.getDate() + 7; //日
235
+        var newday = myDate.getDay();
236
+        var days = parseInt(this.$route.query.week_type);
237
+        var dayNum = parseInt(this.$route.query.week_type);
238
+        switch(days) {
239
+          case 1:
240
+            days = '星期一';
241
+            break;
242
+          case 2:
243
+            days = '星期二';
244
+            break;
245
+          case 3:
246
+            days = '星期三';
247
+            break;
248
+          case 4:
249
+            days = '星期四';
250
+            break;
251
+          case 5:
252
+            days = '星期五';
253
+            break;
254
+          case 6:
255
+            days = '星期六';
256
+            break;
257
+          case 7:
258
+            days = '星期日';
259
+            break;
260
+        }
261
+        if(newday > dayNum){
262
+          let lastDay = day - (newday - dayNum)
263
+          console.log("lastDay1",lastDay)
264
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
265
+          return str;
266
+        }else if(newday < dayNum){
267
+          let lastDay = day + (dayNum - newday)
268
+          console.log("lastDay2",lastDay)
269
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
270
+          return str;
271
+        }else{
272
+          var str = year + "年" + month + "月" + day + "日  " + days;
273
+          return str;
274
+        }
275
+        
276
+        
277
+      },
278
+
279
+       compare(property) {
280
+       return function (a, b) {
281
+          var value1 = a[property];
282
+          var value2 = b[property];
283
+          return value1 - value2;
284
+      }
285
+     },
286
+     getTime(val) {
287
+         if(val == ""){
288
+          return ""
289
+         }else {
290
+          return uParseTime(val, '{y}-{m}-{d}')
291
+         }
292
+      },
293
+     getPrintList(){
294
+      getPrintList().then(response=>{
295
+         if(response.data.state == 1){
296
+           var list = response.data.data.list
297
+           console.log("list222222222",list)
298
+           this.printObj = list
299
+         }
300
+      })
301
+     }
302
+    }
303
+  }
304
+</script>
305
+
306
+<style rel="stylesheet/scss" lang="scss" scoped>
307
+.print_main_content {
308
+  background-color: white;
309
+  max-width: 1500px;
310
+  margin: 0 auto;
311
+  padding: 0 0 20px 0;
312
+
313
+  .order_title_panl {
314
+    text-align: center;
315
+
316
+    .main_title {
317
+      font-size: 18px;
318
+      line-height: 40px;
319
+      font-weight: 500;
320
+    }
321
+  }
322
+  .table_panel {
323
+    .table {
324
+      width: 100%;
325
+      border: 1px solid;
326
+      border-collapse: collapse;
327
+      padding: 2px;
328
+
329
+      thead {
330
+        tr {
331
+          td {
332
+            border: 1px solid;
333
+            text-align: center;
334
+            font-size: 20px;
335
+            padding: 15px 5px;
336
+          }
337
+        }
338
+      }
339
+      tbody {
340
+        tr {
341
+          td {
342
+            border: 1px solid;
343
+            text-align: center;
344
+            font-size: 18px;
345
+            padding: 10px 5px;
346
+
347
+            .proj {
348
+              padding: 5px 0;
349
+              text-align: left;
350
+
351
+              .proj_title {
352
+                font-size: 16px;
353
+                font-weight: 500;
354
+                line-height: 25px;
355
+              }
356
+
357
+              .proj_item {
358
+                font-size: 15px;
359
+                line-height: 20px;
360
+
361
+                .zone_name {
362
+                  font-weight: 500;
363
+                }
364
+              }
365
+            }
366
+          }
367
+        }
368
+      }
369
+    }
370
+  }
371
+}
372
+.signPrint{
373
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
374
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
375
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
376
+  margin-bottom: 20px;
377
+  padding: 20px 10px;
378
+}
379
+</style>

+ 622 - 0
src/xt_pages/workforce/scheduleTablePrint.vue Zobrazit soubor

@@ -0,0 +1,622 @@
1
+<template>
2
+    <div>
3
+        <el-button type="primary" @click="printAction">打印</el-button>
4
+        <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5
+            <tr>
6
+                <td rowspan="2">分区</td>
7
+                <td rowspan="2">机号</td>
8
+                <td colspan="3">周一({{ weekTitle[0] }})</td>
9
+                <td colspan="3">周二({{ weekTitle[1] }})</td>
10
+                <td colspan="3">周三({{ weekTitle[2] }})</td>
11
+                <td colspan="3">周四({{ weekTitle[3] }})</td>
12
+                <td colspan="3">周五({{ weekTitle[4] }})</td>
13
+                <td colspan="3">周六({{ weekTitle[5] }})</td>
14
+                <td colspan="3">周日({{ weekTitle[6] }})</td>
15
+            </tr>
16
+            <tr>
17
+                <td>上午</td>
18
+                <td>下午</td>
19
+                <td>晚上</td>
20
+                <td>上午</td>
21
+                <td>下午</td>
22
+                <td>晚上</td>
23
+                <td>上午</td>
24
+                <td>下午</td>
25
+                <td>晚上</td>
26
+                <td>上午</td>
27
+                <td>下午</td>
28
+                <td>晚上</td>
29
+                <td>上午</td>
30
+                <td>下午</td>
31
+                <td>晚上</td>
32
+                <td>上午</td>
33
+                <td>下午</td>
34
+                <td>晚上</td>
35
+                <td>上午</td>
36
+                <td>下午</td>
37
+                <td>晚上</td>
38
+            </tr>
39
+            <tr v-for="(item,index) in scheduleZone" :key="index">
40
+                <td style="min-width:50px;">{{ item.area }}</td>
41
+                <td style="min-width:50px;">{{ item.cut }}</td>
42
+                <td style="min-width:50px;">
43
+                    <span v-if="item.Mon_M.patient_id">
44
+                        <div>{{ item.Mon_M.patient }}</div>
45
+                        <div v-if="item.Mon_M.mode_name != 'HD'">{{ item.Mon_M.mode_name }}</div>
46
+                    </span>
47
+                </td>
48
+                <td style="min-width:50px;">
49
+                    <span v-if="item.Mon_A.patient_id">
50
+                        <div>{{ item.Mon_A.patient }}</div>
51
+                        <div v-if="item.Mon_A.mode_name != 'HD'">{{ item.Mon_A.mode_name }}</div>
52
+                    </span>
53
+                </td>
54
+                <td style="min-width:50px;">
55
+                    <span v-if="item.Mon_N.patient_id">
56
+                        <div>{{ item.Mon_N.patient }}</div>
57
+                        <div v-if="item.Mon_N.mode_name != 'HD'">{{ item.Mon_N.mode_name }}</div>
58
+                    </span>
59
+                </td>
60
+                <td style="min-width:50px;">
61
+                    <span v-if="item.Tue_M.patient_id">
62
+                        <div>{{ item.Tue_M.patient }}</div>
63
+                        <div v-if="item.Tue_M.mode_name != 'HD'">{{ item.Tue_M.mode_name }}</div>
64
+                    </span>
65
+                </td>
66
+                <td style="min-width:50px;">
67
+                    <span v-if="item.Tue_A.patient_id">
68
+                        <div>{{ item.Tue_A.patient }}</div>
69
+                        <div v-if="item.Tue_A.mode_name != 'HD'">{{ item.Tue_A.mode_name }}</div>
70
+                    </span>
71
+                </td>
72
+                <td style="min-width:50px;">
73
+                    <span v-if="item.Tue_N.patient_id">
74
+                        <div>{{ item.Tue_N.patient }}</div>
75
+                        <div v-if="item.Tue_N.mode_name != 'HD'">{{ item.Tue_N.mode_name }}</div>
76
+                    </span>
77
+                </td>
78
+                <td style="min-width:50px;">
79
+                    <span v-if="item.Wed_M.patient_id">
80
+                        <div>{{ item.Wed_M.patient }}</div>
81
+                        <div v-if="item.Wed_M.mode_name != 'HD'">{{ item.Wed_M.mode_name }}</div>
82
+                    </span>
83
+                </td>
84
+                <td style="min-width:50px;">
85
+                    <span v-if="item.Wed_A.patient_id">
86
+                        <div>{{ item.Wed_A.patient }}</div>
87
+                        <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
88
+                    </span>
89
+                </td>
90
+                <td style="min-width:50px;"> 
91
+                    <span v-if="item.Wed_N.patient_id">
92
+                        <div>{{ item.Wed_N.patient }}</div>
93
+                        <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
94
+                    </span>
95
+                </td>
96
+                <td style="min-width:50px;">
97
+                    <span v-if="item.Thurs_M.patient_id">
98
+                        <div>{{ item.Thurs_M.patient }}</div>
99
+                        <div v-if="item.Thurs_M.mode_name != 'HD'">{{ item.Thurs_M.mode_name }}</div>
100
+                    </span>
101
+                </td>
102
+                <td style="min-width:50px;">
103
+                    <span v-if="item.Thurs_A.patient_id">
104
+                        <div>{{ item.Thurs_A.patient }}</div>
105
+                        <div v-if="item.Thurs_A.mode_name != 'HD'">{{ item.Thurs_A.mode_name }}</div>
106
+                    </span>
107
+                </td>
108
+                <td style="min-width:50px;">
109
+                    <span v-if="item.Thurs_N.patient_id">
110
+                        <div>{{ item.Thurs_N.patient }}</div>
111
+                        <div v-if="item.Thurs_N.mode_name != 'HD'">{{ item.Thurs_N.mode_name }}</div>
112
+                    </span>
113
+                </td>
114
+                <td style="min-width:50px;">
115
+                    <span v-if="item.Fri_M.patient_id">
116
+                        <div>{{ item.Fri_M.patient }}</div>
117
+                        <div v-if="item.Fri_M.mode_name != 'HD'">{{ item.Fri_M.mode_name }}</div>
118
+                    </span>
119
+                </td>
120
+                <td style="min-width:50px;">
121
+                    <span v-if="item.Fri_A.patient_id">
122
+                        <div>{{ item.Fri_A.patient }}</div>
123
+                        <div v-if="item.Fri_A.mode_name != 'HD'">{{ item.Fri_A.mode_name }}</div>
124
+                    </span>
125
+                </td>
126
+                <td style="min-width:50px;">
127
+                    <span v-if="item.Fri_N.patient_id">
128
+                        <div>{{ item.Fri_N.patient }}</div>
129
+                        <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
130
+                    </span>
131
+                </td>
132
+                <td style="min-width:50px;">
133
+                    <span v-if="item.Sat_M.patient_id">
134
+                        <div>{{ item.Sat_M.patient }}</div>
135
+                        <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
136
+                    </span>
137
+                </td>
138
+                <td style="min-width:50px;">
139
+                    <span v-if="item.Sat_A.patient_id">
140
+                        <div>{{ item.Sat_A.patient }}</div>
141
+                        <div v-if="item.Sat_A.mode_name != 'HD'">{{ item.Sat_A.mode_name }}</div>
142
+                    </span>
143
+                </td>
144
+                <td style="min-width:50px;">
145
+                    <span v-if="item.Sat_N.patient_id">
146
+                        <div>{{ item.Sat_N.patient }}</div>
147
+                        <div v-if="item.Sat_N.mode_name != 'HD'">{{ item.Sat_N.mode_name }}</div>
148
+                    </span>
149
+                </td>
150
+                <td style="min-width:50px;">
151
+                    <span v-if="item.Sun_M.patient_id">
152
+                        <div>{{ item.Sun_M.patient }}</div>
153
+                        <div v-if="item.Sun_M.mode_name != 'HD'">{{ item.Sun_M.mode_name }}</div>
154
+                    </span>
155
+                </td>
156
+                <td style="min-width:50px;">
157
+                    <span v-if="item.Sun_A.patient_id">
158
+                        <div>{{ item.Sun_A.patient }}</div>
159
+                        <div v-if="item.Sun_A.mode_name != 'HD'">{{ item.Sun_A.mode_name }}</div>
160
+                    </span>
161
+                </td>
162
+                <td style="min-width:50px;">
163
+                    <span v-if="item.Sun_N.patient_id">
164
+                        <div>{{ item.Sun_N.patient }}</div>
165
+                        <div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }}</div>
166
+                    </span>
167
+                </td>
168
+            </tr>
169
+        </table>
170
+    </div>
171
+</template>
172
+
173
+
174
+
175
+<script>
176
+import {getSchedules,getWeekPanels} from "@/api/schedule";
177
+import print from 'print-js'
178
+export default {
179
+    props:{
180
+        scheduleZoneProp: {
181
+            type: Array,
182
+            dafault: []
183
+        },
184
+    },
185
+    data(){
186
+        return{
187
+            schedule_type:'',
188
+            partition_id:'',
189
+            theType:2,
190
+            scheduleZone:[],
191
+            weekTitle:[],
192
+            scheduleZoneRow: [],
193
+            partitions: {},
194
+        }
195
+    },
196
+    created(){
197
+        this.modeOptions = this.$store.getters.treatment_mode;
198
+        this.getWeekPanels()
199
+        
200
+    },
201
+    methods:{
202
+        getWeekPanels() {
203
+            // this.scheduleZoneRow = []
204
+            // this.scheduleZone = []
205
+            getWeekPanels(1,this.partition_id).then(response => {
206
+                if (response.data.state == 0) {
207
+                    return false
208
+                }
209
+                var partitions = response.data.data.partitions
210
+                console.log("分区",partitions)
211
+                // this.theWeek.thisWeek = response.data.data.theWeek
212
+                // this.theWeek.lastWeek = this.theWeek.thisWeek - 1
213
+                // this.theWeek.nextWeek = this.theWeek.thisWeek + 1
214
+                // this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
215
+                // 在控制变量改变的时候进行 强制渲染更新
216
+                // let childrenRefs = this.$refs.elTabs.$children
217
+                // this.$nextTick(() => {
218
+                //     childrenRefs.forEach(child => child.$forceUpdate())
219
+                // })
220
+
221
+                var that = this
222
+                if (partitions.length > 0) {
223
+                    partitions.forEach(function(partition) {
224
+                        if (partition.jihaos.length == 0) {
225
+                            return false
226
+                        }
227
+                        that.scheduleZoneRow.push(partition.jihaos.length)
228
+                        that.partitions[partition.id] = partition
229
+                        partition.jihaos.forEach(function(jihao) {
230
+                            var thisPa = {
231
+                            area: partition.name,
232
+                            zone_id: partition.id,
233
+                            zone_type: partition.type,
234
+                            cut: jihao.number,
235
+                            jihao_id: jihao.id,
236
+                            Mon_M: {
237
+                                schedule_id: 0,
238
+                                mode_id: 0,
239
+                                mode_name: '',
240
+                                patient_id: 0,
241
+                                patient: ''
242
+                            },
243
+                            Mon_A: {
244
+                                schedule_id: 0,
245
+                                mode_id: 0,
246
+                                mode_name: '',
247
+                                patient_id: 0,
248
+                                patient: ''
249
+                            },
250
+                            Mon_N: {
251
+                                schedule_id: 0,
252
+                                mode_id: 0,
253
+                                mode_name: '',
254
+                                patient_id: 0,
255
+                                patient: ''
256
+                            },
257
+                            Tue_M: {
258
+                                schedule_id: 0,
259
+                                mode_id: 0,
260
+                                mode_name: '',
261
+                                patient_id: 0,
262
+                                patient: ''
263
+                            },
264
+                            Tue_A: {
265
+                                schedule_id: 0,
266
+                                mode_id: 0,
267
+                                mode_name: '',
268
+                                patient_id: 0,
269
+                                patient: ''
270
+                            },
271
+                            Tue_N: {
272
+                                schedule_id: 0,
273
+                                mode_id: 0,
274
+                                mode_name: '',
275
+                                patient_id: 0,
276
+                                patient: ''
277
+                            },
278
+                            Wed_M: {
279
+                                schedule_id: 0,
280
+                                mode_id: 0,
281
+                                mode_name: '',
282
+                                patient_id: 0,
283
+                                patient: ''
284
+                            },
285
+                            Wed_A: {
286
+                                schedule_id: 0,
287
+                                mode_id: 0,
288
+                                mode_name: '',
289
+                                patient_id: 0,
290
+                                patient: ''
291
+                            },
292
+                            Wed_N: {
293
+                                schedule_id: 0,
294
+                                mode_id: 0,
295
+                                mode_name: '',
296
+                                patient_id: 0,
297
+                                patient: ''
298
+                            },
299
+                            Thurs_M: {
300
+                                schedule_id: 0,
301
+                                mode_id: 0,
302
+                                mode_name: '',
303
+                                patient_id: 0,
304
+                                patient: ''
305
+                            },
306
+                            Thurs_A: {
307
+                                schedule_id: 0,
308
+                                mode_id: 0,
309
+                                mode_name: '',
310
+                                patient_id: 0,
311
+                                patient: ''
312
+                            },
313
+                            Thurs_N: {
314
+                                schedule_id: 0,
315
+                                mode_id: 0,
316
+                                mode_name: '',
317
+                                patient_id: 0,
318
+                                patient: ''
319
+                            },
320
+                            Fri_M: {
321
+                                schedule_id: 0,
322
+                                mode_id: 0,
323
+                                mode_name: '',
324
+                                patient_id: 0,
325
+                                patient: ''
326
+                            },
327
+                            Fri_A: {
328
+                                schedule_id: 0,
329
+                                mode_id: 0,
330
+                                mode_name: '',
331
+                                patient_id: 0,
332
+                                patient: ''
333
+                            },
334
+                            Fri_N: {
335
+                                schedule_id: 0,
336
+                                mode_id: 0,
337
+                                mode_name: '',
338
+                                patient_id: 0,
339
+                                patient: ''
340
+                            },
341
+                            Sat_M: {
342
+                                schedule_id: 0,
343
+                                mode_id: 0,
344
+                                mode_name: '',
345
+                                patient_id: 0,
346
+                                patient: ''
347
+                            },
348
+                            Sat_A: {
349
+                                schedule_id: 0,
350
+                                mode_id: 0,
351
+                                mode_name: '',
352
+                                patient_id: 0,
353
+                                patient: ''
354
+                            },
355
+                            Sat_N: {
356
+                                schedule_id: 0,
357
+                                mode_id: 0,
358
+                                mode_name: '',
359
+                                patient_id: 0,
360
+                                patient: ''
361
+                            },
362
+                            Sun_A: {
363
+                                schedule_id: 0,
364
+                                mode_id: 0,
365
+                                mode_name: '',
366
+                                patient_id: 0,
367
+                                patient: ''
368
+                            },
369
+                            Sun_N: {
370
+                                schedule_id: 0,
371
+                                mode_id: 0,
372
+                                mode_name: '',
373
+                                patient_id: 0,
374
+                                patient: ''
375
+                            },
376
+                            Sun_M: {
377
+                                schedule_id: 0,
378
+                                mode_id: 0,
379
+                                mode_name: '',
380
+                                patient_id: 0,
381
+                                patient: ''
382
+                            },
383
+                            total: 0
384
+                            }
385
+                            that.scheduleZone.push(thisPa)
386
+
387
+                        })
388
+                    })
389
+                }
390
+                this.getSchedules()
391
+            })
392
+        },
393
+        getSchedules() {
394
+            const params = {
395
+                weekTime:this.theType,
396
+                partition_id:this.partition_id,
397
+                schedule_type:this.schedule_type,
398
+            }
399
+            getSchedules(params).then(response => {
400
+                if (response.data.state == 1) {
401
+                    this.weekTitle = response.data.data.weekTitle;
402
+                    this.weekDays = response.data.data.days;
403
+                    this.toDay = response.data.data.today;
404
+                    var theSchedules = response.data.data.schdules;
405
+                    
406
+                    
407
+                    
408
+                    var that = this;
409
+                    that.scheduleZone.forEach(function(zone, index) {
410
+                        
411
+                        that.scheduleZone[index].Mon_M = {
412
+                            mode_id: 0,
413
+                            mode_name: "",
414
+                            patient_id: 0,
415
+                            patient: ""
416
+                        };
417
+                        that.scheduleZone[index].Mon_A = {
418
+                            mode_id: 0,
419
+                            mode_name: "",
420
+                            patient_id: 0,
421
+                            patient: ""
422
+                        };
423
+                        that.scheduleZone[index].Mon_N = {
424
+                            mode_id: 0,
425
+                            mode_name: "",
426
+                            patient_id: 0,
427
+                            patient: ""
428
+                        };
429
+                        that.scheduleZone[index].Tue_M = {
430
+                            mode_id: 0,
431
+                            mode_name: "",
432
+                            patient_id: 0,
433
+                            patient: ""
434
+                        };
435
+                        that.scheduleZone[index].Tue_A = {
436
+                            mode_id: 0,
437
+                            mode_name: "",
438
+                            patient_id: 0,
439
+                            patient: ""
440
+                        };
441
+                        that.scheduleZone[index].Tue_N = {
442
+                            mode_id: 0,
443
+                            mode_name: "",
444
+                            patient_id: 0,
445
+                            patient: ""
446
+                        };
447
+                        that.scheduleZone[index].Wed_M = {
448
+                            mode_id: 0,
449
+                            mode_name: "",
450
+                            patient_id: 0,
451
+                            patient: ""
452
+                        };
453
+                        that.scheduleZone[index].Wed_A = {
454
+                            mode_id: 0,
455
+                            mode_name: "",
456
+                            patient_id: 0,
457
+                            patient: ""
458
+                        };
459
+                        that.scheduleZone[index].Wed_N = {
460
+                            mode_id: 0,
461
+                            mode_name: "",
462
+                            patient_id: 0,
463
+                            patient: ""
464
+                        };
465
+                        that.scheduleZone[index].Thurs_M = {
466
+                            mode_id: 0,
467
+                            mode_name: "",
468
+                            patient_id: 0,
469
+                            patient: ""
470
+                        };
471
+                        that.scheduleZone[index].Thurs_A = {
472
+                            mode_id: 0,
473
+                            mode_name: "",
474
+                            patient_id: 0,
475
+                            patient: ""
476
+                        };
477
+                        that.scheduleZone[index].Thurs_N = {
478
+                            mode_id: 0,
479
+                            mode_name: "",
480
+                            patient_id: 0,
481
+                            patient: ""
482
+                        };
483
+                        that.scheduleZone[index].Fri_M = {
484
+                            mode_id: 0,
485
+                            mode_name: "",
486
+                            patient_id: 0,
487
+                            patient: ""
488
+                        };
489
+                        that.scheduleZone[index].Fri_A = {
490
+                            mode_id: 0,
491
+                            mode_name: "",
492
+                            patient_id: 0,
493
+                            patient: ""
494
+                        };
495
+                        that.scheduleZone[index].Fri_N = {
496
+                            mode_id: 0,
497
+                            mode_name: "",
498
+                            patient_id: 0,
499
+                            patient: ""
500
+                        };
501
+                        that.scheduleZone[index].Sat_M = {
502
+                            mode_id: 0,
503
+                            mode_name: "",
504
+                            patient_id: 0,
505
+                            patient: ""
506
+                        };
507
+                        that.scheduleZone[index].Sat_A = {
508
+                            mode_id: 0,
509
+                            mode_name: "",
510
+                            patient_id: 0,
511
+                            patient: ""
512
+                        };
513
+                        that.scheduleZone[index].Sat_N = {
514
+                            mode_id: 0,
515
+                            mode_name: "",
516
+                            patient_id: 0,
517
+                            patient: ""
518
+                        };
519
+                        that.scheduleZone[index].Sun_A = {
520
+                            mode_id: 0,
521
+                            mode_name: "",
522
+                            patient_id: 0,
523
+                            patient: ""
524
+                        };
525
+                        that.scheduleZone[index].Sun_N = {
526
+                            mode_id: 0,
527
+                            mode_name: "",
528
+                            patient_id: 0,
529
+                            patient: ""
530
+                        };
531
+                        that.scheduleZone[index].Sun_M = {
532
+                            mode_id: 0,
533
+                            mode_name: "",
534
+                            patient_id: 0,
535
+                            patient: ""
536
+                        };
537
+                        that.scheduleZone[index].total = 0;
538
+                        
539
+                        if (response.data.data.schdules.length > 0) {
540
+                            theSchedules.forEach(function(schedule, sindex) {
541
+
542
+                                if (zone.jihao_id == schedule.bed_id) {
543
+                                    // if(zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
544
+                                    var weekPath = that.weekPath(
545
+                                        schedule.schedule_week,
546
+                                        schedule.schedule_type
547
+                                    );
548
+
549
+                                    if (weekPath.length == 2) {
550
+                                        // console.log(schedule);
551
+
552
+                                        var weekPathKey = weekPath[0] + "_" + weekPath[1];
553
+                                        that.scheduleZone[index][weekPathKey] = {
554
+                                        schedule_id: schedule.id,
555
+                                        mode_id: schedule.mode_id,
556
+                                        patient_id: schedule.patient_id,
557
+                                        patient: schedule.patient,
558
+                                        patient_contagions: schedule.patient_contagions,
559
+                                        mode_name:
560
+                                            typeof that.modeOptions[schedule.mode_id] ===
561
+                                            "undefined"
562
+                                            ? ""
563
+                                            : that.modeOptions[schedule.mode_id].name
564
+                                        };
565
+                                        that.scheduleZone[index].total += 1;
566
+                                        
567
+                                    }
568
+                                    
569
+                                }
570
+                                
571
+                            });
572
+                        }
573
+                        console.log('that.scheduleZone',that.scheduleZone)
574
+                    });
575
+                    
576
+                } else {
577
+                    this.$message.error("网络错误");
578
+                    return false;
579
+                }
580
+            });
581
+        },
582
+        weekPath(week, schedule_type) {
583
+            var weekArr = {
584
+                1: "Mon",
585
+                2: "Tue",
586
+                3: "Wed",
587
+                4: "Thurs",
588
+                5: "Fri",
589
+                6: "Sat",
590
+                7: "Sun"
591
+            };
592
+            var typeArr = { 1: "M", 2: "A", 3: "N" };
593
+            if (
594
+                typeof weekArr[week] === "undefined" ||
595
+                typeof typeArr[schedule_type] === "undefined"
596
+            ) {
597
+                return [];
598
+            }
599
+            return [weekArr[week], typeArr[schedule_type]];
600
+        },
601
+        printAction: function() {
602
+            const style = '@media print {#scheduleTable{font-size:14px;} .scheduleTable tr td{text-align: center;padding: 5px;}}'
603
+
604
+            printJS({
605
+            printable: 'scheduleTable',
606
+            type: 'html',
607
+            documentTitle: '  ',
608
+            style: style,
609
+            scanStyles: false
610
+            })
611
+        },
612
+    }
613
+}
614
+</script>
615
+
616
+
617
+<style lang="scss">
618
+td{
619
+    text-align: center;
620
+    padding: 5px;
621
+}
622
+</style>