Browse Source

状态码页面静态页面及接口联调

release_1.1.1
deartibers 2 years ago
parent
commit
bdb2dbe84c
  1. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/codeAfter.png
  2. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/codeArrow.png
  3. BIN
      code/VideoAccess-VCMP/web/client/assets/images/background/codeBefore.png
  4. BIN
      code/VideoAccess-VCMP/web/client/assets/video/37ov3-lit2e.mp4
  5. 6
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx
  6. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  7. 4
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx
  8. 6
      code/VideoAccess-VCMP/web/client/src/sections/offline/actions/index.js
  9. 42
      code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js
  10. 124
      code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx
  11. 85
      code/VideoAccess-VCMP/web/client/src/sections/offline/components/programmeModal.jsx
  12. 2
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx
  13. 409
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx
  14. 4
      code/VideoAccess-VCMP/web/client/src/utils/webapi.js

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/codeAfter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/codeArrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

BIN
code/VideoAccess-VCMP/web/client/assets/images/background/codeBefore.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
code/VideoAccess-VCMP/web/client/assets/video/37ov3-lit2e.mp4

Binary file not shown.

6
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx

@ -114,8 +114,8 @@ function remarksModal (props) {
))} ))}
</div> </div>
</div> </div>
<div style={{width:306,marginLeft:20}}> <div style={{width:308,marginLeft:20,border:'1px solid #F5F6F7'}}>
<div style={{ position: "absolute",background:'rgba(0, 0, 0, 0.15)',width:306}}> <div style={{ position: "absolute",background:'rgba(24,89,193,0.8)',width:306}}>
<TextScroll content={showScrollList} roll={roll} duration={6} /> <TextScroll content={showScrollList} roll={roll} duration={6} />
</div> </div>
<video <video
@ -124,7 +124,7 @@ function remarksModal (props) {
loop loop
muted muted
style={{ width: 306,height:185, objectFit: "cover", }} style={{ width: 306,height:185, objectFit: "cover", }}
src="/assets/video/remarks.mp4" src="/assets/video/37ov3-lit2e.mp4"
type="video/mp4" type="video/mp4"
/> />
</div> </div>

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -682,7 +682,7 @@ const CameraHeader = (props) => {
}); });
}} }}
> >
</Button> </Button>
<Button <Button
theme="light" theme="light"

4
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

@ -93,7 +93,7 @@ const NvrHeader = (props) => {
return "离线" return "离线"
default: default:
return "未知" return "未知"
}F }
} }
function colorStatus (data) { function colorStatus (data) {
@ -485,7 +485,7 @@ const NvrHeader = (props) => {
}); });
}} }}
> >
</Button> </Button>
<Button <Button
theme="light" theme="light"

6
code/VideoAccess-VCMP/web/client/src/sections/offline/actions/index.js

@ -1,5 +1,9 @@
'use strict'; 'use strict';
export default { import * as statuscode from './statuscode'
// import * as camera from './camera'
export default {
// ...statuscode,...camera
...statuscode
} }

42
code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js

@ -0,0 +1,42 @@
"use strict";
import { basicAction } from "@peace/utils";
import { ApiTable } from "$utils";
export function getStatus(query) {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_STATUS",
query: query,
url: `${ApiTable.getStatus}`,
msg: { option: "获取状态码列表信息" },
reducer: { name: "StatusList" },
});
}
export function putStatueBanned(data, forbidden) {
return (dispatch) =>
basicAction({
type: "put",
dispatch: dispatch,
actionType: "PUT_STATUEBANNED",
data,
url: `${ApiTable.putStatueBanned}`,
msg: { option: forbidden ? "启用" : "禁用" }, //禁用状态码自定义
reducer: {},
});
}
export function postStatusResolve(data) {
return (dispatch) =>
basicAction({
type: "post",
dispatch: dispatch,
data,
actionType: "POST_STATUS_RESOLVE",
url: `${ApiTable.postStatusResolve}`,
msg: { option: "" }, //编辑解决方案
reducer: { name: "" },
});
}

124
code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx

