Browse Source

添加骨架屏

release_0.0.2
wenlele 3 years ago
parent
commit
6efe633899
  1. 90
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js
  2. 24
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js
  3. 19
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx
  4. 47
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  5. 946
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

90
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js

@ -4,50 +4,50 @@ import { basicAction } from "@peace/utils";
import { ApiTable } from "$utils"; import { ApiTable } from "$utils";
export function getCamera(query) { export function getCamera(query) {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_CAMREA", actionType: "GET_CAMREA",
query: query, query: query,
url: `${ApiTable.getCamera}`, url: `${ApiTable.getCamera}`,
msg: { option: "获取摄像头列表信息" }, msg: { option: "获取摄像头列表信息" },
reducer: { name: "equipmentWarehouseCamera" }, reducer: { name: "equipmentWarehouseCamera", params: { noClear: true } },
}); });
} }
export function putForbidden(data) { export function putForbidden(data) {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "put", type: "put",
dispatch: dispatch, dispatch: dispatch,
actionType: "PUT_FORBIDDEN", actionType: "PUT_FORBIDDEN",
data, data,
url: `${ApiTable.putForbidden}`, url: `${ApiTable.putForbidden}`,
msg: { option: "" }, //禁用摄像头 msg: { option: "" }, //禁用摄像头
reducer: {}, reducer: {},
}); });
} }
export function getCameraDetails(orgId) { export function getCameraDetails(orgId) {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_CAMREA_DETAILS", actionType: "GET_CAMREA_DETAILS",
url: `${ApiTable.getCameraDetails.replace("{cameraId}", orgId)}`, url: `${ApiTable.getCameraDetails.replace("{cameraId}", orgId)}`,
msg: { option: "" }, //获取摄像头详情 msg: { option: "" }, //获取摄像头详情
reducer: { name: "nvrDetails" }, reducer: { name: "nvrDetails" },
}); });
} }
export function getAbility() { export function getAbility() {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_ABILITY", actionType: "GET_ABILITY",
url: `${ApiTable.getAbility}`, url: `${ApiTable.getAbility}`,
msg: { option: "获取摄像头能力列表" }, msg: { option: "获取摄像头能力列表" },
reducer: { name: "equipmentWarehouseCamera" }, reducer: { name: "equipmentWarehouseCamera" },
}); });
} }

24
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js

