|
|
@@ -5,41 +5,46 @@
|
|
|
import React from 'react';
|
|
|
import { Typography, Descriptions, Card } from 'antd';
|
|
|
import { SPACING } from '../../constants';
|
|
|
+import { useAppSelector } from '../../../../../states/store';
|
|
|
|
|
|
const { Title } = Typography;
|
|
|
|
|
|
// 导入 package.json 获取版本信息
|
|
|
// @ts-ignore - package.json 导入在运行时有效
|
|
|
import packageJson from '../../../../../../package.json';
|
|
|
+import useApp from 'antd/es/app/useApp';
|
|
|
+import { state } from '@cornerstonejs/tools';
|
|
|
|
|
|
/**
|
|
|
* 关于系统组件
|
|
|
- *
|
|
|
+ *
|
|
|
* 布局结构:
|
|
|
* - Layout Type: Vertical Stack Layout
|
|
|
* - 使用 Descriptions 组件展示系统信息
|
|
|
*/
|
|
|
const AboutSystem: React.FC = () => {
|
|
|
+ const { versionInfo } = useAppSelector((state) => state.versionUpdate);
|
|
|
return (
|
|
|
<div style={{ padding: SPACING.LG }}>
|
|
|
<Title level={3}>关于系统</Title>
|
|
|
|
|
|
<Card style={{ marginTop: SPACING.LG }}>
|
|
|
- <Descriptions
|
|
|
- column={1}
|
|
|
- labelStyle={{ width: 150, fontWeight: 500 }}
|
|
|
- >
|
|
|
+ <Descriptions column={1} labelStyle={{ width: 150, fontWeight: 500 }}>
|
|
|
<Descriptions.Item label="系统名称">
|
|
|
{packageJson.description || packageJson.name}
|
|
|
</Descriptions.Item>
|
|
|
|
|
|
- <Descriptions.Item label="当前版本">
|
|
|
+ <Descriptions.Item label="客户端版本">
|
|
|
{packageJson.version}
|
|
|
</Descriptions.Item>
|
|
|
|
|
|
<Descriptions.Item label="项目标识">
|
|
|
{packageJson.name}
|
|
|
</Descriptions.Item>
|
|
|
+
|
|
|
+ <Descriptions.Item label="系统版本">
|
|
|
+ {versionInfo?.newest_version}
|
|
|
+ </Descriptions.Item>
|
|
|
</Descriptions>
|
|
|
</Card>
|
|
|
</div>
|