Commit e5f183e3 by zhaochengxiang

地图优化

parent a3bfb14b
......@@ -67,7 +67,7 @@ class Org extends React.Component {
const bbox = text.getBBox();
if (cfg.dbType==='Dir') {
if (cfg.dbType==='Root' || cfg.dbType==='Dir') {
if (!cfg.children) {
group.addShape('marker', {
attrs: {
......@@ -96,7 +96,7 @@ class Org extends React.Component {
rect.attr({
x: bbox.minX - 10,
y: bbox.minY - 10,
width: bbox.width + (cfg.dbType==='Dir'&&(!cfg.children||((cfg.children||[]).length>0)) ? 38 : 20),
width: bbox.width + ((cfg.dbType==='Root'||cfg.dbType==='Dir')&&(!cfg.children||((cfg.children||[]).length>0)) ? 38 : 20),
height: bbox.height + 20,
});
......
......@@ -78,7 +78,7 @@ class Relation extends React.Component {
const bbox = text.getBBox();
if (cfg.dbType==='Dir') {
if (cfg.dbType==='Root' || cfg.dbType==='Dir') {
if (!cfg.children) {
group.addShape('marker', {
attrs: {
......
import React from 'react';
import { Card } from 'antd';
import { FolderAddOutlined, FileOutlined } from '@ant-design/icons';
import './SquareItem.less';
......@@ -24,15 +25,17 @@ class SquareItem extends React.Component {
{
item && (
item.dbType==='Dir' ? <Card title={
<div className='pointer' onClick={this.onItemClick}>
{item.dirName||''}
<div className='d-flex pointer' style={{ alignItems: 'center' }} onClick={this.onItemClick}>
<FolderAddOutlined className='mr-1' />
<span>{item.dirName||''}</span>
</div>
}>
<p>{`数据资产: ${item.tableModelCount}`}</p>
<p>{`资产编目: ${item.subDirCount}`}</p>
</Card> : <Card title={
<div className='pointer' onClick={this.onItemClick}>
{item.name||''}
<div className='d-flex pointer' style={{ alignItems: 'center' }} onClick={this.onItemClick}>
<FileOutlined className='mr-1' />
<span>{item.name||''}</span>
</div>
}>
<p>{`所属系统: ${item.system||''}`}</p>
......
......@@ -68,7 +68,7 @@ class Tree extends React.Component {
const bbox = text.getBBox();
if (cfg.dbType==='Dir') {
if (cfg.dbType==='Root' || cfg.dbType==='Dir') {
if (!cfg.children) {
group.addShape('marker', {
attrs: {
......@@ -97,7 +97,7 @@ class Tree extends React.Component {
rect.attr({
x: bbox.minX - 10,
y: bbox.minY - 10,
width: bbox.width + (cfg.dbType==='Dir'&&(!cfg.children||((cfg.children||[]).length>0)) ? 38 : 20),
width: bbox.width + ((cfg.dbType==='Root'||cfg.dbType==='Dir')&&(!cfg.children||((cfg.children||[]).length>0)) ? 38 : 20),
height: bbox.height + 20,
});
......
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