|
|
@ -6,6 +6,7 @@ import '../style.less' |
|
|
|
import PerfectScrollbar from "perfect-scrollbar"; |
|
|
|
import repairFQA from '../../means/containers/repairFQA'; |
|
|
|
import { Setup, OutHidden } from "$components"; |
|
|
|
import ReactECharts from 'echarts-for-react'; |
|
|
|
const { Meta } = Card; |
|
|
|
|
|
|
|
let newScrollbar; |
|
|
@ -18,7 +19,7 @@ let alarmScrollbar; |
|
|
|
|
|
|
|
|
|
|
|
const Control = (props) => { |
|
|
|
const { dispatch, actions, user, loading, socket ,pepProjectId} = props |
|
|
|
const { dispatch, actions, user, loading, socket, pepProjectId } = props |
|
|
|
const { control } = actions |
|
|
|
const stationList = [ |
|
|
|
'url(/assets/images/console/lan_1.png)', |
|
|
@ -42,17 +43,16 @@ const Control = (props) => { |
|
|
|
const [compile, setCompile] = useState({}); //工具编辑的内容 |
|
|
|
const [toolShow, setToolShow] = useState([]); //工具展示 |
|
|
|
const [tableSetup, setTableSetup] = useState([]); //单一表格设置信息 |
|
|
|
const [exhibition, setExhibition] = useState({ workbench: [] }); //页面结构 |
|
|
|
const [workData, setWorkData] = useState({}); //我的工作台数据 |
|
|
|
|
|
|
|
const [workData, setWorkData] = useState(); //我的工作台数据 |
|
|
|
|
|
|
|
const exhibition = useRef({ workbench: [], statistical: [] }) //页面结构 |
|
|
|
const FormApi = useRef() |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
consoleToollink() |
|
|
|
|
|
|
|
//初始化表格显示设置 |
|
|
|
let data = ['workbench'] |
|
|
|
let data = ['workbench', 'statistical', 'analyse'] |
|
|
|
data.map(v => { |
|
|
|
localStorage.getItem(v) == null |
|
|
|
? localStorage.setItem(v, JSON.stringify(show[v])) |
|
|
@ -63,62 +63,84 @@ const Control = (props) => { |
|
|
|
}, []) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
dispatch(control.geteteConsoleCount({pepProjectId:pepProjectId})).then(res => { |
|
|
|
dispatch(control.geteteConsoleCount({ pepProjectId: pepProjectId })).then(res => { |
|
|
|
if (res.success) setWorkData(res.payload.data) |
|
|
|
}) |
|
|
|
}, [pepProjectId]) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
newScrollbar = new PerfectScrollbar("#news", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject = document.getElementById("news"); |
|
|
|
if (domProject && newScrollbar) { |
|
|
|
newScrollbar.update(); |
|
|
|
if (domProject) { |
|
|
|
newScrollbar = new PerfectScrollbar("#news", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
if (domProject && newScrollbar) { |
|
|
|
newScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
overviewScrollbar = new PerfectScrollbar("#overview", { |
|
|
|
suppressScrollY: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject1 = document.getElementById("overview"); |
|
|
|
if (domProject1 && overviewScrollbar) { |
|
|
|
overviewScrollbar.update(); |
|
|
|
if (domProject1) { |
|
|
|
overviewScrollbar = new PerfectScrollbar("#overview", { |
|
|
|
suppressScrollY: true, |
|
|
|
}); |
|
|
|
if (domProject1 && overviewScrollbar) { |
|
|
|
overviewScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
memberScrollbar = new PerfectScrollbar("#member", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject2 = document.getElementById("member"); |
|
|
|
if (domProject2 && memberScrollbar) { |
|
|
|
memberScrollbar.update(); |
|
|
|
if (domProject2) { |
|
|
|
memberScrollbar = new PerfectScrollbar("#member", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
if (domProject2 && memberScrollbar) { |
|
|
|
memberScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
equipmentScrollbar = new PerfectScrollbar("#equipment", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject3 = document.getElementById("equipment"); |
|
|
|
if (domProject3 && equipmentScrollbar) { |
|
|
|
equipmentScrollbar.update(); |
|
|
|
if (domProject3) { |
|
|
|
equipmentScrollbar = new PerfectScrollbar("#equipment", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
if (domProject3 && equipmentScrollbar) { |
|
|
|
equipmentScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
webScrollbar = new PerfectScrollbar("#web", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject4 = document.getElementById("web"); |
|
|
|
if (domProject4 && webScrollbar) { |
|
|
|
webScrollbar.update(); |
|
|
|
if (domProject4) { |
|
|
|
webScrollbar = new PerfectScrollbar("#web", { |
|
|
|
suppressScrollX: true, |
|
|
|
}) |
|
|
|
if (domProject4 && webScrollbar) { |
|
|
|
webScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
problemsScrollbar = new PerfectScrollbar("#problems", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject5 = document.getElementById("problems"); |
|
|
|
if (domProject5 && problemsScrollbar) { |
|
|
|
problemsScrollbar.update(); |
|
|
|
if (domProject5) { |
|
|
|
problemsScrollbar = new PerfectScrollbar("#problems", { |
|
|
|
suppressScrollX: true, |
|
|
|
}); |
|
|
|
if (domProject5 && problemsScrollbar) { |
|
|
|
problemsScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
alarmScrollbar = new PerfectScrollbar("#alarm", { |
|
|
|
suppressScrollY: true, |
|
|
|
}); |
|
|
|
|
|
|
|
const domProject6 = document.getElementById("alarm"); |
|
|
|
if (domProject6 && alarmScrollbar) { |
|
|
|
alarmScrollbar.update(); |
|
|
|
if (domProject6) { |
|
|
|
alarmScrollbar = new PerfectScrollbar("#alarm", { |
|
|
|
suppressScrollY: true, |
|
|
|
}); |
|
|
|
if (domProject6 && alarmScrollbar) { |
|
|
|
alarmScrollbar.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ACTION 示例 |
|
|
|
// dispatch(actions.example.getMembers(user.orgId)) |
|
|
|
}) |
|
|
@ -132,25 +154,37 @@ const Control = (props) => { |
|
|
|
|
|
|
|
let Select = { |
|
|
|
workbench: ['project', 'data', 'app', 'device'], |
|
|
|
statistical: [], |
|
|
|
analyse: [], |
|
|
|
statistical: ['milestone', 'personnel', 'DeviceAccess', 'web', 'problem'], |
|
|
|
analyse: ['dataInterrupt', 'dataAnomaly', 'strategyHit', 'videoException', 'appAbnormal', 'unitException', 'problemAnalysis'], |
|
|
|
dynamic: [], |
|
|
|
} |
|
|
|
let show = { |
|
|
|
workbench: ['project', 'data', 'app', 'device'], |
|
|
|
statistical: [], |
|
|
|
analyse: [], |
|
|
|
statistical: ['milestone', 'personnel', 'DeviceAccess', 'web', 'problem'], |
|
|
|
analyse: ['dataInterrupt', 'dataAnomaly', 'strategyHit', 'videoException', 'appAbnormal', 'unitException', 'problemAnalysis'], |
|
|
|
dynamic: [], |
|
|
|
} |
|
|
|
|
|
|
|
let listAll = [ |
|
|
|
{ name: '关注的项目', sort: 1, key: 'project', data: workData?.projects, img: 'url(/assets/images/console/lan_1.png)' }, |
|
|
|
{ name: '数据告警', sort: 2, key: 'data', data: workData?.dataSurplus, img: 'url(/assets/images/console/lv_1.png)' }, |
|
|
|
{ name: '应用告警', sort: 2, key: 'app', data: workData?.appSurplus, img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
{ name: '设备告警', sort: 2, key: 'device', data: workData?.toolSurplus, img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
{ name: '关注的项目', sort: 1, key: 'project', data: workData?.projects || 0, img: 'url(/assets/images/console/lan_1.png)' }, |
|
|
|
{ name: '数据告警', sort: 2, key: 'data', data: workData?.dataSurplus || 0, img: 'url(/assets/images/console/lv_1.png)' }, |
|
|
|
{ name: '应用告警', sort: 2, key: 'app', data: workData?.appSurplus || 0, img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
{ name: '设备告警', sort: 2, key: 'device', data: workData?.toolSurplus || 0, img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
|
|
|
|
{ name: '项目里程碑', sort: 1, key: 'milestone', }, |
|
|
|
{ name: '相关成员', sort: 2, key: 'personnel', }, |
|
|
|
{ name: '平台设备接入', sort: 3, key: 'DeviceAccess', }, |
|
|
|
{ name: '关联web应用', sort: 4, key: 'web', }, |
|
|
|
{ name: '异常&问题', sort: 5, key: 'problem', }, |
|
|
|
|
|
|
|
{ name: '数据中断', sort: 5, key: 'dataInterrupt', }, |
|
|
|
{ name: '数据异常', sort: 5, key: 'dataAnomaly', }, |
|
|
|
{ name: '策略命中', sort: 5, key: 'strategyHit', }, |
|
|
|
{ name: '视频异常', sort: 5, key: 'videoException', }, |
|
|
|
{ name: '应用异常', sort: 5, key: 'appAbnormal', }, |
|
|
|
{ name: '设备异常', sort: 5, key: 'unitException', }, |
|
|
|
{ name: '问题处置效率分析', sort: 5, key: 'problemAnalysis', }, |
|
|
|
] |
|
|
|
console.log(workData); |
|
|
|
console.log(listAll); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
attribute('workbench') |
|
|
@ -166,14 +200,14 @@ const Control = (props) => { |
|
|
|
}) |
|
|
|
let TableDisplay = take?.map(v => listAll?.find(vv => v == vv.key)) |
|
|
|
TableDisplay.sort((a, b) => a.sort - b.sort) |
|
|
|
setExhibition({ ...exhibition, [title]: TableDisplay }) |
|
|
|
exhibition.current = { ...exhibition.current, [title]: TableDisplay } |
|
|
|
setTableSetup([{ list: data }]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
// 11 ? <img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} /> : |
|
|
|
11 ? <img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} /> : |
|
|
|
<> |
|
|
|
<div style={{ padding: '0px 40px', width: '100%' }} className='console'> |
|
|
|
{/* 头部 */} |
|
|
@ -207,6 +241,7 @@ const Control = (props) => { |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => { |
|
|
|
setSetup(true) |
|
|
|
setTableType('workbench') |
|
|
|
attribute('workbench') |
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -244,7 +279,7 @@ const Control = (props) => { |
|
|
|
</div> |
|
|
|
{/* 循环类型 */} |
|
|
|
<div id='alarm' style={{ width: 'calc(100% - 200px)', position: 'relative', whiteSpace: 'nowrap', }}> |
|
|
|
{exhibition['workbench']?.map((item, index) => { |
|
|
|
{exhibition.current['workbench']?.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={item.name} style={{ background: item.img, backgroundSize: "100% 100%", display: "inline-block", width: 270, height: 135, marginRight: 26 }}> |
|
|
|
<div style={{ margin: '35px 0px 0px 134px' }}> |
|
|
@ -271,181 +306,195 @@ const Control = (props) => { |
|
|
|
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>STATISTICAL OVERVIEW</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginRight: 25 }}> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => setSetup(true)} /> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => { |
|
|
|
setSetup(true) |
|
|
|
setTableType('statistical') |
|
|
|
attribute('statistical') |
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id='overview' style={{ position: 'relative' }}> |
|
|
|
<div style={{ display: 'inline-flex', marginTop: 16 }}> |
|
|
|
{/* 项目里程碑 */} |
|
|
|
<div style={{ marginBottom: 30, width: 466, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 20px 24px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
项目里程碑 |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', marginBottom: 20, marginLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
立项时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }}> |
|
|
|
2022-5-12 |
|
|
|
</div> |
|
|
|
{exhibition.current?.statistical?.find(v => v.key == 'milestone') ? |
|
|
|
<div style={{ marginBottom: 30, width: 466, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 20px 24px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
项目里程碑 |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
施工时间: |
|
|
|
<div style={{ display: 'flex', marginBottom: 20, marginLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
立项时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }}> |
|
|
|
2022-5-12 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2022-5-12至2022-12-12 |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
施工时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2022-5-12至2022-12-12 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', marginBottom: 24, marginLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
内验时间: |
|
|
|
<div style={{ display: 'flex', marginBottom: 24, marginLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
内验时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }}> |
|
|
|
2023-1-18 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }}> |
|
|
|
2023-1-18 |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
外验时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2023-3-18 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ display: 'flex', marginBottom: 17, marginLeft: 24 }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
外验时间: |
|
|
|
工程维保时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2023-3-18 |
|
|
|
2022-11-11 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', marginBottom: 17, marginLeft: 24 }}> |
|
|
|
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}> |
|
|
|
工程维保时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2022-11-11 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', background: 'linear-gradient(252deg, #F9FBFF 0%, #DBE7FF 100%)', height: 38, justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', marginLeft: 24, alignItems: 'center' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#646566', marginRight: 4 }}> |
|
|
|
售后维修时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2022-11-11至2023-12-14 |
|
|
|
<div style={{ display: 'flex', background: 'linear-gradient(252deg, #F9FBFF 0%, #DBE7FF 100%)', height: 38, justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', marginLeft: 24, alignItems: 'center' }}> |
|
|
|
<div style={{ fontSize: 14, color: '#646566', marginRight: 4 }}> |
|
|
|
售后维修时间: |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
2022-11-11至2023-12-14 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<img src="/assets/images/console/onGoing.png" alt="进行中" /> |
|
|
|
</div> |
|
|
|
<img src="/assets/images/console/onGoing.png" alt="进行中" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
: ""} |
|
|
|
{/* 相关成员 */} |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
相关成员 |
|
|
|
</div> |
|
|
|
<div id='member' style={{ position: 'relative', height: 161 }}> |
|
|
|
{memberList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'member'} style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 15 }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ width: 18, height: 18 }}> |
|
|
|
<img src="/assets/images/console/member.png" alt="成员" style={{ width: '100%', height: '100%' }} /> |
|
|
|
</div> |
|
|
|
<div style={{ marginLeft: 8, fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
刘昊然 |
|
|
|
{exhibition.current?.statistical?.find(v => v.key == 'personnel') ? |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
相关成员 |
|
|
|
</div> |
|
|
|
<div id='member' style={{ position: 'relative', height: 161 }}> |
|
|
|
{memberList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'member'} style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 15 }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ width: 18, height: 18 }}> |
|
|
|
<img src="/assets/images/console/member.png" alt="成员" style={{ width: '100%', height: '100%' }} /> |
|
|
|
</div> |
|
|
|
<div style={{ marginLeft: 8, fontSize: 14, color: '#4A4A4A' }}> |
|
|
|
刘昊然 |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 12, color: '#969799' }}> |
|
|
|
(负责人) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ fontSize: 12, color: '#969799' }}> |
|
|
|
(负责人) |
|
|
|
<div style={{ color: '#969799', fontSize: 14, marginRight: 22 }}> |
|
|
|
行业服务部 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#969799', fontSize: 14, marginRight: 22 }}> |
|
|
|
行业服务部 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
})} |
|
|
|
) |
|
|
|
})} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
: ""} |
|
|
|
{/* 平台设备接入 */} |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}> |
|
|
|
平台设备接入 |
|
|
|
</div> |
|
|
|
<div id='equipment' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
equipmentList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'equipment'} style={{ marginBottom: 15, display: 'flex' }}> |
|
|
|
<div style={{ color: '#969799', fontSize: 14, width: 167 }}> |
|
|
|
5阶ZK1高清摄球机 |
|
|
|
</div> |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14, width: 81 }}> |
|
|
|
视频 |
|
|
|
</div> |
|
|
|
<div style={{ width: 18, height: 18, marginRight: 8 }}> |
|
|
|
<img src="/assets/images/console/icon_online.png" alt="网络" style={{ width: '100%', height: '100%' }} /> |
|
|
|
{/* <img src="/assets/images/console/icon_offline.png" alt="网络" style={{ width: '100%', height: '100%' }} /> */} |
|
|
|
</div> |
|
|
|
<div style={{ color: '#0F7EFB', fontSize: 14 }}> |
|
|
|
在线 |
|
|
|
</div> |
|
|
|
{/* <div style={{color:'#969799',fontSize:14}}> |
|
|
|
{exhibition.current?.statistical?.find(v => v.key == 'DeviceAccess') ? |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}> |
|
|
|
平台设备接入 |
|
|
|
</div> |
|
|
|
<div id='equipment' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
equipmentList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'equipment'} style={{ marginBottom: 15, display: 'flex' }}> |
|
|
|
<div style={{ color: '#969799', fontSize: 14, width: 167 }}> |
|
|
|
5阶ZK1高清摄球机 |
|
|
|
</div> |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14, width: 81 }}> |
|
|
|
视频 |
|
|
|
</div> |
|
|
|
<div style={{ width: 18, height: 18, marginRight: 8 }}> |
|
|
|
<img src="/assets/images/console/icon_online.png" alt="网络" style={{ width: '100%', height: '100%' }} /> |
|
|
|
{/* <img src="/assets/images/console/icon_offline.png" alt="网络" style={{ width: '100%', height: '100%' }} /> */} |
|
|
|
</div> |
|
|
|
<div style={{ color: '#0F7EFB', fontSize: 14 }}> |
|
|
|
在线 |
|
|
|
</div> |
|
|
|
{/* <div style={{color:'#969799',fontSize:14}}> |
|
|
|
掉线 |
|
|
|
</div> */} |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
: ""} |
|
|
|
{/* 关联web应用 */} |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold', marginBottom: 15 }}> |
|
|
|
关联web应用 |
|
|
|
</div> |
|
|
|
<div id='web' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
webList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'web'} style={{ marginBottom: 15, display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ width: 18, height: 18, marginRight: 8 }}> |
|
|
|
<img src="/assets/images/console/icon_webpage.png" alt="web应用" style={{ width: '100%', height: '100%' }} /> |
|
|
|
{exhibition.current?.statistical?.find(v => v.key == 'web') ? |
|
|
|
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold', marginBottom: 15 }}> |
|
|
|
关联web应用 |
|
|
|
</div> |
|
|
|
<div id='web' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
webList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div key={index + 'web'} style={{ marginBottom: 15, display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
|
<div style={{ width: 18, height: 18, marginRight: 8 }}> |
|
|
|
<img src="/assets/images/console/icon_webpage.png" alt="web应用" style={{ width: '100%', height: '100%' }} /> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#646566', fontSize: 14, borderBottom: '1px dotted #0F7EFB' }}> |
|
|
|
superchangnan.anxiny |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#646566', fontSize: 14, borderBottom: '1px dotted #0F7EFB' }}> |
|
|
|
superchangnan.anxiny |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14, marginRight: 40 }}> |
|
|
|
第三方 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14, marginRight: 40 }}> |
|
|
|
第三方 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
: ""} |
|
|
|
{/* 异常&问题 */} |
|
|
|
<div style={{ width: 399, height: 221, marginLeft: 20, marginRight: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
异常&问题 |
|
|
|
</div> |
|
|
|
<div id='problems' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
problemsList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div style={{ marginBottom: 15, paddingRight: 30, }}> |
|
|
|
<div style={{ fontSize: 14, color: '#646566' }}> |
|
|
|
【告警源A】数据信息中断,诊断为 <span style={{ color: '#0F7EFB', borderBottom: '1px dotted #0F7EFB', cursor: "pointer" }}>服务异常,请前往确认</span> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#969799', fontSize: 12, marginRight: 40, marginTop: 4 }}> |
|
|
|
2022-05-21 15:23:41 |
|
|
|
{exhibition.current?.statistical?.find(v => v.key == 'problem') ? |
|
|
|
<div style={{ width: 399, height: 221, marginLeft: 20, marginRight: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}> |
|
|
|
<div style={{ margin: '20px 0px 17px 0px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}> |
|
|
|
异常&问题 |
|
|
|
</div> |
|
|
|
<div id='problems' style={{ position: 'relative', height: 161 }}> |
|
|
|
{ |
|
|
|
problemsList.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div style={{ marginBottom: 15, paddingRight: 30, }}> |
|
|
|
<div style={{ fontSize: 14, color: '#646566' }}> |
|
|
|
【告警源A】数据信息中断,诊断为 <span style={{ color: '#0F7EFB', borderBottom: '1px dotted #0F7EFB', cursor: "pointer" }}>服务异常,请前往确认</span> |
|
|
|
</div> |
|
|
|
<div style={{ color: '#969799', fontSize: 12, marginRight: 40, marginTop: 4 }}> |
|
|
|
2022-05-21 15:23:41 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
) |
|
|
|
}) |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
: ""} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -458,9 +507,85 @@ const Control = (props) => { |
|
|
|
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>BI ANAL YSIS MODEL</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginRight: 25 }}> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => setSetup(true)} /> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 18, height: 18, cursor: "pointer" }} onClick={() => { |
|
|
|
setSetup(true) |
|
|
|
setTableType('analyse') |
|
|
|
attribute('analyse') |
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ width: '100%', height: '100%' }}> |
|
|
|
{exhibition.current?.analyse?.map((v, index) => { |
|
|
|
console.log(exhibition.current?.analyse); |
|
|
|
return <div id={'ReactECharts' + index} style={{ marginTop: 20, padding: 10, width: '50%', display: "inline-block" }}> |
|
|
|
<ReactECharts |
|
|
|
option={{ |
|
|
|
title: { |
|
|
|
text: v.name, |
|
|
|
}, |
|
|
|
grid: { |
|
|
|
left: '5%', |
|
|
|
// right: '4%', |
|
|
|
// bottom: '3%', |
|
|
|
// containLabel: true |
|
|
|
}, |
|
|
|
dataZoom: [ |
|
|
|
{ |
|
|
|
show: true, |
|
|
|
type: 'inside', |
|
|
|
filterMode: 'none', |
|
|
|
xAxisIndex: [0], |
|
|
|
}, |
|
|
|
{ |
|
|
|
show: true, |
|
|
|
type: 'inside', |
|
|
|
filterMode: 'none', |
|
|
|
yAxisIndex: [0], |
|
|
|
} |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis' |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
data: ['次数'], |
|
|
|
right: '10%', |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
name: "时间", |
|
|
|
boundaryGap: false, |
|
|
|
data: [] |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
|
name: "次数", |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
data: [], |
|
|
|
type: 'line', |
|
|
|
name: '次数', |
|
|
|
smooth: true, |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
markLine: { |
|
|
|
data: [{ type: 'average', name: 'Avg' }] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}} |
|
|
|
notMerge={true} |
|
|
|
lazyUpdate={true} |
|
|
|
theme={'ReactEChart' + index} |
|
|
|
// onChartReady={this.onChartReadyCallback} |
|
|
|
// onEvents={EventsDict} |
|
|
|
// opts={} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
})} |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* 右边 */} |
|
|
|