Ver código fonte

feat: 图标

@dayan_hjm 2 anos atrás
pai
commit
b840052c3a

+ 79 - 5
src/assets/css/styleTemplate.less

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm 茶百道主题样式
3 3
  * @Date: 2022-10-27 10:56:37 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-10-20 17:47:55
5
+ * @Last Modified time: 2023-10-23 11:19:55
6 6
  */
7 7
 
8 8
 @import url("../../themes/themes.less");
@@ -323,7 +323,7 @@
323 323
 
324 324
         .topMsg {
325 325
           width: 100%;
326
-          height: 20%;
326
+          height: 22%;
327 327
           box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.04);
328 328
           /* border-radius: 26px; */
329 329
           /* padding: 16px; */
@@ -370,6 +370,24 @@
370 370
         }
371 371
 
372 372
         .center_box {
373
+          .topMsg_content {
374
+            width: 100%;
375
+            height: 100%;
376
+
377
+            .eacharView {
378
+              display: flex;
379
+              align-items: center;
380
+              justify-content: space-between;
381
+
382
+              #echarts4,
383
+              #echarts6 {
384
+                width: 45%;
385
+                height: 80%;
386
+              }
387
+
388
+            }
389
+          }
390
+
373 391
           width: 100%;
374 392
           height: 30%;
375 393
           box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.04);
@@ -381,6 +399,7 @@
381 399
         .bottomContent {
382 400
           width: 100%;
383 401
           height: 35%;
402
+
384 403
           .topMsg_content {
385 404
             width: 100%;
386 405
             height: 100%;
@@ -415,6 +434,27 @@
415 434
           margin-right: 5px;
416 435
         }
417 436
       }
437
+      .rightContent .bottomContent{
438
+        width: 100%;
439
+        height: 28%;
440
+      }
441
+
442
+      .topMsg_content {
443
+        width: 100%;
444
+        height: 100%;
445
+
446
+        .eacharView {
447
+          width: 100%;
448
+          height: 100%;
449
+          display: flex;
450
+          align-items: center;
451
+
452
+          #echarts5 {
453
+            width: 100%;
454
+            height: 80%;
455
+          }
456
+        }
457
+      }
418 458
 
419 459
       .bigDivPd {}
420 460
 
@@ -460,12 +500,14 @@
460 500
         width: 28%;
461 501
         height: 88%;
462 502
         z-index: 9;
463
-
503
+        .topMsg_2 .topMsg_content{
504
+          height: 80%;
505
+        }
464 506
         .topMsg_2,
465 507
         .topMsg_3,
466 508
         .topMsg_4 {
467 509
           width: 100%;
468
-          height: 20%;
510
+          height: 22%;
469 511
           margin-bottom: 3%;
470 512
         }
471 513
 
@@ -600,9 +642,25 @@
600 642
 
601 643
         .bottomContent {
602 644
           height: 30%;
645
+          width: 100%;
603 646
           position: absolute;
604 647
           left: 0;
605
-          bottom: 0;
648
+          bottom: 5%;
649
+
650
+          .topMsg_content {
651
+            width: 100%;
652
+            height: 100%;
653
+            display: flex;
654
+            align-items: center;
655
+            justify-content: center;
656
+            .eacharView{
657
+              justify-content: center;
658
+            }
659
+            #echarts2 {
660
+              width: 80%;
661
+              height: 75%;
662
+            }
663
+          }
606 664
         }
607 665
 
608 666
         .center_li {
@@ -808,4 +866,20 @@
808 866
   .ant-btn-primary {
809 867
     color: #fff !important;
810 868
   }
869
+  #echarts8{
870
+    width: 50%;
871
+    height: 80%;
872
+  }
873
+  #echarts9 {
874
+    width: 40%;
875
+    height: 80%;
876
+  }
877
+
878
+  .leftContent .bottomContent {
879
+    height: 42%!important;
880
+    .eacharView {
881
+      display: flex;
882
+      align-items: end;
883
+    }
884
+  }
811 885
 }

+ 203 - 0
src/pages/tqcDataVHome/component/bottomLineForSend.jsx

