杨青 пре 1 година
родитељ
комит
3c83b1a1c8
4 измењених фајлова са 6254 додато и 5686 уклоњено
  1. 1 1
      build/webpack.dev.conf.js
  2. 5947 5606
      package-lock.json
  3. 154 70
      src/pages/main/RecordPage.vue
  4. 152 9
      src/pages/main/today/TodayTab.vue

+ 1 - 1
build/webpack.dev.conf.js Прегледај датотеку

@@ -55,6 +55,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
55 55
     new HtmlWebpackPlugin({
56 56
       filename: 'index.html',
57 57
       template: 'index.html',
58
+      // template: 'src/index.html',//新
58 59
       inject: true
59 60
     }),
60 61
     // copy custom static assets
@@ -88,7 +89,6 @@ module.exports = new Promise((resolve, reject) => {
88 89
         ? utils.createNotifierCallback()
89 90
         : undefined
90 91
       }))
91
-
92 92
       resolve(devWebpackConfig)
93 93
     }
94 94
   })

Разлика између датотеке није приказан због своје велике величине
+ 5947 - 5606
package-lock.json


+ 154 - 70
src/pages/main/RecordPage.vue Прегледај датотеку

@@ -226,76 +226,52 @@
226 226
         <img src="../../assets/images/monitoring.png" alt />
227 227
       </div> -->
228 228
       
229
-      <div class="fixedBox"  @click="toExecution">
230
-        <img src="../../assets/images/advice.png" alt />
229
+      <div class="fixedBox2"  @click="toExecution" ref="moveBtns" @mousedown="downs" @touchstart="downs"
230
+        @mousemove="moves"
231
+        @touchmove="moves"
232
+        @mouseup="ends"
233
+        @touchend="ends"
234
+        @touchcancel="ends">
235
+        <img src="../../assets/images/advice.png"  alt />
231 236
         <span class="redpoint">
232 237
            {{ total }}
233 238
         </span> 
234 239
       </div>
235 240
 
241
+      <div class="popup">
242
+        <van-popup
243
+          v-model:show="showRight"
244
+          position="right"
245
+          :style="{ width: '60%', height: '100%',right: '-30%' }">
236 246
 
