@dayan_hjm пре 2 година
родитељ
комит
26726c7dcf

+ 6 - 6
src/assets/css/styleTemplate.less

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 茶百道主题样式
2
  * @Author: dayan_hjm 茶百道主题样式
3
  * @Date: 2022-10-27 10:56:37 
3
  * @Date: 2022-10-27 10:56:37 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-01 16:02:46
5
+ * @Last Modified time: 2023-11-05 09:43:29
6
  */
6
  */
7
 
7
 
8
 @import url("../../themes/themes.less");
8
 @import url("../../themes/themes.less");
@@ -665,15 +665,15 @@
665
             justify-content: center;
665
             justify-content: center;
666
 
666
 
667
             .topMsg_number_2 {
667
             .topMsg_number_2 {
668
-              font-size: 0.2em;
668
+              font-size: 0.5em;
669
             }
669
             }
670
 
670
 
671
             .topMsg_number_p {
671
             .topMsg_number_p {
672
-              font-size: 0.2em;
672
+              font-size: 0.5em;
673
               line-height: 0em;
673
               line-height: 0em;
674
               color: #fff;
674
               color: #fff;
675
               font-weight: 100;
675
               font-weight: 100;
676
-              margin-top: -3em;
676
+              margin-top: -1.5em;
677
             }
677
             }
678
 
678
 
679
           }
679
           }
@@ -708,7 +708,7 @@
708
               width: 52%;
708
               width: 52%;
709
 
709
 
710
               .topMsg_number_p {
710
               .topMsg_number_p {
711
-                font-size: 0.2em;
711
+                font-size: 0.5em;
712
                 line-height: 0em;
712
                 line-height: 0em;
713
                 color: #fff;
713
                 color: #fff;
714
                 font-weight: 100;
714
                 font-weight: 100;
@@ -717,7 +717,7 @@
717
             }
717
             }
718
 
718
 
719
             .topMsg_number_2 {
719
             .topMsg_number_2 {
720
-              font-size: 0.2em;
720
+              font-size: 0.5em;
721
             }
721
             }
722
           }
722
           }
723
 
723
 

+ 189 - 20
src/pages/tqcDataVHome/api.js

@@ -3,24 +3,193 @@ import request from "@utils/request";
3
 
3
 
4
 /**碳排放 */
4
 /**碳排放 */
