|
|
@ -24,6 +24,9 @@ function SideSheets (props) { |
|
|
|
const { equipmentWarehouse } = actions; |
|
|
|
const [clickStyle, setclickStyle] = useState(); |
|
|
|
const [nvrDetails, setNvrDetails] = useState({ station: [] }); |
|
|
|
const [highStandard, setHighStandard] = useState(true); |
|
|
|
const [solid, setSolid] = useState("solid"); |
|
|
|
const [light, setLight] = useState("light"); |
|
|
|
const list = ["项目名称", "关联结构物", "关联测点", "关联监测因素"]; |
|
|
|
const information = { |
|
|
|
nvr: [ |
|
|
@ -97,18 +100,18 @@ function SideSheets (props) { |
|
|
|
{ |
|
|
|
name: "复制直播地址", |
|
|
|
liveBroadcast: [ |
|
|
|
{ name: "HLS地址", key: "" }, |
|
|
|
{ name: "FLV地址", key: "" }, |
|
|
|
{ name: "RTMP地址", key: "" }, |
|
|
|
{ name: "EZOPEN地址", key: "" }, |
|
|
|
{ name: "ONVIF地址", key: "" }, |
|
|
|
{ name: "HLS地址", key: "hls" }, |
|
|
|
{ name: "FLV地址", key: "flv" }, |
|
|
|
{ name: "RTMP地址", key: "rtmp" }, |
|
|
|
{ name: "EZOPEN地址", key: "ezopen" }, |
|
|
|
{ name: "ONVIF地址", key: "onvif" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "复制回收地址", |
|
|
|
recovery: [ |
|
|
|
{ name: "云储存地址", value: "" }, |
|
|
|
{ name: "本地储存地址", value: "" }, |
|
|
|
{ name: "云储存地址", key: "cloud" }, |
|
|
|
{ name: "本地储存地址", key: "local" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
], |
|
|
@ -295,10 +298,18 @@ function SideSheets (props) { |
|
|
|
marginRight: 20, |
|
|
|
}} |
|
|
|
> |
|
|
|
<Button style={{ marginRight: 20 }} theme="solid"> |
|
|
|
<Button style={{ marginRight: 20 }} theme={solid} onClick={() => { |
|
|
|
setHighStandard(true) |
|
|
|
setSolid("solid") |
|
|
|
setLight("light") |
|
|
|
}}> |
|
|
|
高清 |
|
|
|
</Button> |
|
|
|
<Button>标清</Button> |
|
|
|
<Button theme={light} onClick={() => { |
|
|
|
setHighStandard(false) |
|
|
|
setSolid("light") |
|
|
|
setLight("solid") |
|
|
|
}}>标清</Button> |
|
|
|
</div> |
|
|
|
) : ( |
|
|
|
"" |
|
|
@ -386,50 +397,56 @@ function SideSheets (props) { |
|
|
|
(cameraSetup ? item.liveBroadcast : item.access).map( |
|
|
|
(item, index) => { |
|
|
|
if (cameraSetup) { |
|
|
|
str.push( |
|
|
|
<div |
|
|
|
key={"liveBroadcast" + index} |
|
|
|
style={{ |
|
|
|
width: 120, |
|
|
|
height: 130, |
|
|
|
display: "inline-block", |
|
|
|
borderRadius: 4, |
|
|
|
border: "1px solid #D9D9D9", |
|
|
|
margin: "20px 0 0 40px", |
|
|
|
textAlign: "center", |
|
|
|
color: clickStyle == item.name ? "white" : "", |
|
|
|
background: |
|
|
|
clickStyle == item.name ? "#1859C1" : "", |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
copy(item.name); |
|
|
|
setclickStyle(item.name); |
|
|
|
}} |
|
|
|
> |
|
|
|
<img |
|
|
|
src={`/assets/images/background/${clickStyle == item.name |
|
|
|
? "sewage_camera2" |
|
|
|
: "sewage_camera1" |
|
|
|
}.png`} |
|
|
|
style={{ margin: "20px 0 8px 0" }} |
|
|
|
/> |
|
|
|
<div> |
|
|
|
{item.name} |
|
|
|
nvrDetails.videoUrl ? nvrDetails.videoUrl.liveUrl ? |
|
|
|
str.push( |
|
|
|
<div |
|
|
|
key={"liveBroadcast" + index} |
|
|
|
style={{ |
|
|
|
width: 120, |
|
|
|
height: 130, |
|
|
|
display: "inline-block", |
|
|
|
borderRadius: 4, |
|
|
|
border: "1px solid #D9D9D9", |
|
|
|
margin: "20px 0 0 40px", |
|
|
|
textAlign: "center", |
|
|
|
color: clickStyle == item.name ? "white" : "", |
|
|
|
background: |
|
|
|
clickStyle == item.name ? "#1859C1" : "", |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
if (highStandard) { |
|
|
|
copy(nvrDetails.videoUrl.liveUrl.hd[item.key]); |
|
|
|
} else { |
|
|
|
copy(nvrDetails.videoUrl.liveUrl.sd[item.key]); |
|
|
|
} |
|
|
|
|
|
|
|
setclickStyle(item.name); |
|
|
|
}} |
|
|
|
> |
|
|
|
<img |
|
|
|
src={`/assets/images/background/${clickStyle == item.name |
|
|
|
? "copy2" |
|
|
|
: "copy1" |
|
|
|
? "sewage_camera2" |
|
|
|
: "sewage_camera1" |
|
|
|
}.png`} |
|
|
|
style={{ |
|
|
|
paddingBottom: 10, |
|
|
|
display: "inline-block", |
|
|
|
width: 10, |
|
|
|
height: 20, |
|
|
|
}} |
|
|
|
style={{ margin: "20px 0 8px 0" }} |
|
|
|
/> |
|
|
|
<div> |
|
|
|
{item.name} |
|
|
|
<img |
|
|
|
src={`/assets/images/background/${clickStyle == item.name |
|
|
|
? "copy2" |
|
|
|
: "copy1" |
|
|
|
}.png`} |
|
|
|
style={{ |
|
|
|
paddingBottom: 10, |
|
|
|
display: "inline-block", |
|
|
|
width: 10, |
|
|
|
height: 20, |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
) : "" : ""; |
|
|
|
} else { |
|
|
|
str.push( |
|
|
|
<div |
|
|
@ -471,6 +488,7 @@ function SideSheets (props) { |
|
|
|
(cameraSetup ? item.recovery : nvrDetails.camera ? nvrDetails.camera : []).map( |
|
|
|
(item, index) => { |
|
|
|
if (cameraSetup) { |
|
|
|
nvrDetails.videoUrl?nvrDetails.videoUrl.replayUrl? |
|
|
|
str.push( |
|
|
|
<div |
|
|
|
key={"liveBroadcast" + index} |
|
|
@ -487,7 +505,7 @@ function SideSheets (props) { |
|
|
|
clickStyle == item.name ? "#1859C1" : "", |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
copy(item.name); |
|
|
|
copy(nvrDetails.videoUrl.replayUrl[item.key]); |
|
|
|
// alert("复制成功"); |
|
|
|
setclickStyle(item.name); |
|
|
|
}} |
|
|
@ -515,7 +533,7 @@ function SideSheets (props) { |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
):"":""; |
|
|
|
} else { |
|
|
|
str.push( |
|
|
|
<div |
|
|
|