@@ -0,0 +1,203 @@
1
+/*
2
+ * @Author: dayan_hjm 近30天产量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-10-23 10:34:12
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+@withRouter
15
+
16
+class BottomLineForSend extends Component {
17
+  // 构造函数,组件的实例创建时,最先执行
18
+  constructor(props, context) {
19
+    super(props, context);
20
+    this.store = mod;
21
+    this.state = {
22
+    };
23
+  }
24
+
25
+  componentDidMount() {
26
+    this.setData();
27
+  }
28
+
29
+  setData() {
30
+    setTimeout(() => {
31
+      // 基于准备好的dom,初始化echarts实例
32
+      var myChart = echarts.init(document.getElementById('echarts2'));
33
+
34
+      var option = {
35
+        tooltip: {
36
+          trigger: 'axis',
37
+          axisPointer: { type: 'shadow' },
38
+          // formatter:'{c}' ,
39
+        },
40
+        grid: {
41
+          left: '0',
42
+          top: '30',
43
+          right: '10',
44
+          bottom: '-20',
45
+          containLabel: true
46
+        },
47
+        // legend: {
48
+        //   data: ['字段1', '字段2'],
49
+        //   right: 'center',
50
+        //   top: 0,
51
+        //   textStyle: {
52
+        //     color: "#fff"
53
+        //   },
54
+        //   itemWidth: 12,
55
+        //   itemHeight: 10,
56
+        //   // itemGap: 35
57
+        // },
58
+
59
+        xAxis: [{
60
+          type: 'category',
61
+          boundaryGap: false,
62
+          axisLabel: {
63
+            rotate: -90,
64
+            textStyle: {
65
+              color: "rgba(255,255,255,.6)",
66
+              fontSize: 12,
67
+
68
+            },
69
+          },
70
+          axisLine: {
71
+            lineStyle: {
72
+              color: 'rgba(255,255,255,.1)'
73
+            }
74
+
75
+          },
76
+
77
+          data: ['17-3', '17-6', '17-9', '17-12', '18-3', '18-6', '18-9', '18-12', '19-3', '19-6', '19-9', '19-12']
78
+
79
+        }, {
80
+
81
+          axisPointer: { show: false },
82
+          axisLine: { show: false },
83
+          position: 'bottom',
84
+          offset: 20,
85
+
86
+
87
+
88
+        }],
89
+
90
+        yAxis: [{
91
+          type: 'value',
92
+          axisTick: { show: false },
93
+          // splitNumber: 6,
94
+          axisLine: {
95
+            lineStyle: {
96
+              color: 'rgba(255,255,255,.1)'
97
+            }
98
+          },
99
+          axisLabel: {
100
+            formatter: "{value} 吨",
101
+            textStyle: {
102
+              color: "rgba(255,255,255,.6)",
103
+              fontSize: 14,
104
+            },
105
+          },
106
+
107
+          splitLine: {
108
+            lineStyle: {
109
+              color: 'rgba(255,255,255,.1)'
110
+            }
111
+          }
112
+        }],
113
+        series: [
114
+          {
115
+            name: '字段1',
116
+            type: 'line',
117
+            smooth: true,
118
+            symbol: 'circle',
119
+            symbolSize: 5,
120
+            showSymbol: false,
121
+            lineStyle: {
122
+              normal: {
123
+                color: '#69FFDE',
124
+                width: 2
125
+              }
126
+            },
127
+            areaStyle: {
128
+              normal: {
129
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
130
+                  offset: 0,
131
+                  color: '#69ffde5c'
132
+                }, {
133
+                  offset: 1,
134
+                  color: 'rgba(228, 228, 126, 0)'
135
+                }], false),
136
+                shadowColor: 'rgba(0, 0, 0, 0.1)',
137
+              }
138
+            },
139
+            itemStyle: {
140
+              normal: {
141
+                color: 'rgba(228, 228, 126, 1)',
142
+                borderColor: 'rgba(228, 228, 126, .1)',
143
+                borderWidth: 12
144
+              }
145
+            },
146
+            data: [12.50, 14.4, 16.1, 14.9, 20.1, 17.2, 17.0, 13.42, 20.12, 18.94, 17.27, 16.10]
147
+
148
+          }, 
149
+          // {
150
+          //   name: '字段2',
151
+          //   type: 'line',
152
+          //   smooth: true,
153
+          //   symbol: 'circle',
154
+          //   symbolSize: 5,
155
+          //   showSymbol: false,
156
+          //   lineStyle: {
157
+
158
+          //     normal: {
159
+          //       color: 'rgba(255, 128, 128, 1)',
160
+          //       width: 2
161
+          //     }
162
+          //   },
163
+          //   areaStyle: {
164
+          //     normal: {
165
+          //       color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
166
+          //         offset: 0,
167
+          //         color: 'rgba(255, 128, 128,.2)'
168
+          //       }, {
169
+          //         offset: 1,
170
+          //         color: 'rgba(255, 128, 128, 0)'
171
+          //       }], false),
172
+          //       shadowColor: 'rgba(0, 0, 0, 0.1)',
173
+          //     }
174
+          //   },
175
+          //   itemStyle: {
176
+          //     normal: {
177
+          //       color: 'rgba(255, 128, 128, 1)',
178
+          //       borderColor: 'rgba(255, 128, 128, .1)',
179
+          //       borderWidth: 12
180
+          //     }
181
+          //   },
182
+          //   data: [-6.4, 0.1, 6.6, 11.2, 42.1, 26.0, 20.2, 18.31, 21.59, 24.42, 34.03, 32.9]
183
+          // },
184
+        ]
185
+      };
186
+      // 使用刚指定的配置项和数据显示图表。
187
+      myChart.setOption(option);
188
+      window.addEventListener("resize", function () {
189
+        myChart.resize();
190
+      });
191
+    }, 200)
192
+  }
193
+
194
+  render() {
195
+
196
+    return (
197
+      <div className={["eacharView cbBottomLineForSend"]}>
198
+        <div id="echarts2"></div>
199
+      </div>
200
+    )
201
+  }
202
+}
203
+export default BottomLineForSend;

+ 254 - 0
src/pages/tqcDataVHome/component/leftMenoyView.jsx

@@ -0,0 +1,254 @@
1
+/*
2
+ * @Author: dayan_hjm 库存金额
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-10-23 10:14:04
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+@withRouter
15
+
16
+class LeftMenoyView extends Component {
17
+  // 构造函数,组件的实例创建时,最先执行
18
+  constructor(props, context) {
19
+    super(props, context);
20
+    this.store = mod;
21
+    this.state = {
22
+    };
23
+  }
24
+
25
+  componentDidMount() {
26
+    this.setData();
27
+    this.setData2();
28
+  }
29
+
30
+  setData() {
31
+    setTimeout(() => {
32
+      // 基于准备好的dom,初始化echarts实例
33
+      var myChart = echarts.init(document.getElementById('echarts4'));
34
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
35
+      var option = {
36
+
37
+        grid: {
38
+          left: '2%',
39
+          top: '1%',
40
+          right: '5%',
41
+          bottom: '0%',
42
+          containLabel: true
43
+        },
44
+        xAxis: [{
45
+          show: false,
46
+        }],
47
+        yAxis: [{
48
+          axisTick: 'none',
49
+          axisLine: 'none',
50
+          offset: '7',
51
+          axisLabel: {
52
+            textStyle: {
53
+              color: 'rgba(255,255,255,.6)',
54
+              fontSize: '14',
55
+            }
56
+          },
57
+          data: ['字段1', '字段2', '字段3', '字段4']
58
+
59
+        }, 
60
+        // {
61
+        //   axisTick: 'none',
62
+        //   axisLine: 'none',
63
+        //   axisLabel: {
64
+        //     textStyle: {
65
+        //       color: 'rgba(255,255,255,.6)',
66
+        //       fontSize: '14',
67
+        //     }
68
+        //   },
69
+        //   data: [1514, 1619, 1623, 1968]
70
+
71
+        // }, 
72
+        {
73
+          name: '单位:件',
74
+          nameGap: '50',
75
+          nameTextStyle: {
76
+            color: 'rgba(255,255,255,.6)',
77
+            fontSize: '16',
78
+          },
79
+          axisLine: {
80
+            lineStyle: {
81
+              color: 'rgba(0,0,0,0)'
82
+            }
83
+          },
84
+          data: [],
85
+        }],
86
+        series: [{
87
+          name: '条',
88
+          type: 'bar',
89
+          yAxisIndex: 0,
90
+          data: [25, 30, 34, 40, 43, 48, 52, 56, 70],
91
+          label: {
92
+            normal: {
93
+              show: true,
94
+              position: 'right',
95
+              formatter: function (param) {
96
+                return param.value + '%';
97
+              },
98
+              textStyle: {
99
+                color: 'rgba(255,255,255,.8)',
100
+                fontSize: '12',
101
+              }
102
+            }
103
+          },
104
+          barWidth: 15,
105
+          itemStyle: {
106
+            normal: {
107
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
108
+                offset: 0,
109
+                color: '#03c893'
110
+              },
111
+              {
112
+                offset: 1,
113
+                color: '#0091ff'
114
+              }
115
+              ]),
116
+              barBorderRadius: 15,
117
+            }
118
+          },
119
+          z: 2
120
+        }, {
121
+          name: '白框',
122
+          type: 'bar',
123
+          yAxisIndex: 1,
124
+          barGap: '-100%',
125
+          data: [99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5],
126
+          barWidth: 15,
127
+          itemStyle: {
128
+            normal: {
129
+              color: 'rgba(0,0,0,.2)',
130
+              barBorderRadius: 15,
131
+            }
132
+          },
133
+          z: 1
134
+        }]
135
+      };
136
+
137
+
138
+      // 使用刚指定的配置项和数据显示图表。
139
+      myChart.setOption(option);
140
+      window.addEventListener("resize", function () {
141
+        myChart.resize();
142
+      });
143
+    }, 200)
144
+  }
145
+
146
+  setData2() {
147
+    setTimeout(() => {
148
+      // 基于准备好的dom,初始化echarts实例
149
+      var myChart = echarts.init(document.getElementById('echarts6'));
150
+      var option = {
151
+        title: {
152
+          text: '16%',
153
+          subtext: '氢氧化锂',
154
+          x: 'center',
155
+          y: '40%',
156
+          textStyle: {
157
+            color: '#fff',
158
+            fontSize: 15,
159
+            lineHeight: 10,
160
+          },
161
+          subtextStyle: {
162
+            color: '#90979c',
163
+            fontSize: 12,
164
+            lineHeight: 10,
165
+
166
+          },
167
+        },
168
+        tooltip: {
169
+          trigger: 'item',
170
+          formatter: "{b} : {c} ({d}%)"
171
+        },
172
+
173
+        visualMap: {
174
+          show: false,
175
+          min: 500,
176
+          max: 600,
177
+          inRange: {
178
+            //colorLightness: [0, 1]
179
+          }
180
+        },
181
+        series: [{
182
+          name: '访问来源',
183
+          type: 'pie',
184
+          radius: ['50%', '70%'],
185
+          center: ['50%', '50%'],
186
+          color: ['rgb(131,249,103)', '#8D93FF', '#2FD2FF', '#FFCE00'], //'#FBFE27','rgb(11,228,96)','#FE5050'
187
+          data: [{
188
+            "value": 1924,
189
+            "name": ""
190
+          }, {
191
+            "value": 1055,
192
+            "name": ""
193
+          }, {
194
+            "value": 1532,
195
+            "name": ""
196
+          }
197
+          ].sort(function (a, b) {
198
+            return a.value - b.value
199
+          }),
200
+          roseType: 'radius',
201
+
202
+          label: {
203
+            normal: {
204
+              formatter: ['{c|{c}万}', '{b|{b}}'].join('\n'),
205
+              rich: {
206
+                c: {
207
+                  color: 'rgb(241,246,104)',
208
+                  fontSize: 12,
209
+                  fontWeight: 'bold',
210
+                  lineHeight: 5
211
+                },
212
+                b: {
213
+                  color: 'rgb(98,137,169)',
214
+                  fontSize: 12,
215
+                  height: 44
216
+                },
217
+              },
218
+            }
219
+          },
220
+          labelLine: {
221
+            normal: {
222
+              lineStyle: {
223
+                color: 'rgb(98,137,169)',
224
+              },
225
+              smooth: 0.2,
226
+              length: 10,
227
+              length2: 20,
228
+
229
+            }
230
+          }
231
+        }]
232
+      };
233
+
234
+
235
+      // 使用刚指定的配置项和数据显示图表。
236
+      myChart.setOption(option);
237
+      window.addEventListener("resize", function () {
238
+        myChart.resize();
239
+      });
240
+
241
+    }, 200)
242
+  }
243
+
244
+  render() {
245
+
246
+    return (
247
+      <div className={["eacharView cbLeftMenoyView"]}>
248
+        <div id="echarts6"></div>
249
+        <div id="echarts4"></div>
250
+      </div>
251
+    )
252
+  }
253
+}
254
+export default LeftMenoyView;

+ 155 - 0
src/pages/tqcDataVHome/component/moodSendView.jsx

@@ -0,0 +1,155 @@
1
+/*
2
+ * @Author: dayan_hjm 月度产量/发货量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-10-23 09:42:34
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+@withRouter
15
+
16
+class MoodSendView extends Component {
17
+  // 构造函数,组件的实例创建时,最先执行
18
+  constructor(props, context) {
19
+    super(props, context);
20
+    this.store = mod;
21
+    this.state = {
22
+    };
23
+  }
24
+
25
+  componentDidMount() {
26
+    this.setData();
27
+  }
28
+
29
+  setData() {
30
+    setTimeout(() => {
31
+      var dataAxis = ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日'];
32
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
33
+      var yMax = 500;
34
+      var dataShadow = [];
35
+      for (var i = 0; i < data.length; i++) {
36
+        dataShadow.push(yMax);
37
+      }
38
+      var option = {
39
+        title: {
40
+          text: '',
41
+          subtext: ''
42
+        },
43
+        grid: {
44
+          x: 40,
45
+          y: 40,
46
+          x2: 20,
47
+          y2: 20,
48
+
49
+        },
50
+        xAxis: {
51
+          data: dataAxis,
52
+          axisLabel: {
53
+            /*inside: true,*/
54
+            interval: 0,
55
+            textStyle: {
56
+              color: '#fff',
57
+              fontSize: 12
58
+
59
+            }
60
+          },
61
+          axisTick: {
62
+            show: false,
63
+          },
64
+          axisLine: {
65
+            show: true,
66
+            symbol: ['none', 'arrow'],
67
+            symbolOffset: 12,
68
+            lineStyle: {
69
+              color: '#fff',
70
+            }
71
+          },
72
+          z: 10
73
+        },
74
+        yAxis: {
75
+          type: 'value',
76
+          name: '单位:元',
77
+          axisLine: {
78
+            show: true,
79
+            symbol: ['none', 'arrow'],
80
+            symbolOffset: 12,
81
+            lineStyle: {
82
+              color: '#fff',
83
+            }
84
+          },
85
+          axisTick: {
86
+            show: false
87
+          },
88
+          axisLabel: {
89
+            textStyle: {
90
+              color: '#fff',
91
+              fontSize: 12
92
+            }
93
+          }
94
+        },
95
+
96
+        dataZoom: [
97
+          {
98
+            type: 'inside'
99
+          }
100
+        ],
101
+        series: [
102
+          { // For shadow
103
+            type: 'bar',
104
+            itemStyle: {
105
+              color: 'rgba(0,0,0,0.05)'
106
+            },
107
+            barGap: '-100%',
108
+            barCategoryGap: '40%',
109
+            data: dataShadow,
110
+            animation: false
111
+          },
112
+          {
113
+            type: 'bar',
114
+            itemStyle: {
115
+              color: new echarts.graphic.LinearGradient(
116
+                0, 0, 0, 1,
117
+                [
118
+                  { offset: 0, color: '#0efdff' },
119
+                  { offset: 0.5, color: '#188df0' },
120
+                  { offset: 1, color: '#188df0' }
121
+                ]
122
+              )
123
+            },
124
+            emphasis: {
125
+              itemStyle: {
126
+                color: new echarts.graphic.LinearGradient(
127
+                  0, 0, 0, 1,
128
+                  [
129
+                    { offset: 0, color: '#2378f7' },
130
+                    { offset: 0.7, color: '#2378f7' },
131
+                    { offset: 1, color: '#0efdff' }
132
+                  ]
133
+                )
134
+              }
135
+            },
136
+            data: data
137
+          }
138
+        ]
139
+      };
140
+      var myChart = echarts.init(document.getElementById('chartmain'));
141
+      // 使用刚指定的配置项和数据显示图表。
142
+      myChart.setOption(option);
143
+    }, 200)
144
+  }
145
+
146
+  render() {
147
+
148
+    return (
149
+      <div className={["eacharView cbMoodSendView"]}>
150
+        <div id="chartmain"></div>
151
+      </div>
152
+    )
153
+  }
154
+}
155
+export default MoodSendView;

