Parcourir la source

feat: FIK大屏

@dayan_hjm il y a 1 an
Parent
commit
b5a3fd2093

+ 2 - 2
config/webpack.dev.js

@@ -136,14 +136,14 @@ module.exports = merge(common, {
136 136
         // target: "http://47.96.100.195:9081"
137 137
         // target: "http://dataportal-test.agile.com.cn:8081"
138 138
         // target: "http://10.8.8.173:9081",
139
-        target:"http://dms.dataportal.tianqilithium.com:9000",
139
+        target:"https://dms.dataportal.tianqilithium.com:9000",
140 140
         changeOrigin:true,
141 141
 
142 142
       },
143 143
       "/dataengine-center-oneservice": {
144 144
         // target: "http://10.8.8.185:31233",
145 145
         // target: "http://10.8.8.173:9081",
146
-        target:"http://dms.dataportal.tianqilithium.com:9000",
146
+        target:"https://dms.dataportal.tianqilithium.com:9000",
147 147
         changeOrigin:true,
148 148
       },
149 149
       "/mock":{

+ 18 - 1
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: 2024-07-21 17:58:15
5
+ * @Last Modified time: 2024-10-14 17:23:10
6 6
  */
7 7
 
8 8
 @import url("../../themes/themes.less");
@@ -13,6 +13,16 @@
13 13
     font-family: 'DingTalkJinBuTi', "DingTalkSans";
14 14
   }
15 15
 
16
+  #echarts7 {
17
+    min-width: 600px;
18
+    width: 95%;
19
+    height: 90%;
20
+    >div{
21
+      text-align: left;
22
+    }
23
+  }
24
+
25
+
16 26
   .hidetip {
17 27
     display: none;
18 28
   }
@@ -576,6 +586,13 @@
576 586
           height: 40%;
577 587
         }
578 588
 
