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

消息平台界面优化

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