5
 export function dataengineCenterOneservice(params) {
5
 export function dataengineCenterOneservice(params) {
6
-    return request({
7
-      url: "/data-screen/dataengine-center-oneservice/list/1356250396177503367",
8
-      method: "POST",
9
-      data: {
10
-        "apiId":"1356250396177503367",
11
-        "appKey":"200000134",
12
-        "env":"PROD",
13
-        "reqProtocol":1,
14
-        "returnFields":[
15
-            "byear",
16
-            "missionsIntensity",
17
-            "missionsTotal",
18
-            "biz_id"
19
-        ],
20
-        "pageNum":1,
21
-        "pageSize":10,
22
-        "useResultCache":false
6
+  return request({
7
+    url: "/data-screen/dataengine-center-oneservice/list/1356250396177503367",
8
+    method: "POST",
9
+    data: {
10
+      "apiId": "1356250396177503367",
11
+      "appKey": "200000134",
12
+      "env": "PROD",
13
+      "reqProtocol": 1,
14
+      "returnFields": [
15
+        "byear",
16
+        "missionsIntensity",
17
+        "missionsTotal",
18
+        "biz_id"
19
+      ],
20
+      "pageNum": 1,
21
+      "pageSize": 10,
22
+      "useResultCache": false
23
     },
23
     },
24
-    });
25
-  }
26
-  
24
+    headers: {
25
+      sign: '19c3cdb58b80e44f2490b8eba3b7f938',
26
+      account: 'yunxi_fuxue',
27
+      'Cache-Control': 'no-cache',
28
+      apiId: '1356250396177503367',
29
+      appKey: '200000134',
30
+      execType: '3',
31
+      env: 'PROD',
32
+    }
33
+  });
34
+}
35
+
36
+
37
+/**库存金额 */
38
+export function momeyService(params) {
39
+  return request({
40
+    url: "/data-screen/dataengine-center-oneservice/list/1356247728606450795",
41
+    method: "POST",
42
+    data: {
43
+      "apiId": "1356247728606450795",
44
+      "appKey": "200000134",
45
+      "env": "PROD",
46
+      "reqProtocol": 1,
47
+      "returnFields": [
48
+        "indexName",
49
+        "prodCatgory",
50
+        "indexValue"
51
+      ],
52
+      "pageNum": 1,
53
+      "pageSize": 10,
54
+      "useResultCache": false
55
+    },
56
+    headers: {
57
+      sign: 'c8c1b40b31930c3fd50214bf3e02ee0f',
58
+      account: 'yunxi_fuxue',
59
+      'Cache-Control': 'no-cache',
60
+      apiId: '1356247728606450795',
61
+      appKey: '200000134',
62
+      execType: '3',
63
+      env: 'PROD',
64
+    }
65
+  });
66
+}
67
+
68
+
69
+/**百万工时损工率   产量计划完成率*/
70
+export function timeService(params) {
71
+  return request({
72
+    url: "/data-screen/dataengine-center-oneservice/list/1356250124518724729",
73
+    method: "POST",
74
+    data: {
75
+      "apiId": "1356250124518724729",
76
+      "appKey": "200000134",
77
+      "env": "PROD",
78
+      "reqProtocol": 1,
79
+      "returnFields": [
80
+        "indexName",
81
+        "factoryName",
82
+        "indexValue"
83
+      ],
84
+      "pageNum": 1,
85
+      "pageSize": 10,
86
+      "useResultCache": false
87
+    },
88
+    headers: {
89
+      sign: '46847fe90889330f13cdc3318d848d45',
90
+      account: 'yunxi_fuxue',
91
+      'Cache-Control': 'no-cache',
92
+      apiId: '1356250124518724729',
93
+      appKey: '200000134',
94
+      execType: '3',
95
+      env: 'PROD',
96
+    }
97
+  });
98
+}
99
+
100
+/**产值+发货量+产量+库存*/
101
+export function numberService(params) {
102
+  return request({
103
+    url: "/data-screen/dataengine-center-oneservice/list/1356243326548087867",
104
+    method: "POST",
105
+    data: {
106
+      "apiId": "1356243326548087867",
107
+      "appKey": "200000134",
108
+      "env": "PROD",
109
+      "reqProtocol": 1,
110
+      "returnFields": [
111
+        "indexName",
112
+        "indexValue"
113
+      ],
114
+      "pageNum": 1,
115
+      "pageSize": 10,
116
+      "useResultCache": false
117
+    },
118
+    headers: {
119
+      sign: '2f079b53e1e63b753bb6f9807f6c6818',
120
+      account: 'yunxi_fuxue',
121
+      'Cache-Control': 'no-cache',
122
+      apiId: '1356243326548087867',
123
+      appKey: '200000134',
124
+      execType: '3',
125
+      env: 'PROD',
126
+    }
127
+  });
128
+}
129
+
130
+
131
+/**近30天产量*/
132
+export function mondService(params) {
133
+  return request({
134
+    url: "/data-screen/dataengine-center-oneservice/list/1356244872119751767",
135
+    method: "POST",
136
+    data: {
137
+      "apiId": "1356244872119751767",
138
+      "appKey": "200000134",
139
+      "env": "PROD",
140
+      "reqProtocol": 1,
141
+      "returnFields": [
142
+        "indexName",
143
+        "indexDate",
144
+        "indexValue"
145
+      ],
146
+      "pageNum": 1,
147
+      "pageSize": 10,
148
+      "useResultCache": false
149
+    },
150
+    headers: {
151
+      sign: 'ef3ecc442896d925cc02d36f1107d9e3',
152
+      account: 'yunxi_fuxue',
153
+      'Cache-Control': 'no-cache',
154
+      apiId: '1356244872119751767',
155
+      appKey: '200000134',
156
+      execType: '3',
157
+      env: 'PROD',
158
+    }
159
+  });
160
+}
161
+
162
+/**月度产量/发货量+一次合格率*/
163
+export function twoService(params) {
164
+  return request({
165
+    url: "/data-screen/dataengine-center-oneservice/list/1356411403496625359",
166
+    method: "POST",
167
+    data: {
168
+      "apiId": "1356411403496625359",
169
+      "appKey": "200000134",
170
+      "env": "PROD",
171
+      "reqProtocol": 1,
172
+      "returnFields": [
173
+        "bMonth",
174
+        "proQty",
175
+        "deliveryQty",
176
+        "qcRate",
177
+        "targeRate",
178
+      ],
179
+      "pageNum": 1,
180
+      "pageSize": 10,
181
+      "useResultCache": false
182
+    },
183
+    headers: {
184
+      sign: '9c472223a9acbdb9f16bebb7002e0c40',
185
+      account: 'yunxi_fuxue',
186
+      'Cache-Control': 'no-cache',
187
+      apiId: '1356411403496625359',
188
+      appKey: '200000134',
189
+      execType: '3',
190
+      env: 'PROD',
191
+    }
192
+  });
193
+}
194
+
195
+

+ 38 - 9
src/pages/tqcDataVHome/component/bottomLineForSend.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 近30天产量
2
  * @Author: dayan_hjm 近30天产量
3
  * @Date: 2023-10-23 09:32:12 
3
  * @Date: 2023-10-23 09:32:12 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-10-30 18:02:38
5
+ * @Last Modified time: 2023-11-05 11:09:51
6
  */
6
  */
7
 
7
 
8
 
8
 
@@ -10,6 +10,9 @@ import React, { useState, useEffect, Component } from "react";
10
 import styles from "../style.less";
10
 import styles from "../style.less";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
12
 import mod from '../mod';
12
 import mod from '../mod';
13
+import {
14
+  mondService,
15
+} from "../api";
13
 
16
 
14
 @withRouter
17
 @withRouter
15
 
18
 
@@ -19,11 +22,28 @@ class BottomLineForSend extends Component {
19
     super(props, context);
22
     super(props, context);
20
     this.store = mod;
23
     this.store = mod;
21
     this.state = {
24
     this.state = {
25
+      missionsIntensity_arr:[],
26
+      year:[],
22
     };
27
     };
23
   }