589
+        #onesendbox {
590
+          min-width: 300px;
591
+          width: 90%;
592
+          height: 100%;
593
+        }
594
+
595
+
579 596
         .bottomContent {
580 597
           width: 100%;
581 598
           height: 100%;

+ 2 - 2
src/pages/frame/component/modelMsg/view.jsx

@@ -3,7 +3,7 @@
3 3
  * @Date: 2022-11-02 17:24:37 
4 4
  * @Last Modified by: dayan_hjm
5 5
  * @Last Modified time: 2023-09-06 17:33:24
6
- * @Last Modified time: 2023-12-19 14:38:50
6
+ * @Last Modified time: 2024-10-14 14:49:19
7 7
  */
8 8
 
9 9
 import React, { useEffect, useState, useRef, Component } from "react";
@@ -53,7 +53,7 @@ export default class extends Component {
53 53
     this.pcLogin();
54 54
     this.props.history.listen((route, data) => {
55 55
       // 大屏切换地址改名称
56
-      this.props.changeName(route["pathname"].indexOf("gvc") > -1 ? "产供销价值链" : "运营数据中心")
56
+      this.props.changeName(route["pathname"].indexOf("gvc") > -1 ? "产供销价值链" : (route["pathname"].indexOf("tlk") > -1 ? "TLK运营数据中心 / TLK Plant Dashboard" : "运营数据中心"))
57 57
       this.setState({ showTips: false });
58 58
       let activeTree = utils.findNodeTree([...$store.sysMenu.norList, ...$store.sysMenu.menuList], route.pathname, "resourceUrl");
59 59
       //调取当前栏目的通知 

+ 1 - 0
src/pages/frame/view.jsx

@@ -150,6 +150,7 @@ export default observer(function Frame(props) {
150 150
   const name_arr = {
151 151
     "#/home/gvc": "产供销价值链",
152 152
     "#/home/operation": "运营数据中心",
153
+    "#/home/tlk": "TLK运营数据中心 / TLK Plant Dashboard",
153 154
   }
154 155
   const [titleName, setTitleName] = useState(name_arr[window.location.hash]);
155 156
 

+ 2 - 2
src/pages/jurisDiction/view.jsx

@@ -32,7 +32,7 @@ class JrisDiction extends Component {
32 32
   componentWillMount() { 
33 33
     let searchInstance = queryToObj(); // url查询参数对象化
34 34
     if(window.location.host.indexOf("localhost") > -1){
35
-      this.props.history.replace(searchInstance?.type == 1 ? "/home/operation" : "/home/gvc");
35
+      this.props.history.replace(searchInstance?.type == 1 ? "/home/operation" : (searchInstance?.type == 3 ? "/home/tlk" : "/home/gvc"));
36 36
     }else 
37 37
     if(searchInstance?.token){
38 38
       this.getUrl(searchInstance?.token);
@@ -50,7 +50,7 @@ class JrisDiction extends Component {
50 50
       sessionStorage.setItem("tqcVToken",token)
51 51
       if (data?.userId) {
52 52
         let searchInstance = queryToObj(); // url查询参数对象化
53
-        this.props.history.replace(searchInstance?.type == 1 ? "/home/operation" : "/home/gvc");
53
+        this.props.history.replace(searchInstance?.type == 1 ? "/home/operation" : (searchInstance?.type == 3 ? "/home/tlk" : "/home/gvc"));
54 54
         // this.props.history.push('/')
55 55
       } else {
56 56
         debugger

+ 232 - 0
src/pages/tlk/api.js

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

+ 245 - 0
src/pages/tlk/component/bottomLineForSend.jsx

@@ -0,0 +1,245 @@
1
+/*
2
+ * @Author: dayan_hjm 近30天产量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 17:29:25
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
+import {
14
+  mondService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class BottomLineForSend extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      factoryProdcution_arr: [],
26
+      missionsIntensity_arr: [],
27
+      year: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+  async getUrl() {
35
+    await mondService().then(({ data = [], resultCode }) => {
36
+      if (+resultCode === 0) {
37
+        let year = [], missionsIntensity_arr = [], factoryProdcution_arr = [];
38
+        data.map((x, i) => {
39
+          const name_ = x.indexDate.split('-')[1] + '-' + x.indexDate.split('-')[2];
40
+          year.push(name_);
41
+          missionsIntensity_arr.push(x.indexValue);
42
+          factoryProdcution_arr.push(x.factoryProdcution)
43
+        });
44
+        this.setState({ year, missionsIntensity_arr, factoryProdcution_arr });
45
+        this.setData();
46
+      }
47
+    });
48
+
49
+  }
50
+
51
+  setData() {
52
+    setTimeout(() => {
53
+      // 基于准备好的dom,初始化echarts实例
54
+      var myChart = echarts.init(document.getElementById('echarts2'));
55
+
56
+      var option = {
57
+        tooltip: {
58
+          trigger: 'axis',
59
+          axisPointer: { type: 'shadow' },
60
+          borderColor: "rgba(105, 255, 222, 0.5)",
61
+          borderWidth: 2,
62
+          padding: 5,
63
+          className: 'dyLeft',
64
+          textStyle: {
65
+            fontSize: 12,
66
+            textAlign: "left",
67
+            color: "#ededed"
68
+          },
69
+          backgroundColor: "#0000008a",
70
+        },
71
+        // formatter: `日期: {b0}<br />{a0}: {c0}吨<br />{a1}: {c1}吨`,
72
+        grid: {
73
+          left: '5%',
74
+          top: '15%',
75
+          right: '4%',
76
+          bottom: '10%',
77
+          containLabel: true
78
+        },
79
+        legend: {
80
+          data: ['日产量(Daily Net Prodution)', '日产量趋势( Daily Net Production Trends)', "平均产量(Average Net Production)"],
81
+          fontFamily: 'DingTalkJinBuTi',
82
+          padding: [5, 0, 40, 0],
83
+          textStyle: {
84
+            color: "#CDF1FF",
85
+            fontSize: 10
86
+          },
87
+          itemWidth: 8,
88
+          itemHeight: 8,
89
+        },
90
+
91
+        xAxis: [{
92
+          type: 'category',
93
+          // boundaryGap: ['20%', '20%'],
94
+          axisLabel: {
95
+            interval: 0,
96
+            rotate: -60,
97
+            textStyle: {
98
+              color: '#7d7d7d',
99
+              fontSize: 11,
100
+            },
101
+            showMaxLabel: true,//关键部分,显示最后一个label
102
+          },
103
+          axisLine: {
104
+            lineStyle: {
105
+              color: 'rgba(255,255,255,.1)',
106
+              type: 'dashed',
107
+
108
+            }
109
+          },
110
+          splitLine: {
111
+            show: true,
112
+            lineStyle: {
113
+              color: '#3b3b3b',
114
+              type: 'dashed',
115
+            }
116
+          },
117
+          data: this.state.year
118
+        }, {
119
+
120
+          axisPointer: { show: false },
121
+          axisLine: { show: false },
122
+          position: 'bottom',
123
+          offset: 20,
124
+
125
+
126
+
127
+        }],
128
+
129
+        yAxis: [{
130
+          type: 'value',
131
+          axisTick: { show: false },
132
+          // splitNumber: 6,
133
+          axisLine: {
134
+            lineStyle: {
135
+              color: 'rgba(255,255,255,.1)'
136
+            },
137
+          },
138
+          axisLabel: {
139
+            formatter: "{value} 吨",
140
+            textStyle: {
141
+              color: '#7d7d7d',
142
+              fontSize: 13
143
+            },
144
+          },
145
+
146
+          splitLine: {
147
+            lineStyle: {
148
+              color: 'rgba(255,255,255,.1)'
149
+            }
150
+          }
151
+        }],
152
+        series: [
153
+          {
154
+            name: '日产量(Daily Net Prodution)',
155
+            type: 'line',
156
+            smooth: true,
157
+            symbol: 'circle',
158
+            symbolSize: 5,
159
+            showSymbol: false,
160
+            lineStyle: {
161
+              normal: {
162
+                color: '#69FFDE',
163
+                width: 2
164
+              }
165
+            },
166
+            areaStyle: {
167
+              normal: {
168
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
169
+                  offset: 0,
170
+                  color: 'rgba(0, 255, 182, 0.5)'
171
+                }, {
172
+                  offset: 1,
173
+                  color: 'rgba(0, 255, 182, 0)'
174
+                }], false),
175
+                shadowColor: 'rgba(0, 0, 0, 0.1)',
176
+              }
177
+            },
178
+            itemStyle: {
179
+              normal: {
180
+                color: 'rgba(0, 255, 182, 0.3)',
181
+                borderWidth: 12
182
+              }
183
+            },
184
+            data: this.state.missionsIntensity_arr,
185
+            "smooth": true
186
+          },
187
+          {
188
+            name: '日产量趋势( Daily Net Production Trends)',
189
+            type: 'line',
190
+            smooth: true,
191
+            showSymbol: false,
192
+            itemStyle: {
193
+              color: '#FFCE00'
194
+            },
195
+            lineStyle: {
196
+              normal: {
197
+                color: '#FFCE00',
198
+                width: 2
199
+              }
200
+            },
201
+            data: [445, 89, 34, 357, 234, 333, 566, 443, 233, 444, 445, 889, 34, 367, 234, 333, 566, 443, 233, 444],//this.state.factoryProdcution_arr,
202
+          },
203
+          {
204
+            name: '平均产量(Average Net Production)',
205
+            type: 'line',
206
+            smooth: true,
207
+            symbol: 'circle',
208
+            symbolSize: 5,
209
+            showSymbol: false,
210
+            lineStyle: {
211
+              normal: {
212
+                color: '#8D93FF',
213
+                width: 2
214
+              }
215
+            },
216
+            itemStyle: {
217
+              normal: {
218
+                color: '#8D93FF',
219
+                borderColor: '#8D93FF',
220
+                borderWidth: 12
221
+              }
222
+            },
223
+            data: [889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889,],//this.state.factoryProdcution_arr,
224
+            "smooth": true
225
+          },
226
+        ]
227
+      };
228
+      // 使用刚指定的配置项和数据显示图表。
229
+      myChart.setOption(option);
230
+      window.addEventListener("resize", function () {
231
+        myChart.resize();
232
+      });
233
+    }, 3000)
234
+  }
235
+
236
+  render() {
237
+
238
+    return (
239
+      <div className={["eacharView cbBottomLineForSend"]}>
240
+        <div id="echarts2"></div>
241
+      </div>
242
+    )
243
+  }
244
+}
245
+export default BottomLineForSend;

+ 412 - 0
src/pages/tlk/component/leftMenoyView.jsx

@@ -0,0 +1,412 @@
1
+/*
2
+ * @Author: dayan_hjm 库存金额
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 16:31:03
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
+import { getArrMax } from "@utils/util";
14
+import { getThousandNum } from "@utils/util";
15
+import {
16
+  momeyService,
17
+} from "../api";
18
+
19
+@withRouter
20
+
21
+class LeftMenoyView extends Component {
22
+  // 构造函数,组件的实例创建时,最先执行
23
+  constructor(props, context) {
24
+    super(props, context);
25
+    this.store = mod;
26
+    this.state = {
27
+      max1:[],
28
+      year:["氢氧化锂(电池级)/ LHM(BG)","氢氧化锂(工业级)/ LHM(PG)",'氢氧化锂(待检验)/ LHM(PENDING)'],
29
+      missionsIntensity_arr:[
30
+        {value:0,name:"氢氧化锂(电池级)/ LHM(BG)"},
31
+        {value:0,name:"氢氧化锂(工业级)/ LHM(PG)"},
32
+        {value:0,name:'氢氧化锂(待检验)/ LHM(PENDING)'},
33
+      ],
34
+    };
35
+  }
36
+
37
+  componentDidMount() {
38
+    this.getUrl()
39
+  }
40
+
41
+  async getUrl() {
42
+    let data_style= [{
43
+            value: 25, name: '', itemStyle: {
44
+              normal: {
45
+                // barBorderRadius: 15,
46
+                // borderColor: "rgba(141, 147, 255, 1)",
47
+                // borderWidth: 1,
48
+                color: {
49
+                  // 完成的圆环的颜色
50
+                  colorStops: [
51
+                    {
52
+                      offset: 0,
53
+                      color: '#8D93FF', // 0% 处的颜色
54
+                    },
55
+                    {
56
+                      offset: 1,
57
+                      color: '#8D93FF', // 100% 处的颜色
58
+                    },
59
+                  ],
60
+                },
61
+              },
62
+            },
63
+
64
+          }, {
65
+            value: 33, name: '', itemStyle: {
66
+              normal: {
67
+                // barBorderRadius: 15,
68
+                // borderColor: "rgba(105, 255, 222, 1)",
69
+                // borderWidth: 1,
70
+
71
+                color: {
72
+                  // 完成的圆环的颜色
73
+                  colorStops: [
74
+                    {
75
+                      offset: 0,
76
+                      color: '#FFCE00', // 0% 处的颜色
77
+                    },
78
+                    {
79
+                      offset: 1,
80
+                      color: '#FFCE00', // 100% 处的颜色
81
+                    },
82
+                  ],
83
+                },
84
+              },
85
+            },
86
+
87
+          }, {
88
+            value: 35, name: '', itemStyle: {
89
+              normal: {
90
+                // barBorderRadius: 15,
91
+                // borderColor: "rgba(47, 210, 255, 1)",
92
+                // borderWidth: 1,
93
+
94
+                color: {
95
+                  // 完成的圆环的颜色
96
+                  colorStops: [
97
+                    {
98
+                      offset: 0,
99
+                      color: '#69FFDE', // 0% 处的颜色
100
+                    },
101
+                    {
102
+                      offset: 1,
103
+                      color: '#69FFDE', // 100% 处的颜色
104
+                    },
105
+                  ],
106
+                },
107
+              },
108
+            },
109
+
110
+          }, {
111
+            value: 40, name: '', itemStyle: {
112
+              normal: {
113
+                // barBorderRadius: 15,
114
+                // borderColor: "rgba(255, 206, 0, 1)",
115
+                // borderWidth: 1,
116
+
117
+                color: {
118
+                  // 完成的圆环的颜色
119
+                  colorStops: [
120
+                    {
121
+                      offset: 0,
122
+                      color: '#8D93FF', // 0% 处的颜色
123
+                    },
124
+                    {
125
+                      offset: 1,
126
+                      color: '#8D93FF', // 100% 处的颜色
127
+                    },
128
+                  ],
129
+                },
130
+              },
131
+            },
132
+
133
+          }]
134
+    await momeyService().then(({ data = [], resultCode }) => {
135
+      
136
+      if (+resultCode === 0) {
137
+        let year = [], missionsIntensity_arr = [],max1=[],num=[];
138
+        data.map((x, i) => {
139
+          if(i > 2){return}
140
+          num.push(x.indexValue)
141
+          // year.unshift(x.prodCatgory);
142
+          data_style[i].value = x.indexValue;
143
+          data_style[i].name =  this.state.year[i]// x.prodCatgory;
144
+          missionsIntensity_arr.push(data_style[i])
145
+        });
146
+        const max_1 = getArrMax(num);
147
+        for (let index = 0; index < data.length; index++) {
148
+          if(index > 2){break}
149
+          max1.unshift(max_1/0.7)
150
+        }
151
+        this.setState({  missionsIntensity_arr,max1 });
152
+        this.setData();
153
+        this.setData2();
154
+      }
155
+    });
156
+
157
+  }
158
+
159
+
160
+  setData() {
161
+    setTimeout(() => {
162
+      // 基于准备好的dom,初始化echarts实例
163
+      var myChart = echarts.init(document.getElementById('echarts4'));
164
+      var option = {
165
+
166
+        grid: {
167
+          left: '0%',
168
+          top: '4%',
169
+          right: '5%',
170
+          bottom: '0%',
171
+          containLabel: true
172
+        },
173
+        xAxis: [{
174
+          show: false,
175
+        }],
176
+        yAxis: [{
177
+          axisTick: 'none',
178
+          axisLine: 'none',
179
+          offset: '7',
180
+          axisLabel: {
181
+            textStyle: {
182
+              color: 'rgba(255,255,255,.9)',
183
+              fontSize: '0',
184
+            }
185
+          },
186
+          data: this.state.year
187
+        },
188
+        {
189
+          name: '单位:件',
190
+          nameGap: '50',
191
+          nameTextStyle: {
192
+            color: 'rgba(255,255,255,.6)',
193
+            fontSize: '16',
194
+          },
195
+          axisLine: {
196
+            lineStyle: {
197
+              color: 'rgba(0,0,0,0)'
198
+            }
199
+          },
200
+          data: [],
201
+        }],
202
+        series: [{
203
+          name: '条',
204
+          type: 'bar',
205
+          yAxisIndex: 0,
206
+          data: this.state.missionsIntensity_arr,
207
+          label: {
208
+            normal: {
209
+              show: true,
210
+              position: 'right',
211
+              formatter: function (param) {
212
+                return getThousandNum(param.value) + '万元';
213
+                // return param.name+":"+param.value + '万元';
214
+
215
+              },
216
+              textStyle: {
217
+                color: '#CDF1FF',
218
+                fontSize: '10',
219
+              }
220
+            }
221
+          },
222
+          barWidth: 15,
223
+          itemStyle: {
224
+            normal: {
225
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
226
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
227
+                { offset: 0.7, color: '#ffd01d94' },
228
+                { offset: 1, color: '#ffd01d94' },
229
+              ]),
230
+              barBorderRadius: 15,
231
+              // borderColor: "rgba(255, 206, 0, 1)",
232
+              // borderWidth: 1
233
+            }
234
+          },
235
+          labelLine: {
236
+            length: 10,
237
+            length2: 50,
238
+          },
239
+          labelLayout: {
240
+            x: "20%",
241
+            y: "20%",
242
+            verticalAlign: "bottom",
243
+            dy: -10,
244
+          },
245
+          z: 2
246
+        }, {
247
+          name: '白框',
248
+          type: 'bar',
249
+          yAxisIndex: 1,
250
+          barGap: '-100%',
251
+          data: this.state.max1,
252
+          barWidth: 15,
253
+          itemStyle: {
254
+            normal: {
255
+              color: '#ffffff24',
256
+              barBorderRadius: 15,
257
+
258
+            }
259
+          },
260
+          z: 1
261
+        }]
262
+      };
263
+
264
+
265
+      // 使用刚指定的配置项和数据显示图表。
266
+      myChart.setOption(option);
267
+      window.addEventListener("resize", function () {
268
+        myChart.resize();
269
+      });
270
+    }, 3000)
271
+  }
272
+
273
+  setData2() {
274
+    setTimeout(() => {
275
+      // 基于准备好的dom,初始化echarts实例
276
+      var myChart = echarts.init(document.getElementById('echarts6'));
277
+      let index = 0;
278
+      function fun() {
279
+        var timer = setInterval(function () {
280
+          myChart.dispatchAction({
281
+            type: 'hideTip',
282
+            seriesIndex: 0,
283
+            dataIndex: index,
284
+          });
285
+          // 显示提示框
286
+          myChart.dispatchAction({
287
+            type: 'showTip',
288
+            seriesIndex: 0,
289
+            dataIndex: index,
290
+          });
291
+          // 取消高亮指定的数据图形
292
+          myChart.dispatchAction({
293
+            type: 'downplay',
294
+            seriesIndex: 0,
295
+            dataIndex: index == 0 ? 3 : index - 1,
296
+          });
297
+          myChart.dispatchAction({
298
+            type: 'highlight',
299
+            seriesIndex: 0,
300
+            dataIndex: index,
301
+          });
302
+          index++;
303
+          if (index >= 4) {
304
+            index = 0;
305
+          }
306
+        }, 2000);
307
+      }
308
+      // fun();
309
+      // setTimeout(function () {
310
+      //   fun();
311
+      // }, 3000);
312
+      var option = {
313
+        // //标题
314
+        // title: {
315
+        //   text: '16%',
316
+        //   subtext: '氢氧化锂',
317
+        //   x: 'center',
318
+        //   y: '40%',
319
+        //   textStyle: {
320
+        //     color: '#fff',
321
+        //     fontSize: 20,
322
+        //     lineHeight: 10,
323
+        //   },
324
+        //   subtextStyle: {
325
+        //     color: 'rgba(205, 241, 255, 1)',
326
+        //     fontSize: 14,
327
+        //     lineHeight: 10,
328
+        //     marginTop: 15,
329
+        //   },
330
+        // },
331
+
332
+        //图例组件
333
+
334
+        tooltip: {
335
+          trigger: 'item',
336
+          position: ['50%', '50%'],
337
+          formatter: function (params, ticket, callback) {
338
+            // $.get('detail?name=' + params.name, function (content) {
339
+            //   callback(ticket, toHTML(content));
340
+            // });
341
+            return `<div class="testDiv"><p class="p1">
342
+              ${params.percent ? params.percent.toFixed() : 0}<spanp class="p3">%</span>
343
+            </p>
344
+            <p class="p2">${params.name}</p>
345
+            </div>`;
346
+          },
347
+          backgroundColor: 'rgba(0,0,0,0)',
348
+
349
+          textStyle: {
350
+            color: '#fff',
351
+            fontSize: 20,
352
+            lineHeight: 10,
353
+          },
354
+        },
355
+        series: [
356
+          {
357
+            type: 'pie',
358
+            radius: ['50%', '65%'],
359
+            center: ['50%', '50%'],
360
+            roseType: 'area',
361
+            //标题与数字一行显示
362
+            label: {
363
+              show: false,
364
+            },
365
+            labelLine: {
366
+              show: false
367
+            },
368
+            itemStyle:{
369
+              borderRadius: 100
370
+            },
371
+            data: this.state.missionsIntensity_arr,
372
+          },
373
+        ],
374
+      };
375
+
376
+
377
+
378
+      // 使用刚指定的配置项和数据显示图表。
379
+      myChart.setOption(option);
380
+      window.addEventListener("resize", function () {
381
+        myChart.resize();
382
+      });
383
+
384
+    }, 3000)
385
+  }
386
+
387
+  render() {
388
+
389
+    return (
390
+      <div className={["eacharView cbLeftMenoyView"]}>
391
+        <div id="echarts6_box">
392
+          <img
393
+            src={require("@assets/imgs/dataVimg/guanghuan.png").default}
394
+            alt=""
395
+            class="guanghuan animate__animated animate__pulse animate__infinite animate__slower"
396
+          />
397
+
398
+          <div id="echarts6"></div>
399
+        </div>
400
+        <ul className={"name_ul"}>
401
+          {
402
+            this.state.year.map(x=>{
403
+              return <li>{x}</li>
404
+            })
405
+          }
406
+        </ul>
407
+        <div id="echarts4"></div>
408
+      </div>
409
+    )
410
+  }
411
+}
412
+export default LeftMenoyView;

+ 109 - 0
src/pages/tlk/component/mapView.jsx

@@ -0,0 +1,109 @@
1
+/*
2
+ * @Author: dayan_hjm 中部地图 第一段
3
+ * @Date: 2023-10-25 10:32:44 
4
+ * @Last Modified by: dayan_hjm
5
+ * controls 属性 : 值为 controls , 启用控制按钮 , 由于在不同的浏览器中表现不同 , 一般情况下 , 不显示控制按钮 ;
6
+        autoplay 属性 : 值为 autoplay , 在 Chrome 浏览器中 禁用自动播放 , 其它浏览器不禁用自动播放 ;
7
+        如果为视频设置静音播放 , 则可以在 Chrom 浏览器中 设置 autoplay 实现自动播放 ;
8
+        muted 属性 : 值为 muted , 将视频设置为静音播放 ;
9
+        如果为视频设置静音播放 , 则可以在 Chrom 浏览器中 设置 autoplay 实现自动播放 ;
10
+        width 属性 : 值为像素值 , 设置播放器宽度 ; 播放器的宽高建议只设置一个 , 避免失真 ;
11
+        height 属性 : 值为像素值 , 设置播放器高度 ; 播放器的宽高建议只设置一个 , 避免失真 ;
12
+        loop 属性 : 值为 loop , 设置播放器循环播放 ;
13
+        poster 属性 : 值为 图片 url 路径 , 设置视频位置等待加载时的图片 ;
14
+        preload 属性 :
15
+        设置 auto , 表示 预先加载视频 ;
16
+        设置 none , 表示 不预先加载视频 ;
17
+ * @Last Modified time: 2023-11-01 15:54:40
18
+ */
19
+import React, { useState, useEffect, Component } from "react";
20
+import { useHistory, useLocation, withRouter } from "react-router-dom";
21
+import mod from '../mod';
22
+import 'animate.css';
23
+@withRouter
24
+
25
+class MapView extends Component {
26
+  // 构造函数,组件的实例创建时,最先执行
27
+  constructor(props, context) {
28
+    super(props, context);
29
+    this.store = mod;
30
+    this.state = {
31
+      changGif: false,
32
+    };
33
+  }
34
+
35
+  componentDidMount() {
36
+    setTimeout(() => {
37
+      //替换gif
38
+      this.setState({ changGif: true });
39
+      this.videoStart();
40
+    }, 200)
41
+    // setTimeout(() => {
42
+    //   $(".video_box_hide").hide();
43
+    // }, 4000)
44
+  }
45
+  videoStart() {
46
+    /*     Chrome 浏览器的视频自动播放策略
47
+        1.始终允许静音模式下自动播放
48
+        2.在以下的情况中,带声音播放会被允许:
49
+          ①用户已经与当前的域进行了交互(也就是click,tap事件)。
50
+          ②在桌面设备上,用户的媒体参与度指数阈值已经超过,这意味着用户之前播放过有声视频。
51
+          ③用户已经将网站添加到移动设备上的主屏幕或允在桌面上安装了PWA。
52
+        3.顶部帧可以将自动播放权限委派给其iframe,来允许自动播放声音
53
+        
54
+        媒体参与度(Media Engagement)是指用户与媒体内容进行互动的程度,可以通过多个指标来衡量。这些指标主要包括观看时间、观看率、转化率、交互行为等。
55
+        可以通过:chrome://media-engagement/ 查看
56
+     */
57
+    const video = document.querySelector('.video1');
58
+    console.log(video.play());
59
+
60
+    const model = document.querySelector('.model')
61
+    const btn = document.querySelector('button')
62
+    // 第一种方法 引导用户去与页面交互实现播放
63
+    async function play() {
64
+      try {
65
+        await video.play();
66
+        //使用await的原因是因为video.play()方法返回的是一个Promise,所以在这里我们可以对他进行一些处理
67
+        // model.style.display = 'none';
68
+        btn.removeEventListener('click', play);
69
+        // 如果他自动播放了就隐藏按钮,消除点击事件
70
+      } catch (err) {
71
+        // model.style.display = 'block';
72
+        btn.addEventListener('click', play);
73
+        // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
74
+      }
75
+    }
76
+    play();
77
+
78
+    //第二种方法比较主流,类似的有网页版抖音以及B站
79
+    function play() {
80
+      video.muted = true;//设置视频为静音
81
+      video.play();//调用播放方法
82
+      const ctx = new AudioContext();
83
+      const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
84
+      // 如果是不能播放我们就执行下面的逻辑,其实就是类似于第一种方法,让用户与其交互
85
+      ctx.close();
86
+      if (canAutoPlay) {
87
+        video.muted = false;
88
+        model.style.display = 'none';
89
+        btn.removeEventListener('click', play);
90
+      }
91
+      else {
92
+        model.style.display = 'block';
93
+        btn.addEventListener('click', play);
94
+      }
95
+    }
96
+    play()
97
+
98
+  }
99
+
100
+  render() {
101
+    const { changGif } = this.state;
102
+    return (
103
+      <div class="video_box video_box_hide animate__animated animate__fadeOut animate__delay-2s animate__slower">
104
+          <video src={require("@assets/imgs/dataVImg/homeVideo.mp4").default} autoplay="autoplay" class="video1"></video>
105
+      </div>
106
+    )
107
+  }
108
+}
109
+export default MapView;

+ 221 - 0
src/pages/tlk/component/moodSendView.jsx

@@ -0,0 +1,221 @@
1
+/*
2
+ * @Author: dayan_hjm 月度产量/发货量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 15:37:01
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
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class MoodSendView extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      proQty:[],
26
+      year:[],
27
+      deliveryQty:[],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
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
+
52
+  setData() {
53
+    setTimeout(() => {
54
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
55
+      var yMax = 500;
56
+      var dataShadow = [];
57
+      for (var i = 0; i < data.length; i++) {
58
+        dataShadow.push(yMax);
59
+      }
60
+      var option = {
61
+        grid: {
62
+          left: '2%',
63
+          top: '18%',
64
+          right: '0%',
65
+          bottom: '8%',
66
+          containLabel: true
67
+        },
68
+
69
+        tooltip: {
70
+          trigger: 'axis',
71
+          axisPointer: {
72
+            type: 'shadow'
73
+          },
74
+          borderColor:"rgba(105, 255, 222, 0.5)",
75
+          borderWidth:2,
76
+          padding:5, 
77
+          textStyle:{
78
+            fontSize:10,
79
+            color:"#ededed"
80
+          },
81
+          backgroundColor:"#0000008a"
82
+        },
83
+        // legend: {
84
+        //   data: ['发货量', '产量'],
85
+        //   fontFamily:'DingTalkJinBuTi',
86
+        //   padding: [25, 0, 0, 10],
87
+        //   textStyle:{
88
+        //     color:"#fff"
89
+        //   },
90
+        //   itemWidth: 11,
91
+        //   itemHeight: 11,
92
+        // },
93
+        // toolbox: {
94
+        //   show: true,
95
+        //   orient: 'vertical',
96
+        //   left: 'right',
97
+        //   top: 'center',
98
+        //   feature: {
99
+        //     mark: { show: true },
100
+        //     dataView: { show: true, readOnly: false },
101
+        //     magicType: { show: true, type: ['line', 'bar', 'stack'] },
102
+        //     restore: { show: true },
103
+        //     saveAsImage: { show: true }
104
+        //   }
105
+        // },
106
+        //   xAxis: {
107
+        //     data: dataAxis,
108
+        //     axisTick: {
109
+        //       show: false,
110
+        //     },
111
+        //     axisLine: {
112
+        //       show: true,
113
+        //       symbol: ['none', 'arrow'],
114
+        //       symbolOffset: 12,
115
+        //       lineStyle: {
116
+        //         color: '#fff',
117
+        //       }
118
+        //     },
119
+        //     z: 10
120
+        //   },
121
+
122
+        xAxis: [
123
+          {
124
+            type: 'category',
125
+            axisTick: { show: false },
126
+            data: this.state.year,
127
+            axisLabel: {
128
+              /*inside: true,*/
129
+              color: "rgba(255,255,255,.6)",
130
+              interval: 0,
131
+              textStyle: {
132
+                color: '#7d7d7d',
133
+                fontSize: 10
134
+
135
+              },
136
+            },
137
+            axisLine: {
138
+              lineStyle: {
139
+                color: 'rgba(255,255,255,.1)',
140
+                type: 'dashed',
141
+              }
142
+            },
143
+            splitLine:{
144
+              show:true,
145
+              lineStyle:{
146
+                color: '#3b3b3b',
147
+                type: 'dashed',
148
+              }
149
+            }
150
+          }
151
+        ],
152
+        yAxis: [
153
+          {
154
+            type: 'value',
155
+            axisLine: {
156
+              lineStyle: {
157
+                color: '#7d7d7d',
158
+                type: 'dashed',
159
+              },
160
+            },
161
+            axisTick: { show: false },
162
+            axisLabel: {
163
+              formatter: "{value}吨",
164
+              textStyle: {
165
+                color: '#7d7d7d',
166
+                fontSize: 12
167
+              }
168
+            },
169
+            splitLine:{
170
+              show:true,
171
+              lineStyle:{
172
+                color: '#3b3b3b',
173
+                type: 'dashed',
174
+
175
+              }
176
+            }
177
+          }
178
+        ],
179
+        series: [
180
+          {
181
+            name: '发货量',
182
+            type: 'bar',
183
+            animation:true,
184
+            animationDuration:3000,
185
+            "smooth": true,
186
+  
187
+            barGap: 0,
188
+            barWidth: 10,
189
+            emphasis: {
190
+              focus: 'series'
191
+            },
192
+            itemStyle: {
193
+              labelLine:{
194
+                show:false
195
+              },
196
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
197
+                { offset: 0, color: 'rgba(105, 255, 222, 1)' },
198
+                { offset: 0.7, color: 'rgba(105, 255, 222, 1)' },
199
+                { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
200
+              ])
201
+            },
202
+            data: this.state.deliveryQty
203
+          }
204
+        ]
205
+      }
206
+      var myChart = echarts.init(document.getElementById('chartmain'));
207
+      // 使用刚指定的配置项和数据显示图表。
208
+      myChart.setOption(option);
209
+    }, 3000)
210
+  }
211
+
212
+  render() {
213
+
214
+    return (
215
+      <div className={["eacharView cbMoodSendView"]}>
216
+        <div id="chartmain"></div>
217
+      </div>
218
+    )
219
+  }
220
+}
221
+export default MoodSendView;

+ 287 - 0
src/pages/tlk/component/oneQualified.jsx

@@ -0,0 +1,287 @@
1
+/*
2
+ * @Author: dayan_hjm 一次合格率
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 17:19: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
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class BottomLineForSend extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      proQty:[],
26
+      year:[],
27
+      deliveryQty:[],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
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
+  roundFun(value=0) {
51
+    value = value * 100;
52
+    var str = parseFloat(value).toFixed(10);
53
+    var num = str.substring(0,str.lastIndexOf('.')+3);
54
+    return num
55
+  }
56
+
57
+
58
+  setData() {
59
+    setTimeout(() => {
60
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
61
+      var yMax = 500;
62
+      var dataShadow = [];
63
+      for (var i = 0; i < data.length; i++) {
64
+        dataShadow.push(yMax);
65
+      }
66
+      var option = {
67
+        grid: {
68
+          left: '2%',
69
+          top: '18%',
70
+          right: '0%',
71
+          bottom: '0%',
72
+          containLabel: true
73
+        },
74
+
75
+        tooltip: {
76
+          trigger: 'axis',
77
+          axisPointer: {
78
+            type: 'shadow'
79
+          },
80
+          borderColor:"rgba(105, 255, 222, 0.5)",
81
+          borderWidth:2,
82
+          padding:5, 
83
+          textStyle:{
84
+            fontSize:10,
85
+            color:"#ededed"
86
+          },
87
+          backgroundColor:"#0000008a"
88
+        },
89
+        legend: {
90
+          data: ['锂辉石消耗量', '锂辉石计划消耗量','锂辉石计划执行率'],
91
+          fontFamily:'DingTalkJinBuTi',
92
+          padding: [20, 0, 0, 10],
93
+          textStyle:{
94
+            color:"#CDF1FF",
95
+            fontSize:10
96
+          },
97
+          itemWidth: 8,
98
+          itemHeight: 8,
99
+        },
100
+        // toolbox: {
101
+        //   show: true,
102
+        //   orient: 'vertical',
103
+        //   left: 'right',
104
+        //   top: 'center',
105
+        //   feature: {
106
+        //     mark: { show: true },
107
+        //     dataView: { show: true, readOnly: false },
108
+        //     magicType: { show: true, type: ['line', 'bar', 'stack'] },
109
+        //     restore: { show: true },
110
+        //     saveAsImage: { show: true }
111
+        //   }
112
+        // },
113
+        //   xAxis: {
114
+        //     data: dataAxis,
115
+        //     axisTick: {
116
+        //       show: false,
117
+        //     },
118
+        //     axisLine: {
119
+        //       show: true,
120
+        //       symbol: ['none', 'arrow'],
121
+        //       symbolOffset: 12,
122
+        //       lineStyle: {
123
+        //         color: '#fff',
124
+        //       }
125
+        //     },
126
+        //     z: 10
127
+        //   },
128
+
129
+        xAxis: [
130
+          {
131
+            type: 'category',
132
+            axisTick: { show: false },
133
+            data: this.state.year,
134
+            axisLabel: {
135
+              /*inside: true,*/
136
+              color: "rgba(255,255,255,.6)",
137
+              interval: 0,
138
+              textStyle: {
139
+                color: '#7d7d7d',
140
+                fontSize: 10
141
+
142
+              },
143
+            },
144
+            axisLine: {
145
+              lineStyle: {
146
+                color: 'rgba(255,255,255,.1)',
147
+                type: 'dashed',
148
+              }
149
+            },
150
+            splitLine:{
151
+              show:true,
152
+              lineStyle:{
153
+                color: '#3b3b3b',
154
+                type: 'dashed',
155
+              }
156
+            }
157
+          }
158
+        ],
159
+        yAxis: [
160
+          {
161
+            type: 'value',
162
+            axisLine: {
163
+              lineStyle: {
164
+                color: '#7d7d7d',
165
+                type: 'dashed',
166
+              },
167
+            },
168
+            axisTick: { show: false },
169
+            axisLabel: {
170
+              formatter: "{value}吨",
171
+              textStyle: {
172
+                color: '#7d7d7d',
173
+                fontSize: 12
174
+              }
175
+            },
176
+            splitLine:{
177
+              show:true,
178
+              lineStyle:{
179
+                color: '#3b3b3b',
180
+                type: 'dashed',
181
+
182
+              }
183
+            }
184
+          },
185
+          {
186
+            type: 'value',
187
+            axisLine: {
188
+              lineStyle: {
189
+                color: '#7d7d7d',
190
+                type: 'dashed',
191
+              },
192
+            },
193
+            axisTick: { show: false },
194
+            axisLabel: {
195
+              formatter: "{value}%",
196
+              textStyle: {
197
+                color: '#7d7d7d',
198
+                fontSize: 12
199
+              }
200
+            },
201
+            splitLine:{
202
+              show:true,
203
+              lineStyle:{
204
+                color: '#3b3b3b',
205
+                type: 'dashed',
206
+
207
+              }
208
+            }
209
+          },
210
+        ],
211
+        series: [
212
+          {
213
+            name: '锂辉石计划消耗量',
214
+            type: 'bar',
215
+            animation:true,
216
+            animationDuration:3000,
217
+            "smooth": true,
218
+  
219
+            emphasis: {
220
+              focus: 'series'
221
+            },
222
+            barWidth: 10,
223
+
224
+            itemStyle: {
225
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
226
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
227
+                { offset: 0.7, color: 'rgba(255, 206, 0, 1)' },
228
+                { offset: 1, color: 'rgba(255, 206, 0, 0.3)' },
229
+              ])
230
+            },
231
+
232
+            data:this.state.proQty
233
+          },
234
+          {
235
+            name: '锂辉石消耗量',
236
+            type: 'bar',
237
+            animation:true,
238
+            animationDuration:3000,
239
+            "smooth": true,
240
+  
241
+            barGap: 0,
242
+            barWidth: 10,
243
+            emphasis: {
244
+              focus: 'series'
245
+            },
246
+            itemStyle: {
247
+              labelLine:{
248
+                show:false
249
+              },
250
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
251
+                { offset: 0, color: 'rgba(105, 255, 222, 1)' },
252
+                { offset: 0.7, color: 'rgba(105, 255, 222, 1)' },
253
+                { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
254
+              ])
255
+            },
256
+            data: this.state.deliveryQty
257
+          },
258
+          {data: [8000, 16000, 20000,45566,3345,33445],
259
+            type: 'line',
260
+            showAllSymbol: true,
261
+            yAxisIndex: 1,
262
+            symbolSize: 6,
263
+            name: '锂辉石计划执行率',
264
+            itemStyle: {
265
+                normal: {
266
+                    color: "#8D93FF",
267
+                },
268
+            },
269
+        }
270
+        ]
271
+      }
272
+      var myChart = echarts.init(document.getElementById('echarts5'));
273
+      // 使用刚指定的配置项和数据显示图表。
274
+      myChart.setOption(option);
275
+    }, 3000)
276
+  }
277
+
278
+  render() {
279
+
280
+    return (
281
+      <div className={["eacharView cbBottomLineForSend"]}>
282
+        <div id="echarts5"></div>
283
+      </div>
284
+    )
285
+  }
286
+}
287
+export default BottomLineForSend;

