-
+
- 接入类型
-
-
-
-
- {showcameraList.map((item, index) => (
-
handleChoose(item.id)}
- >
+
-

+
+ 接入类型
+
+
+
+
+ {showcameraList.map((item, index) => (
+
handleChoose(item.id)}
+ >
+ {modify ? item.id == clickNum ? "" :
: ""}
+
+

+
+
+ {item.title}
+
+
+ {item.text}
+
+ {clickNum === item.id ? (
+
+

+
+ ) : (
+ ""
+ )}
+
+
+ ))}
+
+
+
+
- {item.title}
+
+ 配置属性
+
+ {clickNum !== 2 ? (
+
+
+

+ 重置
+
+
+

+ 测试
+
+
+ ) : (
+ ""
+ )}
-
- {item.text}
+
+ {clickNum == 1 ? (
+
+ ) : clickNum == 2 ? (
+
+ ) : clickNum == 3 ? (
+
+ ) : (
+
+ )}
- {clickNum === item.id ? (
-
-

-
- ) : (
- ""
- )}
-
- ))}
-
-
-
-
-
-
- 配置属性
-
- {clickNum !== 2 ? (
-
-
-

- 重置
-
-
-

- 测试
-
-
- ) : (
- ""
- )}
-
-
- {clickNum == 1 ? (
-
- ) : clickNum == 2 ? (
-
- ) : clickNum == 3 ? (
-
- ) : (
-
- )}
-
-
-
- >
- );
+
+
+ >
+ );
}
-function mapStateToProps(state) {
- const { auth, global, members, CameraKind, CameraAbility } = state;
- return {
- loading: members.isRequesting,
- user: auth.user,
- actions: global.actions,
- CameraKind: CameraKind.data || [],
- CameraAbility: CameraAbility.data || [],
- };
+function mapStateToProps (state) {
+ const { auth, global, members, CameraKind, CameraAbility } = state;
+ return {
+ loading: members.isRequesting,
+ user: auth.user,
+ actions: global.actions,
+ CameraKind: CameraKind.data || [],
+ CameraAbility: CameraAbility.data || [],
+ };
}
export default connect(mapStateToProps)(cameraModal);
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 d22382f..b7a3c03 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
@@ -3,122 +3,122 @@ import { connect } from "react-redux";
import { Form, Row, Col } from "@douyinfe/semi-ui";
import "./cameraModal.less";
-function cascadeCamera({ dRef, dispatch, actions ,cameraData}) {
- const form = useRef();
- const { equipmentWarehouse } = actions;
- const [sip, setSip] = useState([]);
+function cascadeCamera ({ dRef, dispatch, actions, cameraData ,parentCamera}) {
+ const form = useRef();
+ const { equipmentWarehouse } = actions;
+ const [sip, setSip] = useState([]);
- useEffect(() => {
- dispatch(equipmentWarehouse.getCascadeSIP()).then((res) => {
- console.log(res)
- setSip(res.payload.data);
- });
- }, []);
+ useEffect(() => {
+ dispatch(equipmentWarehouse.getCascadeSIP()).then((res) => {
+ setSip(res.payload.data);
+ });
+
+ }, []);
- //内存卡列表
- const memoryList = [
- {
- id: 1,
- value: "8g",
- },
- {
- id: 2,
- value: "16g",
- },
- {
- id: 3,
- value: "32g",
- },
- {
- id: 4,
- value: "64g",
- },
- {
- id: 5,
- value: "128g",
- },
- {
- id: 6,
- value: "256g",
- },
- {
- id: 7,
- value: ">256g",
- },
- ];
+ //内存卡列表
+ const memoryList = [
+ {
+ id: 1,
+ value: "8g",
+ },
+ {
+ id: 2,
+ value: "16g",
+ },
+ {
+ id: 3,
+ value: "32g",
+ },
+ {
+ id: 4,
+ value: "64g",
+ },
+ {
+ id: 5,
+ value: "128g",
+ },
+ {
+ id: 6,
+ value: "256g",
+ },
+ {
+ id: 7,
+ value: ">256g",
+ },
+ ];
- useImperativeHandle(dRef, () => ({
- //传给父组件方法
- //子组件暴露给父组件的方法
- cascadeCameraForm: form.current.validate,
- resetCascadeCamera: form.current.reset,
- }));
- return (
- <>
-
- >
- );
+
+
+
+
+
+
+
+ 上级域
+
+
+
+
+
+ {sip.map((item, index) => (
+
+ {item.sipip}
+
+ ))}
+
+
+
+
+ >
+ );
}
-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)(cascadeCamera);
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 f3b3d09..523c90e 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
@@ -35,6 +35,8 @@ const CameraHeader = (props) => {
const [search, setearch] = useState({}); //搜索条件
const [rowId, setRowId] = useState(); //表格数据id
const [cameraData, setCameraData] = useState({}); //表格数据
+ const [modify, setModify] = useState(false); //修改
+ const [parentCamera, setParentCamera] = useState(""); //级联摄像头父级设备
const { equipmentWarehouse } = actions;
const api = useRef();
const searchb = useRef(search)
@@ -42,6 +44,8 @@ const CameraHeader = (props) => {
const CAMERAS = "cameras";
useEffect(() => {
+
+ console.log(props)
dispatch(actions.equipmentWarehouse.getVender()).then((res) => {
setvenderList(res.payload.data);
attribute(res.payload.data);
@@ -53,7 +57,6 @@ const CameraHeader = (props) => {
JSON.stringify(["state", "type", "manufactor"])
)
: "";
- console.log(equipmentWarehouseCamera);
}, []);
useEffect(() => {
@@ -89,14 +92,14 @@ const CameraHeader = (props) => {
} else {
setearch({ ...searchb.current, externalDomain: row.externalDomain })
}
- deviceClickb.current=false
+ deviceClickb.current = false
} else {
if (row.type == "nvr") {
setearch({ ...searchb.current, nvrId: null })
} else {
setearch({ ...searchb.current, externalDomain: null })
}
- deviceClickb.current=true
+ deviceClickb.current = true
}
}}
>
@@ -118,8 +121,19 @@ const CameraHeader = (props) => {
>
);
diff --git a/code/VideoAccess-VCMP/web/client/src/utils/webapi.js b/code/VideoAccess-VCMP/web/client/src/utils/webapi.js
index 066960d..6881681 100644
--- a/code/VideoAccess-VCMP/web/client/src/utils/webapi.js
+++ b/code/VideoAccess-VCMP/web/client/src/utils/webapi.js
@@ -30,6 +30,7 @@ export const ApiTable = {
postCameraNvr: "camera/create/nvr", //记录NVR摄像头
getCascadeSIP: "camera/sip_list/cascade", //获取级联摄像头sip列表
postAddCascade: "camera/create/cascade", //添加级联摄像头
+ getParentCamera:"camera/cascade_device", //获取级联摄像头父级设备
};