seimin vor 2 Tagen
Ursprung
Commit
5f937daac8

+ 2 - 1
.eslintrc.js

@@ -13,5 +13,6 @@ module.exports = {
13 13
   rules: {
14 14
     'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15 15
     'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
16
-  }
16
+  },
17
+  ignorePatterns: ['src/assets/**'] // 忽略 assets 下所有文件
17 18
 }

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
5 5
   "scripts": {
6 6
     "start": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
7 7
     "build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
8
-    "lint": "vue-cli-service lint",
8
+    "lint": "vue-cli-service lint --no-fix",
9 9
     "development": "node ./upload/development.js",
10 10
     "development120": "node ./upload/development120.js",
11 11
     "production": "node ./upload/production.js"

Datei-Diff unterdrückt, da er zu groß ist
+ 3204 - 1070
src/assets/font/demo_index.html


+ 509 - 141
src/assets/font/iconfont.css

@@ -1,8 +1,8 @@
1
-@font-face {font-family: "icon_transport";
2
-  src: url('iconfont.eot?t=1592895040969'); /* IE9 */
3
-  src: url('iconfont.woff?t=1592895040969') format('woff'),
4
-  url('iconfont.ttf?t=1592895040969') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
5
-  url('iconfont.svg?t=1592895040969#icon_transport') format('svg'); /* iOS 4.1- */
1
+@font-face {
2
+  font-family: "icon_transport"; /* Project id 4543613 */
3
+  src: url('iconfont.woff2?t=1750225745603') format('woff2'),
4
+       url('iconfont.woff?t=1750225745603') format('woff'),
5
+       url('iconfont.ttf?t=1750225745603') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,236 +13,320 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
-.transport-laba1:before {
17
-  content: "\e681";
16
+.transport-tianjiahover:before {
17
+  content: "\e675";
18 18
 }
19 19
 
20
-.transport-erweima:before {
21
-  content: "\e606";
20
+.transport-renwuguanli:before {
21
+  content: "\e688";
22 22
 }
23 23
 
24
-.transport-chaoshi:before {
25
-  content: "\e63b";
24
+.transport-wendangguanli:before {
25
+  content: "\ea41";
26 26
 }
27 27
 
28
-.transport-guanbi1:before {
29
-  content: "\e658";
28
+.transport-xiaoxi:before {
29
+  content: "\e617";
30 30
 }
31 31
 
32
-.transport-lingdang:before {
33
-  content: "\e60d";
32
+.transport-bg-add:before {
33
+  content: "\e671";
34 34
 }
35 35
 
36
-.transport-peijianlunyitubiao:before {
37
-  content: "\e655";
36
+.transport-dabao:before {
37
+  content: "\e674";
38 38
 }
39 39
 
40
-.transport-ccgl-kuneizhuanyi-1:before {
41
-  content: "\e6e5";
40
+.transport-peihuguanli:before {
41
+  content: "\e670";
42 42
 }
43 43
 
44
-.transport-qita1:before {
45
-  content: "\e663";
44
+.transport-shujushengchengguize:before {
45
+  content: "\e6e1";
46 46
 }
47 47
 
48
-.transport--:before {
49
-  content: "\e60b";
48
+.transport-fanhui:before {
49
+  content: "\e67a";
50 50
 }
51 51
 
52
-.transport-yaopin:before {
53
-  content: "\e604";
52
+.transport-top1:before {
53
+  content: "\e66c";
54 54
 }
55 55
 
56
-.transport-biaobencaiji:before {
57
-  content: "\e6ea";
56
+.transport-top2:before {
57
+  content: "\e6b1";
58 58
 }
59 59
 
60
-.transport-icon_liucheng:before {
61
-  content: "\e636";
60
+.transport-top31:before {
61
+  content: "\e66e";
62 62
 }
63 63
 
64
-.transport-zhengchang:before {
65
-  content: "\e63e";
64
+.transport-top5:before {
65
+  content: "\e66f";
66 66
 }
67 67
 
68
-.transport-yichang:before {
69
-  content: "\e63a";
68
+.transport-top4:before {
69
+  content: "\e661";
70 70
 }
71 71
 
72
-.transport-qita:before {
73
-  content: "\e60f";
72
+.transport-top3:before {
73
+  content: "\e667";
74 74
 }
75 75
 
76
-.transport-shuyeguanli:before {
77
-  content: "\e678";
76
+.transport-top:before {
77
+  content: "\e66a";
78 78
 }
79 79
 
80
-.transport-yidonghuliicon_biaobenliuqu:before {
81
-  content: "\e61b";
80
+.transport-tongji-2:before {
81
+  content: "\e66d";
82 82
 }
83 83
 
84
-.transport-saoma:before {
85
-  content: "\e660";
84
+.transport-jiantou_zuoyouqiehuan:before {
85
+  content: "\eb0d";
86 86
 }
87 87
 
88
-.transport-shezhi:before {
89
-  content: "\e62f";
88
+.transport-gengduo:before {
89
+  content: "\e665";
90 90
 }
91 91
 
92
-.transport-required:before {
93
-  content: "\e603";
92
+.transport-jiaobiao:before {
93
+  content: "\e65e";
94 94
 }
95 95
 
96
-.transport-yunzhuanzhentongjiicon-:before {
97
-  content: "\e61a";
96
+.transport-xiajiantou:before {
97
+  content: "\e65d";
98 98
 }
99 99
 
100
-.transport-tag27fuben:before {
101
-  content: "\e614";
100
+.transport-hushi1:before {
101
+  content: "\e65c";
102 102
 }
103 103
 
104
-.transport-qidian:before {
105
-  content: "\e6e7";
104
+.transport-xiangyou1:before {
105
+  content: "\e65a";
106 106
 }
107 107
 
108
-.transport-search:before {
109
-  content: "\e651";
108
+.transport-yaopinshuju:before {
109
+  content: "\e65b";
110 110
 }
111 111
 
112
-.transport-shouye10:before {
113
-  content: "\e63f";
112
+.transport-biaobenxinxi:before {
113
+  content: "\e666";
114 114
 }
115 115
 
116
-.transport-shouye9:before {
117
-  content: "\e629";
116
+.transport-baoxiu:before {
117
+  content: "\e6cd";
118 118
 }
119 119
 
120
-.transport-luyin:before {
121
-  content: "\e6c5";
120
+.transport-RectangleCopy:before {
121
+  content: "\e6ae";
122 122
 }
123 123
 
124
-.transport-xiala2:before {
125
-  content: "\e669";
124
+.transport-hushizhihanghuligongzuo:before {
125
+  content: "\e7ba";
126 126
 }
127 127
 
128
-.transport-wenhao:before {
129
-  content: "\e7d2";
128
+.transport-peizhi1:before {
129
+  content: "\e6bb";
130 130
 }
131 131
 
132
-.transport-keshidaozhen:before {
133
-  content: "\ead2";
132
+.transport-shaixuan:before {
133
+  content: "\e659";
134 134
 }
135 135
 
136
-.transport-yi-peisong:before {
137
-  content: "\e647";
136
+.transport-shangban:before {
137
+  content: "\e695";
138 138
 }
139 139
 
140
-.transport-wei-peisong:before {
141
-  content: "\e662";
140
+.transport-tiaodu-fill:before {
141
+  content: "\e6b5";
142 142
 }
143 143
 
144
-.transport-shujuyuanzongshu:before {
145
-  content: "\e650";
144
+.transport-hushi:before {
145
+  content: "\e657";
146 146
 }
147 147
 
148
-.transport-tongji:before {
149
-  content: "\e6db";
148
+.transport-xiazai:before {
149
+  content: "\e62b";
150 150
 }
151 151
 
152
-.transport-shouye8:before {
153
-  content: "\e621";
152
+.transport-tuli:before {
153
+  content: "\e656";
154 154
 }
155 155
 
156
-.transport-icon3:before {
157
-  content: "\e654";
156
+.transport-shenti:before {
157
+  content: "\e649";
158 158
 }
159 159
 
160
-.transport-tongjibaobiao:before {
161
-  content: "\e677";
160
+.transport-a-iconPark-shopping-cart-addCopy:before {
161
+  content: "\e64c";
162 162
 }
163 163
 
164
-.transport-chuangwei:before {
165
-  content: "\e64a";
164
+.transport-icon_biaoben:before {
165
+  content: "\e64d";
166 166
 }
167 167
 
168
-.transport-paixu-shang:before {
169
-  content: "\eeeb";
168
+.transport-tianjia:before {
169
+  content: "\e717";
170 170
 }
171 171
 
172
-.transport-paixu-xia:before {
173
-  content: "\eeec";
172
+.transport-bar-code:before {
173
+  content: "\e952";
174 174
 }
175 175
 
176
-.transport-paixujiantoushang:before {
177
-  content: "\e7fe";
176
+.transport-a-11111:before {
177
+  content: "\e62a";
178 178
 }
179 179
 
180
-.transport-paixujiantouxia:before {
181
-  content: "\e7ff";
180
+.transport-shixian:before {
181
+  content: "\e887";
182 182
 }
183 183
 
184
-.transport-webicon19:before {
185
-  content: "\e67d";
184
+.transport-shimang1:before {
185
+  content: "\e7bd";
186 186
 }
187 187
 
188
-.transport-webicon206:before {
189
-  content: "\e684";
188
+.transport-yuyinbofang:before {
189
+  content: "\e636";
190 190
 }
191 191
 
192
-.transport-xiangyou:before {
193
-  content: "\e637";
192
+.transport-laidian:before {
193
+  content: "\e89d";
194 194
 }
195 195
 
196
-.transport-xiangzuo2:before {
197
-  content: "\e6b0";
196
+.transport-tonghuazhong:before {
197
+  content: "\e679";
198 198
 }
199 199
 
200
-.transport-shiwujiaoxing:before {
200
+.transport-peisongchenggong:before {
201
+  content: "\e623";
202
+}
203
+
204
+.transport-required:before {
205
+  content: "\e606";
206
+}
207
+
208
+.transport-disanfang:before {
209
+  content: "\e76e";
210
+}
211
+
212
+.transport-shijianpeizhi5:before {
213
+  content: "\e645";
214
+}
215
+
216
+.transport-shibai1:before {
201 217
   content: "\e635";
202 218
 }
203 219
 
204
-.transport-xialajiantou:before {
205
-  content: "\e638";
220
+.transport-kuaisubaoxiu:before {
221
+  content: "\e689";
206 222
 }
207 223
 
208
-.transport-fuxuankuang:before {
209
-  content: "\e639";
224
+.transport-bg-question:before {
225
+  content: "\e648";
210 226
 }
211 227
 
212
-.transport-fuxuankuang-:before {
213
-  content: "\e646";
228
+.transport-guanbi2:before {
229
+  content: "\e610";
214 230
 }
215 231
 
216
-.transport-xiangzuo1:before {
217
-  content: "\e673";
232
+.transport-guanbi3:before {
233
+  content: "\e622";
218 234
 }
219 235
 
220
-.transport-xiaoxi:before {
221
-  content: "\e617";
236
+.transport-Icon-tongjifenxi:before {
237
+  content: "\e611";
222 238
 }
223 239
 
224
-.transport-shangla-:before {
225
-  content: "\e628";
240
+.transport-zichan:before {
241
+  content: "\e630";
226 242
 }
227 243
 
228
-.transport-shuangjiantouxiangyou-:before {
229
-  content: "\e71e";
244
+.transport-kongzhi:before {
245
+  content: "\e653";
230 246
 }
231 247
 
232
-.transport-shibai:before {
233
-  content: "\e626";
248
+.transport-jiandantongji:before {
249
+  content: "\e690";
234 250
 }
235 251
 
236
-.transport-duigou:before {
252
+.transport-peizhizhongxin:before {
253
+  content: "\e6af";
254
+}
255
+
256
+.transport-24gf-tags:before {
257
+  content: "\e885";
258
+}
259
+
260
+.transport-weibiaoti2010104:before {
261
+  content: "\e644";
262
+}
263
+
264
+.transport-shanchu1:before {
265
+  content: "\e74b";
266
+}
267
+
268
+.transport-shuye:before {
269
+  content: "\e627";
270
+}
271
+
272
+.transport-shuye1:before {
273
+  content: "\e62c";
274
+}
275
+
276
+.transport-xunjian:before {
277
+  content: "\e6c6";
278
+}
279
+
280
+.transport-dingdanliebiao:before {
281
+  content: "\e719";
282
+}
283
+
284
+.transport-rili:before {
285
+  content: "\e64b";
286
+}
287
+
288
+.transport-keshijieshao:before {
289
+  content: "\e600";
290
+}
291
+
292
+.transport-xiala11:before {
293
+  content: "\e66b";
294
+}
295
+
296
+.transport-shouye:before {
297
+  content: "\e605";
298
+}
299
+
300
+.transport-liebiao1:before {
301
+  content: "\e632";
302
+}
303
+
304
+.transport-tongjifenxi:before {
305
+  content: "\e712";
306
+}
307
+
308
+.transport-xiangzuo:before {
237 309
   content: "\e602";
238 310
 }
239 311
 
240
-.transport-shouye7:before {
241
-  content: "\e619";
312
+.transport-haoping:before {
313
+  content: "\e612";
242 314
 }
243 315
 
244
-.transport-xiala2-01:before {
245
-  content: "\e62e";
316
+.transport-gengduoda:before {
317
+  content: "\e634";
318
+}
319
+
320
+.transport-shouye1:before {
321
+  content: "\e62d";
322
+}
323
+
324
+.transport-haoping1:before {
325
+  content: "\e640";
326
+}
327
+
328
+.transport-guanbi:before {
329
+  content: "\e60c";
246 330
 }
247 331
 
248 332
 .transport-xiala:before {
@@ -285,51 +369,335 @@
285 369
   content: "\e668";
286 370
 }
287 371
 
288
-.transport-xiangzuo:before {
289
-  content: "\e601";
372
+.transport-shouye7:before {
373
+  content: "\e619";
290 374
 }
291 375
 
292
-.transport-haoping:before {
293
-  content: "\e612";
376
+.transport-xiala2-01:before {
377
+  content: "\e62e";
294 378
 }
295 379
 
296
-.transport-gengduoda:before {
297
-  content: "\e633";
380
+.transport-shibai:before {
381
+  content: "\e626";
298 382
 }
299 383
 
300
-.transport-shouye1:before {
301
-  content: "\e62d";
384
+.transport-duigou:before {
385
+  content: "\e603";
302 386
 }
303 387
 
304
-.transport-haoping1:before {
305
-  content: "\e640";
388
+.transport-shuangjiantouxiangyou-:before {
389
+  content: "\e71e";
306 390
 }
307 391
 
308
-.transport-guanbi:before {
309
-  content: "\e60c";
392
+.transport-shangla-:before {
393
+  content: "\e628";
394
+}
395
+
396
+.transport-xiangzuo1:before {
397
+  content: "\e673";
398
+}
399
+
400
+.transport-fuxuankuang:before {
401
+  content: "\e639";
402
+}
403
+
404
+.transport-fuxuankuang-:before {
405
+  content: "\e646";
406
+}
407
+
408
+.transport-xialajiantou:before {
409
+  content: "\e638";
410
+}
411
+
412
+.transport-shiwujiaoxing:before {
413
+  content: "\e637";
414
+}
415
+
416
+.transport-xiangyou:before {
417
+  content: "\e63a";
418
+}
419
+
420
+.transport-xiangzuo2:before {
421
+  content: "\e6b0";
422
+}
423
+
424
+.transport-webicon19:before {
425
+  content: "\e67d";
426
+}
427
+
428
+.transport-webicon206:before {
429
+  content: "\e684";
430
+}
431
+
432
+.transport-paixujiantoushang:before {
433
+  content: "\e7fe";
434
+}
435
+
436
+.transport-paixujiantouxia:before {
437
+  content: "\e7ff";
438
+}
439
+
440
+.transport-paixu-shang:before {
441
+  content: "\eeeb";
442
+}
443
+
444
+.transport-paixu-xia:before {
445
+  content: "\eeec";
446
+}
447
+
448
+.transport-shouye8:before {
449
+  content: "\e621";
450
+}
451
+
452
+.transport-icon3:before {
453
+  content: "\e654";
454
+}
455
+
456
+.transport-tongjibaobiao:before {
457
+  content: "\e677";
458
+}
459
+
460
+.transport-chuangwei:before {
461
+  content: "\e64a";
462
+}
463
+
464
+.transport-tongji:before {
465
+  content: "\e6db";
466
+}
467
+
468
+.transport-yi-peisong:before {
469
+  content: "\e647";
470
+}
471
+
472
+.transport-wei-peisong:before {
473
+  content: "\e663";
474
+}
475
+
476
+.transport-shujuyuanzongshu:before {
477
+  content: "\e650";
478
+}
479
+
480
+.transport-keshidaozhen:before {
481
+  content: "\ead2";
482
+}
483
+
484
+.transport-shouye9:before {
485
+  content: "\e629";
486
+}
487
+
488
+.transport-luyin:before {
489
+  content: "\e6c5";
490
+}
491
+
492
+.transport-xiala2:before {
493
+  content: "\e669";
494
+}
495
+
496
+.transport-wenhao:before {
497
+  content: "\e7d2";
498
+}
499
+
500
+.transport-shouye10:before {
501
+  content: "\e63f";
502
+}
503
+
504
+.transport-shezhi:before {
505
+  content: "\e62f";
506
+}
507
+
508
+.transport-yunzhuanzhentongjiicon-:before {
509
+  content: "\e61b";
510
+}
511
+
512
+.transport-tag27fuben:before {
513
+  content: "\e614";
514
+}
515
+
516
+.transport-qidian:before {
517
+  content: "\e6e7";
518
+}
519
+
520
+.transport-search:before {
521
+  content: "\e651";
522
+}
523
+
524
+.transport-qita:before {
525
+  content: "\e60f";
526
+}
527
+
528
+.transport-shuyeguanli:before {
529
+  content: "\e678";
530
+}
531
+
532
+.transport-yidonghuliicon_biaobenliuqu:before {
533
+  content: "\e61d";
534
+}
535
+
536
+.transport-zhengchang:before {
537
+  content: "\e63e";
538
+}
539
+
540
+.transport-yichang:before {
541
+  content: "\e63b";
542
+}
543
+
544
+.transport-icon_liucheng:before {
545
+  content: "\e63c";
546
+}
547
+
548
+.transport-peijianlunyitubiao:before {
549
+  content: "\e655";
550
+}
551
+
552
+.transport-ccgl-kuneizhuanyi-1:before {
553
+  content: "\e6e5";
554
+}
555
+
556
+.transport-qita1:before {
557
+  content: "\e664";
558
+}
559
+
560
+.transport--:before {
561
+  content: "\e60b";
562
+}
563
+
564
+.transport-yaopin:before {
565
+  content: "\e607";
566
+}
567
+
568
+.transport-biaobencaiji:before {
569
+  content: "\e6ea";
570
+}
571
+
572
+.transport-erweima:before {
573
+  content: "\e608";
574
+}
575
+
576
+.transport-chaoshi:before {
577
+  content: "\e63d";
578
+}
579
+
580
+.transport-guanbi1:before {
581
+  content: "\e658";
582
+}
583
+
584
+.transport-lingdang:before {
585
+  content: "\e60d";
586
+}
587
+
588
+.transport-laba1:before {
589
+  content: "\e681";
590
+}
591
+
592
+.transport-iconfontcrmtubiao68:before {
593
+  content: "\e61f";
594
+}
595
+
596
+.transport-qiehuan:before {
597
+  content: "\e641";
598
+}
599
+
600
+.transport-duigou1:before {
601
+  content: "\e618";
602
+}
603
+
604
+.transport-shishijiankong_lunxun:before {
605
+  content: "\e643";
606
+}
607
+
608
+.transport-zhongdianguanzhu:before {
609
+  content: "\e609";
610
+}
611
+
612
+.transport-lajitong:before {
613
+  content: "\e631";
614
+}
615
+
616
+.transport-tubiao_wei:before {
617
+  content: "\e6b4";
618
+}
619
+
620
+.transport-zhong:before {
621
+  content: "\e69f";
622
+}
623
+
624
+.transport-1_round_solid:before {
625
+  content: "\e64e";
626
+}
627
+
628
+.transport-2_round_solid:before {
629
+  content: "\e64f";
630
+}
631
+
632
+.transport-3_round_solid:before {
633
+  content: "\e652";
634
+}
635
+
636
+.transport-zhong1:before {
637
+  content: "\e61e";
638
+}
639
+
640
+.transport-te1:before {
641
+  content: "\e739";
642
+}
643
+
644
+.transport-wei:before {
645
+  content: "\e620";
646
+}
647
+
648
+.transport-Bduanshuzi:before {
649
+  content: "\e624";
650
+}
651
+
652
+.transport-Bduanshuzi1:before {
653
+  content: "\e625";
654
+}
655
+
656
+.transport-Bduanshuzi11:before {
657
+  content: "\e60e";
658
+}
659
+
660
+.transport-zu1468:before {
661
+  content: "\e6b6";
662
+}
663
+
664
+.transport-arrow-right-full:before {
665
+  content: "\ea66";
666
+}
667
+
668
+.transport-gengduoda-copy:before {
669
+  content: "\eeed";
310 670
 }
311 671
 
312 672
 .transport-sousuo:before {
313
-  content: "\e634";
673
+  content: "\e633";
674
+}
675
+
676
+.transport-tongji6:before {
677
+  content: "\e6d1";
678
+}
679
+
680
+.transport-liebiao:before {
681
+  content: "\e61a";
314 682
 }
315 683
 
316 684
 .transport-xiala1:before {
317
-  content: "\e66b";
685
+  content: "\e662";
318 686
 }
319 687
 
320
-.transport-shouye:before {
321
-  content: "\e605";
688
+.transport-saoma:before {
689
+  content: "\e660";
322 690
 }
323 691
 
324
-.transport-liebiao:before {
325
-  content: "\e632";
692
+.transport-yifeiguanli:before {
693
+  content: "\e60a";
326 694
 }
327 695
 
328
-.transport-tongjifenxi:before {
329
-  content: "\e712";
696
+.transport-a-ziyuan7:before {
697
+  content: "\e604";
330 698
 }
331 699
 
332
-.transport-keshijieshao:before {
333
-  content: "\e600";
700
+.transport-a-ziyuan3:before {
701
+  content: "\e601";
334 702
 }
335 703
 

BIN
src/assets/font/iconfont.eot


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
src/assets/font/iconfont.js


Datei-Diff unterdrückt, da er zu groß ist
+ 995 - 351
src/assets/font/iconfont.json


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 266
src/assets/font/iconfont.svg


BIN
src/assets/font/iconfont.ttf


BIN
src/assets/font/iconfont.woff


BIN
src/assets/font/iconfont.woff2


+ 0 - 1
src/assets/less/style.less

@@ -17,7 +17,6 @@ html {
17 17
 
18 18
 body {
19 19
   font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
20
-  line-height: 1.2em;
21 20
   margin: 0;
22 21
   padding: 0;
23 22
 }

+ 2 - 47
src/components/AppCumulative.vue

@@ -1,60 +1,15 @@
1 1
 <template>
2 2
   <div class="app-header__contentNews">
3 3
     <div class="app-header__contentNewsItem">
4
-      <strong>累计 | </strong>工单数:
5
-      <em>{{allData[0]|formatNum}}</em>
6
-    </div>
7
-    <div class="app-header__contentNewsItem">
8
-      标本送检:
9
-      <em>{{allData[1]|formatNum}}</em>
10
-    </div>
11
-    <div class="app-header__contentNewsItem">
12
-      患者陪检:
13
-      <em>{{allData[2]|formatNum}}</em>
4
+
14 5
     </div>
15 6
   </div>
16 7
 </template>
17 8
 
18 9
 <script>
19
-import { post, timer1 } from './../http/http'
20 10
 export default {
21 11
   name: 'AppCumulative',
22
-  inject: ['hospitalId'],
23
-  data () {
24
-    return {
25
-      allData: [], // 数据
26
-      timer: null// 轮询定时器
27
-    }
28
-  },
29
-  filters: {
30
-    formatNum (v) {
31
-      v = v ? v.toString() : ''
32
-      return v > 100000 ? v.slice(0, v.length - 4) + '万' : v
33
-    }
34
-  },
35
-  methods: {
36
-    // 获取今日新冠送检,今日标本运输数,今日患者陪检
37
-    async getTodayData () {
38
-      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
39
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
40
-      const result = await post(`/largeScreen/getData/getOrderTotal/${this.hospitalId}`, { srartTime, endTime })
41
-      this.allData = result.list[0]
42
-      this.polling()
43
-    },
44
-    // 轮询请求
45
-    polling () {
46
-      clearTimeout(this.timer)
47
-      this.timer = setTimeout(() => {
48
-        this.getTodayData()
49
-      }, timer1)
50
-    }
51
-  },
52
-  mounted () {
53
-    this.getTodayData()
54
-  },
55
-  beforeDestroy () {
56
-    clearTimeout(this.timer)
57
-  }
12
+  inject: ['parentDutyId', 'hosId', 'dutyId']
58 13
 }
59 14
 </script>
60 15
 

+ 44 - 33
src/components/AppHeader.vue

@@ -7,7 +7,6 @@
7 7
       <div class="app-header__main--leftBottom"></div>
8 8
       <div class="app-header__main--rightBottom"></div>
9 9
       <h1 class="app-header__title">
10
-        <img class="app-header__logo" :src="faviconUrl" />
11 10
         {{logoTitle}}
12 11
       </h1>
13 12
     </div>
@@ -16,7 +15,7 @@
16 15
       <!-- 累计工单数,标本送检,患者陪检 -->
17 16
       <div class="app-header__contentToday">
18 17
         <!-- 今日工单数,标本送检,陪检人次 -->
19
-        <AppToday></AppToday>
18
+        <AppToday :faviconUrl="faviconUrl"></AppToday>
20 19
         <!-- /今日工单数,标本送检,陪检人次 -->
21 20
       </div>
22 21
       <!-- /累计工单数,标本送检,患者陪检 -->
@@ -26,7 +25,7 @@
26 25
         </div>
27 26
         <!-- 时间 -->
28 27
         <div class="app-header__contentTime">
29
-          {{ time | weekFormat }}<time>{{ time | timeFormat }}</time>
28
+          {{ time | dateFormat }}<time>{{ time | weekFormat }}</time><time>{{ time | timeFormat }}</time>
30 29
         </div>
31 30
         <!-- /时间 -->
32 31
       </div>
@@ -54,6 +53,22 @@ export default {
54 53
     }
55 54
   },
56 55
   filters: {
56
+    // 格式化日期
57
+    dateFormat (time) {
58
+      const newDate = new Date(time)
59
+      const years = newDate
60
+        .getFullYear()
61
+        .toString()
62
+        .padStart(2, '0')
63
+      const months = (newDate.getMonth() + 1)
64
+        .toString()
65
+        .padStart(2, '0')
66
+      const days = newDate
67
+        .getDay()
68
+        .toString()
69
+        .padStart(2, '0')
70
+      return `${years}年${months}月${days}日`
71
+    },
57 72
     // 格式化时间
58 73
     timeFormat (time) {
59 74
       const newDate = new Date(time)
@@ -69,7 +84,7 @@ export default {
69 84
         .getSeconds()
70 85
         .toString()
71 86
         .padStart(2, '0')
72
-      return `${hours}:${minutes}:${seconds}`
87
+      return `${hours}:${minutes}:${seconds}`
73 88
     },
74 89
     // 获得当前的星期
75 90
     weekFormat (time) {
@@ -125,40 +140,35 @@ export default {
125 140
 <style lang="less">
126 141
 .app-header {
127 142
   position: relative;
128
-  height: 1.375rem;
129
-  padding-top: 0.2rem;
143
+  height: 1.175rem;
130 144
   // 边框线
131 145
   .app-header__main {
132 146
     width: 5.15rem;
133 147
     height: 0.675rem;
134 148
     margin: 0 auto;
135
-    border-bottom: 1px solid #68ffff;
149
+    border-bottom: 2px solid #15B2EC;
136 150
     position: relative;
137 151
     .app-header__title {
138 152
       display: flex;
139 153
       justify-content: center;
140 154
       align-items: center;
141
-      .app-header__logo {
142
-        max-width: 0.6125rem;
143
-        max-height: 0.6125rem;
144
-        margin-right: 0.1rem;
145
-      }
155
+      font-weight: bold;
146 156
     }
147 157
     .app-header__main--left {
148 158
       position: absolute;
149
-      width: calc(50vw - 3.17rem);
150
-      height: 1px;
151
-      background-image: linear-gradient(#30c8ff, #68f8ff);
152
-      top: 1px;
153
-      left: calc(2.81rem - 50vw);
159
+      width: calc(50vw - 2.81rem);
160
+      height: 2px;
161
+      background-color: #15B2EC;
162
+      top: 2px;
163
+      left: calc(2.45rem - 50vw);
154 164
     }
155 165
     .app-header__main--right {
156 166
       position: absolute;
157
-      width: calc(50vw - 3.17rem);
158
-      height: 1px;
159
-      background-image: linear-gradient(#68f8ff, #30c8ff);
160
-      top: 1px;
161
-      right: calc(2.81rem - 50vw);
167
+      width: calc(50vw - 2.81rem);
168
+      height: 2px;
169
+      background-color: #15B2EC;
170
+      top: 2px;
171
+      right: calc(2.45rem - 50vw);
162 172
     }
163 173
     .app-header__main--leftBottom {
164 174
       position: absolute;
@@ -168,7 +178,7 @@ export default {
168 178
       height: 0.075rem;
169 179
       background-color: rgba(253, 255, 250, 0.2);
170 180
       transform: skewX(45deg);
171
-      border-top: 1px solid #489ec9;
181
+      border-top: 2px solid #309BC5;
172 182
     }
173 183
     .app-header__main--rightBottom {
174 184
       position: absolute;
@@ -178,26 +188,26 @@ export default {
178 188
       height: 0.075rem;
179 189
       background-color: rgba(253, 255, 250, 0.2);
180 190
       transform: skewX(-45deg);
181
-      border-top: 1px solid #489ec9;
191
+      border-top: 2px solid #309BC5;
182 192
     }
183 193
     &::before {
184 194
       content: "";
185 195
       position: absolute;
186
-      left: -0.61rem;
187
-      bottom: 0.21rem;
188
-      width: 0.75rem;
196
+      left: -0.6rem;
197
+      bottom: 0.2rem;
198
+      width: 0.74rem;
189 199
       height: 0.125rem;
190
-      border-top: 1px solid #5ceef9;
200
+      border-top: 2px solid #15B2EC;
191 201
       transform: rotate(60deg);
192 202
     }
193 203
     &::after {
194 204
       content: "";
195 205
       position: absolute;
196
-      right: -0.61rem;
197
-      bottom: 0.21rem;
198
-      width: 0.75rem;
206
+      right: -0.6rem;
207
+      bottom: 0.2rem;
208
+      width: 0.74rem;
199 209
       height: 0.125rem;
200
-      border-top: 1px solid #5ceef9;
210
+      border-top: 2px solid #15B2EC;
201 211
       transform: rotate(-60deg);
202 212
     }
203 213
     .app-header__title {
@@ -209,6 +219,7 @@ export default {
209 219
       display: flex;
210 220
       justify-content: center;
211 221
       align-items: center;
222
+      letter-spacing: .025rem;
212 223
     }
213 224
   }
214 225
   // 头部内容
@@ -247,7 +258,7 @@ export default {
247 258
       justify-content: space-between;
248 259
       .app-header__contentTime {
249 260
         color: #fff;
250
-        font-size: 0.26rem;
261
+        font-size: .325rem;
251 262
         time {
252 263
           margin-left: 0.1rem;
253 264
         }

+ 11 - 40
src/components/AppToday.vue

@@ -1,56 +1,27 @@
1 1
 <template>
2 2
   <div class="app-header__contentNews">
3 3
     <div class="app-header__contentNewsItem">
4
-      <strong>今日</strong>工单数:
5
-      <em>{{allData[0]}}</em>
6
-    </div>
7
-    <div class="app-header__contentNewsItem">
8
-      <strong>今日</strong>标本送检:
9
-      <em>{{allData[1]}}</em>
10
-    </div>
11
-    <div class="app-header__contentNewsItem">
12
-      <strong>今日</strong>陪检人次:
13
-      <em>{{allData[2]}}</em>
4
+      <img class="app-header__logo" :src="faviconUrl" />
14 5
     </div>
15 6
   </div>
16 7
 </template>
17 8
 
18 9
 <script>
19
-import { post, timer1 } from './../http/http'
20 10
 export default {
21 11
   name: 'AppToday',
22
-  inject: ['hospitalId'],
23
-  data () {
24
-    return {
25
-      allData: [], // 数据
26
-      timer: null// 轮询定时器
27
-    }
28
-  },
29
-  methods: {
30
-    // 获取今日新冠送检,今日标本运输数,今日患者陪检
31
-    async getTodayData () {
32
-      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
33
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
34
-      const result = await post(`/largeScreen/getData/getTodayTitleNew/${this.hospitalId}`, { srartTime, endTime })
35
-      this.allData = result.list[0]
36
-      this.polling()
37
-    },
38
-    // 轮询请求
39
-    polling () {
40
-      clearTimeout(this.timer)
41
-      this.timer = setTimeout(() => {
42
-        this.getTodayData()
43
-      }, timer1)
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13
+  props: {
14
+    faviconUrl: {
15
+      type: String,
16
+      default: ''
44 17
     }
45
-  },
46
-  mounted () {
47
-    this.getTodayData()
48
-  },
49
-  beforeDestroy () {
50
-    clearTimeout(this.timer)
51 18
   }
52 19
 }
53 20
 </script>
54 21
 
55
-<style lang="less">
22
+<style lang="less" scoped>
23
+.app-header__logo {
24
+  max-width: .7rem;
25
+  max-height: .7rem;
26
+}
56 27
 </style>

+ 0 - 298
src/components/BusinessTypeRatio.vue

@@ -1,298 +0,0 @@
1
-<template>
2
-  <div class="business-type-ratio" ref="BusinessTypeRatio"></div>
3
-</template>
4
-
5
-<script>
6
-import echarts from 'echarts'
7
-import { post, timer10 } from './../http/http'
8
-export default {
9
-  name: 'BusinessTypeRatio',
10
-  inject: ['hospitalId'],
11
-  data () {
12
-    return {
13
-      timer: null,
14
-      myChart: null,
15
-      associationTypeProportion: [],
16
-      associationTypeProportionNum: [],
17
-      associationTypeProportionName: [],
18
-      associationTypeProportionAll: []
19
-    }
20
-  },
21
-  methods: {
22
-    // 画图
23
-    draw () {
24
-      const that = this
25
-      this.myChart = echarts.init(this.$refs.BusinessTypeRatio)
26
-      const option = {
27
-        tooltip: {
28
-          trigger: 'item',
29
-          formatter: '{a} <br/>{b} : {c} ({d}%)'
30
-        },
31
-        grid: {
32
-          show: false,
33
-          top: '5%',
34
-          left: '5%',
35
-          right: '5%',
36
-          bottom: '0%'
37
-        },
38
-        // legend: {
39
-        //   left: '20%',
40
-        //   orient: 'horizontal',
41
-        //   itemWidth: 8,
42
-        //   itemHeight: 8,
43
-        //   icon: 'rect',
44
-        //   bottom: '0%',
45
-        //   data: this.associationTypeProportionName,
46
-        //   textStyle: {
47
-        //     color: '#fff'
48
-        //   },
49
-        //   formatter (name) {
50
-        //     const arr = that.associationTypeProportionAll.filter(item => item[0] === name)
51
-        //     return `${name} ${arr[0][1]}单 ${arr[0][2]}%`
52
-        //   }
53
-        // },
54
-        legend: [
55
-          {
56
-            right: '55%',
57
-            orient: 'horizontal',
58
-            itemWidth: 8,
59
-            itemHeight: 8,
60
-            icon: 'rect',
61
-            bottom: '20%',
62
-            data: this.associationTypeProportionName.slice(
63
-              0,
64
-              Math.ceil(this.associationTypeProportionName.length / 2)
65
-            ),
66
-            textStyle: {
67
-              color: '#fff'
68
-            },
69
-            formatter (name) {
70
-              const arr = that.associationTypeProportionAll.filter(
71
-                (item) => item[0] === name
72
-              )
73
-              return `${name} ${arr[0][1]}单 ${arr[0][2]}%`
74
-            }
75
-          },
76
-          {
77
-            left: '55%',
78
-            orient: 'horizontal',
79
-            itemWidth: 8,
80
-            itemHeight: 8,
81
-            icon: 'rect',
82
-            bottom: '24%',
83
-            data: this.associationTypeProportionName.slice(
84
-              Math.ceil(this.associationTypeProportionName.length / 2),
85
-              this.associationTypeProportionName.length
86
-            ),
87
-            textStyle: {
88
-              color: '#fff'
89
-            },
90
-            formatter (name) {
91
-              const arr = that.associationTypeProportionAll.filter(
92
-                (item) => item[0] === name
93
-              )
94
-              return `${name} ${arr[0][1]}单 ${arr[0][2]}%`
95
-            }
96
-          }
97
-        ],
98
-        color: [
99
-          {
100
-            type: 'linear',
101
-            x: 0,
102
-            y: 0,
103
-            x2: 0,
104
-            y2: 1,
105
-            colorStops: [
106
-              {
107
-                offset: 0,
108
-                color: '#c27073' // 0% 处的颜色
109
-              },
110
-              {
111
-                offset: 1,
112
-                color: 'rgba(194, 112, 115, 0.5)' // 100% 处的颜色
113
-              }
114
-            ],
115
-            global: false // 缺省为 false
116
-          },
117
-          {
118
-            type: 'linear',
119
-            x: 0,
120
-            y: 0,
121
-            x2: 0,
122
-            y2: 1,
123
-            colorStops: [
124
-              {
125
-                offset: 0,
126
-                color: '#c2ab70' // 0% 处的颜色
127
-              },
128
-              {
129
-                offset: 1,
130
-                color: 'rgba(194, 171, 112, 0.5)' // 100% 处的颜色
131
-              }
132
-            ],
133
-            global: false // 缺省为 false
134
-          },
135
-          {
136
-            type: 'linear',
137
-            x: 0,
138
-            y: 0,
139
-            x2: 0,
140
-            y2: 1,
141
-            colorStops: [
142
-              {
143
-                offset: 0,
144
-                color: '#70c2ab' // 0% 处的颜色
145
-              },
146
-              {
147
-                offset: 1,
148
-                color: 'rgba(112, 194, 171, 0.5)' // 100% 处的颜色
149
-              }
150
-            ],
151
-            global: false // 缺省为 false
152
-          },
153
-          {
154
-            type: 'linear',
155
-            x: 0,
156
-            y: 0,
157
-            x2: 0,
158
-            y2: 1,
159
-            colorStops: [
160
-              {
161
-                offset: 0,
162
-                color: '#70c282' // 0% 处的颜色
163
-              },
164
-              {
165
-                offset: 1,
166
-                color: 'rgba(112, 194, 130, 0.5)' // 100% 处的颜色
167
-              }
168
-            ],
169
-            global: false // 缺省为 false
170
-          },
171
-          {
172
-            type: 'linear',
173
-            x: 0,
174
-            y: 0,
175
-            x2: 0,
176
-            y2: 1,
177
-            colorStops: [
178
-              {
179
-                offset: 0,
180
-                color: '#9cc270' // 0% 处的颜色
181
-              },
182
-              {
183
-                offset: 1,
184
-                color: 'rgba(156, 194, 112, 0.5)' // 100% 处的颜色
185
-              }
186
-            ],
187
-            global: false // 缺省为 false
188
-          },
189
-          {
190
-            type: 'linear',
191
-            x: 0,
192
-            y: 0,
193
-            x2: 0,
194
-            y2: 1,
195
-            colorStops: [
196
-              {
197
-                offset: 0,
198
-                color: '#709cc2' // 0% 处的颜色
199
-              },
200
-              {
201
-                offset: 1,
202
-                color: 'rgba(112, 156, 194, 0.5)' // 100% 处的颜色
203
-              }
204
-            ],
205
-            global: false // 缺省为 false
206
-          },
207
-          {
208
-            type: 'linear',
209
-            x: 0,
210
-            y: 0,
211
-            x2: 0,
212
-            y2: 1,
213
-            colorStops: [
214
-              {
215
-                offset: 0,
216
-                color: '#c270b0' // 0% 处的颜色
217
-              },
218
-              {
219
-                offset: 1,
220
-                color: 'rgba(194, 112, 176, 0.5)' // 100% 处的颜色
221
-              }
222
-            ],
223
-            global: false // 缺省为 false
224
-          }
225
-        ],
226
-        series: [
227
-          {
228
-            name: '数据统计',
229
-            type: 'pie',
230
-            center: ['50%', '35%'],
231
-            roseType: 'radius',
232
-            label: {
233
-              normal: {
234
-                show: false
235
-              },
236
-              emphasis: {
237
-                show: false
238
-              }
239
-            },
240
-            lableLine: {
241
-              normal: {
242
-                show: false
243
-              },
244
-              emphasis: {
245
-                show: true
246
-              }
247
-            },
248
-            data: this.associationTypeProportion
249
-          }
250
-        ]
251
-      }
252
-      this.myChart.setOption(option)
253
-    },
254
-    // 获取数据
255
-    async getData () {
256
-      const srartTime = this.$moment()
257
-        .subtract(29, 'days')
258
-        .format('YYYY-MM-DD') // 近三十天
259
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
260
-      const result = await post(
261
-        `/largeScreen/getData/associationTypeProportion/${this.hospitalId}`,
262
-        { srartTime, endTime }
263
-      )
264
-      this.associationTypeProportionNum = []
265
-      this.associationTypeProportionName = []
266
-      this.associationTypeProportion = []
267
-      this.associationTypeProportionAll = result.associationTypeProportion
268
-      result.associationTypeProportion.forEach((item) => {
269
-        this.associationTypeProportionNum.push(item[1]) // 获取到的数据
270
-        this.associationTypeProportionName.push(item[0]) // 获取到的名称
271
-        this.associationTypeProportion.push({ value: item[1], name: item[0] }) // 获取到的名称
272
-      })
273
-      this.draw()
274
-      this.polling()
275
-    },
276
-    // 轮询请求
277
-    polling () {
278
-      clearTimeout(this.timer)
279
-      this.timer = setTimeout(() => {
280
-        this.getData()
281
-      }, timer10)
282
-    }
283
-  },
284
-  mounted () {
285
-    this.getData()
286
-  },
287
-  beforeDestroy () {
288
-    clearTimeout(this.timer)
289
-  }
290
-}
291
-</script>
292
-
293
-<style lang="less">
294
-.business-type-ratio {
295
-  height: 7rem;
296
-  margin: 0 auto;
297
-}
298
-</style>

+ 141 - 0
src/components/CategoryProportion.vue

@@ -0,0 +1,141 @@
1
+<template>
2
+  <div class="points-ranking__wrap">
3
+    <div class="points-ranking" ref="CategoryProportion"></div>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import echarts from 'echarts'
9
+import { post, timerCommon } from './../http/http'
10
+export default {
11
+  name: 'CategoryProportion',
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13
+  data () {
14
+    return {
15
+      sign: 'lastWeek',
16
+      timer: null,
17
+      myChart: null,
18
+      gradeRankingList: []
19
+    }
20
+  },
21
+  methods: {
22
+    // 画图
23
+    draw () {
24
+      this.myChart = echarts.init(this.$refs.CategoryProportion)
25
+      const option = {
26
+        color: ['#33CC85', '#72C0DD', '#FAC958', '#546FC6'], // 颜色数组
27
+        tooltip: {
28
+          trigger: 'item'
29
+        },
30
+        legend: {
31
+          top: 16,
32
+          left: 8,
33
+          textStyle: {
34
+            color: '#fff', // 全局文字颜色
35
+            fontSize: 14
36
+          }
37
+        },
38
+        grid: {
39
+          left: 0,
40
+          top: 0,
41
+          bottom: 0,
42
+          right: 0
43
+        },
44
+        series: [
45
+          {
46
+            name: '',
47
+            type: 'pie',
48
+            center: ['50%', '58%'],
49
+            radius: ['35%', '50%'],
50
+            avoidLabelOverlap: true,
51
+            label: {
52
+              show: true,
53
+              color: 'rgba(255, 255, 255, 0.85)',
54
+              formatter: (params) => {
55
+                return `${params.name}:${params.value}\n${params.percent}%`
56
+              },
57
+              textStyle: {
58
+                lineHeight: 14
59
+              }
60
+            },
61
+            labelLine: {
62
+              show: true,
63
+              lineStyle: {
64
+                color: '#265A8A'
65
+              }
66
+            },
67
+            data: this.gradeRankingList
68
+          }
69
+        ]
70
+      }
71
+      this.myChart.setOption(option)
72
+    },
73
+    // 获取数据
74
+    async getData () {
75
+      this.$emit('signEmit', this.sign)
76
+      let startTime
77
+      let endTime
78
+
79
+      if (this.sign === 'lastWeek') {
80
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
81
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
82
+      } else if (this.sign === 'lastMonth') {
83
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
84
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
85
+      }
86
+      const result = await post(
87
+        '/itsm/report/index',
88
+        {
89
+          parentDutyId: this.parentDutyId,
90
+          hosId: this.hosId,
91
+          dutyId: this.dutyId,
92
+          startDate: startTime,
93
+          endDate: endTime,
94
+          type: 'itsmCategoryProportion'
95
+        }
96
+      )
97
+      result.data = result.data || []
98
+      this.gradeRankingList = result.data.map(v => ({
99
+        name: v.category || '',
100
+        value: v.sum || 0,
101
+        percent: v.percent || 0
102
+      }))
103
+      this.draw()
104
+      this.polling()
105
+    },
106
+    // 轮询请求
107
+    polling () {
108
+      clearTimeout(this.timer)
109
+      this.timer = setTimeout(() => {
110
+        if (this.sign === 'lastWeek') {
111
+          this.sign = 'lastMonth'
112
+        } else if (this.sign === 'lastMonth') {
113
+          this.sign = 'lastWeek'
114
+        }
115
+        this.getData()
116
+      }, timerCommon)
117
+    }
118
+  },
119
+  mounted () {
120
+    this.getData()
121
+  },
122
+  beforeDestroy () {
123
+    clearTimeout(this.timer)
124
+  }
125
+}
126
+</script>
127
+
128
+<style lang="less" scoped>
129
+.points-ranking__wrap {
130
+  height: 3.7rem;
131
+  overflow: hidden;
132
+  position: relative;
133
+  .points-ranking {
134
+    width: 100%;
135
+    height: 100%;
136
+    position: absolute;
137
+    left: 0;
138
+    top: 0;
139
+  }
140
+}
141
+</style>

+ 0 - 104
src/components/DeliveryRate.vue

@@ -1,104 +0,0 @@
1
-<template>
2
-  <div class="delivery-rate">
3
-    <!-- <div class="delivery-rate__item" v-for="(workOrderOnTime,k) in workOrderOnTimes" :key="k" v-show="currentDictionary == k"> -->
4
-    <div class="delivery-rate__item">
5
-      <DeliveryRateLine :workOrderOnTime="workOrderOnTimes[currentDictionary]"></DeliveryRateLine>
6
-    </div>
7
-  </div>
8
-</template>
9
-
10
-<script>
11
-import DeliveryRateLine from './DeliveryRateLine.vue'
12
-import { post, timer11 } from './../http/http'
13
-export default {
14
-  name: 'DeliveryRate',
15
-  inject: ['hospitalId'],
16
-  props: {
17
-    // 当前tab索引
18
-    currentDictionary: {
19
-      type: Number,
20
-      default: 0
21
-    }
22
-  },
23
-  data () {
24
-    return {
25
-      timer: null,
26
-      timer1: null,
27
-      dictionary: [], // 字典数据
28
-      workOrderOnTimes: {}// 各类型数据汇总
29
-    }
30
-  },
31
-  methods: {
32
-    // tab轮询
33
-    autoNext () {
34
-      const ids = []
35
-      const len = this.dictionary.length
36
-      this.dictionary.forEach(item => {
37
-        ids.push(item[0])
38
-      })
39
-      let index = ids.indexOf(this.currentDictionary)
40
-      index++
41
-      if (index === len) {
42
-        index = 0
43
-      }
44
-      this.$emit('changeCurrentDictionary', this.dictionary[index][0])
45
-      clearTimeout(this.timer1)
46
-      this.timer1 = setTimeout(() => {
47
-        this.autoNext()
48
-      }, 10000)
49
-    },
50
-    // 获取字典数据
51
-    async getDictionary () {
52
-      const result = await post(
53
-        `/largeScreen/getData/getDictionary/${this.hospitalId}`,
54
-        { key: 'association_types' }
55
-      )
56
-      this.dictionary = result.dictionary.filter(v => v[0] === 255 || v[0] === 256 || v[0] === 257 || v[0] === 258 || v[0] === 259 || v[0] === 260)
57
-      this.$emit('dictionaryHandle', JSON.stringify(this.dictionary))
58
-      this.dictionary.forEach(item => {
59
-        this.getData(item[0])
60
-      })
61
-      this.polling()
62
-    },
63
-    // 获取数据
64
-    async getData (id) {
65
-      const srartTime = this.$moment()
66
-        .subtract(29, 'days')
67
-        .format('YYYY-MM-DD') // 近三十天
68
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
69
-      const result = await post(
70
-        `/largeScreen/getData/workOrderOnTime/${this.hospitalId}`,
71
-        { srartTime, endTime, associationId: id }
72
-      )
73
-      this.$set(this.workOrderOnTimes, id, result.workOrderOnTime)
74
-    },
75
-    // 轮询请求
76
-    polling () {
77
-      clearTimeout(this.timer)
78
-      clearTimeout(this.timer1)
79
-      this.timer = setTimeout(() => {
80
-        this.getDictionary()
81
-      }, timer11)
82
-      this.timer1 = setTimeout(() => {
83
-        this.autoNext()
84
-      }, 10000)
85
-    }
86
-  },
87
-  components: {
88
-    DeliveryRateLine
89
-  },
90
-  mounted () {
91
-    this.getDictionary()
92
-  },
93
-  beforeDestroy () {
94
-    clearTimeout(this.timer)
95
-  }
96
-}
97
-</script>
98
-
99
-<style lang="less">
100
-.delivery-rate {
101
-  height: 1.9375rem;
102
-  overflow: hidden;
103
-}
104
-</style>

+ 0 - 140
src/components/DeliveryRateLine.vue

@@ -1,140 +0,0 @@
1
-<template>
2
-    <div class="delivery-rate-line" ref="DeliveryRateLine" v-if="workOrderOnTime.length>0"></div>
3
-</template>
4
-
5
-<script>
6
-import echarts from 'echarts'
7
-export default {
8
-  name: 'DeliveryRateLine',
9
-  data () {
10
-    return {
11
-      myChart: null,
12
-      workOrderOnTimeNum: [],
13
-      workOrderOnTimeName: []
14
-    }
15
-  },
16
-  props: {
17
-    workOrderOnTime: {
18
-      type: Array,
19
-      default: () => []
20
-    }
21
-  },
22
-  methods: {
23
-    // 画图
24
-    draw () {
25
-      this.myChart = echarts.init(this.$refs.DeliveryRateLine)
26
-      const option = {
27
-        title: {
28
-          text: '按时送达率(%)',
29
-          left: 15,
30
-          textStyle: {
31
-            color: '#d4d6d7',
32
-            fontSize: 12
33
-          }
34
-        },
35
-        xAxis: {
36
-          type: 'category',
37
-          axisLabel: {
38
-            show: true,
39
-            textStyle: {
40
-              color: '#d4d6d7', // 更改坐标轴文字颜色
41
-              fontSize: 12 // 更改坐标轴文字大小
42
-            }
43
-          },
44
-          axisLine: {
45
-            lineStyle: {
46
-              color: '#709cc2' // 更改坐标轴颜色
47
-            }
48
-          },
49
-          axisTick: {
50
-            show: false
51
-          },
52
-          data: this.workOrderOnTimeName
53
-        },
54
-        yAxis: {
55
-          type: 'value',
56
-          max: 1,
57
-          min: 0,
58
-          interval: 0.25,
59
-          axisLabel: {
60
-            formatter (value) {
61
-              return value * 100
62
-            },
63
-            show: true,
64
-            textStyle: {
65
-              color: '#d4d6d7', // 更改坐标轴文字颜色
66
-              fontSize: 12 // 更改坐标轴文字大小
67
-            }
68
-          },
69
-          axisLine: {
70
-            lineStyle: {
71
-              color: '#709cc2' // 更改坐标轴颜色
72
-            }
73
-          },
74
-          axisTick: {
75
-            show: false
76
-          },
77
-          splitLine: {
78
-            // 网格线
79
-            lineStyle: {
80
-              color: ['rgba(255,255,255,0.1)'],
81
-              type: 'dashed' // 设置网格线类型 dotted:虚线   solid:实线
82
-            },
83
-            show: true // 隐藏或显示
84
-          }
85
-        },
86
-        grid: {
87
-          top: '20%',
88
-          bottom: '25%',
89
-          left: '5%',
90
-          right: '2%',
91
-          borderColor: 'rgba(255,255,255,0.1)'
92
-        },
93
-        series: [
94
-          {
95
-            data: this.workOrderOnTimeNum,
96
-            type: 'line',
97
-            symbol: 'circle',
98
-            symbolSize: 4,
99
-            label: {
100
-              show: true,
101
-              position: 'top',
102
-              textStyle: '#fff',
103
-              formatter (params) {
104
-                return (params.value * 100).toFixed(2) + '%'
105
-              }
106
-            },
107
-            itemStyle: {
108
-              normal: {
109
-                color: '#70c282', // 折点颜色
110
-                lineStyle: {
111
-                  color: '#70c282' // 折线颜色
112
-                }
113
-              }
114
-            }
115
-          }
116
-        ]
117
-      }
118
-      this.myChart.setOption(option)
119
-    }
120
-  },
121
-  updated () {
122
-    this.workOrderOnTimeNum = []
123
-    this.workOrderOnTimeName = []
124
-    if (this.workOrderOnTime.length > 0) {
125
-      this.workOrderOnTime.forEach(item => {
126
-        this.workOrderOnTimeNum.push(item[1] / 100)
127
-        this.workOrderOnTimeName.push(item[0])
128
-      })
129
-      this.draw()
130
-    }
131
-  }
132
-}
133
-</script>
134
-
135
-<style lang="less">
136
-.delivery-rate-line {
137
-  height: 1.9375rem;
138
-  margin: 0.2rem auto 0;
139
-}
140
-</style>

+ 73 - 53
src/components/OnTimeArrivalRate.vue

@@ -1,48 +1,48 @@
1 1
 <template>
2
-  <div class="on-time-arrival-rate__wrap">
3
-    <div class="on-time-arrival-rate" ref="OnTimeArrivalRate"></div>
2
+  <div class="points-ranking__wrap">
3
+    <div class="points-ranking" ref="DeptPrice"></div>
4 4
   </div>
5 5
 </template>
6 6
 
7 7
 <script>
8 8
 import echarts from 'echarts'
9
-import { post, timer9 } from './../http/http'
9
+import { post, timerCommon } from './../http/http'
10 10
 export default {
11
-  name: 'OnTimeArrivalRate',
12
-  inject: ['hospitalId'],
11
+  name: 'DeptPrice',
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
+      sign: 'lastWeek',
15 16
       timer: null,
16 17
       myChart: null,
17
-      userOnTimeRankingListNum: [],
18
-      userOnTimeRankingListName: []
18
+      gradeRankingListNum: [],
19
+      gradeRankingListName: []
19 20
     }
20 21
   },
21 22
   methods: {
22 23
     // 画图
23 24
     draw () {
24
-      this.myChart = echarts.init(this.$refs.OnTimeArrivalRate)
25
+      this.myChart = echarts.init(this.$refs.DeptPrice)
25 26
       var colorArray = [
26 27
         {
27
-          top: '#c2ab70', // 第一
28
-          bottom: 'rgba(194, 171, 112, 0.5)',
29
-          borderColor: '#c2ab70'
28
+          top: '#6B97BD', // 第一
29
+          bottom: '#364C5F'
30 30
         },
31 31
         {
32
-          top: '#70c282', // 第二
33
-          bottom: 'rgba(112, 194, 130, 0.5)'
32
+          top: '#6B97BD', // 第二
33
+          bottom: '#364C5F'
34 34
         },
35 35
         {
36
-          top: '#709cc2', // 第三
37
-          bottom: 'rgba(112, 156, 194, 0.5)'
36
+          top: '#6AB87D', // 第三
37
+          bottom: '#3D7057'
38 38
         },
39 39
         {
40
-          top: '#709cc2', // 第四
41
-          bottom: 'rgba(112, 156, 194, 0.5)'
40
+          top: '#A09163', // 第四
41
+          bottom: '#504932'
42 42
         },
43 43
         {
44
-          top: '#709cc2', // 第五
45
-          bottom: 'rgba(112, 156, 194, 0.5)'
44
+          top: '#6B97BD', // 第五
45
+          bottom: '#364C5F'
46 46
         }
47 47
       ]
48 48
       const option = {
@@ -51,19 +51,15 @@ export default {
51 51
           formatter: '{b}:{c}'
52 52
         },
53 53
         grid: {
54
-          left: '5%',
55
-          top: '12%',
56
-          right: '1%',
57
-          bottom: '8%',
54
+          left: 28,
55
+          top: 0,
56
+          bottom: 10,
58 57
           containLabel: true
59 58
         },
60 59
         xAxis: {
61 60
           type: 'value',
62 61
           show: false,
63 62
           position: 'top',
64
-          max: function (value) {
65
-            return value.max * 1.1
66
-          },
67 63
           axisTick: {
68 64
             show: false
69 65
           },
@@ -90,13 +86,17 @@ export default {
90 86
               show: false
91 87
             },
92 88
             inverse: 'true', // 排序
89
+            axisLabel: {
90
+              margin: 16,
91
+              color: 'rgba(255,255,255,0.85)'
92
+            },
93 93
             axisLine: {
94 94
               show: false,
95 95
               lineStyle: {
96 96
                 color: '#fff'
97 97
               }
98 98
             },
99
-            data: this.userOnTimeRankingListName
99
+            data: this.gradeRankingListName
100 100
           }
101 101
         ],
102 102
         series: [
@@ -106,10 +106,9 @@ export default {
106 106
             label: {
107 107
               normal: {
108 108
                 show: true,
109
-                position: [360, 0],
110
-                formatter (params) {
111
-                  return params.value + '%'
112
-                },
109
+                // position: [300, 0],
110
+                position: 'right',
111
+                formatter: '{c}',
113 112
                 textStyle: {
114 113
                   color: '#fff'
115 114
                 }
@@ -182,7 +181,7 @@ export default {
182 181
             barGap: '0%',
183 182
             barCategoryGap: '70%',
184 183
             barWidth: 8,
185
-            data: this.userOnTimeRankingListNum.sort((a, b) => b - a)
184
+            data: this.gradeRankingListNum
186 185
           }
187 186
         ]
188 187
       }
@@ -190,23 +189,39 @@ export default {
190 189
     },
191 190
     // 获取数据
192 191
     async getData () {
193
-      const srartTime = this.$moment()
194
-        .subtract(29, 'days')
195
-        .format('YYYY-MM-DD') // 近三十天
196
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
192
+      this.$emit('signEmit', this.sign)
193
+      let startTime
194
+      let endTime
195
+
196
+      if (this.sign === 'lastWeek') {
197
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
198
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
199
+      } else if (this.sign === 'lastMonth') {
200
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
201
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
202
+      }
197 203
       const result = await post(
198
-        `/largeScreen/getData/userOnTimeRankingList/${this.hospitalId}`,
199
-        { srartTime, endTime }
204
+        '/itsm/report/index',
205
+        {
206
+          parentDutyId: this.parentDutyId,
207
+          hosId: this.hosId,
208
+          dutyId: this.dutyId,
209
+          startDate: startTime,
210
+          endDate: endTime,
211
+          type: 'itsmDeptPrice'
212
+        }
200 213
       )
201
-      this.userOnTimeRankingListNum = []
202
-      this.userOnTimeRankingListName = []
203
-      if (result.userOnTimeRankingList.length > 5) {
204
-        result.userOnTimeRankingList = result.userOnTimeRankingList.slice(0, 5)
214
+      this.gradeRankingListNum = []
215
+      this.gradeRankingListName = []
216
+      if (result.data.length > 5) {
217
+        result.data = result.data.slice(0, 5)
218
+      }
219
+      if (result.data.length > 0) {
220
+        result.data.forEach(item => {
221
+          this.gradeRankingListNum.push(item.price || 0) // 获取到的数据
222
+          this.gradeRankingListName.push(item.name || '') // 获取到的名称
223
+        })
205 224
       }
206
-      result.userOnTimeRankingList.forEach(item => {
207
-        this.userOnTimeRankingListNum.push(item[0]) // 获取到的数据
208
-        this.userOnTimeRankingListName.push(item[1]) // 获取到的名称
209
-      })
210 225
       this.draw()
211 226
       this.polling()
212 227
     },
@@ -214,8 +229,13 @@ export default {
214 229
     polling () {
215 230
       clearTimeout(this.timer)
216 231
       this.timer = setTimeout(() => {
232
+        if (this.sign === 'lastWeek') {
233
+          this.sign = 'lastMonth'
234
+        } else if (this.sign === 'lastMonth') {
235
+          this.sign = 'lastWeek'
236
+        }
217 237
         this.getData()
218
-      }, timer9)
238
+      }, timerCommon)
219 239
     }
220 240
   },
221 241
   mounted () {
@@ -227,17 +247,17 @@ export default {
227 247
 }
228 248
 </script>
229 249
 
230
-<style lang="less">
231
-.on-time-arrival-rate__wrap {
232
-  // height: 2.7125rem;
233
-  height: 2.3875rem;
250
+<style lang="less" scoped>
251
+.points-ranking__wrap {
252
+  height: 3.7rem;
234 253
   overflow: hidden;
235
-  .on-time-arrival-rate {
254
+  position: relative;
255
+  .points-ranking {
236 256
     width: 100%;
237 257
     height: 100%;
238 258
     position: absolute;
239 259
     left: 0;
240
-    top: -0.175rem;
260
+    top: 0;
241 261
   }
242 262
 }
243 263
 </style>

+ 0 - 204
src/components/ErrorWorkOrder.vue

@@ -1,204 +0,0 @@
1
-<template>
2
-  <div class="error-work-order__wrap">
3
-    <div class="error-work-order__inner">
4
-      <div class="error-work-order--bg">
5
-        <div class="error-work-order-item--bg" v-for="item in 5" :key="item"></div>
6
-      </div>
7
-      <div class="error-work-order" :class="{marquee_top:animate}">
8
-        <div
9
-          class="error-work-order__item"
10
-          v-for="item in todayAbnormityWorkOrderList"
11
-          :key="item.id"
12
-        >
13
-          <strong
14
-            class="error-work-order__status"
15
-            :class="[item[0] === 1?'error-work-order__status--error':'error-work-order__status--timeout']"
16
-          >
17
-            <i class="error-work-order__icon"></i>
18
-            {{item[0] === 1?'异常':'超时'}}
19
-          </strong>
20
-          <div class="error-work-order__id">{{item[1]}}</div>
21
-          <div class="error-work-order__name">{{item[2]}}</div>
22
-          <div class="error-work-order__group">{{item[3]}}</div>
23
-          <div class="error-work-order__type">{{item[4]}}</div>
24
-          <div class="error-work-order__level">{{item[5]}}</div>
25
-          <div class="error-work-order__date">{{item[6]|formatTime(that)}}</div>
26
-        </div>
27
-      </div>
28
-    </div>
29
-  </div>
30
-</template>
31
-
32
-<script>
33
-import { post, timer7 } from './../http/http'
34
-export default {
35
-  name: 'ErrorWorkOrder',
36
-  inject: ['hospitalId'],
37
-  data () {
38
-    return {
39
-      that: this,
40
-      animate: false,
41
-      timer: null,
42
-      timer1: null,
43
-      todayAbnormityWorkOrder: [], // 今日工单异常情况
44
-      todayAbnormityWorkOrderList: [] // 列表
45
-    }
46
-  },
47
-  filters: {
48
-    // 格式化日期
49
-    formatTime (value, that) {
50
-      return that.$moment(value).format('YYYYMMDD HH:mm')
51
-    }
52
-  },
53
-  methods: {
54
-    // 无限滚动
55
-    scrollInfinite () {
56
-      if (this.todayAbnormityWorkOrderList.length <= 5) {
57
-        return
58
-      }
59
-      clearTimeout(this.timer1)
60
-      this.timer1 = setTimeout(() => {
61
-        this.showMarquee()
62
-        this.scrollInfinite()
63
-      }, 2000)
64
-    },
65
-    // 处理数组方法
66
-    showMarquee () {
67
-      this.animate = true
68
-      this.todayAbnormityWorkOrderList.push(
69
-        this.todayAbnormityWorkOrderList[0]
70
-      )
71
-      setTimeout(() => {
72
-        this.todayAbnormityWorkOrderList.shift()
73
-        this.animate = false
74
-      }, 1000)
75
-    },
76
-    // 获取数据
77
-    async getData () {
78
-      const result = await post(
79
-        `/largeScreen/getData/todayAbnormityWorkOrder/${this.hospitalId}`
80
-      )
81
-      this.todayAbnormityWorkOrder = []
82
-      this.todayAbnormityWorkOrderList = []
83
-      this.todayAbnormityWorkOrder = result.todayAbnormityWorkOrder[0]
84
-      this.todayAbnormityWorkOrderList = result.todayAbnormityWorkOrderList
85
-      this.$emit(
86
-        'todayAbnormityWorkOrderHandle',
87
-        JSON.stringify(this.todayAbnormityWorkOrder)
88
-      )
89
-      this.polling()
90
-      this.scrollInfinite()
91
-    },
92
-    // 轮询请求
93
-    polling () {
94
-      clearTimeout(this.timer)
95
-      this.timer = setTimeout(() => {
96
-        this.getData()
97
-      }, timer7)
98
-    }
99
-  },
100
-  mounted () {
101
-    this.getData()
102
-  },
103
-  beforeDestroy () {
104
-    clearTimeout(this.timer)
105
-    clearTimeout(this.timer1)
106
-  }
107
-}
108
-</script>
109
-
110
-<style lang="less">
111
-.error-work-order__wrap {
112
-  height: 2.3125rem;
113
-  padding-bottom: 0.2rem;
114
-  background: linear-gradient(
115
-      96deg,
116
-      rgba(255, 255, 255, 0.05) 0%,
117
-      rgba(255, 255, 255, 0) 70%
118
-    )
119
-    left bottom no-repeat;
120
-  background-size: 100% 0.2rem;
121
-  margin-bottom: 0.4375rem;
122
-  .error-work-order__inner {
123
-    height: 100%;
124
-    overflow: hidden;
125
-    position: relative;
126
-    .error-work-order--bg {
127
-      position: absolute;
128
-      left: 0;
129
-      top: 0;
130
-      width: 100%;
131
-      height: 100%;
132
-      .error-work-order-item--bg {
133
-        height: 0.425rem;
134
-        &:nth-of-type(even) {
135
-          background: linear-gradient(
136
-            96deg,
137
-            rgba(255, 255, 255, 0.05) 0%,
138
-            rgba(255, 255, 255, 0) 70%
139
-          );
140
-        }
141
-      }
142
-    }
143
-    .error-work-order {
144
-      &.marquee_top {
145
-        transition: all 1s;
146
-        transform: translateY(-0.425rem);
147
-      }
148
-      .error-work-order__item {
149
-        height: 0.425rem;
150
-        display: flex;
151
-        align-items: center;
152
-        justify-content: space-between;
153
-        font-size: 0.175rem;
154
-        padding-left: 0.3rem;
155
-        padding-right: 0.3rem;
156
-        .error-work-order__id,
157
-        .error-work-order__group,
158
-        .error-work-order__type,
159
-        .error-work-order__date{
160
-          width: 1.6rem;
161
-          white-space: nowrap;
162
-          text-overflow: ellipsis;
163
-          overflow: hidden;
164
-        }
165
-        .error-work-order__name{
166
-          width: 2rem;
167
-          white-space: nowrap;
168
-          text-overflow: ellipsis;
169
-          overflow: hidden;
170
-        }
171
-        .error-work-order__level{
172
-          width: 0.5rem;
173
-          white-space: nowrap;
174
-          text-overflow: ellipsis;
175
-          overflow: hidden;
176
-        }
177
-        .error-work-order__status {
178
-          width: 0.55rem;
179
-          display: flex;
180
-          justify-content: space-between;
181
-          align-items: center;
182
-          &.error-work-order__status--error {
183
-            color: #c27073;
184
-            .error-work-order__icon {
185
-              background-color: #c27073;
186
-            }
187
-          }
188
-          &.error-work-order__status--timeout {
189
-            color: #c2ab70;
190
-            .error-work-order__icon {
191
-              background-color: #c2ab70;
192
-            }
193
-          }
194
-          .error-work-order__icon {
195
-            width: 0.1rem;
196
-            height: 0.1rem;
197
-            border-radius: 50%;
198
-          }
199
-        }
200
-      }
201
-    }
202
-  }
203
-}
204
-</style>

+ 0 - 234
src/components/GroupPerformance.vue

@@ -1,234 +0,0 @@
1
-<template>
2
-  <div class="group-performanceWrap">
3
-    <div id="group-performance"></div>
4
-  </div>
5
-</template>
6
-
7
-<script>
8
-import echarts from 'echarts'
9
-import { post, timer3 } from './../http/http'
10
-export default {
11
-  name: 'GroupPerformance',
12
-  inject: ['hospitalId'],
13
-  data () {
14
-    return {
15
-      timer: null,
16
-      groutWorkOrderListNum: [], // 获取到的单数
17
-      groutWorkOrderListName: [] // 获取到的科室名称
18
-    }
19
-  },
20
-  methods: {
21
-    // 画图
22
-    draw () {
23
-      const myChart = echarts.init(
24
-        document.getElementById('group-performance')
25
-      )
26
-      var colorArray = [
27
-        {
28
-          top: '#c2ab70', // 第一
29
-          bottom: 'rgba(194, 171, 112, 0.5)',
30
-          borderColor: '#c2ab70'
31
-        },
32
-        {
33
-          top: '#70c282', // 第二
34
-          bottom: 'rgba(112, 194, 130, 0.5)'
35
-        },
36
-        {
37
-          top: '#709cc2', // 第三
38
-          bottom: 'rgba(112, 156, 194, 0.5)'
39
-        },
40
-        {
41
-          top: '#709cc2', // 第四
42
-          bottom: 'rgba(112, 156, 194, 0.5)'
43
-        },
44
-        {
45
-          top: '#709cc2', // 第五
46
-          bottom: 'rgba(112, 156, 194, 0.5)'
47
-        }
48
-      ]
49
-      const option = {
50
-        tooltip: {
51
-          show: false,
52
-          formatter: '{b}:{c}'
53
-        },
54
-        grid: {
55
-          left: '0%',
56
-          top: '0%',
57
-          right: '5%',
58
-          bottom: '5%',
59
-          containLabel: true
60
-        },
61
-        xAxis: {
62
-          type: 'value',
63
-          show: false,
64
-          position: 'top',
65
-          max: function (value) {
66
-            return value.max * 1.5
67
-          },
68
-          axisTick: {
69
-            show: false
70
-          },
71
-          axisLine: {
72
-            show: false,
73
-            lineStyle: {
74
-              color: '#fff'
75
-            }
76
-          },
77
-          splitLine: {
78
-            show: false
79
-          }
80
-        },
81
-        yAxis: [
82
-          {
83
-            type: 'category',
84
-            axisTick: {
85
-              show: false,
86
-              alignWithLabel: false,
87
-              length: 5
88
-            },
89
-            splitLine: {
90
-              // 网格线
91
-              show: false
92
-            },
93
-            inverse: 'true', // 排序
94
-            axisLine: {
95
-              show: false,
96
-              lineStyle: {
97
-                color: '#fff'
98
-              }
99
-            },
100
-            data: this.groutWorkOrderListName
101
-          }
102
-        ],
103
-        series: [
104
-          {
105
-            name: 'xxx',
106
-            type: 'bar',
107
-            label: {
108
-              normal: {
109
-                show: true,
110
-                position: [300, 0],
111
-                formatter: '{c}单',
112
-                textStyle: {
113
-                  color: '#fff'
114
-                }
115
-              }
116
-            },
117
-            itemStyle: {
118
-              normal: {
119
-                show: true,
120
-                color: function (params) {
121
-                  const num = colorArray.length
122
-                  return {
123
-                    type: 'linear',
124
-                    colorStops: [
125
-                      {
126
-                        offset: 0,
127
-                        color: colorArray[params.dataIndex % num].bottom
128
-                      },
129
-                      {
130
-                        offset: 1,
131
-                        color: colorArray[params.dataIndex % num].top
132
-                      },
133
-                      {
134
-                        offset: 0,
135
-                        color: colorArray[params.dataIndex % num].bottom
136
-                      },
137
-                      {
138
-                        offset: 1,
139
-                        color: colorArray[params.dataIndex % num].top
140
-                      },
141
-                      {
142
-                        offset: 0,
143
-                        color: colorArray[params.dataIndex % num].bottom
144
-                      },
145
-                      {
146
-                        offset: 1,
147
-                        color: colorArray[params.dataIndex % num].top
148
-                      },
149
-                      {
150
-                        offset: 0,
151
-                        color: colorArray[params.dataIndex % num].bottom
152
-                      },
153
-                      {
154
-                        offset: 1,
155
-                        color: colorArray[params.dataIndex % num].top
156
-                      },
157
-                      {
158
-                        offset: 0,
159
-                        color: colorArray[params.dataIndex % num].bottom
160
-                      },
161
-                      {
162
-                        offset: 1,
163
-                        color: colorArray[params.dataIndex % num].top
164
-                      },
165
-                      {
166
-                        offset: 0,
167
-                        color: colorArray[params.dataIndex % num].bottom
168
-                      },
169
-                      {
170
-                        offset: 1,
171
-                        color: colorArray[params.dataIndex % num].top
172
-                      }
173
-                    ]
174
-                  }
175
-                },
176
-                barBorderRadius: 70,
177
-                borderWidth: 0,
178
-                borderColor: '#333'
179
-              }
180
-            },
181
-            barGap: '0%',
182
-            barCategoryGap: '70%',
183
-            barWidth: 8,
184
-            data: this.groutWorkOrderListNum
185
-          }
186
-        ]
187
-      }
188
-      myChart.setOption(option)
189
-    },
190
-    // 获取数据
191
-    async getData () {
192
-      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
193
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
194
-      const result = await post(
195
-        `/largeScreen/getData/getDeptOrderTop10/${this.hospitalId}`,
196
-        { srartTime, endTime }
197
-      )
198
-      this.groutWorkOrderListNum = []
199
-      this.groutWorkOrderListName = []
200
-      result.list.forEach((item) => {
201
-        this.groutWorkOrderListNum.push(item[1]) // 获取到的异常单数
202
-        this.groutWorkOrderListName.push(item[0]) // 获取到的小组名称
203
-      })
204
-      this.draw()
205
-      this.polling()
206
-    },
207
-    // 轮询请求
208
-    polling () {
209
-      clearTimeout(this.timer)
210
-      this.timer = setTimeout(() => {
211
-        this.getData()
212
-      }, timer3)
213
-    }
214
-  },
215
-  mounted () {
216
-    this.getData()
217
-  },
218
-  beforeDestroy () {
219
-    clearTimeout(this.timer)
220
-  }
221
-}
222
-</script>
223
-
224
-<style lang="less">
225
-#group-performance {
226
-  width: 100%;
227
-  height: 100%;
228
-}
229
-.group-performanceWrap {
230
-  // width: 5.15rem;
231
-  height: 5.0625rem;
232
-  margin: 0.2rem auto;
233
-}
234
-</style>

+ 44 - 161
src/components/GroupPraise.vue

@@ -1,53 +1,27 @@
1 1
 <template>
2 2
   <div class="group-praise">
3
-    <!-- 广播 -->
4
-    <div class="group-praise__broadcast">
5
-      <i
6
-        class="group-praise__broadcast--icon icon_transport transport-laba1"
7
-      ></i>
8
-      <div class="group-praise__broadcastListWrap">
9
-        <ul
10
-          class="group-praise__broadcastList"
11
-          :class="{ marquee_top: animate }"
12
-          :style="{ transform: 'translateY(' + 0.375 * n + 'rem)' }"
13
-        >
14
-          <li v-for="(item, i) in evaluateUserList" :key="i">
15
-            【{{ item[0] }}】配送人员「{{ item[1] }}」 {{ item[2] }}
16
-          </li>
17
-        </ul>
18
-      </div>
19
-    </div>
20 3
     <div class="group-praise__content">
21 4
       <div class="group-praise__circle">
22
-        <header class="group-praise__title">NO.2</header>
23
-        <div class="group-praise__circleContent" v-if="gradeRankingList[1]">
24
-          <p class="group-praise__circleName ellipsis">
25
-            {{ gradeRankingList[1][1] }}
26
-          </p>
5
+        <header class="group-praise__title">待接单</header>
6
+        <div class="group-praise__circleContent">
27 7
           <p class="group-praise__circlePercent">
28
-            {{ gradeRankingList[1][0] }}
8
+            {{ dataInfo.pending || 0 }}
29 9
           </p>
30 10
         </div>
31 11
       </div>
32
-      <div class="group-praise__circle--win">
33
-        <header class="group-praise__title">NO.1</header>
34
-        <div class="group-praise__circleContent" v-if="gradeRankingList[0]">
35
-          <p class="group-praise__circleName ellipsis">
36
-            {{ gradeRankingList[0][1] }}
37
-          </p>
12
+      <div class="group-praise__circle">
13
+        <header class="group-praise__title">处理中</header>
14
+        <div class="group-praise__circleContent">
38 15
           <p class="group-praise__circlePercent">
39
-            {{ gradeRankingList[0][0] }}
16
+            {{ dataInfo.handler || 0 }}
40 17
           </p>
41 18
         </div>
42 19
       </div>
43 20
       <div class="group-praise__circle">
44
-        <header class="group-praise__title">NO.3</header>
45
-        <div class="group-praise__circleContent" v-if="gradeRankingList[2]">
46
-          <p class="group-praise__circleName ellipsis">
47
-            {{ gradeRankingList[2][1] }}
48
-          </p>
21
+        <header class="group-praise__title">挂起工单</header>
22
+        <div class="group-praise__circleContent">
49 23
           <p class="group-praise__circlePercent">
50
-            {{ gradeRankingList[2][0] }}
24
+            {{ dataInfo.overtime || 0 }}
51 25
           </p>
52 26
         </div>
53 27
       </div>
@@ -56,72 +30,45 @@
56 30
 </template>
57 31
 
58 32
 <script>
59
-import { post, timer2 } from './../http/http'
33
+import { post, timerCommon } from './../http/http'
60 34
 export default {
61 35
   name: 'GroupPraise',
62
-  inject: ['hospitalId'],
36
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
63 37
   data () {
64 38
     return {
65
-      allData: {},
66
-      fontSize: parseFloat(document.querySelector('html').style.fontSize),
67 39
       timer: null,
68
-      animate: false,
69
-      timer1: null,
70
-      n: 0,
71
-      gradeRankingList: [], // 小组排名(无序)
72
-      evaluateUserList: [], // 滚动数据
73
-      disY: 0.375, // 滚动数据偏移量
74
-      disHeight: 0, // 滚动数据高度
75
-      isShow: true // 滚动数据显示隐藏
40
+      dataInfo: {}
76 41
     }
77 42
   },
78 43
   methods: {
79
-    // 无限滚动
80
-    scrollInfinite () {
81
-      clearTimeout(this.timer1)
82
-      this.timer1 = setTimeout(() => {
83
-        this.showMarquee()
84
-        this.scrollInfinite()
85
-      }, 2000)
86
-    },
87
-    // 处理数组方法
88
-    showMarquee () {
89
-      this.animate = true
90
-      this.n--
91
-      if (this.n === -this.evaluateUserList.length) {
92
-        this.animate = false
93
-        this.n = 0
94
-      }
95
-    },
96
-    // 近30天小组好评排行
44
+    // 工单实时动态
97 45
     async getGroupPraise () {
98
-      const srartTime = this.$moment()
99
-        .subtract(1, 'days')
100
-        .format('YYYY-MM-DD') // 昨
46
+      const startTime = this.$moment()
47
+        .startOf('day')
48
+        .format('YYYY-MM-DD HH:mm:ss') // 今日
101 49
       const endTime = this.$moment()
102
-        .subtract(1, 'days')
103
-        .format('YYYY-MM-DD') // 昨
50
+        .endOf('day')
51
+        .format('YYYY-MM-DD HH:mm:ss') // 今日
104 52
       const result = await post(
105
-        `/largeScreen/getData/gradeRanking/${this.hospitalId}`,
106
-        { srartTime, endTime, pageSize: 3 }
53
+        '/itsm/report/index',
54
+        {
55
+          parentDutyId: this.parentDutyId,
56
+          hosId: this.hosId,
57
+          dutyId: this.dutyId,
58
+          startDate: startTime,
59
+          endDate: endTime,
60
+          type: 'itsmIncidentCount'
61
+        }
107 62
       )
108
-      this.gradeRankingList = result.gradeRankingList
109
-      this.evaluateUserList = result.evaluateUserList
63
+      this.dataInfo = result.data ? result.data[0] : {}
110 64
       this.polling()
111
-      if (this.evaluateUserList.length > 0) {
112
-        this.evaluateUserList = [
113
-          ...this.evaluateUserList,
114
-          this.evaluateUserList[0]
115
-        ]
116
-        this.scrollInfinite()
117
-      }
118 65
     },
119 66
     // 轮询请求
120 67
     polling () {
121 68
       clearTimeout(this.timer)
122 69
       this.timer = setTimeout(() => {
123 70
         this.getGroupPraise()
124
-      }, timer2)
71
+      }, timerCommon)
125 72
     }
126 73
   },
127 74
   mounted () {
@@ -129,103 +76,39 @@ export default {
129 76
   },
130 77
   beforeDestroy () {
131 78
     clearTimeout(this.timer)
132
-    clearTimeout(this.timer1)
133 79
   }
134 80
 }
135 81
 </script>
136 82
 
137
-<style lang="less">
83
+<style lang="less" scoped>
138 84
 .group-praise {
139
-  height: 2.7125rem;
140
-  padding-top: 0.2rem;
141
-  padding-bottom: 0.375rem;
142
-  .group-praise__broadcast {
143
-    height: 0.4rem;
144
-    background-color: rgba(255, 255, 255, 0.2);
145
-    border: solid 1px rgba(255, 255, 255, 0.2);
146
-    display: flex;
147
-    align-items: center;
148
-    .group-praise__broadcast--icon {
149
-      font-size: 0.275rem;
150
-      color: #2496d2;
151
-      margin-left: 0.1rem;
152
-    }
153
-    .group-praise__broadcastListWrap {
154
-      flex: 1;
155
-      height: 0.375rem;
156
-      line-height: 0.375rem;
157
-      padding-left: 0.2rem;
158
-      padding-right: 0.1rem;
159
-      overflow: hidden;
160
-      .group-praise__broadcastList {
161
-        &.marquee_top {
162
-          transition: all 1s;
163
-        }
164
-        li {
165
-          word-break: break-all;
166
-        }
167
-      }
168
-    }
169
-  }
85
+  height: 2.6625rem;
170 86
   .group-praise__content {
171 87
     display: flex;
172
-    justify-content: center;
88
+    justify-content: space-between;
89
+    align-items: center;
90
+    padding: 0 .2rem;
91
+    height: 100%;
173 92
     .group-praise__title {
174
-      color: #c2ab70;
175
-      font-size: 0.2rem;
176
-      font-weight: 700;
93
+      color: #fff;
94
+      font-size: .2rem;
177 95
       text-align: center;
178 96
     }
179 97
     .group-praise__circleContent {
180 98
       color: #fff;
181 99
       font-size: 0.175rem;
182
-      height: 0.875rem;
100
+      height: .7875rem;
183 101
       display: flex;
184 102
       align-items: center;
185 103
       justify-content: center;
186
-      flex-direction: column;
187
-      line-height: 1.3em;
188
-      text-align: center;
189
-      .group-praise__circleName {
190
-        width: 0.725rem;
104
+      margin-top: .2rem;
105
+      background: linear-gradient( 90deg, #032430 0%, #023645 13%, #0B4D61 38%, #105A70 61%, #023645 87%, #06252B 100%);
106
+      .group-praise__circlePercent{
107
+        font-size: .475rem;
191 108
       }
192 109
     }
193 110
     .group-praise__circle {
194
-      width: 1.2rem;
195
-      height: 1.2rem;
196
-      margin-top: 0.4rem;
197
-      position: relative;
198
-      &::after {
199
-        content: "";
200
-        opacity: 0.5;
201
-        width: 100%;
202
-        height: 100%;
203
-        background: url("./../assets/img/image_no2.png") no-repeat;
204
-        background-size: 100%;
205
-        position: absolute;
206
-        left: 0;
207
-        top: 0;
208
-      }
209
-    }
210
-    .group-praise__circle--win {
211
-      width: 1.7625rem;
212
-      height: 1.6875rem;
213
-      margin: 0.05rem 0.1375rem 0;
214
-      position: relative;
215
-      &::after {
216
-        content: "";
217
-        position: absolute;
218
-        left: 0;
219
-        top: 0;
220
-        opacity: 0.5;
221
-        width: 100%;
222
-        height: 100%;
223
-        background: url("./../assets/img/image_no1.png") no-repeat;
224
-        background-size: 100%;
225
-      }
226
-      .group-praise__circleContent {
227
-        margin-top: 0.1rem;
228
-      }
111
+      width: 1.425rem;
229 112
     }
230 113
   }
231 114
 }

+ 68 - 68
src/components/OnDutyToday.vue

@@ -1,9 +1,22 @@
1 1
 <template>
2 2
   <div class="on-duty-today">
3
-    <div class="on-duty-today__inner" :class="{marquee_top:animate}" :style="{transform:'translateY('+(2.7125*n)+'rem)'}">
4
-      <div class="on-duty-today__list" v-for="(item1,i) in workList" :key="i">
5
-        <div class="on-duty-today__item" v-for="(item2,j) in item1" :key="j">
6
-          <OnDutyTodayPie :workListItem="item2"></OnDutyTodayPie>
3
+    <div class="on-duty-today__inner">
4
+      <div class="on-duty-today__list">
5
+        <div class="on-duty-today__item">
6
+          <div class="on-duty-today__itemHeader">{{todayBeOnDuty.total || 0}}</div>
7
+          <div class="on-duty-today__itemBody">总单数</div>
8
+        </div>
9
+        <div class="on-duty-today__item">
10
+          <div class="on-duty-today__itemHeader">{{todayBeOnDuty.price || 0}}</div>
11
+          <div class="on-duty-today__itemBody">总费用(元)</div>
12
+        </div>
13
+        <div class="on-duty-today__item">
14
+          <div class="on-duty-today__itemHeader">{{todayBeOnDuty.avg_response | formatHourMinute}}</div>
15
+          <div class="on-duty-today__itemBody">平均接单时间</div>
16
+        </div>
17
+        <div class="on-duty-today__item">
18
+          <div class="on-duty-today__itemHeader">{{todayBeOnDuty.avg_handle | formatHourMinute}}</div>
19
+          <div class="on-duty-today__itemBody">平均解决时间</div>
7 20
         </div>
8 21
       </div>
9 22
     </div>
@@ -11,76 +24,56 @@
11 24
 </template>
12 25
 
13 26
 <script>
14
-import OnDutyTodayPie from './OnDutyTodayPie.vue'
15
-import { post, timer5 } from './../http/http'
27
+import { post, timerCommon } from './../http/http'
16 28
 export default {
17 29
   name: 'OnDutyToday',
18
-  inject: ['hospitalId'],
30
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
19 31
   data () {
20 32
     return {
33
+      sign: 'lastWeek',
21 34
       timer: null,
22
-      timer1: null,
23
-      animate: false,
24
-      n: 0,
25
-      todayBeOnDuty: [], // 头部总当班人数
26
-      workList: [] // 当班人数(工作中,空闲中)
35
+      todayBeOnDuty: {} // 头部总当班人数
27 36
     }
28 37
   },
29
-  components: {
30
-    OnDutyTodayPie
31
-  },
32 38
   methods: {
33
-    // 无限滚动
34
-    scrollInfinite () {
35
-      clearTimeout(this.timer1)
36
-      this.timer1 = setTimeout(() => {
37
-        this.showMarquee()
38
-        this.scrollInfinite()
39
-      }, 5000)
40
-    },
41
-    // 处理数组方法
42
-    showMarquee () {
43
-      this.animate = true
44
-      this.n--
45
-      if (this.n === -(this.workList.length)) {
46
-        this.animate = false
47
-        this.n = 0
48
-      }
49
-    },
50 39
     // 获取数据
51 40
     async getData () {
52
-      const srartTime = this.$moment().format('YYYY-MM-DD')
53
-      const endTime = this.$moment().format('YYYY-MM-DD')
54
-      const postData = { srartTime, endTime }
41
+      this.$emit('signEmit', this.sign)
42
+      let startTime
43
+      let endTime
44
+
45
+      if (this.sign === 'lastWeek') {
46
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
47
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
48
+      } else if (this.sign === 'lastMonth') {
49
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
50
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
51
+      }
55 52
       const result = await post(
56
-        `/largeScreen/getData/staffWorkingCondition/${this.hospitalId}`, postData
53
+        '/itsm/report/index',
54
+        {
55
+          parentDutyId: this.parentDutyId,
56
+          hosId: this.hosId,
57
+          dutyId: this.dutyId,
58
+          startDate: startTime,
59
+          endDate: endTime,
60
+          type: 'itsmSummary'
61
+        }
57 62
       )
58
-      this.todayBeOnDuty = []
59
-      this.workList = []
60
-      this.todayBeOnDuty = result.todayBeOnDuty[0]
61
-      const len = Math.ceil(result.workList.length / 3)
62
-      for (let i = 0; i < len; i++) {
63
-        let list = [
64
-          result.workList[0 + 3 * i],
65
-          result.workList[1 + 3 * i],
66
-          result.workList[2 + 3 * i]
67
-        ]
68
-        list = list.filter((item) => item !== undefined)
69
-        this.workList.push(list)
70
-      }
71
-      this.$emit('todayBeOnDutyHandle', JSON.stringify(this.todayBeOnDuty))
63
+      this.todayBeOnDuty = result.data ? result.data[0] : {}
72 64
       this.polling()
73
-      if (this.workList.length > 0) {
74
-        this.workList = [...this.workList, this.workList[0]]
75
-        this.scrollInfinite()
76
-      }
77 65
     },
78 66
     // 轮询请求
79 67
     polling () {
80 68
       clearTimeout(this.timer)
81 69
       this.timer = setTimeout(() => {
70
+        if (this.sign === 'lastWeek') {
71
+          this.sign = 'lastMonth'
72
+        } else if (this.sign === 'lastMonth') {
73
+          this.sign = 'lastWeek'
74
+        }
82 75
         this.getData()
83
-      }, timer5)
76
+      }, timerCommon)
84 77
     }
85 78
   },
86 79
   mounted () {
@@ -95,27 +88,34 @@ export default {
95 88
 <style lang="less">
96 89
 .on-duty-today {
97 90
   overflow: hidden;
98
-  height: 2.7125rem;
91
+  height: 2.6625rem;
99 92
   .on-duty-today__inner {
100
-    // display: flex;
101
-    // flex-wrap: wrap;
102
-    // width: 1000%;
103
-    &.marquee_top {
104
-      transition: all 1s;
105
-      // transform: translateY(-2.7125rem);
106
-    }
93
+    height: 100%;
107 94
     .on-duty-today__list {
108
-      width: 11.7rem;
109 95
       display: flex;
110 96
       justify-content: space-between;
111
-      height: 2.7125rem;
97
+      height: 100%;
112 98
       .on-duty-today__item {
113
-        margin-top: 0.2rem;
99
+        text-align: center;
100
+        display: flex;
101
+        flex-direction: column;
102
+        justify-content: center;
103
+        margin-right: .4rem;
114 104
         &:first-child {
115
-          margin-left: 0.3rem;
105
+          margin-left: .4rem;
116 106
         }
117 107
         &:last-child {
118
-          margin-right: 0.3rem;
108
+          margin-right: .4rem;
109
+        }
110
+        .on-duty-today__itemHeader{
111
+          font-size: .65rem;
112
+          color: #00D5EA;
113
+          font-weight: bold;
114
+        }
115
+        .on-duty-today__itemBody{
116
+          font-size: .2rem;
117
+          color: #FFFFFF;
118
+          margin-top: .1rem;
119 119
         }
120 120
       }
121 121
     }

+ 0 - 355
src/components/OnDutyTodayPie.vue

@@ -1,355 +0,0 @@
1
-<template>
2
-  <div class="on-duty-today-pie__wrap">
3
-    <div class="on-duty-today-pie" ref="pie"></div>
4
-    <div class="on-duty-today-pie__tips">
5
-      <ul class="on-duty-today-pie__list">
6
-        <li class="on-duty-today-pie__item">
7
-          <i class="on-duty-today-pie__item--green"></i>已完成
8
-          <em>{{ workListItem[1] }}</em>
9
-        </li>
10
-        <li class="on-duty-today-pie__item">
11
-          <i class="on-duty-today-pie__item--red"></i>执行中
12
-          <em>{{ workListItem[2] }}</em>
13
-        </li>
14
-      </ul>
15
-    </div>
16
-  </div>
17
-</template>
18
-
19
-<script>
20
-import echarts from 'echarts'
21
-export default {
22
-  name: 'OnDutyTodayPie',
23
-  data () {
24
-    return {
25
-      // timer: null,
26
-      myChart: null
27
-    }
28
-  },
29
-  props: {
30
-    workListItem: {
31
-      type: Array,
32
-      default: () => []
33
-    }
34
-  },
35
-  watch: {
36
-    workListItem () {
37
-      this.draw()
38
-    }
39
-  },
40
-  methods: {
41
-    // 画图
42
-    draw () {
43
-      this.myChart = echarts.init(this.$refs.pie)
44
-      const workListItem = this.workListItem
45
-      const option = {
46
-        title: {
47
-          text: workListItem[0],
48
-          textStyle: {
49
-            color: '#fff',
50
-            fontSize: 14,
51
-            fontWeight: 'normal'
52
-          },
53
-          left: 'center',
54
-          top: -5
55
-        },
56
-        color: ['#237189', '#1d3e5b'],
57
-        series: [
58
-          {
59
-            type: 'pie',
60
-            top: 15,
61
-            center: ['50%', '55%'],
62
-            zlevel: 1,
63
-            silent: true,
64
-            radius: ['83%', '84%'],
65
-            hoverAnimation: false,
66
-            label: {
67
-              normal: {
68
-                show: false
69
-              }
70
-            },
71
-            labelLine: {
72
-              normal: {
73
-                show: false
74
-              }
75
-            },
76
-            data: this._pie3()
77
-          },
78
-          {
79
-            type: 'pie',
80
-            top: 15,
81
-            center: ['50%', '55%'],
82
-            zlevel: 2,
83
-            silent: true,
84
-            radius: ['76%', '77%'],
85
-            startAngle: 90,
86
-            hoverAnimation: false,
87
-            label: {
88
-              normal: {
89
-                show: false
90
-              }
91
-            },
92
-            labelLine: {
93
-              normal: {
94
-                show: false
95
-              }
96
-            },
97
-            data: this._pie2()
98
-          },
99
-          {
100
-            type: 'pie',
101
-            top: 15,
102
-            center: ['50%', '55%'],
103
-            zlevel: 3,
104
-            silent: true,
105
-            radius: ['72%', '70%'],
106
-            label: {
107
-              normal: {
108
-                show: false
109
-              }
110
-            },
111
-            labelLine: {
112
-              normal: {
113
-                show: false
114
-              }
115
-            },
116
-            data: [1]
117
-          },
118
-          {
119
-            type: 'pie',
120
-            top: 15,
121
-            center: ['50%', '55%'],
122
-            zlevel: 4,
123
-            silent: true,
124
-            radius: ['46%', '66%'],
125
-            startAngle: 180,
126
-            hoverAnimation: false,
127
-            // label: {
128
-            //   show: true,
129
-            //   formatter () {
130
-            //     const num = [workListItem[1], workListItem[0]]
131
-            //     return `当班人数\n${num[0]}/${num[1]}`
132
-            //   },
133
-            //   fontSize: 14,
134
-            //   lineHeight: 30,
135
-            //   color: '#d4d6d7',
136
-            //   position: 'center'
137
-            // },
138
-            data: this._pie4()
139
-          }
140
-        ]
141
-      }
142
-      this.myChart.setOption(option)
143
-    },
144
-    _pie1 () {
145
-      const dataArr = []
146
-      for (var i = 0; i < 8; i++) {
147
-        dataArr.push({
148
-          name: (i + 1).toString(),
149
-          value: 20,
150
-          itemStyle: {
151
-            normal: {
152
-              color: 'rgba(88,142,197,0.4)',
153
-              borderWidth: 0,
154
-              borderColor: 'rgba(0,0,0,0)'
155
-            }
156
-          }
157
-        })
158
-      }
159
-      return dataArr
160
-    },
161
-    _pie2 () {
162
-      const dataArr = []
163
-      for (var i = 0; i < 16; i++) {
164
-        if (i % 4 === 0) {
165
-          dataArr.push({
166
-            name: (i + 1).toString(),
167
-            value: 50,
168
-            itemStyle: {
169
-              normal: {
170
-                borderWidth: 0,
171
-                borderColor: 'rgba(0,0,0,0)'
172
-              }
173
-            }
174
-          })
175
-        } else if (i % 4 === 1) {
176
-          dataArr.push({
177
-            name: (i + 1).toString(),
178
-            value: 2,
179
-            itemStyle: {
180
-              normal: {
181
-                color: 'rgba(88,142,197,0)',
182
-                borderWidth: 0,
183
-                borderColor: 'rgba(0,0,0,0)'
184
-              }
185
-            }
186
-          })
187
-        } else if (i % 4 === 2) {
188
-          dataArr.push({
189
-            name: (i + 1).toString(),
190
-            value: 20,
191
-            itemStyle: {
192
-              normal: {
193
-                borderWidth: 0,
194
-                borderColor: 'rgba(0,0,0,0)'
195
-              }
196
-            }
197
-          })
198
-        } else {
199
-          dataArr.push({
200
-            name: (i + 1).toString(),
201
-            value: 2,
202
-            itemStyle: {
203
-              normal: {
204
-                color: 'rgba(88,142,197,0)',
205
-                borderWidth: 0,
206
-                borderColor: 'rgba(0,0,0,0)'
207
-              }
208
-            }
209
-          })
210
-        }
211
-      }
212
-      return dataArr
213
-    },
214
-    _pie3 () {
215
-      const dataArr = []
216
-      for (var i = 0; i < 100; i++) {
217
-        if (i % 2 === 0) {
218
-          dataArr.push({
219
-            name: (i + 1).toString(),
220
-            value: 25,
221
-            itemStyle: {
222
-              normal: {
223
-                color: '#30586a',
224
-                borderWidth: 0,
225
-                borderColor: 'rgba(0,0,0,0)'
226
-              }
227
-            }
228
-          })
229
-        } else {
230
-          dataArr.push({
231
-            name: (i + 1).toString(),
232
-            value: 20,
233
-            itemStyle: {
234
-              normal: {
235
-                color: 'rgba(0,0,0,0)',
236
-                borderWidth: 0,
237
-                borderColor: 'rgba(0,0,0,0)'
238
-              }
239
-            }
240
-          })
241
-        }
242
-      }
243
-      return dataArr
244
-    },
245
-    _pie4 () {
246
-      const dataArr = []
247
-      const arr = ['已完成', '执行中']
248
-      const color = ['#70c282', '#c27073']
249
-      const num = [this.workListItem[1], this.workListItem[2]]
250
-      for (var i = 0; i < arr.length; i++) {
251
-        dataArr.push({
252
-          name: arr[i],
253
-          value: num[i],
254
-          itemStyle: {
255
-            normal: {
256
-              color: color[i],
257
-              borderWidth: 0,
258
-              borderColor: 'rgba(0,0,0,0)'
259
-            }
260
-          }
261
-        })
262
-        if (i === 0) {
263
-          dataArr[0].label = {
264
-            show: true,
265
-            formatter () {
266
-              return `工单总数\n${num[0] + num[1]}`
267
-            },
268
-            fontSize: 14,
269
-            lineHeight: 30,
270
-            color: '#d4d6d7',
271
-            position: 'center',
272
-            padding: [35, 0, 0, 0]
273
-          }
274
-        }
275
-        if (i === 1) {
276
-          dataArr[1].label = {
277
-            show: false,
278
-            formatter () {
279
-              return ''
280
-            },
281
-            fontSize: 0,
282
-            lineHeight: 0,
283
-            color: '#d4d6d7',
284
-            position: 'center'
285
-          }
286
-        }
287
-      }
288
-      return dataArr
289
-    }
290
-    // 动画
291
-    // doing () {
292
-    //   clearTimeout(this.timer)
293
-    //   const option = this.myChart.getOption()
294
-    //   option.series[1].startAngle = option.series[1].startAngle - 1
295
-    //   this.myChart.setOption(option)
296
-    //   this.timer = setTimeout(() => {
297
-    //     this.doing()
298
-    //   }, 16)
299
-    // }
300
-  },
301
-  mounted () {
302
-    this.draw()
303
-    // this.doing()
304
-  }
305
-  // beforeDestroy () {
306
-  //   clearTimeout(this.timer)
307
-  // }
308
-}
309
-</script>
310
-
311
-<style lang="less">
312
-.on-duty-today-pie__wrap {
313
-  // width: 2.5rem;
314
-  width: 3rem;
315
-  .on-duty-today-pie {
316
-    // width: 1.8rem;
317
-    width: 2.6rem;
318
-    // height: 2.125rem;
319
-    height: 2rem;
320
-    margin: 0 auto;
321
-  }
322
-  .on-duty-today-pie__tips {
323
-    .on-duty-today-pie__list {
324
-      display: flex;
325
-      justify-content: space-around;
326
-      align-items: center;
327
-      .on-duty-today-pie__item {
328
-        display: flex;
329
-        justify-content: space-between;
330
-        align-items: center;
331
-        color: #d4d6d7;
332
-        font-size: 0.15rem;
333
-        em {
334
-          font-size: 0.2rem;
335
-          margin-left: 0.1rem;
336
-        }
337
-        .on-duty-today-pie__item--red {
338
-          width: 0.1rem;
339
-          height: 0.1rem;
340
-          background-color: #c27073;
341
-          border-radius: 0.025rem;
342
-          margin-right: 0.075rem;
343
-        }
344
-        .on-duty-today-pie__item--green {
345
-          width: 0.1rem;
346
-          height: 0.1rem;
347
-          background-color: #70c282;
348
-          border-radius: 0.025rem;
349
-          margin-right: 0.075rem;
350
-        }
351
-      }
352
-    }
353
-  }
354
-}
355
-</style>

+ 59 - 38
src/components/PointsRanking.vue

@@ -6,12 +6,13 @@
6 6
 
7 7
 <script>
8 8
 import echarts from 'echarts'
9
-import { post, timer8 } from './../http/http'
9
+import { post, timerCommon } from './../http/http'
10 10
 export default {
11 11
   name: 'PointsRanking',
12
-  inject: ['hospitalId'],
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
+      sign: 'lastWeek',
15 16
       timer: null,
16 17
       myChart: null,
17 18
       gradeRankingListNum: [],
@@ -24,25 +25,24 @@ export default {
24 25
       this.myChart = echarts.init(this.$refs.PointsRanking)
25 26
       var colorArray = [
26 27
         {
27
-          top: '#c2ab70', // 第一
28
-          bottom: 'rgba(194, 171, 112, 0.5)',
29
-          borderColor: '#c2ab70'
28
+          top: '#6B97BD', // 第一
29
+          bottom: '#364C5F'
30 30
         },
31 31
         {
32
-          top: '#70c282', // 第二
33
-          bottom: 'rgba(112, 194, 130, 0.5)'
32
+          top: '#6B97BD', // 第二
33
+          bottom: '#364C5F'
34 34
         },
35 35
         {
36
-          top: '#709cc2', // 第三
37
-          bottom: 'rgba(112, 156, 194, 0.5)'
36
+          top: '#6AB87D', // 第三
37
+          bottom: '#3D7057'
38 38
         },
39 39
         {
40
-          top: '#709cc2', // 第四
41
-          bottom: 'rgba(112, 156, 194, 0.5)'
40
+          top: '#A09163', // 第四
41
+          bottom: '#504932'
42 42
         },
43 43
         {
44
-          top: '#709cc2', // 第五
45
-          bottom: 'rgba(112, 156, 194, 0.5)'
44
+          top: '#6B97BD', // 第五
45
+          bottom: '#364C5F'
46 46
         }
47 47
       ]
48 48
       const option = {
@@ -51,19 +51,15 @@ export default {
51 51
           formatter: '{b}:{c}'
52 52
         },
53 53
         grid: {
54
-          left: '5%',
55
-          top: '12%',
56
-          right: '1%',
57
-          bottom: '8%',
54
+          left: 28,
55
+          top: 0,
56
+          bottom: 10,
58 57
           containLabel: true
59 58
         },
60 59
         xAxis: {
61 60
           type: 'value',
62 61
           show: false,
63 62
           position: 'top',
64
-          max: function (value) {
65
-            return value.max * 1.5
66
-          },
67 63
           axisTick: {
68 64
             show: false
69 65
           },
@@ -90,6 +86,10 @@ export default {
90 86
               show: false
91 87
             },
92 88
             inverse: 'true', // 排序
89
+            axisLabel: {
90
+              margin: 16,
91
+              color: 'rgba(255,255,255,0.85)'
92
+            },
93 93
             axisLine: {
94 94
               show: false,
95 95
               lineStyle: {
@@ -106,7 +106,8 @@ export default {
106 106
             label: {
107 107
               normal: {
108 108
                 show: true,
109
-                position: [350, 0],
109
+                // position: [300, 0],
110
+                position: 'right',
110 111
                 formatter: '{c}',
111 112
                 textStyle: {
112 113
                   color: '#fff'
@@ -188,23 +189,37 @@ export default {
188 189
     },
189 190
     // 获取数据
190 191
     async getData () {
191
-      const srartTime = this.$moment()
192
-        .subtract(29, 'days')
193
-        .format('YYYY-MM-DD') // 近三十天
194
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
192
+      this.$emit('signEmit', this.sign)
193
+      let startTime
194
+      let endTime
195
+
196
+      if (this.sign === 'lastWeek') {
197
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
198
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
199
+      } else if (this.sign === 'lastMonth') {
200
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
201
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
202
+      }
195 203
       const result = await post(
196
-        `/largeScreen/getData/gradeRankingList/${this.hospitalId}`,
197
-        { srartTime, endTime }
204
+        '/itsm/report/index',
205
+        {
206
+          parentDutyId: this.parentDutyId,
207
+          hosId: this.hosId,
208
+          dutyId: this.dutyId,
209
+          startDate: startTime,
210
+          endDate: endTime,
211
+          type: 'itsmDeptOrder'
212
+        }
198 213
       )
199 214
       this.gradeRankingListNum = []
200 215
       this.gradeRankingListName = []
201
-      if (result.gradeRankingList.length > 5) {
202
-        result.gradeRankingList = result.gradeRankingList.slice(0, 5)
216
+      if (result.data.length > 5) {
217
+        result.data = result.data.slice(0, 5)
203 218
       }
204
-      if (result.gradeRankingList.length > 0) {
205
-        result.gradeRankingList.forEach(item => {
206
-          this.gradeRankingListNum.push(item[2]) // 获取到的数据
207
-          this.gradeRankingListName.push(item[1]) // 获取到的名称
219
+      if (result.data.length > 0) {
220
+        result.data.forEach(item => {
221
+          this.gradeRankingListNum.push(item.total || 0) // 获取到的数据
222
+          this.gradeRankingListName.push(item.name || '') // 获取到的名称
208 223
         })
209 224
       }
210 225
       this.draw()
@@ -214,8 +229,13 @@ export default {
214 229
     polling () {
215 230
       clearTimeout(this.timer)
216 231
       this.timer = setTimeout(() => {
232
+        if (this.sign === 'lastWeek') {
233
+          this.sign = 'lastMonth'
234
+        } else if (this.sign === 'lastMonth') {
235
+          this.sign = 'lastWeek'
236
+        }
217 237
         this.getData()
218
-      }, timer8)
238
+      }, timerCommon)
219 239
     }
220 240
   },
221 241
   mounted () {
@@ -227,16 +247,17 @@ export default {
227 247
 }
228 248
 </script>
229 249
 
230
-<style lang="less">
250
+<style lang="less" scoped>
231 251
 .points-ranking__wrap {
232
-  height: 2.7125rem;
252
+  height: 3.7rem;
233 253
   overflow: hidden;
254
+  position: relative;
234 255
   .points-ranking {
235 256
     width: 100%;
236
-    height: 3.25rem;
257
+    height: 100%;
237 258
     position: absolute;
238 259
     left: 0;
239
-    top: -0.175rem;
260
+    top: 0;
240 261
   }
241 262
 }
242 263
 </style>

+ 159 - 0
src/components/PriceProportion.vue

@@ -0,0 +1,159 @@
1
+<template>
2
+  <div class="points-ranking__wrap">
3
+    <div class="points-ranking" ref="CategoryProportion"></div>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import echarts from 'echarts'
9
+import { post, timerCommon } from './../http/http'
10
+export default {
11
+  name: 'CategoryProportion',
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13
+  data () {
14
+    return {
15
+      total: 0,
16
+      sign: 'lastWeek',
17
+      timer: null,
18
+      myChart: null,
19
+      gradeRankingList: []
20
+    }
21
+  },
22
+  methods: {
23
+    // 画图
24
+    draw () {
25
+      this.myChart = echarts.init(this.$refs.CategoryProportion)
26
+      const option = {
27
+        color: ['#006FFF', '#00D5EA'], // 颜色数组
28
+        tooltip: {
29
+          trigger: 'item'
30
+        },
31
+        legend: {
32
+          top: 16,
33
+          left: 8,
34
+          textStyle: {
35
+            color: '#fff', // 全局文字颜色
36
+            fontSize: 14
37
+          }
38
+        },
39
+        grid: {
40
+          left: 0,
41
+          top: 0,
42
+          bottom: 0,
43
+          right: 0
44
+        },
45
+        graphic: [{
46
+          type: 'text',
47
+          left: 'center',
48
+          top: '50%',
49
+          style: {
50
+            text: `总费用\n${this.total}元`, // 换行显示
51
+            textAlign: 'center',
52
+            textVerticalAlign: 'middle',
53
+            fill: '#949494', // 文字颜色
54
+            fontSize: 20
55
+          }
56
+        }],
57
+        series: [
58
+          {
59
+            name: '',
60
+            type: 'pie',
61
+            center: ['50%', '58%'],
62
+            radius: ['35%', '50%'],
63
+            avoidLabelOverlap: true,
64
+            label: {
65
+              show: true,
66
+              color: 'rgba(255, 255, 255, 0.85)',
67
+              formatter: (params) => {
68
+                return `${params.name}\n${params.value}元`
69
+              },
70
+              textStyle: {
71
+                lineHeight: 14
72
+              }
73
+            },
74
+            labelLine: {
75
+              show: true,
76
+              lineStyle: {
77
+                color: '#265A8A'
78
+              }
79
+            },
80
+            data: this.gradeRankingList
81
+          }
82
+        ]
83
+      }
84
+      this.myChart.setOption(option)
85
+    },
86
+    // 获取数据
87
+    async getData () {
88
+      this.$emit('signEmit', this.sign)
89
+      let startTime
90
+      let endTime
91
+
92
+      if (this.sign === 'lastWeek') {
93
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
94
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
95
+      } else if (this.sign === 'lastMonth') {
96
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
97
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
98
+      }
99
+      const result = await post(
100
+        '/itsm/report/index',
101
+        {
102
+          parentDutyId: this.parentDutyId,
103
+          hosId: this.hosId,
104
+          dutyId: this.dutyId,
105
+          startDate: startTime,
106
+          endDate: endTime,
107
+          type: 'itsmPriceProportion'
108
+        }
109
+      )
110
+      result.data = result.data || []
111
+      if (result.data.length) {
112
+        this.gradeRankingList = [
113
+          { name: '总工时', value: result.data[0].sum_price || 0, percent: result.data[0].sumPercent || '0%' },
114
+          { name: '总耗材', value: result.data[0].work_price || 0, percent: result.data[0].workPercent || '0%' }
115
+        ]
116
+        this.total = this.gradeRankingList.reduce((pre, cur) => pre + cur.value, 0)
117
+      } else {
118
+        this.gradeRankingList = []
119
+        this.total = 0
120
+      }
121
+      this.draw()
122
+      this.polling()
123
+    },
124
+    // 轮询请求
125
+    polling () {
126
+      clearTimeout(this.timer)
127
+      this.timer = setTimeout(() => {
128
+        if (this.sign === 'lastWeek') {
129
+          this.sign = 'lastMonth'
130
+        } else if (this.sign === 'lastMonth') {
131
+          this.sign = 'lastWeek'
132
+        }
133
+        this.getData()
134
+      }, timerCommon)
135
+    }
136
+  },
137
+  mounted () {
138
+    this.getData()
139
+  },
140
+  beforeDestroy () {
141
+    clearTimeout(this.timer)
142
+  }
143
+}
144
+</script>
145
+
146
+<style lang="less" scoped>
147
+.points-ranking__wrap {
148
+  height: 3.7rem;
149
+  overflow: hidden;
150
+  position: relative;
151
+  .points-ranking {
152
+    width: 100%;
153
+    height: 100%;
154
+    position: absolute;
155
+    left: 0;
156
+    top: 0;
157
+  }
158
+}
159
+</style>

+ 40 - 26
src/components/TimeUtilization.vue

@@ -4,12 +4,13 @@
4 4
 
5 5
 <script>
6 6
 import echarts from 'echarts'
7
-import { post, timer4 } from './../http/http'
7
+import { post, timerCommon } from './../http/http'
8 8
 export default {
9 9
   name: 'TimeUtilization',
10
-  inject: ['hospitalId'],
10
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
11 11
   data () {
12 12
     return {
13
+      sign: 'lastWeek',
13 14
       timer: null,
14 15
       myChart: null,
15 16
       groupWorkRatioName: [],
@@ -22,19 +23,10 @@ export default {
22 23
       this.myChart = echarts.init(this.$refs.TimeUtilization)
23 24
 
24 25
       const option = {
25
-        title: {
26
-          text: '工单数量(单)',
27
-          top: 5,
28
-          left: 15,
29
-          textStyle: {
30
-            color: '#d4d6d7',
31
-            fontSize: 12
32
-          }
33
-        },
34 26
         grid: {
35
-          left: '10%',
36
-          top: '20%',
37
-          bottom: '20%',
27
+          left: '5%',
28
+          top: '10%',
29
+          bottom: '10%',
38 30
           right: '5%'
39 31
         },
40 32
         xAxis: {
@@ -106,7 +98,7 @@ export default {
106 98
             symbol:
107 99
               'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
108 100
             label: {
109
-              show: false,
101
+              show: true,
110 102
               position: 'top',
111 103
               distance: 0,
112 104
               color: '#70c2ab',
@@ -124,11 +116,11 @@ export default {
124 116
                   colorStops: [
125 117
                     {
126 118
                       offset: 0,
127
-                      color: 'rgba(112,194,130, .8)' //  0%  处的颜色
119
+                      color: '#00D5EA' //  0%  处的颜色
128 120
                     },
129 121
                     {
130 122
                       offset: 1,
131
-                      color: 'rgba(112,194,130, .1)' //  100%  处的颜色
123
+                      color: '#00D5EA' //  100%  处的颜色
132 124
                     }
133 125
                   ],
134 126
                   global: false //  缺省为  false
@@ -147,17 +139,34 @@ export default {
147 139
     },
148 140
     // 获取数据
149 141
     async getData () {
150
-      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
151
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
142
+      this.$emit('signEmit', this.sign)
143
+      let startTime
144
+      let endTime
145
+
146
+      if (this.sign === 'lastWeek') {
147
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
148
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
149
+      } else if (this.sign === 'lastMonth') {
150
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
151
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
152
+      }
152 153
       const result = await post(
153
-        `/largeScreen/getData/getTasktypeTop5/${this.hospitalId}`,
154
-        { srartTime, endTime }
154
+        '/itsm/report/index',
155
+        {
156
+          parentDutyId: this.parentDutyId,
157
+          hosId: this.hosId,
158
+          dutyId: this.dutyId,
159
+          startDate: startTime,
160
+          endDate: endTime,
161
+          type: 'itsmBuilding'
162
+        }
155 163
       )
156 164
       this.groupWorkRatioNum = []
157 165
       this.groupWorkRatioName = []
158
-      result.list.forEach(item => {
159
-        this.groupWorkRatioNum.push(item[1]) // 获取到的数据
160
-        this.groupWorkRatioName.push(item[0]) // 获取到的名称
166
+      result.data = result.data || []
167
+      result.data.forEach(item => {
168
+        this.groupWorkRatioNum.push(item.total || 0) // 获取到的数据
169
+        this.groupWorkRatioName.push(item.name || '') // 获取到的名称
161 170
       })
162 171
       console.log(this.groupWorkRatioName)
163 172
       this.draw()
@@ -167,8 +176,13 @@ export default {
167 176
     polling () {
168 177
       clearTimeout(this.timer)
169 178
       this.timer = setTimeout(() => {
179
+        if (this.sign === 'lastWeek') {
180
+          this.sign = 'lastMonth'
181
+        } else if (this.sign === 'lastMonth') {
182
+          this.sign = 'lastWeek'
183
+        }
170 184
         this.getData()
171
-      }, timer4)
185
+      }, timerCommon)
172 186
     }
173 187
   },
174 188
   mounted () {
@@ -182,7 +196,7 @@ export default {
182 196
 
183 197
 <style lang="less">
184 198
 .time-utilization {
185
-  height: 2.1375rem;
199
+  height: 3.7rem;
186 200
   margin: 0 auto;
187 201
 }
188 202
 </style>

+ 39 - 61
src/components/TodayWorkOrder.vue

@@ -4,18 +4,16 @@
4 4
 
5 5
 <script>
6 6
 import echarts from 'echarts'
7
-import { post, timer6 } from './../http/http'
7
+import { post, timerCommon } from './../http/http'
8 8
 export default {
9 9
   name: 'TodayWorkOrder',
10
-  inject: ['hospitalId'],
10
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
11 11
   data () {
12 12
     return {
13
+      sign: 'price',
13 14
       timer: null,
14 15
       myChart: null,
15
-      todayWorkOrder: [], // 当日工单趋势图
16
-      todayGroupWorkOrderNum1: [], // 当日工单趋势图,图表数据,工单趋势
17
-      todayGroupWorkOrderNum2: [], // 当日工单趋势图,图表数据,执行中趋势
18
-      todayGroupWorkOrderNum3: [], // 当日工单趋势图,图表数据,超时工单趋势
16
+      todayGroupWorkOrderNum1: [], // 当日工单趋势图,图表数据
19 17
       todayGroupWorkOrderTimes: [] // 当日工单趋势图,图表数据,时间点
20 18
     }
21 19
   },
@@ -25,14 +23,7 @@ export default {
25 23
       this.myChart = echarts.init(this.$refs.TodayWorkOrder)
26 24
 
27 25
       const option = {
28
-        color: ['#49b856', '#c27073', '#c2ab70'],
29
-        legend: {
30
-          data: ['工单趋势', '执行中趋势', '超时工单趋势'],
31
-          textStyle: {
32
-            color: '#d4d6d7', // 更改坐标轴文字颜色
33
-            fontSize: 12 // 更改坐标轴文字大小
34
-          }
35
-        },
26
+        color: ['rgba(64, 93, 249, 1)'],
36 27
         tooltip: {
37 28
           trigger: 'axis',
38 29
           axisPointer: {
@@ -43,10 +34,10 @@ export default {
43 34
           }
44 35
         },
45 36
         grid: {
46
-          left: '2%',
47
-          top: '13%',
48
-          bottom: '10%',
49
-          right: '2%',
37
+          left: '20',
38
+          top: '30',
39
+          bottom: '20',
40
+          right: '40',
50 41
           containLabel: true
51 42
         },
52 43
         xAxis: [
@@ -100,36 +91,12 @@ export default {
100 91
             //   position: 'top'
101 92
             // },
102 93
             areaStyle: {
103
-              color: '#49b856'
94
+              color: 'rgba(64, 93, 249, 0.20)'
104 95
             },
105 96
             emphasis: {
106 97
               focus: 'series'
107 98
             },
108 99
             data: this.todayGroupWorkOrderNum1
109
-          },
110
-          {
111
-            name: '执行中趋势',
112
-            smooth: true,
113
-            type: 'line',
114
-            areaStyle: {
115
-              color: '#c27073'
116
-            },
117
-            emphasis: {
118
-              focus: 'series'
119
-            },
120
-            data: this.todayGroupWorkOrderNum2
121
-          },
122
-          {
123
-            name: '超时工单趋势',
124
-            smooth: true,
125
-            type: 'line',
126
-            areaStyle: {
127
-              color: '#c2ab70'
128
-            },
129
-            emphasis: {
130
-              focus: 'series'
131
-            },
132
-            data: this.todayGroupWorkOrderNum3
133 100
           }
134 101
         ]
135 102
       }
@@ -137,26 +104,32 @@ export default {
137 104
     },
138 105
     // 获取数据
139 106
     async getData () {
140
-      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
141
-      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
107
+      this.$emit('signEmit', this.sign)
108
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
109
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
110
+
142 111
       const result = await post(
143
-        `/largeScreen/getData/getTendencyList/${this.hospitalId}`,
144
-        { srartTime, endTime }
112
+        '/itsm/report/index',
113
+        {
114
+          parentDutyId: this.parentDutyId,
115
+          hosId: this.hosId,
116
+          dutyId: this.dutyId,
117
+          startDate: startTime,
118
+          endDate: endTime,
119
+          type: 'itsmReqCount'
120
+        }
145 121
       )
146
-      this.todayWorkOrder = []
147 122
       this.todayGroupWorkOrderNum1 = []
148
-      this.todayGroupWorkOrderNum2 = []
149
-      this.todayGroupWorkOrderNum3 = []
150 123
       this.todayGroupWorkOrderTimes = []
151
-      this.todayWorkOrder = result.todayWorkOrder[0]
152
-      this.$emit('todayWorkOrderHandle', JSON.stringify(this.todayWorkOrder))
153
-      result.list.forEach(item => {
154
-        this.todayGroupWorkOrderTimes.push(
155
-          this.$moment(item[0]).format('HH') + ':00'
156
-        ) // 获取到的数据,时间点
157
-        this.todayGroupWorkOrderNum1.push(item[1]) // 获取到的数据,工单趋势
158
-        this.todayGroupWorkOrderNum2.push(item[2]) // 获取到的数据,执行中趋势
159
-        this.todayGroupWorkOrderNum3.push(item[3]) // 获取到的数据,超时工单趋势
124
+      result.data = result.data || []
125
+      result.data.forEach(item => {
126
+        this.todayGroupWorkOrderTimes.push(item.date || '') // 获取到的数据,时间点
127
+
128
+        if (this.sign === 'price') {
129
+          this.todayGroupWorkOrderNum1.push(item.price || 0) // 获取到的数据
130
+        } else if (this.sign === 'order') {
131
+          this.todayGroupWorkOrderNum1.push(item.total || 0) // 获取到的数据
132
+        }
160 133
       })
161 134
       this.draw()
162 135
       this.polling()
@@ -165,8 +138,13 @@ export default {
165 138
     polling () {
166 139
       clearTimeout(this.timer)
167 140
       this.timer = setTimeout(() => {
141
+        if (this.sign === 'price') {
142
+          this.sign = 'order'
143
+        } else if (this.sign === 'order') {
144
+          this.sign = 'price'
145
+        }
168 146
         this.getData()
169
-      }, timer6)
147
+      }, timerCommon)
170 148
     }
171 149
   },
172 150
   mounted () {
@@ -180,7 +158,7 @@ export default {
180 158
 
181 159
 <style lang="less">
182 160
 .today-work-order {
183
-  height: 2.3875rem;
161
+  height: 3.7rem;
184 162
   margin: 0 auto;
185 163
 }
186 164
 </style>

+ 143 - 0
src/components/UserPrice.vue

@@ -0,0 +1,143 @@
1
+<template>
2
+  <div class="group-praise">
3
+    <div class="group-praise__content">
4
+      <div class="group-praise__circle">
5
+        <header class="group-praise__title">
6
+          <svg class="icon svg-icon" aria-hidden="true">
7
+            <use xlink:href="#transport-top1"></use>
8
+          </svg>
9
+        </header>
10
+        <div class="group-praise__circleContent">
11
+          {{ dataInfo[1] ? dataInfo[1].name : '' }}
12
+        </div>
13
+        <div class="group-praise__circleContent">
14
+          {{ dataInfo[1] ? (dataInfo[1].price || 0) + '元' : '' }}
15
+        </div>
16
+      </div>
17
+
18
+      <div class="group-praise__circle">
19
+        <header class="group-praise__title">
20
+          <svg class="icon svg-icon" aria-hidden="true">
21
+            <use xlink:href="#transport-top31"></use>
22
+          </svg>
23
+        </header>
24
+        <div class="group-praise__circleContent">
25
+          {{ dataInfo[0] ? dataInfo[0].name : '' }}
26
+        </div>
27
+        <div class="group-praise__circleContent">
28
+          {{ dataInfo[0] ? (dataInfo[0].price || 0) + '元' : '' }}
29
+        </div>
30
+      </div>
31
+
32
+      <div class="group-praise__circle">
33
+        <header class="group-praise__title">
34
+          <svg class="icon svg-icon" aria-hidden="true">
35
+            <use xlink:href="#transport-top5"></use>
36
+          </svg>
37
+        </header>
38
+        <div class="group-praise__circleContent">
39
+          {{ dataInfo[2] ? dataInfo[2].name : '' }}
40
+        </div>
41
+        <div class="group-praise__circleContent">
42
+          {{ dataInfo[2] ? (dataInfo[2].price || 0) + '元' : '' }}
43
+        </div>
44
+      </div>
45
+    </div>
46
+  </div>
47
+</template>
48
+
49
+<script>
50
+import { post, timerCommon } from './../http/http'
51
+export default {
52
+  name: 'UserPrice',
53
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
54
+  data () {
55
+    return {
56
+      sign: 'lastWeek',
57
+      timer: null,
58
+      dataInfo: []
59
+    }
60
+  },
61
+  methods: {
62
+    // 获取数据
63
+    async getData () {
64
+      this.$emit('signEmit', this.sign)
65
+      let startTime
66
+      let endTime
67
+
68
+      if (this.sign === 'lastWeek') {
69
+        startTime = this.$moment().subtract(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
70
+        endTime = this.$moment().subtract(1, 'week').endOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss')
71
+      } else if (this.sign === 'lastMonth') {
72
+        startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
73
+        endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
74
+      }
75
+      const result = await post(
76
+        '/itsm/report/index',
77
+        {
78
+          parentDutyId: this.parentDutyId,
79
+          hosId: this.hosId,
80
+          dutyId: this.dutyId,
81
+          startDate: startTime,
82
+          endDate: endTime,
83
+          type: 'itsmUserPrice'
84
+        }
85
+      )
86
+      const dataInfo = result.data || []
87
+      dataInfo.sort((a, b) => b.price - a.price)
88
+      this.dataInfo = dataInfo
89
+      this.polling()
90
+    },
91
+    // 轮询请求
92
+    polling () {
93
+      clearTimeout(this.timer)
94
+      this.timer = setTimeout(() => {
95
+        if (this.sign === 'lastWeek') {
96
+          this.sign = 'lastMonth'
97
+        } else if (this.sign === 'lastMonth') {
98
+          this.sign = 'lastWeek'
99
+        }
100
+        this.getData()
101
+      }, timerCommon)
102
+    }
103
+  },
104
+  mounted () {
105
+    this.getData()
106
+  },
107
+  beforeDestroy () {
108
+    clearTimeout(this.timer)
109
+  }
110
+}
111
+</script>
112
+
113
+<style lang="less" scoped>
114
+.group-praise {
115
+  height: 2.6625rem;
116
+  .group-praise__content {
117
+    display: flex;
118
+    justify-content: space-between;
119
+    align-items: center;
120
+    padding: 0 .2rem;
121
+    height: 100%;
122
+    .group-praise__title {
123
+      color: #fff;
124
+      font-size: .2rem;
125
+      text-align: center;
126
+      .svg-icon{
127
+        width: .8rem;
128
+        height: .8rem;
129
+      }
130
+    }
131
+    .group-praise__circleContent {
132
+      color: #fff;
133
+      font-size: .3rem;
134
+      margin-top: .1rem;
135
+      text-align: center;
136
+      height: .375rem;
137
+    }
138
+    .group-praise__circle {
139
+      width: 1.425rem;
140
+    }
141
+  }
142
+}
143
+</style>

+ 1 - 11
src/http/http.js

@@ -4,17 +4,7 @@ const protocolName = document.location.protocol// http协议
4 4
 const path = process.env.NODE_ENV === 'production' ? protocolName + '//' + domainName + '/service' : '/service'
5 5
 axios.defaults.baseURL = path
6 6
 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
7
-export const timer1 = 30000// AppToday
8
-export const timer2 = 300000// GroupPraise
9
-export const timer3 = 300000// GroupPerformance
10
-export const timer4 = 300000// TimeUtilization
11
-export const timer5 = 30000// OnDutyToday
12
-export const timer6 = 30000// TodayWorkOrder
13
-export const timer7 = 30000// ErrorWorkOrder
14
-export const timer8 = 300000// PointsRanking
15
-export const timer9 = 300000// OnTimeArrivalRate
16
-export const timer10 = 300000// BusinessTypeRatio
17
-export const timer11 = 300000// DeliveryRate
7
+export const timerCommon = 15000
18 8
 // post请求
19 9
 export function post (url, data = {}) {
20 10
   url = path + url

+ 9 - 0
src/main.js

@@ -7,12 +7,21 @@ import moment from 'moment'
7 7
 // 适配flex
8 8
 import '@/assets/js/flexible.js'
9 9
 
10
+// iconfont
11
+import '@/assets/font/iconfont.js'
12
+
10 13
 // 引入全局css
11 14
 import './assets/less/style.less'
12 15
 
13 16
 Vue.use(fullScreenContainer)
14 17
 Vue.prototype.$moment = moment
15 18
 
19
+// 分钟转为时分
20
+Vue.filter('formatHourMinute', (value) => {
21
+  if (!value) return '0分'
22
+  return moment.utc(value * 60 * 1000).format('HH时mm分')
23
+})
24
+
16 25
 Vue.config.productionTip = false
17 26
 console.info('v2.4.7')
18 27
 

+ 1 - 1
src/router/index.js

@@ -4,7 +4,7 @@ import VueRouter from 'vue-router'
4 4
 Vue.use(VueRouter)
5 5
 
6 6
 const routes = [{
7
-  path: '/:id',
7
+  path: '/:queryType/:hosId?/:dutyId?',
8 8
   name: 'index',
9 9
   meta: {
10 10
     title: '大屏端'

+ 145 - 120
src/views/AppIndex.vue

@@ -7,82 +7,102 @@
7 7
         <!-- 主体 -->
8 8
         <main class="app-index__main">
9 9
           <aside class="app-index__left">
10
-            <!-- 昨日积分前三人员 -->
10
+            <!-- 工单实时动态 -->
11 11
             <div class="app-item">
12
-              <h2 class="app-item__header">昨日积分前三人员</h2>
13
-              <GroupPraise></GroupPraise>
12
+              <h2 class="app-item__header app-item__header--big">工单实时动态</h2>
13
+              <GroupPraise class="app-item__body"></GroupPraise>
14 14
             </div>
15
-            <!-- 科室当日建单TOP10 -->
15
+            <!-- 科室维修量TOP5 -->
16 16
             <div class="app-item">
17
-              <h2 class="app-item__header">科室当日建单TOP10</h2>
18
-              <GroupPerformance></GroupPerformance>
19
-            </div>
20
-            <!-- 当日任务类型TOP5 -->
21
-            <div class="app-item">
22
-              <h2 class="app-item__header">当日任务类型TOP5</h2>
23
-              <TimeUtilization></TimeUtilization>
17
+              <h2 class="app-item__header app-item__header--big">
18
+                科室维修量TOP5
19
+                <ul class="app-item__headerData">
20
+                  <li class="app-item__headerDataItem" :class="{ active: pointsRankingSign == 'lastWeek' }">上周</li>
21
+                  <li class="app-item__headerDataItem" :class="{ active: pointsRankingSign == 'lastMonth' }">上月</li>
22
+                </ul>
23
+              </h2>
24
+              <PointsRanking class="app-item__body" @signEmit="pointsRankingSign = $event"></PointsRanking>
24 25
             </div>
25
-          </aside>
26
-          <article class="app-index__center">
27
-            <!-- 今日各人员工作情况 -->
26
+            <!-- 科室费用TOP5 -->
28 27
             <div class="app-item">
29 28
               <h2 class="app-item__header app-item__header--big">
30
-                今日各人员工作情况
29
+                科室费用TOP5
31 30
                 <ul class="app-item__headerData">
32
-                  <li class="app-item__headerDataItem">总当班人数<em>{{todayBeOnDuty[0]}}/{{todayBeOnDuty[1]}}</em></li>
31
+                  <li class="app-item__headerDataItem" :class="{ active: deptPriceSign == 'lastWeek' }">上周</li>
32
+                  <li class="app-item__headerDataItem" :class="{ active: deptPriceSign == 'lastMonth' }">上月</li>
33 33
                 </ul>
34 34
               </h2>
35
-              <OnDutyToday @todayBeOnDutyHandle="todayBeOnDutyHandle"></OnDutyToday>
35
+              <DeptPrice class="app-item__body" @signEmit="deptPriceSign = $event"></DeptPrice>
36 36
             </div>
37
-            <!-- 当日工单趋势图 -->
37
+          </aside>
38
+          <article class="app-index__center">
39
+            <!-- 上周/上月汇总数据 -->
38 40
             <div class="app-item">
39 41
               <h2 class="app-item__header app-item__header--big">
40
-                当日工单趋势图
42
+                上周汇总数据
41 43
                 <ul class="app-item__headerData">
42
-                  <li class="app-item__headerDataItem">执行中<em>{{todayWorkOrder[0]}}</em></li>
43
-                  <li class="app-item__headerDataItem">已超时<em>{{todayWorkOrder[1]}}</em></li>
44
-                  <li class="app-item__headerDataItem">已完成<em>{{todayWorkOrder[2]}}</em></li>
44
+                  <li class="app-item__headerDataItem" :class="{ active: onDutyTodaySign == 'lastWeek' }">上周</li>
45
+                  <li class="app-item__headerDataItem" :class="{ active: onDutyTodaySign == 'lastMonth' }">上月</li>
45 46
                 </ul>
46 47
               </h2>
47
-              <TodayWorkOrder @todayWorkOrderHandle = "todayWorkOrderHandle"></TodayWorkOrder>
48
+              <OnDutyToday class="app-item__body" @signEmit="onDutyTodaySign = $event"></OnDutyToday>
48 49
             </div>
49
-            <!-- 今日工单异常情况 -->
50
+            <!-- 报修数量趋势图 -->
50 51
             <div class="app-item">
51 52
               <h2 class="app-item__header app-item__header--big">
52
-                今日工单异常情况
53
+                报修数量趋势图
53 54
                 <ul class="app-item__headerData">
54
-                  <li class="app-item__headerDataItem app-item__headerDataItem--error">异常<em>{{todayAbnormityWorkOrder[0]}}</em></li>
55
-                  <li class="app-item__headerDataItem app-item__headerDataItem--timeout">超时<em>{{todayAbnormityWorkOrder[1]}}</em></li>
55
+                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'price' }">费用</li>
56
+                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'order' }">工单</li>
56 57
                 </ul>
57 58
               </h2>
58
-              <ErrorWorkOrder @todayAbnormityWorkOrderHandle="todayAbnormityWorkOrderHandle"></ErrorWorkOrder>
59
+              <TodayWorkOrder class="app-item__body" @signEmit="todayWorkOrderSign = $event"></TodayWorkOrder>
59 60
             </div>
60
-            <!-- 近三十天各类型工单按时送达率趋势 -->
61
+            <!-- 楼栋故障分布 -->
61 62
             <div class="app-item">
62 63
               <h2 class="app-item__header app-item__header--big">
63
-                近三十天各类型工单按时送达率趋势
64
+                楼栋故障分布
64 65
                 <ul class="app-item__headerData">
65
-                  <li @click="currentDictionary = item[0]" v-for="item in dictionary" :key="item[0]" class="app-item__headerDataItem app-item__headerDataItem--normal" :class="{'app-item__headerDataItem--active':currentDictionary === item[0]}"><span>{{item[1]}}</span></li>
66
+                  <li class="app-item__headerDataItem" :class="{ active: timeUtilizationSign == 'lastWeek' }">上周</li>
67
+                  <li class="app-item__headerDataItem" :class="{ active: timeUtilizationSign == 'lastMonth' }">上月</li>
66 68
                 </ul>
67 69
               </h2>
68
-              <DeliveryRate @changeCurrentDictionary="changeCurrentDictionary" @dictionaryHandle="dictionaryHandle" :currentDictionary="currentDictionary"></DeliveryRate>
70
+              <TimeUtilization class="app-item__body" @signEmit="timeUtilizationSign = $event"></TimeUtilization>
69 71
             </div>
70 72
           </article>
71 73
           <aside class="app-index__right">
72
-            <!-- 近三十天人员积分排行榜 -->
74
+            <!-- 维修人员费用Top3 -->
73 75
             <div class="app-item">
74
-              <h2 class="app-item__header">近三十天人员积分排行榜</h2>
75
-              <PointsRanking></PointsRanking>
76
+              <h2 class="app-item__header app-item__header--big">
77
+                维修人员费用TOP3
78
+                <ul class="app-item__headerData">
79
+                  <li class="app-item__headerDataItem" :class="{ active: userPriceSign == 'lastWeek' }">上周</li>
80
+                  <li class="app-item__headerDataItem" :class="{ active: userPriceSign == 'lastMonth' }">上月</li>
81
+                </ul>
82
+              </h2>
83
+              <UserPrice class="app-item__body" @signEmit="userPriceSign = $event"></UserPrice>
76 84
             </div>
77
-            <!-- 近三十天人员按时到达率排行榜 -->
85
+            <!-- 故障现象占比 -->
78 86
             <div class="app-item">
79
-              <h2 class="app-item__header">近三十天人员按时到达率排行榜</h2>
80
-              <OnTimeArrivalRate></OnTimeArrivalRate>
87
+              <h2 class="app-item__header app-item__header--big">
88
+                故障现象占比
89
+                <ul class="app-item__headerData">
90
+                  <li class="app-item__headerDataItem" :class="{ active: categoryProportionSign == 'lastWeek' }">上周</li>
91
+                  <li class="app-item__headerDataItem" :class="{ active: categoryProportionSign == 'lastMonth' }">上月</li>
92
+                </ul>
93
+              </h2>
94
+              <CategoryProportion class="app-item__body" @signEmit="categoryProportionSign = $event"></CategoryProportion>
81 95
             </div>
82
-            <!-- 近三十天各业务类型占比 -->
96
+            <!-- 费用占比 -->
83 97
             <div class="app-item">
84
-              <h2 class="app-item__header">近三十天各业务类型占比</h2>
85
-              <BusinessTypeRatio></BusinessTypeRatio>
98
+              <h2 class="app-item__header app-item__header--big">
99
+                费用占比
100
+                <ul class="app-item__headerData">
101
+                  <li class="app-item__headerDataItem" :class="{ active: priceProportionSign == 'lastWeek' }">上周</li>
102
+                  <li class="app-item__headerDataItem" :class="{ active: priceProportionSign == 'lastMonth' }">上月</li>
103
+                </ul>
104
+              </h2>
105
+              <PriceProportion class="app-item__body" @signEmit="priceProportionSign = $event"></PriceProportion>
86 106
             </div>
87 107
           </aside>
88 108
         </main>
@@ -94,128 +114,131 @@
94 114
 <script>
95 115
 import AppHeader from '../components/AppHeader.vue'
96 116
 import GroupPraise from '../components/GroupPraise.vue'
97
-import GroupPerformance from '../components/GroupPerformance.vue'
98 117
 import OnDutyToday from '../components/OnDutyToday.vue'
99 118
 import TodayWorkOrder from '../components/TodayWorkOrder.vue'
100 119
 import PointsRanking from '../components/PointsRanking.vue'
101
-import BusinessTypeRatio from '../components/BusinessTypeRatio.vue'
102
-import ErrorWorkOrder from '../components/ErrorWorkOrder.vue'
103
-import DeliveryRate from '../components/DeliveryRate.vue'
120
+import DeptPrice from '../components/DeptPrice.vue'
104 121
 import TimeUtilization from '../components/TimeUtilization.vue'
105
-import OnTimeArrivalRate from '../components/OnTimeArrivalRate.vue'
122
+import UserPrice from '../components/UserPrice.vue'
123
+import CategoryProportion from '../components/CategoryProportion.vue'
124
+import PriceProportion from '../components/PriceProportion.vue'
106 125
 export default {
107 126
   name: 'AppIndex',
108 127
   components: {
109 128
     AppHeader, // 头部
110
-    GroupPraise, // 昨日积分前三人员
111
-    GroupPerformance, // 科室当日建单TOP10
112
-    OnDutyToday, // 今日各人员工作情况
113
-    TodayWorkOrder, // 当日工单趋势图
114
-    PointsRanking, // 近三十天人员积分排行榜
115
-    BusinessTypeRatio, // 近三十天各业务类型占比
116
-    ErrorWorkOrder, // 今日工单异常情况
117
-    DeliveryRate, // 近三十天各类型工单按时送达率趋势
118
-    TimeUtilization, // 当日任务类型TOP5
119
-    OnTimeArrivalRate// 近三十天人员按时到达率排行榜
129
+    GroupPraise, // 工单实时动态
130
+    OnDutyToday, // 上周汇总数据
131
+    TodayWorkOrder, // 报修数量趋势图
132
+    PointsRanking, // 科室维修量TOP5
133
+    DeptPrice, // 科室费用TOP5
134
+    TimeUtilization, // 楼栋故障分布
135
+    UserPrice, // 维修人员费用TOP5
136
+    CategoryProportion, // 故障现象占比
137
+    PriceProportion // 费用占比
120 138
   },
121 139
   data () {
122 140
     return {
123
-      todayBeOnDuty: [], // 今日各人员工作情况
124
-      todayWorkOrder: [], // 当日工单趋势图
125
-      todayAbnormityWorkOrder: [], // 今日工单异常情况
126
-      dictionary: [], // 近三十天各类型工单按时送达率趋势
127
-      currentDictionary: -1// 近三十天各类型工单按时送达率趋势(id)
141
+      pointsRankingSign: 'lastWeek',
142
+      deptPriceSign: 'lastWeek',
143
+      onDutyTodaySign: 'lastWeek',
144
+      todayWorkOrderSign: 'price',
145
+      timeUtilizationSign: 'lastWeek',
146
+      userPriceSign: 'lastWeek',
147
+      categoryProportionSign: 'lastWeek',
148
+      priceProportionSign: 'lastWeek'
149
+
128 150
     }
129 151
   },
130 152
   methods: {
131
-    // 今日各人员工作情况
132
-    todayBeOnDutyHandle (value) {
133
-      this.todayBeOnDuty = JSON.parse(value)
134
-    },
135
-    // 当日工单趋势图
136
-    todayWorkOrderHandle (value) {
137
-      this.todayWorkOrder = JSON.parse(value)
138
-    },
139
-    // 今日工单异常情况
140
-    todayAbnormityWorkOrderHandle (value) {
141
-      this.todayAbnormityWorkOrder = JSON.parse(value)
142
-    },
143
-    // 近三十天各类型工单按时送达率趋势
144
-    dictionaryHandle (value) {
145
-      this.dictionary = JSON.parse(value)
146
-      this.currentDictionary = this.dictionary[0][0]
147
-      this.dictionary.forEach(item => {
148
-        if (item[0] === 255) {
149
-          item[1] = '转运'
150
-        } else if (item[0] === 256) {
151
-          item[1] = '标本'
152
-        } else if (item[0] === 257) {
153
-          item[1] = '药品'
154
-        } else if (item[0] === 258) {
155
-          item[1] = '静配'
156
-        } else if (item[0] === 259) {
157
-          item[1] = '其他'
158
-        } else if (item[0] === 260) {
159
-          item[1] = '陪检'
160
-        } else if (item[0] === 380) {
161
-          item[1] = '轮巡'
162
-        }
163
-      })
164
-    },
165
-    // 近三十天各类型工单按时送达率趋势---修改索引
166
-    changeCurrentDictionary (value) {
167
-      this.currentDictionary = value
168
-    }
153
+
169 154
   },
170 155
   provide () {
156
+    console.log('params', this.$route.params)
157
+    let hosId, dutyId, parentDutyId
158
+    if (this.$route.params.queryType === '1') {
159
+      hosId = undefined
160
+      dutyId = undefined
161
+      parentDutyId = undefined
162
+    } else if (this.$route.params.queryType === '2') {
163
+      hosId = +this.$route.params.hosId
164
+      dutyId = undefined
165
+      parentDutyId = undefined
166
+    } else if (this.$route.params.queryType === '3') {
167
+      hosId = undefined
168
+      dutyId = +this.$route.params.dutyId
169
+      parentDutyId = undefined
170
+    } else if (this.$route.params.queryType === '4') {
171
+      hosId = undefined
172
+      dutyId = undefined
173
+      parentDutyId = +this.$route.params.dutyId
174
+    }
175
+    console.log(parentDutyId, hosId, dutyId)
171 176
     return {
172
-      hospitalId: this.$route.params.id
177
+      parentDutyId,
178
+      hosId,
179
+      dutyId
173 180
     }
174 181
   },
175 182
   mounted () {
176
-    // setTimeout(() => {
177
-    //   this.loading = false
178
-    // }, 1000)
183
+
179 184
   }
180 185
 }
181 186
 </script>
182 187
 <style lang="less">
183 188
 .app-index {
184 189
   color: #fff;
185
-  background-color: #000;
190
+  background-color: #062B4D;
186 191
   width: 100vw;
187 192
   height: 100vh;
188 193
   .bg {
189 194
     padding: 0.2rem;
190
-    background-image: url("../assets/img/bg.jpg");
191
-    background-size: cover;
192
-    background-position: center center;
193 195
   }
194 196
   // 各模块公共头部
195 197
   .app-item {
196 198
     position: relative;
199
+    margin-top: .1rem;
200
+    border: 1px solid #265A8A;
201
+    border-radius: .1rem;
202
+    overflow: hidden;
203
+    &:first-of-type{
204
+      margin-top: 0;
205
+    }
197 206
     .app-item__header {
198
-      height: 0.3375rem;
199
-      font-size: 0.25rem;
207
+      height: .525rem;
208
+      font-size: .325rem;
200 209
       color: #fff;
201
-      background: url("./../assets/img/image_title01.png") left bottom no-repeat;
202
-      background-size: 100%;
210
+      background: linear-gradient( 90deg, #485E8D 0%, #1E3C64 61%, #071F34 100%);
203 211
       display: flex;
204 212
       justify-content: space-between;
213
+      align-items: center;
214
+      line-height: 1;
215
+      padding: 0 .125rem 0 .2rem;
205 216
       &.app-item__header--big{
206
-        background: url("./../assets/img/image_title02.png") left bottom no-repeat;
207
-        background-size: 100%;
208 217
         .app-item__headerData{
209 218
           display: flex;
210 219
           justify-content: space-between;
211 220
           align-content: center;
212 221
           font-size: .2rem;
213 222
           color: #fff;
214
-          margin-right: 1.6625rem;
215
-          margin-top: .05rem;
216 223
           .app-item__headerDataItem{
217
-            margin-left: .3rem;
224
+            // cursor: pointer;
225
+            margin-left: .0625rem;
218 226
             position: relative;
227
+            color: #C8C8C8;
228
+            font-size: .15rem;
229
+            width: .525rem;
230
+            height: .3rem;
231
+            border-radius: .1rem;
232
+            display: flex;
233
+            align-items: center;
234
+            justify-content: center;
235
+            &.active{
236
+              border: 1px solid #265A8A;
237
+              background-color: #14334F;
238
+            }
239
+            &:first-of-type{
240
+              margin-left: 0;
241
+            }
219 242
             &.app-item__headerDataItem--normal span{
220 243
               color: rgba(255, 255, 255, 0.6);
221 244
               cursor: pointer;
@@ -247,17 +270,19 @@ export default {
247 270
     }
248 271
   }
249 272
   // 主体
250
-  .app-index__main {
273
+  .app-index__main{
251 274
     display: flex;
252 275
     justify-content: space-between;
253 276
     .app-index__left {
254
-      width: 24.3%;
277
+      width: 6.125rem;
278
+      margin-right: .1rem;
255 279
     }
256 280
     .app-index__center {
257
-      width: 49.5%;
281
+      flex: 1;
282
+      margin-right: .1rem;
258 283
     }
259 284
     .app-index__right {
260
-      width: 24.3%;
285
+      width: 5.15rem;
261 286
     }
262 287
   }
263 288
 }