+ 281 - 0
src/pages/tlk/component/oneSendView.jsx

@@ -0,0 +1,281 @@
1
+/*
2
+ * @Author: dayan_hjm 月度产量/发货量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 15:36:11
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
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class OneSendView extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      proQty:[],
26
+      year:[],
27
+      deliveryQty:[],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
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
+
52
+  setData() {
53
+    setTimeout(() => {
54
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
55
+      var yMax = 500;
56
+      var dataShadow = [];
57
+      for (var i = 0; i < data.length; i++) {
58
+        dataShadow.push(yMax);
59
+      }
60
+      var option = {
61
+        grid: {
62
+          left: '2%',
63
+          top: '18%',
64
+          right: '0%',
65
+          bottom: '8%',
66
+          containLabel: true
67
+        },
68
+
69
+        tooltip: {
70
+          trigger: 'axis',
71
+          axisPointer: {
72
+            type: 'shadow'
73
+          },
74
+          borderColor:"rgba(105, 255, 222, 0.5)",
75
+          borderWidth:2,
76
+          padding:5, 
77
+          textStyle:{
78
+            fontSize:10,
79
+            color:"#ededed"
80
+          },
81
+          backgroundColor:"#0000008a"
82
+        },
83
+        legend: {
84
+          data: ['预算产量(Monthly Budget)', '产量(Net Production)','计划完成率(Prodction Efflciebcy)'],
85
+          fontFamily:'DingTalkJinBuTi',
86
+          padding: [10, 0, 0, 10],
87
+          textStyle:{
88
+            color:"#CDF1FF",
89
+            fontSize:10
90
+          },
91
+          itemWidth: 8,
92
+          itemHeight: 8,
93
+        },
94
+        // toolbox: {
95
+        //   show: true,
96
+        //   orient: 'vertical',
97
+        //   left: 'right',
98
+        //   top: 'center',
99
+        //   feature: {
100
+        //     mark: { show: true },
101
+        //     dataView: { show: true, readOnly: false },
102
+        //     magicType: { show: true, type: ['line', 'bar', 'stack'] },
103
+        //     restore: { show: true },
104
+        //     saveAsImage: { show: true }
105
+        //   }
106
+        // },
107
+        //   xAxis: {
108
+        //     data: dataAxis,
109
+        //     axisTick: {
110
+        //       show: false,
111
+        //     },
112
+        //     axisLine: {
113
+        //       show: true,
114
+        //       symbol: ['none', 'arrow'],
115
+        //       symbolOffset: 12,
116
+        //       lineStyle: {
117
+        //         color: '#fff',
118
+        //       }
119
+        //     },
120
+        //     z: 10
121
+        //   },
122
+
123
+        xAxis: [
124
+          {
125
+            type: 'category',
126
+            axisTick: { show: false },
127
+            data: this.state.year,
128
+            axisLabel: {
129
+              /*inside: true,*/
130
+              color: "rgba(255,255,255,.6)",
131
+              interval: 0,
132
+              textStyle: {
133
+                color: '#7d7d7d',
134
+                fontSize: 10
135
+
136
+              },
137
+            },
138
+            axisLine: {
139
+              lineStyle: {
140
+                color: 'rgba(255,255,255,.1)',
141
+                type: 'dashed',
142
+              }
143
+            },
144
+            splitLine:{
145
+              show:true,
146
+              lineStyle:{
147
+                color: '#3b3b3b',
148
+                type: 'dashed',
149
+              }
150
+            }
151
+          }
152
+        ],
153
+        yAxis: [
154
+          {
155
+            type: 'value',
156
+            axisLine: {
157
+              lineStyle: {
158
+                color: '#7d7d7d',
159
+                type: 'dashed',
160
+              },
161
+            },
162
+            axisTick: { show: false },
163
+            axisLabel: {
164
+              formatter: "{value}吨",
165
+              textStyle: {
166
+                color: '#7d7d7d',
167
+                fontSize: 12
168
+              }
169
+            },
170
+            splitLine:{
171
+              show:true,
172
+              lineStyle:{
173
+                color: '#3b3b3b',
174
+                type: 'dashed',
175
+
176
+              }
177
+            }
178
+          },
179
+          {
180
+            type: 'value',
181
+            axisLine: {
182
+              lineStyle: {
183
+                color: '#7d7d7d',
184
+                type: 'dashed',
185
+              },
186
+            },
187
+            axisTick: { show: false },
188
+            axisLabel: {
189
+              formatter: "{value}%",
190
+              textStyle: {
191
+                color: '#7d7d7d',
192
+                fontSize: 12
193
+              }
194
+            },
195
+            splitLine:{
196
+              show:true,
197
+              lineStyle:{
198
+                color: '#3b3b3b',
199
+                type: 'dashed',
200
+
201
+              }
202
+            }
203
+          },
204
+        ],
205
+        series: [
206
+          {
207
+            name: '产量(Net Production)',
208
+            type: 'bar',
209
+            animation:true,
210
+            animationDuration:3000,
211
+            "smooth": true,
212
+  
213
+            emphasis: {
214
+              focus: 'series'
215
+            },
216
+            barWidth: 10,
217
+
218
+            itemStyle: {
219
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
220
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
221
+                { offset: 0.7, color: 'rgba(255, 206, 0, 1)' },
222
+                { offset: 1, color: 'rgba(255, 206, 0, 0.3)' },
223
+              ])
224
+            },
225
+
226
+            data:this.state.proQty
227
+          },
228
+          {
229
+            name: '预算产量(Monthly Budget)',
230
+            type: 'bar',
231
+            animation:true,
232
+            animationDuration:3000,
233
+            "smooth": true,
234
+  
235
+            barGap: 0,
236
+            barWidth: 10,
237
+            emphasis: {
238
+              focus: 'series'
239
+            },
240
+            itemStyle: {
241
+              labelLine:{
242
+                show:false
243
+              },
244
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
245
+                { offset: 0, color: 'rgba(105, 255, 222, 1)' },
246
+                { offset: 0.7, color: 'rgba(105, 255, 222, 1)' },
247
+                { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
248
+              ])
249
+            },
250
+            data: this.state.deliveryQty
251
+          },
252
+          {data: [8000, 16000, 20000,45566,3345,33445],
253
+            type: 'line',
254
+            showAllSymbol: true,
255
+            yAxisIndex: 1,
256
+            symbolSize: 6,
257
+            name: '计划完成率(Prodction Efflciebcy)',
258
+            itemStyle: {
259
+                normal: {
260
+                    color: "#8D93FF",
261
+                },
262
+            },
263
+        }
264
+        ]
265
+      }
266
+      var myChart = echarts.init(document.getElementById('onesendbox'));
267
+      // 使用刚指定的配置项和数据显示图表。
268
+      myChart.setOption(option);
269
+    }, 3000)
270
+  }
271
+
272
+  render() {
273
+
274
+    return (
275
+      <div className={["eacharView cbOneSendView"]}>
276
+        <div id="onesendbox"></div>
277
+      </div>
278
+    )
279
+  }
280
+}
281
+export default OneSendView;

