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 } from "antd";
import EnergyIcon from "../utils/energyIcon";
import { $consts } from "../plugins";
import styles from "./full.less";
import echarts from "echarts";
import realGif from "../assets/layout/mofang.png";
import logo from "../assets/layout/header-logo.png";
import debounce from "lodash.debounce";
import {
FullScreenContainer,
BorderBox8,
BorderBox10,
ScrollBoard,
CapsuleChart,
WaterLevelPond,
} from "@jiaminghi/data-view-react";
import { text } from "@jiaminghi/data-view-react/lib/index-cd27b7f6";
import { Scale } from "canvg";
const stud = (eve) => {
return (
${v.seriesName}
${v.value}
%`;
});
return html;
},
extraCssText:
"background: #fff; border-radius: 0;box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);color: #333;",
axisPointer: {
type: "shadow",
shadowStyle: {
// color: "#ffffff",
shadowColor: "rgba(225,225,225,1)",
shadowBlur: 5,
},
},
},
grid: {
// top: 100,
top: "25%",
bottom: "10%",
containLabel: true,
},
xAxis: [
{
type: "category",
boundaryGap: false,
axisLabel: {
formatter: "{value}月",
textStyle: {
color: "#fff",
},
},
axisLine: {
lineStyle: {
color: "#fff",
},
},
data: xAxisData,
},
],
yAxis: [
{
type: "value",
axisLabel: {
textStyle: {
color: "#fff",
},
},
nameTextStyle: {
color: "#fff",
fontSize: 12,
lineHeight: 40,
},
splitLine: {
lineStyle: {
type: "dashed",
color: "#fff",
},
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
],
series: [
{
name: "选矿",
type: "line",
smooth: true,
// showSymbol: false,/
symbolSize: 8,
zlevel: 3,
lineStyle: {
normal: {
color: color[0],
shadowBlur: 3,
// shadowColor: hexToRgba(color[0], 0.5),
shadowOffsetY: 8,
},
},
// areaStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(
// 0,
// 0,
// 0,
// 1,
// [
// {
// offset: 0,
// color: hexToRgba(color[0], 0.3),
// },
// {
// offset: 1,
// color: hexToRgba(color[0], 0.1),
// },
// ],
// false
// ),
// shadowColor: hexToRgba(color[0], 0.1),
// shadowBlur: 10,
// },
// },
data: yAxisData1,
},
{
name: "矿山",
type: "line",
smooth: true,
// showSymbol: false,
symbolSize: 8,
zlevel: 3,
lineStyle: {
normal: {
color: color[1],
shadowBlur: 3,
// shadowColor: hexToRgba(color[1], 0.5),
shadowOffsetY: 8,
},
},
// areaStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(
// 0,
// 0,
// 0,
// 1,
// [
// {
// offset: 0,
// color: hexToRgba(color[1], 0.3),
// },
// {
// offset: 1,
// color: hexToRgba(color[1], 0.1),
// },
// ],
// false
// ),
// shadowColor: hexToRgba(color[1], 0.1),
// shadowBlur: 10,
// },
// },
data: yAxisData2,
},
{
name: "尾矿",
type: "line",
smooth: true,
// showSymbol: false,
symbolSize: 8,
zlevel: 3,
lineStyle: {
normal: {
color: color[2],
shadowBlur: 3,
// shadowColor: hexToRgba(color[1], 0.5),
shadowOffsetY: 8,
},
},
// areaStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(
// 0,
// 0,
// 0,
// 1,
// [
// {
// offset: 0,
// color: hexToRgba(color[1], 0.3),
// },
// {
// offset: 1,
// color: hexToRgba(color[1], 0.1),
// },
// ],
// false
// ),
// shadowColor: hexToRgba(color[1], 0.1),
// shadowBlur: 10,
// },
// },
data: yAxisData3,
},
],
});
}
};
riskLevel = () => {
let riskLevel = [];
let showData = [
{ value: 2, name: "一级" },
{ value: 5, name: "二级" },
{ value: 15, name: "三级" },
{ value: 30, name: "四级" },
];
let riskLevels = document.getElementById("riskLevelFull");
if (riskLevels) {
let myChart = echarts.init(riskLevels);
myChart.setOption({
color: ["#c92a2a", "#FF6710", "#FFDD1E", "#0091FF", "#fa8a89"],
title: [
{
text: "52",
x: "center",
y: "40%",
textStyle: {
fontSize: 26,
fontWeight: "normal",
color: ["#fff"],
},
},
{
text: "风险总数",
x: "center",
y: "55%",
textStyle: {
color: "#fff",
fontSize: 12,
},
},
],
tooltip: {
trigger: "item",
formatter: "{b}:({d}%)",
},
series: [
{
name: "访问来源",
type: "pie",
minAngle: 20,
radius: ["45%", "70%"],
center: ["50%", "50%"],
clockwise: true,
avoidLabelOverlap: true,
hoverOffset: 15,
label: {
show: true,
position: "outside",
// formatter: '{a|{b}:{d}%}\n{hr|}',
formatter: "{a|{b}:}{e|{d}%}\n",
rich: {
hr: {
backgroundColor: "t",
borderRadius: 3,
width: 3,
height: 3,
padding: [3, 3, 0, -12],
},
a: {
padding: [-15, 0, 0, 0],
fontSize: 15,
// fontWeight: "bold",
color: "#fff",
// fontFamily:'站酷庆科黄油体',
// letterSpacing: 3,
},
e: {
fontSize: 14,
color: "#fff",
padding: [-15, 0, 0, 5],
},
},
},
labelLine: {
normal: {
length: 20,
length2: 30,
lineStyle: {
width: 1,
type: "dashed",
},
},
},
// itemStyle: {
// //图形样式
// normal: {
// borderColor: "#fff",
// borderWidth: 2,
// padding: "0 20px",
// borderRadius: 50,
// },
// },
// color: color,
data: showData,
},
],
});
}
};
render() {
const width = 1920,
height = 1080;
// 固定好16:9的宽高比,计算出最合适的缩放比,宽高比可根据需要自行更改
const { scale } = this.state;
return (
安全方针:安全第一、综合治理、控制风险、科学发展
安全理念:一切风险皆可控,一切事故皆可防!
宁化行洛坑安全生产标准化运营平台
{this.state.nowDate}
{/*
*/}
{this.state.checkData.map((item, index) => {
return (
);
})}
{/* */}
{/* {this.state.screenWidh ? (
) : (
)} */}
{this.state.roaData.map((item, index) => {
return (
);
})}
{/*
*/}
{this.state.meetingData.map((item, index) => (
))}
);
}
}
export default withRouter(connect(({ login }) => ({ login }))(FullScreen));