You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.8 KiB
TypeScript
60 lines
1.8 KiB
TypeScript
/*
|
|
* @Author: donghao donghao@supervision.ltd
|
|
* @Date: 2024-04-23 17:00:00
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
* @LastEditTime: 2024-06-25 14:08:27
|
|
* @FilePath: \general-ai-platform-web\src\pages\Business\DeviceGroup\components\baseInfo.tsx
|
|
* @Description: 基本信息展示
|
|
*
|
|
*/
|
|
|
|
import { ProDescriptions } from '@ant-design/pro-components';
|
|
import { FormattedMessage } from '@umijs/max';
|
|
|
|
type BaseInfoProps = {
|
|
info: Record<string, any>;
|
|
};
|
|
|
|
const BaseInfo: React.FC<BaseInfoProps> = ({ info }) => {
|
|
// 设备基本信息
|
|
const DeviceDetailColumns = [
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.name" defaultMessage="节点名称" />,
|
|
dataIndex: 'name',
|
|
},
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.fatherName" defaultMessage="上级节点" />,
|
|
dataIndex: 'parent_name',
|
|
},
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.address" defaultMessage="地址" />,
|
|
dataIndex: 'addr',
|
|
},
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.lonlat" defaultMessage="经纬度" />,
|
|
dataIndex: 'lola',
|
|
},
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.managerName" defaultMessage="负责人" />,
|
|
dataIndex: 'contact',
|
|
},
|
|
{
|
|
title: (
|
|
<FormattedMessage id="device_group.tree_node.managerPhone" defaultMessage="联系方式" />
|
|
),
|
|
dataIndex: 'phone',
|
|
},
|
|
{
|
|
title: <FormattedMessage id="device_group.tree_node.remark" defaultMessage="简介" />,
|
|
dataIndex: 'comment',
|
|
},
|
|
];
|
|
return (
|
|
<div className="gn_active_descriptions gn_descriptions bg_active_4">
|
|
<ProDescriptions column={3} columns={DeviceDetailColumns} dataSource={info}></ProDescriptions>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default BaseInfo;
|