|
|
@ -11,6 +11,7 @@ import { |
|
|
|
Popover, |
|
|
|
Tag, |
|
|
|
Skeleton, |
|
|
|
Popconfirm, |
|
|
|
} from "@douyinfe/semi-ui"; |
|
|
|
import "../style.less"; |
|
|
|
import CameraModal from "../components/cameraModal"; |
|
|
@ -116,30 +117,62 @@ const CameraHeader = (props) => { |
|
|
|
> |
|
|
|
查看 |
|
|
|
</Button> |
|
|
|
<Button theme="borderless">播放</Button> |
|
|
|
<Button |
|
|
|
theme="borderless" |
|
|
|
onClick={() => { |
|
|
|
dispatch( |
|
|
|
equipmentWarehouse.putForbidden({ |
|
|
|
cameraId: row.id, |
|
|
|
forbidden: !row.forbidden, |
|
|
|
}) |
|
|
|
); |
|
|
|
equipmentGetCamera(); |
|
|
|
}} |
|
|
|
> |
|
|
|
{row.forbidden ? "启用" : "禁用"} |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
theme="borderless" |
|
|
|
onClick={() => { |
|
|
|
dispatch(equipmentWarehouse.delNvr(row.id)); |
|
|
|
equipmentGetCamera(); |
|
|
|
{row.forbidden ? ( |
|
|
|
<Button |
|
|
|
theme="borderless" |
|
|
|
onClick={() => { |
|
|
|
dispatch( |
|
|
|
equipmentWarehouse.putForbidden( |
|
|
|
{ |
|
|
|
cameraId: row.id, |
|
|
|
forbidden: !row.forbidden, |
|
|
|
}, |
|
|
|
row.forbidden |
|
|
|
) |
|
|
|
).then(() => { |
|
|
|
equipmentGetCamera(); |
|
|
|
}); |
|
|
|
}} |
|
|
|
> |
|
|
|
启用 |
|
|
|
</Button> |
|
|
|
) : ( |
|
|
|
<Popconfirm |
|
|
|
title="禁用后下级业务系统将无法获取该视频流的所有信息。" |
|
|
|
arrowPointAtCenter={false} |
|
|
|
showArrow={true} |
|
|
|
position="topRight" |
|
|
|
onConfirm={() => { |
|
|
|
dispatch( |
|
|
|
equipmentWarehouse.putForbidden( |
|
|
|
{ |
|
|
|
cameraId: row.id, |
|
|
|
forbidden: !row.forbidden, |
|
|
|
}, |
|
|
|
row.forbidden |
|
|
|
) |
|
|
|
).then(() => { |
|
|
|
equipmentGetCamera(); |
|
|
|
}); |
|
|
|
}} |
|
|
|
> |
|
|
|
<Button theme="borderless">禁用</Button> |
|
|
|
</Popconfirm> |
|
|
|
)} |
|
|
|
|
|
|
|
<Popconfirm |
|
|
|
title="删除NVR会删除端口下的所有摄像头,是否确定删除?" |
|
|
|
arrowPointAtCenter={false} |
|
|
|
showArrow={true} |
|
|
|
position="topRight" |
|
|
|
onConfirm={() => { |
|
|
|
dispatch(equipmentWarehouse.delNvr(row.id)).then(() => { |
|
|
|
equipmentGetCamera(); |
|
|
|
}); |
|
|
|
}} |
|
|
|
> |
|
|
|
删除 |
|
|
|
</Button> |
|
|
|
<Button theme="borderless">删除</Button> |
|
|
|
</Popconfirm> |
|
|
|
</div> |
|
|
|
); |
|
|
|
}, |
|
|
@ -204,13 +237,17 @@ const CameraHeader = (props) => { |
|
|
|
dataIndex: "updateTime", |
|
|
|
key: "name", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.station.map((item, index) => |
|
|
|
station( |
|
|
|
item.structure.projects[0].name, |
|
|
|
item.structure.projects, |
|
|
|
"name" |
|
|
|
) |
|
|
|
); |
|
|
|
return r.station.length == 0 |
|
|
|
? "" |
|
|
|
: r.station.map((item, index) => { |
|
|
|
return item.structure.projects.length == 0 |
|
|
|
? "" |
|
|
|
: station( |
|
|
|
r.station[0].structure.projects[0].name, |
|
|
|
item.structure.projects, |
|
|
|
"name" |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -218,13 +255,17 @@ const CameraHeader = (props) => { |
|
|
|
dataIndex: "updateTime", |
|
|
|
key: "pcode", |
|
|
|
render: (_, r, index) => { |
|
|
|
return r.station.map((item, index) => |
|
|
|
station( |
|
|
|
item.structure.projects[0].url, |
|
|
|
item.structure.projects, |
|
|
|
"url" |
|
|
|
) |
|
|
|
); |
|
|
|
return r.station.length == 0 |
|
|
|
? "" |
|
|
|
: r.station.map((item, index) => { |
|
|
|
return item.structure.projects.length == 0 |
|
|
|
? "" |
|
|
|
: station( |
|
|
|
r.station[0].structure.projects[0].url, |
|
|
|
item.structure.projects, |
|
|
|
"url" |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -232,11 +273,9 @@ const CameraHeader = (props) => { |
|
|
|
dataIndex: "updateTime", |
|
|
|
key: "structure", |
|
|
|
render: (_, r, index) => { |
|
|
|
return station( |
|
|
|
r.station[0].structure.name, |
|
|
|
r.station, |
|
|
|
"structure.name" |
|
|
|
); |
|
|
|
return r.station.length == 0 |
|
|
|
? "" |
|
|
|
: station(r.station[0].structure.name, r.station, "structure.name"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -244,7 +283,9 @@ const CameraHeader = (props) => { |
|
|
|
dataIndex: "updateTime", |
|
|
|
key: "measuringPoint", |
|
|
|
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"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -252,7 +293,9 @@ const CameraHeader = (props) => { |
|
|
|
dataIndex: "updateTime", |
|
|
|
key: "factor", |
|
|
|
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"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
@ -565,14 +608,22 @@ const CameraHeader = (props) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Skeleton |
|
|
|
loading={loading} |
|
|
|
loading={!loading} |
|
|
|
placeholder={ |
|
|
|
<Table |
|
|
|
columns={setupp.filter((s) => s)} |
|
|
|
dataSource={[{ name: "" },{ key: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" }]} |
|
|
|
// dataSource={[ |
|
|
|
// { name: "" }, |
|
|
|
// { key: "" }, |
|
|
|
// { name: "" }, |
|
|
|
// { name: "" }, |
|
|
|
// { name: "" }, |
|
|
|
// { name: "" }, |
|
|
|
// { name: "" }, |
|
|
|
// ]} |
|
|
|
pagination={false} |
|
|
|
style={{ background: "rgba(217, 216, 216, 1)" }} |
|
|
|
empty="" |
|
|
|
empty=" " |
|
|
|
/> |
|
|
|
} |
|
|
|
> |
|
|
|