237
-      <el-dialog
238
-        title="未执行医嘱患者名单"
239
-        :visible.sync="dialogVisible"
240
-        width="60%">
241
-          <el-table
242
-              :data="adviceList"
243
-              v-if="drugStockConfig.is_open == 0 || drugStockConfig.is_open == 2"
244
-              border
245
-              style="width: 100%">
246
-              <el-table-column prop="date" label="姓名" width="60" align="center">
247
-                  <template slot-scope="scope">
248
-                       {{getPaitenName( scope.row.patient_id) }}
249
-                  </template>
250
-              </el-table-column>
251
-
252
-              <el-table-column prop="date" label="条数" width="60" align="center">
253
-                <template slot-scope="scope">
254
-                       {{scope.row.count }}
255
-                  </template>
256
-              </el-table-column>
257
-
258
-              <el-table-column prop="date" label="操作" width="160" align="center">
259
-                <template slot-scope="scope">
260
-                   <el-button type="primary" size="small" @click="toExecutionPatent(scope.row)">去执行</el-button>
261
-                  </template>
262
-              </el-table-column>
263
-              
264
-          </el-table>
265
-
266
-          <el-table
267
-              :data="tableData"
268
-              v-if="drugStockConfig.is_open == 1"
269
-              border
270
-              style="width: 100%">
271
-              <el-table-column prop="date" label="姓名" width="60" align="center">
272
-                  <template slot-scope="scope">
273
-                    {{getPaitenName( scope.row.patient_id) }}
274
-                  </template>
275
-              
276
-              </el-table-column>
277
-
278
-              <el-table-column prop="date" label="条数" width="60" align="center">
279
-                <template slot-scope="scope">
280
-                  {{scope.row.total }}
281
-                </template>
282
-             
283
-              </el-table-column>
284
-
285
-              <el-table-column prop="date" label="去执行" width="160" align="center">
286
-                <template slot-scope="scope">
287
-                   <el-button type="primary" size="small" @click="toExecutionPatent(scope.row)">去执行</el-button>
288
-                 </template>
289
-              </el-table-column>
290
-              
291
-          </el-table>
292
-
293
-        <span slot="footer" class="dialog-footer">
294
-          <el-button @click="dialogVisible = false">取 消</el-button>
295
-          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
296
-        </span>
297
-      </el-dialog>
298
-
247
+          <div  v-if="drugStockConfig.is_open == 0 || drugStockConfig.is_open == 2">
248
+            <div style="margin: 10px;border-bottom: 1px solid black;">
249
+              <span class="text">姓名</span>
250
+              <span class="text">条数</span>
251
+            </div>
252
+            <div v-for="item in adviceList">
253
+              <div style="margin: 10px;border-bottom: 1px solid black;" @click="toExecutionPatent(item)">
254
+                <span class="text">{{getPaitenName(item.patient_id) }}</span>
255
+                <span class="text">{{item.count }}</span>
256
+              </div>
257
+            </div>
258
+            
259
+          </div>
260
+          <div  v-if="drugStockConfig.is_open == 1 ">
261
+            <div style="margin: 10px;border-bottom: 1px solid black;">
262
+              <span class="text">姓名</span>
263
+              <span class="text">条数</span>
264
+            </div>
265
+            <div v-for="item in tableData">
266
+              <div style="margin: 10px;border-bottom: 1px solid black;" @click="toExecutionPatent(item)">
267
+                <span class="text">{{getPaitenName(item.patient_id) }}</span>
268
+                <span class="text">{{item.count }}</span>
269
+              </div>
270
+            </div>
271
+            
272
+          </div>
273
+        </van-popup>
274
+      </div>
299 275
   </div>
300 276
 </template>
301 277
 
@@ -311,6 +287,7 @@ import { getDialysisOrWaitSelectedConfig } from '@/utils/data_config'
311 287
 import monitoring from '../monitoring/index'
312 288
 import control   from '../control/index.vue'
313 289
 import DialysisAdviceTable from '../advice/DialysisAdviceTable'
290
+import DialysisAdvice from '../advice/DialysiAdive.vue'
314 291
 import beforeDialysis from './beforeDialysis/index'
315 292
 import calling from './calling/index'
316 293
 import schedule from './schedule/index'
