28169 il y a 6 mois
Parent
révision
4322594355

+ 12 - 0
src/router/modules/dialysis.js Voir le fichier

@@ -108,6 +108,18 @@ export default {
108 108
       }
109 109
     },
110 110
 
111
+    {
112
+      path: '/dialysis/doctorAdvicePrint/two',
113
+      component: () => import('@/xt_pages/dialysis/doctorAdvicePrintTwo'),
114
+      name: '透析医嘱打印',
115
+      hidden: true,
116
+      is_menu: false,
117
+      meta: {
118
+        title: '透析医嘱打印',
119
+        noCache: true
120
+      }
121
+    },
122
+
111 123
     {
112 124
       path: '/dialysis/doctorAdviceStaticPrint',
113 125
       component: () => import('@/xt_pages/dialysis/doctorAdviceStaticPrint'),

+ 4 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_eightyone.vue Voir le fichier

@@ -1898,7 +1898,8 @@ export default {
1898 1898
                   // console.log("itemwowowowowo",item)
1899 1899
                   let { new_groupno } = item
1900 1900
                   if(item.delivery_way !='口服' && item.delivery_way!='中药口服'){
1901
-                    if(!objInfo[new_groupno] ){
1901
+                    if(item.execution_frequency.indexOf('上机前')==-1){
1902
+                      if(!objInfo[new_groupno] ){
1902 1903
                       console.log('66666666',item);
1903 1904
                       objInfo[new_groupno] = {
1904 1905
                         new_groupno,
@@ -1925,7 +1926,9 @@ export default {
1925 1926
                         remark:item.remark,
1926 1927
 
1927 1928
                       }
1929
+                     }
1928 1930
                     }
1931
+                    
1929 1932
                   }
1930 1933
                 })
1931 1934
                 let newArr = Object.values(objInfo);

+ 350 - 0
src/xt_pages/dialysis/doctorAdvicePrintTwo.vue Voir le fichier

@@ -0,0 +1,350 @@
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 class="order_title_panl">
14
+                    <span class="main_title">临时医嘱</span>
15
+                </div>
16
+                <p style="width: 960px;text-align: right;margin: 0 auto 10px;">日期:{{ time }}</p>
17
+                <table class="table dialysisTable" border="1" cellspacing="0" cellpadding="0">
18
+                    <tr>
19
+                      <th width="20px">序号</th>
20
+                      <th width="100px">姓名</th>
21
+                      <th width="50px">医嘱名称</th>
22
+                      <th width="50px">药品规格</th>
23
+                      <th width="50px">单位</th>
24
+                      <th width="50px">数量</th>
25
+                    </tr>
26
+
27
+                    <tr v-for="(item,index) in tableData" :key="index">
28
+                      <th width="20px">
29
+                        {{ index+1 }}
30
+                      </th>
31
+                      <th width="100px">
32
+                        {{ item.patient_name }}
33
+                      </th>
34
+                      <th width="50px">
35
+                        {{ item.advice_name }}
36
+                      </th>
37
+                      <th width="50px">
38
+                        {{ getSpecicalName(item.drug_id) }}
39
+                      </th>
40
+                      <th width="50px">
41
+                        {{ item.prescribing_number_unit }}
42
+                      </th>
43
+                      <th width="50px">
44
+                        {{ item.prescribing_number }}
45
+                      </th>
46
+                    </tr>
47
+                   
48
+                </table>
49
+            </div>
50
+        </div>
51
+
52
+        
53
+    </div>
54
+</template>
55
+
56
+<script>
57
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
+import { getSchedualDoctors } from '@/api/advice'
59
+import { parseTime } from '@/utils'
60
+import { jsGetAge } from "@/utils/tools";
61
+import print from 'print-js'
62
+const moment = require('moment')
63
+export default {
64
+    components:{
65
+        BreadCrumb
66
+    },
67
+    data(){
68
+        return{
69
+            crumbs: [
70
+                { path: false, name: '药品' },
71
+                { path: false, name: '打印' }
72
+            ],
73
+            tableData:[],
74
+            start_time:"",
75
+            end_time:"",
76
+            print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
77
+
78
+            zone_selected: 0,
79
+            scheduleMap:[],
80
+            time:'',
81
+            show:true,
82
+            showOne:false,
83
+            delivery_way:"",
84
+            org_id:0,
85
+            drugList:[]
86
+        }
87
+    },
88
+    methods:{
89
+        getAge: function (val) {
90
+            var thisLen = val.patient.id_card_no.length;
91
+            var birth = "";
92
+            if (thisLen == 15) {
93
+                birth = "19" + val.patient.id_card_no.substr(6, 6);
94
+            } else {
95
+                birth = val.patient.id_card_no.substr(6, 8);
96
+            }
97
+            var birthtwo =
98
+                birth.substr(0, 4) +
99
+                "-" +
100
+                birth.substr(4, 2) +
101
+                "-" +
102
+                birth.substr(6, 2);
103
+
104
+            var age = jsGetAge(birthtwo, "-");
105
+            return age;
106
+        },
107
+        printAction: function() {
108
+            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;} }'
109
+
110
+            printJS({
111
+            printable: 'dialysisTable',
112
+            type: 'html',
113
+            documentTitle: '  ',
114
+            style: style,
115
+            scanStyles: false
116
+            })
117
+        },
118
+        requestSchedualDoctors (time) {
119
+            let newTime =  moment(time).format('YYYY-MM-DD')
120
+            getSchedualDoctors({
121
+            date: newTime,
122
+            patient_type: 0,
123
+            advice_type: 2,
124
+            delivery_way:this.delivery_way,
125
+            }).then(rs => {
126
+                var resp = rs.data
127
+                if (resp.state == 1) {
128
+                this.admin_user = resp.data.adminUser
129
+                var config = resp.data.config
130
+                let project_config = resp.data.project_config
131
+                var hisAdvices = resp.data.hisAdvices
132
+                var drugList = resp.data.drug
133
+                this.drugList = []
134
+                this.drugList = drugList
135
+                var newArr = []
136
+                if(hisAdvices!=null && hisAdvices.length>0){
137
+                   for(let i=0;i<hisAdvices.length>0;i++){
138
+                     for(let j=0;j<hisAdvices[i].doctor_advice.length;j++){
139
+                        hisAdvices[i].doctor_advice[j].patient_name = ""
140
+                        hisAdvices[i].doctor_advice[j].patient_name = hisAdvices[i].patient.name
141
+                        if(hisAdvices[i].doctor_advice[j].delivery_way !='口服' && hisAdvices[i].doctor_advice[j].delivery_way!='中药口服'){
142
+                          if(hisAdvices[i].doctor_advice[j].execution_frequency.indexOf('上机前')==-1){
143
+                             newArr.push(hisAdvices[i].doctor_advice[j])
144
+                          }
145
+                        }
146
+                     }
147
+                   }
148
+                }
149
+                this.tableData = []
150
+                this.tableData = newArr
151
+                console.log("newArr------",newArr)
152
+               
153
+               }
154
+            })
155
+        },
156
+        compare (property) {
157
+            return function (a, b) {
158
+                var value1 = a[property]
159
+                var value2 = b[property]
160
+                return value1 - value2
161
+            }
162
+        },
163
+        parseTime: function (time, layout) {
164
+            if (time == 0) {
165
+                return ''
166
+            }
167
+            return parseTime(time, layout)
168
+        },
169
+        getName (val) {
170
+            for (let i = 0; i < this.admin_user.length; i++) {
171
+                if (this.admin_user[i].id == val) {
172
+                    return this.admin_user[i].name
173
+                }
174
+            }
175
+        },
176
+        getSpecicalName(drug_id){
177
+          var specification_name = ""
178
+          for(let i=0;i<this.drugList.length;i++){
179
+            if(drug_id == this.drugList[i].id){
180
+               specification_name = this.drugList[i].dose + this.drugList[i].dose_unit + "*"+this.drugList[i].min_number+this.drugList[i].min_unit+"/"+this.drugList[i].max_unit
181
+            }
182
+          }
183
+          return specification_name
184
+        }
185
+    },
186
+    computed: {
187
+    filtedScheduals: function () {
188
+        var scheduleMap = new Object()
189
+        if (this.zone_selected == 0) {
190
+            for (const key in this.scheduleMap) {
191
+            scheduleMap[key] = this.scheduleMap[key]
192
+            }
193
+        } else {
194
+            var zone_name = this.zones[this.zone_selected].text
195
+            scheduleMap[zone_name] = this.scheduleMap[zone_name]
196
+        }
197
+
198
+        if (this.schedule_type_selected != 0) {
199
+            var _scheduleMap = {}
200
+            for (const key in scheduleMap) {
201
+            var origin_schedules = scheduleMap[key]
202
+            var schedules = []
203
+            for (let index = 0; index < origin_schedules.length; index++) {
204
+                const schedule = origin_schedules[index]
205
+                if (schedule.schedule_type == this.schedule_type_selected) {
206
+                schedules.push(schedule)
207
+                }
208
+            }
209
+            if (schedules.length > 0) {
210
+                _scheduleMap[key] = schedules
211
+            }
212
+            }
213
+
214
+            scheduleMap = _scheduleMap
215
+        }
216
+        for (var key in scheduleMap) {
217
+            let mapArr = scheduleMap[key]
218
+            for (let i = 0; i < mapArr.length; i++) {
219
+            mapArr[i]['new_advice'] = []
220
+            }
221
+        }
222
+
223
+        for (var key in scheduleMap) {
224
+            let mapArr = scheduleMap[key]
225
+            for (let i = 0; i < mapArr.length; i++) {
226
+            var maps = mapArr[i]
227
+            var resp_advices = maps.doctor_advice
228
+            if (resp_advices.length > 0) {
229
+                var newGroupObject = function () {
230
+                return Object.assign(
231
+                    {},
232
+                    {
233
+                    group_no: 0,
234
+                    advices: []
235
+                    }
236
+                )
237
+                }
238
+                var initGroupBlock = function (group, advice) {
239
+                group.group_no = advice.groupno
240
+                }
241
+
242
+                var advice_groups = []
243
+                var group = newGroupObject()
244
+                for (let index = 0; index < resp_advices.length; index++) {
245
+                const advice = resp_advices[index]
246
+                if (advice.groupno == 0) {
247
+                    // 老版本的医嘱
248
+                    if (advice.parent_id > 0) {
249
+                    if (advice_groups.length > 0) {
250
+                        var parent_group = advice_groups[advice_groups.length - 1]
251
+                        if (parent_group.advices.length > 0) {
252
+                        if (parent_group.advices[0].id == advice.parent_id) {
253
+                            parent_group.advices.push(advice)
254
+                        }
255
+                        }
256
+                    }
257
+                    continue
258
+                    } else {
259
+                    if (group.group_no > 0) {
260
+                        advice_groups.push(group)
261
+                        group = newGroupObject()
262
+                    }
263
+
264
+                    initGroupBlock(group, advice)
265
+                    group.advices.push(advice)
266
+                    advice_groups.push(group)
267
+                    group = newGroupObject()
268
+                    continue
269
+                    }
270
+                } else {
271
+                    if (group.group_no > 0 && group.group_no != advice.groupno) {
272
+                    advice_groups.push(group)
273
+                    group = newGroupObject()
274
+                    }
275
+                    if (group.group_no == 0) {
276
+                    initGroupBlock(group, advice)
277
+                    }
278
+                    if (group.group_no == advice.groupno) {
279
+                    group.advices.push(advice)
280
+                    }
281
+                }
282
+                }
283
+                if (group.group_no > 0) {
284
+                // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
285
+                advice_groups.push(group)
286
+                }
287
+                advice_groups = advice_groups
288
+            } else {
289
+                advice_groups = []
290
+            }
291
+            maps.new_advice = advice_groups
292
+            }
293
+        }
294
+        console.log("222222",scheduleMap)
295
+        return scheduleMap
296
+        }
297
+    },
298
+    created(){
299
+      var time = this.$route.query.time
300
+      var delivery_way = this.$route.query.delivery_way
301
+      this.delivery_way = delivery_way
302
+      this.time = moment(time).format('YYYY-MM-DD')
303
+      console.log(11,this.$route.query)
304
+      this.requestSchedualDoctors(time)
305
+      this.org_id = this.$store.getters.xt_user.template_info.org_id;
306
+    }
307
+}
308
+</script>
309
+
310
+
311
+<style rel="stylesheet/scss" lang="scss" scoped>
312
+.dialysisTable{
313
+    width:960px;
314
+    margin: 0 auto;
315
+    text-align: center;
316
+    border-collapse: collapse;
317
+}
318
+.order_title_panl {
319
+    text-align: center;
320
+
321
+    .main_title {
322
+      font-size: 18px;
323
+      line-height: 40px;
324
+      font-weight: 500;
325
+    }
326
+}
327
+.dialysisTable tr{
328
+    padding: 10px 0;
329
+}
330
+.dialysisTable th {
331
+    color: #000;
332
+    padding: 0;
333
+    margin: 0;
334
+    height: 30px;
335
+}
336
+.dialysisTable tr td {
337
+    padding: 12px 0;
338
+}
339
+.subadvice_content {
340
+    text-align: left;
341
+    padding-left: 25px !important;
342
+    padding-right: 5px !important;
343
+}
344
+.advice_content {
345
+    text-align: left;
346
+    padding-left: 5px !important;
347
+    padding-right: 5px !important;
348
+    padding: 15px 5px !important;
349
+}
350
+</style>

