Commit 1f0131b3 by zhaochengxiang

预览

parent d3182212
import React, { useEffect, useState } from "react";
import React, { useEffect, useState, useMemo } from "react";
import { Row, Col, Tooltip, Typography, Space, Button } from "antd";
import DataGrid from '../../VirtualTable';
import EditInherited from './EditInherited';
......@@ -40,6 +40,39 @@ const FC = (props) => {
export default FC;
const Basic = ({ modelerData }) => {
const partitionsDescription = useMemo(() => {
let newPartitionsDescription = ''
if (modelerData?.partition?.keys) {
(modelerData?.partition?.keys||[]).forEach((item, index) => {
if (index > 0) {
newPartitionsDescription += ',';
}
newPartitionsDescription += item.name||'';
})
}
if (modelerData?.partition?.partitionType?.cnName) {
newPartitionsDescription += '/' + modelerData?.partition?.partitionType?.cnName||'';
}
return newPartitionsDescription;
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [modelerData])
const primaryDescription = useMemo(() => {
let newPrimaryDescription = ''
if (modelerData?.easyDataModelerPrimaryKey) {
(modelerData?.easyDataModelerPrimaryKey||[]).forEach((item, index) => {
if (index > 0) {
newPrimaryDescription += ',';
}
newPrimaryDescription += item.name||'';
})
}
return newPrimaryDescription;
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [modelerData])
return (
<Row gutter={10}>
<Col className='mb-4' span={12}>
......@@ -52,49 +85,49 @@ const Basic = ({ modelerData }) => {
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
英文名称:&nbsp;<Typography.Text></Typography.Text>
英文名称:&nbsp;<Typography.Text>{modelerData?.name}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
分区键:&nbsp;<Typography.Text></Typography.Text>
分区键:&nbsp;<Typography.Text>{partitionsDescription}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
技术主键:&nbsp;<Typography.Text></Typography.Text>
技术主键:&nbsp;<Typography.Text>{primaryDescription}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
数据类型:&nbsp;<Typography.Text></Typography.Text>
数据类型:&nbsp;<Typography.Text>{modelerData?.dataType}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
绑定加载范围:&nbsp;<Typography.Text></Typography.Text>
绑定加载范围:&nbsp;<Typography.Text>{modelerData?.bindingLoadRange}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
更新时间:&nbsp;<Typography.Text></Typography.Text>
更新时间:&nbsp;<Typography.Text>{modelerData?.dataUpdatingTiming}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
<Col className='mb-4' span={12}>
<Tooltip title=''>
<Typography.Text ellipsis={true}>
数据情况:&nbsp;<Typography.Text></Typography.Text>
数据情况:&nbsp;<Typography.Text>{modelerData?.dataCircumstances}</Typography.Text>
</Typography.Text>
</Tooltip>
</Col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment