瀏覽代碼

综合大屏

seimin 1 周之前
父節點
當前提交
9e5426aa38

+ 149 - 4
package-lock.json

@@ -9,6 +9,7 @@
9 9
       "version": "0.1.0",
10 10
       "dependencies": {
11 11
         "axios": "^0.19.2",
12
+        "big.js": "^7.0.1",
12 13
         "core-js": "^3.6.5",
13 14
         "echarts": "^4.0.4",
14 15
         "moment": "^2.27.0",
@@ -3691,12 +3692,16 @@
3691 3692
       }
3692 3693
     },
3693 3694
     "node_modules/big.js": {
3694
-      "version": "5.2.2",
3695
-      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
3696
-      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
3697
-      "dev": true,
3695
+      "version": "7.0.1",
3696
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-7.0.1.tgz",
3697
+      "integrity": "sha512-iFgV784tD8kq4ccF1xtNMZnXeZzVuXWWM+ERFzKQjv+A5G9HC8CY3DuV45vgzFFcW+u2tIvmF95+AzWgs6BjCg==",
3698
+      "license": "MIT",
3698 3699
       "engines": {
3699 3700
         "node": "*"
3701
+      },
3702
+      "funding": {
3703
+        "type": "opencollective",
3704
+        "url": "https://opencollective.com/bigjs"
3700 3705
       }
3701 3706
     },
3702 3707
     "node_modules/binary-extensions": {
@@ -4113,6 +4118,16 @@
4113 4118
         "webpack": "^4.0.0"
4114 4119
       }
4115 4120
     },
4121
+    "node_modules/cache-loader/node_modules/big.js": {
4122
+      "version": "5.2.2",
4123
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
4124
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
4125
+      "dev": true,
4126
+      "license": "MIT",
4127
+      "engines": {
4128
+        "node": "*"
4129
+      }
4130
+    },
4116 4131
     "node_modules/cache-loader/node_modules/json5": {
4117 4132
       "version": "1.0.2",
4118 4133
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -4947,6 +4962,16 @@
4947 4962
         "webpack": "^4.0.0 || ^5.0.0"
4948 4963
       }
4949 4964
     },
4965
+    "node_modules/copy-webpack-plugin/node_modules/big.js": {
4966
+      "version": "5.2.2",
4967
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
4968
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
4969
+      "dev": true,
4970
+      "license": "MIT",
4971
+      "engines": {
4972
+        "node": "*"
4973
+      }
4974
+    },
4950 4975
     "node_modules/copy-webpack-plugin/node_modules/find-cache-dir": {
4951 4976
       "version": "2.1.0",
4952 4977
       "resolved": "https://registry.npmmirror.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
@@ -5324,6 +5349,16 @@
5324 5349
         "webpack": "^4.0.0 || ^5.0.0"
5325 5350
       }
5326 5351
     },
5352
+    "node_modules/css-loader/node_modules/big.js": {
5353
+      "version": "5.2.2",
5354
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
5355
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
5356
+      "dev": true,
5357
+      "license": "MIT",
5358
+      "engines": {
5359
+        "node": "*"
5360
+      }
5361
+    },
5327 5362
     "node_modules/css-loader/node_modules/camelcase": {
5328 5363
       "version": "5.3.1",
5329 5364
       "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz",
@@ -6662,6 +6697,16 @@
6662 6697
         "webpack": ">=2.0.0 <5.0.0"
6663 6698
       }
6664 6699
     },
6700
+    "node_modules/eslint-loader/node_modules/big.js": {
6701
+      "version": "5.2.2",
6702
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
6703
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
6704
+      "dev": true,
6705
+      "license": "MIT",
6706
+      "engines": {
6707
+        "node": "*"
6708
+      }
6709
+    },
6665 6710
     "node_modules/eslint-loader/node_modules/json5": {
6666 6711
       "version": "1.0.2",
6667 6712
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -7535,6 +7580,16 @@
7535 7580
         "webpack": "^4.0.0"
7536 7581
       }
7537 7582
     },
7583
+    "node_modules/file-loader/node_modules/big.js": {
7584
+      "version": "5.2.2",
7585
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
7586
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
7587
+      "dev": true,
7588
+      "license": "MIT",
7589
+      "engines": {
7590
+        "node": "*"
7591
+      }
7592
+    },
7538 7593
     "node_modules/file-loader/node_modules/json5": {
7539 7594
       "version": "1.0.2",
7540 7595
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -9810,6 +9865,16 @@
9810 9865
         "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
9811 9866
       }
9812 9867
     },
9868
+    "node_modules/less-loader/node_modules/big.js": {
9869
+      "version": "5.2.2",
9870
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
9871
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
9872
+      "dev": true,
9873
+      "license": "MIT",
9874
+      "engines": {
9875
+        "node": "*"
9876
+      }
9877
+    },
9813 9878
     "node_modules/less-loader/node_modules/json5": {
9814 9879
       "version": "1.0.2",
9815 9880
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -9963,6 +10028,16 @@
9963 10028
         "node": ">=8.9.0"
9964 10029
       }
9965 10030
     },
10031
+    "node_modules/loader-utils/node_modules/big.js": {
10032
+      "version": "5.2.2",
10033
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
10034
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
10035
+      "dev": true,
10036
+      "license": "MIT",
10037
+      "engines": {
10038
+        "node": "*"
10039
+      }
10040
+    },
9966 10041
     "node_modules/locate-path": {
9967 10042
       "version": "5.0.0",
9968 10043
       "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
@@ -10282,6 +10357,16 @@
10282 10357
         "webpack": "^4.4.0"
10283 10358
       }
10284 10359
     },
10360
+    "node_modules/mini-css-extract-plugin/node_modules/big.js": {
10361
+      "version": "5.2.2",
10362
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
10363
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
10364
+      "dev": true,
10365
+      "license": "MIT",
10366
+      "engines": {
10367
+        "node": "*"
10368
+      }
10369
+    },
10285 10370
     "node_modules/mini-css-extract-plugin/node_modules/json5": {
10286 10371
       "version": "1.0.2",
10287 10372
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -11725,6 +11810,16 @@
11725 11810
         "node": ">= 6"
11726 11811
       }
11727 11812
     },
11813
+    "node_modules/postcss-loader/node_modules/big.js": {
11814
+      "version": "5.2.2",
11815
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
11816
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
11817
+      "dev": true,
11818
+      "license": "MIT",
11819
+      "engines": {
11820
+        "node": "*"
11821
+      }
11822
+    },
11728 11823
     "node_modules/postcss-loader/node_modules/json5": {
11729 11824
       "version": "1.0.2",
11730 11825
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -14526,6 +14621,16 @@
14526 14621
         "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
14527 14622
       }
14528 14623
     },
14624
+    "node_modules/thread-loader/node_modules/big.js": {
14625
+      "version": "5.2.2",
14626
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
14627
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
14628
+      "dev": true,
14629
+      "license": "MIT",
14630
+      "engines": {
14631
+        "node": "*"
14632
+      }
14633
+    },
14529 14634
     "node_modules/thread-loader/node_modules/json5": {
14530 14635
       "version": "1.0.2",
14531 14636
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -15211,6 +15316,16 @@
15211 15316
         }
15212 15317
       }
15213 15318
     },
15319
+    "node_modules/url-loader/node_modules/big.js": {
15320
+      "version": "5.2.2",
15321
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
15322
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
15323
+      "dev": true,
15324
+      "license": "MIT",
15325
+      "engines": {
15326
+        "node": "*"
15327
+      }
15328
+    },
15214 15329
     "node_modules/url-loader/node_modules/json5": {
15215 15330
       "version": "1.0.2",
15216 15331
       "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
@@ -15468,6 +15583,16 @@
15468 15583
         }
15469 15584
       }
15470 15585
     },
15586
+    "node_modules/vue-loader/node_modules/big.js": {
15587
+      "version": "5.2.2",
15588
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
15589
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
15590
+      "dev": true,
15591
+      "license": "MIT",
15592
+      "engines": {
15593
+        "node": "*"
15594
+      }
15595
+    },
15471 15596
     "node_modules/vue-loader/node_modules/hash-sum": {
15472 15597
       "version": "1.0.2",
15473 15598
       "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
@@ -15515,6 +15640,16 @@
15515 15640
         "loader-utils": "^1.0.2"
15516 15641
       }
15517 15642
     },
15643
+    "node_modules/vue-style-loader/node_modules/big.js": {
15644
+      "version": "5.2.2",
15645
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
15646
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
15647
+      "dev": true,
15648
+      "license": "MIT",
15649
+      "engines": {
15650
+        "node": "*"
15651
+      }
15652
+    },
15518 15653
     "node_modules/vue-style-loader/node_modules/hash-sum": {
15519 15654
       "version": "1.0.2",
15520 15655
       "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
@@ -16341,6 +16476,16 @@
16341 16476
         "node": ">=0.4.0"
16342 16477
       }
16343 16478
     },
16479
+    "node_modules/webpack/node_modules/big.js": {
16480
+      "version": "5.2.2",
16481
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
16482
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
16483
+      "dev": true,
16484
+      "license": "MIT",
16485
+      "engines": {
16486
+        "node": "*"
16487
+      }
16488
+    },
16344 16489
     "node_modules/webpack/node_modules/enhanced-resolve": {
16345 16490
       "version": "4.5.0",
16346 16491
       "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz",

+ 2 - 1
package.json

@@ -5,13 +5,14 @@
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 --no-fix",
8
+    "lint": "vue-cli-service lint",
9 9
     "development": "node ./upload/development.js",
10 10
     "development120": "node ./upload/development120.js",
11 11
     "production": "node ./upload/production.js"
12 12
   },