@ -24,7 +24,7 @@ export function getNvr(query) {
query: query, query: query,
url: `${ApiTable.getNvr}`, url: `${ApiTable.getNvr}`,
msg: { option: "获取nvr列表信息" }, msg: { option: "获取nvr列表信息" },
reducer: { name: "equipmentWarehouseNvr" }, reducer: { name: "equipmentWarehouseNvr", params: { noClear: true } },
}); });
} }
@ -35,21 +35,21 @@ export function getNvrDetails(orgId) {
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_NVR_DETAILS", actionType: "GET_NVR_DETAILS",
url: `${ApiTable.getNvrDetails.replace("{nvrId}", orgId)}`, url: `${ApiTable.getNvrDetails.replace("{nvrId}", orgId)}`,
msg: { option: "" }, //获取nvr详情 msg: { option: "" }, //获取nvr详情
reducer: { name: "nvrDetails" }, reducer: { name: "nvrDetails" },
}); });
} }
export function delNvr(orgId) { export function delNvr(orgId) {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "del", type: "del",
dispatch: dispatch, dispatch: dispatch,
actionType: "DEL_NVR", actionType: "DEL_NVR",
url: `${ApiTable.delNvr.replace("{nvrId}", orgId)}`, url: `${ApiTable.delNvr.replace("{nvrId}", orgId)}`,
msg: { option: "删除NVR" }, msg: { option: "删除NVR" },
reducer: { name: "" }, reducer: { name: "" },
}); });
} }
export function addchangeNvr(data) { export function addchangeNvr(data) {
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({

19
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/sideSheet.jsx

@ -33,7 +33,7 @@ function SideSheets(props) {
basics: [ basics: [
{ name: "设备名称:", key: "name" }, { name: "设备名称:", key: "name" },
{ name: "设备编号:", key: "serialNo" }, { name: "设备编号:", key: "serialNo" },
{ name: "接入方式:", key: "type" }, { name: "接入方式:", key: "accessWay" },
{ name: "厂商:", key: "venderId" }, { name: "厂商:", key: "venderId" },
{ name: "添加账号:", key: "createUser" }, { name: "添加账号:", key: "createUser" },
{ name: "添加时间:", key: "createTime" }, { name: "添加时间:", key: "createTime" },
@ -148,8 +148,8 @@ function SideSheets(props) {
equipmentScrollbar = new PerfectScrollbar("#equipment_information", { equipmentScrollbar = new PerfectScrollbar("#equipment_information", {
suppressScrollX: true, suppressScrollX: true,
}); });
console.log(nvrDetails);
}); });
console.log(nvrDetails);
}, []); }, []);
useEffect(() => { useEffect(() => {
@ -340,13 +340,16 @@ function SideSheets(props) {
<span <span
style={{ fontWeight: "600", color: " #34383E" }} style={{ fontWeight: "600", color: " #34383E" }}
> >
{item.key == "typ" {item.key == "typ" ////////////////////////////////
? accessType.find((v) => v.key == nvrDetails.type) ? accessType.find(
.name (v) => v.key == nvrDetails.type
: item.key == "venderId"
? venderList.find(
(v) => v.id == nvrDetails.venderId
).name ).name
: item.key == "venderId"
? nvrDetails.venderId
? venderList.find(
(v) => v.id == nvrDetails.venderId
).name
: ""
: item.key == "createUser" : item.key == "createUser"
? nvrDetails.createUser.namePresent ? nvrDetails.createUser.namePresent
: item.key == "createTime" : item.key == "createTime"

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

@ -10,6 +10,7 @@ import {
Pagination, Pagination,
Popover, Popover,
Tag, Tag,
Skeleton,
} 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 +101,7 @@ const CameraHeader = (props) => {
modalName="revise" modalName="revise"
venderList={venderList} venderList={venderList}
close={() => { close={() => {
equipmentGetNvr(); equipmentGetCamera();
}} }}
/> />
</Button> </Button>
@ -119,13 +120,13 @@ const CameraHeader = (props) => {
<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,
}) })
); );
equipmentGetCamera();
}} }}
> >
{row.forbidden ? "启用" : "禁用"} {row.forbidden ? "启用" : "禁用"}
@ -134,7 +135,7 @@ const CameraHeader = (props) => {
theme="borderless" theme="borderless"
onClick={() => { onClick={() => {
dispatch(equipmentWarehouse.delNvr(row.id)); dispatch(equipmentWarehouse.delNvr(row.id));
equipmentGetNvr(); equipmentGetCamera();
}} }}
> >
删除 删除
@ -495,6 +496,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,16 +564,29 @@ const CameraHeader = (props) => {
</Button> </Button>
</div> </div>
</div> </div>
<Table <Skeleton
columns={setupp.filter(s => s)} loading={loading}
dataSource={equipmentWarehouseCamera.data} placeholder={
bordered={false} <Table
empty="暂无数据" columns={setupp.filter((s) => s)}
style={{ dataSource={[{ name: "" },{ key: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" }]}
padding: "0px 20px", pagination={false}
}} style={{ background: "rgba(217, 216, 216, 1)" }}
pagination={false} empty=""
/> />
}
>
<Table
columns={setupp.filter((s) => s)}
dataSource={equipmentWarehouseCamera.data}
bordered={false}
empty="暂无数据"
style={{
padding: "0px 20px",
}}
pagination={false}
/>
</Skeleton>
<div <div
style={{ style={{
display: "flex", display: "flex",
@ -641,7 +660,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,

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

@ -1,324 +1,334 @@
import React, { useState, useEffect, useRef } from "react"; 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, Input, Row, Table, Pagination } from "@douyinfe/semi-ui"; import {
Button,
Form,
Input,
Row,
Table,
Pagination,
Skeleton,
} from "@douyinfe/semi-ui";
import "../style.less"; import "../style.less";
import NvrModal from "../components/nvrModal"; import NvrModal from "../components/nvrModal";
import Setup from "../components/setup"; import Setup from "../components/setup";
import SideSheets from "../components/sideSheet"; import SideSheets from "../components/sideSheet";
export const accessType = [ export const accessType = [
{ name: "萤石云平台摄像头", key: "yingshi" }, { name: "萤石云平台摄像头", key: "yingshi" },
{ name: "NVR摄像头", key: "nvr" }, { name: "NVR摄像头", key: "nvr" },
{ name: "IPC 网络摄像头", key: "ipc" }, { name: "IPC 网络摄像头", key: "ipc" },
{ name: "级联摄像头", key: "cascade" }, { name: "级联摄像头", key: "cascade" },
]; ];
const NvrHeader = (props) => { const NvrHeader = (props) => {
const { dispatch, actions, user, loading, equipmentWarehouseNvr } = props; const { dispatch, actions, user, loading, equipmentWarehouseNvr } = props;
const { equipmentWarehouse } = actions; const { equipmentWarehouse } = actions;
const [setup, setSetup] = useState(false); // const [loading, setLoading] = useState(false);
const [sideSheet, setSideSheet] = useState(false); const [setup, setSetup] = useState(false);
const [setupp, setSetupp] = useState([]); const [sideSheet, setSideSheet] = useState(false);
const [venderList, setvenderList] = useState([]); // const [setupp, setSetupp] = useState([]);
const [query, setQuery] = useState({ limit: 10, page: 0 }); // const [venderList, setvenderList] = useState([]); //
const [search, setearch] = useState({}); // const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [rowId, setRowId] = useState(); //id const [search, setearch] = useState({}); //
const [rowId, setRowId] = useState(); //id
const api = useRef(); const api = useRef();
const SETUPS = "setups"; const SETUPS = "setups";
useEffect(() => { useEffect(() => {
dispatch(actions.equipmentWarehouse.getVender()).then((res) => { dispatch(actions.equipmentWarehouse.getVender()).then((res) => {
setvenderList(res.payload.data); setvenderList(res.payload.data);
attribute(res.payload.data); attribute(res.payload.data);
}); });
// //
localStorage.getItem(SETUPS) == null localStorage.getItem(SETUPS) == null
? localStorage.setItem( ? localStorage.setItem(
SETUPS, SETUPS,
JSON.stringify(["manufactor", "passageway", "port", "state"]) JSON.stringify(["manufactor", "passageway", "port", "state"])
) )
: ""; : "";
// ; // ;
}, []); }, []);
useEffect(() => { useEffect(() => {
equipmentGetNvr(); equipmentGetNvr();
}, [query, search]); }, [query, search]);
function equipmentGetNvr() {
dispatch(equipmentWarehouse.getNvr({ ...query, ...search }));
}
const columns = [
{
title: "序号",
render: (text, record, index) => {
return index + 1;
},
},
{
title: "设备名称",
dataIndex: "name",
render: (text, r, index) => {
return (
<div>
<span
style={{
backgroundColor: r.avatarBg,
width: "10px",
height: "10px",
borderRadius: "50%",
display: "inline-block",
marginRight: "10px",
}}
/>
{r.name}
</div>
);
},
},
{
title: "SIP地址",
dataIndex: "owner",
},
{
title: "操作",
width: "20%",
dataIndex: "",
render: (_, row) => {
return (
<div style={{ display: "flex" }}>
<Button theme="borderless">
<NvrModal
nvrData={row}
modalName="revise"
venderList={venderList}
close={() => {
equipmentGetNvr();
}}
/>
</Button>
<Button
theme="borderless"
onClick={() => {
setSideSheet(true);
setRowId(row.id);
}}
>
查看
</Button>
<Button
theme="borderless"
onClick={() => {
dispatch(equipmentWarehouse.delNvr(row.id)).then(() => {
equipmentGetNvr();
});
}}
>
删除
</Button>
</div>
);
},
},
];
//
function attribute(data) {
const arr = localStorage.getItem(SETUPS)
? JSON.parse(localStorage.getItem(SETUPS))
: [];
function equipmentGetNvr () { const column = [
dispatch(equipmentWarehouse.getNvr({ ...query, ...search }));
}
const columns = [
{ {
title: "序号", title: "设备厂家",
render: (text, record, index) => { dataIndex: "venderId",
return index + 1; key: "manufactor",
}, render: (_, r, index) => {
let manufactorName = data.find((item) => item.id == r.venderId);
return manufactorName ? manufactorName.name : "";
},
}, },
{ {
title: "设备名称", title: "添加账号",
dataIndex: "name", dataIndex: "createUserId",
render: (text, r, index) => { key: "accountNumber",
return (
<div>
<span
style={{
backgroundColor: r.avatarBg,
width: "10px",
height: "10px",
borderRadius: "50%",
display: "inline-block",
marginRight: "10px",
}}
/>
{r.name}
</div>
);
},
}, },
{ {
title: "SIP地址", title: "通道数",
dataIndex: "owner", dataIndex: "channelCount",
key: "passageway",
}, },
{ {
title: "操作", title: "端口",
width: "20%", dataIndex: "port",
dataIndex: "", key: "port",
render: (_, row) => {
return (
<div style={{ display: "flex" }}>
<Button theme="borderless">
<NvrModal
nvrData={row}
modalName="revise"
venderList={venderList}
close={() => {
equipmentGetNvr();
}}
/>
</Button>
<Button
theme="borderless"
onClick={() => {
setSideSheet(true);
setRowId(row.id);
}}
>
查看
</Button>
<Button
theme="borderless"
onClick={() => {
dispatch(equipmentWarehouse.delNvr(row.id));
equipmentGetNvr();
}}
>
删除
</Button>
</div>
);
},
}, },
]; {
title: "设备状态",
// dataIndex: "size",
function attribute (data) { key: "state",
const arr = localStorage.getItem(SETUPS) },
? JSON.parse(localStorage.getItem(SETUPS)) {
: []; title: "创建时间",
dataIndex: "createTime",
const column = [ key: "time",
{ render: (text, r, index) => {
title: "设备厂家", return moment(r.createTime).format("YYYY-MM-DD HH:MM:SS");
dataIndex: "venderId", },
key: "manufactor", },
render: (_, r, index) => { {
let manufactorName = data.find((item) => item.id == r.venderId); title: "项目名称",
return manufactorName ? manufactorName.name : ""; dataIndex: "",
}, key: "name",
}, },
{ {
title: "添加账号", title: "pcode",
dataIndex: "createUserId", dataIndex: "",
key: "accountNumber", key: "pcode",
}, },
{ {
title: "通道数", title: "结构物",
dataIndex: "channelCount", dataIndex: "",
key: "passageway", key: "structure",
}, },
{ ];
title: "端口", for (let i = 0; i < arr.length; i++) {
dataIndex: "port", let colum = column.filter((item) => {
key: "port", return item.key === arr[i];
}, });
{ columns.splice(i + 2, 0, colum[0]);
title: "设备状态", }
dataIndex: "size", setSetupp(columns);
key: "state", }
},
{
title: "创建时间",
dataIndex: "createTime",
key: "time",
render: (text, r, index) => {
return moment(r.createTime).format("YYYY-MM-DD HH:MM:SS");
},
},
{
title: "项目名称",
dataIndex: "",
key: "name",
},
{
title: "pcode",
dataIndex: "",
key: "pcode",
},
{
title: "结构物",
dataIndex: "",
key: "structure",
},
];
for (let i = 0; i < arr.length; i++) {
let colum = column.filter((item) => {
return item.key === arr[i];
});
columns.splice(i + 2, 0, colum[0]);
}
setSetupp(columns);
}
// //
const screen = { const screen = {
width: 193, width: 193,
marginRight: 20, marginRight: 20,
marginBottom: 16, marginBottom: 16,
color: "rgba(0, 0, 0, 0.65)", color: "rgba(0, 0, 0, 0.65)",
}; };
return ( return (
<> <>
<div style={{ position: "" }}> <div style={{ position: "" }}>
<video <video
id="nvrBanner" id="nvrBanner"
autoPlay autoPlay
loop loop
muted muted
style={{ width: "100%", objectFit: "cover", height: 171 }} style={{ width: "100%", objectFit: "cover", height: 171 }}
src="/assets/video/nvr_banner.mp4" src="/assets/video/nvr_banner.mp4"
type="video/mp4" type="video/mp4"
/> />
<div style={{ position: "absolute", top: 12 }}> <div style={{ position: "absolute", top: 12 }}>
<div <div
style={{ style={{
fontSize: 22, fontSize: 22,
paddingTop: 15, paddingTop: 15,
marginLeft: 21, marginLeft: 21,
}} }}
> >
NVR管理 NVR管理
</div> </div>
<div <div
style={{ style={{
fontSize: 14, fontSize: 14,
paddingTop: 18, paddingTop: 18,
marginLeft: 20, marginLeft: 20,
}} }}
> >
对NVR网络硬盘录像机设备节点的管理 对NVR网络硬盘录像机设备节点的管理
</div> </div>
<div <div
style={{
fontSize: 14,
marginTop: 28,
marginLeft: 21,
width: 89,
height: 32,
lineHeight: "32px",
textAlign: "center",
backgroundColor: "#D9EAFF",
color: "#1859C1",
cursor: "pointer",
}}
>
<NvrModal
modalName="add"
venderList={venderList}
close={() => {
equipmentGetNvr();
}}
/>
</div>
</div>
</div>
<div
style={{ style={{
width: "100%", fontSize: 14,
background: "#FFFFFF", marginTop: 28,
borderRadius: 3, marginLeft: 21,
padding: "8px 20px", width: 89,
marginTop: 20, height: 32,
lineHeight: "32px",
textAlign: "center",
backgroundColor: "#D9EAFF",
color: "#1859C1",
cursor: "pointer",
}} }}
> >
<div <NvrModal
style={{ modalName="add"
height: 22, venderList={venderList}
fontSize: 16, close={() => {
fontFamily: "PingFangSC-Medium, PingFang SC", equipmentGetNvr();
fontWeight: "bold", }}
color: " rgba(0, 0, 0, 0.85)", />
lineHeight: "22px", </div>
marginBottom: 16, </div>
}} </div>
<div
style={{
width: "100%",
background: "#FFFFFF",
borderRadius: 3,
padding: "8px 20px",
marginTop: 20,
}}
>
<div
style={{
height: 22,
fontSize: 16,
fontFamily: "PingFangSC-Medium, PingFang SC",
fontWeight: "bold",
color: " rgba(0, 0, 0, 0.85)",
lineHeight: "22px",
marginBottom: 16,
}}
>
筛选条件
</div>
<div style={{ display: "flex" }}>
<Form
onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
>
<Form.Input
label="设备搜索:"
field="keyword"
placeholder="请输入设备名称"
labelPosition="left"
style={screen}
/>
<Form.Select
label="厂家筛选:"
labelPosition="left"
style={screen}
field="venderId"
placeholder="全部"
showClear
> >
筛选条件 {venderList.map((item) => {
</div> return (
<div style={{ display: "flex" }}> <Form.Select.Option key={item.id} value={item.id}>
<Form {item.name}
onSubmit={(values) => console.log(values)} </Form.Select.Option>
// onValueChange={values=>console.log(values)} );
getFormApi={(formApi) => (api.current = formApi)} })}
layout="horizontal" </Form.Select>
style={{ position: "relative", width: "100%", flex: 1 }} <Form.Select
> label="状态查询:"
<Form.Input labelPosition="left"
label="设备搜索:" field="type2"
field="keyword" style={screen}
placeholder="请输入设备名称" placeholder="全部"
labelPosition="left" showClear
style={screen} >
/> <Form.Select.Option value="yes">在线</Form.Select.Option>
<Form.Select <Form.Select.Option value="no">离线</Form.Select.Option>
label="厂家筛选:" </Form.Select>
labelPosition="left" {/* <Form.Select
style={screen}
field="venderId"
placeholder="全部"
showClear
>
{venderList.map((item) => {
return (
<Form.Select.Option key={item.id} value={item.id}>
{item.name}
</Form.Select.Option>
);
})}
</Form.Select>
<Form.Select
label="状态查询:"
labelPosition="left"
field="type2"
style={screen}
placeholder="全部"
showClear
>
<Form.Select.Option value="yes">在线</Form.Select.Option>
<Form.Select.Option value="no">离线</Form.Select.Option>
</Form.Select>
{/* <Form.Select
label="关联项目:" label="关联项目:"
labelPosition="left" labelPosition="left"
field="type3" field="type3"
@ -333,179 +343,197 @@ const NvrHeader = (props) => {
飞尚科技2 飞尚科技2
</Form.Select.Option> </Form.Select.Option>
</Form.Select> */} </Form.Select> */}
</Form> </Form>
<div <div
style={{ style={{
width: 150, width: 150,
display: "flex", display: "flex",
justifyContent: "flex-end", justifyContent: "flex-end",
alignItems: "flex-end", alignItems: "flex-end",
}} }}
> >
<Button <Button
theme="solid" theme="solid"
type="primary" type="primary"
style={{ style={{
width: 65, width: 65,
height: 30, height: 30,
borderRadius: 3, borderRadius: 3,
marginBottom: 20, marginBottom: 20,
marginRight: 20, marginRight: 20,
}} }}
onClick={() => { onClick={() => {
api.current.validate().then((v) => { api.current.validate().then((v) => {
setearch(v); setearch(v);
}); });
equipmentGetNvr(); equipmentGetNvr();
}} }}
>
搜素
</Button>
<Button
theme="light"
type="primary"
style={{
width: 65,
height: 30,
backGround: "#FFFFFF",
borderRadius: 3,
border: "1px solid #D9D9D9",
marginBottom: 20,
}}
>
重置
</Button>
</div>
</div>
</div>
<div style={{ background: "#FFFFFF", marginTop: 5 }}>
<div
style={{
width: "100%",
display: "flex",
justifyContent: "space-between",
padding: "13px 20px",
}}
> >
<div 搜素
style={{ </Button>
width: 64, <Button
height: 22, theme="light"
fontSize: 16, type="primary"
fontfAmily: "PingFangSC-Medium, PingFang SC", style={{
fontWeight: "bold", width: 65,
color: "rgba(0, 0, 0, 0.85)", height: 30,
lineHeight: "22px", backGround: "#FFFFFF",
}} borderRadius: 3,
> border: "1px solid #D9D9D9",
设备列表 marginBottom: 20,
</div> }}
<div> onClick={() => {
<Button api.current.reset();
style={{ setearch({});
width: 32, equipmentGetNvr();
height: 32, }}
background: "#D9D9D9", >
borderadius: 3, 重置
marginRight: 20, </Button>
}} </div>
type="primary" </div>
key="primary" </div>
onClick={() => { <div style={{ background: "#FFFFFF", marginTop: 5 }}>
setSetup(true); <div
}} style={{
> width: "100%",
<img display: "flex",
src="/assets/images/background/setup.png" justifyContent: "space-between",
alt="设置" padding: "13px 20px",
style={{ width: 18, height: 18 }} }}
/> >
</Button> <div
<Button style={{
style={{ width: 64,
width: 65, height: 22,
height: 32, fontSize: 16,
background: "#FFFFFF", fontfAmily: "PingFangSC-Medium, PingFang SC",
borderRadius: 3, fontWeight: "bold",
border: "1px solid #1859C1", color: "rgba(0, 0, 0, 0.85)",
}} lineHeight: "22px",
> }}
导出 >
</Button> 设备列表
</div> </div>
</div> <div>
<Button
style={{
width: 32,
height: 32,
background: "#D9D9D9",
borderadius: 3,
marginRight: 20,
}}
type="primary"
key="primary"
onClick={() => {
setSetup(true);
}}
>
<img
src="/assets/images/background/setup.png"
alt="设置"
style={{ width: 18, height: 18 }}
/>
</Button>
<Button
style={{
width: 65,
height: 32,
background: "#FFFFFF",
borderRadius: 3,
border: "1px solid #1859C1",
}}
>
导出
</Button>
</div>
</div>
<Skeleton
loading={loading}
placeholder={
<Table <Table
columns={setupp.filter(s => s)} columns={setupp.filter((s) => s)}
dataSource={equipmentWarehouseNvr.data} dataSource={[{ name: "" },{ key: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" }]}
bordered={false} pagination={false}
empty="暂无数据" style={{ background: "rgba(217, 216, 216, 1)" }}
style={{ empty=""
padding: "0px 20px",
}}
pagination={false}
/> />
<div }
style={{ >
display: "flex", <Table
justifyContent: "flex-end", columns={setupp.filter((s) => s)}
padding: "20px 20px", dataSource={equipmentWarehouseNvr.data}
}} bordered={false}
> empty="暂无数据"
<span style={{ lineHeight: "30px" }}> style={{
{equipmentWarehouseNvr.total}个设备 padding: "0px 20px",
</span> }}
<Pagination pagination={false}
total={equipmentWarehouseNvr.total} />
showSizeChanger </Skeleton>
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
}}
/>
</div>
{setup ? ( <div
<Setup style={{
visible={true} display: "flex",
SETUPS={SETUPS} justifyContent: "flex-end",
close={() => { padding: "20px 20px",
setSetup(false); }}
attribute(venderList); >
}} <span style={{ lineHeight: "30px" }}>
/> {equipmentWarehouseNvr.total}个设备
) : ( </span>
"" <Pagination
)} total={equipmentWarehouseNvr.total}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
}}
/>
</div>
{sideSheet ? ( {setup ? (
<SideSheets <Setup
visible={true} visible={true}
rowId={rowId} SETUPS={SETUPS}
accessType={accessType} close={() => {
venderList={venderList} setSetup(false);
close={() => { attribute(venderList);
setSideSheet(false); }}
}} />
/> ) : (
) : ( ""
[] )}
)}
</div>
</>
);
};
{sideSheet ? (
<SideSheets
visible={true}
rowId={rowId}
accessType={accessType}
venderList={venderList}
close={() => {
setSideSheet(false);
}}
/>
) : (
[]
)}
</div>
</>
);
};
function mapStateToProps (state) { function mapStateToProps(state) {
const { auth, global, members, equipmentWarehouseNvr } = state; const { auth, global, members, equipmentWarehouseNvr } = state;
return { return {
loading: members.isRequesting, loading: equipmentWarehouseNvr.isRequesting,
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
members: members.data, members: members.data,
equipmentWarehouseNvr: equipmentWarehouseNvr.data || {}, equipmentWarehouseNvr: equipmentWarehouseNvr.data || {},
}; };
} }
export default connect(mapStateToProps)(NvrHeader); export default connect(mapStateToProps)(NvrHeader);

Loading…
Cancel
Save