From bb9974c8b2bda6177ee5b43b58442569a7e2f093 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 24 Jun 2022 10:09:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/sideSheet.jsx | 118 ++++++++++-------- 1 file changed, 68 insertions(+), 50 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx index ec3f055..6115ab7 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx @@ -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, }} > - - + ) : ( "" @@ -386,50 +397,56 @@ function SideSheets (props) { (cameraSetup ? item.liveBroadcast : item.access).map( (item, index) => { if (cameraSetup) { - str.push( -
{ - copy(item.name); - setclickStyle(item.name); - }} - > - -
- {item.name} + nvrDetails.videoUrl ? nvrDetails.videoUrl.liveUrl ? + str.push( +
{ + if (highStandard) { + copy(nvrDetails.videoUrl.liveUrl.hd[item.key]); + } else { + copy(nvrDetails.videoUrl.liveUrl.sd[item.key]); + } + + setclickStyle(item.name); + }} + > +
+ {item.name} + +
-
- ); + ) : "" : ""; } else { str.push(
{ if (cameraSetup) { + nvrDetails.videoUrl?nvrDetails.videoUrl.replayUrl? str.push(
{ - copy(item.name); + copy(nvrDetails.videoUrl.replayUrl[item.key]); // alert("复制成功"); setclickStyle(item.name); }} @@ -515,7 +533,7 @@ function SideSheets (props) { />
- ); + ):"":""; } else { str.push(
Date: Fri, 24 Jun 2022 10:53:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/equipmentWarehouse/containers/camera.jsx | 5 ++--- .../src/sections/equipmentWarehouse/containers/nvr.jsx | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx index 18a4cf0..a940fc3 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx @@ -608,10 +608,10 @@ const CameraHeader = (props) => { }} onClick={() => { api.current.validate().then((v) => { - setearch({ ...v, limit: 10, page: 0 }); + setearch(v); + setQuery({ limit: 10, page: 0 }) searchb.current = { ...v, limit: 10, page: 0 } }); - equipmentGetCamera(); }} > 搜素 @@ -630,7 +630,6 @@ const CameraHeader = (props) => { onClick={() => { api.current.reset(); setearch({}); - equipmentGetCamera(); }} > 重置 diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx index 8a4e556..fba40db 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx @@ -341,7 +341,6 @@ const NvrHeader = (props) => { const remind = localStorage.getItem(USER); console.log(remind) if (!remind) { - console.log(1) setReminder(true) } equipmentGetNvr(); @@ -452,9 +451,9 @@ const NvrHeader = (props) => { }} onClick={() => { api.current.validate().then((v) => { - setearch({ ...v, limit: 10, page: 0 }); + setearch(v); + setQuery({ limit: 10, page: 0 }) }); - equipmentGetNvr(); }} > 搜素 @@ -473,7 +472,6 @@ const NvrHeader = (props) => { onClick={() => { api.current.reset(); setearch({}); - equipmentGetNvr(); }} > 重置