@ -0,0 +1,124 @@
import React, { useState, useRef, useEffect } from "react";
import { connect } from "react-redux";
import { Modal, Spin,Input,TagInput } from "@douyinfe/semi-ui";
function programmeModal (props) {
const {
close,
rowId,
dispatch,
actions,
nodesAll
} = props;
const { equipmentWarehouse } = actions;
const [notesValue, setNotesValue] = useState('');//
//
useEffect(() => {
}, []);
function handleOk () {
//
// dispatch(
// equipmentWarehouse.postCameraRemark({
// cameraId:rowId,
// remark:showScrollList
// })
// ).then((res) => {
// close();
// })
}
function handleCancel () {
close();
//
}
function onChange(value){
console.log('value',value);
setNotesValue(value)
}
return (
<>
<Modal
title={nodesAll?'批量设置':'释义'}
okText="确定"
cancelText="取消"
visible={true}
onOk={handleOk}
width={607}
onCancel={handleCancel}
>
{/* <div style={{margin:"17px 56px 18px 31px"}}>
<div style={{color:'rgba(0, 0, 0, 0.65)',}}>
解决方案设置
</div>
<div style={{color:'rgba(0, 0, 0, 0.45)',fontSize:12,marginTop:4}}>
敲击回车键后输入内容将成为标签
</div>
<div style={{marginTop:10}}>
<TagInput
defaultValue={['设备是否接触良好','刷新重试,检测设备网络,重启设备']}
placeholder='请输入解决方案'
size='large'
maxLength={18}
onChange={v => console.log(v)}
/>
</div>
</div> */}
{nodesAll?(
<div style={{margin:"17px 32px 28px 32px"}}>
</div>
):(
<div style={{margin:"17px 32px 28px 32px"}}>
<div style={{color: 'rgba(0,0,0,0.65)',fontWeight: 600}}>当视频出错时提示以下内容</div>
<div style={{marginTop:12}}><Input
style={{width:'100%'}}
value={notesValue}
onChange={onChange}
maxLength={18}
placeholder="请输入自定义释义"
showClear>
</Input>
</div>
</div>
)}
<div style={{display:'flex',margin:'0px 20px',alignItems: 'center',justifyContent: 'space-between'}}>
<div>
<img
src="/assets/images/background/codeBefore.png"
alt="设置"
style={{ width: 240, height: 146 }}
/>
</div>
<div>
<img
src="/assets/images/background/codeArrow.png"
alt="设置"
style={{ width: 18, height: 15 }}
/>
</div>
<div>
<img
src="/assets/images/background/codeAfter.png"
alt="设置"
style={{ width: 240, height: 146 }}
/>
</div>
</div>
</Modal>
</>
);
}
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)(programmeModal);

85
code/VideoAccess-VCMP/web/client/src/sections/offline/components/programmeModal.jsx

@ -0,0 +1,85 @@
import React, { useState, useRef, useEffect } from "react";
import { connect } from "react-redux";
import { Modal, Spin,Input,TagInput } from "@douyinfe/semi-ui";
function programmeModal (props) {
const {
close,
rowId,
dispatch,
actions,
resolve,//
} = props;
const { offline } = actions;//
const [myresolve, setMyResolve] = useState([]);//
//
useEffect(() => {
let resolvearr=[]
for (let index = 0; index < resolve.length; index++) {
resolvearr.push(resolve[index].resolve)
}
setMyResolve(resolvearr)
}, []);
function handleOk () {
//
dispatch(
offline.postStatusResolve({
statusId:rowId,
resolve:myresolve
})
).then((res) => {
close();
})
}
function handleCancel () {
close();
//
}
function onChange(value){
setMyResolve(value)
}
return (
<>
<Modal
title="方案"
okText="确定"
cancelText="取消"
visible={true}
onOk={handleOk}
width={607}
onCancel={handleCancel}
>
<div style={{margin:"17px 56px 18px 31px"}}>
<div style={{color:'rgba(0, 0, 0, 0.65)',}}>
解决方案设置
</div>
<div style={{color:'rgba(0, 0, 0, 0.45)',fontSize:12,marginTop:4}}>
敲击回车键后输入内容将成为标签
</div>
<div style={{marginTop:10}}>
<TagInput
defaultValue={myresolve}
placeholder='请输入解决方案'
size='large'
maxLength={18}
onChange={onChange}
/>
</div>
</div>
</Modal>
</>
);
}
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)(programmeModal);

2
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