@@ -354,6 +331,7 @@ export default {
354 331
       unReadDialysisNum: 0,
355 332
       show: false,
356 333
       load: false,
334
+      showRight:false,
357 335
       // 拖动
358 336
       keyBoardShow: true,
359 337
       flags: false,
@@ -361,6 +339,10 @@ export default {
361 339
         x: 0,
362 340
         y: 0
363 341
       },
342
+      positions: {
343
+        x: 0,
344
+        y: 0
345
+      },
364 346
       active: 0,
365 347
       nx: '',
366 348
       ny: '',
@@ -368,7 +350,16 @@ export default {
368 350
       dy: '',
369 351
       xPum: '',
370 352
       yPum: '',
353
+
354
+      nsx: '',
355
+      nsy: '',
356
+      dsx: '',
357
+      dsy: '',
358
+      xsPum: '',
359
+      ysPum: '',
360
+
371 361
       moveBtn: {},
362
+      moveBtns:{},
372 363
       dialogVisible:false,
373 364
       tableData:[],
374 365
     }
@@ -379,6 +370,7 @@ export default {
379 370
     Popover,
380 371
     monitoring,
381 372
     DialysisAdviceTable,
373
+    DialysisAdvice,
382 374
     beforeDialysis,
383 375
     calling,
384 376
     schedule,
@@ -395,6 +387,14 @@ export default {
395 387
     if (sessionStorage.getItem('checkBtnLeft')) {
396 388
       this.moveBtn.style.left = sessionStorage.getItem('checkBtnLeft')
397 389
     }
390
+    this.moveBtns= this.$refs.moveBtns
391
+    if (sessionStorage.getItem('checkBtnsTop')) {
392
+      this.moveBtns.style.top = sessionStorage.getItem('checkBtnTop')
393
+      this.moveBtns.style.bottom = 'initial'
394
+    }
395
+    if (sessionStorage.getItem('checkBtnsLeft')) {
396
+      this.moveBtns.style.left = sessionStorage.getItem('checkBtnLeft')
397
+    }
398 398
     const originHeight = document.documentElement.clientHeight || document.body.clientHeight
399 399
     window.addEventListener('resize', () => {
400 400
       const resizeHeight = document.documentElement.clientHeight || document.body.clientHeight
@@ -462,6 +462,62 @@ export default {
462 462
         passive: false
463 463
       })
464 464
     },
465
+
466
+    downs (event) {
467
+      this.flags = true
468
+      var touch
469
+      if (event.touches) {
470
+        touch = event.touches[0]
471
+      } else {
472
+        touch = event
473
+      }
474
+      this.positions.x = touch.clientX
475
+      this.positions.y = touch.clientY
476
+      this.dsx = this.moveBtns.offsetLeft
477
+      this.dsy = this.moveBtns.offsetTop
478
+    },
479
+    moves (event) {
480
+      if (this.flags) {
481
+        var touch
482
+        if (event.touches) {
483
+          touch = event.touches[0]
484
+        } else {
485
+          touch = event
486
+        }
487
+        this.nsx = touch.clientX - this.positions.x
488
+        this.nsy = touch.clientY - this.positions.y
489
+        this.xsPum = this.dsx + this.nsx
490
+        this.ysPum = this.dsy + this.nsy
491
+        var clientWidth = document.documentElement.clientWidth
492
+        var clientHeight = document.documentElement.clientHeight
493
+        if (
494
+          this.xsPum > 0 &&
495
+          this.xsPum < clientWidth - this.moveBtns.offsetWidth
496
+        ) {
497
+          this.moveBtns.style.left = this.xsPum + 'px'
498
+        }
499
+        if (
500
+          this.ysPum > 0 &&
501
+          this.ysPum < clientHeight - this.moveBtns.offsetHeight
502
+        ) {
503
+          this.moveBtns.style.top = this.ysPum + 'px'
504
+        }
505
+
506
+        // 阻止页面的滑动默认事件
507
+        document.addEventListener('touchmove', this.handler, {
508
+          passive: false
509
+        })
510
+      }
511
+    },
512
+    // 鼠标释放时候的函数
513
+    ends () {
514
+      this.flags = false
515
+      sessionStorage.setItem('checkBtnTop', this.moveBtn.style.top)
516
+      sessionStorage.setItem('checkBtnLeft', this.moveBtn.style.left)
517
+      document.addEventListener('touchmove', this.handler, {
518
+        passive: false
519
+      })
520
+    },
465 521
     handler () {
466 522
       if (this.flags) {
467 523
         event.preventDefault()
@@ -594,15 +650,15 @@ export default {
594 650
           
595 651
            
596 652
           }
597
-      this.dialogVisible = true
598
-      
653
+      // this.dialogVisible = true
654
+      this.showRight =true
599 655
            
600 656
     },
601 657
     toExecutionPatent(row){
602 658
      var patient_name = ""
603 659
      patient_name = this.getPaitenName(row.patient_id)
604 660
      this.$router.push('/details?patient_id='+row.patient_id+"&date="+row.advice_date+"&patient_name="+patient_name)
605
-     this.dialogVisible =false
661
+     this.showRight =false
606 662
     },
607 663
     getPaitenName(patient_id){
608 664
       var name = ""
@@ -757,9 +813,9 @@ export default {
757 813
   border-radius: 20px;
758 814
   color: #fff;
759 815
   background: #f56c6c;
760
-  position: absolute;
761
-  top: -6px;
762
-  right: -8px;
816
+  position: relative;
817
+  top: -64px;
818
+  right: 27px;
763 819
   border: 1px solid #fff;
764 820
   @media only screen and (max-width: 767px) {
765 821
     height: 16px;
@@ -819,12 +875,39 @@ export default {
819 875
     height: 1.875rem;
820 876
   }
821 877
 }
878
+.fixedBox2{
879
+  position: fixed;
880
+  bottom: 0.625rem;
881
+  right: 0.2rem;
882
+  z-index: 5;
883
+  width: 100px;
884
+  height: 100px;
885
+  img {
886
+    width: 1.875rem;
887
+    height: 1.875rem;
888
+  }
889
+}
822 890
 
823 891
 .beforeDialysis{
824 892
   width:100%;
825 893
   position: fixed;
826 894
   top: 2.75rem;
827 895
 }
896
+.popup{
897
+  .text{
898
+    display: inline-block;
899
+    width: 150px;
900
+    height: 30px;
901
+    font-size: 16px;
902
+  }
903
+  .mainBox .van-popup {
904
+    top: 0%;
905
+    right: -176px;
906
+    -webkit-transform: translate3d(-50%, 0, 0);
907
+    transform: translate3d(-50%, 0, 0);
908
+    border-radius: 10px;
909
+  }
910
+}
828 911
 </style>
829 912
 <style lang="scss">
830 913
 .newinput {
@@ -966,4 +1049,5 @@ export default {
966 1049
 
967 1050
   
968 1051
 }
1052
+
969 1053
 </style>

+ 152 - 9
src/pages/main/today/TodayTab.vue Прегледај датотеку

@@ -548,8 +548,13 @@
548 548
     </div>
549 549
 
550 550
 
551
-    <div class="checkBox1"  @click="toExecution">
552
-        <img src="../../../assets/images/advice.png" alt />
551
+    <div class="checkBox3"  @click="toExecution" ref="moveBtns">
552
+        <img src="../../../assets/images/advice.png" @mousedown="downs" @touchstart="downs"
553
+      @mousemove="moves"
554
+      @touchmove="moves"
555
+      @mouseup="ends"
556
+      @touchend="ends"
557
+      @touchcancel="ends" alt />
553 558
         <span class="redpoint">
554 559
           {{ total }}
555 560
         </span> 
@@ -603,8 +608,41 @@
603 608
       </div>
604 609
     </van-dialog>
605 610
 
611
+    <div class="popup">
612
+      <van-popup
613
+        v-model:show="showRight"
614
+        position="right"
615
+        :style="{ width: '60%', height: '100%',right: '-30%' }">
606 616
 
607
-    <el-dialog
617
+        <div  v-if="drugStockConfig.is_open == 0 || drugStockConfig.is_open == 2">
618
+          <div style="margin: 10px;border-bottom: 1px solid black;">
619
+            <span class="text">姓名</span>
620
+            <span class="text">条数</span>
621
+          </div>
622
+          <div v-for="item in adviceList">
623
+            <div style="margin: 10px;border-bottom: 1px solid black;" @click="toExecutionPatent(item)">
624
+              <span class="text">{{getPaitenName(item.patient_id) }}</span>
625
+              <span class="text">{{item.count }}</span>
626
+            </div>
627
+          </div>
628
+        </div>
629
+        
630
+        <div  v-if="drugStockConfig.is_open == 1 ">
631
+          <div style="margin: 10px;border-bottom: 1px solid black;">
632
+            <span class="text">姓名</span>
633
+            <span class="text">条数</span>
634
+          </div>
635
+          <div v-for="item in tableData">
636
+            <div style="margin: 10px;border-bottom: 1px solid black;" @click="toExecutionPatent(item)">
637
+              <span class="text">{{getPaitenName(item.patient_id) }}</span>
638
+              <span class="text">{{item.count }}</span>
639
+            </div>
640
+          </div>
641
+        </div>
642
+      </van-popup>
643
+    </div>
644
+
645
+    <!-- <el-dialog
608 646
         title="未执行医嘱患者名单"
609 647
         :visible.sync="dialogVisible"
610 648
         width="60%">
@@ -662,7 +700,7 @@
662 700
           <el-button @click="dialogVisible = false">取 消</el-button>
663 701
           <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
664 702
         </span>
665
-      </el-dialog>
703
+      </el-dialog> -->
666 704
   </div>
667 705
 </template>
668 706
 <script>
@@ -760,6 +798,7 @@ export default {
760 798
       index: 0,
761 799
       dry_visibility:false,
762 800
       remind_lists:[],
801
+      showRight:false,
763 802
       // show_fixed_nav: false,
764 803
       patient_id: 0,
765 804
       date: 0,
@@ -858,6 +897,10 @@ export default {
858 897
         x: 0,
859 898
         y: 0
860 899
       },
900
+      positions: {
901
+        x: 0,
902
+        y: 0
903
+      },
861 904
       active: 0,
862 905
       nx: '',
863 906
       ny: '',
@@ -865,8 +908,16 @@ export default {
865 908
       dy: '',
866 909
       xPum: '',
867 910
       yPum: '',
911
+
912
+      nsx: '',
913
+      nsy: '',
914
+      dsx: '',
915
+      dsy: '',
916
+      xsPum: '',
917
+      ysPum: '',
868 918
       isShow: false,
869 919
       moveBtn: {},
920
+      moveBtns: {},
870 921
       is_project_open: 0,
871 922
       new_dialysis_goods: [],
872 923
       list: [],
@@ -1011,6 +1062,14 @@ export default {
1011 1062
     if (sessionStorage.getItem('checkBtnLeft')) {
1012 1063
       this.moveBtn.style.left = sessionStorage.getItem('checkBtnLeft')
1013 1064
     }
1065
+    this.moveBtns =this.$refs.moveBtns
1066
+    if (sessionStorage.getItem('checkBtnsTop')) {
1067
+      this.moveBtns.style.top = sessionStorage.getItem('checkBtnTop')
1068
+      this.moveBtns.style.bottom = 'initial'
1069
+    }
1070
+    if (sessionStorage.getItem('checkBtnsLeft')) {
1071
+      this.moveBtns.style.left = sessionStorage.getItem('checkBtnLeft')
1072
+    }
1014 1073
     window.addEventListener('scroll', this.handleScroll)
1015 1074
     this.appSource()
1016 1075
     const originHeight = document.documentElement.clientHeight || document.body.clientHeight
@@ -1136,6 +1195,62 @@ export default {
1136 1195
         passive: false
1137 1196
       })
1138 1197
     },
1198
+
1199
+    downs (event) {
1200
+      this.flags = true
1201
+      var touch
1202
+      if (event.touches) {
1203
+        touch = event.touches[0]
1204
+      } else {
1205
+        touch = event
1206
+      }
1207
+      this.positions.x = touch.clientX
1208
+      this.positions.y = touch.clientY
1209
+      this.dsx = this.moveBtns.offsetLeft
1210
+      this.dsy = this.moveBtns.offsetTop
1211
+    },
1212
+    moves (event) {
1213
+      if (this.flags) {
1214
+        var touch
1215
+        if (event.touches) {
1216
+          touch = event.touches[0]
1217
+        } else {
1218
+          touch = event
1219
+        }
1220
+        this.nsx = touch.clientX - this.positions.x
1221
+        this.nsy = touch.clientY - this.positions.y
1222
+        this.xsPum = this.dsx + this.nsx
1223
+        this.ysPum = this.dsy + this.nsy
1224
+        var clientWidth = document.documentElement.clientWidth
1225
+        var clientHeight = document.documentElement.clientHeight
1226
+        if (
1227
+          this.xsPum > 0 &&
1228
+          this.xsPum < clientWidth - this.moveBtns.offsetWidth
1229
+        ) {
1230
+          this.moveBtns.style.left = this.xsPum + 'px'
1231
+        }
1232
+        if (
1233
+          this.ysPum > 0 &&
1234
+          this.ysPum < clientHeight - this.moveBtns.offsetHeight
1235
+        ) {
1236
+          this.moveBtns.style.top = this.ysPum + 'px'
1237
+        }
1238
+
1239
+        // 阻止页面的滑动默认事件
1240
+        document.addEventListener('touchmove', this.handler, {
1241
+          passive: false
1242
+        })
1243
+      }
1244
+    },
1245
+    // 鼠标释放时候的函数
1246
+    ends () {
1247
+      this.flags = false
1248
+      sessionStorage.setItem('checkBtnTop', this.moveBtns.style.top)
1249
+      sessionStorage.setItem('checkBtnLeft', this.moveBtns.style.left)
1250
+      document.addEventListener('touchmove', this.handler, {
1251
+        passive: false
1252
+      })
1253
+    },
1139 1254
     handler () {
1140 1255
       if (this.flags) {
1141 1256
         event.preventDefault()
@@ -3704,7 +3819,7 @@ export default {
3704 3819
     })
3705 3820
   },
3706 3821
     toExecution(){
3707
-      this.dialogVisible = true
3822
+      this.showRight = true
3708 3823
     },
3709 3824
     toExecutionPatent(row){
3710 3825
      console.log("rowwoowowow",row)
@@ -3714,7 +3829,7 @@ export default {
3714 3829
      console.log("patient_id=",row.patient_id)
3715 3830
      console.log("datewoowo",row.advice_date)
3716 3831
      this.$router.push('/details?patient_id='+row.patient_id+"&date="+row.advice_date+"&patient_name="+patient_name)
3717
-     this.dialogVisible =false
3832
+     this.showRight =false
3718 3833
     },
3719 3834
     getPaitenName(patient_id){
3720 3835
       var name = ""
@@ -3838,6 +3953,21 @@ export default {
3838 3953
   background: #f6f6f6;
3839 3954
   width: 100%;
3840 3955
 }
3956
+.popup{
3957
+  .text{
3958
+    display: inline-block;
3959
+    width: 150px;
3960
+    height: 30px;
3961
+    font-size: 16px;
3962
+  }
3963
+  .mainBox .van-popup {
3964
+    top: 0%;
3965
+    right: -176px;
3966
+    -webkit-transform: translate3d(-50%, 0, 0);
3967
+    transform: translate3d(-50%, 0, 0);
3968
+    border-radius: 10px;
3969
+  }
3970
+}
3841 3971
 </style>
3842 3972
 <style style="stylesheet/scss" lang="scss" scoped>
3843 3973
 #today_panel {
@@ -3905,11 +4035,11 @@ export default {
3905 4035
   border-radius: 20px;
3906 4036
   color: #fff;
3907 4037
   background: #f56c6c;
3908
-  position: absolute;
4038
+  position: relative;
3909 4039
   border: 1px solid #fff;
3910
-  top: 0px;
4040
+  top: -47px;
3911 4041
   // right: -8px;
3912
-  left: 0px;
4042
+  left: -15px;
3913 4043
   @media only screen and (min-width: 768px) {
3914 4044
     height: 30px;
3915 4045
     width: 30px;
@@ -3929,6 +4059,7 @@ export default {
3929 4059
     height: 3.5rem;
3930 4060
   }
3931 4061
 }
4062
+
3932 4063
 .checkBox2 {
3933 4064
   position: fixed;
3934 4065
   left: 0.6rem;
@@ -3938,6 +4069,18 @@ export default {
3938 4069
     height: 3.5rem;
3939 4070
   }
3940 4071
 }
4072
+.checkBox3 {
4073
+  position: fixed;
4074
+  right: 0.6rem;
4075
+  bottom: 7.5rem;
4076
+  width: 100px;
4077
+  height: 100px;
4078
+  img {
4079
+    width: 3.5rem;
4080
+    height: 3.5rem;
4081
+  }
4082
+}
4083
+
3941 4084
 .contagionImg{
3942 4085
   width: 1rem !important;
3943 4086
   height: 1rem !important;