2026-05-08 15:53:27 +08:00
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
|
import {
|
|
|
|
|
|
Form,
|
|
|
|
|
|
Input,
|
|
|
|
|
|
Select,
|
|
|
|
|
|
Switch,
|
|
|
|
|
|
Button,
|
|
|
|
|
|
Row,
|
|
|
|
|
|
Col,
|
|
|
|
|
|
Card as AntdCard,
|
|
|
|
|
|
Tag,
|
|
|
|
|
|
Table,
|
|
|
|
|
|
message,
|
|
|
|
|
|
Typography,
|
|
|
|
|
|
Space,
|
|
|
|
|
|
} from 'antd';
|
|
|
|
|
|
import {
|
|
|
|
|
|
CloudOutlined,
|
|
|
|
|
|
TeamOutlined,
|
|
|
|
|
|
BellOutlined,
|
|
|
|
|
|
DatabaseOutlined,
|
|
|
|
|
|
CalendarOutlined,
|
|
|
|
|
|
CheckCircleOutlined,
|
|
|
|
|
|
DownloadOutlined,
|
|
|
|
|
|
FileTextOutlined,
|
|
|
|
|
|
DeleteOutlined,
|
|
|
|
|
|
RestOutlined,
|
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
|
|
|
|
|
|
|
const { Text } = Typography;
|
|
|
|
|
|
|
|
|
|
|
|
const BasicSettings = () => {
|
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
const handleSave = () => {
|
|
|
|
|
|
message.success('设置已保存');
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 设备接入状态数据
|
|
|
|
|
|
const deviceStatusData = [
|
|
|
|
|
|
{ name: '逆变器', count: '5/5', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
{ name: '汇流箱', count: '20/20', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
{ name: '摄像头', count: '12/12', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
{ name: '无人机', count: '2/2', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
{ name: 'API接口', count: '正常', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
{ name: 'Modbus', count: '正常', status: '正常', color: '#52c41a' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// 服务配置数据
|
|
|
|
|
|
const serviceConfigData = [
|
|
|
|
|
|
{ name: 'MQTT配置', value: 'tcp://localhost:1883', status: '离线', statusColor: '#8c8c8c' },
|
|
|
|
|
|
{ name: '视频服务配置', value: '待接入 RTSP / WebRTC 服务', status: '待处理', statusColor: '#fa8c16' },
|
|
|
|
|
|
{ name: 'AI服务配置', value: 'http://ai-service.local', status: '待处理', statusColor: '#fa8c16' },
|
|
|
|
|
|
{ name: 'API密钥管理', value: '正常', status: '正常', statusColor: '#52c41a' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// 视频服务配置数据
|
|
|
|
|
|
const videoServiceData = [
|
|
|
|
|
|
{ name: '视频服务数', value: '1' },
|
|
|
|
|
|
{ name: '启用服务数', value: '1' },
|
|
|
|
|
|
{ name: '摄像头总数', value: '3' },
|
|
|
|
|
|
{ name: '离线摄像头', value: '3' },
|
|
|
|
|
|
{ name: '在线流数量', value: '0' },
|
|
|
|
|
|
{ name: '服务状态', value: 'ONLINE', statusColor: '#52c41a' },
|
|
|
|
|
|
{ name: 'API地址', value: 'http://127.0.0.1:9997' },
|
|
|
|
|
|
{ name: 'HLS地址', value: 'http://127.0.0.1:8888' },
|
|
|
|
|
|
{ name: 'WebRTC地址', value: 'http://127.0.0.1:8889' },
|
|
|
|
|
|
{ name: '检测结果', value: 'HTTP 401 - http://127.0.0.1...' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// MQTT接入状态数据
|
|
|
|
|
|
const mqttStatusData = [
|
|
|
|
|
|
{ name: '启用状态', value: '已启用', statusColor: '#52c41a' },
|
|
|
|
|
|
{ name: '连接状态', value: '已连接', statusColor: '#52c41a' },
|
|
|
|
|
|
{ name: 'Broker', value: 'tcp://localhost:1883' },
|
|
|
|
|
|
{ name: '客户端ID', value: 'solar-platform-backend' },
|
|
|
|
|
|
{ name: '遥测主题', value: 'pv/+/device/+/telemetry' },
|
|
|
|
|
|
{ name: '状态主题', value: 'pv/+/device/+/status' },
|
|
|
|
|
|
{ name: '最近连接', value: '2026-05-07 18:30:40' },
|
|
|
|
|
|
{ name: '最近错误', value: '-' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// MQTT消息日志数据
|
|
|
|
|
|
const mqttLogData = [
|
|
|
|
|
|
{ topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' },
|
|
|
|
|
|
{ topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' },
|
|
|
|
|
|
{ topic: 'pv/1/device/CAM-02/status', device: 'CAM-02', type: 'STATUS', parse: 'SUCCESS' },
|
|
|
|
|
|
{ topic: 'pv/1/device/INV-A02/telemetry', device: 'INV-A02', type: 'TELEMETRY', parse: 'SUCCESS' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// WebSocket状态数据
|
|
|
|
|
|
const wsStatusData = [
|
|
|
|
|
|
{ name: '服务状态', value: '已启用', statusColor: '#52c41a' },
|
|
|
|
|
|
{ name: '前端连接', value: '已连接', statusColor: '#52c41a' },
|
|
|
|
|
|
{ name: 'Endpoint', value: '/ws/pv' },
|
|
|
|
|
|
{ name: '在线连接数', value: '2' },
|
|
|
|
|
|
{ name: '最近推送', value: '-' },
|
|
|
|
|
|
{ name: '推送时间', value: '-' },
|
|
|
|
|
|
{ name: '前端端点', value: 'ws://47.100.102.7:10469/de...' },
|
|
|
|
|
|
{ name: '最近错误', value: '-' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
// 顶部卡片数据
|
|
|
|
|
|
const topCards = [
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '当前版本',
|
|
|
|
|
|
value: 'v2.8.1',
|
|
|
|
|
|
tag: '最新版',
|
|
|
|
|
|
tagColor: 'blue',
|
|
|
|
|
|
icon: <CloudOutlined />,
|
|
|
|
|
|
color: '#1677ff',
|
|
|
|
|
|
bg: '#e6f4ff'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '在线用户',
|
|
|
|
|
|
value: '12',
|
|
|
|
|
|
trend: '↑ 2',
|
|
|
|
|
|
trendColor: '#52c41a',
|
|
|
|
|
|
icon: <TeamOutlined />,
|
|
|
|
|
|
color: '#52c41a',
|
|
|
|
|
|
bg: '#f6ffed'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '告警通道',
|
|
|
|
|
|
value: '3 / 4',
|
|
|
|
|
|
trend: '正常',
|
|
|
|
|
|
trendColor: '#52c41a',
|
|
|
|
|
|
icon: <BellOutlined />,
|
|
|
|
|
|
color: '#ff4d4f',
|
|
|
|
|
|
bg: '#fff2f0'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '数据备份状态',
|
|
|
|
|
|
value: '正常',
|
|
|
|
|
|
trend: '●',
|
|
|
|
|
|
trendColor: '#52c41a',
|
|
|
|
|
|
icon: <DatabaseOutlined />,
|
|
|
|
|
|
color: '#13c2c2',
|
|
|
|
|
|
bg: '#e6fffb'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '最近更新',
|
|
|
|
|
|
value: '2025-05-20',
|
|
|
|
|
|
icon: <CalendarOutlined />,
|
|
|
|
|
|
color: '#722ed1',
|
|
|
|
|
|
bg: '#f9f0ff'
|
|
|
|
|
|
},
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-05-08 15:53:27 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<div style={{ padding: 24, background: '#f0f2f5', minHeight: '100vh' }}>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
|
|
|
|
|
|
{/* 顶部卡片 —— 统一风格 + 自动换行 + 圆角8px */}
|
|
|
|
|
|
<Row gutter={[16, 16]} style={{ marginBottom: 24, flexWrap: 'wrap' }}>
|
|
|
|
|
|
{topCards.map((item, idx) => (
|
|
|
|
|
|
<Col key={idx} style={{ minWidth: '160px', flex: '1 0 auto' }}>
|
|
|
|
|
|
<AntdCard
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style={{ borderRadius: 8, width: '100%' }}
|
|
|
|
|
|
bodyStyle={{ padding: '12px' }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<div style={{ background: item.bg, borderRadius: 8, padding: 8 }}>
|
|
|
|
|
|
{item.icon}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666' }}>{item.title}</div>
|
|
|
|
|
|
<div style={{ fontWeight: 600, display: 'flex', alignItems: 'center', gap: 6 }}>
|
|
|
|
|
|
{item.value}
|
|
|
|
|
|
{item.tag && <Tag color={item.tagColor} style={{ margin: 0 }}>{item.tag}</Tag>}
|
|
|
|
|
|
{item.trend && (
|
|
|
|
|
|
<span style={{ color: item.trendColor, fontSize: 12 }}>
|
|
|
|
|
|
{item.trend}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
</AntdCard>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
2026-05-08 15:53:27 +08:00
|
|
|
|
</Row>
|
|
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Row gutter={16}>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
{/* 左侧主内容 */}
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Col span={16}>
|
2026-05-09 09:19:05 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* 平台参数 */}
|
|
|
|
|
|
<AntdCard title="平台参数" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<Form form={form} layout="vertical">
|
2026-05-08 15:53:27 +08:00
|
|
|
|
<Row gutter={16}>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Col span={12}>
|
|
|
|
|
|
<Form.Item label="系统名称" name="systemName">
|
|
|
|
|
|
<Input defaultValue="光伏场站智能监控与运维系统" />
|
|
|
|
|
|
</Form.Item>
|
2026-05-09 09:19:05 +08:00
|
|
|
|
</Col>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Col span={12}>
|
|
|
|
|
|
<Form.Item label="默认电站" name="defaultSite">
|
|
|
|
|
|
<Select defaultValue="1MW 光伏电站">
|
|
|
|
|
|
<Select.Option value="1MW">1MW 光伏电站</Select.Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</Form.Item>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
<Col span={12}>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Form.Item label="数据刷新频率" name="refreshRate">
|
|
|
|
|
|
<Select defaultValue="5分钟">
|
|
|
|
|
|
<Select.Option value="5">5分钟</Select.Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</Form.Item>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={12}>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Form.Item label="地图服务" name="mapService">
|
|
|
|
|
|
<Select defaultValue="高德地图">
|
|
|
|
|
|
<Select.Option value="amap">高德地图</Select.Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</Form.Item>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<Form.Item label="AI建议自动生成" valuePropName="checked">
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* 通知与告警策略 */}
|
|
|
|
|
|
<AntdCard title="通知与告警策略" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<Row gutter={16} style={{ marginBottom: 16 }}>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>短信</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>邮件</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>企业微信</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>系统通知</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>严重告警立即通知</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
|
|
|
|
|
<Text strong>通信中断通知</Text>
|
|
|
|
|
|
<Switch defaultChecked />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</AntdCard>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 用户与权限预览 */}
|
|
|
|
|
|
<AntdCard title="用户与权限预览" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<Table
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
pagination={false}
|
|
|
|
|
|
columns={[
|
|
|
|
|
|
{ title: '用户名', dataIndex: 'name' },
|
|
|
|
|
|
{ title: '角色', dataIndex: 'role' },
|
|
|
|
|
|
{ title: '手机号', dataIndex: 'phone' },
|
|
|
|
|
|
{ title: '状态', dataIndex: 'status', render: (text) => <span style={{ color: '#52c41a' }}>{text}</span> },
|
|
|
|
|
|
]}
|
|
|
|
|
|
dataSource={[
|
|
|
|
|
|
{ name: '张运维', role: '超级管理员', phone: '138****0001', status: '在线' },
|
|
|
|
|
|
{ name: '李工程师', role: '运维工程师', phone: '139****0002', status: '在线' },
|
|
|
|
|
|
{ name: '王班长', role: '巡检主管', phone: '137****0003', status: '在线' },
|
|
|
|
|
|
{ name: '赵分析师', role: '数据分析师', phone: '136****0004', status: '在线' },
|
|
|
|
|
|
]}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</AntdCard>
|
2026-05-09 09:19:05 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* MQTT接入状态 */}
|
|
|
|
|
|
<AntdCard title="MQTT接入状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/mqtt/status,后端未登录时显示预览兜底数据</div>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
{mqttStatusData.map((item, index) => (
|
|
|
|
|
|
<Col span={12} key={index}>
|
|
|
|
|
|
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
|
|
|
|
|
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
</div>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
</Col>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
))}
|
2026-05-14 09:37:15 +08:00
|
|
|
|
</Row>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* MQTT消息日志 */}
|
|
|
|
|
|
<AntdCard title="MQTT消息日志" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>阶段3A用于验证遥测原始消息落库</div>
|
|
|
|
|
|
<Table
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
pagination={false}
|
|
|
|
|
|
columns={[
|
|
|
|
|
|
{ title: 'Topic', dataIndex: 'topic' },
|
|
|
|
|
|
{ title: '设备', dataIndex: 'device' },
|
|
|
|
|
|
{ title: '类型', dataIndex: 'type' },
|
|
|
|
|
|
{ title: '解析', dataIndex: 'parse' },
|
|
|
|
|
|
]}
|
|
|
|
|
|
dataSource={mqttLogData}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<AntdCard title="系统维护" style={{ marginBottom: 0, borderRadius: 8 }}>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
<Col span={12} style={{ marginBottom: 16 }}>
|
|
|
|
|
|
<Button style={{ width: '100%' }} icon={<DeleteOutlined />}>清理缓存</Button>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={12} style={{ marginBottom: 16 }}>
|
|
|
|
|
|
<Button style={{ width: '100%' }} icon={<RestOutlined />}>重启服务</Button>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={12}>
|
|
|
|
|
|
<Button style={{ width: '100%' }} icon={<DownloadOutlined />}>备份下载</Button>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={12}>
|
|
|
|
|
|
<Button style={{ width: '100%' }} icon={<FileTextOutlined />}>日志导出</Button>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
</Col>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* 右侧边栏 */}
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 设备接入状态 */}
|
|
|
|
|
|
<AntdCard title="设备接入状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
{deviceStatusData.map((item, index) => (
|
|
|
|
|
|
<Col span={12} key={index}>
|
|
|
|
|
|
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
|
|
|
|
|
<div style={{ fontSize: 16, fontWeight: 600, marginBottom: 4 }}>{item.count}</div>
|
|
|
|
|
|
<div style={{ color: item.color, fontSize: 13 }}>{item.status}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* 服务配置展示 */}
|
|
|
|
|
|
<AntdCard title="服务配置展示" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
{serviceConfigData.map((item, index) => (
|
|
|
|
|
|
<div key={index} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 0', borderBottom: index !== serviceConfigData.length - 1 ? '1px solid #e8e8e8' : 'none' }}>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div style={{ fontWeight: 500, marginBottom: 4 }}>{item.name}</div>
|
|
|
|
|
|
<div style={{ fontSize: 13 }}>{item.value}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<Tag color={item.statusColor === '#52c41a' ? 'success' : item.statusColor === '#fa8c16' ? 'warning' : 'default'}>{item.status}</Tag>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</AntdCard>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 视频服务配置状态 */}
|
|
|
|
|
|
<AntdCard title="视频服务配置状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/video/summary 与 /pv/video/media-server/list</div>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
{videoServiceData.map((item, index) => (
|
|
|
|
|
|
<Col span={12} key={index}>
|
|
|
|
|
|
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
|
|
|
|
|
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
<Button type="primary" style={{ width: '100%' }} onClick={() => message.info('检测视频服务')}>检测视频服务</Button>
|
|
|
|
|
|
</AntdCard>
|
|
|
|
|
|
|
|
|
|
|
|
{/* WebSocket实时推送 */}
|
|
|
|
|
|
<AntdCard title="WebSocket实时推送" style={{ marginBottom: 16, borderRadius: 8 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/ws/status,并显示前端本地连接状态</div>
|
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
{wsStatusData.map((item, index) => (
|
|
|
|
|
|
<Col span={12} key={index}>
|
|
|
|
|
|
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
|
|
|
|
|
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
|
|
|
|
|
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</AntdCard>
|
2026-05-08 15:53:27 +08:00
|
|
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default BasicSettings;
|