@ -79,7 +79,7 @@ const Carrierpigeon = (props) => {
return "短信通知" return "短信通知"
default: default:
return "未知" return "未知"
}F }
} }
function colorStatus (data) { function colorStatus (data) {

409
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx

@ -2,117 +2,108 @@ import React, { useState, useEffect, useRef } from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import moment from "moment"; import moment from "moment";
import { Button, Form, Table, Pagination, Skeleton, Popconfirm, Popover, Tag, } from "@douyinfe/semi-ui"; import { Button, Form, Table, Pagination, Skeleton, Popconfirm, Popover, Tag, } from "@douyinfe/semi-ui";
import { IconSort,IconCaretdown,IconCaretup } from '@douyinfe/semi-icons';
import "../style.less"; import "../style.less";
import {Setup} from "$components"; import {Setup} from "$components";
// import SideSheets from "../components/sideSheet"; import ProgrammeModal from "../components/programmeModal";
import NotesModal from "../components/notesModal";
// import { skeletonScreen } from "../components/skeletonScreen"; // import { skeletonScreen } from "../components/skeletonScreen";
// import { ReminderBox } from "../../../components/index";
export const accessType = [ export const accessType = {
{ name: "萤石云", key: "yingshi" }, "yingshi": "萤石云",
{ name: "NVR", key: "nvr" }, "nvr": "NVR",
{ name: "IPC", key: "ipc" }, "ipc": "IPC",
{ name: "级联", key: "cascade" }, "cascade": "级联"
]; };
const Statuscode = (props) => { const Statuscode = (props) => {
const { history, dispatch, actions, user, loading, equipmentWarehouseNvr } = props; const { history, dispatch, actions, user, loading, StatusList } = props;
const { equipmentWarehouse } = actions; const { offline } = actions;
const [setup, setSetup] = useState(false); const [setup, setSetup] = useState(false);//
const [sideSheet, setSideSheet] = useState(false); const [programme, setProgramme] = useState(false);//
const [notes, setNotes] = useState(false);//
const [setupp, setSetupp] = useState([]); 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 [search, setearch] = useState({}); //
const [rowId, setRowId] = useState(); //id const [rowId, setRowId] = useState(); //id
const [reminder, setReminder] = useState(false); //
const api = useRef(); const api = useRef();
const searchData = useRef(search) const searchData = useRef(search)
const limits = useRef(); // const limits = useRef(); //
const page = useRef(query.page); const page = useRef(query.page);
const CODE = "code"; const CODE = "code";
const USER = "user" + props.user.id const [nodesAll, setNodesAll] = useState(true);//
const nvrRef = useRef(); // const [mysorter, setMysorter] = useState(true);//
const sorter = useRef(false);//
const [resolve, setResolve] = useState([]);//
const tableList = [// const tableList = [//
{ {
title:'状态码信息', title:'状态码信息',
list:[ list:[
{ name: "常规解决方案", value: "manufactor" }, { name: "常规解决方案", value: "resolve" },
{ name: "状态频率", value: "accountNumber" }, { name: "状态频率", value: "logCount" },
] ]
}, },
]; ];
useEffect(() => { useEffect(() => {
dispatch(actions.equipmentWarehouse.getVender()).then((res) => {
setvenderList(res.payload.data);
attribute(res.payload.data);
});
// //
attribute();
localStorage.getItem(CODE) == null localStorage.getItem(CODE) == null
? localStorage.setItem( ? localStorage.setItem(
CODE, CODE,
JSON.stringify(["manufactor", "accountNumber"]) JSON.stringify(["resolve", "logCount"])
) )
: ""; : "";
}, []); }, [sorter.current]);
useEffect(() => { useEffect(() => {
equipmentGetNvr(); codegetStatus();
}, [query, search]); }, [query, search]);
const equipmentGetNvr = () => { const codegetStatus = () => {
searchData.current = { ...query, ...search } searchData.current = { ...query, ...search }
dispatch(equipmentWarehouse.getNvr(searchData.current)).then((res) => { dispatch(offline.getStatus(searchData.current)).then((res) => {
limits.current = res.payload.data.data.length
});
}
function equipmentStatus (data) {
switch (data) {
case "ON":
return "在线"
case "ONLINE":
return "在线"
case "OFF":
return "离线"
default:
return "未知"
}F
}
function colorStatus (data) { });
switch (data) {
case "ON":
return "#04B234"
case "ONLINE":
return "#04B234"
case "OFF":
return "rgba(0, 0, 0, 0.45)"
default:
return "#1859C1"
}
} }
const columns = [ const columns = [
{ {
title: "序号", title: "状态码",
dataIndex: "status",
render: (_, record, index) => { render: (_, record, index) => {
return index + 1; return record.status
}, },
}, },
{ {
title: "设备名称", title: "平台",
dataIndex: "name", dataIndex: "platform",
render: (_, r, index) => { render: (_, r, index) => {
console.log(r); let platform=r.platform
return r.name return accessType[platform]
}, },
}, },
{ {
title: "SIP地址", title: "错误描述",
dataIndex: "owner", dataIndex: "describe",
render: (_, r, index) => { render: (_, r, index) => {
return r?.gbNvr?.sipip return r.describe
},
},
{
title: "释义",
dataIndex: "paraphrase",
render: (_, r, index) => {
return r.paraphrase
},
},
{
title: "我的自定义释义",
dataIndex: "paraphraseCustom",
render: (_, r, index) => {
return r.paraphraseCustom
}, },
}, },
{ {
@ -122,171 +113,140 @@ const Statuscode = (props) => {
render: (_, row) => { render: (_, row) => {
return ( return (
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
<Button theme="borderless"> {row.forbidden ? (
启用
</Button>
<Button <Button
theme="borderless" theme="borderless"
onClick={() => { onClick={() => {
setSideSheet(true); dispatch(
setRowId(row.id); offline.putStatueBanned(
{
statusId: row.id,
forbidden: !row.forbidden,
},
row.forbidden
)
).then(() => {
codegetStatus();
});
}} }}
> >
释义 启用
</Button> </Button>
) : (
<Popconfirm <Popconfirm
title="删除NVR会删除端口下的所有摄像头,是否确定删除?" title="禁用后下级业务系统将无法获取该视频流的所有信息。"
arrowPointAtCenter={false} arrowPointAtCenter={false}
showArrow={true} showArrow={true}
position="topRight" position="topRight"
onConfirm={() => { onConfirm={() => {
dispatch(equipmentWarehouse.delNvr(row.id)).then(() => { dispatch(
if (page.current > 0 && limits.current < 2) { offline.putStatueBanned(
setQuery({ limit: 10, page: page.current - 1 }) {
} else { statusId: row.id,
setQuery({ limit: 10, page: page.current }) forbidden: !row.forbidden,
} },
row.forbidden
)
).then(() => {
codegetStatus();
}); });
}} }}
> >
<Button theme="borderless">方案</Button> <Button theme="borderless">禁用</Button>
</Popconfirm> </Popconfirm>
)}
<Button
theme="borderless"
onClick={() => {
setNotes(true);
setNodesAll(false);
setRowId(row.id);
}}
>
释义
</Button>
<Button theme="borderless"
onClick={() => {
setProgramme(true);
setRowId(row.id);
setResolve(row.resolve);
}}>
方案
</Button>
</div> </div>
); );
}, },
}, },
]; ];
function tosorter(){
setMysorter(false)
if(sorter.current=="descend"){
searchData.current = { ...query, ...search, orderDirection:'ASC',orderBy:'logCount'}
dispatch(offline.getStatus(searchData.current)).then((res) => {
sorter.current='ascend'
setMysorter('ascend')
});
}
else if(sorter.current=="ascend"){
searchData.current = { ...query, ...search}
dispatch(offline.getStatus(searchData.current)).then((res) => {
sorter.current=''
setMysorter('')
});
}
else{
searchData.current = { ...query, ...search, orderDirection:'DESC',orderBy:'logCount'}
dispatch(offline.getStatus(searchData.current)).then((res) => {
sorter.current='descend'
setMysorter('descend')
});
}
}
// //
function attribute (data) { function attribute () {
const arr = localStorage.getItem(CODE) const arr = localStorage.getItem(CODE)
? JSON.parse(localStorage.getItem(CODE)) ? JSON.parse(localStorage.getItem(CODE))
: []; : [];
const column = [ const column = [
{ {
title: "设备厂家", title: "常规解决方案",
dataIndex: "venderId", dataIndex: "resolve",
key: "manufactor", key:'resolve',
render: (_, r, index) => {
let manufactorName = data.find((item) => item.id == r.venderId);
return manufactorName ? manufactorName.name : "";
},
},
{
title: "添加账号",
dataIndex: "createUserId",
key: "accountNumber",
render: (_, r, index) => {
return r?.createUser?.name
},
},
{
title: "通道数",
dataIndex: "channelCount",
key: "passageway",
},
{
title: "端口",
dataIndex: "port",
key: "port",
},
{
title: "设备状态",
dataIndex: "size",
key: "state",
render: (_, r, index) => {
let status = r.gbNvr;
return (
<div>
<span
style={{
width: 8,
height: 8,
display: "inline-block",
borderRadius: "50%",
backgroundColor: status ? colorStatus(status.online) : "",
margin: "0 8px 0 0",
}}
/>
{status ? equipmentStatus(status.online) : ""}
</div>
);
},
},
{
title: "创建时间",
dataIndex: "createTime",
key: "time",
render: (_, r, index) => {
return moment(r.createTime).format("YYYY-MM-DD HH:MM:SS");
},
},
{
title: "项目名称",
dataIndex: "",
key: "name",
render: (_, r, index) => { render: (_, r, index) => {
return r.station.length == 0 let myresolve=''
? "" if(r.resolve.length>0){
: station(r, "name", "projects") let myresolveList=[];
}, for (let index = 0; index < r.resolve.length; index++) {
}, if(r.resolve[index]&&r.resolve[index].resolve){
{ myresolveList.push(r.resolve[index].resolve)
title: "pcode", }
dataIndex: "", }
key: "pcode", myresolve=myresolveList.join(';');
render: (_, r, index) => { }
return r.station.length == 0 return myresolve
? ""
: station(r, "url", "projects")
}, },
}, },
{ {
title: "结构物", title:(<span onClick={tosorter}>
dataIndex: "", 状态频率近30日
key: "structure", {mysorter=='descend'?<IconCaretdown />:mysorter=='ascend'?<IconCaretup />:<IconSort />}
</span>),
dataIndex: "logCount",
key:'logCount',
render: (_, r, index) => { render: (_, r, index) => {
return r.station.length == 0 return r.logCount
? ""
: station(r, "name")
}, },
}, },
]; ];
let mycolumns=columns
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
let colum = column.filter((item) => { let colum = column.filter((item) => {
return item.key === arr[i]; return item.key === arr[i];
}); });
columns.splice(i + 2, 0, colum[0]); mycolumns.splice(i + 5, 0, colum[0]);
}
setSetupp(columns);
} }
setSetupp(mycolumns);
//station
function station (r, name, projects) {
let data = []
if (projects == "projects") {
r.station.map((v) => {
if (v.structure.projects.length > 0) {
v.structure.projects.map((item) => data.push(item[name]))
}
})
} else {
r.station.map((v, index) => data.push(v.structure[name]))
} }
let dataSet = [...(new Set(data))]
return dataSet.length > 0 ? <Popover
key="updateTime"
position="top"
content={
dataSet.length > 1 ? <article style={{ padding: 12 }}>{dataSet.map((v, index) => <div key={index}>{v}</div>)}</article> : ""
}
>
<Tag>{dataSet.length > 1 ? `${dataSet[0]}...` : dataSet.length > 0 ? dataSet[0] : ""}</Tag>
</Popover> : ""
}
// //
const screen = { const screen = {
width: 193, width: 193,
@ -370,25 +330,25 @@ const Statuscode = (props) => {
label="启用状态:" label="启用状态:"
labelPosition="left" labelPosition="left"
style={screen} style={screen}
field="venderId" field="forbidden"
placeholder="全部" placeholder="全部"
showClear showClear
> >
<Form.Select.Option value="ALL">全部</Form.Select.Option> <Form.Select.Option value="">全部</Form.Select.Option>
<Form.Select.Option value="OFF">启用</Form.Select.Option> <Form.Select.Option value="false">启用</Form.Select.Option>
<Form.Select.Option value="UNKONW">禁用</Form.Select.Option> <Form.Select.Option value="true">禁用</Form.Select.Option>
</Form.Select> </Form.Select>
<Form.Select <Form.Select
label="状态查询:" label="状态查询:"
labelPosition="left" labelPosition="left"
field="state" field="paraphraseCustom"
style={screen} style={screen}
placeholder="全部" placeholder="全部"
showClear showClear
> >
<Form.Select.Option value="ALL">全部</Form.Select.Option> <Form.Select.Option value="">全部</Form.Select.Option>
<Form.Select.Option value="OFF">已设置</Form.Select.Option> <Form.Select.Option value="false">已设置</Form.Select.Option>
<Form.Select.Option value="UNKONW">未设置</Form.Select.Option> <Form.Select.Option value="true">未设置</Form.Select.Option>
</Form.Select> </Form.Select>
</Form> </Form>
<div <div
@ -416,7 +376,7 @@ const Statuscode = (props) => {
}); });
}} }}
> >
</Button> </Button>
<Button <Button
theme="light" theme="light"
@ -492,10 +452,7 @@ const Statuscode = (props) => {
borderRadius: 3, borderRadius: 3,
}} }}
onClick={() => { onClick={() => {
// api.current.validate().then((v) => {
// setearch(v);
// setQuery({ limit: 10, page: 0 })
// });
}} }}
> >
批量设置 批量设置
@ -509,7 +466,7 @@ const Statuscode = (props) => {
> >
<Table <Table
columns={setupp.filter((s) => s)} columns={setupp.filter((s) => s)}
dataSource={equipmentWarehouseNvr.data} dataSource={StatusList.rows}
bordered={false} bordered={false}
empty="暂无数据" empty="暂无数据"
style={{ style={{
@ -527,10 +484,10 @@ const Statuscode = (props) => {
}} }}
> >
<span style={{ lineHeight: "30px" }}> <span style={{ lineHeight: "30px" }}>
{equipmentWarehouseNvr.total}个设备 {StatusList.count}个设备
</span> </span>
<Pagination <Pagination
total={equipmentWarehouseNvr.total} total={StatusList.count}
showSizeChanger showSizeChanger
currentPage={query.page + 1} currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]} pageSizeOpts={[10, 20, 30, 40]}
@ -547,54 +504,42 @@ const Statuscode = (props) => {
tableList={tableList} tableList={tableList}
close={() => { close={() => {
setSetup(false); setSetup(false);
attribute(venderList); attribute();
}} }}
/> />
) : ( ) : (
"" ""
)} )}
{programme&&<ProgrammeModal
{/* {sideSheet ? (
<SideSheets
visible={true}
rowId={rowId} rowId={rowId}
accessType={accessType} resolve={resolve}
venderList={venderList}
close={() => { close={() => {
setSideSheet(false); setProgramme(false);
}} setRowId();
/> codegetStatus();
) : (
[]
)} */}
{/* <ReminderBox
title="是否继续添加NVR摄像头?"
wait="再等等"
toadd="去添加"
visible={reminder}
USER={USER}
onOk={() => {
history.push({ pathname: '/equipmentWarehouse/camera', query: { addNvr: true, serialNo: nvrRef.current.nvrNumber() } });
localStorage.setItem('vcmp_selected_sider', JSON.stringify("camera"))
setReminder(false)
}} }}
/>}
{notes&&<NotesModal
rowId={rowId}
nodesAll={nodesAll}
close={() => { close={() => {
setReminder(false) setNotes(false);
setRowId();
}} }}
/> */} />}
</div> </div>
</> </>
); );
}; };
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, members, equipmentWarehouseNvr } = state; const { auth, global, members, StatusList } = state;
return { return {
loading: equipmentWarehouseNvr.isRequesting && !equipmentWarehouseNvr.data, loading: StatusList.isRequesting && !StatusList.data,
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
members: members.data, members: members.data,
equipmentWarehouseNvr: equipmentWarehouseNvr.data || {}, StatusList: StatusList.data || {},
}; };
} }

4
code/VideoAccess-VCMP/web/client/src/utils/webapi.js

@ -39,6 +39,10 @@ export const ApiTable = {
getCascadeStream: "camera/cascade_stream", //获取级联视频流 getCascadeStream: "camera/cascade_stream", //获取级联视频流
uploadYingshiVoice: 'camera/yingshi_voice/upload', //上传萤石语音 uploadYingshiVoice: 'camera/yingshi_voice/upload', //上传萤石语音
postCameraRemark: 'camera/remark',//编辑摄像头备注 postCameraRemark: 'camera/remark',//编辑摄像头备注
//获取状态码
getStatus: 'status',//获取状态码
putStatueBanned:'status/banned',//禁用状态码自定义
postStatusResolve:'status/resolve',//编辑解决方案
}; };
export const VideoServeApi = { export const VideoServeApi = {

Loading…
Cancel
Save