+ 153 - 0
src/pages/tqcDataVHome/component/oneQualified.jsx

@@ -0,0 +1,153 @@
1
+/*
2
+ * @Author: dayan_hjm 一次合格率
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-10-23 10:47:46
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+@withRouter
15
+
16
+class BottomLineForSend extends Component {
17
+  // 构造函数,组件的实例创建时,最先执行
18
+  constructor(props, context) {
19
+    super(props, context);
20
+    this.store = mod;
21
+    this.state = {
22
+    };
23
+  }
24
+
25
+  componentDidMount() {
26
+    this.setData();
27
+  }
28
+
29
+  setData() {
30
+    setTimeout(() => {
31
+      // 基于准备好的dom,初始化echarts实例
32
+      var myChart = echarts.init(document.getElementById('echarts5'));
33
+
34
+      var option = {
35
+        tooltip: {
36
+          trigger: 'axis',
37
+          axisPointer: { type: 'shadow' },
38
+        }, "grid": {
39
+          "top": "15%",
40
+          "right": "10%",
41
+          "bottom": "20",
42
+          "left": "10%",
43
+        },
44
+        legend: {
45
+          data: ['目标一次及格率', '实际一次及格率'],
46
+          right: 'center',
47
+          top: 0,
48
+          textStyle: {
49
+            color: "#fff"
50
+          },
51
+          itemWidth: 12,
52
+          itemHeight: 10,
53
+        },
54
+        "xAxis": [
55
+          {
56
+            "type": "category",
57
+
58
+            data: ['2016', '2017', '2018', '2019'],
59
+            axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
60
+            axisLabel: {
61
+              textStyle: { color: "rgba(255,255,255,.7)", fontSize: '14', },
62
+            },
63
+
64
+          },
65
+        ],
66
+        "yAxis": [
67
+          {
68
+            "type": "value",
69
+            "name": "单位1",
70
+            "show": true,
71
+            axisTick: { show: false },
72
+            "axisLabel": {
73
+              "show": true,
74
+              color: "rgba(255,255,255,.6)"
75
+
76
+            },
77
+            axisLine: { lineStyle: { color: 'rgba(255,255,255,.1)' } },//左线色
78
+
79
+          },
80
+          {
81
+            "type": "value",
82
+            "name": "单位2",
83
+            "show": true,
84
+            axisTick: { show: false },
85
+            "axisLabel": {
86
+              "show": true,
87
+              formatter: "{value}",
88
+              color: "rgba(255,255,255,.6)"
89
+            },
90
+            axisLine: { lineStyle: { color: 'rgba(255,255,255,.1)' } },//右线色
91
+            splitLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } },//x轴线
92
+          },
93
+        ],
94
+        "series": [
95
+          {
96
+            "name": "目标一次及格率",
97
+            "type": "line",
98
+            "yAxisIndex": 1,
99
+
100
+            "data": [66, 16.8, 1.33, 12.65],
101
+            lineStyle: {
102
+              normal: {
103
+                width: 2
104
+              },
105
+            },
106
+            "itemStyle": {
107
+              "normal": {
108
+                "color": "#69FFDE",
109
+
110
+              }
111
+            },
112
+            "smooth": true
113
+          },
114
+          {
115
+            "name": "实际一次及格率",
116
+            "type": "line",
117
+            "yAxisIndex": 1,
118
+
119
+            "data": [0, 11.48, 18.00, 25.65],
120
+            lineStyle: {
121
+              normal: {
122
+                width: 2
123
+              },
124
+            },
125
+            "itemStyle": {
126
+              "normal": {
127
+                "color": "#FFCE00",
128
+
129
+              }
130
+            },
131
+            "smooth": true
132
+          }
133
+        ]
134
+      };
135
+      // 使用刚指定的配置项和数据显示图表。
136
+      myChart.setOption(option);
137
+      window.addEventListener("resize", function () {
138
+        myChart.resize();
139
+      });
140
+
141
+    }, 200)
142
+  }
143
+
144
+  render() {
145
+
146
+    return (
147
+      <div className={["eacharView cbBottomLineForSend"]}>
148
+        <div id="echarts5"></div>
149
+      </div>
150
+    )
151
+  }
152
+}
153
+export default BottomLineForSend;

+ 262 - 0
src/pages/tqcDataVHome/component/rightBottomView.jsx

@@ -0,0 +1,262 @@
1
+/*
2
+ * @Author: dayan_hjm 碳排放
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-10-23 11:12:30
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+@withRouter
15
+
16
+class RightBottomView extends Component {
17
+  // 构造函数,组件的实例创建时,最先执行
18
+  constructor(props, context) {
19
+    super(props, context);
20
+    this.store = mod;
21
+    this.state = {
22
+    };
23
+  }
24
+
25
+  componentDidMount() {
26
+    this.setData();
27
+    this.setData2();
28
+  }
29
+
30
+  setData() {
31
+    setTimeout(() => {
32
+      // 基于准备好的dom,初始化echarts实例
33
+      var myChart = echarts.init(document.getElementById('echarts8'));
34
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
35
+      var option = {
36
+
37
+        grid: {
38
+          left: '2%',
39
+          top: '1%',
40
+          right: '5%',
41
+          bottom: '0%',
42
+          containLabel: true
43
+        },
44
+        xAxis: [{
45
+          show: false,
46
+        }],
47
+        yAxis: [{
48
+          axisTick: 'none',
49
+          axisLine: 'none',
50
+          offset: '7',
51
+          axisLabel: {
52
+            textStyle: {
53
+              color: '#69FFDE',
54
+              fontSize: '16',
55
+            }
56
+          },
57
+          data: ['2020', '2021', '2022']
58
+
59
+        }, 
60
+        {
61
+          name: '单位:件',
62
+          nameGap: '50',
63
+          nameTextStyle: {
64
+            color: 'rgba(255,255,255,.6)',
65
+            fontSize: '16',
66
+          },
67
+          axisLine: {
68
+            lineStyle: {
69
+              color: 'rgba(0,0,0,0)'
70
+            }
71
+          },
72
+          data: [],
73
+        }],
74
+        legend: {
75
+          data: '碳排放强度',
76
+          right: 'center',
77
+          top: 0,
78
+          textStyle: {
79
+            color: "#fff"
80
+          },
81
+          itemWidth: 12,
82
+          itemHeight: 10,
83
+        },
84
+        series: [{
85
+          name: '条',
86
+          type: 'bar',
87
+          yAxisIndex: 0,
88
+          data: [25, 30, 34],
89
+          label: {
90
+            normal: {
91
+              show: true,
92
+              position: 'right',
93
+              formatter: function (param) {
94
+                return param.value + '%';
95
+              },
96
+              textStyle: {
97
+                color: 'rgba(255,255,255,.8)',
98
+                fontSize: '12',
99
+              }
100
+            }
101
+          },
102
+          barWidth: 15,
103
+          itemStyle: {
104
+            normal: {
105
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
106
+                offset: 0,
107
+                color: '#FFCE00'
108
+              },
109
+              {
110
+                offset: 1,
111
+                color: '#c8a20494'
112
+              }
113
+              ]),
114
+              barBorderRadius: 15,
115
+            }
116
+          },
117
+          z: 2
118
+        }, {
119
+          name: '白框',
120
+          type: 'bar',
121
+          yAxisIndex: 1,
122
+          barGap: '-100%',
123
+          data: [99.5, 99.5, 99.5],
124
+          barWidth: 15,
125
+          itemStyle: {
126
+            normal: {
127
+              color: '#ffffff24',
128
+              barBorderRadius: 15,
129
+            }
130
+          },
131
+          z: 1
132
+        }]
133
+      };
134
+
135
+
136
+      // 使用刚指定的配置项和数据显示图表。
137
+      myChart.setOption(option);
138
+      window.addEventListener("resize", function () {
139
+        myChart.resize();
140
+      });
141
+    }, 200)
142
+  }
143
+
144
+  setData2() {
145
+    setTimeout(() => {
146
+      // 基于准备好的dom,初始化echarts实例
147
+      var myChart = echarts.init(document.getElementById('echarts9'));
148
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
149
+      var option = {
150
+
151
+        grid: {
152
+          left: '2%',
153
+          top: '1%',
154
+          right: '5%',
155
+          bottom: '0%',
156
+          containLabel: true
157
+        },
158
+        xAxis: [{
159
+          show: false,
160
+        }],
161
+        yAxis: [{
162
+          axisTick: 'none',
163
+          axisLine: 'none',
164
+          offset: '7',
165
+          axisLabel: {
166
+            textStyle: {
167
+              color: 'rgba(255,255,255,.6)',
168
+              fontSize: '0',
169
+            }
170
+          },
171
+          data: ['字段1', '字段2', '字段3']
172
+
173
+        }, 
174
+        {
175
+          name: '单位:件',
176
+          nameGap: '50',
177
+          nameTextStyle: {
178
+            color: 'rgba(255,255,255,.6)',
179
+            fontSize: '16',
180
+          },
181
+          axisLine: {
182
+            lineStyle: {
183
+              color: 'rgba(0,0,0,0)'
184
+            }
185
+          },
186
+          data: [],
187
+        }],
188
+        series: [{
189
+          name: '条',
190
+          type: 'bar',
191
+          yAxisIndex: 0,
192
+          data: [25, 30, 34],
193
+          label: {
194
+            normal: {
195
+              show: true,
196
+              position: 'right',
197
+              formatter: function (param) {
198
+                return param.value + '%';
199
+              },
200
+              textStyle: {
201
+                color: 'rgba(255,255,255,.8)',
202
+                fontSize: '12',
203
+              }
204
+            }
205
+          },
206
+          barWidth: 15,
207
+          itemStyle: {
208
+            normal: {
209
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
210
+                offset: 0,
211
+                color: '#03c893'
212
+              },
213
+              {
214
+                offset: 1,
215
+                color: '#0091ff'
216
+              }
217
+              ]),
218
+              barBorderRadius: 15,
219
+            }
220
+          },
221
+          z: 2
222
+        }, {
223
+          name: '白框',
224
+          type: 'bar',
225
+          yAxisIndex: 1,
226
+          barGap: '-100%',
227
+          data: [99.5, 99.5, 99.5],
228
+          barWidth: 15,
229
+          itemStyle: {
230
+            normal: {
231
+              color: '#ffffff24',
232
+              barBorderRadius: 15,
233
+            }
234
+          },
235
+          z: 1
236
+        }]
237
+      };
238
+
239
+
240
+      // 使用刚指定的配置项和数据显示图表。
241
+      myChart.setOption(option);
242
+      window.addEventListener("resize", function () {
243
+        myChart.resize();
244
+      });
245
+
246
+    }, 200)
247
+  }
248
+
249
+  render() {
250
+
251
+    return (
252
+      <div className={["eacharView cbRightBottomView"]}>
253
+        <div id="echarts9"></div>
254
+        {/* <div className="fonts">
255
+
256
+        </div> */}
257
+        <div id="echarts8"></div>
258
+      </div>
259
+    )
260
+  }
261
+}
262
+export default RightBottomView;