28
   }
24
 
29
 
25
   componentDidMount() {
30
   componentDidMount() {
26
-    this.setData();
31
+    this.getUrl()
32
+  }
33
+  async getUrl() {
34
+    await mondService().then(({ data = [], resultCode }) => {
35
+      if (+resultCode === 0) {
36
+        let year = [], missionsIntensity_arr = [];
37
+        data.map((x, i) => {
38
+          const name_ = x.indexDate.split('-')[1]+ '-'+x.indexDate.split('-')[2];
39
+          year.push(name_);
40
+          missionsIntensity_arr.push(x.indexValue)
41
+        });
42
+        this.setState({ year, missionsIntensity_arr });
43
+        this.setData();
44
+      }
45
+    });
46
+
27
   }
47
   }
28
 
48
 
29
   setData() {
49
   setData() {
@@ -35,6 +55,15 @@ class BottomLineForSend extends Component {
35
         tooltip: {
55
         tooltip: {
36
           trigger: 'axis',
56
           trigger: 'axis',
37
           axisPointer: { type: 'shadow' },
57
           axisPointer: { type: 'shadow' },
58
+          borderColor:"rgba(105, 255, 222, 0.5)",
59
+          borderWidth:2,
60
+          padding:5,
61
+          textStyle:{
62
+            fontSize:12,
63
+            color:"#ededed"
64
+          },
65
+          backgroundColor:"#0000008a"
66
+
38
           // formatter:'{c}' ,
67
           // formatter:'{c}' ,
39
         },
68
         },
40
         grid: {
69
         grid: {
@@ -73,14 +102,14 @@ class BottomLineForSend extends Component {
73
 
102
 
74
             }
103
             }
75
           },
104
           },
76
-          splitLine:{
77
-            show:true,
78
-            lineStyle:{
105
+          splitLine: {
106
+            show: true,
107
+            lineStyle: {
79
               color: '#3b3b3b',
108
               color: '#3b3b3b',
80
               type: 'dashed',
109
               type: 'dashed',
81
             }
110
             }
82
           },
111
           },
83
-          data: ['17-3', '17-6', '17-9', '17-12', '18-3']
112
+          data: this.state.year
84
         }, {
113
         }, {
85
 
114
 
86
           axisPointer: { show: false },
115
           axisPointer: { show: false },
@@ -117,7 +146,7 @@ class BottomLineForSend extends Component {
117
         }],
146
         }],
118
         series: [
147
         series: [
119
           {
148
           {
120
-            name: '字段1',
149
+            name: '吨数',
121
             type: 'line',
150
             type: 'line',
122
             smooth: true,
151
             smooth: true,
123
             symbol: 'circle',
152
             symbol: 'circle',
@@ -148,9 +177,9 @@ class BottomLineForSend extends Component {
148
                 borderWidth: 12
177
                 borderWidth: 12
149
               }
178
               }
150
             },
179
             },
151
-            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],
180
+            data: this.state.missionsIntensity_arr,
152
             "smooth": true
181
             "smooth": true
153
-          }, 
182
+          },
154
           // {
183
           // {
155
           //   name: '字段2',
184
           //   name: '字段2',
156
           //   type: 'line',
185
           //   type: 'line',

+ 95 - 155
src/pages/tqcDataVHome/component/leftMenoyView.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 库存金额
2
  * @Author: dayan_hjm 库存金额
3
  * @Date: 2023-10-23 09:32:12 
3
  * @Date: 2023-10-23 09:32:12 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-02 13:57:00
5
+ * @Last Modified time: 2023-11-05 10:03:24
6
  */
6
  */
7
 
7
 
8
 
8
 
@@ -10,6 +10,9 @@ import React, { useState, useEffect, Component } from "react";
10
 import styles from "../style.less";
10
 import styles from "../style.less";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
12
 import mod from '../mod';
12
 import mod from '../mod';
13
+import {
14
+  momeyService,
15
+} from "../api";
13
 
16
 
14
 @withRouter
17
 @withRouter
15
 
18
 
@@ -19,62 +22,22 @@ class LeftMenoyView extends Component {
19
     super(props, context);
22
     super(props, context);
20
     this.store = mod;
23
     this.store = mod;
21
     this.state = {
24
     this.state = {
25
+      year:["碳酸锂","氧化纳",'金属锂',"氢氧化钠"],
26
+      missionsIntensity_arr:[
27
+        {value:0,name:"碳酸锂"},
28
+        {value:0,name:"氧化纳"},
29
+        {value:0,name:'金属锂'},
30
+        {value:0,name:"氢氧化钠"},
31
+      ],
22
     };
32
     };
23
   }
33
   }
24
 
34
 
25
   componentDidMount() {
35
   componentDidMount() {
26
-    this.setData();
27
-    this.setData2();
36
+    this.getUrl()
28
   }
37
   }
29
 
