Commit 0313c91d authored by 皮倩雯's avatar 皮倩雯

消息平台界面优化

parent 8bfb0f9f
Pipeline #37701 skipped with stages
......@@ -11,7 +11,7 @@ const MapScope = props => {
const [options, setOptions] = useState([])
//const [mouseTool,setMouseTool] = useState(null)
const { confirmModal, extent, mapId, title, distinct } = props
const { confirmModal, extent, mapId, title} = props
const [currentExtent, setCurrentExtent] = useState()
const [isDistrict, setIsDistrict] = useState(false)
const [currentAreaName, setCurrentAreaName] = useState(null)
......@@ -20,8 +20,6 @@ const MapScope = props => {
const mapID = useRef();
const mouseToolID = useRef();
useEffect(() => {
console.log(extent)
console.log(mapId)
if (document.getElementById(mapId)) {
if (!mapID.current) {
//1.加载底图
......@@ -148,7 +146,7 @@ const MapScope = props => {
})
}
const onCascderChange = (value) => {
console.log(mapID)
let map = mapID.current
map.clearMap()
console.log(value, "选中的行政区")
......@@ -196,8 +194,6 @@ const MapScope = props => {
}
const filter = (inputValue, path) => {
console.log(path)
console.log(inputValue)
return path.some(option => option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
}
return (
......@@ -228,7 +224,6 @@ const MapScope = props => {
showSearch={{ filter }}
changeOnSelect
style={{ width: "200px" }}
/>
</div>
<div style={{ top: "10px", right: "10px", position: "absolute" }}>
......
......@@ -268,7 +268,7 @@ const InitDataBase = props => {
notification.error({
message: '提示',
duration: 15,
description: '连接失败,请检查配置信息',
description: res.msg,
});
}
})
......
......@@ -8,6 +8,7 @@ import {
Popconfirm,
notification,
Spin,
Pagination
} from 'antd';
import copy from 'copy-to-clipboard';
import PageContainer from '@/components/BasePageContainer';
......@@ -19,6 +20,7 @@ import {
databaseStandardGetLog,
databaseStandardGetLogNew,
} from '@/services/database/api';
import { ConsoleSqlOutlined } from '@ant-design/icons';
const ManagementDataBase = () => {
const [autoCheckList, setAutoCheckList] = useState([]); // 自动列表
......@@ -31,6 +33,8 @@ const ManagementDataBase = () => {
const [modalVisible, setModalVisible] = useState(false); // 弹窗
const [content, setContent] = useState(null);
const [modalTitle, setModalTitle] = useState('详细信息');
const [currentPage, setCurrentPage] = useState(1);
const [pageSize, setPageSize] = useState(10);
// 检查数据库表
useEffect(() => {
setCheckLoading(true);
......@@ -333,6 +337,13 @@ const ManagementDataBase = () => {
},
];
const paginationChange = (page, pageSizes) => {
console.log(page)
console.log(pageSizes)
setCurrentPage(page);
setPageSize(pageSizes);
}
return (
<>
<PageContainer>
......
......@@ -265,6 +265,14 @@ const ProjectManage = () => {
}
)
}
const pagenation = {
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: '10',
showQuickJumper: true,
showSizeChanger: true,
};
return (
<div className={styles.project_container}>
<Spin tip="loading..." spinning={treeLoading}>
......@@ -308,7 +316,7 @@ const ProjectManage = () => {
</div>
<div className={styles.list_view}>
<Table bordered columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' />
<Table bordered columns={columns} dataSource={dataList} pagination={pagenation} rowKey='ID' />
</div>
<EditModal
visible={visibleParams.editVisible}
......
......@@ -44,7 +44,7 @@
.list_view {
width: 100%;
height: calc(100vh - 184px);
height: calc(100vh - 187px);
background-color: white;
display: flex;
flex-direction: column;
......@@ -53,5 +53,10 @@
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-table-container{
max-height: calc(100vh - 240px)!important;
min-height:calc(100vh - 240px)!important;
}
}
}
......@@ -272,6 +272,13 @@ const TemplateManage = () => {
)
}
const pagenation = {
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: '10',
showQuickJumper: true,
showSizeChanger: true,
};
return (
<div className={styles.template_container}>
<Spin tip="loading..." spinning={treeLoading}>
......@@ -307,7 +314,7 @@ const TemplateManage = () => {
columns={columns}
dataSource={data}
bordered
pagination={{ pageSize: '10' }}
pagination={pagenation}
scroll={{ y: '500px' }}
/>
</div>
......
......@@ -66,8 +66,8 @@
margin-top: 0;
}
.ant-table-body{
max-height: 610px !important;
min-height:610px;
max-height: calc(100vh - 300px)!important;
min-height:calc(100vh - 300px)!important;
}
}
......@@ -18,6 +18,7 @@ const AddModal = props => {
const onSubmitSuccess = () => {
const result = form.getFieldValue()
props.onSubmit & props.onSubmit({ Id: props.template.Id, ...result })
form.resetFields()
}
useEffect(() => {
if (option) {
......
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