|
@ -1,11 +1,13 @@ |
|
|
import React, { useEffect } from "react"; |
|
|
import React, { useState, useEffect } from "react"; |
|
|
import { connect } from "react-redux"; |
|
|
import { connect } from "react-redux"; |
|
|
import { Button, Form, Input, Row, Table } from "@douyinfe/semi-ui"; |
|
|
import { Button, Form, Input, Row, Table } from "@douyinfe/semi-ui"; |
|
|
import "../style.less"; |
|
|
import "../style.less"; |
|
|
import NvrModal from "../components/nvrModal" |
|
|
import NvrModal from "../components/nvrModal"; |
|
|
|
|
|
import Setup from "../components/setup"; |
|
|
|
|
|
|
|
|
const NvrHeader = (props) => { |
|
|
const NvrHeader = (props) => { |
|
|
const { dispatch, actions, user, loading } = props; |
|
|
const { dispatch, actions, user, loading } = props; |
|
|
|
|
|
const [setup, setSetup] = useState(false); |
|
|
|
|
|
|
|
|
const screen = { |
|
|
const screen = { |
|
|
width: 193, |
|
|
width: 193, |
|
@ -16,7 +18,6 @@ const NvrHeader = (props) => { |
|
|
const columns = [ |
|
|
const columns = [ |
|
|
{ |
|
|
{ |
|
|
title: "序号", |
|
|
title: "序号", |
|
|
align: "center", |
|
|
|
|
|
render: (text, record, index) => { |
|
|
render: (text, record, index) => { |
|
|
return index + 1; |
|
|
return index + 1; |
|
|
}, |
|
|
}, |
|
@ -24,8 +25,8 @@ const NvrHeader = (props) => { |
|
|
{ |
|
|
{ |
|
|
title: "设备名称", |
|
|
title: "设备名称", |
|
|
// dataIndex: "name",/// |
|
|
// dataIndex: "name",/// |
|
|
align: "center", |
|
|
|
|
|
width: 200, |
|
|
width: 200, |
|
|
|
|
|
background: "red", |
|
|
render: (text, record, index) => { |
|
|
render: (text, record, index) => { |
|
|
return ( |
|
|
return ( |
|
|
<div> |
|
|
<div> |
|
@ -45,34 +46,30 @@ const NvrHeader = (props) => { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: "设备厂家", |
|
|
title: "设备厂家", |
|
|
align: "center", |
|
|
|
|
|
dataIndex: "size", |
|
|
dataIndex: "size", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: "SIP地址", |
|
|
title: "SIP地址", |
|
|
align: "center", |
|
|
|
|
|
dataIndex: "owner", |
|
|
dataIndex: "owner", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: "端口号", |
|
|
title: "端口号", |
|
|
align: "center", |
|
|
|
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: "通道数", |
|
|
title: "通道数", |
|
|
align: "center", |
|
|
|
|
|
dataIndex: "nameIconSrc", |
|
|
dataIndex: "nameIconSrc", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: "操作", |
|
|
title: "操作", |
|
|
align: "center", |
|
|
width: "20%", |
|
|
dataIndex: "", |
|
|
dataIndex: "", |
|
|
render: (y) => { |
|
|
render: (y) => { |
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|
<Button>修改</Button> |
|
|
<Button theme="borderless">修改</Button> |
|
|
<Button>查看</Button> |
|
|
<Button theme="borderless">查看</Button> |
|
|
<Button>删除</Button> |
|
|
<Button theme="borderless">删除</Button> |
|
|
</> |
|
|
</> |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
@ -109,45 +106,53 @@ const NvrHeader = (props) => { |
|
|
]; |
|
|
]; |
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|
<div style={{position:''}}> |
|
|
<div style={{ position: "" }}> |
|
|
<video id='nvrBanner' autoPlay loop muted style={{ width: '100%', objectFit: 'cover', height: 171 }} src='/assets/video/nvr_banner.mp4' type='video/mp4' /> |
|
|
<video |
|
|
<div style={{position: 'absolute',top:12}}> |
|
|
id="nvrBanner" |
|
|
<div |
|
|
autoPlay |
|
|
style={{ |
|
|
loop |
|
|
fontSize: 22 + "px", |
|
|
muted |
|
|
paddingTop: 15 + "px", |
|
|
style={{ width: "100%", objectFit: "cover", height: 171 }} |
|
|
marginLeft: 21 + "px", |
|
|
src="/assets/video/nvr_banner.mp4" |
|
|
}} |
|
|
type="video/mp4" |
|
|
> |
|
|
/> |
|
|
NVR管理 |
|
|
<div style={{ position: "absolute", top: 12 }}> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
fontSize: 22 + "px", |
|
|
fontSize: 14 + "px", |
|
|
paddingTop: 15 + "px", |
|
|
paddingTop: 18 + "px", |
|
|
marginLeft: 21 + "px", |
|
|
marginLeft: 20 + "px", |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
NVR管理 |
|
|
对NVR(网络硬盘录像机)设备节点的管理 |
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
fontSize: 14 + "px", |
|
|
fontSize: 14 + "px", |
|
|
paddingTop: 18 + "px", |
|
|
marginTop: 28 + "px", |
|
|
marginLeft: 20 + "px", |
|
|
marginLeft: 21 + "px", |
|
|
}} |
|
|
width: 89 + "px", |
|
|
> |
|
|
height: 32 + "px", |
|
|
对NVR(网络硬盘录像机)设备节点的管理 |
|
|
lineHeight: 32 + "px", |
|
|
</div> |
|
|
textAlign: "center", |
|
|
<div |
|
|
backgroundColor: "#D9EAFF", |
|
|
style={{ |
|
|
color: "#1859C1", |
|
|
fontSize: 14 + "px", |
|
|
cursor: "pointer", |
|
|
marginTop: 28 + "px", |
|
|
}} |
|
|
marginLeft: 21 + "px", |
|
|
> |
|
|
width: 89 + "px", |
|
|
<NvrModal modalName="添加NVR"/> |
|
|
height: 32 + "px", |
|
|
</div> |
|
|
lineHeight: 32 + "px", |
|
|
</div> |
|
|
textAlign: "center", |
|
|
</div> |
|
|
backgroundColor: "#D9EAFF", |
|
|
|
|
|
color: "#1859C1", |
|
|
|
|
|
cursor: "pointer", |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
<NvrModal modalName="添加NVR" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
width: "100%", |
|
|
width: "100%", |
|
@ -215,7 +220,7 @@ const NvrHeader = (props) => { |
|
|
</Form> |
|
|
</Form> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
width: 0, |
|
|
width: 150, |
|
|
display: "flex", |
|
|
display: "flex", |
|
|
justifyContent: "flex-end", |
|
|
justifyContent: "flex-end", |
|
|
alignItems: "flex-end", |
|
|
alignItems: "flex-end", |
|
@ -228,8 +233,8 @@ const NvrHeader = (props) => { |
|
|
width: 65, |
|
|
width: 65, |
|
|
height: 30, |
|
|
height: 30, |
|
|
borderRadius: 3, |
|
|
borderRadius: 3, |
|
|
marginBottom: "20px", |
|
|
marginBottom: 20, |
|
|
marginRight: "20px", |
|
|
marginRight: 20, |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
搜素 |
|
|
搜素 |
|
@ -243,7 +248,7 @@ const NvrHeader = (props) => { |
|
|
backGround: "#FFFFFF", |
|
|
backGround: "#FFFFFF", |
|
|
borderRadius: 3, |
|
|
borderRadius: 3, |
|
|
border: "1px solid #D9D9D9", |
|
|
border: "1px solid #D9D9D9", |
|
|
marginBottom: "20px", |
|
|
marginBottom: 20, |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
重置 |
|
|
重置 |
|
@ -251,8 +256,15 @@ const NvrHeader = (props) => { |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<Table |
|
|
<div style={{ background: "#FFFFFF", marginTop: 5 }}> |
|
|
title={ |
|
|
<div |
|
|
|
|
|
style={{ |
|
|
|
|
|
width: "100%", |
|
|
|
|
|
display: "flex", |
|
|
|
|
|
justifyContent: "space-between", |
|
|
|
|
|
padding: "13px 20px", |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
width: 64, |
|
|
width: 64, |
|
@ -266,24 +278,74 @@ const NvrHeader = (props) => { |
|
|
> |
|
|
> |
|
|
设备列表 |
|
|
设备列表 |
|
|
</div> |
|
|
</div> |
|
|
} |
|
|
<div> |
|
|
columns={columns} |
|
|
<Button |
|
|
dataSource={data} |
|
|
style={{ |
|
|
pagination={false} |
|
|
width: 32, |
|
|
bordered={false} |
|
|
height: 32, |
|
|
/> |
|
|
background: "#D9D9D9", |
|
|
|
|
|
borderadius: 3, |
|
|
|
|
|
marginRight: 20, |
|
|
|
|
|
}} |
|
|
|
|
|
type="primary" |
|
|
|
|
|
key="primary" |
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
setSetup(true); |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
<img |
|
|
|
|
|
src="../../../../assets/images/background/setup.png" |
|
|
|
|
|
alt="设置" |
|
|
|
|
|
style={{ width: 18, height: 18 }} |
|
|
|
|
|
/> |
|
|
|
|
|
</Button> |
|
|
|
|
|
<Button |
|
|
|
|
|
style={{ |
|
|
|
|
|
width: 65, |
|
|
|
|
|
height: 32, |
|
|
|
|
|
background: "#FFFFFF", |
|
|
|
|
|
borderRadius: 3, |
|
|
|
|
|
border: "1px solid #1859C1", |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
导出 |
|
|
|
|
|
</Button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<Table |
|
|
|
|
|
columns={columns} |
|
|
|
|
|
dataSource={data} |
|
|
|
|
|
pagination={false} |
|
|
|
|
|
bordered={false} |
|
|
|
|
|
empty="暂无数据" |
|
|
|
|
|
style={{ padding: "0px 20px" }} |
|
|
|
|
|
/> |
|
|
|
|
|
{setup ? ( |
|
|
|
|
|
<Setup |
|
|
|
|
|
visible={true} |
|
|
|
|
|
close={() => { |
|
|
|
|
|
setSetup(false); |
|
|
|
|
|
// setEditData(null) |
|
|
|
|
|
}} |
|
|
|
|
|
// reportType={reportType} |
|
|
|
|
|
// editData={editData} |
|
|
|
|
|
/> |
|
|
|
|
|
) : ( |
|
|
|
|
|
"" |
|
|
|
|
|
)} |
|
|
|
|
|
</div> |
|
|
</> |
|
|
</> |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
function mapStateToProps(state) { |
|
|
const { auth, global, members } = state; |
|
|
const { auth, global, members } = state; |
|
|
return { |
|
|
return { |
|
|
loading: members.isRequesting, |
|
|
loading: members.isRequesting, |
|
|
user: auth.user, |
|
|
user: auth.user, |
|
|
actions: global.actions, |
|
|
actions: global.actions, |
|
|
members: members.data, |
|
|
members: members.data, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(NvrHeader); |
|
|
export default connect(mapStateToProps)(NvrHeader); |
|
|