Commit 2d9e78d4 authored by 皮倩雯's avatar 皮倩雯

fix: '优化parseForm组件'

parent fc6a8f3b
Pipeline #64368 passed with stages
...@@ -4,6 +4,7 @@ html, ...@@ -4,6 +4,7 @@ html,
body, body,
#app { #app {
height: 100%; height: 100%;
overflow: hidden;
} }
.colorWeak { .colorWeak {
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Modal, Space, Button } from 'antd'; import { Modal, Space, Button } from 'antd';
import ParseForm from 'parseForm'; import ParseForm from 'parseForm';
import styles from './index.less';
import { LayerSetting } from '@/services/gis/gis';
const PerviewPrase = props => { const PerviewPrase = props => {
const { visible, onCancel, accountData } = props; const { visible, onCancel, accountData } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
...@@ -18,54 +17,42 @@ const PerviewPrase = props => { ...@@ -18,54 +17,42 @@ const PerviewPrase = props => {
modules: [], modules: [],
relationForm: {}, relationForm: {},
}; };
LayerSetting({ client: 'sandbox' }).then(res => {
let dataArea = res.data.find(i => i.layerType == 'PipenetLayer');
console.log(res.data[0]);
let ss = {
layers: [dataArea],
};
let depart = { OID: 1017, code: '1-1016-1017', name: '管理员' };
let userInfo = { OID: 1, fullName: '总经理', loginName: 'admin', depart };
window.globalConfig = {
...window.globalConfig,
mapsettings: ss,
userInfo,
};
});
setData(tablesSchema); setData(tablesSchema);
} }
}, [visible]); }, [visible]);
return ( return (
<Modal <div className={styles.PerviewParse}>
title="预览" <Modal
bodyStyle={{ title="预览"
width: '100%', bodyStyle={{
minHeight: '200px', width: '100%',
maxHeight: '780px', minHeight: '200px',
overflow: 'scroll', maxHeight: '780px',
overflowX: 'hidden', overflow: 'scroll',
}} overflowX: 'hidden',
width="1800px" }}
style={{ marginTop: '-80px' }} width="1800px"
destroyOnClose style={{ marginTop: '-80px' }}
maskClosable={false} destroyOnClose
footer={ maskClosable={false}
<Space> footer={
<Button onClick={onCancel} type="primary"> <Space>
关闭 <Button onClick={onCancel} type="primary">
</Button> 关闭
</Space> </Button>
} </Space>
{...props} }
confirmLoading={loading} {...props}
forceRender confirmLoading={loading}
getContainer={false} forceRender
> getContainer={false}
{console.log(data)} >
{visible && <ParseForm tablesSchema={data} noButtons />} {console.log(window.globalConfig.mapsettings)}
</Modal> {visible && <ParseForm tablesSchema={data} noButtons />}
</Modal>
</div>
); );
}; };
export default PerviewPrase; export default PerviewPrase;
...@@ -37,6 +37,7 @@ import AffiliateAdd from '../components/Field/affiliateAdd'; ...@@ -37,6 +37,7 @@ import AffiliateAdd from '../components/Field/affiliateAdd';
import LoadGroup from '../components/Field/loadGroupNew'; import LoadGroup from '../components/Field/loadGroupNew';
import styles from './index.less'; import styles from './index.less';
import PerviewPrase from './PerviewPrase'; import PerviewPrase from './PerviewPrase';
import { LayerSetting } from '@/services/gis/gis';
const AddModal = props => { const AddModal = props => {
const history = useHistory(); const history = useHistory();
const [allData, setAllData] = useState([]); const [allData, setAllData] = useState([]);
...@@ -319,6 +320,20 @@ const AddModal = props => { ...@@ -319,6 +320,20 @@ const AddModal = props => {
setKeepStandingBook(res.data.root); setKeepStandingBook(res.data.root);
} }
}); });
LayerSetting({ client: 'sandbox' }).then(res => {
let dataArea = res.data.find(i => i.layerType == 'PipenetLayer');
console.log(res.data[0]);
let ss = {
layers: [dataArea],
};
let depart = { OID: 1017, code: '1-1016-1017', name: '管理员' };
let userInfo = { OID: 1, fullName: '总经理', loginName: 'admin', depart };
window.globalConfig = {
...window.globalConfig,
mapsettings: ss,
userInfo,
};
});
}, []); }, []);
useEffect(() => { useEffect(() => {
......
...@@ -134,6 +134,12 @@ ...@@ -134,6 +134,12 @@
align-items: center; align-items: center;
} }
} }
.ant-modal-wrap{ .PerviewParse{
overflow: hidden; .ant-modal-wrap{
overflow: hidden;
}
.ant-radio-wrapper {
margin-bottom: 2px;
}
} }
...@@ -141,16 +141,18 @@ const ChangeAdd = props => { ...@@ -141,16 +141,18 @@ const ChangeAdd = props => {
borderTopColor: '#99bbe8', borderTopColor: '#99bbe8',
}} }}
> >
全选 <div style={{ display: 'flex', width: '60px' }}>
<Checkbox <span style={{ lineHeight: '32px' }}>全选</span>
style={{ marginLeft: '10px' }} <Checkbox
indeterminate={indeterminate} style={{ marginLeft: '10px', width: '30px', marginTop: '7px' }}
onChange={onCheckAllChange} indeterminate={indeterminate}
checkvalue={filed} onChange={onCheckAllChange}
checked={checkAll} checkvalue={filed}
> checked={checkAll}
{' '} >
</Checkbox> {' '}
</Checkbox>
</div>
</Divider> </Divider>
<CheckboxGroup <CheckboxGroup
options={filed} options={filed}
......
...@@ -113,9 +113,21 @@ ...@@ -113,9 +113,21 @@
border: 1px solid #b5b8c8; border: 1px solid #b5b8c8;
width: 100%; width: 100%;
min-height: 100px; min-height: 100px;
min-width: 333px; width: 335px;
// height: 30rem;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden;
.ant-checkbox-wrapper {
margin-left: 0;
width: 300px;
overflow: hidden;
white-space: nowrap;
margin-top:6px;
.ant-checkbox + span {
// width: 280px;
// overflow: hidden;
// text-overflow: ellipsis;
}
}
} }
} }
...@@ -129,4 +141,9 @@ ...@@ -129,4 +141,9 @@
.ant-table-pagination.ant-pagination { .ant-table-pagination.ant-pagination {
margin: 5px 0; margin: 5px 0;
}
.ant-modal-wrap {
z-index: 1000;
height: 99%;
overflow: hidden;
} }
\ No newline at end of file
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