+ 210 - 0
src/pages/tlk/component/rightBottomView.jsx

@@ -0,0 +1,210 @@
1
+/*
2
+ * @Author: dayan_hjm 近30天产量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 17:32:33
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
+import {
14
+  mondService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class RightBottomView extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      factoryProdcution_arr: [],
26
+      missionsIntensity_arr: [],
27
+      year: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+  async getUrl() {
35
+    await mondService().then(({ data = [], resultCode }) => {
36
+      if (+resultCode === 0) {
37
+        let year = [], missionsIntensity_arr = [], factoryProdcution_arr = [];
38
+        data.map((x, i) => {
39
+          const name_ = x.indexDate.split('-')[1] + '-' + x.indexDate.split('-')[2];
40
+          year.push(name_);
41
+          missionsIntensity_arr.push(x.indexValue);
42
+          factoryProdcution_arr.push(x.factoryProdcution)
43
+        });
44
+        this.setState({ year, missionsIntensity_arr, factoryProdcution_arr });
45
+        this.setData();
46
+      }
47
+    });
48
+
49
+  }
50
+
51
+  setData() {
52
+    setTimeout(() => {
53
+      // 基于准备好的dom,初始化echarts实例
54
+      var myChart = echarts.init(document.getElementById('echarts7'));
55
+
56
+      var option = {
57
+        tooltip: {
58
+          trigger: 'axis',
59
+          axisPointer: { type: 'shadow' },
60
+          borderColor: "rgba(105, 255, 222, 0.5)",
61
+          borderWidth: 2,
62
+          padding: 5,
63
+          className: 'dyLeft',
64
+          textStyle: {
65
+            fontSize: 12,
66
+            textAlign: "left",
67
+            color: "#ededed"
68
+          },
69
+          backgroundColor: "#0000008a",
70
+        },
71
+        // formatter: `日期: {b0}<br />{a0}: {c0}吨<br />{a1}: {c1}吨`,
72
+        grid: {
73
+          left: '5%',
74
+          top: '15%',
75
+          right: '4%',
76
+          bottom: '10%',
77
+          containLabel: true
78
+        },
79
+        legend: {
80
+          data: ['产量一次合格率(First Pass Yield)', '累计一次合格率(Cumulative First Pass Yield)'],
81
+          fontFamily: 'DingTalkJinBuTi',
82
+          padding: [5, 0, 40, 0],
83
+          textStyle: {
84
+            color: "#CDF1FF",
85
+            fontSize: 10
86
+          },
87
+          itemWidth: 8,
88
+          itemHeight: 8,
89
+        },
90
+
91
+        xAxis: [{
92
+          type: 'category',
93
+          // boundaryGap: ['20%', '20%'],
94
+          axisLabel: {
95
+            interval: 0,
96
+            rotate: -60,
97
+            textStyle: {
98
+              color: '#7d7d7d',
99
+              fontSize: 11,
100
+            },
101
+            showMaxLabel: true,//关键部分,显示最后一个label
102
+          },
103
+          axisLine: {
104
+            lineStyle: {
105
+              color: 'rgba(255,255,255,.1)',
106
+              type: 'dashed',
107
+
108
+            }
109
+          },
110
+          splitLine: {
111
+            show: true,
112
+            lineStyle: {
113
+              color: '#3b3b3b',
114
+              type: 'dashed',
115
+            }
116
+          },
117
+          data: this.state.year
118
+        }, {
119
+
120
+          axisPointer: { show: false },
121
+          axisLine: { show: false },
122
+          position: 'bottom',
123
+          offset: 20,
124
+
125
+
126
+
127
+        }],
128
+
129
+        yAxis: [{
130
+          type: 'value',
131
+          axisTick: { show: false },
132
+          // splitNumber: 6,
133
+          axisLine: {
134
+            lineStyle: {
135
+              color: 'rgba(255,255,255,.1)'
136
+            },
137
+          },
138
+          axisLabel: {
139
+            formatter: "{value} 吨",
140
+            textStyle: {
141
+              color: '#7d7d7d',
142
+              fontSize: 13
143
+            },
144
+          },
145
+
146
+          splitLine: {
147
+            lineStyle: {
148
+              color: 'rgba(255,255,255,.1)'
149
+            }
150
+          }
151
+        }],
152
+        series: [
153
+          {
154
+            name: '产量一次合格率(First Pass Yield)',
155
+            type: 'line',
156
+            smooth: true,
157
+            symbol: 'circle',
158
+            symbolSize: 5,
159
+            showSymbol: false,
160
+            lineStyle: {
161
+              normal: {
162
+                color: '#69FFDE',
163
+                width: 2
164
+              }
165
+            },
166
+            itemStyle: {
167
+              normal: {
168
+                color: 'rgba(0, 255, 182, 0.3)',
169
+                borderWidth: 12
170
+              }
171
+            },
172
+            data: this.state.missionsIntensity_arr,
173
+            "smooth": true
174
+          },
175
+          {
176
+            name: '累计一次合格率(Cumulative First Pass Yield)',
177
+            type: 'line',
178
+            smooth: true,
179
+            showSymbol: false,
180
+            itemStyle: {
181
+              color: '#FFCE00'
182
+            },
183
+            lineStyle: {
184
+              normal: {
185
+                color: '#FFCE00',
186
+                width: 2
187
+              }
188
+            },
189
+            data: [445, 89, 34, 357, 234, 333, 566, 443, 233, 444, 445, 889, 34, 367, 234, 333, 566, 443, 233, 444],//this.state.factoryProdcution_arr,
190
+          },
191
+        ]
192
+      };
193
+      // 使用刚指定的配置项和数据显示图表。
194
+      myChart.setOption(option);
195
+      window.addEventListener("resize", function () {
196
+        myChart.resize();
197
+      });
198
+    }, 3000)
199
+  }
200
+
201
+  render() {
202
+
203
+    return (
204
+      <div className={["eacharView cbBottomLineForSend"]}>
205
+        <div id="echarts7"></div>
206
+      </div>
207
+    )
208
+  }
209
+}
210
+export default RightBottomView;

+ 72 - 0
src/pages/tlk/mod.js

@@ -0,0 +1,72 @@
1
+/*
2
+ * @Author: dayan_hjm 
3
+ * @Date: 2022-10-27 11:11:30 
4
+ * @Last modified by:   dayan_hjm 
5
+ * @Last modified time: 2022-10-27 11:11:30 
6
+ */
7
+
8
+// 状态管理方法
9
+import { observable, action, configure, makeObservable, runInAction } from 'mobx';
10
+// 工具方法
11
+import { cloneDeep, get, groupBy, isEmpty, orderBy, pick, values } from "lodash";
12
+
13
+import { message } from 'antd';
14
+
15
+// 默认状态
16
+const defaultState = {
17
+  totalValue:0,
18
+  yearDecline:0,
19
+  yearSend:0,
20
+  productInventory:0,
21
+  list:[{name:'营运数据大屏'},{name:'经营大盘'},{name:'到家专题'},{name:'门店大盘'},{name:'自助跑数SQL平台'},{name:'月度包材预警跑数模板'}],
22
+  rightlist:[],
23
+  bumen:'数字化中心/数据工程部',
24
+  gw:'数据产品经理',
25
+}
26
+
27
+// 严格模式
28
+configure({
29
+  enforceActions: 'observed'
30
+});
31
+
32
+
33
+/**
34
+ * mod层 - 业务逻辑,数据逻辑应该存储于此
35
+ */
36
+class Mod {
37
+  constructor() {
38
+    makeObservable(this);
39
+  }
40
+  // 监视状态
41
+  @observable state = cloneDeep(defaultState);
42
+
43
+  @action saveState = async (payload) => {
44
+    runInAction(() => {
45
+      this.state = {
46
+        ...this.state,
47
+        ...payload
48
+      };
49
+    });
50
+  };
51
+
52
+
53
+  // 新增/编辑运营商
54
+  // @action customerOperatorsmod = async (par, type) => {
55
+  //   try {
56
+  //     const { data, resultCode, resultMsg } = await Serv.customerOperatorsServ(par, type);
57
+  //     if (resultCode + '' === '0') {
58
+  //       runInAction(() => {
59
+  //         message.success('操作成功!')
60
+  //         this.state.addEditVisiable = false;
61
+  //         this.state.version = Math.random()
62
+  //       });
63
+  //     }
64
+  //   } catch (e) {
65
+  //     console.log('e: ', e);
66
+  //   }
67
+  // }
68
+}
69
+
70
+// 将组件实例化,这意味着组件将不能从别处实例化
71
+const mod = new Mod();
72
+export default mod;

