Browse Source

Merge branch 'master' of http://git.ycjcjy.com/nanyang/machinery-admin

李志伟 3 years ago
parent
commit
d3fe99b304

BIN
src/assets/images/screen/ring-aqua.png View File


BIN
src/assets/images/screen/ring-red.png View File


BIN
src/assets/images/screen/ring-yellow.png View File


+ 3
- 0
src/components/AMap/loader.js View File

@@ -4,6 +4,9 @@ const WEB_KEY = '7c02d93b855ab284c12911c231aa2233';
4 4
 const SERVER_KEY = 'a30b66a26ea1890fd656cf11cb2647fb';
5 5
 
6 6
 export default (plugins, uiPlugins) => {
7
+  window._AMapSecurityConfig = {
8
+    securityJsCode: 'bd6c192ebd3e0903f6ebe54b76d5e298',
9
+  };
7 10
   return AMapLoader.load({
8 11
     key: WEB_KEY, // 申请好的Web端开发者Key,首次调用 load 时必填
9 12
     version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15

+ 2
- 2
src/components/GeoMap/index.jsx View File

@@ -15,8 +15,8 @@ export default (props) => {
15 15
     loader(plugins).then((AMap) => {
16 16
       amapRef.current = AMap;
17 17
       const mapInst = new AMap.Map(container.current, {
18
-        // mapStyle: 'amap://styles/669a7d8709a9bab0945747a1a1db3327',
19
-        mapStyle: 'amap://styles/blue',
18
+        mapStyle: 'amap://styles/669a7d8709a9bab0945747a1a1db3327',
19
+        // mapStyle: 'amap://styles/blue',
20 20
         zoom: 10,
21 21
         resizeEnable: true,
22 22
         center: [112.092716, 32.681642],

+ 1
- 0
src/components/ScreenBox/SquareBox/style.less View File

@@ -4,6 +4,7 @@
4 4
 .SquareBox-body {
5 5
   padding: 20px;
6 6
   color: #fff;
7
+  background: rgba(8, 40, 90, 0.4);
7 8
   border: 2px solid rgba(61, 129, 240, 0.5);
8 9
 }
9 10
 .border_corner {

+ 2
- 6
src/pages/MonitoringScreen/DateCommponetsBottomLeft.jsx View File

@@ -42,12 +42,8 @@ export default (props) => {
42 42
       'l(270) 0:rgba(225,225,225,0.0) 1:#44F68B',
43 43
       'l(270) 0:rgba(225,225,225,0.0) 1:#51D4FF',
44 44
       'l(270) 0:rgba(225,225,225,0.0) 1:#B8B2A9',
45
-      'l(270) 0:rgba(225,225,225,0.0) 1:#F55226'],
46
-    minColumnWidth: 26,
47
-    columnStyle: {
48
-      // fill: 'l(270) 0:rgba(225,225,225,0.0) 1:#FB9900',
49
-    },
50
-
45
+      'l(270) 0:rgba(225,225,225,0.0) 1:#F55226',
46
+    ],
51 47
 
52 48
     /** 设置间距 */
53 49
     // marginRatio: 0.1,

+ 15
- 5
src/pages/MonitoringScreen/DateCommponetsBottomRight.jsx View File

@@ -2,6 +2,7 @@ import SquareBox from '@/components/ScreenBox/SquareBox';
2 2
 import TitleBox from '@/components/ScreenBox/TitleBox';
3 3
 import { Pie, G2 } from '@ant-design/plots';
4 4
 // import ba from './a.png'
5
+import RedRing from '@/assets/images/screen/ring-red.png';
5 6
 
6 7
 export default (props) => {
7 8
   const data = [
@@ -22,11 +23,21 @@ export default (props) => {
22 23
       value: 70,
23 24
     },
24 25
   ];
26
+
25 27
   const config = {
26
-    color: ['#FB9900', '#355C9C', '#23E8AE', '#E63404'],
27
-    pieStyle: {
28
-      strokeOpacity: 0,
29
-      lineWidth: 0,
28
+    // color: [
29
+    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 0.25:#FB9900 0.5:rgba(225,225,225,0.0)  0.75:1:#FB9900 1:#FB9900',
30
+    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 1:#23E8AE',
31
+    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 1:#E63404',
32
+    // ],
33
+    // pieStyle: {
34
+    //   strokeOpacity: 0,
35
+    //   lineWidth: 0,
36
+    // },
37
+    pieStyle: () => {
38
+      return {
39
+        fill: `p(n)${RedRing}`,
40
+      };
30 41
     },
31 42
     statistic: {
32 43
       title: false,
@@ -55,7 +66,6 @@ export default (props) => {
55 66
     interactions: [
56 67
       {
57 68
         type: 'element-selected',
58
-
59 69
       },
60 70
       {
61 71
         type: 'element-active',

+ 23
- 3
src/pages/MonitoringScreen/DateCommponetsLeft.jsx View File

@@ -6,7 +6,7 @@ export default (props) => {
6 6
   const data = [
7 7
     {
8 8
       key: '收割机',
9
-      value: 200,
9
+      value: 300,
10 10
     },
11 11
     {
12 12
       key: '播种机',
@@ -19,15 +19,35 @@ export default (props) => {
19 19
   ];
20 20
 
21 21
   const config = {
22
-    maxBarWidth: 20,
23 22
     data,
23
+    axis: {
24
+      tickLine: null,
25
+      subTickLine: null,
26
+      grid: null,
27
+      line: null,
28
+    },
24 29
     xField: 'value',
25 30
     yField: 'key',
26 31
     seriesField: 'key',
27
-    color: ['l(0) 0:rgba(225,225,225,0.0) 1:#FB9900', 'l(0) 0:rgba(225,225,225,0.0) 1:#23E8AE', 'l(0) 0:rgba(225,225,225,0.0) 1:#E63404'],
32
+    color: [
33
+      'l(0) 0:rgba(225,225,225,0.0) 1:#FB9900',
34
+      'l(0) 0:rgba(225,225,225,0.0) 1:#23E8AE',
35
+      'l(0) 0:rgba(225,225,225,0.0) 1:#E63404',
36
+    ],
28 37
     legend: {
29 38
       position: 'top-left',
30 39
     },
40
+    barBackground: {
41
+      style: {
42
+        fill: 'rgba(0,0,0,0.1)',
43
+      },
44
+    },
45
+    interactions: [
46
+      {
47
+        type: 'active-region',
48
+        enable: false,
49
+      },
50
+    ],
31 51
     statistic: {
32 52
       style: {
33 53
         fontSize: 10,