|
|
@@ -12,41 +12,12 @@
|
|
12
|
12
|
*/
|
|
13
|
13
|
|
|
14
|
14
|
import React, { useState, useEffect, Component } from "react";
|
|
15
|
|
-import PropTypes from "prop-types";
|
|
16
|
15
|
import styles from "./style.less";
|
|
17
|
16
|
import { useHistory, useLocation, withRouter } from "react-router-dom";
|
|
18
|
17
|
import { observer, observable } from "mobx-react";
|
|
19
|
18
|
import { message, Space, Form, Popconfirm, Modal, Carousel, Icon, Button } from "antd";
|
|
20
|
|
-import Flex from "@components/Space/view";
|
|
21
|
|
-import { dealDiffSheetType, crossMenuClick, isTimes } from "@utils/util";
|
|
22
|
|
-import moment from "moment";
|
|
23
|
|
-import {
|
|
24
|
|
- getDmpAccessUrl,
|
|
25
|
|
- getFineBiToken,
|
|
26
|
|
- getValueByDictCode,
|
|
27
|
|
- getSunwayAccessUrl,
|
|
28
|
|
-} from "../frame/component/top/api";
|
|
29
|
|
-import $store from "@store/";
|
|
30
|
|
-import {
|
|
31
|
|
- getAccountComresourcesNew,
|
|
32
|
|
- deleteById,
|
|
33
|
|
- insertSysComresourceAccountRelationEntityNew,
|
|
34
|
|
- getAccountAllCareResource,
|
|
35
|
|
- getLoginUserFineResourceTreebottomLineForSend
|
|
36
|
|
-} from "@apis/work";
|
|
37
|
|
-import { cloneDeep, get } from 'lodash'
|
|
38
|
|
-import {
|
|
39
|
|
- getAllRolesVo, //获取所有角色
|
|
40
|
|
- listUserModuleBulletinsNew
|
|
41
|
|
-} from "@apis/system";
|
|
42
|
|
-import { getAccountTypePage, getBaselistAll } from '@apis/personal'
|
|
43
|
19
|
import mod from './mod';
|
|
44
|
20
|
import { toJS } from "mobx";
|
|
45
|
|
-import TreeSearch from "@components/TreeSelectSearch/view";
|
|
46
|
|
-import {
|
|
47
|
|
- StarFilled,
|
|
48
|
|
-} from "@ant-design/icons";
|
|
49
|
|
-import ModelBox from "@components/modelBox/view.jsx";
|
|
50
|
21
|
import BottomLineForSend from "./component/bottomLineForSend.jsx";
|
|
51
|
22
|
import MoodSendView from "./component/moodSendView.jsx";
|
|
52
|
23
|
import LeftMenoyView from "./component/leftMenoyView.jsx";
|
|
|
@@ -63,10 +34,26 @@ class Home extends Component {
|
|
63
|
34
|
this.store = mod;
|
|
64
|
35
|
this.state = {
|
|
65
|
36
|
changGif: false,
|
|
|
37
|
+ plannedCompletionData:[
|
|
|
38
|
+ {name:'射洪',value:78.1},
|
|
|
39
|
+ {name:'广东',value:12},
|
|
|
40
|
+ {name:'珠海',value:65},
|
|
|
41
|
+ {name:'潮汕',value:45},
|
|
|
42
|
+ ],
|
|
|
43
|
+ plannedCompletionNum:1,
|
|
|
44
|
+ manHourData:[
|
|
|
45
|
+ {name:'射洪',value:0.2},
|
|
|
46
|
+ {name:'广东',value:33},
|
|
|
47
|
+ {name:'珠海',value:65},
|
|
|
48
|
+ {name:'潮汕',value:65},
|
|
|
49
|
+ ],
|
|
|
50
|
+ manHourNum:1,
|
|
66
|
51
|
};
|
|
|
52
|
+ this.timer = null //定时器,用于检测同步状态
|
|
67
|
53
|
}
|
|
68
|
54
|
|
|
69
|
55
|
componentDidMount() {
|
|
|
56
|
+ this.fontMsgChange();
|
|
70
|
57
|
setTimeout(() => {
|
|
71
|
58
|
$(".shu1").numScroll();
|
|
72
|
59
|
this.videoStart();
|
|
|
@@ -74,6 +61,7 @@ class Home extends Component {
|
|
74
|
61
|
setTimeout(() => {
|
|
75
|
62
|
//替换gif
|
|
76
|
63
|
this.setState({ changGif: true });
|
|
|
64
|
+
|
|
77
|
65
|
}, 2000)
|
|
78
|
66
|
}
|
|
79
|
67
|
videoStart() {
|
|
|
@@ -131,12 +119,36 @@ class Home extends Component {
|
|
131
|
119
|
|
|
132
|
120
|
}
|
|
133
|
121
|
|
|
134
|
|
- render() {
|
|
135
|
|
- const stores = this.store.state;
|
|
136
|
|
- const { changGif } = this.state;
|
|
|
122
|
+ componentDidCatch(){
|
|
|
123
|
+ clearInterval(this.timer);
|
|
|
124
|
+ this.timer = null;
|
|
|
125
|
+ }
|
|
|
126
|
+
|
|
|
127
|
+ fontMsgChange(){
|
|
|
128
|
+ this.timer = setInterval(() => {
|
|
|
129
|
+ const { plannedCompletionData,plannedCompletionNum,manHourData,manHourNum } = this.state;
|
|
137
|
130
|
|
|
|
131
|
+ //产量计划完成率
|
|
|
132
|
+ var p1 = document.getElementById('plannedCompletionBox');
|
|
|
133
|
+ const datas_ = plannedCompletionData[plannedCompletionNum-1];
|
|
|
134
|
+ var res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_.value + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">'+datas_.name+'</p></div>';
|
|
|
135
|
+ p1.innerHTML = res;
|
|
138
|
136
|
|
|
|
137
|
+ //百万工时损工率
|
|
|
138
|
+ var p2 = document.getElementById('manHourBox');
|
|
|
139
|
+ const datas_2 = manHourData[manHourNum-1];
|
|
|
140
|
+ var res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2.value + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">'+datas_2.name+'</p></div>';
|
|
|
141
|
+ p2.innerHTML = res;
|
|
139
|
142
|
|
|
|
143
|
+ const num_ = plannedCompletionNum+1 >= plannedCompletionData.length ? 1 : plannedCompletionNum+1;
|
|
|
144
|
+ const num_2 = manHourNum+1 >= manHourData.length ? 1 : manHourNum+1;
|
|
|
145
|
+ this.setState({plannedCompletionNum:num_,manHourNum:num_2})
|
|
|
146
|
+ }, 4000)
|
|
|
147
|
+ }
|
|
|
148
|
+
|
|
|
149
|
+ render() {
|
|
|
150
|
+ const stores = this.store.state;
|
|
|
151
|
+ const { changGif,plannedCompletionData } = this.state;
|
|
140
|
152
|
|
|
141
|
153
|
return (
|
|
142
|
154
|
<div className={"home_box"}>
|
|
|
@@ -221,7 +233,7 @@ class Home extends Component {
|
|
221
|
233
|
<div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
|
|
222
|
234
|
<div className="topMsg bigDivPd">
|
|
223
|
235
|
<p className="topMsg_title">百万工时损工率</p>
|
|
224
|
|
- <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
|
|
|
236
|
+ <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
|
|
225
|
237
|
<div className="topMsg_box">
|
|
226
|
238
|
<span className="topMsg_number" class="shu1">232425.23</span><span className="topMsg_number_2">%</span>
|
|
227
|
239
|
<p className="topMsg_number_p">谢洪</p>
|
|
|
@@ -242,7 +254,7 @@ class Home extends Component {
|
|
242
|
254
|
<div class="topMsg_33 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
|
|
243
|
255
|
<div className="topMsg_3">
|
|
244
|
256
|
<p className="topMsg_title">产量计划完成率</p>
|
|
245
|
|
- <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
|
|
|
257
|
+ <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox">
|
|
246
|
258
|
<div className="topMsg_box">
|
|
247
|
259
|
<span className="topMsg_number" class="shu1">78.1</span><span className="topMsg_number_2">%</span>
|
|
248
|
260
|
<p className="topMsg_number_p">谢洪</p>
|