+ 412 - 0
src/pages/tlk/style.less

@@ -0,0 +1,412 @@
1
+@import url("../../themes/themes.less");
2
+
3
+@assetUrl: "../../assets/imgs/home";
4
+
5
+.bg_after {
6
+  content: "";
7
+  display: block;
8
+  bottom: 0;
9
+  position: absolute;
10
+  width: 100%;
11
+  height: 10px;
12
+}
13
+
14
+.tlk_box{
15
+  :global {
16
+    .leftContent .bottomContent2{
17
+      height: 31%!important;
18
+      .topMsg_content{
19
+        height: 90%!important;
20
+      }
21
+    }
22
+    .leftContent .center_box .topMsg_content .eacharView .name_ul li{
23
+      height: 33%!important;
24
+    }
25
+    .leftContent .center_box .topMsg_content .eacharView .name_ul {
26
+      color: #CDF1FF!important;
27
+    }
28
+    .centerCon .bottomContent3{
29
+      height: 27%;
30
+    }
31
+    .centerCon .right_li{
32
+      margin-top: -24px;
33
+    }
34
+    .topMsg_tip2{
35
+      margin-top: 0!important;
36
+    }
37
+    .rightContent .topMsg2{
38
+      height: 30%!important;
39
+    }
40
+    .centerCon .bottomContent3{
41
+      bottom: 10%!important;
42
+    }
43
+    .rightContent .topMsg_22{
44
+      height: 30%!important;
45
+      #echarts5{
46
+        height: 100%!important;
47
+      }
48
+    }
49
+  }
50
+}
51
+.home {
52
+  position: relative;
53
+  .insert {
54
+    position: absolute;
55
+    z-index: 4;
56
+    width: 100%;
57
+    left: 0;
58
+    top: 0;
59
+    height: 100vh;
60
+    padding: 16px;
61
+    .user {
62
+      background: #fff;
63
+      border-radius: 6px;
64
+      padding: 12px;
65
+      text-align: left;
66
+      margin-bottom: 12px;
67
+      font-size: 12px;
68
+    }
69
+    .notice {
70
+      background: #fff;
71
+      border-radius: 6px;
72
+      padding: 12px;
73
+      text-align: left;
74
+      font-size: 12px;
75
+      margin-bottom: 12px;
76
+      &>*:not(:first-child){
77
+        margin-top: 8px;
78
+      }
79
+    }
80
+    .documents {
81
+      background: #fff;
82
+      border-radius: 6px;
83
+      padding: 12px;
84
+      text-align: left;
85
+      font-size: 12px;
86
+      &>*:not(:first-child){
87
+        margin-top: 8px;
88
+      }
89
+    }
90
+  }
91
+  :global {
92
+    // background: url(../../../public/bg_home.png) 50% 50% no-repeat;
93
+    background-color: #041747;
94
+    background-size: cover;
95
+    text-align: center;
96
+    padding: 0 33px 113px 33px;
97
+    height: 100%;
98
+    .titles {
99
+      padding-top: 52px;
100
+      display: inline-block;
101
+      .big_title {
102
+        font-size: 40px;
103
+        color: #ffffff;
104
+        letter-spacing: 5px;
105
+        text-align: center;
106
+        font-weight: bold;
107
+      }
108
+      .sub_title {
109
+        margin-top: 15px;
110
+        display: flex;
111
+        justify-content: space-between;
112
+        position: relative;
113
+        width: 100%;
114
+        opacity: 0.4;
115
+        font-family: PingFangSC-Regular;
116
+        font-size: 20px;
117
+        color: #ffffff;
118
+        letter-spacing: 0.7px;
119
+        &::after,
120
+        &::before {
121
+          height: 1px;
122
+          width: 37px;
123
+          position: absolute;
124
+          top: 50%;
125
+          content: "";
126
+          display: block;
127
+        }
128
+        &::after {
129
+          background-image: linear-gradient(
130
+            90deg,
131
+            rgba(255, 255, 255, 0.3) 0%,
132
+            rgba(255, 255, 255, 1) 100%
133
+          );
134
+          left: -46px;
135
+        }
136
+        &::before {
137
+          background-image: linear-gradient(
138
+            90deg,
139
+            rgba(255, 255, 255, 1) 0%,
140
+            rgba(255, 255, 255, 0.3) 100%
141
+          );
142
+          right: -46px;
143
+        }
144
+      }
145
+    }
146
+    .player {
147
+      margin-top: 54px;
148
+      display: flex;
149
+      justify-content: space-between;
150
+      & > li {
151
+        position: relative;
152
+        cursor: pointer;
153
+        text-align: center;
154
+        width: 1%;
155
+        flex-grow: 1;
156
+        transition: all 0.3s;
157
+        &:not(:last-child) {
158
+          margin-right: 1%;
159
+        }
160
+
161
+        .not_open_card {
162
+          display: none;
163
+        }
164
+
165
+        &.toggle_stat {
166
+          .nor_card {
167
+            display: block;
168
+          }
169
+
170
+          &:hover > .nor_card {
171
+            display: none;
172
+          }
173
+          &:hover > .not_open_card {
174
+            display: block;
175
+          }
176
+
177
+          .tips {
178
+            text-align: center;
179
+            font-size: 16px;
180
+            color: rgba(255, 255, 255, 0.5);
181
+            margin-top: -5px;
182
+          }
183
+          .tips_img {
184
+            width: 60%;
185
+            margin-top: 30%;
186
+          }
187
+        }
188
+      }
189
+    }
190
+
191
+    .bg_1 {
192
+      background: rgba(69, 163, 109, 0.3);
193
+      border: none;
194
+
195
+      &:hover {
196
+        background: rgba(69, 163, 109, 0.5);
197
+        transform: translateY(-30px);
198
+        box-shadow: 0 0 0 1px #45a36d inset;
199
+        background-image: radial-gradient(
200
+          120px 60px ellipse at 50% 100%,
201
+          rgba(42, 186, 128, 0.8) 0%,
202
+          rgba(42, 186, 128, 0) 90%,
203
+          transparent 0
204
+        );
205
+        &::after {
206
+          content: "";
207
+          display: block;
208
+          bottom: -5px;
209
+          position: absolute;
210
+          width: 100%;
211
+          height: 10px;
212
+          background: url("@{assetUrl}/bg_light1.png") 50% 50% no-repeat;
213
+        }
214
+      }
215
+    }
216
+
217
+    .bg_2 {
218
+      background: rgba(38, 149, 140, 0.3);
219
+      border: none;
220
+      &:hover {
221
+        background: rgba(38, 149, 140, 0.5);
222
+        transform: translateY(-30px);
223
+        box-shadow: 0 0 0 1px #26958c inset;
224
+        background-image: radial-gradient(
225
+          120px 60px ellipse at 50% 100%,
226
+          rgba(0, 199, 207, 0.8) 0%,
227
+          rgba(0, 199, 207, 0) 90%,
228
+          transparent 0
229
+        );
230
+        &::after {
231
+          content: "";
232
+          display: block;
233
+          bottom: -5px;
234
+          position: absolute;
235
+          width: 100%;
236
+          height: 10px;
237
+          background: url("@{assetUrl}/bg_light2.png") 50% 50% no-repeat;
238
+        }
239
+      }
240
+    }
241
+
242
+    .bg_3 {
243
+      background: rgba(122, 89, 202, 0.3);
244
+      border: none;
245
+      &:hover {
246
+        background: rgba(122, 89, 202, 0.5);
247
+        transform: translateY(-30px);
248
+        box-shadow: 0 0 0 1px #a27cff inset;
249
+        background-image: radial-gradient(
250
+          120px 60px ellipse at 50% 100%,
251
+          rgba(181, 151, 255, 0.8) 0%,
252
+          rgba(181, 151, 255, 0) 90%,
253
+          transparent 0
254
+        );
255
+        &::after {
256
+          content: "";
257
+          display: block;
258
+          bottom: -5px;
259
+          position: absolute;
260
+          width: 100%;
261
+          height: 10px;
262
+          background: url("@{assetUrl}/bg_light3.png") 50% 50% no-repeat;
263
+        }
264
+      }
265
+    }
266
+
267
+    .bg_4 {
268
+      background: rgba(37, 90, 199, 0.3);
269
+      border: none;
270
+      &:hover {
271
+        background: rgba(37, 90, 199, 0.5);
272
+        transform: translateY(-30px);
273
+        box-shadow: 0 0 0 1px #6899ff inset;
274
+        background-image: radial-gradient(
275
+          120px 60px ellipse at 50% 100%,
276
+          rgba(73, 181, 255, 0.8) 0%,
277
+          rgba(73, 181, 255, 0) 90%,
278
+          transparent 0
279
+        );
280
+        &::after {
281
+          content: "";
282
+          display: block;
283
+          bottom: -5px;
284
+          position: absolute;
285
+          width: 100%;
286
+          height: 10px;
287
+          background: url("@{assetUrl}/bg_light4.png") 50% 50% no-repeat;
288
+        }
289
+      }
290
+    }
291
+
292
+    .bg_5 {
293
+      background: rgba(6, 159, 199, 0.3);
294
+      border: none;
295
+      &:hover {
296
+        background: rgba(6, 159, 199, 0.5);
297
+        transform: translateY(-30px);
298
+        box-shadow: 0 0 0 1px #41bad9 inset;
299
+        background-image: radial-gradient(
300
+          120px 60px ellipse at 50% 100%,
301
+          rgba(58, 223, 255, 0.8) 0%,
302
+          rgba(58, 223, 255, 0) 90%,
303
+          transparent 0
304
+        );
305
+        &::after {
306
+          content: "";
307
+          display: block;
308
+          bottom: -5px;
309
+          position: absolute;
310
+          width: 100%;
311
+          height: 10px;
312
+          background: url("@{assetUrl}/bg_light5.png") 50% 50% no-repeat;
313
+        }
314
+      }
315
+    }
316
+
317
+    .type_1 {
318
+      padding: 82px 0 75px 0;
319
+      .card_subtitle {
320
+        font-size: 14px;
321
+        color: #fff;
322
+        margin-top: 48px;
323
+        margin-bottom: 48px;
324
+      }
325
+    }
326
+
327
+    .type_2 {
328
+      padding: 42px 0 65px 0;
329
+    }
330
+
331
+    .card_title {
332
+      font-size: 20px;
333
+      color: #ffffff;
334
+      font-weight: bold;
335
+      position: absolute;
336
+      bottom: 7%;
337
+      width: 100%;
338
+      text-align: center;
339
+    }
340
+
341
+    .text {
342
+      text-align: left;
343
+      display: flex;
344
+      justify-content: center;
345
+    }
346
+
347
+    .type1_sub {
348
+      font-size: 12px;
349
+      color: rgba(255, 255, 255, 0.7);
350
+    }
351
+    .type1_left {
352
+      font-size: 12px;
353
+      color: rgba(255, 255, 255, 0.7);
354
+      text-align: left;
355
+    }
356
+    .col_fff {
357
+      color: #ffffff;
358
+    }
359
+    .col_gray {
360
+      color: rgba(255, 255, 255, 0.7);
361
+    }
362
+
363
+    .fs12 {
364
+      font-size: 12px;
365
+    }
366
+
367
+    .fs14 {
368
+      font-size: 14px;
369
+    }
370
+
371
+    .mt4 {
372
+      margin-top: 4px;
373
+    }
374
+
375
+    .mt50 {
376
+      margin-top: 90px;
377
+    }
378
+
379
+    .linear {
380
+      width: 100%;
381
+      height: 1px;
382
+      background: linear-gradient(
383
+        90deg,
384
+        rgba(2, 199, 218, 0) 0%,
385
+        rgba(2, 199, 218, 0.5) 50%,
386
+        rgba(2, 199, 218, 0) 100%
387
+      );
388
+      transform-origin: center;
389
+      transform: rotate(-45deg);
390
+      margin-top: 60px;
391
+      margin-bottom: 15px;
392
+    }
393
+
394
+    .min_w {
395
+      min-width: 40%;
396
+    }
397
+  }
398
+}
399
+.add_common_report {
400
+  display: flex;
401
+  align-items: center;
402
+
403
+  >div {
404
+    display: flex;
405
+    align-items: center;
406
+    overflow: hidden;
407
+    text-overflow: ellipsis;
408
+    white-space: nowrap;
409
+    white-space: nowrap;
410
+  }
411
+}
412
+

