import React, { 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" const NvrHeader = (props) => { const { dispatch, actions, user, loading } = props; const screen = { width: 193, marginRight: 20, marginBottom: 16, color: "rgba(0, 0, 0, 0.65)", }; const columns = [ { title: "序号", align: "center", render: (text, record, index) => { return index + 1; }, }, { title: "设备名称", // dataIndex: "name",/// align: "center", width: 200, render: (text, record, index) => { return (
{record.name}
); }, }, { title: "设备厂家", align: "center", dataIndex: "size", }, { title: "SIP地址", align: "center", dataIndex: "owner", }, { title: "端口号", align: "center", dataIndex: "updateTime", }, { title: "通道数", align: "center", dataIndex: "nameIconSrc", }, { title: "操作", align: "center", 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
设备列表 } columns={columns} dataSource={data} pagination={false} bordered={false} /> ); }; 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);