Browse Source

查询复制地址完成

release_0.0.2
wenlele 3 years ago
parent
commit
bb9974c8b2
  1. 44
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx

44
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx

@ -24,6 +24,9 @@ function SideSheets (props) {
const { equipmentWarehouse } = actions; const { equipmentWarehouse } = actions;
const [clickStyle, setclickStyle] = useState(); const [clickStyle, setclickStyle] = useState();
const [nvrDetails, setNvrDetails] = useState({ station: [] }); const [nvrDetails, setNvrDetails] = useState({ station: [] });
const [highStandard, setHighStandard] = useState(true);
const [solid, setSolid] = useState("solid");
const [light, setLight] = useState("light");
const list = ["项目名称", "关联结构物", "关联测点", "关联监测因素"]; const list = ["项目名称", "关联结构物", "关联测点", "关联监测因素"];
const information = { const information = {
nvr: [ nvr: [
@ -97,18 +100,18 @@ function SideSheets (props) {
{ {
name: "复制直播地址", name: "复制直播地址",
liveBroadcast: [ liveBroadcast: [
{ name: "HLS地址", key: "" }, { name: "HLS地址", key: "hls" },
{ name: "FLV地址", key: "" }, { name: "FLV地址", key: "flv" },
{ name: "RTMP地址", key: "" }, { name: "RTMP地址", key: "rtmp" },
{ name: "EZOPEN地址", key: "" }, { name: "EZOPEN地址", key: "ezopen" },
{ name: "ONVIF地址", key: "" }, { name: "ONVIF地址", key: "onvif" },
], ],
}, },
{ {
name: "复制回收地址", name: "复制回收地址",
recovery: [ recovery: [
{ name: "云储存地址", value: "" }, { name: "云储存地址", key: "cloud" },
{ name: "本地储存地址", value: "" }, { name: "本地储存地址", key: "local" },
], ],
}, },
], ],
@ -295,10 +298,18 @@ function SideSheets (props) {
marginRight: 20, 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> <Button theme={light} onClick={() => {
setHighStandard(false)
setSolid("light")
setLight("solid")
}}>标清</Button>
</div> </div>
) : ( ) : (
"" ""
@ -386,6 +397,7 @@ function SideSheets (props) {
(cameraSetup ? item.liveBroadcast : item.access).map( (cameraSetup ? item.liveBroadcast : item.access).map(
(item, index) => { (item, index) => {
if (cameraSetup) { if (cameraSetup) {
nvrDetails.videoUrl ? nvrDetails.videoUrl.liveUrl ?
str.push( str.push(
<div <div
key={"liveBroadcast" + index} key={"liveBroadcast" + index}
@ -402,7 +414,12 @@ function SideSheets (props) {
clickStyle == item.name ? "#1859C1" : "", clickStyle == item.name ? "#1859C1" : "",
}} }}
onClick={() => { onClick={() => {
copy(item.name); if (highStandard) {
copy(nvrDetails.videoUrl.liveUrl.hd[item.key]);
} else {
copy(nvrDetails.videoUrl.liveUrl.sd[item.key]);
}
setclickStyle(item.name); setclickStyle(item.name);
}} }}
> >
@ -429,7 +446,7 @@ function SideSheets (props) {
/> />
</div> </div>
</div> </div>
); ) : "" : "";
} else { } else {
str.push( str.push(
<div <div
@ -471,6 +488,7 @@ function SideSheets (props) {
(cameraSetup ? item.recovery : nvrDetails.camera ? nvrDetails.camera : []).map( (cameraSetup ? item.recovery : nvrDetails.camera ? nvrDetails.camera : []).map(
(item, index) => { (item, index) => {
if (cameraSetup) { if (cameraSetup) {
nvrDetails.videoUrl?nvrDetails.videoUrl.replayUrl?
str.push( str.push(
<div <div
key={"liveBroadcast" + index} key={"liveBroadcast" + index}
@ -487,7 +505,7 @@ function SideSheets (props) {
clickStyle == item.name ? "#1859C1" : "", clickStyle == item.name ? "#1859C1" : "",
}} }}
onClick={() => { onClick={() => {
copy(item.name); copy(nvrDetails.videoUrl.replayUrl[item.key]);
// alert(""); // alert("");
setclickStyle(item.name); setclickStyle(item.name);
}} }}
@ -515,7 +533,7 @@ function SideSheets (props) {
/> />
</div> </div>
</div> </div>
); ):"":"";
} else { } else {
str.push( str.push(
<div <div

Loading…
Cancel
Save