+ 5 - 1
src/xt_pages/dialysis/newDoctorAdvice.vue Voir le fichier

@@ -1546,10 +1546,14 @@ export default {
1546 1546
           name = ""
1547 1547
        }
1548 1548
 
1549
-       if(this.org_id == 9671 || this.org_id == 10340 || this.org_id == 0){
1549
+       if(this.org_id == 9671 || this.org_id == 10340){
1550 1550
         this.$router.push({ path: "/dialysis/doctorAdvicePrint/one",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
1551 1551
        }
1552 1552
 
1553
+       if(this.org_id == 0 || this.org_id == 10721){
1554
+         this.$router.push({ path: "/dialysis/doctorAdvicePrint/two",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
1555
+       }
1556
+
1553 1557
        if(this.org_id != 9671 && this.org_id != 10340 && this.org_id!=0){
1554 1558
         this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
1555 1559
        }

+ 2 - 0
src/xt_pages/dialysis/template/DialysisPrintOrdereightyone.vue Voir le fichier

@@ -2479,7 +2479,9 @@ export default {
2479 2479
           if(this.doctor_advices!=null && this.doctor_advices.length>0){
2480 2480
             for(let i=0;i<this.doctor_advices.length;i++){
2481 2481
               if(this.doctor_advices[i].delivery_way!='口服' && this.doctor_advices[i].delivery_way!='中药口服'){
2482
+                if(this.doctor_advices[i].execution_frequency.indexOf("上机前") == -1 ){
2482 2483
                   docArr.push(this.doctor_advices[i])
2484
+                 }  
2483 2485
               }
2484 2486
             }
2485 2487
           }

+ 2 - 2
src/xt_pages/workforce/next_remind_print.vue Voir le fichier

@@ -35,7 +35,7 @@
35 35
                   <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
36 36
                   <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
37 37
                   <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
38
-                  <td width="100" >血管通路</td>
38
+                  <td width="100" v-if="org_id!=10723">血管通路</td>
39 39
                   <td width="" v-if="org_id == 0 || org_id ==10567">管路</td>
40 40
                   <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
41 41
                 </tr>
@@ -96,7 +96,7 @@
96 96
                   <span v-if="main_collection.dialysissolution.anticoagulant == 10">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
97 97
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
98 98
                 </td>
99
-                <td :width="td_1_width">
99
+                <td :width="td_1_width" v-if="org_id!=10723">
100 100
                   <span>{{getBloodName(main_collection.dialysissolution.blood_access)  }}</span>
101 101
                 </td>
102 102
                 <td v-if="org_id == 0 || org_id ==10567">

+ 2 - 2
src/xt_pages/workforce/remind_print.vue Voir le fichier

@@ -36,7 +36,7 @@
36 36
                   <td width="30" v-if="printObj.anticoagulant_zongliang == 1">首剂</td>
37 37
                   <td width="30" v-if="printObj.anticoagulant_zongliang == 1">维持</td>
38 38
                   <td width="30" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
39
-                  <td width="">血管通路</td>
39
+                  <td width="" v-if="org_id!=10723">血管通路</td>
40 40
                   <td width="" v-if="org_id ==10567">管路</td>
41 41
                   <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
42 42
                 </tr>
@@ -123,7 +123,7 @@
123 123
                   <span v-if="main_collection.dialysissolution.anticoagulant == 10">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
124 124
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
125 125
                 </td>
126
-                <td >
126
+                <td v-if="org_id!=10723">
127 127
                    <span>{{getBloodName(main_collection.prescription.blood_access)  }}</span>
128 128
                 </td>
129 129
                 <td v-if="org_id ==10567">

+ 13 - 13
src/xt_permission.js Voir le fichier

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-    store.dispatch('VerifyConfigList', []).then(() => {
17
-      next()
18
-    })
19
-  }
20
-  if (store.getters.permission_routers === undefined) {
21
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-      next()
23
-    })
24
-  } else {
25
-    next()
26
-  }
27
-  return
15
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+  //   store.dispatch('VerifyConfigList', []).then(() => {
17
+  //     next()
18
+  //   })
19
+  // }
20
+  // if (store.getters.permission_routers === undefined) {
21
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+  //     next()
23
+  //   })
24
+  // } else {
25
+  //   next()
26
+  // }
27
+  // return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))