import React, { useState, useEffect } from "react"; import { connect } from "react-redux"; import { Button, Form, Input, Row, Table } from "@douyinfe/semi-ui"; import "../style.less"; import NvrModal from "../components/nvrModal"; import Setup from "../components/setup"; const NvrHeader = (props) => { const { dispatch, actions, user, loading } = props; const [setup, setSetup] = useState(false); const screen = { width: 193, marginRight: 20, marginBottom: 16, color: "rgba(0, 0, 0, 0.65)", }; const columns = [ { title: "序号", render: (text, record, index) => { return index + 1; }, }, { title: "设备名称", // dataIndex: "name",/// width: 200, background: "red", render: (text, record, index) => { return (
{record.name}
); }, }, { title: "设备厂家", dataIndex: "size", }, { title: "SIP地址", dataIndex: "owner", }, { title: "端口号", dataIndex: "updateTime", }, { title: "通道数", dataIndex: "nameIconSrc", }, { title: "操作", width: "20%", dataIndex: "", render: (y) => { return ( <> ); }, }, ]; const data = [ { key: "1", name: "智能设备NVR1", nameIconSrc: "12", size: "飞尚科技1", owner: "192.168.1.1", updateTime: "5000", avatarBg: "red", }, { key: "2", name: "智能设备NVR2", nameIconSrc: "8", size: "飞尚科技2", owner: "192.168.1.3", updateTime: "5001", avatarBg: "green", }, { key: "3", name: "智能设备NVR3", nameIconSrc: "9", size: "飞尚科技3", owner: "192.168.1.2", updateTime: "5002", avatarBg: "green", }, ]; return ( <>
筛选条件
console.log(values)} // labelPosition='top' layout="horizontal" style={{ position: "relative", width: "100%", flex: 1 }} > 飞尚科技1 飞尚科技2 在线 离线 飞尚科技1 飞尚科技2
设备列表
{setup ? ( { setSetup(false); // setEditData(null) }} // reportType={reportType} // editData={editData} /> ) : ( "" )} ); }; function mapStateToProps(state) { const { auth, global, members } = state; return { loading: members.isRequesting, user: auth.user, actions: global.actions, members: members.data, }; } export default connect(mapStateToProps)(NvrHeader);