Pārlūkot izejas kodu

25 2月10日 医嘱徽标

yq1 3 nedēļas atpakaļ
vecāks
revīzija
c3234dcb5a
2 mainītis faili ar 173 papildinājumiem un 54 dzēšanām
  1. 4 1
      src/main.js
  2. 169 53
      src/pages/main/newActionBar/doctorAdvice.vue

+ 4 - 1
src/main.js Parādīt failu

@@ -73,7 +73,8 @@ import {
73 73
   CollapseItem,
74 74
   Calendar,
75 75
   NoticeBar,
76
-  NavBar
76
+  NavBar,
77
+  Badge
77 78
   // eslint-disable-next-line no-irregular-whitespace,import/no-duplicates
78 79
 } from 'vant'
79 80
 Vue.use(DropdownMenu)
@@ -123,6 +124,7 @@ Vue.use(DropdownMenu)
123 124
   .use(Calendar)
124 125
   .use(NoticeBar)
125 126
   .use(NavBar)
127
+  .use(Badge)
126 128
 // import "@/lib/flexible.js";
127 129
 
128 130
 // main.js
@@ -137,6 +139,7 @@ Vue.use(MintUI)
137 139
 Vue.use(MuseUI)
138 140
 // Vue.use(Vant)
139 141
 Vue.use(ElementUI)
142
+// Vue.use(vant);
140 143
 Vue.config.productionTip = false
141 144
 
142 145
 /* eslint-disable no-new */

+ 169 - 53
src/pages/main/newActionBar/doctorAdvice.vue Parādīt failu

@@ -56,6 +56,8 @@
56 56
                       >({{advice.remark}})</span>
57 57
 
58 58
                       <span v-if="org_id==10644 && advice.remark!=''">({{advice.remark}})</span>
59
+                      <!-- 药品剩余数 -->
60
+                      <!-- <van-badge :content="5"></van-badge> -->
59 61
                     </div>
60 62
                   </td>
61 63
 
@@ -159,11 +161,10 @@
159 161
                 <span @click="deleteSubAdviceAction">删除子医嘱</span>
160 162
               </div>
161 163
             </div>
162
-
163 164
             <div class="preserveBox">
164 165
               <div style="display: flex;justify-content: space-between;width: 100%;">
165 166
                   <span v-if="his_is_open != 1 || org_id == 10721" :class="{ forbid: is_has_create != true }" @click="showNew">新增</span>
166
-                 
167
+
167 168
                   <mu-date-input v-if="isShowExce && (org_id == 10215 || org_id == 4 || org_id == 9671 || org_id == 10340)" type="dateTime" class="dateInput" label="执行" v-model="newExecTime" @focus="onFocusExecTime" @change="execTimeFunc" container="dialog" :clock-type="'24hr'" actions></mu-date-input>
168 169
                   <span v-if="isShowExce && (org_id != 10215  && org_id != 4 && org_id!=9671 && org_id !=10340)" :class="{ forbid: is_has_exce != true || allForbidShow != true }" @click="execAdvice">执行</span>
169 170
                   <!-- <span v-if="isShowExce && (org_id ==10164 || org_id==10480)" :class="{ forbid: is_has_exce != true || allForbidShow != true }" @click="BatchExecAdvice">全部执行</span> -->
@@ -171,7 +172,7 @@
171 172
                   <mu-date-input v-if="isShowMofifyExce && (org_id == 10215  || org_id == 4 || org_id == 10340 || org_id == 9671)" type="dateTime" class="dateInput2" label="修改执行" v-model="newModifyExecTime" @focus="onFocusModifyExecTime" @change="modifyExecTimeFunc" container="dialog" :clock-type="'24hr'" actions></mu-date-input>
172 173
                   <span v-if="isShowMofifyExce && (org_id != 10215  && org_id != 4 && org_id!=10340 && org_id!=9671)" :class="{ forbid: (current_advice&& current_advice.parent_id > 0) || is_has_modify_exce != true || allForbidShow != true }" @click="modifyExecAdvice">修改执行</span>
