|
@@ -0,0 +1,103 @@
|
|
|
|
+import React from 'react';
|
|
|
|
+import { Card, Form, Select, Input, Row, Col, Tooltip, Button, Space } from 'antd';
|
|
|
|
+import { LinkOutlined, InboxOutlined } from '@ant-design/icons';
|
|
|
|
+
|
|
|
|
+const { Option } = Select;
|
|
|
|
+
|
|
|
|
+interface DicomNode {
|
|
|
|
+ id: string;
|
|
|
|
+ name: string;
|
|
|
|
+ host: string;
|
|
|
|
+ ip: string;
|
|
|
|
+ port: string;
|
|
|
|
+ calledAET: string;
|
|
|
|
+ callingAET: string;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+interface Props {
|
|
|
|
+ nodeList: DicomNode[];
|
|
|
|
+ selectedNodeId?: string;
|
|
|
|
+ onNodeChange?: (id: string) => void;
|
|
|
|
+ onTestConnection?: () => void;
|
|
|
|
+ onArchive?: () => void;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const DicomNodeDetailPanel: React.FC<Props> = ({
|
|
|
|
+ nodeList,
|
|
|
|
+ selectedNodeId,
|
|
|
|
+ onNodeChange,
|
|
|
|
+ onTestConnection,
|
|
|
|
+ onArchive,
|
|
|
|
+}) => {
|
|
|
|
+ const selectedNode = nodeList.find(node => node.id === selectedNodeId);
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ <Card title="DICOM节点详情" bordered={false}>
|
|
|
|
+ <Form layout="vertical">
|
|
|
|
+ <Form.Item label="DICOM节点列表">
|
|
|
|
+ <Select
|
|
|
|
+ value={selectedNodeId}
|
|
|
|
+ onChange={onNodeChange}
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择DICOM节点"
|
|
|
|
+ >
|
|
|
|
+ {nodeList.map(node => (
|
|
|
|
+ <Option key={node.id} value={node.id}>
|
|
|
|
+ {node.name}
|
|
|
|
+ </Option>
|
|
|
|
+ ))}
|
|
|
|
+ </Select>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Row gutter={16}>
|
|
|
|
+ <Col span={12}>
|
|
|
|
+ <Form.Item label="主机名称">
|
|
|
|
+ <Input value={selectedNode?.host} readOnly />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={12}>
|
|
|
|
+ <Form.Item label="主机IP">
|
|
|
|
+ <Input value={selectedNode?.ip} readOnly />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ <Row gutter={16}>
|
|
|
|
+ <Col span={8}>
|
|
|
|
+ <Form.Item label="主机端口">
|
|
|
|
+ <Input value={selectedNode?.port} readOnly />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={8}>
|
|
|
|
+ <Form.Item label="被叫实体名">
|
|
|
|
+ <Input value={selectedNode?.calledAET} readOnly />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={8}>
|
|
|
|
+ <Form.Item label="主叫实体名">
|
|
|
|
+ <Input value={selectedNode?.callingAET} readOnly />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ <Form.Item>
|
|
|
|
+ <Space>
|
|
|
|
+ <Tooltip title="测试连接状态">
|
|
|
|
+ <Button
|
|
|
|
+ icon={<LinkOutlined />}
|
|
|
|
+ onClick={onTestConnection}
|
|
|
|
+ type="default"
|
|
|
|
+ />
|
|
|
|
+ </Tooltip>
|
|
|
|
+ <Tooltip title="归档">
|
|
|
|
+ <Button
|
|
|
|
+ icon={<InboxOutlined />}
|
|
|
|
+ onClick={onArchive}
|
|
|
|
+ type="default"
|
|
|
|
+ />
|
|
|
|
+ </Tooltip>
|
|
|
|
+ </Space>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Form>
|
|
|
|
+ </Card>
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+export default DicomNodeDetailPanel;
|