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

fix: '优化parseForm组件'

parent fc6a8f3b
Pipeline #64368 passed with stages
......@@ -4,6 +4,7 @@ html,
body,
#app {
height: 100%;
overflow: hidden;
}
.colorWeak {
......
import React, { useState, useEffect } from 'react';
import { Modal, Space, Button } from 'antd';
import ParseForm from 'parseForm';
import { LayerSetting } from '@/services/gis/gis';
import styles from './index.less';
const PerviewPrase = props => {
const { visible, onCancel, accountData } = props;
const [loading, setLoading] = useState(false);
......@@ -18,54 +17,42 @@ const PerviewPrase = props => {
modules: [],
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);
}
}, [visible]);
return (
<Modal
title="预览"
bodyStyle={{
width: '100%',
minHeight: '200px',
maxHeight: '780px',
overflow: 'scroll',
overflowX: 'hidden',
}}
width="1800px"
style={{ marginTop: '-80px' }}
destroyOnClose
maskClosable={false}
footer={
<Space>
<Button onClick={onCancel} type="primary">
关闭
</Button>
</Space>
}
{...props}
confirmLoading={loading}
forceRender
getContainer={false}
>
{console.log(data)}
{visible && <ParseForm tablesSchema={data} noButtons />}
</Modal>
<div className={styles.PerviewParse}>
<Modal
title="预览"
bodyStyle={{
width: '100%',
minHeight: '200px',
maxHeight: '780px',
overflow: 'scroll',
overflowX: 'hidden',
}}
width="1800px"
style={{ marginTop: '-80px' }}
destroyOnClose
maskClosable={false}
footer={
<Space>
<Button onClick={onCancel} type="primary">
关闭
</Button>
</Space>
}
{...props}
confirmLoading={loading}
forceRender
getContainer={false}
>
{console.log(window.globalConfig.mapsettings)}
{visible && <ParseForm tablesSchema={data} noButtons />}
</Modal>
</div>
);
};
export default PerviewPrase;
......@@ -37,6 +37,7 @@ import AffiliateAdd from '../components/Field/affiliateAdd';
import LoadGroup from '../components/Field/loadGroupNew';
import styles from './index.less';
import PerviewPrase from './PerviewPrase';
import { LayerSetting } from '@/services/gis/gis';
const AddModal = props => {
const history = useHistory();
const [allData, setAllData] = useState([]);
......@@ -319,6 +320,20 @@ const AddModal = props => {
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(() => {
......
......@@ -134,6 +134,12 @@
align-items: center;
}
}
.ant-modal-wrap{
overflow: hidden;
.PerviewParse{
.ant-modal-wrap{
overflow: hidden;
}
.ant-radio-wrapper {
margin-bottom: 2px;
}
}
......@@ -141,16 +141,18 @@ const ChangeAdd = props => {
borderTopColor: '#99bbe8',
}}
>
全选
<Checkbox
style={{ marginLeft: '10px' }}
indeterminate={indeterminate}
onChange={onCheckAllChange}
checkvalue={filed}
checked={checkAll}
>
{' '}
</Checkbox>
<div style={{ display: 'flex', width: '60px' }}>
<span style={{ lineHeight: '32px' }}>全选</span>
<Checkbox
style={{ marginLeft: '10px', width: '30px', marginTop: '7px' }}
indeterminate={indeterminate}
onChange={onCheckAllChange}
checkvalue={filed}
checked={checkAll}
>
{' '}
</Checkbox>
</div>
</Divider>
<CheckboxGroup
options={filed}
......
......@@ -113,9 +113,21 @@
border: 1px solid #b5b8c8;
width: 100%;
min-height: 100px;
min-width: 333px;
// height: 30rem;
width: 335px;
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 @@
.ant-table-pagination.ant-pagination {
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