173 174
                   <span v-if="org_id!=10445 && org_id!=3877  && org_id !=10344 && org_id!=10597 && org_id!=10599 && org_id!=10624" :class="{ forbid: (current_advice&& current_advice.parent_id > 0) || is_has_check != true || allForbidShow != true }" @click="checkAdvice">核对</span>
174
-                 
175
+
175 176
                   <span v-if="org_id ==3877  || org_id ==10344" :class="{ forbid: (current_advice&& current_advice.parent_id > 0) || is_has_check != true || allForbidShow != true }" @click="checkAdviceOne">核对</span>
176 177
                   <span v-if="his_is_open != 1 || org_id == 10721" :class="{ forbid: current_advice == null || current_advice.parent_id > 0 ||  currentAdvices.length != 1 || is_has_create != true || allForbidShow != true }" @click="openNewChild">添加子药</span>
177 178
                   <span v-if="his_is_open != 1 || org_id == 10721" :class="{ forbid: current_group_index < 0 ||  currentAdvices.length != 1  || current_select_object== 2 || (is_has_modify != true && is_has_modify_other != true) || allForbidShow != true || modifyOrDelete != true }" @click="modifyAdviceAction">修改</span>
@@ -180,30 +181,34 @@
180 181
               </div>
181 182
             </div>
182 183
         </div>
183
-       <mt-datetime-picker
184
-        class="datetimePicker"
185
-        ref="exec_time"
186
-        type="datetime"
187
-        @confirm="handleExecTime"
188
-        v-model="nowExecTime"
189
-        ></mt-datetime-picker>
190
-
184
+        <!-- 执行 -->
185
+        <!-- <div style="overflow-y: auto;height: 300px;"> -->
186
+          <mt-datetime-picker
187
+            class="datetimePicker"
188
+            ref="exec_time"
189
+            type="datetime"
190
+            @confirm="handleExecTime"
191
+            v-model="nowExecTime"
192
+            ></mt-datetime-picker>
193
+        <!-- </div> -->
191 194
        <mt-datetime-picker
192 195
         class="datetimePicker"
193 196
         ref="batch_exec_time"
194 197
         type="datetime"
195 198
         @confirm="BatchHandleExecTime"
196 199
         v-model="nowExecTime"
197
-        ></mt-datetime-picker> 
198
-
199
-        <mt-datetime-picker
200
-        class="datetimePicker"
201
-        ref="mofify_exec_time"
202
-        type="datetime"
203
-        @confirm="handleModifyExecTime"
204
-        v-model="nowExecTime"
205 200
         ></mt-datetime-picker>
206
-
201
+        <!-- 修改执行 -->
202
+        <div style="overflow-y: auto;">
203
+          <mt-datetime-picker
204
+          class="datetimePicker"
205
+          ref="mofify_exec_time"
206
+          type="datetime"
207
+          @confirm="handleModifyExecTime"
208
+          v-model="nowExecTime"
209
+          style="height: 300px;"
210
+          ></mt-datetime-picker>
211
+        </div>
207 212
         <mt-datetime-picker
208 213
         class="datetimePicker"
209 214
         ref="check_time"
@@ -228,7 +233,7 @@
228 233
         close-on-click-action
229 234
         @select="onCancelSheet"
230 235
         />
231
-    
236
+
232 237
       <van-popup
233 238
         v-model="infor_visibility"
234 239
         class="advicePopup"
@@ -241,12 +246,19 @@
241 246
         >
242 247
       </infor-sub-menu>
243 248
       </van-popup>
244
-
249
+      <!-- <div class="checkBox4"  @click="tiaozhuan" ref="moveBtn2">
250
+        <img src="../../../assets/images/check2.png" @mousedown="down2" @touchstart="down2"
251
+        @mousemove="move2"
252
+        @touchmove="move2"
253
+        @mouseup="end2"
254
+        @touchend="end2"
255
+        @touchcancel="end2" alt="">
256
+      </div> -->
245 257
     </div>