13 13
   "dependencies": {
14 14
     "axios": "^0.19.2",
15
+    "big.js": "^7.0.1",
15 16
     "core-js": "^3.6.5",
16 17
     "echarts": "^4.0.4",
17 18
     "moment": "^2.27.0",

+ 49 - 3
src/assets/font/demo_index.html

@@ -55,6 +55,18 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon icon_transport">&#xe8a4;</span>
59
+                <div class="name">费用包含</div>
60
+                <div class="code-name">&amp;#xe8a4;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon icon_transport">&#xe672;</span>
65
+                <div class="name">工单信息</div>
66
+                <div class="code-name">&amp;#xe672;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
58 70
               <span class="icon icon_transport">&#xe675;</span>
59 71
                 <div class="name">添加hover</div>
60 72
                 <div class="code-name">&amp;#xe675;</div>
@@ -1104,9 +1116,9 @@
1104 1116
 <pre><code class="language-css"
1105 1117
 >@font-face {
1106 1118
   font-family: 'icon_transport';
1107
-  src: url('iconfont.woff2?t=1750225745603') format('woff2'),
1108
-       url('iconfont.woff?t=1750225745603') format('woff'),
1109
-       url('iconfont.ttf?t=1750225745603') format('truetype');
1119
+  src: url('iconfont.woff2?t=1751434589849') format('woff2'),
1120
+       url('iconfont.woff?t=1751434589849') format('woff'),
1121
+       url('iconfont.ttf?t=1751434589849') format('truetype');
1110 1122
 }
1111 1123
 </code></pre>
1112 1124
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1133,6 +1145,24 @@
1133 1145
         <ul class="icon_lists dib-box">
1134 1146
           
1135 1147
           <li class="dib">
1148
+            <span class="icon icon_transport transport-feiyongbaohan"></span>
1149
+            <div class="name">
1150
+              费用包含
1151
+            </div>
1152
+            <div class="code-name">.transport-feiyongbaohan
1153
+            </div>
1154
+          </li>
1155
+          
1156
+          <li class="dib">
1157
+            <span class="icon icon_transport transport-gongdanxinxi"></span>
1158
+            <div class="name">
1159
+              工单信息
1160
+            </div>
1161
+            <div class="code-name">.transport-gongdanxinxi
1162
+            </div>
1163
+          </li>
1164
+          
1165
+          <li class="dib">
1136 1166
             <span class="icon icon_transport transport-tianjiahover"></span>
1137 1167
             <div class="name">
1138 1168
               添加hover
@@ -2709,6 +2739,22 @@
2709 2739
           
2710 2740
             <li class="dib">
2711 2741
                 <svg class="icon svg-icon" aria-hidden="true">
2742
+                  <use xlink:href="#transport-feiyongbaohan"></use>
2743
+                </svg>
2744
+                <div class="name">费用包含</div>
2745
+                <div class="code-name">#transport-feiyongbaohan</div>
2746
+            </li>
2747
+          
2748
+            <li class="dib">
2749
+                <svg class="icon svg-icon" aria-hidden="true">
2750
+                  <use xlink:href="#transport-gongdanxinxi"></use>
2751
+                </svg>
2752
+                <div class="name">工单信息</div>
2753
+                <div class="code-name">#transport-gongdanxinxi</div>
2754
+            </li>
2755
+          
2756
+            <li class="dib">
2757
+                <svg class="icon svg-icon" aria-hidden="true">
2712 2758
                   <use xlink:href="#transport-tianjiahover"></use>
2713 2759
                 </svg>
2714 2760
                 <div class="name">添加hover</div>

+ 11 - 3
src/assets/font/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 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');
3
+  src: url('iconfont.woff2?t=1751434589849') format('woff2'),
4
+       url('iconfont.woff?t=1751434589849') format('woff'),
5
+       url('iconfont.ttf?t=1751434589849') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,6 +13,14 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.transport-feiyongbaohan:before {
17
+  content: "\e8a4";
18
+}
19
+
20
+.transport-gongdanxinxi:before {
21
+  content: "\e672";
22
+}
23
+
16 24
 .transport-tianjiahover:before {
17 25
   content: "\e675";
18 26
 }

文件差異過大導致無法顯示
+ 1 - 1
src/assets/font/iconfont.js


+ 14 - 0
src/assets/font/iconfont.json

@@ -6,6 +6,20 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "2076322",
10
+      "name": "费用包含",
11
+      "font_class": "feiyongbaohan",
12
+      "unicode": "e8a4",
13
+      "unicode_decimal": 59556
14
+    },
15
+    {
16
+      "icon_id": "3278364",
17
+      "name": "工单信息",
18
+      "font_class": "gongdanxinxi",
19
+      "unicode": "e672",
20
+      "unicode_decimal": 58994
21
+    },
22
+    {
9 23
       "icon_id": "2488133",
10 24
       "name": "添加hover",
11 25
       "font_class": "tianjiahover",

二進制
src/assets/font/iconfont.ttf


二進制
src/assets/font/iconfont.woff


二進制
src/assets/font/iconfont.woff2


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

@@ -71,4 +71,48 @@ a {
71 71
   overflow: hidden;
72 72
   -webkit-line-clamp: 2;
73 73
   -webkit-box-orient: vertical;
74
+}
75
+
76
+.lineTopLeft{
77
+  position: absolute;
78
+  top: 0;
79
+  left: 0;
80
+  width: .075rem;
81
+  height: .075rem;
82
+  border: 1px solid #038094;
83
+  border-right: none;
84
+  border-bottom: none;
85
+}
86
+
87
+.lineTopRight{
88
+  position: absolute;
89
+  top: 0;
90
+  right: 0;
91
+  width: .075rem;
92
+  height: .075rem;
93
+  border: 1px solid #038094;
94
+  border-left: none;
95
+  border-bottom: none;
96
+}
97
+
98
+.lineBottomLeft{
99
+  position: absolute;
100
+  bottom: 0;
101
+  left: 0;
102
+  width: .075rem;
103
+  height: .075rem;
104
+  border: 1px solid #038094;
105
+  border-right: none;
106
+  border-top: none;
107
+}
108
+
109
+.lineBottomRight{
110
+  position: absolute;
111
+  bottom: 0;
112
+  right: 0;
113
+  width: .075rem;
114
+  height: .075rem;
115
+  border: 1px solid #038094;
116
+  border-left: none;
117
+  border-top: none;
74 118
 }

+ 15 - 47
src/components/PriceProportion.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="points-ranking__wrap">
3
-    <div class="points-ranking" ref="CategoryProportion"></div>
3
+    <div class="points-ranking" ref="BusinessTotal"></div>
4 4
   </div>
5 5
 </template>
6 6
 
@@ -8,12 +8,10 @@
8 8
 import echarts from 'echarts'
9 9
 import { post, timerCommon } from './../http/http'
10 10
 export default {
11
-  name: 'CategoryProportion',
11
+  name: 'BusinessTotal',
12 12
   inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
-      total: 0,
16
-      sign: 'lastWeek',
17 15
       timer: null,
18 16
       myChart: null,
19 17
       gradeRankingList: []
@@ -22,9 +20,9 @@ export default {
22 20
   methods: {
23 21
     // 画图
24 22
     draw () {
25
-      this.myChart = echarts.init(this.$refs.CategoryProportion)
23
+      this.myChart = echarts.init(this.$refs.BusinessTotal)
26 24
       const option = {
27
-        color: ['#006FFF', '#00D5EA'], // 颜色数组
25
+        color: ['#33CC85', '#72C0DD', '#FAC958', '#546FC6'], // 颜色数组
28 26
         tooltip: {
29 27
           trigger: 'item'
30 28
         },
@@ -42,30 +40,18 @@ export default {
42 40
           bottom: 0,
43 41
           right: 0
44 42
         },
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 43
         series: [
58 44
           {
59 45
             name: '',
60 46
             type: 'pie',
61
-            center: ['50%', '58%'],
47
+            center: ['50%', '63%'],
62 48
             radius: ['35%', '50%'],
63 49
             avoidLabelOverlap: true,
64 50
             label: {
65 51
               show: true,
66 52
               color: 'rgba(255, 255, 255, 0.85)',
67 53
               formatter: (params) => {
68
-                return `${params.name}\n${params.value}元`
54
+                return `${params.name}:${params.value}\n${params.percent}`
69 55
               },
70 56
               textStyle: {
71 57
                 lineHeight: 14
@@ -85,17 +71,8 @@ export default {
85 71
     },
86 72
     // 获取数据
87 73
     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
-      }
74
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
75
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
99 76
       const result = await post(
100 77
         '/itsm/report/index',
101 78
         {
@@ -104,20 +81,16 @@ export default {
104 81
           dutyId: this.dutyId,
105 82
           startDate: startTime,
106 83
           endDate: endTime,
107
-          type: 'itsmPriceProportion'
84
+          type: 'hsmsStatisticsDateTypeCount',
85
+          businessType: 'hsms'
108 86
         }
109 87
       )
110 88
       result.data = result.data || []
111
-      if (result.data.length) {
112
-        this.gradeRankingList = [
113
-          { name: '总工时', value: result.data[0].work_price || 0, percent: result.data[0].workPercent || '0%' },
114
-          { name: '总耗材', value: result.data[0].sum_price || 0, percent: result.data[0].sumPercent || '0%' }
115
-        ]
116
-        this.total = this.gradeRankingList.reduce((pre, cur) => pre + cur.value, 0)
117
-      } else {
118
-        this.gradeRankingList = []
119
-        this.total = 0
120
-      }
89
+      this.gradeRankingList = result.data.map(v => ({
90
+        name: v.statisticsDateType || '',
91
+        value: v.sum || 0,
92
+        percent: v.percent || '0%'
93
+      }))
121 94
       this.draw()
122 95
       this.polling()
123 96
     },
@@ -125,11 +98,6 @@ export default {
125 98
     polling () {
126 99
       clearTimeout(this.timer)
127 100
       this.timer = setTimeout(() => {
128
-        if (this.sign === 'lastWeek') {
129
-          this.sign = 'lastMonth'
130
-        } else if (this.sign === 'lastMonth') {
131
-          this.sign = 'lastWeek'
132
-        }
133 101
         this.getData()
134 102
       }, timerCommon)
135 103
     }

+ 6 - 21
src/components/CategoryProportion.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="points-ranking__wrap">
3
-    <div class="points-ranking" ref="CategoryProportion"></div>
3
+    <div class="points-ranking" ref="CategoryTotal"></div>
4 4
   </div>
5 5
 </template>
6 6
 
@@ -8,11 +8,10 @@
8 8
 import echarts from 'echarts'
9 9
 import { post, timerCommon } from './../http/http'
10 10
 export default {
11
-  name: 'CategoryProportion',
11
+  name: 'CategoryTotal',
12 12
   inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
-      sign: 'lastWeek',
16 15
       timer: null,
17 16
       myChart: null,
18 17
       gradeRankingList: []
@@ -21,7 +20,7 @@ export default {
21 20
   methods: {
22 21
     // 画图
23 22
     draw () {
24
-      this.myChart = echarts.init(this.$refs.CategoryProportion)
23
+      this.myChart = echarts.init(this.$refs.CategoryTotal)
25 24
       const option = {
26 25
         color: ['#33CC85', '#72C0DD', '#FAC958', '#546FC6'], // 颜色数组
27 26
         tooltip: {
@@ -45,7 +44,7 @@ export default {
45 44
           {
46 45
             name: '',
47 46
             type: 'pie',
48
-            center: ['50%', '58%'],
47
+            center: ['50%', '63%'],
49 48
             radius: ['35%', '50%'],
50 49
             avoidLabelOverlap: true,
51 50
             label: {
@@ -72,17 +71,8 @@ export default {
72 71
     },
73 72
     // 获取数据
74 73
     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
-      }
74
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
75
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
86 76
       const result = await post(
87 77
         '/itsm/report/index',
88 78
         {
@@ -107,11 +97,6 @@ export default {
107 97
     polling () {
108 98
       clearTimeout(this.timer)
109 99
       this.timer = setTimeout(() => {
110
-        if (this.sign === 'lastWeek') {
111
-          this.sign = 'lastMonth'
112
-        } else if (this.sign === 'lastMonth') {
113
-          this.sign = 'lastWeek'
114
-        }
115 100
         this.getData()
116 101
       }, timerCommon)
117 102
     }

+ 9 - 26
src/components/DeptPrice.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="points-ranking__wrap">
3
-    <div class="points-ranking" ref="DeptPrice"></div>
3
+    <div class="points-ranking" ref="DeliveryTotal"></div>
4 4
   </div>
5 5
 </template>
6 6
 
@@ -8,11 +8,10 @@
8 8
 import echarts from 'echarts'
9 9
 import { post, timerCommon } from './../http/http'
10 10
 export default {
11
-  name: 'DeptPrice',
11
+  name: 'DeliveryTotal',
12 12
   inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
-      sign: 'lastWeek',
16 15
       timer: null,
17 16
       myChart: null,
18 17
       gradeRankingListNum: [],
@@ -22,7 +21,7 @@ export default {
22 21
   methods: {
23 22
     // 画图
24 23
     draw () {
25
-      this.myChart = echarts.init(this.$refs.DeptPrice)
24
+      this.myChart = echarts.init(this.$refs.DeliveryTotal)
26 25
       var colorArray = [
27 26
         {
28 27
           top: '#6B97BD', // 第一
@@ -189,17 +188,8 @@ export default {
189 188
     },
190 189
     // 获取数据
191 190
     async getData () {
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
-      }
191
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
192
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
203 193
       const result = await post(
204 194
         '/itsm/report/index',
205 195
         {
@@ -208,18 +198,16 @@ export default {
208 198
           dutyId: this.dutyId,
209 199
           startDate: startTime,
210 200
           endDate: endTime,
211
-          type: 'itsmDeptPrice'
201
+          type: 'hsmsDeptCountTop5',
202
+          businessType: 'hsms'
212 203
         }
213 204
       )
214 205
       this.gradeRankingListNum = []
215 206
       this.gradeRankingListName = []
216
-      if (result.data.length > 5) {
217
-        result.data = result.data.slice(0, 5)
218
-      }
219 207
       if (result.data.length > 0) {
220 208
         result.data.forEach(item => {
221
-          this.gradeRankingListNum.push(item.price || 0) // 获取到的数据
222
-          this.gradeRankingListName.push(item.name || '') // 获取到的名称
209
+          this.gradeRankingListNum.push(item.sum || 0) // 获取到的数据
210
+          this.gradeRankingListName.push(item.dept || '') // 获取到的名称
223 211
         })
224 212
       }
225 213
       this.draw()
@@ -229,11 +217,6 @@ export default {
229 217
     polling () {
230 218
       clearTimeout(this.timer)
231 219
       this.timer = setTimeout(() => {
232
-        if (this.sign === 'lastWeek') {
233
-          this.sign = 'lastMonth'
234
-        } else if (this.sign === 'lastMonth') {
235
-          this.sign = 'lastWeek'
236
-        }
237 220
         this.getData()
238 221
       }, timerCommon)
239 222
     }

+ 246 - 0
src/components/DeliveryUserTotal.vue

@@ -0,0 +1,246 @@
1
+<template>
2
+  <div class="points-ranking__wrap">
3
+    <div class="points-ranking" ref="DeliveryUserTotal"></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: 'DeliveryUserTotal',
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13
+  data () {
14
+    return {
15
+      timer: null,
16
+      myChart: null,
17
+      gradeRankingListNum: [],
18
+      gradeRankingListName: []
19
+    }
20
+  },
21
+  methods: {
22
+    // 画图
23
+    draw () {
24
+      this.myChart = echarts.init(this.$refs.DeliveryUserTotal)
25
+      var colorArray = [
26
+        {
27
+          top: '#6B97BD', // 第一
28
+          bottom: '#364C5F'
29
+        },
30
+        {
31
+          top: '#6B97BD', // 第二
32
+          bottom: '#364C5F'
33
+        },
34
+        {
35
+          top: '#6AB87D', // 第三
36
+          bottom: '#3D7057'
37
+        },
38
+        {
39
+          top: '#A09163', // 第四
40
+          bottom: '#504932'
41
+        },
42
+        {
43
+          top: '#6B97BD', // 第五
44
+          bottom: '#364C5F'
45
+        }
46
+      ]
47
+      const option = {
48
+        tooltip: {
49
+          show: false,
50
+          formatter: '{b}:{c}'
51
+        },
52
+        grid: {
53
+          left: 28,
54
+          top: 0,
55
+          bottom: 10,
56
+          containLabel: true
57
+        },
58
+        xAxis: {
59
+          type: 'value',
60
+          show: false,
61
+          position: 'top',
62
+          axisTick: {
63
+            show: false
64
+          },
65
+          axisLine: {
66
+            show: false,
67
+            lineStyle: {
68
+              color: '#fff'
69
+            }
70
+          },
71
+          splitLine: {
72
+            show: false
73
+          }
74
+        },
75
+        yAxis: [
76
+          {
77
+            type: 'category',
78
+            axisTick: {
79
+              show: false,
80
+              alignWithLabel: false,
81
+              length: 5
82
+            },
83
+            splitLine: {
84
+              // 网格线
85
+              show: false
86
+            },
87
+            inverse: 'true', // 排序
88
+            axisLabel: {
89
+              margin: 16,
90
+              color: 'rgba(255,255,255,0.85)'
91
+            },
92
+            axisLine: {
93
+              show: false,
94
+              lineStyle: {
95
+                color: '#fff'
96
+              }
97
+            },
98
+            data: this.gradeRankingListName
99
+          }
100
+        ],
101
+        series: [
102
+          {
103
+            name: 'xxx',
104
+            type: 'bar',
105
+            label: {
106
+              normal: {
107
+                show: true,
108
+                // position: [300, 0],
109
+                position: 'right',
110
+                formatter: '{c}',
111
+                textStyle: {
112
+                  color: '#fff'
113
+                }
114
+              }
115
+            },
116
+            itemStyle: {
117
+              normal: {
118
+                show: true,
119
+                color: function (params) {
120
+                  const num = colorArray.length
121
+                  return {
122
+                    type: 'linear',
123
+                    colorStops: [
124
+                      {
125
+                        offset: 0,
126
+                        color: colorArray[params.dataIndex % num].bottom
127
+                      },
128
+                      {
129
+                        offset: 1,
130
+                        color: colorArray[params.dataIndex % num].top
131
+                      },
132
+                      {
133
+                        offset: 0,
134
+                        color: colorArray[params.dataIndex % num].bottom
135
+                      },
136
+                      {
137
+                        offset: 1,
138
+                        color: colorArray[params.dataIndex % num].top
139
+                      },
140
+                      {
141
+                        offset: 0,
142
+                        color: colorArray[params.dataIndex % num].bottom
143
+                      },
144
+                      {
145
+                        offset: 1,
146
+                        color: colorArray[params.dataIndex % num].top
147
+                      },
148
+                      {
149
+                        offset: 0,
150
+                        color: colorArray[params.dataIndex % num].bottom
151
+                      },
152
+                      {
153
+                        offset: 1,
154
+                        color: colorArray[params.dataIndex % num].top
155
+                      },
156
+                      {
157
+                        offset: 0,
158
+                        color: colorArray[params.dataIndex % num].bottom
159
+                      },
160
+                      {
161
+                        offset: 1,
162
+                        color: colorArray[params.dataIndex % num].top
163
+                      },
164
+                      {
165
+                        offset: 0,
166
+                        color: colorArray[params.dataIndex % num].bottom
167
+                      },
168
+                      {
169
+                        offset: 1,
170
+                        color: colorArray[params.dataIndex % num].top
171
+                      }
172
+                    ]
173
+                  }
174
+                },
175
+                barBorderRadius: 70,
176
+                borderWidth: 0,
177
+                borderColor: '#333'
178
+              }
179
+            },
180
+            barGap: '0%',
181
+            barCategoryGap: '70%',
182
+            barWidth: 8,
183
+            data: this.gradeRankingListNum
184
+          }
185
+        ]
186
+      }
187
+      this.myChart.setOption(option)
188
+    },
189
+    // 获取数据
190
+    async getData () {
191
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
192
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
193
+      const result = await post(
194
+        '/itsm/report/index',
195
+        {
196
+          parentDutyId: this.parentDutyId,
197
+          hosId: this.hosId,
198
+          dutyId: this.dutyId,
199
+          startDate: startTime,
200
+          endDate: endTime,
201
+          type: 'hsmsUserScoreTop5',
202
+          businessType: 'hsms'
203
+        }
204
+      )
205
+      this.gradeRankingListNum = []
206
+      this.gradeRankingListName = []
207
+      if (result.data.length > 0) {
208
+        result.data.forEach(item => {
209
+          this.gradeRankingListNum.push(item.totalGrade || 0) // 获取到的数据
210
+          this.gradeRankingListName.push(item.userName || '') // 获取到的名称
211
+        })
212
+      }
213
+      this.draw()
214
+      this.polling()
215
+    },
216
+    // 轮询请求
217
+    polling () {
218
+      clearTimeout(this.timer)
219
+      this.timer = setTimeout(() => {
220
+        this.getData()
221
+      }, timerCommon)
222
+    }
223
+  },
224
+  mounted () {
225
+    this.getData()
226
+  },
227
+  beforeDestroy () {
228
+    clearTimeout(this.timer)
229
+  }
230
+}
231
+</script>
232
+
233
+<style lang="less" scoped>
234
+.points-ranking__wrap {
235
+  height: 3.7rem;
236
+  overflow: hidden;
237
+  position: relative;
238
+  .points-ranking {
239
+    width: 100%;
240
+    height: 100%;
241
+    position: absolute;
242
+    left: 0;
243
+    top: 0;
244
+  }
245
+}
246
+</style>

+ 5 - 23
src/components/PointsRanking.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="points-ranking__wrap">
3
-    <div class="points-ranking" ref="PointsRanking"></div>
3
+    <div class="points-ranking" ref="MaintenanceDepartmentTotal"></div>
4 4
   </div>
5 5
 </template>
6 6
 
@@ -8,11 +8,10 @@
8 8
 import echarts from 'echarts'
9 9
 import { post, timerCommon } from './../http/http'
10 10
 export default {
11
-  name: 'PointsRanking',
11
+  name: 'MaintenanceDepartmentTotal',
12 12
   inject: ['parentDutyId', 'hosId', 'dutyId'],
13 13
   data () {
14 14
     return {
15
-      sign: 'lastWeek',
16 15
       timer: null,
17 16
       myChart: null,
18 17
       gradeRankingListNum: [],
@@ -22,7 +21,7 @@ export default {
22 21
   methods: {
23 22
     // 画图
24 23
     draw () {
25
-      this.myChart = echarts.init(this.$refs.PointsRanking)
24
+      this.myChart = echarts.init(this.$refs.MaintenanceDepartmentTotal)
26 25
       var colorArray = [
27 26
         {
28 27
           top: '#6B97BD', // 第一
@@ -189,17 +188,8 @@ export default {
189 188
     },
190 189
     // 获取数据
191 190
     async getData () {
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
-      }
191
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
192
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
203 193
       const result = await post(
204 194
         '/itsm/report/index',
205 195
         {
@@ -213,9 +203,6 @@ export default {
213 203
       )
214 204
       this.gradeRankingListNum = []
215 205
       this.gradeRankingListName = []
216
-      if (result.data.length > 5) {
217
-        result.data = result.data.slice(0, 5)
218
-      }
219 206
       if (result.data.length > 0) {
220 207
         result.data.forEach(item => {
221 208
           this.gradeRankingListNum.push(item.total || 0) // 获取到的数据
@@ -229,11 +216,6 @@ export default {
229 216
     polling () {
230 217
       clearTimeout(this.timer)
231 218
       this.timer = setTimeout(() => {
232
-        if (this.sign === 'lastWeek') {
233
-          this.sign = 'lastMonth'
234
-        } else if (this.sign === 'lastMonth') {
235
-          this.sign = 'lastWeek'
236
-        }
237 219
         this.getData()
238 220
       }, timerCommon)
239 221
     }

+ 0 - 124
src/components/OnDutyToday.vue

@@ -1,124 +0,0 @@
1
-<template>
2
-  <div class="on-duty-today">
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>
20
-        </div>
21
-      </div>
22
-    </div>
23
-  </div>
24
-</template>
25
-
26
-<script>
27
-import { post, timerCommon } from './../http/http'
28
-export default {
29
-  name: 'OnDutyToday',
30
-  inject: ['parentDutyId', 'hosId', 'dutyId'],
31
-  data () {
32
-    return {
33
-      sign: 'lastWeek',
34
-      timer: null,
35
-      todayBeOnDuty: {} // 头部总当班人数
36
-    }
37
-  },
38
-  methods: {
39
-    // 获取数据
40
-    async getData () {
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
-      }
52
-      const result = await post(
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
-        }
62
-      )
63
-      this.todayBeOnDuty = result.data ? result.data[0] : {}
64
-      this.polling()
65
-    },
66
-    // 轮询请求
67
-    polling () {
68
-      clearTimeout(this.timer)
69
-      this.timer = setTimeout(() => {
70
-        if (this.sign === 'lastWeek') {
71
-          this.sign = 'lastMonth'
72
-        } else if (this.sign === 'lastMonth') {
73
-          this.sign = 'lastWeek'
74
-        }
75
-        this.getData()
76
-      }, timerCommon)
77
-    }
78
-  },
79
-  mounted () {
80
-    this.getData()
81
-  },
82
-  beforeDestroy () {
83
-    clearTimeout(this.timer)
84
-  }
85
-}
86
-</script>
87
-
88
-<style lang="less">
89
-.on-duty-today {
90
-  overflow: hidden;
91
-  height: 2.6625rem;
92
-  .on-duty-today__inner {
93
-    height: 100%;
94
-    .on-duty-today__list {
95
-      display: flex;
96
-      justify-content: space-between;
97
-      height: 100%;
98
-      .on-duty-today__item {
99
-        text-align: center;
100
-        display: flex;
101
-        flex-direction: column;
102
-        justify-content: center;
103
-        margin-right: .4rem;
104
-        &:first-child {
105
-          margin-left: .4rem;
106
-        }
107
-        &:last-child {
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
-        }
120
-      }
121
-    }
122
-  }
123
-}
124
-</style>

+ 245 - 0
src/components/PersonnelIntegral.vue

@@ -0,0 +1,245 @@
1
+<template>
2
+  <div class="points-ranking__wrap">
3
+    <div class="points-ranking" ref="PersonnelIntegral"></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: 'PersonnelIntegral',
12
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
13
+  data () {
14
+    return {
15
+      timer: null,
16
+      myChart: null,
17
+      gradeRankingListNum: [],
18
+      gradeRankingListName: []
19
+    }
20
+  },
21
+  methods: {
22
+    // 画图
23
+    draw () {
24
+      this.myChart = echarts.init(this.$refs.PersonnelIntegral)
25
+      var colorArray = [
26
+        {
27
+          top: '#6B97BD', // 第一
28
+          bottom: '#364C5F'
29
+        },
30
+        {
31
+          top: '#6B97BD', // 第二
32
+          bottom: '#364C5F'
33
+        },
34
+        {
35
+          top: '#6AB87D', // 第三
36
+          bottom: '#3D7057'
37
+        },
38
+        {
39
+          top: '#A09163', // 第四
40
+          bottom: '#504932'
41
+        },
42
+        {
43
+          top: '#6B97BD', // 第五
44
+          bottom: '#364C5F'
45
+        }
46
+      ]
47
+      const option = {
48
+        tooltip: {
49
+          show: false,
50
+          formatter: '{b}:{c}'
51
+        },
52
+        grid: {
53
+          left: 28,
54
+          top: 0,
55
+          bottom: 10,
56
+          containLabel: true
57
+        },
58
+        xAxis: {
59
+          type: 'value',
60
+          show: false,
61
+          position: 'top',
62
+          axisTick: {
63
+            show: false
64
+          },
65
+          axisLine: {
66
+            show: false,
67
+            lineStyle: {
68
+              color: '#fff'
69
+            }
70
+          },
71
+          splitLine: {
72
+            show: false
73
+          }
74
+        },
75
+        yAxis: [
76
+          {
77
+            type: 'category',
78
+            axisTick: {
79
+              show: false,
80
+              alignWithLabel: false,
81
+              length: 5
82
+            },
83
+            splitLine: {
84
+              // 网格线
85
+              show: false
86
+            },
87
+            inverse: 'true', // 排序
88
+            axisLabel: {
89
+              margin: 16,
90
+              color: 'rgba(255,255,255,0.85)'
91
+            },
92
+            axisLine: {
93
+              show: false,
94
+              lineStyle: {
95
+                color: '#fff'
96
+              }
97
+            },
98
+            data: this.gradeRankingListName
99
+          }
100
+        ],
101
+        series: [
102
+          {
103
+            name: 'xxx',
104
+            type: 'bar',
105
+            label: {
106
+              normal: {
107
+                show: true,
108
+                // position: [300, 0],
109
+                position: 'right',
110
+                formatter: '{c}',
111
+                textStyle: {
112
+                  color: '#fff'
113
+                }
114
+              }
115
+            },
116
+            itemStyle: {
117
+              normal: {
118
+                show: true,
119
+                color: function (params) {
120
+                  const num = colorArray.length
121
+                  return {
122
+                    type: 'linear',
123
+                    colorStops: [
124
+                      {
125
+                        offset: 0,
126
+                        color: colorArray[params.dataIndex % num].bottom
127
+                      },
128
+                      {
129
+                        offset: 1,
130
+                        color: colorArray[params.dataIndex % num].top
131
+                      },
132
+                      {
133
+                        offset: 0,
134
+                        color: colorArray[params.dataIndex % num].bottom
135
+                      },
136
+                      {
137
+                        offset: 1,
138
+                        color: colorArray[params.dataIndex % num].top
139
+                      },
140
+                      {
141
+                        offset: 0,
142
+                        color: colorArray[params.dataIndex % num].bottom
143
+                      },
144
+                      {
145
+                        offset: 1,
146
+                        color: colorArray[params.dataIndex % num].top
147
+                      },
148
+                      {
149
+                        offset: 0,
150
+                        color: colorArray[params.dataIndex % num].bottom
151
+                      },
152
+                      {
153
+                        offset: 1,
154
+                        color: colorArray[params.dataIndex % num].top
155
+                      },
156
+                      {
157
+                        offset: 0,
158
+                        color: colorArray[params.dataIndex % num].bottom
159
+                      },
160
+                      {
161
+                        offset: 1,
162
+                        color: colorArray[params.dataIndex % num].top
163
+                      },
164
+                      {
165
+                        offset: 0,
166
+                        color: colorArray[params.dataIndex % num].bottom
167
+                      },
168
+                      {
169
+                        offset: 1,
170
+                        color: colorArray[params.dataIndex % num].top
171
+                      }
172
+                    ]
173
+                  }
174
+                },
175
+                barBorderRadius: 70,
176
+                borderWidth: 0,
177
+                borderColor: '#333'
178
+              }
179
+            },
180
+            barGap: '0%',
181
+            barCategoryGap: '70%',
182
+            barWidth: 8,
183
+            data: this.gradeRankingListNum
184
+          }
185
+        ]
186
+      }
187
+      this.myChart.setOption(option)
188
+    },
189
+    // 获取数据
190
+    async getData () {
191
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
192
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
193
+      const result = await post(
194
+        '/itsm/report/index',
195
+        {
196
+          parentDutyId: this.parentDutyId,
197
+          hosId: this.hosId,
198
+          dutyId: this.dutyId,
199
+          startDate: startTime,
200
+          endDate: endTime,
201
+          type: 'itsmUserOrdersTop5'
202
+        }
203
+      )
204
+      this.gradeRankingListNum = []
205
+      this.gradeRankingListName = []
206
+      if (result.data.length > 0) {
207
+        result.data.forEach(item => {
208
+          this.gradeRankingListNum.push(item.count || 0) // 获取到的数据
209
+          this.gradeRankingListName.push(item.userName || '') // 获取到的名称
210
+        })
211
+      }
212
+      this.draw()
213
+      this.polling()
214
+    },
215
+    // 轮询请求
216
+    polling () {
217
+      clearTimeout(this.timer)
218
+      this.timer = setTimeout(() => {
219
+        this.getData()
220
+      }, timerCommon)
221
+    }
222
+  },
223
+  mounted () {
224
+    this.getData()
225
+  },
226
+  beforeDestroy () {
227
+    clearTimeout(this.timer)
228
+  }
229
+}
230
+</script>
231
+
232
+<style lang="less" scoped>
233
+.points-ranking__wrap {
234
+  height: 3.7rem;
235
+  overflow: hidden;
236
+  position: relative;
237
+  .points-ranking {
238
+    width: 100%;
239
+    height: 100%;
240
+    position: absolute;
241
+    left: 0;
242
+    top: 0;
243
+  }
244
+}
245
+</style>

+ 123 - 0
src/components/RealTimeDeliveryOrder.vue

@@ -0,0 +1,123 @@
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">待接单</header>
6
+        <div class="group-praise__circleContent">
7
+          <p class="group-praise__circlePercent">
8
+            {{ dataInfo.waitCount || 0 }}
9
+          </p>
10
+          <div class="lineTopRight"></div>
11
+          <div class="lineBottomLeft"></div>
12
+        </div>
13
+      </div>
14
+      <div class="group-praise__circle">
15
+        <header class="group-praise__title">处理中</header>
16
+        <div class="group-praise__circleContent">
17
+          <p class="group-praise__circlePercent">
18
+            {{ dataInfo.doingCount || 0 }}
19
+          </p>
20
+          <div class="lineTopRight"></div>
21
+          <div class="lineBottomLeft"></div>
22
+        </div>
23
+      </div>
24
+      <div class="group-praise__circle">
25
+        <header class="group-praise__title">紧急工单</header>
26
+        <div class="group-praise__circleContent">
27
+          <p class="group-praise__circlePercent">
28
+            {{ dataInfo.emergencyCount || 0 }}
29
+          </p>
30
+          <div class="lineTopRight"></div>
31
+          <div class="lineBottomLeft"></div>
32
+        </div>
33
+      </div>
34
+    </div>
35
+  </div>
36
+</template>
37
+
38
+<script>
39
+import { post, timerCommon } from './../http/http'
40
+export default {
41
+  name: 'RealTimeDeliveryOrder',
42
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
43
+  data () {
44
+    return {
45
+      timer: null,
46
+      dataInfo: {}
47
+    }
48
+  },
49
+  methods: {
50
+    // 故障工单实时动态
51
+    async getRealTimeDeliveryOrder () {
52
+      const startTime = this.$moment()
53
+        .startOf('day')
54
+        .format('YYYY-MM-DD HH:mm:ss') // 今日
55
+      const endTime = this.$moment()
56
+        .endOf('day')
57
+        .format('YYYY-MM-DD HH:mm:ss') // 今日
58
+      const result = await post(
59
+        '/itsm/report/index',
60
+        {
61
+          parentDutyId: this.parentDutyId,
62
+          hosId: this.hosId,
63
+          dutyId: this.dutyId,
64
+          startDate: startTime,
65
+          endDate: endTime,
66
+          type: 'hsmsOrderCount',
67
+          businessType: 'hsms'
68
+        }
69
+      )
70
+      this.dataInfo = result.data ? result.data[0] : {}
71
+      this.polling()
72
+    },
73
+    // 轮询请求
74
+    polling () {
75
+      clearTimeout(this.timer)
76
+      this.timer = setTimeout(() => {
77
+        this.getRealTimeDeliveryOrder()
78
+      }, timerCommon)
79
+    }
80
+  },
81
+  mounted () {
82
+    this.getRealTimeDeliveryOrder()
83
+  },
84
+  beforeDestroy () {
85
+    clearTimeout(this.timer)
86
+  }
87
+}
88
+</script>
89
+
90
+<style lang="less" scoped>
91
+.group-praise {
92
+  height: 2.6625rem;
93
+  .group-praise__content {
94
+    display: flex;
95
+    justify-content: space-between;
96
+    align-items: center;
97
+    padding: 0 .2rem;
98
+    height: 100%;
99
+    .group-praise__title {
100
+      color: #fff;
101
+      font-size: .2rem;
102
+      text-align: center;
103
+    }
104
+    .group-praise__circleContent {
105
+      color: #fff;
106
+      font-size: 0.175rem;
107
+      height: .7875rem;
108
+      display: flex;
109
+      align-items: center;
110
+      justify-content: center;
111
+      margin-top: .2rem;
112
+      background: linear-gradient( 90deg, #032430 0%, #023645 13%, #0B4D61 38%, #105A70 61%, #023645 87%, #06252B 100%);
113
+      position: relative;
114
+      .group-praise__circlePercent{
115
+        font-size: .475rem;
116
+      }
117
+    }
118
+    .group-praise__circle {
119
+      width: 1.425rem;
120
+    }
121
+  }
122
+}
123
+</style>

+ 14 - 11
src/components/GroupPraise.vue

@@ -7,6 +7,8 @@
7 7
           <p class="group-praise__circlePercent">
8 8
             {{ dataInfo.pending || 0 }}
9 9
           </p>
10
+          <div class="lineTopRight"></div>
11
+          <div class="lineBottomLeft"></div>
10 12
         </div>
11 13
       </div>
12 14
       <div class="group-praise__circle">
@@ -15,6 +17,8 @@
15 17
           <p class="group-praise__circlePercent">
16 18
             {{ dataInfo.handler || 0 }}
17 19
           </p>
20
+          <div class="lineTopRight"></div>
21
+          <div class="lineBottomLeft"></div>
18 22
         </div>
19 23
       </div>
20 24
       <div class="group-praise__circle">
@@ -23,6 +27,8 @@
23 27
           <p class="group-praise__circlePercent">
24 28
             {{ dataInfo.overtime || 0 }}
25 29
           </p>
30
+          <div class="lineTopRight"></div>
31
+          <div class="lineBottomLeft"></div>
26 32
         </div>
27 33
       </div>
28 34
     </div>
@@ -32,7 +38,7 @@
32 38
 <script>
33 39
 import { post, timerCommon } from './../http/http'
34 40
 export default {
35
-  name: 'GroupPraise',
41
+  name: 'RealTimeRepairOrder',
36 42
   inject: ['parentDutyId', 'hosId', 'dutyId'],
37 43
   data () {
38 44
     return {
@@ -41,14 +47,10 @@ export default {
41 47
     }
42 48
   },
43 49
   methods: {
44
-    // 工单实时动态
45
-    async getGroupPraise () {
46
-      const startTime = this.$moment()
47
-        .startOf('day')
48
-        .format('YYYY-MM-DD HH:mm:ss') // 今日
49
-      const endTime = this.$moment()
50
-        .endOf('day')
51
-        .format('YYYY-MM-DD HH:mm:ss') // 今日
50
+    // 故障工单实时动态
51
+    async getRealTimeRepairOrder () {
52
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
53
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
52 54
       const result = await post(
53 55
         '/itsm/report/index',
54 56
         {
@@ -67,12 +69,12 @@ export default {
67 69
     polling () {
68 70
       clearTimeout(this.timer)
69 71
       this.timer = setTimeout(() => {
70
-        this.getGroupPraise()
72
+        this.getRealTimeRepairOrder()
71 73
       }, timerCommon)
72 74
     }
73 75
   },
74 76
   mounted () {
75
-    this.getGroupPraise()
77
+    this.getRealTimeRepairOrder()
76 78
   },
77 79
   beforeDestroy () {
78 80
     clearTimeout(this.timer)
@@ -103,6 +105,7 @@ export default {
103 105
       justify-content: center;
104 106
       margin-top: .2rem;
105 107
       background: linear-gradient( 90deg, #032430 0%, #023645 13%, #0B4D61 38%, #105A70 61%, #023645 87%, #06252B 100%);
108
+      position: relative;
106 109
       .group-praise__circlePercent{
107 110
         font-size: .475rem;
108 111
       }

+ 0 - 202
src/components/TimeUtilization.vue

@@ -1,202 +0,0 @@
1
-<template>
2
-  <div class="time-utilization" ref="TimeUtilization"></div>
3
-</template>
4
-
5
-<script>
6
-import echarts from 'echarts'
7
-import { post, timerCommon } from './../http/http'
8
-export default {
9
-  name: 'TimeUtilization',
10
-  inject: ['parentDutyId', 'hosId', 'dutyId'],
11
-  data () {
12
-    return {
13
-      sign: 'lastWeek',
14
-      timer: null,
15
-      myChart: null,
16
-      groupWorkRatioName: [],
17
-      groupWorkRatioNum: []
18
-    }
19
-  },
20
-  methods: {
21
-    // 画图
22
-    draw () {
23
-      this.myChart = echarts.init(this.$refs.TimeUtilization)
24
-
25
-      const option = {
26
-        grid: {
27
-          left: '5%',
28
-          top: '10%',
29
-          bottom: '10%',
30
-          right: '5%'
31
-        },
32
-        xAxis: {
33
-          data: this.groupWorkRatioName,
34
-          axisTick: {
35
-            show: false
36
-          },
37
-          axisLine: {
38
-            lineStyle: {
39
-              color: '#709cc2'
40
-            }
41
-          },
42
-          axisLabel: {
43
-            formatter: function (params) {
44
-              params = params.slice(0, 9)
45
-              const len = params.length
46
-              let str = ''
47
-              for (let i = 0; i < len; i++) {
48
-                str += params[i]
49
-                if (i % 4 === 0 && i !== 0) {
50
-                  str += '\n'
51
-                }
52
-              }
53
-              return str
54
-            },
55
-            textStyle: {
56
-              color: '#d4d6d7',
57
-              fontSize: 12
58
-            }
59
-          }
60
-        },
61
-        yAxis: [
62
-          {
63
-            minInterval: 1,
64
-            axisTick: {
65
-              show: false
66
-            },
67
-            axisLine: {
68
-              lineStyle: {
69
-                color: '#709cc2'
70
-              }
71
-            },
72
-            axisLabel: {
73
-              textStyle: {
74
-                color: '#d4d6d7',
75
-                fontSize: 12
76
-              }
77
-            },
78
-            splitArea: {
79
-              areaStyle: {
80
-                color: 'rgba(255,255,255,.5)'
81
-              }
82
-            },
83
-            splitLine: {
84
-              show: true,
85
-              lineStyle: {
86
-                color: 'rgba(255, 255, 255, 0.1)',
87
-                type: 'dashed'
88
-              }
89
-            }
90
-          }
91
-        ],
92
-        series: [
93
-          {
94
-            name: 'hill',
95
-            type: 'bar',
96
-            barCategoryGap: '0%',
97
-            barWidth: 24,
98
-            symbol:
99
-              'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
100
-            label: {
101
-              show: true,
102
-              position: 'top',
103
-              distance: 0,
104
-              color: '#70c2ab',
105
-              fontWeight: 'bold',
106
-              fontSize: 12
107
-            },
108
-            itemStyle: {
109
-              normal: {
110
-                color: {
111
-                  type: 'linear',
112
-                  x: 0,
113
-                  y: 0,
114
-                  x2: 0,
115
-                  y2: 1,
116
-                  colorStops: [
117
-                    {
118
-                      offset: 0,
119
-                      color: '#00D5EA' //  0%  处的颜色
120
-                    },
121
-                    {
122
-                      offset: 1,
123
-                      color: '#00D5EA' //  100%  处的颜色
124
-                    }
125
-                  ],
126
-                  global: false //  缺省为  false
127
-                }
128
-              },
129
-              emphasis: {
130
-                opacity: 1
131
-              }
132
-            },
133
-            data: this.groupWorkRatioNum,
134
-            z: 10
135
-          }
136
-        ]
137
-      }
138
-      this.myChart.setOption(option)
139
-    },
140
-    // 获取数据
141
-    async getData () {
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
-      }
153
-      const result = await post(
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
-        }
163
-      )
164
-      this.groupWorkRatioNum = []
165
-      this.groupWorkRatioName = []
166
-      result.data = result.data || []
167
-      result.data.forEach(item => {
168
-        this.groupWorkRatioNum.push(item.total || 0) // 获取到的数据
169
-        this.groupWorkRatioName.push(item.name || '') // 获取到的名称
170
-      })
171
-      console.log(this.groupWorkRatioName)
172
-      this.draw()
173
-      this.polling()
174
-    },
175
-    // 轮询请求
176
-    polling () {
177
-      clearTimeout(this.timer)
178
-      this.timer = setTimeout(() => {
179
-        if (this.sign === 'lastWeek') {
180
-          this.sign = 'lastMonth'
181
-        } else if (this.sign === 'lastMonth') {
182
-          this.sign = 'lastWeek'
183
-        }
184
-        this.getData()
185
-      }, timerCommon)
186
-    }
187
-  },
188
-  mounted () {
189
-    this.getData()
190
-  },
191
-  beforeDestroy () {
192
-    clearTimeout(this.timer)
193
-  }
194
-}
195
-</script>
196
-
197
-<style lang="less">
198
-.time-utilization {
199
-  height: 3.7rem;
200
-  margin: 0 auto;
201
-}
202
-</style>

+ 292 - 0
src/components/TotalStatistics.vue

@@ -0,0 +1,292 @@
1
+<template>
2
+  <div class="on-duty-today">
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>
20
+        </div>
21
+      </div> -->
22
+      <div class="on-duty-today__header">
23
+        <div class="repair">
24
+          <div class="lineTopLeft"></div>
25
+          <div class="lineTopRight"></div>
26
+          <div class="lineBottomLeft"></div>
27
+          <div class="lineBottomRight"></div>
28
+
29
+          <div class="repair__name yellow">维修</div>
30
+          <div class="repair__content">
31
+            <div class="repair__total">
32
+              <div class="repair__totalName">总单数</div>
33
+              <div class="repair__totalNum">{{ itsmData.totalCount | quantitativeConversion }}</div>
34
+            </div>
35
+            <div class="repair__total">
36
+              <div class="repair__totalName">总费用(元)</div>
37
+              <div class="repair__totalNum">{{ itsmData.totalPrice | quantitativeConversion }}</div>
38
+            </div>
39
+          </div>
40
+        </div>
41
+        <div class="total">
42
+          <div class="total__list">
43
+            <div class="total__icon">
44
+              <i class="icon_transport transport-feiyongbaohan"></i>
45
+            </div>
46
+            <div class="total__content">
47
+              <div class="total__contentName">总费用(元)<span class="total__contentDate">上月</span></div>
48
+              <div class="total__contentNum">{{ totalData.totalPrice | quantitativeConversion }}</div>
49
+            </div>
50
+          </div>
51
+          <div class="total__list">
52
+            <div class="total__icon">
53
+              <i class="icon_transport transport-gongdanxinxi"></i>
54
+            </div>
55
+            <div class="total__content">
56
+              <div class="total__contentName">总工单<span class="total__contentDate">上月</span></div>
57
+              <div class="total__contentNum">{{ totalData.totalCount | quantitativeConversion }}</div>
58
+            </div>
59
+          </div>
60
+        </div>
61
+        <div class="delivery">
62
+          <div class="lineTopLeft"></div>
63
+          <div class="lineTopRight"></div>
64
+          <div class="lineBottomLeft"></div>
65
+          <div class="lineBottomRight"></div>
66
+
67
+          <div class="delivery__content">
68
+            <div class="delivery__total">
69
+              <div class="delivery__totalName">总单数</div>
70
+              <div class="delivery__totalNum">{{ hsmsData.totalCount | quantitativeConversion }}</div>
71
+            </div>
72
+            <div class="delivery__total">
73
+              <div class="delivery__totalName">总费用(元)</div>
74
+              <div class="delivery__totalNum">{{ hsmsData.totalPrice | quantitativeConversion }}</div>
75
+            </div>
76
+          </div>
77
+          <div class="delivery__name yellow">配送</div>
78
+        </div>
79
+      </div>
80
+      <div class="on-duty-today__footer">
81
+        <div class="on-duty-today__footerTag" v-if="businessData.incidentCount">维修:<span class="yellow">{{ businessData.incidentCount | quantitativeConversion }}</span></div>
82
+        <div class="on-duty-today__footerTag" v-if="businessData.specimenCount">标本:<span class="yellow">{{ businessData.specimenCount | quantitativeConversion }}</span></div>
83
+        <div class="on-duty-today__footerTag" v-if="businessData.inspectCount">患者陪检:<span class="yellow">{{ businessData.inspectCount | quantitativeConversion }}</span></div>
84
+        <div class="on-duty-today__footerTag" v-if="businessData.drugsJpCount">静配:<span class="yellow">{{ businessData.drugsJpCount | quantitativeConversion }}</span></div>
85
+        <div class="on-duty-today__footerTag" v-if="businessData.drugsCount">药品:<span class="yellow">{{ businessData.drugsCount | quantitativeConversion }}</span></div>
86
+        <div class="on-duty-today__footerTag" v-if="businessData.drugsHerbalCount">中草药:<span class="yellow">{{ businessData.drugsHerbalCount | quantitativeConversion }}</span></div>
87
+        <div class="on-duty-today__footerTag" v-if="businessData.bloodCount">血制品:<span class="yellow">{{ businessData.bloodCount | quantitativeConversion }}</span></div>
88
+        <div class="on-duty-today__footerTag" v-if="businessData.surgeryCount">手术:<span class="yellow">{{ businessData.surgeryCount | quantitativeConversion }}</span></div>
89
+      </div>
90
+    </div>
91
+  </div>
92
+</template>
93
+
94
+<script>
95
+import { post, timerCommon } from './../http/http'
96
+export default {
97
+  name: 'TotalStatistics',
98
+  inject: ['parentDutyId', 'hosId', 'dutyId'],
99
+  data () {
100
+    return {
101
+      timer: null,
102
+      itsmData: {},
103
+      hsmsData: {},
104
+      totalData: {},
105
+      businessData: {}
106
+    }
107
+  },
108
+  methods: {
109
+    // 获取数据
110
+    async getData () {
111
+      const startTime = this.$moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss')
112
+      const endTime = this.$moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss')
113
+      const result = await post(
114
+        '/itsm/report/index',
115
+        {
116
+          parentDutyId: this.parentDutyId,
117
+          hosId: this.hosId,
118
+          dutyId: this.dutyId,
119
+          startDate: startTime,
120
+          endDate: endTime,
121
+          type: 'itsmHsmsCountPrice'
122
+        }
123
+      )
124
+      this.itsmData = result.data ? result.data.itsmData[0] : {}
125
+      this.hsmsData = result.data ? result.data.hsmsData[0] : {}
126
+      this.totalData = result.data ? result.data.totalData : {}
127
+      this.businessData = result.data ? result.data.businessData[0] : {}
128
+      this.polling()
129
+    },
130
+    // 轮询请求
131
+    polling () {
132
+      clearTimeout(this.timer)
133
+      this.timer = setTimeout(() => {
134
+        this.getData()
135
+      }, timerCommon)
136
+    }
137
+  },
138
+  mounted () {
139
+    this.getData()
140
+  },
141
+  beforeDestroy () {
142
+    clearTimeout(this.timer)
143
+  }
144
+}
145
+</script>
146
+
147
+<style lang="less" scoped>
148
+.yellow{
149
+  color: #FFD653;
150
+}
151
+.on-duty-today {
152
+  overflow: hidden;
153
+  height: 3.2125rem;
154
+  padding: .2rem;
155
+  .on-duty-today__inner {
156
+    height: 100%;
157
+    display: flex;
158
+    flex-direction: column;
159
+    .on-duty-today__header {
160
+      display: flex;
161
+      align-items: center;
162
+      flex: 1;
163
+      .repair{
164
+        width: 2.9rem;
165
+        color: #fff;
166
+        height: 100%;
167
+        background: linear-gradient( 90deg, #032430 0%, #023645 13%, #0B4D61 38%, #105A70 61%, #023645 87%, #06252B 100%);
168
+        position: relative;
169
+        display: flex;
170
+        align-items: center;
171
+        padding: 0 .2rem;
172
+        .repair__name{
173
+          font-size: .275rem;
174
+          display: flex;
175
+          align-items: center;
176
+          margin-right: .2rem;
177
+        }
178
+        .repair__content{
179
+          .repair__total{
180
+            margin-top: .3rem;
181
+            &:first-of-type{
182
+              margin-top: 0;
183
+            }
184
+            .repair__totalName{
185
+              font-size: .2rem;
186
+            }
187
+            .repair__totalNum{
188
+              font-size: .375rem;
189
+              color: #00D5EA;
190
+              font-weight: bold;
191
+              margin-top: .1rem;
192
+            }
193
+          }
194
+        }
195
+      }
196
+      .total{
197
+        flex: 1;
198
+        padding: 0 .2rem;
199
+        display: flex;
200
+        align-items: center;
201
+        justify-content: space-between;
202
+        .total__list{
203
+          display: flex;
204
+          align-items: center;
205
+          .total__icon{
206
+            width: .7rem;
207
+            height: .7rem;
208
+            border: 1px solid #00D5EA;
209
+            border-radius: 50%;
210
+            display: flex;
211
+            align-items: center;
212
+            justify-content: center;
213
+            margin-right: .2rem;
214
+            .transport-feiyongbaohan{
215
+              color: #00D5EA;
216
+              font-size: .55rem;
217
+            }
218
+            .transport-gongdanxinxi{
219
+              color: #00D5EA;
220
+              font-size: .4rem;
221
+              margin-left: -0.02rem;
222
+              margin-top: 0.04rem;
223
+            }
224
+          }
225
+          .total__content{
226
+            .total__contentName{
227
+              font-size: .275rem;
228
+              .total__contentDate{
229
+                font-size: .175rem;
230
+                color: rgba(255,255,255,0.6);
231
+                margin-left: .0625rem;
232
+              }
233
+            }
234
+            .total__contentNum{
235
+              font-size: .4375rem;
236
+              font-weight: bold;
237
+              color: #00D5EA;
238
+            }
239
+          }
240
+        }
241
+      }
242
+      .delivery{
243
+        width: 2.9rem;
244
+        color: #fff;
245
+        height: 100%;
246
+        background: linear-gradient( 90deg, #032430 0%, #023645 13%, #0B4D61 38%, #105A70 61%, #023645 87%, #06252B 100%);
247
+        position: relative;
248
+        display: flex;
249
+        align-items: center;
250
+        padding: 0 .2rem;
251
+
252
+        .delivery__name{
253
+          font-size: .275rem;
254
+          display: flex;
255
+          align-items: center;
256
+          margin-left: .2rem;
257
+        }
258
+        .delivery__content{
259
+          .delivery__total{
260
+            margin-top: .3rem;
261
+            &:first-of-type{
262
+              margin-top: 0;
263
+            }
264
+            .delivery__totalName{
265
+              font-size: .2rem;
266
+            }
267
+            .delivery__totalNum{
268
+              font-size: .375rem;
269
+              color: #00D5EA;
270
+              font-weight: bold;
271
+              margin-top: .1rem;
272
+            }
273
+          }
274
+        }
275
+      }
276
+    }
277
+    .on-duty-today__footer {
278
+      display: flex;
279
+      justify-content: space-between;
280
+      align-items: center;
281
+      font-size: .2rem;
282
+      margin-top: .2rem;
283
+      .on-duty-today__footerTag{
284
+        margin-right: .17rem;
285
+        &:last-of-type{
286
+          margin-right: 0;
287
+        }
288
+      }
289
+    }
290
+  }
291
+}
292
+</style>

+ 19 - 16
src/components/TodayWorkOrder.vue

@@ -1,16 +1,16 @@
1 1
 <template>
2
-  <div class="today-work-order" ref="TodayWorkOrder"></div>
2
+  <div class="today-work-order" ref="TrendChart"></div>
3 3
 </template>
4 4
 
5 5
 <script>
6 6
 import echarts from 'echarts'
7 7
 import { post, timerCommon } from './../http/http'
8 8
 export default {
9
-  name: 'TodayWorkOrder',
9
+  name: 'TrendChart',
10 10
   inject: ['parentDutyId', 'hosId', 'dutyId'],
11 11
   data () {
12 12
     return {
13
-      sign: 'price',
13
+      sign: 'repair',
14 14
       timer: null,
15 15
       myChart: null,
16 16
       todayGroupWorkOrderNum1: [], // 当日工单趋势图,图表数据
@@ -20,7 +20,7 @@ export default {
20 20
   methods: {
21 21
     // 画图
22 22
     draw () {
23
-      this.myChart = echarts.init(this.$refs.TodayWorkOrder)
23
+      this.myChart = echarts.init(this.$refs.TrendChart)
24 24
 
25 25
       const option = {
26 26
         color: ['rgba(64, 93, 249, 1)'],
@@ -116,21 +116,24 @@ export default {
116 116
           dutyId: this.dutyId,
117 117
           startDate: startTime,
118 118
           endDate: endTime,
119
-          type: 'itsmReqCount'
119
+          type: 'itsmHsmsTrend'
120 120
         }
121 121
       )
122 122
       this.todayGroupWorkOrderNum1 = []
123 123
       this.todayGroupWorkOrderTimes = []
124 124
       result.data = result.data || []
125
-      result.data.forEach(item => {
126
-        this.todayGroupWorkOrderTimes.push(item.date || '') // 获取到的数据,时间点
127 125
 
128
-        if (this.sign === 'price') {
129
-          this.todayGroupWorkOrderNum1.push(item.price || 0) // 获取到的数据
130
-        } else if (this.sign === 'order') {
126
+      if (this.sign === 'repair') {
127
+        result.data.itsmTrend.forEach(item => {
128
+          this.todayGroupWorkOrderTimes.push(item.date || '') // 获取到的数据,时间点
131 129
           this.todayGroupWorkOrderNum1.push(item.total || 0) // 获取到的数据
132
-        }
133
-      })
130
+        })
131
+      } else if (this.sign === 'delivery') {
132
+        result.data.hsmsTrend.forEach(item => {
133
+          this.todayGroupWorkOrderTimes.push(item.date || '') // 获取到的数据,时间点
134
+          this.todayGroupWorkOrderNum1.push(item.total || 0) // 获取到的数据
135
+        })
136
+      }
134 137
       this.draw()
135 138
       this.polling()
136 139
     },
@@ -138,10 +141,10 @@ export default {
138 141
     polling () {
139 142
       clearTimeout(this.timer)
140 143
       this.timer = setTimeout(() => {
141
-        if (this.sign === 'price') {
142
-          this.sign = 'order'
143
-        } else if (this.sign === 'order') {
144
-          this.sign = 'price'
144
+        if (this.sign === 'repair') {
145
+          this.sign = 'delivery'
146
+        } else if (this.sign === 'delivery') {
147
+          this.sign = 'repair'
145 148
         }
146 149
         this.getData()
147 150
       }, timerCommon)

+ 0 - 143
src/components/UserPrice.vue

@@ -1,143 +0,0 @@
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>

+ 6 - 9
src/main.js

@@ -16,16 +16,13 @@ import './assets/less/style.less'
16 16
 Vue.use(fullScreenContainer)
17 17
 Vue.prototype.$moment = moment
18 18
 
19
-// 分钟转为时分
20
-Vue.filter('formatHourMinute', (value) => {
21
-  if (!value) return '0分'
22
-  const duration = moment.duration(value, 'minutes')
23
-  const hours = Math.floor(duration.asHours())
24
-  const minutes = duration.minutes()
25
-  if (hours) {
26
-    return `${hours}时${minutes}分`
19
+// 超过10万,转换成单位万,保留两位小数()
20
+Vue.filter('quantitativeConversion', (value) => {
21
+  if (!value) return 0
22
+  if (value >= 100000) {
23
+    return Math.floor(value / 10000 * 100) / 100 + '万'
27 24
   } else {
28
-    return `${minutes}分`
25
+    return value
29 26
   }
30 27
 })
31 28
 

+ 75 - 91
src/views/AppIndex.vue

@@ -7,102 +7,78 @@
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 app-item__header--big">工单实时动态</h2>
13
-              <GroupPraise class="app-item__body"></GroupPraise>
12
+              <h2 class="app-item__header app-item__header--big">故障工单实时动态</h2>
13
+              <RealTimeRepairOrder class="app-item__body"></RealTimeRepairOrder>
14 14
             </div>
15
-            <!-- 科室维修量TOP5 -->
15
+            <!-- 上月维修科室排名TOP5 -->
16 16
             <div class="app-item">
17 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>
18
+                上月维修科室排名TOP5
23 19
               </h2>
24
-              <PointsRanking class="app-item__body" @signEmit="pointsRankingSign = $event"></PointsRanking>
20
+              <MaintenanceDepartmentTotal class="app-item__body"></MaintenanceDepartmentTotal>
25 21
             </div>
26
-            <!-- 科室费用TOP5 -->
22
+            <!-- 上月维修人员积分TOP5 -->
27 23
             <div class="app-item">
28 24
               <h2 class="app-item__header app-item__header--big">
29
-                科室费用TOP5
30
-                <ul class="app-item__headerData">
31
-                  <li class="app-item__headerDataItem" :class="{ active: deptPriceSign == 'lastWeek' }">上周</li>
32
-                  <li class="app-item__headerDataItem" :class="{ active: deptPriceSign == 'lastMonth' }">上月</li>
33
-                </ul>
25
+                上月维修人员积分TOP5
34 26
               </h2>
35
-              <DeptPrice class="app-item__body" @signEmit="deptPriceSign = $event"></DeptPrice>
27
+              <PersonnelIntegral class="app-item__body"></PersonnelIntegral>
36 28
             </div>
37 29
           </aside>
38 30
           <article class="app-index__center">
39
-            <!-- 上周/上月汇总数据 -->
31
+            <!-- 汇总数据 -->
40 32
             <div class="app-item">
41
-              <h2 class="app-item__header app-item__header--big">
42
-                {{ onDutyTodaySign == 'lastWeek' ? '上周' : '上月' }}汇总数据
43
-                <ul class="app-item__headerData">
44
-                  <li class="app-item__headerDataItem" :class="{ active: onDutyTodaySign == 'lastWeek' }">上周</li>
45
-                  <li class="app-item__headerDataItem" :class="{ active: onDutyTodaySign == 'lastMonth' }">上月</li>
46
-                </ul>
47
-              </h2>
48
-              <OnDutyToday class="app-item__body" @signEmit="onDutyTodaySign = $event"></OnDutyToday>
33
+              <TotalStatistics class="app-item__body"></TotalStatistics>
49 34
             </div>
50
-            <!-- 报修数量趋势图 -->
35
+            <!-- 上月趋势图 -->
51 36
             <div class="app-item">
52 37
               <h2 class="app-item__header app-item__header--big">
53
-                报修数量趋势图
38
+                上月趋势图
54 39
                 <ul class="app-item__headerData">
55
-                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'price' }">费用</li>
56
-                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'order' }">工单</li>
40
+                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'repair' }">维修</li>
41
+                  <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'delivery' }">配送</li>
57 42
                 </ul>
58 43
               </h2>
59
-              <TodayWorkOrder class="app-item__body" @signEmit="todayWorkOrderSign = $event"></TodayWorkOrder>
44
+              <TrendChart class="app-item__body" @signEmit="todayWorkOrderSign = $event"></TrendChart>
60 45
             </div>
61
-            <!-- 楼栋故障分布 -->
62
-            <div class="app-item">
63
-              <h2 class="app-item__header app-item__header--big">
64
-                楼栋故障分布
65
-                <ul class="app-item__headerData">
66
-                  <li class="app-item__headerDataItem" :class="{ active: timeUtilizationSign == 'lastWeek' }">上周</li>
67
-                  <li class="app-item__headerDataItem" :class="{ active: timeUtilizationSign == 'lastMonth' }">上月</li>
68
-                </ul>
69
-              </h2>
70
-              <TimeUtilization class="app-item__body" @signEmit="timeUtilizationSign = $event"></TimeUtilization>
46
+            <div class="app-item-wrap">
47
+              <!-- 上月故障现象占比 -->
48
+              <div class="app-item">
49
+                <h2 class="app-item__header app-item__header--big">
50
+                  上月故障现象占比
51
+                </h2>
52
+                <CategoryTotal class="app-item__body"></CategoryTotal>
53
+              </div>
54
+              <!-- 上月业务分类工单占比 -->
55
+              <div class="app-item">
56
+                <h2 class="app-item__header app-item__header--big">
57
+                  上月业务分类工单占比
58
+                </h2>
59
+                <BusinessTotal class="app-item__body"></BusinessTotal>
60
+              </div>
71 61
             </div>
72 62
           </article>
73 63
           <aside class="app-index__right">
74
-            <!-- 维修人员费用Top3 -->
64
+            <!-- 故障工单实时动态 -->
75 65
             <div class="app-item">
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>
66
+              <h2 class="app-item__header app-item__header--big">配送陪检工单实时动态</h2>
67
+              <RealTimeDeliveryOrder class="app-item__body"></RealTimeDeliveryOrder>
84 68
             </div>
85
-            <!-- 故障现象占比 -->
69
+            <!-- 上月配送陪检科室排名TOP5 -->
86 70
             <div class="app-item">
87 71
               <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>
72
+                上月配送陪检科室排名TOP5
93 73
               </h2>
94
-              <CategoryProportion class="app-item__body" @signEmit="categoryProportionSign = $event"></CategoryProportion>
74
+              <DeliveryTotal class="app-item__body"></DeliveryTotal>
95 75
             </div>
96
-            <!-- 费用占比 -->
76
+            <!-- 上月配送陪检人员积分 -->
97 77
             <div class="app-item">
98 78
               <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>
79
+                上月配送陪检人员积分
104 80
               </h2>
105
-              <PriceProportion class="app-item__body" @signEmit="priceProportionSign = $event"></PriceProportion>
81
+              <DeliveryUserTotal class="app-item__body"></DeliveryUserTotal>
106 82
             </div>
107 83
           </aside>
108 84
         </main>
@@ -113,40 +89,34 @@
113 89
 
114 90
 <script>
115 91
 import AppHeader from '../components/AppHeader.vue'
116
-import GroupPraise from '../components/GroupPraise.vue'
117
-import OnDutyToday from '../components/OnDutyToday.vue'
118
-import TodayWorkOrder from '../components/TodayWorkOrder.vue'
119
-import PointsRanking from '../components/PointsRanking.vue'
120
-import DeptPrice from '../components/DeptPrice.vue'
121
-import TimeUtilization from '../components/TimeUtilization.vue'
122
-import UserPrice from '../components/UserPrice.vue'
123
-import CategoryProportion from '../components/CategoryProportion.vue'
124
-import PriceProportion from '../components/PriceProportion.vue'
92
+import RealTimeRepairOrder from '../components/RealTimeRepairOrder.vue'
93
+import RealTimeDeliveryOrder from '../components/RealTimeDeliveryOrder.vue'
94
+import TotalStatistics from '../components/TotalStatistics.vue'
95
+import TrendChart from '../components/TrendChart.vue'
96
+import MaintenanceDepartmentTotal from '../components/MaintenanceDepartmentTotal.vue'
97
+import DeliveryTotal from '../components/DeliveryTotal.vue'
98
+import DeliveryUserTotal from '../components/DeliveryUserTotal.vue'
99
+import PersonnelIntegral from '../components/PersonnelIntegral.vue'
100
+import CategoryTotal from '../components/CategoryTotal.vue'
101
+import BusinessTotal from '../components/BusinessTotal.vue'
125 102
 export default {
126 103
   name: 'AppIndex',
127 104
   components: {
128 105
     AppHeader, // 头部
129
-    GroupPraise, // 工单实时动态
130
-    OnDutyToday, // 上周汇总数据
131
-    TodayWorkOrder, // 报修数量趋势图
132
-    PointsRanking, // 科室维修量TOP5
133
-    DeptPrice, // 科室费用TOP5
134
-    TimeUtilization, // 楼栋故障分布
135
-    UserPrice, // 维修人员费用TOP5
136
-    CategoryProportion, // 故障现象占比
137
-    PriceProportion // 费用占比
106
+    RealTimeRepairOrder, // 故障工单实时动态
107
+    RealTimeDeliveryOrder, // 配送陪检工单实时动态
108
+    TotalStatistics, // 汇总数据
109
+    TrendChart, // 上月趋势图
110
+    MaintenanceDepartmentTotal, // 上月维修科室排名TOP5
111
+    DeliveryTotal, // 上月配送陪检科室排名TOP5
112
+    DeliveryUserTotal, // 运送人员排名TOP5
113
+    PersonnelIntegral, // 上月维修人员积分TOP5
114
+    CategoryTotal, // 上月故障现象占比
115
+    BusinessTotal // 上月业务分类工单占比
138 116
   },
139 117
   data () {
140 118
     return {
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
-
119
+      todayWorkOrderSign: 'repair'
150 120
     }
151 121
   },
152 122
   methods: {
@@ -193,6 +163,20 @@ export default {
193 163
   .bg {
194 164
     padding: 0.2rem;
195 165
   }
166
+  .app-item-wrap{
167
+    position: relative;
168
+    overflow: hidden;
169
+    display: flex;
170
+    margin-top: .1rem;
171
+    .app-item{
172
+      margin-right: 0.1rem;
173
+      margin-top: 0;
174
+      flex: 1;
175
+      &:last-of-type{
176
+        margin-right: 0;
177
+      }
178
+    }
179
+  }
196 180
   // 各模块公共头部
197 181
   .app-item {
198 182
     position: relative;