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 1605372..792596d 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 @@ -20,17 +20,12 @@ function SideSheets(props) { cameraSetup, rowId, venderList, + accessType, } = props; const { equipmentWarehouse } = actions; const [clickStyle, setclickStyle] = useState(); const [nvrDetails, setNvrDetails] = useState(""); const list = ["项目名称", "关联结构物", "关联测点", "关联监测因素"]; - const type = [ - { name: "萤石", key: "yingshi" }, - { name: "NVR摄像头", key: "nvr" }, - { name: "IPC 网络摄像头", key: "ipc" }, - { name: "级联摄像头", key: "cascade" }, - ]; const information = { nvr: [ { @@ -38,7 +33,7 @@ function SideSheets(props) { basics: [ { name: "设备名称:", key: "name" }, { name: "设备编号:", key: "serialNo" }, - { name: "接入方式:", key: "NJBJ858G68H" }, + { name: "接入方式:", key: "type" }, { name: "厂商:", key: "venderId" }, { name: "添加账号:", key: "createUser" }, { name: "添加时间:", key: "createTime" }, @@ -345,8 +340,8 @@ function SideSheets(props) { - {item.key == "type" - ? type.find((v) => v.key == nvrDetails.type) + {item.key == "typ" + ? accessType.find((v) => v.key == nvrDetails.type) .name : item.key == "venderId" ? venderList.find( 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 f80b0ae..1ba8927 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 @@ -16,6 +16,7 @@ import CameraModal from "../components/cameraModal"; import NvrModal from "../components/nvrModal"; import Setup from "../components/setup"; import SideSheets from "../components/sideSheet"; +import { accessType } from "./nvr"; const CameraHeader = (props) => { const { dispatch, actions, user, loading, equipmentWarehouseCamera } = props; @@ -26,7 +27,8 @@ const CameraHeader = (props) => { const [cameraSetup, setcameraSetup] = useState(false); const [setupp, setSetupp] = useState([]); const [venderList, setvenderList] = useState([]); //厂商信息 - const [query, setQuery] = useState({ limit: 10, page: 0 }); + const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息 + const [search, setearch] = useState({}); //搜索条件 const [rowId, setRowId] = useState(); //表格数据id const { equipmentWarehouse } = actions; @@ -45,15 +47,17 @@ const CameraHeader = (props) => { JSON.stringify(["state", "type", "manufactor"]) ) : ""; + console.log(equipmentWarehouseCamera); }, []); useEffect(() => { equipmentGetCamera(); - }, []); + }, [query, search]); function equipmentGetCamera() { - dispatch(equipmentWarehouse.getCamera(query)); + dispatch(equipmentWarehouse.getCamera({ ...query, ...search })); } + const columns = [ { title: "序号", @@ -115,7 +119,7 @@ const CameraHeader = (props) => {