246 258
 </template>
247 259
 
248 260
 <script>
249
-import {Dialog, Toast} from 'vant'
261
+import {Dialog, Toast,Badge } from 'vant'
250 262
 import {parseTime} from '@/utils'
251 263
 import {uParseTime} from '@/utils/tools'
252 264
 import newAddOrder from './components/newAddOrder'
@@ -327,7 +339,8 @@ export default {
327 339
     },
328 340
     prescription_prop:{
329 341
       type: Object,
330
-    }
342
+    },
343
+    // tableIndex:Number
331 344
   },
332 345
   data () {
333 346
     return {
@@ -385,13 +398,26 @@ export default {
385 398
       schedulePatient: {},
386 399
       infor_visibility:false,
387 400
       user_type:0,
401
+
402
+      nx2: '',
403
+      ny2: '',
404
+      dx2: '',
405
+      dy2: '',
406
+      xPum2: '',
407
+      yPum2: '',
408
+      position2:{
409
+        x: 0,
410
+        y: 0
411
+      },
412
+      moveBtn2:{},
413
+      
388 414
     }
389 415
   },
390 416
   created () {
391 417
     console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.advice_groups)
392 418
     var user_type =  this.$store.getters.user.user.user_type
393 419
     this.user_type =user_type
394
-   
420
+
395 421
     this.getPermission()
396 422
     this.template_id = this.$store.getters.user.template_info.template_id
397 423
     this.org_id = this.$store.getters.user.template_info.org_id
@@ -442,8 +468,22 @@ export default {
442 468
     // 获取今日排班数据
443 469
     this.getScheduleByPatient(patient_id, date)
444 470
   },
445
-
471
+  mounted(){
472
+    // this.moveBtn2 = this.$refs.moveBtn2
473
+    // if (sessionStorage.getItem('checkBtnTop2')) {
474
+    //   this.moveBtn2.style.top = sessionStorage.getItem('checkBtnTop2')
475
+    //   this.moveBtn2.style.bottom = 'initial'
476
+    // }
477
+    // if (sessionStorage.getItem('checkBtnLeft2')) {
478
+    //   this.moveBtn2.style.left = sessionStorage.getItem('checkBtnLeft2')
479
+    // }
480
+  },
446 481
   methods: {
482
+    // tiaozhuan(){
483
+    //   this.tableIndex = 1
484
+    //   this.$emit('tiaozhuan',this.tableIndex)
485
+    //   console.log('this.index',this.tableIndex);
486
+    // },
447 487
     menuComfirmFour:function(start_time,remark){
448 488
        var params = {
449 489
          patient_id:this.$route.query.patient_id,
@@ -452,7 +492,7 @@ export default {
452 492
          module:4,
453 493
          remark:remark,
454 494
        }
455
-      
495
+
456 496
       saveMobileInformation(params).then(response=>{
457 497
         if(response.data.state == 1){
458 498
            this.infor_visibility = false
@@ -462,7 +502,7 @@ export default {
462 502
     },
463 503
     menuCancleFour:function(){
464 504
      this.infor_visibility = false
465
-    
505
+
466 506
     },
467 507
     onFocusExecTime () {
468 508
       this.newExecTime = new Date()
@@ -516,7 +556,8 @@ export default {
516 556
             var advice = response.data.data.advice
517 557
             if (this.current_select_object == 1) {
518 558
               var ids = this.currentAdviceIdsStr.split(',')
519
-              var adviceArr = this.advice_groups[this.current_group_index].advices
559
+              var adviceArr = this.advice_groups[this.current_group_index]
560
+                .advices
520 561
               for (let i = 0; i < adviceArr.length; i++) {
521 562
                 for (let a = 0; a < ids.length; a++) {
522 563
                   if (
@@ -544,13 +585,14 @@ export default {
544 585
           return false
545 586
         })
546 587
     },
588
+    // 执行弹窗
547 589
     execTimeFunc (time) {
548 590
 
549 591
       if (this.is_has_exce == false) {
550 592
         Toast.fail('你没有执行医嘱的权限')
551 593
         return false
552 594
       }
553
-    
595
+
554 596
       if (this.currentAdvices.length <= 0) {
555 597
         return
556 598
       }
@@ -706,7 +748,7 @@ export default {
706 748
               .advices
707 749
             for (let i = 0; i < adviceArr.length; i++) {
708 750
               for (let a = 0; a < ids.length; a++) {
709
- 
751
+
710 752
                 if (adviceArr[i].execution_state != 1 && adviceArr[i].id == ids[a]) {
711 753
                   adviceArr[i].execution_staff = advice.execution_staff
712 754
                   adviceArr[i].execution_time = advice.execution_time
@@ -760,7 +802,7 @@ export default {
760 802
                   }
761 803
                 }
762 804
               }
763
-             
805
+
764 806
               if (response.data.data.msg == 2) {
765 807
                 Toast.success('库存数量不足,请入库,执行失败!')
766 808
               }
@@ -772,7 +814,7 @@ export default {
772 814
               }
773 815
 
774 816
               if (response.data.data.msg == 7) {
775
-                
817
+
776 818
                 Toast.success('单位不统一,执行失败!')
777 819
               }
778 820
               if(response.data.data.msg == 12){
@@ -1043,6 +1085,7 @@ export default {
1043 1085
     closeDoctorAdviceshow () {
1044 1086
       this.doctorAdviceshow = false
1045 1087
     },
1088
+    // 执行弹窗
1046 1089
     execAdvice () {
1047 1090
       if (this.is_has_exce == false) {
1048 1091
         Toast.fail('你没有执行医嘱的权限')
@@ -1111,10 +1154,8 @@ export default {
1111 1154
             return false
1112 1155
           }
1113 1156
         }
1114
-
1115 1157
         // this.nowExecTime = new Date(group_top_advice.start_time * 1000)
1116 1158
         this.nowExecTime = new Date()
1117
-
1118 1159
       }
1119 1160
       this.$refs.exec_time.open()
1120 1161
     },
@@ -1227,7 +1268,7 @@ export default {
1227 1268
               if (this.current_select_object == 1) {
1228 1269
                 var ids = this.currentAdviceIdsStr.split(',')
1229 1270
                 var adviceArr = this.advice_groups[this.current_group_index].advices
1230
- 
1271
+
1231 1272
                 for (let i = 0; i < adviceArr.length; i++) {
1232 1273
                   for (let a = 0; a < ids.length; a++) {
1233 1274
                     if ((adviceArr[i].execution_state == 2 &&adviceArr[i].id == ids[a]) ||(adviceArr[i].execution_state == 2 &&adviceArr[i].parent_id == ids[a])) {
@@ -1260,11 +1301,11 @@ export default {
1260 1301
               }
1261 1302
 
1262 1303
               if (response.data.data.msg == 7) {
1263
-             
1304
+
1264 1305
                 Toast.success('单位不匹配,执行失败!')
1265 1306
               }
1266 1307
             } else if (resp.data.data.msg == 'ok') {
1267
-              
1308
+
1268 1309
               var adviceArr = this.advice_groups[this.current_group_index].advices
1269 1310
               for (let i = 0; i < adviceArr.length; i++) {
1270 1311
                 if ((adviceArr[i].execution_state == 2 && adviceArr[i].groupno == exceParams.groupno)) {
@@ -1324,6 +1365,7 @@ export default {
1324 1365
       }
1325 1366
       return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':00'
1326 1367
     },
1368
+    // 修改执行
1327 1369
     modifyExecAdvice: function () {
1328 1370
       if (this.is_has_modify_exce == false) {
1329 1371
         Toast.fail('你没有修改执行医嘱的权限')
@@ -1436,11 +1478,11 @@ export default {
1436 1478
            if (adviceArr[i].is_selected == 1 &&adviceArr[i].execution_staff == 0) {
1437 1479
             Toast.fail('请先执行再核对')
1438 1480
             return false
1439
-          }   
1481
+          }
1440 1482
          }
1441 1483
         }
1442 1484
 
1443
-      
1485
+
1444 1486
 
1445 1487
         var currentAdviceIdArr = []
1446 1488
         for (let i = 0; i < adviceArr.length; i++) {
@@ -1490,12 +1532,12 @@ export default {
1490 1532
            if (adviceArr[i].is_selected == 1 &&adviceArr[i].execution_staff == 0) {
1491 1533
             Toast.fail('请先执行再核对')
1492 1534
             return false
1493
-          }   
1535
+          }
1494 1536
          }
1495 1537
 
1496 1538
         }
1497 1539
 
1498
-       
1540
+
1499 1541
       }
1500 1542
 
1501 1543
       Dialog.confirm({
@@ -2065,7 +2107,7 @@ export default {
2065 2107
               }
2066 2108
             }
2067 2109
           }
2068
-         
2110
+
2069 2111
           var projectList = response.data.data.projectList
2070 2112
           if(projectList!=null && projectList.length>0){
2071 2113
             var adviceArr = this.advice_groups[this.current_group_index].projectList
@@ -2079,7 +2121,7 @@ export default {
2079 2121
               }
2080 2122
             }
2081 2123
           }
2082
-        
2124
+
2083 2125
         }
2084 2126
       })
2085 2127
     },
@@ -2226,7 +2268,7 @@ export default {
2226 2268
           Toast.fail(err)
2227 2269
         })
2228 2270
     },
2229
- 
2271
+
2230 2272
     modifySubdviceAction: function () {
2231 2273
       if (this.currentSubAdvices.length <= 0) {
2232 2274
         return
@@ -2463,7 +2505,7 @@ export default {
2463 2505
       data.advice_type = 2
2464 2506
       data.advice_date = this.record_date
2465 2507
       data.start_time = start_time_str
2466
-      data.record_date = parseInt(this.$route.query.date) 
2508
+      data.record_date = parseInt(this.$route.query.date)
2467 2509
       console.log("data---------",data.record_date)
2468 2510
       var adviceJSONs = []
2469 2511
       for (let index = 0; index < resp_advices.length; index++) {
@@ -2527,7 +2569,7 @@ export default {
2527 2569
                 this.lastOrNextAdviceShow = false
2528 2570
                 this.infor_visibility = true
2529 2571
              }
2530
-            
2572
+
2531 2573
           }
2532 2574
         })
2533 2575
         .catch(err => {
@@ -2666,7 +2708,7 @@ export default {
2666 2708
           }
2667 2709
         })
2668 2710
         .then(res => {
2669
- 
2711
+
2670 2712
           if (res.data.state == 0) {
2671 2713
             this.hasPermission = false
2672 2714
           } else if (res.data.state == 1) {
@@ -2695,7 +2737,7 @@ export default {
2695 2737
       })
2696 2738
     },
2697 2739
     handleCheckTime(time){
2698
-     
2740
+
2699 2741
       var params = null
2700 2742
         Toast.loading({forbidClick: true, duration: 0})
2701 2743
         if (this.advice_groups[this.current_group_index].advices[0].origin == 2) {
@@ -2740,7 +2782,7 @@ export default {
2740 2782
         }
2741 2783
         var checkTime = this.handleTime(time)
2742 2784
        params['mode'] = '7'
2743
-      
2785
+
2744 2786
        params['check_time'] = checkTime
2745 2787
 
2746 2788
        checkMobileDoctorAdvice(params).then(response => {
@@ -2810,7 +2852,7 @@ export default {
2810 2852
         }
2811 2853
       }).catch(err => {
2812 2854
         Toast.fail(err)
2813
-      }) 
2855
+      })
2814 2856
     },
2815 2857
     BatchHandleCheckTime(time){
2816 2858
       console.log("time=====",time)
@@ -2825,7 +2867,72 @@ export default {
2825 2867
 
2826 2868
        }
2827 2869
      })
2828
-    }
2870
+    },
2871
+     // 长期医嘱
2872
+    // down2 (event) {
2873
+    //   this.flags = true
2874
+    //   var touch
2875
+    //   if (event.touches) {
2876
+    //     touch = event.touches[0]
2877
+    //   } else {
2878
+    //     touch = event
2879
+    //   }
2880
+    //   this.position2.x = touch.clientX
2881
+    //   this.position2.y = touch.clientY
2882
+    //   this.dx2 = this.moveBtn2.offsetLeft
2883
+    //   this.dy2 = this.moveBtn2.offsetTop
2884
+    //   console.log('this.moveBtn2.offsetLeft',this.moveBtn2.offsetLeft);
2885
+    // },
2886
+    // move2 (event) {
2887
+    //   if (this.flags) {
2888
+    //     var touch
2889
+    //     if (event.touches) {
2890
+    //       touch = event.touches[0]
2891
+    //     } else {
2892
+    //       touch = event
2893
+    //     }
2894
+    //     this.nx2 = touch.clientX - this.position2.x
2895
+    //     this.ny2 = touch.clientY - this.position2.y
2896
+    //     this.xPum2 = this.dx2 + this.nx2
2897
+    //     this.yPum2 = this.dy2 + this.ny2
2898
+    //     var clientWidth = document.documentElement.clientWidth
2899
+    //     var clientHeight = document.documentElement.clientHeight
2900
+    //     if (
2901
+    //       this.xPum2 > 0 &&
2902
+    //       this.xPum2 < clientWidth - this.moveBtn2.offsetWidth
2903
+    //     ) {
2904
+    //       this.moveBtn2.style.left = this.xPum2 + 'px'
2905
+    //     }
2906
+    //     if (
2907
+    //       this.yPum2 > 0 &&
2908
+    //       this.yPum2 < clientHeight - this.moveBtn2.offsetHeight
2909
+    //     ) {
2910
+    //       this.moveBtn2.style.top = this.yPum2 + 'px'
2911
+    //     }
2912
+
2913
+    //     // 阻止页面的滑动默认事件
2914
+    //     document.addEventListener('touchmove', this.handler, {
2915
+    //       passive: false
2916
+    //     })
2917
+    //   }
2918
+    // },
2919
+    // // 鼠标释放时候的函数
2920
+    // end2 () {
2921
+    //   this.flags = false
2922
+    //   sessionStorage.setItem('checkBtnTop2', this.moveBtn2.style.top)
2923
+    //   sessionStorage.setItem('checkBtnLeft2', this.moveBtn2.style.left)
2924
+    //   document.addEventListener('touchmove', this.handler, {
2925
+    //     passive: false
2926
+    //   })
2927
+    // },
2928
+    // handler () {
2929
+    //   if (this.flags) {
2930
+    //     event.preventDefault()
2931
+    //   } else {
2932
+    //     return true
2933
+    //   }
2934
+    // },
2935
+
2829 2936
   },
2830 2937
   watch: {
2831 2938
     result: function (result) {
@@ -3054,6 +3161,15 @@ export default {
3054 3161
         padding: 0;
3055 3162
         min-height:auto;
3056 3163
     }
3057
-
3164
+    .checkBox4 {
3165
+      position: fixed;
3166
+      left: 0.6rem;
3167
+      bottom: 11rem;
3168
+      z-index:5000;
3169
+      img {
3170
+        width: 3.5rem;
3171
+        height: 3.5rem;
3172
+      }
3173
+    }
3058 3174
 }
3059 3175
 </style>