Commit 90e79010 authored by 涂伟's avatar 涂伟

fix: '1.表设计字段交互显示优化'

parent caa5a418
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
"js-calendar-converter": "0.0.4", "js-calendar-converter": "0.0.4",
"lodash": "4.17.11", "lodash": "4.17.11",
"minimist": "1.2.0", "minimist": "1.2.0",
"panda-xform": "^2.4.6", "panda-xform": "^2.5.0",
"parseForm": "^2.2.4", "parseForm": "^2.2.4",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"quill": "^1.3.7", "quill": "^1.3.7",
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1678097486298" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8826" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M589.6 364.3c3 5 8.7 7.7 14.5 7l25.2-3.1c9.4-1.1 15.3-10.7 12.3-19.6l-28.4-82.8c-2.1-6-7.7-10.1-14.1-10.1H292.9c-6.2 0-11.7 3.8-13.9 9.5l-32 82.9c-3.5 9.2 2.6 19.2 12.4 20.2l28.8 2.9c5.8 0.6 11.4-2.2 14.4-7.3l1.6-2.8c20.2-34.2 31.2-42.8 35-44.9 3.9-2.2 16.6-7.2 51.7-7.2 3.3 0 6 0 8.3 0.1V574c-1.9 0.2-4.5 0.5-8.3 0.5h-33.5c-8.2 0-14.9 6.7-14.9 14.9v21.8c0 8.2 6.7 14.9 14.9 14.9h173.9c8.2 0 14.9-6.7 14.9-14.9v-21.8c0-8.2-6.7-14.9-14.9-14.9h-33.5c-3.7 0-6.5-0.3-8.3-0.8V310.4v-1c4.3-0.1 10-0.2 17.8-0.2 36.3 0 45.3 5.9 46.2 6.6 3.4 2.5 13.4 12 34.4 45.8l1.7 2.7z" p-id="8827" fill="#2a98fe"></path><path d="M880 112H144c-17.6 0-32 14.4-32 32v736c0 17.6 14.4 32 32 32h422.1c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H184V184h656v389.6c0 8.8 7.2 16 16 16h40c8.8 0 16-7.2 16-16V144c0-17.6-14.4-32-32-32z" p-id="8828" fill="#2a98fe"></path><path d="M895.6 703.4h-97.8v-97.8c0-8.8-7.2-16-16-16H722c-8.8 0-16 7.2-16 16v97.8h-97.8c-8.8 0-16 7.2-16 16v59.8c0 8.8 7.2 16 16 16H706V893c0 8.8 7.2 16 16 16h59.8c8.8 0 16-7.2 16-16v-97.8h97.8c8.8 0 16-7.2 16-16v-59.8c0-8.8-7.2-16-16-16z" p-id="8829" fill="#2a98fe"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1678097386457" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7748" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M785.4 931.1h-0.1l-547.5-0.7c-61.2-0.1-111-49.4-110.9-110l0.7-484.9c0.1-60.5 49.9-109.7 111.1-109.7h61.2c18.2 0 32.9 14.7 32.9 32.8 0 18.2-14.7 32.9-32.8 32.9h-61.1-0.1c-25 0-45.4 19.8-45.4 44.1l-0.7 484.8c0 24.3 20.3 44.2 45.3 44.2l547.4 0.7c25 0 45.3-19.8 45.3-44.1l0.7-484.9c0-11.6-4.7-22.6-13.1-31-8.6-8.5-20-13.2-32.2-13.2l-77.6-0.8c-18.1-0.2-32.7-15-32.5-33.2s15.2-33.6 33.2-32.5l77.3 0.8c29.2 0 57 11.5 77.9 32.1 21.1 20.8 32.7 48.5 32.7 77.8l-0.7 484.9c0 60.8-49.9 109.9-111 109.9z" fill="#2a98fe" p-id="7749"></path><path d="M688.9 387.6l-353.9-0.5c-8.7 0-17.1-3.5-23.2-9.7-6.2-6.2-9.6-14.5-9.6-23.2l0.2-159.8c0-18.1 14.7-32.8 32.8-32.8l53.1 0.1c2.4-29.4 15-56.7 36.1-77.7 23.4-23.4 54.6-36.2 87.7-36.2h0.2c33.2 0 64.3 13 87.7 36.5 21.1 21.1 33.6 48.4 35.9 77.8l53.2 0.1c18.1 0 32.8 14.7 32.8 32.9l-0.2 159.8c0 8.7-3.5 17.1-9.7 23.2-6.1 6-14.4 9.5-23.1 9.5z m-321-66.1l288.1 0.3 0.1-94.1-56-0.1c-10.2 0-19.7-4.7-26-12.8-6.2-8-8.3-18.5-5.8-28.3 1.5-5.7 2.2-10.4 2.2-14.6 0-15.6-6-30.3-17.1-41.3-11.1-11.1-26.6-18-41.4-17.2-15.6 0-30.2 6.1-41.3 17.1-11.1 11-17.2 25.7-17.2 41.3 0 4.2 0.7 8.9 2.1 14.6 2.5 9.8 0.4 20.3-5.9 28.3-6.2 8-15.8 12.7-26 12.7l-56-0.1 0.2 94.2zM667.9 525H341.4c-17.5 0-31.7-14.2-31.7-31.7s14.2-31.7 31.7-31.7h326.5c17.5 0 31.7 14.2 31.7 31.7S685.4 525 667.9 525zM667.9 642.4H341.4c-17.5 0-31.7-14.2-31.7-31.7s14.2-31.7 31.7-31.7h326.5c17.5 0 31.7 14.2 31.7 31.7s-14.2 31.7-31.7 31.7zM667.9 759.8H341.4c-17.5 0-31.7-14.2-31.7-31.7s14.2-31.7 31.7-31.7h326.5c17.5 0 31.7 14.2 31.7 31.7s-14.2 31.7-31.7 31.7z" fill="#2a98fe" p-id="7750"></path></svg>
\ No newline at end of file
...@@ -60,6 +60,8 @@ import LoadGroupNew from './components/Field/loadGroupNew'; ...@@ -60,6 +60,8 @@ import LoadGroupNew from './components/Field/loadGroupNew';
import ChooseTableType from './components/ChooseTableType'; import ChooseTableType from './components/ChooseTableType';
// import { defaultFields } from './components/defaultFields'; // import { defaultFields } from './components/defaultFields';
import styles from './index.less'; import styles from './index.less';
import formDesign from '@/assets/font/omsfont/formDesign.svg';
import tableDesign from '@/assets/font/omsfont/tableDesign.svg';
const { Search } = Input; const { Search } = Input;
const { Option } = Select; const { Option } = Select;
const placeholder = '请输入表名'; const placeholder = '请输入表名';
...@@ -273,7 +275,7 @@ const TableManager = props => { ...@@ -273,7 +275,7 @@ const TableManager = props => {
let fieldCount = Number(item.fieldCount); let fieldCount = Number(item.fieldCount);
let extraFieldCount = Number(item.extraFieldCount); let extraFieldCount = Number(item.extraFieldCount);
// item.fieldCount extraFieldCount // item.fieldCount extraFieldCount
item.fieldRatio = `${fieldCount + extraFieldCount}/${fieldCount}`; item.fieldRatio = `${fieldCount}/${fieldCount + extraFieldCount}`;
}); });
let groupData = formateArrDataA(res.data.root, 'groupName'); let groupData = formateArrDataA(res.data.root, 'groupName');
let newArr = []; let newArr = [];
...@@ -398,24 +400,30 @@ const TableManager = props => { ...@@ -398,24 +400,30 @@ const TableManager = props => {
// width: 80, // width: 80,
// }, // },
{ {
title: '附加字段(已附加/全部字段)', title: '已附加/全部字段',
dataIndex: 'fieldRatio', dataIndex: 'fieldRatio',
key: 'fieldRatio', key: 'fieldRatio',
align: 'center', align: 'center',
width: 240, width: 240,
render: text => ( render: (text, record) => {
<span if (record.exceptionFields === '(无)') {
style={{ return <Tag color="processing">{text}</Tag>;
borderRadius: '3px', }
color: 'rgb(97,140,249)', return <Tag color="error">{text}</Tag>;
background: 'rgb(157,183,249)', },
padding: '0 8px', },
border: '1px solid rgb(97,140,249)', {
}} title: '异常字段',
> dataIndex: 'exceptionFields',
{text} key: 'exceptionFields',
</span> align: 'center',
), width: 80,
render: record => {
if (record === '(无)') {
return <div>{record}</div>;
}
return <div style={{ color: 'red' }}>{record}</div>;
},
}, },
// { // {
// title: '缺少字段', // title: '缺少字段',
...@@ -472,21 +480,41 @@ const TableManager = props => { ...@@ -472,21 +480,41 @@ const TableManager = props => {
width: 100, width: 100,
render: (text, record) => ( render: (text, record) => (
<Space> <Space>
<Tooltip title="表结构设计"> <Tooltip title="表模型管理">
<EditOutlined {/* <EditOutlined
onClick={() => changeDesc(record)} onClick={() => changeDesc(record)}
style={{ fontSize: '20px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> /> */}
<a href="#">
<img
src={formDesign}
alt=""
onClick={() => changeDesc(record)}
style={{ width: '20px', color: '#1890FF' }}
/>
</a>
</Tooltip> </Tooltip>
<Tooltip title="表单设计"> <Tooltip title="表单设计">
<MenuOutlined {/* <MenuOutlined
onClick={() => { onClick={() => {
setType('tableEdit'); setType('tableEdit');
setVisible(true); setVisible(true);
setFormObj(record); setFormObj(record);
}} }}
style={{ fontSize: '20px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> /> */}
<a href="#">
<img
src={tableDesign}
alt=""
onClick={() => {
setType('tableEdit');
setVisible(true);
setFormObj(record);
}}
style={{ width: '20px', color: '#1890FF' }}
/>
</a>
</Tooltip> </Tooltip>
{/* <Tooltip title="字段配置"> {/* <Tooltip title="字段配置">
<FontColorsOutlined <FontColorsOutlined
......
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