|
@ -10,6 +10,8 @@ import { |
|
|
Pagination, |
|
|
Pagination, |
|
|
Popover, |
|
|
Popover, |
|
|
Tag, |
|
|
Tag, |
|
|
|
|
|
Skeleton, |
|
|
|
|
|
Popconfirm, |
|
|
} from "@douyinfe/semi-ui"; |
|
|
} from "@douyinfe/semi-ui"; |
|
|
import "../style.less"; |
|
|
import "../style.less"; |
|
|
import CameraModal from "../components/cameraModal"; |
|
|
import CameraModal from "../components/cameraModal"; |
|
@ -100,7 +102,7 @@ const CameraHeader = (props) => { |
|
|
modalName="revise" |
|
|
modalName="revise" |
|
|
venderList={venderList} |
|
|
venderList={venderList} |
|
|
close={() => { |
|
|
close={() => { |
|
|
equipmentGetNvr(); |
|
|
equipmentGetCamera(); |
|
|
}} |
|
|
}} |
|
|
/> |
|
|
/> |
|
|
</Button> |
|
|
</Button> |
|
@ -115,30 +117,62 @@ const CameraHeader = (props) => { |
|
|
> |
|
|
> |
|
|
查看 |
|
|
查看 |
|
|
</Button> |
|
|
</Button> |
|
|
<Button theme="borderless">播放</Button> |
|
|
{row.forbidden ? ( |
|
|
<Button |
|
|
<Button |
|
|
theme="borderless" |
|
|
theme="borderless" |
|
|
onClick={() => { |
|
|
onClick={() => { |
|
|
console.log(row.id, !row.forbidden); |
|
|
|
|
|
dispatch( |
|
|
dispatch( |
|
|
equipmentWarehouse.putForbidden({ |
|
|
equipmentWarehouse.putForbidden( |
|
|
|
|
|
{ |
|
|
cameraId: row.id, |
|
|
cameraId: row.id, |
|
|
forbidden: !row.forbidden, |
|
|
forbidden: !row.forbidden, |
|
|
}) |
|
|
}, |
|
|
); |
|
|
row.forbidden |
|
|
|
|
|
) |
|
|
|
|
|
).then(() => { |
|
|
|
|
|
equipmentGetCamera(); |
|
|
|
|
|
}); |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
{row.forbidden ? "启用" : "禁用"} |
|
|
启用 |
|
|
</Button> |
|
|
</Button> |
|
|
<Button |
|
|
) : ( |
|
|
theme="borderless" |
|
|
<Popconfirm |
|
|
onClick={() => { |
|
|
title="禁用后下级业务系统将无法获取该视频流的所有信息。" |
|
|
dispatch(equipmentWarehouse.delNvr(row.id)); |
|
|
arrowPointAtCenter={false} |
|
|
equipmentGetNvr(); |
|
|
showArrow={true} |
|
|
|
|
|
position="topRight" |
|
|
|
|
|
onConfirm={() => { |
|
|
|
|
|
dispatch( |
|
|
|
|
|
equipmentWarehouse.putForbidden( |
|
|
|
|
|
{ |
|
|
|
|
|
cameraId: row.id, |
|
|
|
|
|
forbidden: !row.forbidden, |
|
|
|
|
|
}, |
|
|
|
|
|
row.forbidden |
|
|
|
|
|
) |
|
|
|
|
|
).then(() => { |
|
|
|
|
|
equipmentGetCamera(); |
|
|
|
|
|
}); |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
删除 |
|
|
<Button theme="borderless">禁用</Button> |
|
|
</Button> |
|
|
</Popconfirm> |
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
<Popconfirm |
|
|
|
|
|
title="删除NVR会删除端口下的所有摄像头,是否确定删除?" |
|
|
|
|
|
arrowPointAtCenter={false} |
|
|
|
|
|
showArrow={true} |
|
|
|
|
|
position="topRight" |
|
|
|
|
|
onConfirm={() => { |
|
|
|
|
|
dispatch(equipmentWarehouse.delNvr(row.id)).then(() => { |
|
|
|
|
|
equipmentGetCamera(); |
|
|
|
|
|
}); |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
<Button theme="borderless">删除</Button> |
|
|
|
|
|
</Popconfirm> |
|
|
</div> |
|
|
</div> |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
@ -203,13 +237,17 @@ const CameraHeader = (props) => { |
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
key: "name", |
|
|
key: "name", |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return r.station.map((item, index) => |
|
|
return r.station.length == 0 |
|
|
station( |
|
|
? "" |
|
|
item.structure.projects[0].name, |
|
|
: r.station.map((item, index) => { |
|
|
|
|
|
return item.structure.projects.length == 0 |
|
|
|
|
|
? "" |
|
|
|
|
|
: station( |
|
|
|
|
|
r.station[0].structure.projects[0].name, |
|
|
item.structure.projects, |
|
|
item.structure.projects, |
|
|
"name" |
|
|
"name" |
|
|
) |
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -217,13 +255,17 @@ const CameraHeader = (props) => { |
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
key: "pcode", |
|
|
key: "pcode", |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return r.station.map((item, index) => |
|
|
return r.station.length == 0 |
|
|
station( |
|
|
? "" |
|
|
item.structure.projects[0].url, |
|
|
: r.station.map((item, index) => { |
|
|
|
|
|
return item.structure.projects.length == 0 |
|
|
|
|
|
? "" |
|
|
|
|
|
: station( |
|
|
|
|
|
r.station[0].structure.projects[0].url, |
|
|
item.structure.projects, |
|
|
item.structure.projects, |
|
|
"url" |
|
|
"url" |
|
|
) |
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -231,11 +273,9 @@ const CameraHeader = (props) => { |
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
key: "structure", |
|
|
key: "structure", |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return station( |
|
|
return r.station.length == 0 |
|
|
r.station[0].structure.name, |
|
|
? "" |
|
|
r.station, |
|
|
: station(r.station[0].structure.name, r.station, "structure.name"); |
|
|
"structure.name" |
|
|
|
|
|
); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -243,7 +283,9 @@ const CameraHeader = (props) => { |
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
key: "measuringPoint", |
|
|
key: "measuringPoint", |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return station(r.station[0].name, r.station, "name"); |
|
|
return r.station.length == 0 |
|
|
|
|
|
? "" |
|
|
|
|
|
: station(r.station[0].name, r.station, "name"); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -251,7 +293,9 @@ const CameraHeader = (props) => { |
|
|
dataIndex: "updateTime", |
|
|
dataIndex: "updateTime", |
|
|
key: "factor", |
|
|
key: "factor", |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return station(r.station[0].factor.name, r.station, "factor.name"); |
|
|
return r.station.length == 0 |
|
|
|
|
|
? "" |
|
|
|
|
|
: station(r.station[0].factor.name, r.station, "factor.name"); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
]; |
|
@ -495,6 +539,11 @@ const CameraHeader = (props) => { |
|
|
border: "1px solid #D9D9D9", |
|
|
border: "1px solid #D9D9D9", |
|
|
marginBottom: 20, |
|
|
marginBottom: 20, |
|
|
}} |
|
|
}} |
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
api.current.reset(); |
|
|
|
|
|
setearch({}); |
|
|
|
|
|
equipmentGetCamera(); |
|
|
|
|
|
}} |
|
|
> |
|
|
> |
|
|
重置 |
|
|
重置 |
|
|
</Button> |
|
|
</Button> |
|
@ -558,8 +607,28 @@ const CameraHeader = (props) => { |
|
|
</Button> |
|
|
</Button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<Skeleton |
|
|
|
|
|
loading={!loading} |
|
|
|
|
|
placeholder={ |
|
|
|
|
|
<Table |
|
|
|
|
|
columns={setupp.filter((s) => s)} |
|
|
|
|
|
// dataSource={[ |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// { key: "" }, |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// { name: "" }, |
|
|
|
|
|
// ]} |
|
|
|
|
|
pagination={false} |
|
|
|
|
|
style={{ background: "rgba(217, 216, 216, 1)" }} |
|
|
|
|
|
empty=" " |
|
|
|
|
|
/> |
|
|
|
|
|
} |
|
|
|
|
|
> |
|
|
<Table |
|
|
<Table |
|
|
columns={setupp.filter(s => s)} |
|
|
columns={setupp.filter((s) => s)} |
|
|
dataSource={equipmentWarehouseCamera.data} |
|
|
dataSource={equipmentWarehouseCamera.data} |
|
|
bordered={false} |
|
|
bordered={false} |
|
|
empty="暂无数据" |
|
|
empty="暂无数据" |
|
@ -568,6 +637,7 @@ const CameraHeader = (props) => { |
|
|
}} |
|
|
}} |
|
|
pagination={false} |
|
|
pagination={false} |
|
|
/> |
|
|
/> |
|
|
|
|
|
</Skeleton> |
|
|
<div |
|
|
<div |
|
|
style={{ |
|
|
style={{ |
|
|
display: "flex", |
|
|
display: "flex", |
|
@ -641,7 +711,7 @@ const CameraHeader = (props) => { |
|
|
function mapStateToProps(state) { |
|
|
function mapStateToProps(state) { |
|
|
const { auth, global, members, equipmentWarehouseCamera } = state; |
|
|
const { auth, global, members, equipmentWarehouseCamera } = state; |
|
|
return { |
|
|
return { |
|
|
loading: members.isRequesting, |
|
|
loading: equipmentWarehouseCamera.isRequesting, |
|
|
user: auth.user, |
|
|
user: auth.user, |
|
|
actions: global.actions, |
|
|
actions: global.actions, |
|
|
members: members.data, |
|
|
members: members.data, |
|
|