diff --git a/src/assets/riskone/1-1.png b/src/assets/riskone/1-1.png new file mode 100644 index 0000000..320f882 Binary files /dev/null and b/src/assets/riskone/1-1.png differ diff --git a/src/assets/riskone/1-2.png b/src/assets/riskone/1-2.png new file mode 100644 index 0000000..7b56b26 Binary files /dev/null and b/src/assets/riskone/1-2.png differ diff --git a/src/assets/riskone/1-3.png b/src/assets/riskone/1-3.png new file mode 100644 index 0000000..389aeba Binary files /dev/null and b/src/assets/riskone/1-3.png differ diff --git a/src/assets/riskone/1-4.png b/src/assets/riskone/1-4.png new file mode 100644 index 0000000..4d86b9f Binary files /dev/null and b/src/assets/riskone/1-4.png differ diff --git a/src/assets/riskone/2-1.png b/src/assets/riskone/2-1.png new file mode 100644 index 0000000..f745bc1 Binary files /dev/null and b/src/assets/riskone/2-1.png differ diff --git a/src/assets/riskone/2-2.png b/src/assets/riskone/2-2.png new file mode 100644 index 0000000..49afcdb Binary files /dev/null and b/src/assets/riskone/2-2.png differ diff --git a/src/assets/riskone/2-3.png b/src/assets/riskone/2-3.png new file mode 100644 index 0000000..c8b5224 Binary files /dev/null and b/src/assets/riskone/2-3.png differ diff --git a/src/assets/riskone/2-4.png b/src/assets/riskone/2-4.png new file mode 100644 index 0000000..e401f11 Binary files /dev/null and b/src/assets/riskone/2-4.png differ diff --git a/src/assets/riskone/3-1.png b/src/assets/riskone/3-1.png new file mode 100644 index 0000000..dc8ece1 Binary files /dev/null and b/src/assets/riskone/3-1.png differ diff --git a/src/assets/riskone/3-2.png b/src/assets/riskone/3-2.png new file mode 100644 index 0000000..9aaa629 Binary files /dev/null and b/src/assets/riskone/3-2.png differ diff --git a/src/assets/riskone/3-3.png b/src/assets/riskone/3-3.png new file mode 100644 index 0000000..b158375 Binary files /dev/null and b/src/assets/riskone/3-3.png differ diff --git a/src/assets/riskone/3-4.png b/src/assets/riskone/3-4.png new file mode 100644 index 0000000..6a268eb Binary files /dev/null and b/src/assets/riskone/3-4.png differ diff --git a/src/assets/riskone/4-1.png b/src/assets/riskone/4-1.png new file mode 100644 index 0000000..dde72a4 Binary files /dev/null and b/src/assets/riskone/4-1.png differ diff --git a/src/assets/riskone/4-2.png b/src/assets/riskone/4-2.png new file mode 100644 index 0000000..d48ac1c Binary files /dev/null and b/src/assets/riskone/4-2.png differ diff --git a/src/assets/riskone/4-3.png b/src/assets/riskone/4-3.png new file mode 100644 index 0000000..ec5119a Binary files /dev/null and b/src/assets/riskone/4-3.png differ diff --git a/src/assets/riskone/4-4.png b/src/assets/riskone/4-4.png new file mode 100644 index 0000000..8e07f36 Binary files /dev/null and b/src/assets/riskone/4-4.png differ diff --git a/src/assets/riskone/5-1.png b/src/assets/riskone/5-1.png new file mode 100644 index 0000000..1cf8789 Binary files /dev/null and b/src/assets/riskone/5-1.png differ diff --git a/src/assets/riskone/5-2.png b/src/assets/riskone/5-2.png new file mode 100644 index 0000000..1d5c31d Binary files /dev/null and b/src/assets/riskone/5-2.png differ diff --git a/src/assets/riskone/5-3.png b/src/assets/riskone/5-3.png new file mode 100644 index 0000000..73d4496 Binary files /dev/null and b/src/assets/riskone/5-3.png differ diff --git a/src/assets/riskone/5-4.png b/src/assets/riskone/5-4.png new file mode 100644 index 0000000..221e1f4 Binary files /dev/null and b/src/assets/riskone/5-4.png differ diff --git a/src/assets/riskone/back.jpg b/src/assets/riskone/back.jpg new file mode 100644 index 0000000..efd4f41 Binary files /dev/null and b/src/assets/riskone/back.jpg differ diff --git a/src/assets/riskone/backno.JPG b/src/assets/riskone/backno.JPG new file mode 100644 index 0000000..dde6c02 Binary files /dev/null and b/src/assets/riskone/backno.JPG differ diff --git a/src/assets/riskthree/1-1.png b/src/assets/riskthree/1-1.png new file mode 100644 index 0000000..433b8a7 Binary files /dev/null and b/src/assets/riskthree/1-1.png differ diff --git a/src/assets/riskthree/1-2.png b/src/assets/riskthree/1-2.png new file mode 100644 index 0000000..d5e6130 Binary files /dev/null and b/src/assets/riskthree/1-2.png differ diff --git a/src/assets/riskthree/1-3.png b/src/assets/riskthree/1-3.png new file mode 100644 index 0000000..531e246 Binary files /dev/null and b/src/assets/riskthree/1-3.png differ diff --git a/src/assets/riskthree/1-4.png b/src/assets/riskthree/1-4.png new file mode 100644 index 0000000..7edbb6a Binary files /dev/null and b/src/assets/riskthree/1-4.png differ diff --git a/src/assets/riskthree/2-1.png b/src/assets/riskthree/2-1.png new file mode 100644 index 0000000..e69cc28 Binary files /dev/null and b/src/assets/riskthree/2-1.png differ diff --git a/src/assets/riskthree/2-2.png b/src/assets/riskthree/2-2.png new file mode 100644 index 0000000..b1d798e Binary files /dev/null and b/src/assets/riskthree/2-2.png differ diff --git a/src/assets/riskthree/2-3.png b/src/assets/riskthree/2-3.png new file mode 100644 index 0000000..8022efc Binary files /dev/null and b/src/assets/riskthree/2-3.png differ diff --git a/src/assets/riskthree/2-4.png b/src/assets/riskthree/2-4.png new file mode 100644 index 0000000..eaabb48 Binary files /dev/null and b/src/assets/riskthree/2-4.png differ diff --git a/src/assets/riskthree/back.jpg b/src/assets/riskthree/back.jpg new file mode 100644 index 0000000..d103251 Binary files /dev/null and b/src/assets/riskthree/back.jpg differ diff --git a/src/assets/riskthree/backno.JPG b/src/assets/riskthree/backno.JPG new file mode 100644 index 0000000..57f5798 Binary files /dev/null and b/src/assets/riskthree/backno.JPG differ diff --git a/src/assets/risktwo/1-1.png b/src/assets/risktwo/1-1.png new file mode 100644 index 0000000..0b7abab Binary files /dev/null and b/src/assets/risktwo/1-1.png differ diff --git a/src/assets/risktwo/1-2.png b/src/assets/risktwo/1-2.png new file mode 100644 index 0000000..0751ec2 Binary files /dev/null and b/src/assets/risktwo/1-2.png differ diff --git a/src/assets/risktwo/1-3.png b/src/assets/risktwo/1-3.png new file mode 100644 index 0000000..fe752b8 Binary files /dev/null and b/src/assets/risktwo/1-3.png differ diff --git a/src/assets/risktwo/1-4.png b/src/assets/risktwo/1-4.png new file mode 100644 index 0000000..e9aecd5 Binary files /dev/null and b/src/assets/risktwo/1-4.png differ diff --git a/src/assets/risktwo/2-1.png b/src/assets/risktwo/2-1.png new file mode 100644 index 0000000..197eee0 Binary files /dev/null and b/src/assets/risktwo/2-1.png differ diff --git a/src/assets/risktwo/2-2.png b/src/assets/risktwo/2-2.png new file mode 100644 index 0000000..b91adab Binary files /dev/null and b/src/assets/risktwo/2-2.png differ diff --git a/src/assets/risktwo/2-3.png b/src/assets/risktwo/2-3.png new file mode 100644 index 0000000..db36cf3 Binary files /dev/null and b/src/assets/risktwo/2-3.png differ diff --git a/src/assets/risktwo/2-4.png b/src/assets/risktwo/2-4.png new file mode 100644 index 0000000..1d4d715 Binary files /dev/null and b/src/assets/risktwo/2-4.png differ diff --git a/src/assets/risktwo/3-1.png b/src/assets/risktwo/3-1.png new file mode 100644 index 0000000..d331a36 Binary files /dev/null and b/src/assets/risktwo/3-1.png differ diff --git a/src/assets/risktwo/3-2.png b/src/assets/risktwo/3-2.png new file mode 100644 index 0000000..e773c2f Binary files /dev/null and b/src/assets/risktwo/3-2.png differ diff --git a/src/assets/risktwo/3-3.png b/src/assets/risktwo/3-3.png new file mode 100644 index 0000000..be50927 Binary files /dev/null and b/src/assets/risktwo/3-3.png differ diff --git a/src/assets/risktwo/3-4.png b/src/assets/risktwo/3-4.png new file mode 100644 index 0000000..4fb4e9f Binary files /dev/null and b/src/assets/risktwo/3-4.png differ diff --git a/src/assets/risktwo/back.jpg b/src/assets/risktwo/back.jpg new file mode 100644 index 0000000..41937b0 Binary files /dev/null and b/src/assets/risktwo/back.jpg differ diff --git a/src/assets/risktwo/backno.JPG b/src/assets/risktwo/backno.JPG new file mode 100644 index 0000000..5d5a84a Binary files /dev/null and b/src/assets/risktwo/backno.JPG differ diff --git a/src/layout/RiskFour.js b/src/layout/RiskFour.js index 6307ee1..4c0a1ad 100644 --- a/src/layout/RiskFour.js +++ b/src/layout/RiskFour.js @@ -8,887 +8,98 @@ import { $consts } from "../plugins"; import styles from "./risk.less"; import echarts from "echarts"; import { initFilter } from "../utils/common"; -import realGif from "../assets/risk/backno.jpg"; -import red from "../assets/risk/red.png"; -import orange from "../assets/risk/orange.png"; -import yellow from "../assets/risk/yellow.png"; -import blue from "../assets/risk/blue.png"; -import back1 from "../assets/risk/1-1-1.png"; -import back2 from "../assets/risk/1-2.png"; -import back3 from "../assets/risk/1-3.png"; -import back4 from "../assets/risk/1-4.png"; -import backTwo1 from "../assets/risk/2-1-1.png"; -import backTwo2 from "../assets/risk/2-2.png"; -import backTwo3 from "../assets/risk/2-3.png"; -import backTwo4 from "../assets/risk/2-4.png"; -import backThree1 from "../assets/risk/3-1-1.png"; -import backThree2 from "../assets/risk/3-2.png"; -import backThree3 from "../assets/risk/3-3.png"; -import backThree4 from "../assets/risk/3-4.png"; -import backFour1 from "../assets/risk/4-1-1.png"; -import backFour2 from "../assets/risk/4-2.png"; -import backFour3 from "../assets/risk/4-3.png"; -import backFour4 from "../assets/risk/4-4.png"; -import backFive1 from "../assets/risk/5-1-1.png"; -import backFive2 from "../assets/risk/5-2.png"; -import backFive3 from "../assets/risk/5-3.png"; -import backFive4 from "../assets/risk/5-4.png"; -import backSix1 from "../assets/risk/6-1-1.png"; -import backSix2 from "../assets/risk/6-2.png"; -import backSix3 from "../assets/risk/6-3.png"; -import backSix4 from "../assets/risk/6-4.png"; -import backSeven1 from "../assets/risk/7-1-1.png"; -import backSeven2 from "../assets/risk/7-2.png"; -import backSeven3 from "../assets/risk/7-3.png"; -import backSeven4 from "../assets/risk/7-4.png"; -import qrcode from "../assets/risk/1.png"; +import storage from "../utils/storage"; + import { FullScreenContainer } from "@jiaminghi/data-view-react"; +import RiskFourOne from "./RiskFourOne"; +import RiskFourTwo from "./RiskFourTwo"; +import RiskFourThree from "./RiskFourThree"; class RiskFour extends React.Component { constructor(props) { super(props); this.state = { - RiskData: { - IsSuccessful: true, - Data: { - RISKLEVELCOUNTS: [ - { - NAME: "东排土场", - LEVEL: 1, - LEVEL1: 1, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "堆矿场", - LEVEL: 3, - LEVEL1: 3, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "622工业场地", - LEVEL: 4, - LEVEL1: 4, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "露天生产区", - LEVEL: 3, - LEVEL1: 3, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "终了边坡区域", - LEVEL: 2, - LEVEL1: 2, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "烧结厂", - LEVEL: 1, - LEVEL1: 1, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - { - NAME: "580回风井口", - LEVEL: 2, - LEVEL1: 2, - LEVEL2: 2, - LEVEL3: 3, - LEVEL4: 4, - }, - ], - }, - TotalCount: 0, - MessageType: 0, - }, - level1: 0, - level2: 0, - level3: 0, - level4: 0, - level5: 0, - level6: 0, - level7: 0, - data1: {}, - data2: {}, - data3: {}, - data4: {}, - data5: {}, - data6: {}, - data7: {}, - - content: "", - content2: "", - content3: "", - content4: "", - content5: "", - content6: "", - content7: "", + translateX:1, + rightDis:false, + leftDis:true, + riskleveldata:[] }; } - - componentDidMount() { + clickRightIcon = () => { + if(this.state.translateX <3){ + this.setState({ + translateX:this.state.translateX+1 + }) + } - this.state.RiskData.Data.RISKLEVELCOUNTS.map((item, index) => { - if (item.NAME == "东排土场") { - this.setState({ - level1: item.LEVEL, - data1: item, - content: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "堆矿场") { - this.setState({ - level2: item.LEVEL, - data2: item, - content2: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "622工业场地") { - this.setState({ - level3: item.LEVEL, - data3: item, - content3: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "露天生产区") { - this.setState({ - level4: item.LEVEL, - data4: item, - content4: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "终了边坡区域") { - this.setState({ - level5: item.LEVEL, - data5: item, - content5: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "烧结厂") { - this.setState({ - level6: item.LEVEL, - data6: item, - content6: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "580回风井口") { - this.setState({ - level7: item.LEVEL, - data7: item, - content7: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - }); + }; + componentDidMount() { this.getRiskData(); - // this.setState({ - // content7:
- //
区域名称:{this.state.data7.NAME}
- //
较大风险:{this.state.data7.LEVEL2}
- //
一般风险:{this.state.data7.LEVEL3}
- //
- // }) } getRiskData = () => { - const json = initFilter(this.props.login.OrgId); + var orgId = storage("lacal").getItem("webOrgId")?.val + const json = initFilter(orgId); this.props.dispatch({ type: "app/getDataByPost", url: "HM/HMEvaluateRisk/getRiskLevelCountData", payload: json, onComplete: (ret) => { if (ret) { - ret.RISKLEVELCOUNTS.map((item,index)=>{ - if (item.NAME == "东排土场") { - this.setState({ - level1: item.LEVEL, - data1: item, - content: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "堆矿场") { - this.setState({ - level2: item.LEVEL, - data2: item, - content2: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "622工业场地") { - this.setState({ - level3: item.LEVEL, - data3: item, - content3: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "露天生产区") { - this.setState({ - level4: item.LEVEL, - data4: item, - content4: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "终了边坡区域") { - this.setState({ - level5: item.LEVEL, - data5: item, - content5: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "烧结厂") { - this.setState({ - level6: item.LEVEL, - data6: item, - content6: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } - if (item.NAME == "580回风井口") { - this.setState({ - level7: item.LEVEL, - data7: item, - content7: ( -
-
区域名称:{item.NAME}
-
-
-
较大风险:{item.LEVEL2}
-
一般风险:{item.LEVEL3}
-
-
- {/* 33 */} -
-
-
- ), - }); - } + this.setState({ + riskleveldata: ret.RISKLEVELCOUNTS, }) + + // }) + // ret.RISKLEVELCOUNTS.map((item, index) => { + // this.getTitle(item) + // }) } }, }); }; + componentDidUpdate =(prevProps, prevState)=> { + if(this.state.translateX != prevState.translateX){ + if (this.state.translateX == 1) { + this.setState({ + rightDis:false, + leftDis:true + }) + }else if(this.state.translateX == 3){ + this.setState({ + rightDis:true, + leftDis:false + }) + }else{ + this.setState({ + rightDis:false, + leftDis:false + }) + } + } + } + clickLeftIcon = () => { + if(this.state.translateX >1){ + this.setState({ + translateX:this.state.translateX-1 + }) + } + + }; render() { return ( -
- 1 -
- {/* 东排土场背景区域 */} -
- 2 -
- {/* 堆矿场 */} -
- 4 -
- {/* 622工业场地 */} -
- 6 -
- {/* 露天生产区 */} -
- 8 -
- {/* 终了边坡区域 */} -
- 10 -
{" "} - {/* 烧结厂 */} -
- 12 -
{" "} - {/* 580回风井口 */} -
- 14 -
-
- -
-
- - 3 - -
-
- - 5 - -
-
- {" "} - - 7 - -
-
- {" "} - - 9 - -
-
- {" "} - - 11 - -
-
- {" "} - - 13 - -
{" "} -
- {" "} - - 15 - -
-
+
+ {this.clickLeftIcon()}} style={this.state.leftDis==true?{color:'#888888'}:{color:'#fff'}}> + + + {this.clickRightIcon()}} style={this.state.rightDis==true?{color:'#888888'}:{color:'#fff'}}> + + + {this.state.translateX ==1?< RiskFourOne riskleveldata={this.state.riskleveldata}/>:this.state.translateX ==2?< RiskFourTwo riskleveldata={this.state.riskleveldata}/>:}
+ ); diff --git a/src/layout/RiskFourOne.js b/src/layout/RiskFourOne.js new file mode 100644 index 0000000..871c49d --- /dev/null +++ b/src/layout/RiskFourOne.js @@ -0,0 +1,462 @@ +import React, { useState, useEffect, useMemo, useRef } from "react"; +import { connect } from "dva"; +import { withRouter, matchPath } from "dva/router"; +import { Scrollbars } from "react-custom-scrollbars"; +import { Icon, Row, Col, Progress, Popover } from "antd"; +import EnergyIcon from "../utils/energyIcon"; +import { $consts } from "../plugins"; +import styles from "./riskOne.less"; +import echarts from "echarts"; +import storage from "../utils/storage"; +import { initFilter } from "../utils/common"; +import realGif from "../assets/riskone/backno.JPG"; +import red from "../assets/risk/red.png"; +import orange from "../assets/risk/orange.png"; +import yellow from "../assets/risk/yellow.png"; +import blue from "../assets/risk/blue.png"; +import back1 from "../assets/riskone/1-1.png"; +import back2 from "../assets/riskone/1-2.png"; +import back3 from "../assets/riskone/1-3.png"; +import back4 from "../assets/riskone/1-4.png"; +import backTwo1 from "../assets/riskone/2-1.png"; +import backTwo2 from "../assets/riskone/2-2.png"; +import backTwo3 from "../assets/riskone/2-3.png"; +import backTwo4 from "../assets/riskone/2-4.png"; +import backThree1 from "../assets/riskone/3-1.png"; +import backThree2 from "../assets/riskone/3-2.png"; +import backThree3 from "../assets/riskone/3-3.png"; +import backThree4 from "../assets/riskone/3-4.png"; +import backFour1 from "../assets/riskone/4-1.png"; +import backFour2 from "../assets/riskone/4-2.png"; +import backFour3 from "../assets/riskone/4-3.png"; +import backFour4 from "../assets/riskone/4-4.png"; +import { FullScreenContainer } from "@jiaminghi/data-view-react"; + +class RiskFourOne extends React.Component { + constructor(props) { + super(props); + this.state = { + RiskData: { + IsSuccessful: true, + Data: { + RISKLEVELCOUNTS: [ + { + NAME: "矿石堆场", + LEVEL: 1, + LEVEL1: 1, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "东排土场", + LEVEL: 3, + LEVEL1: 3, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "采场-终了边坡区", + LEVEL: 3, + LEVEL1: 3, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "采场-生产区域", + LEVEL: 2, + LEVEL1: 2, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + ], + }, + TotalCount: 0, + MessageType: 0, + }, + level1: 0, + level2: 0, + level3: 0, + level4: 0, + data1: {}, + data2: {}, + data3: {}, + data4: {}, + + content: "", + content2: "", + content3: "", + content4: "", + }; + } + componentDidUpdate=(prevProps, prevState)=>{ + if(prevProps.riskleveldata !== this.props.riskleveldata){ + console.log('this.props.riskleveldata',this.props.riskleveldata) + this.props.riskleveldata.map((item, index) => { + this.getTitle(item) + }); + } + + } + + componentDidMount() { + this.state.RiskData.Data.RISKLEVELCOUNTS.map((item, index) => { + this.getTitle(item) + }); + } + getTitle=(item)=>{ + if (item.NAME == "矿石堆场") { + this.setState({ + level1: item.LEVEL, + data1: item, + content: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "东排土场") { + this.setState({ + level2: item.LEVEL, + data2: item, + content2: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "采场-终了边坡区") { + this.setState({ + level3: item.LEVEL, + data3: item, + content3: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "采场-生产区域") { + this.setState({ + level4: item.LEVEL, + data4: item, + content4: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + } + + + + + render() { + return ( + + +
+ 1 +
+ {/* 矿石堆场背景区域 */} +
+ 2 +
+ {/* 东排土场 */} +
+ 4 +
+ {/* 采场-终了边坡 */} +
+ 6 +
+ {/* 采场-生产取悦 */} +
+ 8 +
+ {/* 采场-终了边坡区域2 */} + {/*
+ 10 +
*/} +
+ +
+
+ + 3 + +
+
+ + 5 + +
+
+ {" "} + + 7 + +
+
+ {" "} + + 9 + +
+ {/*
+ {" "} + + 11 + +
*/} +
+
+
+
+ ); + } +} + +export default withRouter(connect(({ login }) => ({ login }))(RiskFourOne)); diff --git a/src/layout/RiskFourThree.js b/src/layout/RiskFourThree.js new file mode 100644 index 0000000..a71a8b7 --- /dev/null +++ b/src/layout/RiskFourThree.js @@ -0,0 +1,254 @@ +import React, { useState, useEffect, useMemo, useRef } from "react"; +import { connect } from "dva"; +import { withRouter, matchPath } from "dva/router"; +import { Scrollbars } from "react-custom-scrollbars"; +import { Icon, Row, Col, Progress, Popover } from "antd"; +import EnergyIcon from "../utils/energyIcon"; +import { $consts } from "../plugins"; +import styles from "./riskThree.less"; +import echarts from "echarts"; +import storage from "../utils/storage"; +import { initFilter } from "../utils/common"; +import realGif from "../assets/riskthree/backno.JPG"; +import red from "../assets/risk/red.png"; +import orange from "../assets/risk/orange.png"; +import yellow from "../assets/risk/yellow.png"; +import blue from "../assets/risk/blue.png"; +import back1 from "../assets/riskthree/1-1.png"; +import back2 from "../assets/riskthree/1-2.png"; +import back3 from "../assets/riskthree/1-3.png"; +import back4 from "../assets/riskthree/1-4.png"; +import backTwo1 from "../assets/riskthree/2-1.png"; +import backTwo2 from "../assets/riskthree/2-2.png"; +import backTwo3 from "../assets/riskthree/2-3.png"; +import backTwo4 from "../assets/riskthree/2-4.png"; +import { FullScreenContainer } from "@jiaminghi/data-view-react"; + +class RiskFourOne extends React.Component { + constructor(props) { + super(props); + this.state = { + RiskData: { + IsSuccessful: true, + Data: { + RISKLEVELCOUNTS: [ + { + NAME: "选矿车间", + LEVEL: 1, + LEVEL1: 1, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "尾矿库", + LEVEL: 3, + LEVEL1: 3, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + ], + }, + TotalCount: 0, + MessageType: 0, + }, + level1: 0, + level2: 0, + data1: {}, + data2: {}, + + content: "", + content2: "", + }; + } + componentDidUpdate=(prevProps, prevState)=>{ + if(prevProps.riskleveldata !== this.props.riskleveldata){ + console.log('this.props.riskleveldata',this.props.riskleveldata) + this.props.riskleveldata.map((item, index) => { + this.getTitle(item) + }); + } + + } + + componentDidMount() { + this.state.RiskData.Data.RISKLEVELCOUNTS.map((item, index) => { + this.getTitle(item) + }); + } + getTitle=(item)=>{ + if (item.NAME == "选矿车间") { + this.setState({ + level1: item.LEVEL, + data1: item, + content: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "尾矿库") { + this.setState({ + level2: item.LEVEL, + data2: item, + content2: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + } + + + + + render() { + return ( + + +
+ 1 +
+ {/* 选矿车间 */} +
+ 2 +
+ {/* 尾矿库 */} +
+ 4 +
+
+ +
+
+ + 3 + +
+
+ + 5 + +
+
+
+
+
+ ); + } +} + +export default withRouter(connect(({ login }) => ({ login }))(RiskFourOne)); diff --git a/src/layout/RiskFourTwo.js b/src/layout/RiskFourTwo.js new file mode 100644 index 0000000..1b00969 --- /dev/null +++ b/src/layout/RiskFourTwo.js @@ -0,0 +1,337 @@ +import React, { useState, useEffect, useMemo, useRef } from "react"; +import { connect } from "dva"; +import { withRouter } from "dva/router"; +import { Popover } from "antd"; +import styles from "./riskTwo.less"; +import realGif from "../assets/risktwo/backno.JPG"; +import red from "../assets/risk/red.png"; +import orange from "../assets/risk/orange.png"; +import yellow from "../assets/risk/yellow.png"; +import blue from "../assets/risk/blue.png"; +import back1 from "../assets/risktwo/1-1.png"; +import back2 from "../assets/risktwo/1-2.png"; +import back3 from "../assets/risktwo/1-3.png"; +import back4 from "../assets/risktwo/1-4.png"; +import backTwo1 from "../assets/risktwo/2-1.png"; +import backTwo2 from "../assets/risktwo/2-2.png"; +import backTwo3 from "../assets/risktwo/2-3.png"; +import backTwo4 from "../assets/risktwo/2-4.png"; +import backThree1 from "../assets/risktwo/3-1.png"; +import backThree2 from "../assets/risktwo/3-2.png"; +import backThree3 from "../assets/risktwo/3-3.png"; +import backThree4 from "../assets/risktwo/3-4.png"; +import { FullScreenContainer } from "@jiaminghi/data-view-react"; + +class RiskFourOne extends React.Component { + constructor(props) { + super(props); + this.state = { + RiskData: { + IsSuccessful: true, + Data: { + RISKLEVELCOUNTS: [ + { + NAME: "大禾底排土场", + LEVEL: 1, + LEVEL1: 1, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "北排土场", + LEVEL: 3, + LEVEL1: 3, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + { + NAME: "采场-生产区域", + LEVEL: 3, + LEVEL1: 3, + LEVEL2: 2, + LEVEL3: 3, + LEVEL4: 4, + }, + ], + }, + TotalCount: 0, + MessageType: 0, + }, + level1: 0, + level2: 0, + level3: 0, + level4: 0, + data1: {}, + data2: {}, + data3: {}, + data4: {}, + + content: "", + content2: "", + content3: "", + content4: "", + }; + } + componentDidUpdate=(prevProps, prevState)=>{ + if(prevProps.riskleveldata !== this.props.riskleveldata){ + console.log('this.props.riskleveldata',this.props.riskleveldata) + this.props.riskleveldata.map((item, index) => { + this.getTitle(item) + }); + } + + } + + componentDidMount() { + this.state.RiskData.Data.RISKLEVELCOUNTS.map((item, index) => { + this.getTitle(item) + }); + } + getTitle=(item)=>{ + if (item.NAME == "大禾底排土场") { + this.setState({ + level1: item.LEVEL, + data1: item, + content: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "北排土场") { + this.setState({ + level2: item.LEVEL, + data2: item, + content2: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + if (item.NAME == "采场-生产区域") { + this.setState({ + level3: item.LEVEL, + data3: item, + content3: ( +
+
区域名称:{item.NAME}
+
+
+
较大风险:{item.LEVEL2}
+
一般风险:{item.LEVEL3}
+
+
+ {/* 33 */} +
+
+
+ ), + }); + } + } + + + + + render() { + return ( + + +
+ 1 +
+ {/* 大禾底排土场 */} +
+ 2 +
+ {/* 北排土场 */} +
+ 4 +
+ {/* 露天采场 */} +
+ 6 +
+
+ +
+
+ + 3 + +
+
+ + 5 + +
+
+ {" "} + + 7 + +
+ +
+
+
+
+ ); + } +} + +export default withRouter(connect(({ login }) => ({ login }))(RiskFourOne)); diff --git a/src/layout/risk.less b/src/layout/risk.less index 5efaf59..74f5fa8 100644 --- a/src/layout/risk.less +++ b/src/layout/risk.less @@ -104,27 +104,86 @@ left: 81%; width: 100%; height: 100%; - } .riskhover { - transition: all 0.5s; - animation: jump 1.8s infinite ; + transition: all 0.5s; + animation: jump 1.8s infinite; } // .riskhover:hover { // transform: scale(1.1); // animation: jump 1.8s infinite ; // } - @keyframes jump { - 0% { - transform: translateY(0px); - } - 50% { - transform: translateY(-20px); - } - 100% { - transform: translateY(0px); - } + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-20px); + } + 100% { + transform: translateY(0px); + } +} +.wrap_scrollImg { + width: 100%; + height: 100%; + //background-color: #2C9806; + overflow: hidden; + position: relative; + + span { + display: inline-block; + } +} +.left_icon { + left: 0; + cursor: pointer; + z-index: 99999999; + position: absolute; + display: none; + background-color: rgba(0, 0, 0, 0.3); + top: 0; + bottom: 0; + margin: auto; + height: 55px; + line-height: 55px; + width: 44px; + text-align: center; + font-size: 20px; + transition: 0.2s; + &:hover { + font-size: 30px; + height: 60px; + // line-height: 60px; + width:60px; + text-align: center; + margin: auto; + } } +.right_icon { + right: 0; + cursor: pointer; + z-index: 99999999; + position: absolute; + display: none; + background-color: rgba(0, 0, 0, 0.3); + top: 0; + bottom: 0; + margin: auto; + height: 55px; + line-height: 55px; + width: 44px; + text-align: center; + font-size: 20px; + transition: 0.2s; + &:hover { + font-size: 30px; + height: 60px; + // line-height: 60px; + width:60px; + text-align: center; + margin: auto; + } +} diff --git a/src/layout/riskOne.less b/src/layout/riskOne.less new file mode 100644 index 0000000..eec7825 --- /dev/null +++ b/src/layout/riskOne.less @@ -0,0 +1,176 @@ +.riskt { + position: absolute; + top: 44%; + left: 22%; + width: 100%; + height: 100%; +} +.risktTwo { + position: absolute; + top: 25%; + left: 36%; + width: 100%; + height: 100%; +} +.risktThree { + position: absolute; + top: 80%; + left: 30%; + width: 100%; + height: 100%; +} + +.risktFour { + position: absolute; + top: 50%; + left: 60%; + width: 100%; + height: 100%; +} +.risktFive { + position: absolute; + top: 27%; + left: 84%; + width: 100%; + height: 100%; +} +.risktSix { + position: absolute; + top: 75%; + left: 77%; + width: 100%; + height: 100%; +} +.risktSeven { + position: absolute; + top: 42%; + left: 87%; + width: 100%; + height: 100%; +} + +.riskback { + position: absolute; + top: 42%; + left: 16%; + width: 100%; + height: 100%; +} + +.riskbackTwo { + position: absolute; + top: 21%; + left: 31%; + width: 100%; + height: 100%; +} +.riskbackThree { + position: absolute; + top: 52%; + left: 15%; + width: 100%; + height: 100%; +} + +.riskbackFour { + position: absolute; + top: 19%; + left: 34%; + width: 100%; + height: 100%; +} +.riskbackFive { + position: absolute; + top: 27%; + left: 80%; + width: 100%; + height: 100%; +} +.riskbackSix { + position: absolute; + top: 62%; + left: 70%; + width: 100%; + height: 100%; +} +.riskbackSeven { + position: absolute; + top: 40%; + left: 81%; + width: 100%; + height: 100%; +} +.riskhover { + transition: all 0.5s; + animation: jump 1.8s infinite; +} +// .riskhover:hover { +// transform: scale(1.1); +// animation: jump 1.8s infinite ; +// } + +@keyframes jump { + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-20px); + } + 100% { + transform: translateY(0px); + } +} +.wrap_scrollImg { + width: 100%; + height: 100%; + //background-color: #2C9806; + overflow: hidden; + position: relative; + + span { + display: inline-block; + } +} +.left_icon { + left: 0; + cursor: pointer; + z-index: 99999999; + position: absolute; + display: none; + background-color: rgba(0, 0, 0, 0.3); + top: 0; + bottom: 0; + margin: auto; + height: 55px; + line-height: 55px; + width: 44px; + text-align: center; + font-size: 20px; + transition: 0.2s; + &:hover { + font-size: 30px; + height: 60px; + // line-height: 60px; + width:60px; + text-align: center; + margin: auto; + } +} + +.right_icon { + right: 0; + cursor: pointer; + z-index: 99999999; + position: absolute; + display: none; + background-color: rgba(0, 0, 0, 0.3); + top: 0; + bottom: 0; + margin: auto; + height: 55px; + line-height: 55px; + width: 44px; + text-align: center; + font-size: 20px; + transition: 0.2s; +} diff --git a/src/layout/riskThree.less b/src/layout/riskThree.less new file mode 100644 index 0000000..b61a5b9 --- /dev/null +++ b/src/layout/riskThree.less @@ -0,0 +1,52 @@ + +.riskt { + position: absolute; + top: 39%; + left: 32%; + width: 100%; + height: 100%; +} +.risktTwo { + position: absolute; + top: 35%; + left: 60%; + width: 100%; + height: 100%; +} + + +.riskback { + position: absolute; + top: 26%; + left: 18%; + width: 100%; + height: 100%; +} + +.riskbackTwo { + position: absolute; + top: 10%; + left: 48%; + width: 100%; + height: 100%; +} +.riskhover { + transition: all 0.5s; + animation: jump 1.8s infinite; +} +// .riskhover:hover { +// transform: scale(1.1); +// animation: jump 1.8s infinite ; +// } + +@keyframes jump { + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-20px); + } + 100% { + transform: translateY(0px); + } +} \ No newline at end of file diff --git a/src/layout/riskTwo.less b/src/layout/riskTwo.less new file mode 100644 index 0000000..e2bcfb6 --- /dev/null +++ b/src/layout/riskTwo.less @@ -0,0 +1,68 @@ + +.riskt { + position: absolute; + top: 36%; + left: 13%; + width: 100%; + height: 100%; +} +.risktTwo { + position: absolute; + top: 60%; + left: 38%; + width: 100%; + height: 100%; +} +.risktThree { + position: absolute; + top: 24%; + left: 70%; + width: 100%; + height: 100%; +} + + +.riskback { + position: absolute; + top: 21%; + left: 0; + width: 100%; + height: 100%; +} + +.riskbackTwo { + position: absolute; + top: 38%; + left: 0%; + width: 100%; + height: 100%; +} +.riskbackThree { + position: absolute; + top: 15%; + left: 49%; + width: 100%; + height: 100%; +} + + +.riskhover { + transition: all 0.5s; + animation: jump 1.8s infinite; +} +// .riskhover:hover { +// transform: scale(1.1); +// animation: jump 1.8s infinite ; +// } + +@keyframes jump { + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-20px); + } + 100% { + transform: translateY(0px); + } +}