+ 443 - 0
src/pages/tlk/view.jsx

@@ -0,0 +1,443 @@
1
+/*
2
+ * @Author: dayan_hjm 
3
+ * @Date: 2023-10-25 10:32:44 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-14 17:16:34
6
+ */
7
+/*
8
+ * @Author: dayan_hjm 
9
+ * @Date: 2022-10-27 11:40:02 
10
+ * @Last Modified by: dayan_hjm
11
+ * @Last Modified time: 2023-10-25 10:32:07
12
+ */
13
+
14
+import React, { useState, useEffect, Component } from "react";
15
+import styles from "./style.less";
16
+import { useHistory, useLocation, withRouter } from "react-router-dom";
17
+import { observer, observable } from "mobx-react";
18
+import { message, Space, Form, Popconfirm, Modal, Tooltip, Icon, Button } from "antd";
19
+import mod from './mod';
20
+import { toJS } from "mobx";
21
+import BottomLineForSend from "./component/bottomLineForSend.jsx";
22
+import MoodSendView from "./component/moodSendView.jsx";
23
+import OneSendView from "./component/oneSendView.jsx";
24
+import LeftMenoyView from "./component/leftMenoyView.jsx";
25
+import RightBottomView from "./component/rightBottomView.jsx";
26
+import OneQualified from "./component/oneQualified.jsx";
27
+import MapView from "./component/mapView.jsx";
28
+import $store from "@store/";
29
+import {
30
+  timeService,
31
+  numberService,
32
+  checkToken,
33
+  updateTimeService
34
+} from "./api";
35
+import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
36
+import {
37
+  fullscreen,
38
+} from "@ant-design/icons";
39
+import 'animate.css';
40
+@withRouter
41
+
42
+class Home extends Component {
43
+  // 构造函数,组件的实例创建时,最先执行
44
+  constructor(props, context) {
45
+    super(props, context);
46
+    this.store = mod;
47
+    this.state = {
48
+      updateTime: '',
49
+      changGif: false,
50
+      changNun: false,
51
+      plannedCompletionData: [
52
+      ],
53
+      plannedCompletionNum: 1,
54
+      manHourData: [
55
+      ],
56
+      manHourNum: 1,
57
+    };
58
+    this.timer = null //定时器,用于检测同步状态
59
+  }
60
+  componentWillMount() {
61
+    if (window.location.host.indexOf("localhost") == -1) {
62
+      this.getToken()
63
+    }
64
+  }
65
+
66
+  async getToken() {
67
+    if (!sessionStorage.getItem("tqcVToken")) {
68
+      this.props.history.replace("/home/index");
69
+    } else {
70
+      await checkToken(sessionStorage.getItem("tqcVToken")).then(({ data, resultCode }) => {
71
+        if (data?.userId) {
72
+          sessionStorage.setItem("tqcUserName", data?.userId);
73
+          $store.app.setMarkSrc(
74
+            setWaterMark({
75
+              toDataURL: true,
76
+              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
77
+            })
78
+          );
79
+        } else {
80
+          window.location = window.location.origin + '/transfer.html#/login';
81
+          // this.props.history.replace("/home/index");
82
+        }
83
+      });
84
+    }
85
+  }
86
+  componentDidMount() {
87
+    this.fontMsgChange();
88
+    this.getUrl();
89
+    this.getUrl2()
90
+    this.getUrl3();
91
+    setTimeout(() => {
92
+      this.videoStart();
93
+    }, 200)
94
+    setTimeout(() => {
95
+      //替换gif
96
+      this.setState({ changGif: true });
97
+    }, 2000);
98
+    setTimeout(() => {
99
+      this.setState({ changNun: true });
100
+    }, 4500)
101
+
102
+  }
103
+  videoStart() {
104
+    /*     Chrome 浏览器的视频自动播放策略
105
+        1.始终允许静音模式下自动播放
106
+        2.在以下的情况中,带声音播放会被允许:
107
+          ①用户已经与当前的域进行了交互(也就是click,tap事件)。
108
+          ②在桌面设备上,用户的媒体参与度指数阈值已经超过,这意味着用户之前播放过有声视频。
109
+          ③用户已经将网站添加到移动设备上的主屏幕或允在桌面上安装了PWA。
110
+        3.顶部帧可以将自动播放权限委派给其iframe,来允许自动播放声音
111
+        
112
+        媒体参与度(Media Engagement)是指用户与媒体内容进行互动的程度,可以通过多个指标来衡量。这些指标主要包括观看时间、观看率、转化率、交互行为等。
113
+        可以通过:chrome://media-engagement/ 查看
114
+     */
115
+    const video = document.querySelector('.video2');
116
+    console.log(video.play());
117
+
118
+    const model = document.querySelector('.model')
119
+    const btn = document.querySelector('button')
120
+    // 第一种方法 引导用户去与页面交互实现播放
121
+    async function play() {
122
+      try {
123
+        await video.play();
124
+        //使用await的原因是因为video.play()方法返回的是一个Promise,所以在这里我们可以对他进行一些处理
125
+        model.style.display = 'none';
126
+        btn.removeEventListener('click', play);
127
+        // 如果他自动播放了就隐藏按钮,消除点击事件
128
+      } catch (err) {
129
+        model.style.display = 'block';
130
+        btn.addEventListener('click', play);
131
+        // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
132
+      }
133
+    }
134
+    play();
135
+
136
+    //第二种方法比较主流,类似的有网页版抖音以及B站
137
+    function play() {
138
+      video.muted = true;//设置视频为静音
139
+      video.play();//调用播放方法
140
+      const ctx = new AudioContext();
141
+      const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
142
+      // 如果是不能播放我们就执行下面的逻辑,其实就是类似于第一种方法,让用户与其交互
143
+      ctx.close();
144
+      if (canAutoPlay) {
145
+        video.muted = false;
146
+        model.style.display = 'none';
147
+        btn.removeEventListener('click', play);
148
+      }
149
+      else {
150
+        model.style.display = 'block';
151
+        btn.addEventListener('click', play);
152
+      }
153
+    }
154
+    play()
155
+
156
+  }
157
+
158
+  async getUrl() {
159
+    await timeService().then(({ data = [], resultCode }) => {
160
+      if (+resultCode === 0) {
161
+        let plannedCompletionData = [], manHourData = [];
162
+        data.map((x, i) => {
163
+          if (x.indexValue || x.indexValue == 0) {
164
+            if (x.indexName == '产量计划完成率') {
165
+              plannedCompletionData.push({
166
+                name: x.factoryName,
167
+                value: Number((x.indexValue * 100).toFixed(2)),
168
+              })
169
+            } else {
170
+              manHourData.push({
171
+                name: x.factoryName,
172
+                // value: Number((x.indexValue * 100).toFixed(2)),
173
+                value: Number(x.indexValue),
174
+              })
175
+            }
176
+          }
177
+        });
178
+        this.setState({ plannedCompletionData, manHourData, plannedCompletionNum: 1, manHourNum: 1 });
179
+      }
180
+    });
181
+  }
182
+  async getUrl2() {
183
+    await numberService().then(({ data = [], resultCode }) => {
184
+      if (+resultCode === 0) {
185
+        let totalValue = 0, yearDecline = 0, yearSend = 0, productInventory = 0;
186
+        data.map((x, i) => {
187
+          if (x.indexName == '产值') {
188
+            totalValue = x.indexValue
189
+          } else if (x.indexName == '年度产量') {
190
+            yearDecline = x.indexValue
191
+          } else if (x.indexName == '产品库存') {
192
+            yearSend = x.indexValue
193
+          } else if (x.indexName == '年度发货量') {
194
+            productInventory = x.indexValue
195
+          }
196
+        });
197
+        this.store.saveState({ totalValue, yearDecline, yearSend, productInventory });
198
+        setTimeout(() => {
199
+          $(".shu1").numScroll();
200
+        }, 2500)
201
+      }
202
+    });
203
+  }
204
+  async getUrl3() {
205
+    await updateTimeService().then(({ data = [], resultCode }) => {
206
+      if (+resultCode === 0) {
207
+        this.setState({ updateTime: data?.[0]?.etlTime || '' })
208
+      }
209
+    });
210
+  }
211
+
212
+  componentWillUnmount() {
213
+    clearInterval(this.timer);
214
+    this.timer = null;
215
+  }
216
+
217
+  fontMsgChange(type) {
218
+    this.timer = setInterval(() => {
219
+      const { plannedCompletionData, plannedCompletionNum, manHourData, manHourNum } = this.state;
220
+
221
+      //产量计划完成率
222
+      var p1 = document.getElementById('plannedCompletionBox');
223
+      const datas_ = plannedCompletionData[plannedCompletionNum - 1];
224
+      var res = "";
225
+      if (datas_) {
226
+        if (type) {
227
+          res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_?.value.toFixed(2)) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_?.name + '</p></div>';
228
+        } else {
229
+          res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_?.value.toFixed(2) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_?.name + '</p></div>';
230
+        }
231
+      }
232
+      p1.innerHTML = res;
233
+
234
+      //百万工时损工率
235
+      var p2 = document.getElementById('manHourBox');
236
+      const datas_2 = manHourData[manHourNum - 1];
237
+      var res2 = "";
238
+      if (datas_2) {
239
+        if (type) {
240
+          res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_2?.value.toFixed(2)) + '</span><p class="topMsg_number_p">' + datas_2?.name + '</p></div>';//<span class="topMsg_number_2">%</span>
241
+        } else {
242
+          res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><p class="topMsg_number_p">' + datas_2?.name + '</p></div>';
243
+        }
244
+      }
245
+      p2.innerHTML = res2;
246
+
247
+      const num_ = plannedCompletionNum + 1 > plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
248
+      const num_2 = manHourNum + 1 > manHourData.length ? 1 : manHourNum + 1;
249
+      this.setState({ plannedCompletionNum: num_, manHourNum: num_2 })
250
+    }, 4000)
251
+  }
252
+
253
+  render() {
254
+    const stores = this.store.state;
255
+    let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
256
+    let { changGif, updateTime, changNun } = this.state;
257
+    return (
258
+      <div className={[styles.tlk_box + ' home_box ']}>
259
+        {/* 水印 */}
260
+        {
261
+          window.urlConfig && window.urlConfig.SHOW_WATERMARK && <div className={"shuiYin"} style={{ backgroundImage: `url(${$store.app.markSrc})`, backgroundRepeat: 'repeat' }}></div>
262
+        }
263
+        {/* 右键切换大屏 */}
264
+        <Tooltip placement="bottom" title={"产供销价值链"}>
265
+          <img src={require("@assets/imgs/iconJpg/rightJ.png").default} alt="" className={"rightJ_png"} onClick={() => {
266
+            deleteCacheAndChangeUrl("/home/gvc", (url) => {
267
+              this.props.history.replace(url);
268
+            })
269
+          }} />
270
+        </Tooltip>
271
+        <Tooltip placement="bottom" title={"产供销价值链"}>
272
+          <img src={require("@assets/imgs/iconJpg/rightJL.png").default} alt="" className={"rightJ_png rightJ_png_L"} onClick={() => {
273
+            deleteCacheAndChangeUrl("/home/gvc", (url) => {
274
+              this.props.history.replace(url);
275
+            })
276
+          }} />
277
+        </Tooltip>
278
+
279
+        {/* 视频播放器 */}
280
+        <MapView></MapView>
281
+        <div className={"video_box"}>
282
+          <video src={require("@assets/imgs/dataVImg/homeVideo2.mp4").default} autoplay="autoplay" loop="loop" class="video2 center_box2 animate__animated animate__fadeIn animate__delay-1s"></video>
283
+        </div>
284
+        <div className={[styles.home + " home cbHome"]}>
285
+          <div className="leftContent">
286
+            <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower animate__delay-2s">
287
+              <div className="bottomContent bigDivPd">
288
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
289
+                  <p className="topMsg_title">产品月度产量 / Monthly Net Production</p>
290
+                </Tooltip>
291
+                <div className="topMsg_content">
292
+                  <OneSendView></OneSendView>
293
+                </div>
294
+              </div>
295
+            </div>
296
+
297
+            <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower animate__delay-2s">
298
+              <div className="bottomContent bigDivPd">
299
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
300
+                  <p className="topMsg_title">产品发货量 / Lithium Shipment</p>
301
+                </Tooltip>
302
+                <div className="topMsg_content">
303
+                  <MoodSendView></MoodSendView>
304
+                </div>
305
+              </div>
306
+            </div>
307
+
308
+
309
+            <div class="center_box2 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
310
+              <div className="center_box">
311
+                <Tooltip placement="bottom" title={<p className="titpeP">
312
+                  <p>● 截止更新日期的主产品库存金额,计算:</p>
313
+                  <img src={require("@assets/imgs/dataVimg/gongshi2.png").default} alt="" style={{ width: "1.3em", margin: " -0.3em 0.5em 0 0em" }} />
314
+                  物料1库存数*物料1移动平均价+物料2*物料2移动平均价+…
315
+                </p>}>
316
+                  <p className="topMsg_title" style={{ position: "relative", zIndex: 999999 }}>产品库存 / Lithium Inventory</p>
317
+                </Tooltip>
318
+                <div className="topMsg_content">
319
+                  <LeftMenoyView></LeftMenoyView>
320
+                </div>
321
+              </div>
322
+            </div>
323
+
324
+
325
+          </div>
326
+
327
+          <div className="centerCon">
328
+            <div class="topMsg3 animate__animated animate__fadeInUp animate__slower">
329
+              <div className="topMsg">
330
+                <div className="topMsg2">
331
+                  <div className="topMsg_content">
332
+                    <div className="center_li">
333
+                      <div className="right_li">
334
+                        {
335
+                          !changNun && <span className="topMsg_number" class="shu1">{yearDecline}</span>
336
+                        }
337
+                        {
338
+                          changNun && <span className="topMsg_number">{getThousandNum(yearDecline)}</span>
339
+                        }
340
+                        <p className="topMsg_line"></p>
341
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的产量合计'}>
342
+                        <span className="topMsg_tip">年度发货量/吨</span>
343
+                        <span className="topMsg_tip topMsg_tip2">Annual Shipments / t</span>
344
+                        </Tooltip>
345
+                      </div>
346
+                    </div>
347
+                    <div className="center_li">
348
+                      <div className="right_li">
349
+                        {
350
+                          !changNun && <span className="topMsg_number" class="shu1">{productInventory}</span>
351
+                        }
352
+                        {
353
+                          changNun && <span className="topMsg_number">{getThousandNum(productInventory)}</span>
354
+                        }
355
+                        <p className="topMsg_line"></p>
356
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的发货量合计。'}>
357
+                        <span className="topMsg_tip">年度产量/吨</span>
358
+                        <span className="topMsg_tip topMsg_tip2">Annual Production / t</span>
359
+                        </Tooltip>
360
+                      </div>
361
+                    </div>
362
+                    <div className="center_li" style={{marginTop:'-24px',height:'78%'}}>
363
+                      {
364
+                        !changNun && <span className="topMsg_number" class="shu1">{yearSend}</span>
365
+                      }
366
+                      {
367
+                        changNun && <span className="topMsg_number">{getThousandNum(yearSend)}</span>
368
+                      }
369
+                      <p className="topMsg_line"></p>
370
+                      <Tooltip placement="bottom" title={' ● 截止更新日期的主产品库存数量。'}>
371
+                      <span className="topMsg_tip">年度产品一次合格率</span>
372
+                      <span className="topMsg_tip topMsg_tip2">Annual First Pass Yield</span>
373
+                      </Tooltip>
374
+                    </div>
375
+                  </div>
376
+                </div>
377
+              </div>
378
+            </div>
379
+            <div class="bottomContent3 animate__animated animate__fadeInUp animate__slower animate__delay-1s">
380
+              <div className="bottomContent">
381
+                <Tooltip placement="bottom" title={' ● 以更新日期为节点近30天的产量数据(含外加工)。'}>
382
+                  <p className="topMsg_title">近90天产量 / Net Production in the last 90 days</p>
383
+                </Tooltip>
384
+                <div className="topMsg_content">
385
+                  <BottomLineForSend></BottomLineForSend>
386
+                </div>
387
+              </div>
388
+            </div>
389
+
390
+          </div>
391
+
392
+          {/* 右侧信息栏 */}
393
+          <div className="rightContent">
394
+            <div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
395
+              <div className="topMsg bigDivPd">
396
+                <Tooltip placement="bottom" title={' ● 近一年的百万工时损工率。'}>
397
+                  <p className="topMsg_title">百万工时损工率</p>
398
+                </Tooltip>
399
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
400
+                  <div className="topMsg_box">
401
+                    <span className="topMsg_number" class="shu1"></span>
402
+                    <span className="topMsg_number_2"></span>
403
+                    <p className="topMsg_number_p"></p>
404
+                  </div>
405
+                </div>
406
+              </div>
407
+            </div>
408
+
409
+            <div class="topMsg_22 animate__animated animate__fadeInDown animate__slower">
410
+              <div className="topMsg_2">
411
+                <Tooltip placement="bottom" title={' ● 近六个月的主产品一次合格率,当月的数据计算至更新日期。'}>
412
+                  <p className="topMsg_title">锂辉石消耗量 / Spodumene Consumption</p>
413
+                </Tooltip>
414
+
415
+                <div className="topMsg_content">
416
+                  <OneQualified></OneQualified>
417
+                </div>
418
+              </div>
419
+            </div>
420
+
421
+            <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower  animate__delay-1s">
422
+              <div className="bottomContent bigDivPd">
423
+                <Tooltip placement="bottom" title={' ● 近三年的碳排放总量、碳排放强度数据'}>
424
+                  <p className="topMsg_title">产品一次合格率 / First Pass Yield</p>
425
+                </Tooltip>
426
+                <div className="topMsg_content">
427
+                  <RightBottomView></RightBottomView>
428
+                </div>
429
+              </div>
430
+            </div>
431
+          </div>
432
+          <div className="bottom_box">
433
+            <p style={{ color: "#6a818d", lineHeight: '2px' }}>
434
+              更新日期 : {updateTime ? updateTime.split(" ")[0] : updateTime}
435
+            </p>
436
+          </div>
437
+
438
+        </div>
439
+      </div>
440
+    )
441
+  }
442
+}
443
+export default Home;

+ 6 - 0
src/router/router.js

@@ -15,6 +15,7 @@ import NotFound from "@pages/notFound/view.jsx";
15 15
 import Home from '@pages/home/view.jsx';
16 16
 import HomeForchaBaiDao from '@pages/tqcDataVHome/view.jsx';
17 17
 import GVC from '@pages/gvc/view.jsx';
18
+import TLK from '@pages/tlk/view.jsx';
18 19
 import JurisDiction from '@pages/jurisDiction/view.jsx';
19 20
 import Loading from "@components/Loading/view.jsx";
20 21
 import $store from "@store/";
@@ -67,6 +68,11 @@ const routes = [
67 68
         path: "/home/gvc",
68 69
         component: GVC,
69 70
       },
71
+      {
72
+        name: "TLK运营数据中心",
73
+        path: "/home/tlk",
74
+        component: TLK,
75
+      },
70 76
     ],
71 77
   },
72 78
   {