|
|
@ -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: "序号", |
|
|
@ -159,8 +163,12 @@ const CameraHeader = (props) => { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "接入类型", |
|
|
|
dataIndex: "cameraAbility.ability", |
|
|
|
dataIndex: "cameraAbility.type", |
|
|
|
key: "type", |
|
|
|
render: (_, r, index) => { |
|
|
|
let manufactorName = data.find((item) => item.id == r.venderId); |
|
|
|
return manufactorName ? manufactorName.name : ""; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "设备状态", |
|
|
@ -385,7 +393,7 @@ const CameraHeader = (props) => { |
|
|
|
> |
|
|
|
<Form.Input |
|
|
|
label="设备搜索:" |
|
|
|
field="name" |
|
|
|
field="keyword" |
|
|
|
placeholder="请输入设备名称" |
|
|
|
labelPosition="left" |
|
|
|
style={screen} |
|
|
@ -393,7 +401,7 @@ const CameraHeader = (props) => { |
|
|
|
<Form.Select |
|
|
|
label="接入类型:" |
|
|
|
labelPosition="left" |
|
|
|
field="type1" |
|
|
|
field="type" |
|
|
|
style={screen} |
|
|
|
placeholder="全部" |
|
|
|
showClear |
|
|
@ -463,19 +471,10 @@ const CameraHeader = (props) => { |
|
|
|
marginRight: 20, |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
api.current.validate().then((values) => { |
|
|
|
console.log(values); |
|
|
|
console.log( |
|
|
|
equipmentWarehouseNvr.data.filter((item) => { |
|
|
|
return ( |
|
|
|
item.name.indexOf(values.name) > -1 && |
|
|
|
item.venderId === values.venderId |
|
|
|
); |
|
|
|
// return item.venderId === values.venderId; |
|
|
|
}) |
|
|
|
); |
|
|
|
api.current.validate().then((v) => { |
|
|
|
setearch(v); |
|
|
|
}); |
|
|
|
console.log(equipmentWarehouseCamera.data); |
|
|
|
equipmentGetCamera(); |
|
|
|
}} |
|
|
|
> |
|
|
|
搜素 |
|
|
@ -606,6 +605,7 @@ const CameraHeader = (props) => { |
|
|
|
visible={true} |
|
|
|
rowId={rowId} |
|
|
|
venderList={venderList} |
|
|
|
accessType={accessType} |
|
|
|
cameraSetup={cameraSetup} |
|
|
|
close={() => { |
|
|
|
setSideSheet(false); |
|
|
|