|
|
@ -4,6 +4,8 @@ import { Timeline, Card, Button } from '@douyinfe/semi-ui'; |
|
|
|
import { push } from 'react-router-redux'; |
|
|
|
import '../style.less' |
|
|
|
import PerfectScrollbar from "perfect-scrollbar"; |
|
|
|
import repairFQA from '../../means/containers/repairFQA'; |
|
|
|
import { Setup, OutHidden } from "$components"; |
|
|
|
const { Meta } = Card; |
|
|
|
|
|
|
|
let newScrollbar; |
|
|
@ -21,7 +23,7 @@ const Console = (props) => { |
|
|
|
'url(/assets/images/console/lan_1.png)', |
|
|
|
'url(/assets/images/console/lv_1.png)', |
|
|
|
'url(/assets/images/console/huang_1.png)', |
|
|
|
'url(/assets/images/console/hong_1.png)' |
|
|
|
'url(/assets/images/console/hong_1.png)', |
|
|
|
] |
|
|
|
const [timelineList, setTimelineList] = useState(['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''])//最新动态列表 |
|
|
|
|
|
|
@ -32,9 +34,14 @@ const Console = (props) => { |
|
|
|
const [webList, setWebList] = useState(['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''])//关联web应用列表 |
|
|
|
|
|
|
|
const [problemsList, setProblemsList] = useState(['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''])//异常&问题列表 |
|
|
|
const [setup, setSetup] = useState(false); //设置是否显现 |
|
|
|
const [tableType, setTableType] = useState(''); //localStorage存储名 |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
newScrollbar = new PerfectScrollbar("#news", { |
|
|
|
suppressScrollX: true, |
|
|
@ -90,6 +97,51 @@ const Console = (props) => { |
|
|
|
// dispatch(actions.example.getMembers(user.orgId)) |
|
|
|
}) |
|
|
|
|
|
|
|
let Select = { |
|
|
|
workbench: ['project', 'data', 'app', 'device'], |
|
|
|
statistical: [], |
|
|
|
analyse: [], |
|
|
|
dynamic: [], |
|
|
|
} |
|
|
|
let show = { |
|
|
|
workbench: ['project', 'data', 'app', 'device'], |
|
|
|
statistical: [], |
|
|
|
analyse: [], |
|
|
|
dynamic: [], |
|
|
|
} |
|
|
|
|
|
|
|
let listAll = [ |
|
|
|
{ name: '关注的项目', sort: 1, key: 'project', data: [], img: 'url(/assets/images/console/lan_1.png)' }, |
|
|
|
{ name: '数据告警', sort: 2, key: 'data', data: [], img: 'url(/assets/images/console/lv_1.png)' }, |
|
|
|
{ name: '应用告警', sort: 2, key: 'app', data: [], img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
{ name: '设备告警', sort: 2, key: 'device', data: [], img: 'url(/assets/images/console/hong_1.png)' }, |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const attribute = (name, route) => { |
|
|
|
// let arr = localStorage.getItem(name) |
|
|
|
// ? JSON.parse(localStorage.getItem(name)) |
|
|
|
// : []; |
|
|
|
// // console.log(arr); |
|
|
|
// if (route) { |
|
|
|
// let setup = tableList[route].map(v => columnAll.find(vv => v == vv.value)) |
|
|
|
|
|
|
|
// let data = [] |
|
|
|
// data.splice(1, 0, ...arr, 'text') |
|
|
|
|
|
|
|
// let TableDisplay = data?.map(v => { |
|
|
|
// let datas = columnAll?.find(vv => v == vv.value) |
|
|
|
// if (datas) { |
|
|
|
// return { title: datas.name, sort: datas.sort, dataIndex: datas.value, rowKey: datas.value, render: datas.render } |
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
// TableDisplay.sort((a, b) => a.sort - b.sort) |
|
|
|
// setExhibition(TableDisplay) |
|
|
|
// setTableSetup([{ list: setup }]) |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
@ -123,7 +175,10 @@ const Console = (props) => { |
|
|
|
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>MY WORK STATION</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('workbench') |
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginTop: 30, display: 'flex' }}> |
|
|
@ -414,100 +469,66 @@ const Console = (props) => { |
|
|
|
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>MY USUAL TOOLS</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginTop: 24 }}> |
|
|
|
<div |
|
|
|
onMouseLeave={() => { |
|
|
|
console.log(111111); |
|
|
|
document.getElementById('aa').style.display = 'none' |
|
|
|
}} |
|
|
|
style={{ marginTop: 24, position: 'relative', display: "inline-block" }}> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ |
|
|
|
width: 94, |
|
|
|
height: 29, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 10, |
|
|
|
marginBottom: 15, |
|
|
|
background: '#0F7EFB', |
|
|
|
color: '#FFFFFF', |
|
|
|
border: '1px solid #0F7EFB' |
|
|
|
width: 94, height: 29, borderRadius: 2, marginRight: 10, marginBottom: 15, |
|
|
|
background: '#0F7EFB', color: '#FFFFFF', border: '1px solid #0F7EFB', |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
dispatch(push('/install/authentication/roles')); |
|
|
|
}} |
|
|
|
> |
|
|
|
工单管理 |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ |
|
|
|
width: 94, |
|
|
|
height: 29, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 10, |
|
|
|
marginBottom: 15, |
|
|
|
background: '#0F7EFB', |
|
|
|
color: '#FFFFFF', |
|
|
|
border: '1px solid #0F7EFB' |
|
|
|
}} |
|
|
|
// onClick={() => { }} |
|
|
|
> |
|
|
|
信鸽服务 |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ |
|
|
|
width: 94, |
|
|
|
height: 29, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 10, |
|
|
|
marginBottom: 15, |
|
|
|
background: '#0F7EFB', |
|
|
|
color: '#FFFFFF', |
|
|
|
border: '1px solid #0F7EFB' |
|
|
|
onContextMenu={(e) => { |
|
|
|
e.preventDefault(); |
|
|
|
document.getElementById('aa').style.display = 'block' |
|
|
|
}} |
|
|
|
// onClick={() => { }} |
|
|
|
> |
|
|
|
数据告警 |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ |
|
|
|
width: 94, |
|
|
|
height: 29, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 10, |
|
|
|
marginBottom: 15, |
|
|
|
background: '#0F7EFB', |
|
|
|
color: '#FFFFFF', |
|
|
|
border: '1px solid #0F7EFB' |
|
|
|
onClick={(e) => { |
|
|
|
// console.log(e); |
|
|
|
|
|
|
|
}} |
|
|
|
// onClick={() => { }} |
|
|
|
|
|
|
|
> |
|
|
|
项目资料 |
|
|
|
工单管理 |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
<div style={{ marginTop: 4 }}> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
<div id='aa' |
|
|
|
style={{ |
|
|
|
width: 302, |
|
|
|
height: 40, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 32, |
|
|
|
background: '#F2F3F5', |
|
|
|
color: '#0F7EFB', |
|
|
|
border: '1px solid #F2F3F5' |
|
|
|
}} |
|
|
|
// onClick={() => { }} |
|
|
|
> |
|
|
|
添加 |
|
|
|
</Button> |
|
|
|
position: 'absolute', top: 12, right: -10, background: 'rgb(208 208 223 / 100%)', fontSize: 13, |
|
|
|
width: 50, textAlign: "center", borderRadius: 4, padding: '0 10px', display: "none" |
|
|
|
}}> |
|
|
|
<div style={{ lineHeight: '30px' }} |
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
}} |
|
|
|
>编辑</div> |
|
|
|
<div style={{ lineHeight: '30px' }} |
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
}} |
|
|
|
>删除</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>75 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{setup ? ( |
|
|
|
<Setup |
|
|
|
tableType={tableType} |
|
|
|
tableList={tableSetup} |
|
|
|
close={() => { |
|
|
|
setSetup(false); |
|
|
|
attribute(tableType[route], route); |
|
|
|
setTableType('') |
|
|
|
}} |
|
|
|
/> |
|
|
|
) : ( |
|
|
|
"" |
|
|
|
)} |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|