diff --git a/code/VideoAccess-VCMP/web/client/src/layout/components/sider/index.jsx b/code/VideoAccess-VCMP/web/client/src/layout/components/sider/index.jsx
index 0607a3a..f2412d5 100644
--- a/code/VideoAccess-VCMP/web/client/src/layout/components/sider/index.jsx
+++ b/code/VideoAccess-VCMP/web/client/src/layout/components/sider/index.jsx
@@ -45,6 +45,7 @@ const Sider = props => {
}
}
}
+ console.log(nextItems)
setItems(nextItems)
const { selectedKeys, openKeys } = initKeys(
@@ -74,16 +75,52 @@ const Sider = props => {
}
}, [])
+ useEffect(()=>{
+ console.log(1)
+ let pathname_ = pathname == '/' ? homePath : pathname
+ const initKeys = (items, lastKeys) => {
+ for (let it of items) {
+ if (it.to && it.to == pathname_) {
+ lastKeys.selectedKeys.push(it.itemKey)
+ return lastKeys
+ } else if (it.items && it.items.length) {
+ const preLastKeys = JSON.parse(JSON.stringify(lastKeys))
+ preLastKeys.openKeys.push(it.itemKey)
+ const nextKeys = initKeys(it.items, JSON.parse(JSON.stringify(preLastKeys)))
+ if (nextKeys.selectedKeys.length > preLastKeys.selectedKeys.length || nextKeys.openKeys.length > preLastKeys.openKeys.length) {
+ return nextKeys
+ }
+ }
+ }
+ return lastKeys
+ return {
+ selectedKeys: [],
+ openKeys: []
+ }
+ }
+ const lastSelectedKeys = localStorage.getItem('vcmp_selected_sider')
+ console.log(lastSelectedKeys)
+ if (lastSelectedKeys) {
+ setSelectedKeys(JSON.parse(lastSelectedKeys))
+ }
+ const lastOpenKeys = localStorage.getItem('vcmp_open_sider')
+ if (lastOpenKeys) {
+ setOpenKeys(JSON.parse(lastOpenKeys))
+ }
+ },[window.localStorage.vcmp_open_sider,window.localStorage.vcmp_selected_sider])
+
useEffect(() => {
if (scrollbar) {
scrollbar.update();
}
})
-
+console.log(selectedKeys,openKeys)
return (
diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx
index a99953e..4a922d5 100644
--- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx
+++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx
@@ -6,7 +6,7 @@ import "./cameraModal.less";
import PerfectScrollbar from "perfect-scrollbar";
let equipmentScrollbar;
-function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, testComplete, close }) {
+function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, testComplete, close, ashTrue, ashFalse }) {
const form = useRef();
const { equipmentWarehouse } = actions;
const [sip, setSip] = useState([]);
@@ -14,11 +14,11 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
const [CheckList, setCheckList] = useState([]); //nvr视频流多选
const [isAllChoose, setIsAllChoose] = useState(false); //全选
const [formData, setFormData] = useState() //表单数据
-
+ console.log(cameraData.externalDomain)
useEffect(() => {
dispatch(equipmentWarehouse.getCascadeSIP()).then((res) => {
setSip(res.payload.data);
- if (cameraData) {
+ if (cameraData.id) {
let sip = res.payload.data.find((item) => item.streamid == cameraData.topSerialNo)
dispatch(equipmentWarehouse.getCascadeStream({ sip: sip.sipip })).then((res) => {
let oneData = res.payload.data[0];
@@ -155,7 +155,7 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
e.stopPropagation();
}
function onDisabled (id) {
- if (id == cameraData.gbId||!cameraData.gbId) {
+ if (id == cameraData.gbId || !cameraData.gbId) {
return false;
} else {
return true;
@@ -177,15 +177,27 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
return (
<>
+ >
+ );
}
-function mapStateToProps(state) {
- const { auth, global, members } = state;
- return {
- loading: members.isRequesting,
- user: auth.user,
- actions: global.actions,
- members: members.data,
- };
+function mapStateToProps (state) {
+ const { auth, global, members } = state;
+ return {
+ loading: members.isRequesting,
+ user: auth.user,
+ actions: global.actions,
+ members: members.data,
+ };
}
export default connect(mapStateToProps)(ipcCamera);
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 6115ab7..3fe6226 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
@@ -393,6 +393,8 @@ function SideSheets (props) {
});
}
//接入信息/复制直播地址
+ let broadcast=nvrDetails.gbCamera?nvrDetails.gbCamera.playUrl?nvrDetails.gbCamera.playUrl.liveUrl:"":""
+ console.log(broadcast)
if (index == 1) {
(cameraSetup ? item.liveBroadcast : item.access).map(
(item, index) => {
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 eb05387..dcaa71f 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
@@ -46,7 +46,6 @@ const CameraHeader = (props) => {
const CAMERAS = "cameras";
useEffect(() => {
- console.log(props)
//安心云传参
let isAxyData = props.location.search
if (isAxyData) {
@@ -119,7 +118,7 @@ const CameraHeader = (props) => {
return (
{row.name}
- {
if (deviceClickb.current) {
if (row.type == "nvr") {
@@ -139,7 +138,7 @@ const CameraHeader = (props) => {
}}
>
{row.type == "nvr" ? `@${row.nvr.name}` : row.type == "cascade" ? `@${row.externalDomain}` : ""}
-
+
);
},
@@ -149,7 +148,6 @@ const CameraHeader = (props) => {
width: "20%",
dataIndex: "",
render: (_, row) => {
- console.log(row)
return (