|
@@ -4,7 +4,7 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, SearchOutlined, EyeOutlined
|
|
|
import { stockDataClient } from '@/client/api';
|
|
import { stockDataClient } from '@/client/api';
|
|
|
import type { InferResponseType, InferRequestType } from 'hono/client';
|
|
import type { InferResponseType, InferRequestType } from 'hono/client';
|
|
|
import { App } from 'antd';
|
|
import { App } from 'antd';
|
|
|
-import ReactJson from 'react-json-view';
|
|
|
|
|
|
|
+// import ReactJson from 'react-json-view';
|
|
|
|
|
|
|
|
const { Title } = Typography;
|
|
const { Title } = Typography;
|
|
|
|
|
|
|
@@ -174,7 +174,7 @@ export const StockDataPage: React.FC = () => {
|
|
|
{
|
|
{
|
|
|
title: '数据摘要',
|
|
title: '数据摘要',
|
|
|
key: 'dataSummary',
|
|
key: 'dataSummary',
|
|
|
- render: (_, record: StockDataItem) => (
|
|
|
|
|
|
|
+ render: (_: any, record: StockDataItem) => (
|
|
|
<div>
|
|
<div>
|
|
|
{record.data.date && <div>日期: {record.data.date}</div>}
|
|
{record.data.date && <div>日期: {record.data.date}</div>}
|
|
|
{record.data.close && <div>收盘价: {record.data.close}</div>}
|
|
{record.data.close && <div>收盘价: {record.data.close}</div>}
|
|
@@ -191,7 +191,7 @@ export const StockDataPage: React.FC = () => {
|
|
|
{
|
|
{
|
|
|
title: '状态',
|
|
title: '状态',
|
|
|
key: 'status',
|
|
key: 'status',
|
|
|
- render: (_, record: StockDataItem) => (
|
|
|
|
|
|
|
+ render: (_: any, record: StockDataItem) => (
|
|
|
<Tag color={new Date(record.updatedAt) > new Date(record.createdAt) ? 'blue' : 'green'}>
|
|
<Tag color={new Date(record.updatedAt) > new Date(record.createdAt) ? 'blue' : 'green'}>
|
|
|
{new Date(record.updatedAt) > new Date(record.createdAt) ? '已更新' : '原始数据'}
|
|
{new Date(record.updatedAt) > new Date(record.createdAt) ? '已更新' : '原始数据'}
|
|
|
</Tag>
|
|
</Tag>
|
|
@@ -332,13 +332,9 @@ export const StockDataPage: React.FC = () => {
|
|
|
</Card>
|
|
</Card>
|
|
|
|
|
|
|
|
<Card title="股票数据">
|
|
<Card title="股票数据">
|
|
|
- <ReactJson
|
|
|
|
|
- src={currentItem.data}
|
|
|
|
|
- name={false}
|
|
|
|
|
- collapsed={false}
|
|
|
|
|
- theme="rjv-default"
|
|
|
|
|
- style={{ padding: '10px 0' }}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <pre style={{ whiteSpace: 'pre-wrap', wordWrap: 'break-word', maxHeight: '400px', overflow: 'auto', padding: '10px', backgroundColor: '#f5f5f5', borderRadius: '4px' }}>
|
|
|
|
|
+ {JSON.stringify(currentItem.data, null, 2)}
|
|
|
|
|
+ </pre>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|