38
 
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: '0%',
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,.9)',
54
-              fontSize: '0',
55
-            }
56
-          },
57
-          data: ['碳酸锂', '氧化纳', '金属锂', '氢氧化钠']
58
-        },
59
-        {
60
-          name: '单位:件',
61
-          nameGap: '50',
62
-          nameTextStyle: {
63
-            color: 'rgba(255,255,255,.6)',
64
-            fontSize: '16',
65
-          },
66
-          axisLine: {
67
-            lineStyle: {
68
-              color: 'rgba(0,0,0,0)'
69
-            }
70
-          },
71
-          data: [],
72
-        }],
73
-        series: [{
74
-          name: '条',
75
-          type: 'bar',
76
-          yAxisIndex: 0,
77
-          data: [{
39
+  async getUrl() {
40
+    let data_style= [{
78
             value: 25, name: '碳酸锂', itemStyle: {
41
             value: 25, name: '碳酸锂', itemStyle: {
79
               normal: {
42
               normal: {
80
                 // barBorderRadius: 15,
43
                 // barBorderRadius: 15,
@@ -165,7 +128,76 @@ class LeftMenoyView extends Component {
165
               },
128
               },
166
             },
129
             },
167
 
130
 
168
-          }],
131
+          }]
132
+    await momeyService().then(({ data = [], resultCode }) => {
133
+      
134
+      if (+resultCode === 0) {
135
+        let year = [], missionsIntensity_arr = [];
136
+        data.map((x, i) => {
137
+          year.push(x.indexName);
138
+          data_style[i].value = x.indexValue;
139
+          data_style[i].name = x.indexName;
140
+          missionsIntensity_arr.push(data_style[i])
141
+        });
142
+        this.setState({ year, missionsIntensity_arr });
143
+        debugger
144
+
145
+        this.setData();
146
+        this.setData2();
147
+      }
148
+    });
149
+
150
+  }
151
+
152
+
153
+  setData() {
154
+    setTimeout(() => {
155
+      // 基于准备好的dom,初始化echarts实例
156
+      var myChart = echarts.init(document.getElementById('echarts4'));
157
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
158
+      var option = {
159
+
160
+        grid: {
161
+          left: '0%',
162
+          top: '1%',
163
+          right: '5%',
164
+          bottom: '0%',
165
+          containLabel: true
166
+        },
167
+        xAxis: [{
168
+          show: false,
169
+        }],
170
+        yAxis: [{
171
+          axisTick: 'none',
172
+          axisLine: 'none',
173
+          offset: '7',
174
+          axisLabel: {
175
+            textStyle: {
176
+              color: 'rgba(255,255,255,.9)',
177
+              fontSize: '0',
178
+            }
179
+          },
180
+          data: this.state.year
181
+        },
182
+        {
183
+          name: '单位:件',
184
+          nameGap: '50',
185
+          nameTextStyle: {
186
+            color: 'rgba(255,255,255,.6)',
187
+            fontSize: '16',
188
+          },
189
+          axisLine: {
190
+            lineStyle: {
191
+              color: 'rgba(0,0,0,0)'
192
+            }
193
+          },
194
+          data: [],
195
+        }],
196
+        series: [{
197
+          name: '条',
198
+          type: 'bar',
199
+          yAxisIndex: 0,
200
+          data: this.state.missionsIntensity_arr,
169
           label: {
201
           label: {
170
             normal: {
202
             normal: {
171
               show: true,
203
               show: true,
@@ -343,100 +375,7 @@ class LeftMenoyView extends Component {
343
             labelLine: {
375
             labelLine: {
344
               show: false
376
               show: false
345
             },
377
             },
346
-
347
-            data: [{
348
-              value: 205,
349
-              name: '碳酸锂',
350
-              itemStyle: {
351
-                normal: {
352
-                  color: {
353
-                    // 完成的圆环的颜色
354
-                    colorStops: [
355
-                      {
356
-                        offset: 0,
357
-                        color: 'rgba(141, 147, 255, 0.3)', // 0% 处的颜色
358
-                      },
359
-                      {
360
-                        offset: 1,
361
-                        color: 'rgba(141, 147, 255, 1)', // 100% 处的颜色
362
-                      },
363
-                    ],
364
-                  },
365
-                },
366
-              },
367
-            },
368
-            {
369
-              value: 310,
370
-              name: '氧化锂',
371
-              itemStyle: {
372
-                borderCap: 'round',
373
-
374
-                normal: {
375
-                  color: {
376
-                    // 完成的圆环的颜色
377
-                    colorStops: [
378
-                      {
379
-                        offset: 0,
380
-                        color: 'rgba(105, 255, 222, 0.3)', // 0% 处的颜色
381
-                      },
382
-                      {
383
-                        offset: 1,
384
-                        color: 'rgba(105, 255, 222, 1)', // 100% 处的颜色
385
-                      },
386
-                    ],
387
-                  },
388
-                },
389
-              },
390
-            },
391
-            {
392
-              value: 234,
393
-              name: '金属锂',
394
-              itemStyle: {
395
-                borderCap: 'round',
396
-
397
-                normal: {
398
-                  color: {
399
-                    // 完成的圆环的颜色
400
-                    colorStops: [
401
-                      {
402
-                        offset: 0,
403
-                        color: 'rgba(47, 210, 255, 0.3)', // 0% 处的颜色
404
-                      },
405
-                      {
406
-                        offset: 1,
407
-                        color: 'rgba(47, 210, 255, 1)', // 100% 处的颜色
408
-                      },
409
-                    ],
410
-                  },
411
-                },
412
-              },
413
-            },
414
-            {
415
-              value: 135,
416
-              name: '氢氧化锂',
417
-              itemStyle: {
418
-                borderCap: 'round',
419
-
420
-                normal: {
421
-                  barBorderRadius: 15,
422
-                  color: {
423
-                    // 完成的圆环的颜色
424
-                    colorStops: [
425
-                      {
426
-                        offset: 0,
427
-                        color: 'rgba(255, 206, 0, 0.3)', // 0% 处的颜色
428
-                      },
429
-                      {
430
-                        offset: 1,
431
-                        color: 'rgba(255, 206, 0, 1)', // 100% 处的颜色
432
-                      },
433
-                    ],
434
-                  },
435
-                },
436
-              },
437
-            },
438
-            ],
439
-
378
+            data: this.state.missionsIntensity_arr,
440
           },
379
           },
441
         ],
380
         ],
442
       };
381
       };
@@ -457,19 +396,20 @@ class LeftMenoyView extends Component {
457
     return (
396
     return (
458
       <div className={["eacharView cbLeftMenoyView"]}>
397
       <div className={["eacharView cbLeftMenoyView"]}>
459
         <div id="echarts6_box">
398
         <div id="echarts6_box">
460
-        <img
461
-              src={require("@assets/imgs/dataVimg/guanghuan.png").default}
462
-              alt=""
463
-              class="guanghuan animate__animated animate__pulse animate__infinite animate__slower"
464
-            />
399
+          <img
400
+            src={require("@assets/imgs/dataVimg/guanghuan.png").default}
401
+            alt=""
402
+            class="guanghuan animate__animated animate__pulse animate__infinite animate__slower"
403
+          />
465
 
404
 
466
           <div id="echarts6"></div>
405
           <div id="echarts6"></div>
467
         </div>
406
         </div>
468
         <ul className={"name_ul"}>
407
         <ul className={"name_ul"}>
469
-          <li>碳酸锂</li>
470
-          <li>氧化纳</li>
471
-          <li>金属锂</li>
472
-          <li>氢氧化钠</li>
408
+          {
409
+            this.state.year.map(x=>{
410
+              return (<li>x</li>)
411
+            })
412
+          }
473
         </ul>
413
         </ul>
474
         <div id="echarts4"></div>
414
         <div id="echarts4"></div>
475
       </div>
415
       </div>

+ 37 - 8
src/pages/tqcDataVHome/component/moodSendView.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 月度产量/发货量
2
  * @Author: dayan_hjm 月度产量/发货量
3
  * @Date: 2023-10-23 09:32:12 
3
  * @Date: 2023-10-23 09:32:12 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-01 14:58:29
5
+ * @Last Modified time: 2023-11-05 11:09:21
6
  */
6
  */
7
 
7
 
8
 
8
 
@@ -10,6 +10,9 @@ import React, { useState, useEffect, Component } from "react";
10
 import styles from "../style.less";
10
 import styles from "../style.less";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
12
 import mod from '../mod';
12
 import mod from '../mod';
13
+import {
14
+  twoService,
15
+} from "../api";
13
 
16
 
14
 @withRouter
17
 @withRouter
15
 
18
 
@@ -19,18 +22,36 @@ class MoodSendView extends Component {
19
     super(props, context);
22
     super(props, context);
20
     this.store = mod;
23
     this.store = mod;
21
     this.state = {
24
     this.state = {
25
+      proQty:[],
26
+      year:[],
27
+      deliveryQty:[],
22
     };
28
     };
23
   }
29
   }
24
 
30
 
25
   componentDidMount() {
31
   componentDidMount() {
26
-    this.setData();
32
+    this.getUrl()
27
   }
33
   }
28
 
34
 
35
+  async getUrl() {
36
+    await twoService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], proQty = [], deliveryQty = [];
39
+        data.map((x, i) => {
40
+          year.push(x.bMonth);
41
+          proQty.push(x.proQty)
42
+          deliveryQty.push(x.deliveryQty)
43
+        });
44
+        this.setState({ year, deliveryQty,proQty });
45
+        this.setData();
46
+      }
47
+    });
48
+
49
+  }
50
+
51
+
29
   setData() {
52
   setData() {
30
     setTimeout(() => {
53
     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];
54
       var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
33
-      var data2 = [120, 22, 141, 24, 29, 30, 30, 93, 49, 91, 90, 55, 34, 33, 77];
34
       var yMax = 500;
55
       var yMax = 500;
35
       var dataShadow = [];
56
       var dataShadow = [];
36
       for (var i = 0; i < data.length; i++) {
57
       for (var i = 0; i < data.length; i++) {
@@ -41,7 +62,15 @@ class MoodSendView extends Component {
41
           trigger: 'axis',
62
           trigger: 'axis',
42
           axisPointer: {
63
           axisPointer: {
43
             type: 'shadow'
64
             type: 'shadow'
44
-          }
65
+          },
66
+          borderColor:"rgba(105, 255, 222, 0.5)",
67
+          borderWidth:2,
68
+          padding:5,
69
+          textStyle:{
70
+            fontSize:12,
71
+            color:"#ededed"
72
+          },
73
+          backgroundColor:"#0000008a"
45
         },
74
         },
46
         legend: {
75
         legend: {
47
           data: ['发货量', '产量'],
76
           data: ['发货量', '产量'],
@@ -86,7 +115,7 @@ class MoodSendView extends Component {
86
           {
115
           {
87
             type: 'category',
116
             type: 'category',
88
             axisTick: { show: false },
117
             axisTick: { show: false },
89
-            data: ['2月', '3月', '4月', '5月', '6月'],
118
+            data: this.state.year,
90
             axisLabel: {
119
             axisLabel: {
91
               /*inside: true,*/
120
               /*inside: true,*/
92
               color: "rgba(255,255,255,.6)",
121
               color: "rgba(255,255,255,.6)",
@@ -160,7 +189,7 @@ class MoodSendView extends Component {
160
               ])
189
               ])
161
             },
190
             },
162
 
191
 
163
-            data: [220, 182, 191, 234, 290]
192
+            data:this.state.proQty
164
           },
193
           },
165
           {
194
           {
166
             name: '发货量',
195
             name: '发货量',
@@ -184,7 +213,7 @@ class MoodSendView extends Component {
184
                 { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
213
                 { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
185
               ])
214
               ])
186
             },
215
             },
187
-            data: [320, 332, 301, 334, 390]
216
+            data: this.state.deliveryQty
188
           }
217
           }
189
         ]
218
         ]
190
       }
219
       }

+ 27 - 6
src/pages/tqcDataVHome/component/oneQualified.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 一次合格率
2
  * @Author: dayan_hjm 一次合格率
3
  * @Date: 2023-10-23 09:32:12 
3
  * @Date: 2023-10-23 09:32:12 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-10-23 16:09:39
5
+ * @Last Modified time: 2023-11-05 11:13:22
6
  */
6
  */
7
 
7
 
8
 
8
 
@@ -10,6 +10,9 @@ import React, { useState, useEffect, Component } from "react";
10
 import styles from "../style.less";
10
 import styles from "../style.less";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
12
 import mod from '../mod';
12
 import mod from '../mod';
13
+import {
14
+  twoService,
15
+} from "../api";
13
 
16
 
14
 @withRouter
17
 @withRouter
15
 
18
 
@@ -19,13 +22,32 @@ class BottomLineForSend extends Component {
19
     super(props, context);
22
     super(props, context);
20
     this.store = mod;
23
     this.store = mod;
21
     this.state = {
24
     this.state = {
25
+      targeRate:[],
26
+      year:[],
27
+      qcRate:[],
22
     };
28
     };
23
   }
29
   }
24
 
30
 
25
   componentDidMount() {
31
   componentDidMount() {
26
-    this.setData();
32
+    this.getUrl()
27
   }
33
   }
28
 
34
 
35
+  async getUrl() {
36
+    await twoService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], qcRate = [], targeRate = [];
39
+        data.map((x, i) => {
40
+          year.push(x.bMonth);
41
+          qcRate.push(x.qcRate)
42
+          targeRate.push(x.targeRate)
43
+        });
44
+        this.setState({ year, targeRate,qcRate });
45
+        this.setData();
46
+      }
47
+    });
48
+  }
49
+
50
+  
29
   setData() {
51
   setData() {
30
     setTimeout(() => {
52
     setTimeout(() => {
31
       // 基于准备好的dom,初始化echarts实例
53
       // 基于准备好的dom,初始化echarts实例
@@ -64,8 +86,7 @@ class BottomLineForSend extends Component {
64
         "xAxis": [
86
         "xAxis": [
65
           {
87
           {
66
             "type": "category",
88
             "type": "category",
67
-
68
-            data: ['2月', '3月', '4月', '5月', '6月'],
89
+            data: this.state.year,
69
             axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
90
             axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
70
             axisLabel: {
91
             axisLabel: {
71
               textStyle: { color: "rgba(255,255,255,.7)", fontSize: '12', },
92
               textStyle: { color: "rgba(255,255,255,.7)", fontSize: '12', },
@@ -112,7 +133,7 @@ class BottomLineForSend extends Component {
112
           {
133
           {
113
             "name": "目标一次及格率",
134
             "name": "目标一次及格率",
114
             "type": "line",
135
             "type": "line",
115
-            "data": [66, 16.8, 1.33, 12.65],
136
+            data: this.state.targeRate,
116
             lineStyle: {
137
             lineStyle: {
117
               normal: {
138
               normal: {
118
                 width: 2
139
                 width: 2
@@ -129,7 +150,7 @@ class BottomLineForSend extends Component {
129
           {
150
           {
130
             "name": "实际一次及格率",
151
             "name": "实际一次及格率",
131
             "type": "line",
152
             "type": "line",
132
-            "data": [0, 11.48, 18.00, 25.65],
153
+            data: this.state.qcRate,
133
             lineStyle: {
154
             lineStyle: {
134
               normal: {
155
               normal: {
135
                 width: 2
156
                 width: 2

+ 4 - 0
src/pages/tqcDataVHome/mod.js

@@ -14,6 +14,10 @@ import { message } from 'antd';
14
 
14
 
15
 // 默认状态
15
 // 默认状态
16
 const defaultState = {
16
 const defaultState = {
17
+  totalValue:0,
18
+  yearDecline:0,
19
+  yearSend:0,
20
+  productInventory:0,
17
   list:[{name:'营运数据大屏'},{name:'经营大盘'},{name:'到家专题'},{name:'门店大盘'},{name:'自助跑数SQL平台'},{name:'月度包材预警跑数模板'}],
21
   list:[{name:'营运数据大屏'},{name:'经营大盘'},{name:'到家专题'},{name:'门店大盘'},{name:'自助跑数SQL平台'},{name:'月度包材预警跑数模板'}],
18
   rightlist:[],
22
   rightlist:[],
19
   bumen:'数字化中心/数据工程部',
23
   bumen:'数字化中心/数据工程部',

+ 62 - 12
src/pages/tqcDataVHome/view.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 
2
  * @Author: dayan_hjm 
3
  * @Date: 2023-10-25 10:32:44 
3
  * @Date: 2023-10-25 10:32:44 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-01 16:03:12
5
+ * @Last Modified time: 2023-11-05 11:14:56
6
  */
6
  */
7
 /*
7
 /*
8
  * @Author: dayan_hjm 
8
  * @Author: dayan_hjm 
@@ -24,6 +24,11 @@ import LeftMenoyView from "./component/leftMenoyView.jsx";
24
 import RightBottomView from "./component/rightBottomView.jsx";
24
 import RightBottomView from "./component/rightBottomView.jsx";
25
 import OneQualified from "./component/oneQualified.jsx";
25
 import OneQualified from "./component/oneQualified.jsx";
26
 import MapView from "./component/mapView.jsx";
26
 import MapView from "./component/mapView.jsx";
27
+import {
28
+  timeService,
29
+  numberService,
30
+} from "./api";
31
+
27
 import 'animate.css';
32
 import 'animate.css';
28
 @withRouter
33
 @withRouter
29
 
34
 
@@ -54,8 +59,9 @@ class Home extends Component {
54
 
59
 
55
   componentDidMount() {
60
   componentDidMount() {
56
     this.fontMsgChange();
61
     this.fontMsgChange();
62
+    this.getUrl();
63
+    this.getUrl2()
57
     setTimeout(() => {
64
     setTimeout(() => {
58
-      $(".shu1").numScroll();
59
       this.videoStart();
65
       this.videoStart();
60
     }, 200)
66
     }, 200)
61
     setTimeout(() => {
67
     setTimeout(() => {
@@ -119,6 +125,50 @@ class Home extends Component {
119
 
125
 
120
   }
126
   }
121
 
127
 
128
+  async getUrl(){
129
+    await timeService().then(({ data=[], resultCode }) => {
130
+      if (+resultCode === 0) {
131
+        let plannedCompletionData = [],manHourData = [];
132
+        data.map((x,i)=>{
133
+          if(x.indexName == '产量计划完成率'){
134
+            plannedCompletionData.push({
135
+              name:x.factoryName,
136
+              value:x.indexValue*100,
137
+            })
138
+          }else{
139
+            manHourData.push({
140
+              name:x.factoryName,
141
+              value:x.indexValue*100,
142
+            })
143
+          }
144
+        });
145
+        this.setState({plannedCompletionData,manHourData,plannedCompletionNum:1,manHourNum:1});
146
+      }
147
+    });
148
+  }
149
+  async getUrl2(){
150
+    await numberService().then(({ data=[], resultCode }) => {
151
+      if (+resultCode === 0) {
152
+        let totalValue = 0,yearDecline = 0,yearSend=0,productInventory=0;
153
+        data.map((x,i)=>{
154
+          if(x.indexName == '产值'){
155
+            totalValue = x.indexValue
156
+          }else if(x.indexName == '年度产量'){
157
+            yearDecline = x.indexValue
158
+          }else if(x.indexName == '产品库存'){
159
+            yearSend = x.indexValue
160
+          }else if(x.indexName == '年度产量'){
161
+            productInventory = x.indexValue
162
+          }
163
+        });
164
+        this.store.saveState({totalValue,yearDecline,yearSend,productInventory});
165
+        setTimeout(() => {
166
+          $(".shu1").numScroll();
167
+        }, 2500)
168
+      }
169
+    });
170
+  }
171
+
122
   componentDidCatch(){
172
   componentDidCatch(){
123
     clearInterval(this.timer);
173
     clearInterval(this.timer);
124
     this.timer = null;
174
     this.timer = null;
@@ -148,8 +198,8 @@ class Home extends Component {
148
 
198
 
149
   render() {
199
   render() {
150
     const stores = this.store.state;
200
     const stores = this.store.state;
151
-    const { changGif,plannedCompletionData } = this.state;
152
-
201
+    const {totalValue,yearDecline,yearSend,productInventory} = this.store.state;
202
+    let { changGif,plannedCompletionData, } = this.state;
153
     return (
203
     return (
154
       <div className={"home_box"}>
204
       <div className={"home_box"}>
155
         {/* 视频播放器 */}
205
         {/* 视频播放器 */}
@@ -164,7 +214,7 @@ class Home extends Component {
164
               <div className="topMsg">
214
               <div className="topMsg">
165
                 <p className="topMsg_title">总产值</p>
215
                 <p className="topMsg_title">总产值</p>
166
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
216
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
167
-                  <span className="topMsg_number" class="shu1">232425.23</span><span className="topMsg_number_2">万元</span>
217
+                  <span className="topMsg_number" class="shu1">{totalValue}</span><span className="topMsg_number_2">万元</span>
168
                 </div>
218
                 </div>
169
               </div>
219
               </div>
170
             </div>
220
             </div>
@@ -196,20 +246,20 @@ class Home extends Component {
196
                   <div className="topMsg_content">
246
                   <div className="topMsg_content">
197
                     <div className="center_li">
247
                     <div className="center_li">
198
                       <div className="right_li">
248
                       <div className="right_li">
199
-                        <span className="topMsg_number" class="shu1">232425</span>
249
+                        <span className="topMsg_number" class="shu1">{yearDecline}</span>
200
                         <p className="topMsg_line"></p>
250
                         <p className="topMsg_line"></p>
201
                         <span className="topMsg_tip">年度产量/吨</span>
251
                         <span className="topMsg_tip">年度产量/吨</span>
202
                       </div>
252
                       </div>
203
                     </div>
253
                     </div>
204
                     <div className="center_li">
254
                     <div className="center_li">
205
                       <div className="right_li">
255
                       <div className="right_li">
206
-                        <span className="topMsg_number" class="shu1">32425</span>
256
+                        <span className="topMsg_number" class="shu1">{yearSend}</span>
207
                         <p className="topMsg_line"></p>
257
                         <p className="topMsg_line"></p>
208
                         <span className="topMsg_tip">年度发货量/吨</span>
258
                         <span className="topMsg_tip">年度发货量/吨</span>
209
                       </div>
259
                       </div>
210
                     </div>
260
                     </div>
211
                     <div className="center_li">
261
                     <div className="center_li">
212
-                      <span className="topMsg_number" class="shu1">13456</span>
262
+                      <span className="topMsg_number" class="shu1">{productInventory}</span>
213
                       <p className="topMsg_line"></p>
263
                       <p className="topMsg_line"></p>
214
                       <span className="topMsg_tip">产品库存/吨</span>
264
                       <span className="topMsg_tip">产品库存/吨</span>
215
                     </div>
265
                     </div>
@@ -235,8 +285,8 @@ class Home extends Component {
235
                 <p className="topMsg_title">百万工时损工率</p>
285
                 <p className="topMsg_title">百万工时损工率</p>
236
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
286
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
237
                   <div className="topMsg_box">
287
                   <div className="topMsg_box">
238
-                    <span className="topMsg_number" class="shu1">232425.23</span><span className="topMsg_number_2">%</span>
239
-                    <p className="topMsg_number_p">谢洪</p>
288
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
289
+                    <p className="topMsg_number_p"></p>
240
                   </div>
290
                   </div>
241
                 </div>
291
                 </div>
242
               </div>
292
               </div>
@@ -256,8 +306,8 @@ class Home extends Component {
256
                 <p className="topMsg_title">产量计划完成率</p>
306
                 <p className="topMsg_title">产量计划完成率</p>
257
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox">
307
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox">
258
                   <div className="topMsg_box">
308
                   <div className="topMsg_box">
259
-                    <span className="topMsg_number" class="shu1">78.1</span><span className="topMsg_number_2">%</span>
260
-                    <p className="topMsg_number_p">谢洪</p>
309
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
310
+                    <p className="topMsg_number_p"></p>
261
                   </div>
311
                   </div>
262
                 </div>
312
                 </div>
263
               </div>
313
               </div>

+ 0 - 15
src/utils/request.js

@@ -129,21 +129,6 @@ export default function (option) {
129
   let relationship = JSON.parse(sessionStorage.getItem("nodeData") || "{}");
129
   let relationship = JSON.parse(sessionStorage.getItem("nodeData") || "{}");
130
   option.headers = option.headers || {};
130
   option.headers = option.headers || {};
131
   option.headers["token"] = localStorage.getItem("token") || sessionStorage.getItem("token");
131
   option.headers["token"] = localStorage.getItem("token") || sessionStorage.getItem("token");
132
-
133
-  //大屏参数 -------start
134
-  //碳排放
135
-  const token_1 = '19c3cdb58b80e44f2490b8eba3b7f938';
136
-
137
-  instance.defaults.headers.common["sign"] = token_1;
138
-  instance.defaults.headers.common["account"] = "yunxi_fuxue";
139
-  instance.defaults.headers.common["apiId"] = "1356250396177503367";
140
-  instance.defaults.headers.common["Cache-Control"] = "no-cache";
141
-  instance.defaults.headers.common["appKey"] = "200000134";
142
-  instance.defaults.headers.common["execType"] = "3";
143
-  instance.defaults.headers.common["env"] = "PROD";
144
-
145
-  //大屏参数 -------end
146
-
147
   option.headers["visitId"] = sessionStorage.getItem("unionId");
132
   option.headers["visitId"] = sessionStorage.getItem("unionId");
148
   option.headers["pageId"] = relationship.pageId;
133
   option.headers["pageId"] = relationship.pageId;
149
   option.headers["resourceId"] = sessionStorage.getItem("curNodeId");
134
   option.headers["resourceId"] = sessionStorage.getItem("curNodeId");