This commit is contained in:
wyw 2024-04-30 17:23:46 +08:00
commit 347faedc64
9 changed files with 4669 additions and 1808 deletions

File diff suppressed because it is too large Load Diff

View File

@ -63,14 +63,359 @@ class BI008RiskAnalysis extends React.Component {
getBaseInfoData = () => {
const json2 = initFilter(this.props.login.OrgId);
extendOrder(json2, "CREATE_TIME", 1);
this.props.dispatch({
type: "app/getDataByPost",
url: "BI/BIController/getRiskData",
payload: json2,
onlyData: false,
onComplete: (ret) => {
if (ret) {
this.state.retData = ret?.Data.RISKLEVELCOUNTS;
// this.props.dispatch({
// type: "app/getDataByPost",
// url: "BI/BIController/getRiskData",
// payload: json2,
// onlyData: false,
// onComplete: (ret) => {
// if (ret) {
// console.log(ret);
let ret = {
IsSuccessful: true,
Data: {
RISKLEVELCOUNTS: [
{
NAME: "选矿部",
LEVEL1: 0,
LEVEL2: 82,
LEVEL3: 311,
LEVEL4: 1834,
},
{
NAME: "矿山部",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 70,
LEVEL4: 378,
},
{
NAME: "生产一班",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "机电设备管理办公室",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "财务部",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "办公室",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "非金属资源部筹备组",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "企业管理部",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "技术管理部",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
{
NAME: "营销部",
LEVEL1: 0,
LEVEL2: 0,
LEVEL3: 0,
LEVEL4: 0,
},
],
AREACOUNTS: [
{
AREANAME: "破碎车间-粗碎单元",
AREACOUNT: 1,
AREATYPE: 1,
},
{
AREANAME: "综合回收车间-精多金属仓库单元",
AREACOUNT: 2,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-脱泥单元",
AREACOUNT: 3,
AREATYPE: 1,
},
{
AREANAME: "食堂",
AREACOUNT: 3,
AREATYPE: 0,
},
{
AREANAME: "综合回收车间-精矿烘干单元",
AREACOUNT: 4,
AREATYPE: 1,
},
{
AREANAME: "尾矿库截渗池回水单元",
AREACOUNT: 4,
AREATYPE: 1,
},
{
AREANAME: "破碎车间-辊磨单元",
AREACOUNT: 6,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-中矿再磨单元",
AREACOUNT: 9,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-粗粒选别单元",
AREACOUNT: 9,
AREATYPE: 1,
},
{
AREANAME: "加油站-采场",
AREACOUNT: 11,
AREATYPE: 0,
},
{
AREANAME: "尾矿库截洪单元",
AREACOUNT: 19,
AREATYPE: 1,
},
{
AREANAME: "采场道路",
AREACOUNT: 20,
AREATYPE: 0,
},
{
AREANAME: "破碎车间-放矿运输单元",
AREACOUNT: 21,
AREATYPE: 1,
},
{
AREANAME: "卢家边回水单元",
AREACOUNT: 22,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-回水单元",
AREACOUNT: 22,
AREATYPE: 1,
},
{
AREANAME: "综合回收车间-硫化矿综合回收单元",
AREACOUNT: 23,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-细粒选别单元",
AREACOUNT: 27,
AREATYPE: 1,
},
{
AREANAME: "尾矿库库区",
AREACOUNT: 31,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-磨矿分级单元",
AREACOUNT: 32,
AREATYPE: 1,
},
{
AREANAME: "截渗池回水单元",
AREACOUNT: 32,
AREATYPE: 1,
},
{
AREANAME: "加油站",
AREACOUNT: 34,
AREATYPE: 0,
},
{
AREANAME: "钨细泥回收车间-取砂单元",
AREACOUNT: 38,
AREATYPE: 1,
},
{
AREANAME: "采场-排土场",
AREACOUNT: 39,
AREATYPE: 0,
},
{
AREANAME: "综合回收车间",
AREACOUNT: 40,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-给料单元",
AREACOUNT: 42,
AREATYPE: 1,
},
{
AREANAME: "排土场",
AREACOUNT: 45,
AREATYPE: 0,
},
{
AREANAME: "尾矿库库内回水单元",
AREACOUNT: 50,
AREATYPE: 1,
},
{
AREANAME: "维修场",
AREACOUNT: 52,
AREATYPE: 0,
},
{
AREANAME: "炸药库区",
AREACOUNT: 55,
AREATYPE: 0,
},
{
AREANAME: "尾矿库库坝单元",
AREACOUNT: 55,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-配药单元",
AREACOUNT: 62,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-排尾单元",
AREACOUNT: 71,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-脱硫单元",
AREACOUNT: 79,
AREATYPE: 1,
},
{
AREANAME: "磨矿变配电区",
AREACOUNT: 86,
AREATYPE: 1,
},
{
AREANAME: "磨重车间-机修房",
AREACOUNT: 90,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-浓密机单元",
AREACOUNT: 90,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-脱泥单元",
AREACOUNT: 153,
AREATYPE: 1,
},
{
AREANAME: "破碎车间",
AREACOUNT: 164,
AREATYPE: 1,
},
{
AREANAME: "磨重车间",
AREACOUNT: 174,
AREATYPE: 1,
},
{
AREANAME: "钨细泥回收车间-低钨回收单元",
AREACOUNT: 180,
AREATYPE: 1,
},
{
AREANAME: "采场",
AREACOUNT: 189,
AREATYPE: 0,
},
{
AREANAME: "机电设备科作业区",
AREACOUNT: 257,
AREATYPE: 1,
},
{
AREANAME: "配电单元",
AREACOUNT: 368,
AREATYPE: 1,
},
],
DATECOUNTS: [
{
DATE: "2024-01-31 23:59:59",
COUNT: 2714,
TYPE: 0,
},
{
DATE: "2024-01-31 23:59:59",
COUNT: 50,
TYPE: 1,
},
{
DATE: "2024-02-29 23:59:59",
COUNT: 2714,
TYPE: 0,
},
{
DATE: "2024-02-29 23:59:59",
COUNT: 50,
TYPE: 1,
},
{
DATE: "2024-03-31 23:59:59",
COUNT: 2714,
TYPE: 0,
},
{
DATE: "2024-03-31 23:59:59",
COUNT: 50,
TYPE: 1,
},
{
DATE: "2024-04-30 23:59:59",
COUNT: 2714,
TYPE: 0,
},
{
DATE: "2024-04-30 23:59:59",
COUNT: 51,
TYPE: 1,
},
],
RISKTOTALCOUNT: 2714,
HAZARDTOTALCOUNT: 51,
MEASURESTOTALCOUNT: 653,
},
TotalCount: 0,
MessageType: 0,
};
// this.state.retData = ret?.Data.RISKLEVELCOUNTS;
this.setState({
retData:ret.Data.RISKLEVELCOUNTS
})
let level1all = 0;
let level2all = 0;
let level3all = 0;
@ -88,7 +433,7 @@ class BI008RiskAnalysis extends React.Component {
this.state.HAZARDTOTALCOUNT = ret.Data.HAZARDTOTALCOUNT;
this.state.RISKTOTALCOUNT = ret.Data.RISKTOTALCOUNT;
this.state.MEASURESTOTALCOUNT = ret.Data.MEASURESTOTALCOUNT;
}
// }
this.chart1();
this.chart2(
ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 0).slice(0, 10)
@ -97,8 +442,8 @@ class BI008RiskAnalysis extends React.Component {
ret?.Data.AREACOUNTS.filter((t) => t.AREATYPE == 1).slice(0, 10)
);
this.chart4(ret?.Data.DATECOUNTS);
},
});
// },
// });
};
chart1 = () => {
let showData = [
@ -113,7 +458,11 @@ class BI008RiskAnalysis extends React.Component {
color: ["#c92a2a", "#ffa94d", "#ffe066", "#4285F4", "#fa8a89"],
title: [
{
text:this.state.LEVEL1TOTAL+this.state.LEVEL2TOTAL+this.state.LEVEL3TOTAL+this.state.LEVEL4TOTAL ,
text:
this.state.LEVEL1TOTAL +
this.state.LEVEL2TOTAL +
this.state.LEVEL3TOTAL +
this.state.LEVEL4TOTAL,
x: "24%",
y: "40%",
textStyle: {
@ -709,7 +1058,7 @@ class BI008RiskAnalysis extends React.Component {
alignItems: "center",
justifyContent: "space-around",
border: "1px #888 solid",
padding: "8px 0px"
padding: "8px 0px",
}}
>
<div
@ -799,9 +1148,7 @@ class BI008RiskAnalysis extends React.Component {
<Row gutter={10} style={{ marginTop: "14px" }}>
<Col span={1}></Col>
<Col span={22}>
<div
style={{ border: "1px solid rgb(232,232,232)" }}
>
<div style={{ border: "1px solid rgb(232,232,232)" }}>
<div id="chart4" style={{ width: "100%", height: "350px" }}></div>
</div>
</Col>
@ -815,18 +1162,18 @@ class BI008RiskAnalysis extends React.Component {
></hr> */}
<Row gutter={10} style={{ marginTop: "24px" }}>
<Col span={1}></Col>
<Col span={11} style={{borderRight:'1px solid #e7e6e4'}}>
<Col span={11} style={{ borderRight: "1px solid #e7e6e4" }}>
<div
// className="dashboard-div-style"
// style={{ border: "1px gray dotted" }}
// className="dashboard-div-style"
// style={{ border: "1px gray dotted" }}
>
<div id="chart2" style={{ width: "100%", height: "400px" }}></div>
</div>
</Col>
<Col span={11}>
<div
// className="dashboard-div-style"
// style={{ border: "1px gray dotted" }}
// className="dashboard-div-style"
// style={{ border: "1px gray dotted" }}
>
<div id="chart3" style={{ width: "100%", height: "400px" }}></div>
</div>

View File

@ -94,29 +94,79 @@ class TrainSafeAnalysis extends React.Component {
this.loadData(this.state.searchMonth);
}
loadData = (startTime) => {
const json = initFilter(this.props.login.OrgId);
this.state.showLoading = true;
json.Parameter1 = startTime;
this.props.dispatch({
type: "app/getDataByPost",
url: "BI/BIController/getSafeTrainData",
payload: json,
onlyData: false,
onComplete: (ret) => {
if (ret) {
this.state.showLoading = false;
this.state.NUM1 = ret.Data.NUM1;
this.state.NUM2 = ret.Data.NUM2;
this.state.NUM3 = ret.Data.NUM3;
this.state.NUM4 = ret.Data.NUM4;
this.state.NUM5 = ret.Data.NUM5;
this.state.NUM6 = ret.Data.NUM6;
this.state.NUM7 = ret.Data.NUM7;
this.state.retData = ret.Data.trainRecords;
this.chart1(ret.Data.dateCountModel);
}
// const json = initFilter(this.props.login.OrgId);
// this.state.showLoading = true;
// json.Parameter1 = startTime;
// this.props.dispatch({
// type: "app/getDataByPost",
// url: "BI/BIController/getSafeTrainData",
// payload: json,
// onlyData: false,
// onComplete: (ret) => {
// if (ret) {
let ret = {
IsSuccessful: true,
Data: {
NUM1: 1,
NUM2: 94,
NUM3: 42,
NUM4: 13,
NUM5: 14,
NUM6: 15,
NUM7: 539,
trainRecords: [],
dateCountModel: [
{
DATE: "2024-01-01 00:00:00",
COUNT: 44,
TYPE: 0,
},
{
DATE: "2024-02-01 00:00:00",
COUNT: 50,
TYPE: 0,
},
{
DATE: "2024-03-01 00:00:00",
COUNT: 0,
TYPE: 0,
},
{
DATE: "2024-04-01 00:00:00",
COUNT: 0,
TYPE: 0,
},
],
},
});
TotalCount: 0,
MessageType: 0,
};
this.setState(
{
showLoading: false,
NUM1: ret.Data.NUM1,
NUM2: ret.Data.NUM2,
NUM3: ret.Data.NUM3,
NUM4: ret.Data.NUM4,
NUM5: ret.Data.NUM5,
NUM6: ret.Data.NUM6,
NUM7: ret.Data.NUM7,
retData: ret.Data.trainRecords,
}
);
// this.state.showLoading = false;
// this.state.NUM1 = ret.Data.NUM1;
// this.state.NUM2 = ret.Data.NUM2;
// this.state.NUM3 = ret.Data.NUM3;
// this.state.NUM4 = ret.Data.NUM4;
// this.state.NUM5 = ret.Data.NUM5;
// this.state.NUM6 = ret.Data.NUM6;
// this.state.NUM7 = ret.Data.NUM7;
// this.state.retData = ret.Data.trainRecords;
this.chart1(ret.Data.dateCountModel);
// }
// },
// });
};
chart1 = (ret) => {
this.state.recordNums = [];
@ -398,7 +448,7 @@ class TrainSafeAnalysis extends React.Component {
style={{
// borderRadius: "10px",
backgroundColor: "white",
border: "1px solid rgb(232,232,232)"
border: "1px solid rgb(232,232,232)",
// boxShadow: "0px 0px 10px rgba(0,0,0,.15)",
}}
>
@ -418,8 +468,8 @@ class TrainSafeAnalysis extends React.Component {
<Col span={1}></Col>
<Col span={22} style={{ height: "100%" }}>
<div
// className="dashboard-div-style"
// style={{ boxShadow: "0px 0px 10px rgba(0,0,0,.15)" }}
// className="dashboard-div-style"
// style={{ boxShadow: "0px 0px 10px rgba(0,0,0,.15)" }}
>
<Table
dataSource={this.state.retData}

File diff suppressed because it is too large Load Diff

View File

@ -405,10 +405,10 @@ function Header(props) {
<GuideCode />
<HeaderNav />
{/* style={{"color":"#f3eded"}} */}
{/* <HeaderUser /> */}
{/* <b>
<HeaderUser />
<b>
{props.login.user.NAME}({props.login.user.CODE})
</b> */}
</b>
</div>
) : null}
</div>

View File

@ -84,7 +84,7 @@
&-icon {
font-size: 22px !important;
color: #909399 !important; //f3eded
// color: #909399 !important; //f3eded
cursor: pointer;
}

View File

@ -29,6 +29,8 @@
flex-direction: column;
flex: 1;
width: calc(100% - 100px);
// overflow-x: hidden;
overflow: auto;
}
&-sider {

View File

@ -108,22 +108,19 @@ const WorkBench = (props) => {
style={{
marginLeft: "20px",
marginRight: "20px",
whiteSpace: "nowrap",
}}
>
{type}
</div>
<div
className="home-work-title"
style={{ flex: 1, alignItems: "flex-start" }}
>
{item.NOTICE_TITLE}
</div>
<div className="home-work-title">{item.NOTICE_TITLE}</div>
<div
className="home-work-date"
style={{
width: "200px",
marginRight: "100px",
// width: "200px",
whiteSpace: "nowrap",
marginRight: "20px",
}}
>
开始时间{item.TASK_STARTDT}
@ -131,8 +128,9 @@ const WorkBench = (props) => {
<div
className="home-work-date"
style={{
width: "200px",
marginRight: "50px",
// width: "200px",
whiteSpace: "nowrap",
marginRight: "10px",
}}
>
结束时间{item.TASK_ENDDT}
@ -1575,10 +1573,10 @@ class Home extends React.Component {
width: "100%",
height: "25%",
display: "flex",
padding: "0px 20px",
// padding: "0px 20px",
margin: "0px",
minHeight: "242px",
minWidth: "1704px",
minWidth: "1136px",
// justifyContent: "space-between",
// backgroundColor: "#fff",
}}
@ -1592,7 +1590,7 @@ class Home extends React.Component {
flexDirection: "column",
padding: "0px 20px",
borderRadius: "5px 0px 0px 5px",
minWidth: "578px",
minWidth: "453px",
}}
>
<div
@ -1732,14 +1730,14 @@ class Home extends React.Component {
</div>
<div style={{ display: "flex", flexDirection: "row" }}>
<div
{/* <div
className="home-userInfo-tabs"
style={{
marginRight: "10px",
}}
>
工号{this.state.userInfo.CODE}
</div>
</div> */}
<div
className="home-userInfo-tabs"
style={{
@ -1759,38 +1757,46 @@ class Home extends React.Component {
</div>
</div>
<div className="home-userInfo-card">
<UserInfo
data={this.state.workTotal.todoCount}
title="待办事项"
color="#2177d5"
showAll={() => {
this.showAll("1");
}}
/>
<UserInfo
data={this.state.workTotal.timeOverCount}
title="待办超时"
color="#f76707"
showAll={() => {
this.showAll("4");
}}
/>
<UserInfo
data={this.state.workTotal.doneCount}
title="已办事项"
color="#48a447"
showAll={() => {
this.showAll("2");
}}
/>
<UserInfo
data={this.state.workTotal.todayNewCount}
title="今日提醒"
color="#fcc419"
showAll={() => {
this.showAll("3");
}}
/>
<Col span={6}>
<UserInfo
data={this.state.workTotal.todoCount}
title="待办事项"
color="#2177d5"
showAll={() => {
this.showAll("1");
}}
/>
</Col>
<Col span={6}>
<UserInfo
data={this.state.workTotal.timeOverCount}
title="待办超时"
color="#f76707"
showAll={() => {
this.showAll("4");
}}
/>
</Col>
<Col span={6}>
<UserInfo
data={this.state.workTotal.doneCount}
title="已办事项"
color="#48a447"
showAll={() => {
this.showAll("2");
}}
/>
</Col>
<Col span={6}>
<UserInfo
data={this.state.workTotal.todayNewCount}
title="今日提醒"
color="#fcc419"
showAll={() => {
this.showAll("3");
}}
/>
</Col>
</div>
</Col>
{/* <div style={{ width: "30px" }}></div> */}
@ -1874,7 +1880,7 @@ class Home extends React.Component {
borderRadius: "5px",
display: "flex",
flexDirection: "column",
minWidth: "466px",
minWidth: "344px",
}}
>
<div className="home-always-title">
@ -1955,12 +1961,14 @@ class Home extends React.Component {
width: "100%",
height: "40%",
display: "flex",
padding: "0px 20px",
// padding: "0px 20px",
margin: "30px 0px",
justifyContent: "space-between",
// justifyContent: "space-between",
alignItems: "center",
minHeight: "388px",
minWidth: "1704px",
overflow:'hidden',
// minWidth: "1204px",
minWidth: "1136px",
// backgroundColor: "#fff",
}}
>
@ -1973,8 +1981,9 @@ class Home extends React.Component {
flexDirection: "column",
padding: "0px",
borderRadius: "5px",
overflow:'hidden',
flex: 1,
minWidth: "1168px",
// minWidth: "768px",
}}
>
<div className="home-always-title">
@ -2125,7 +2134,7 @@ class Home extends React.Component {
borderRadius: "5px",
display: "flex",
flexDirection: "column",
minWidth: "466px",
minWidth: "344px",
}}
>
<div className="home-always-title">
@ -2200,7 +2209,8 @@ class Home extends React.Component {
style={{
margin: "0px 0px 10px 0px",
minHeight: "275px",
minWidth: "1704px",
// minWidth: "1204px",
minWidth: "1136px",
}}
>
<Col
@ -2285,7 +2295,7 @@ class Home extends React.Component {
borderRadius: "5px",
display: "flex",
flexDirection: "column",
minWidth: "466px",
minWidth: "344px",
}}
>
<div className="home-always-title">

View File

@ -34,6 +34,7 @@
padding: 3px 10px;
border-radius: 15px;
border: 1px solid #55c596;
white-space: nowrap;
}
:global(.home-userInfo-card) {
height: 50%;
@ -52,7 +53,8 @@
height: 100%;
justify-content: space-between;
border-radius: 10px;
width: calc(25% - 10px);
min-width: 100px;
/* width: calc(25% - 10px); */
}
:global(.home-userInfo-pad) {
display: flex;
@ -69,6 +71,7 @@
color: #303133;
font-weight: bold;
white-space: nowrap;
margin-right: 5px;
}
:global(.home-userInfo-content) {
font-size: 24px;
@ -143,7 +146,7 @@
width: 100%;
height: calc(35% - 70px);
display: flex;
padding: 0px 20px;
/* padding: 0px 20px; */
justify-content: space-between;
align-items: center;
}
@ -173,8 +176,11 @@
:global(.home-rank-name) {
color: #303133;
font-size: 13px;
margin-right: 40px;
margin-right: 20px;
width: 90px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
:global(.home-img) {
object-fit: contain;
@ -328,10 +334,12 @@
font-size: 15px;
color: #303133;
padding: 5px 0px;
font-weight: bold;
/* font-weight: bold; */
white-space: nowrap;
/* width: 250px; */
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
:global(.home-work-date) {
color: #909399;
@ -349,7 +357,7 @@
flex-direction: column;
background-color: #fff;
border-radius: 5px;
min-width: 574px;
/* min-width: 374px; */
}
:global(.home-setting) {
display: flex;