src/pages/chaBaiDaohome/mod.js → src/pages/tqcDataVHome/mod.js


src/pages/chaBaiDaohome/style.less → src/pages/tqcDataVHome/style.less


+ 12 - 119
src/pages/chaBaiDaohome/view.jsx

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm 
3 3
  * @Date: 2022-10-27 11:40:02 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-10-20 17:44:10
5
+ * @Last Modified time: 2023-10-23 10:55:59
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -26,7 +26,7 @@ import {
26 26
   deleteById,
27 27
   insertSysComresourceAccountRelationEntityNew,
28 28
   getAccountAllCareResource,
29
-  getLoginUserFineResourceTree
29
+  getLoginUserFineResourceTreebottomLineForSend
30 30
 } from "@apis/work";
31 31
 import { cloneDeep, get } from 'lodash'
32 32
 import {
@@ -41,6 +41,11 @@ import {
41 41
   StarFilled,
42 42
 } from "@ant-design/icons";
43 43
 import ModelBox from "@components/modelBox/view.jsx";
44
+import BottomLineForSend from "./component/bottomLineForSend.jsx";
45
+import MoodSendView from "./component/moodSendView.jsx";
46
+import LeftMenoyView from "./component/leftMenoyView.jsx";
47
+import RightBottomView from "./component/rightBottomView.jsx";
48
+import OneQualified from "./component/oneQualified.jsx";
44 49
 
45 50
 @withRouter
46 51
 
@@ -71,121 +76,6 @@ class Home extends Component {
71 76
     setTimeout(()=>{
72 77
       $(".shu1").numScroll();
73 78
     },200)
74
-    setTimeout(()=>{
75
-      var dataAxis = ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日'];
76
-      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
77
-      var yMax = 500;
78
-      var dataShadow = [];
79
-      for (var i = 0; i < data.length; i++) {
80
-        dataShadow.push(yMax);
81
-      }
82
-      var	option = {
83
-        title: {
84
-          text: '',
85
-          subtext: ''
86
-        },
87
-        grid:{
88
-          x:40,
89
-          y:40,
90
-          x2:20,
91
-          y2:20,
92
-  
93
-        },
94
-        xAxis: {
95
-          data: dataAxis,
96
-          axisLabel: {
97
-            /*inside: true,*/
98
-            interval:0,
99
-            textStyle: {
100
-              color: '#fff',
101
-              fontSize: 12
102
-  
103
-            }
104
-          },
105
-          axisTick: {
106
-            show: false,
107
-          },
108
-          axisLine: {
109
-            show: true,
110
-            symbol:['none', 'arrow'],
111
-            symbolOffset: 12,
112
-            lineStyle:{
113
-              color: '#fff',
114
-            }
115
-          },
116
-          z: 10
117
-        },
118
-        yAxis: {
119
-          type: 'value',
120
-          name: '单位:元',
121
-          axisLine: {
122
-            show: true,
123
-            symbol: ['none', 'arrow'],
124
-            symbolOffset: 12,
125
-            lineStyle:{
126
-              color: '#fff',
127
-            }
128
-          },
129
-          axisTick: {
130
-            show: false
131
-          },
132
-          axisLabel: {
133
-            textStyle: {
134
-              color: '#fff',
135
-              fontSize: 12
136
-            }
137
-          }
138
-        },
139
-  
140
-        dataZoom: [
141
-          {
142
-            type: 'inside'
143
-          }
144
-        ],
145
-        series: [
146
-          { // For shadow
147
-            type: 'bar',
148
-            itemStyle: {
149
-              color: 'rgba(0,0,0,0.05)'
150
-            },
151
-            barGap: '-100%',
152
-            barCategoryGap: '40%',
153
-            data: dataShadow,
154
-            animation: false
155
-          },
156
-          {
157
-            type: 'bar',
158
-            itemStyle: {
159
-              color: new echarts.graphic.LinearGradient(
160
-                0, 0, 0, 1,
161
-                [
162
-                  {offset: 0, color: '#0efdff'},
163
-                  {offset: 0.5, color: '#188df0'},
164
-                  {offset: 1, color: '#188df0'}
165
-                ]
166
-              )
167
-            },
168
-            emphasis: {
169
-              itemStyle: {
170
-                color: new echarts.graphic.LinearGradient(
171
-                  0, 0, 0, 1,
172
-                  [
173
-                    {offset: 0, color: '#2378f7'},
174
-                    {offset: 0.7, color: '#2378f7'},
175
-                    {offset: 1, color: '#0efdff'}
176
-                  ]
177
-                )
178
-              }
179
-            },
180
-            data: data
181
-          }
182
-        ]
183
-      };
184
-      var myChart = echarts.init(document.getElementById('chartmain'));
185
-      // 使用刚指定的配置项和数据显示图表。
186
-      myChart.setOption(option);
187
-  
188
-    },200)
189 79
   }
190 80
 
191 81
   render() {
@@ -207,13 +97,13 @@ class Home extends Component {
207 97
           <div className="center_box">
208 98
             <p className="topMsg_title">库存金额</p>
209 99
             <div className="topMsg_content">
100
+              <LeftMenoyView></LeftMenoyView>
210 101
             </div>
211 102
           </div>
212 103
           <div className="bottomContent bigDivPd">
213 104
             <p className="topMsg_title">月度产量/发货量</p>
214 105
             <div className="topMsg_content">
215
-            <div id="chartmain"></div>
216
-
106
+            <MoodSendView></MoodSendView>
217 107
             </div>
218 108
           </div>
219 109
         </div>
@@ -242,6 +132,7 @@ class Home extends Component {
242 132
           <div className="bottomContent">
243 133
             <p className="topMsg_title">近30天产量</p>
244 134
             <div className="topMsg_content">
135
+              <BottomLineForSend></BottomLineForSend>
245 136
             </div>
246 137
           </div>
247 138
 
@@ -262,6 +153,7 @@ class Home extends Component {
262 153
           <div className="topMsg_2">
263 154
             <p className="topMsg_title">一次合格率</p>
264 155
             <div className="topMsg_content">
156
+              <OneQualified></OneQualified>
265 157
             </div>
266 158
           </div>
267 159
 
@@ -274,6 +166,7 @@ class Home extends Component {
274 166
           <div className="bottomContent bigDivPd">
275 167
             <p className="topMsg_title">碳排放</p>
276 168
             <div className="topMsg_content">
169
+              <RightBottomView></RightBottomView>
277 170
             </div>
278 171
           </div>
279 172
         </div>

+ 1 - 1
src/router/router.js

@@ -13,7 +13,7 @@ import Frame from "@pages/frame/view.jsx";
13 13
 import Login from "@pages/login/view.jsx";
14 14
 import NotFound from "@pages/notFound/view.jsx";
15 15
 import Home from '@pages/home/view.jsx';
16
-import HomeForchaBaiDao from '@pages/chaBaiDaohome/view.jsx';
16
+import HomeForchaBaiDao from '@pages/tqcDataVHome/view.jsx';
17 17
 import Loading from "@components/Loading/view.jsx";
18 18
 import $store from "@store/";
19 19
 import { CacheSwitch, CacheRoute } from 'react-router-cache-route';