Commit e45a7f6d authored by shaoan123's avatar shaoan123

优化gis配置模块

parent 73d07fda
Pipeline #27003 skipped with stages
.container{
width: 100%;
height: calc(100vh - 100px) ;
background-color: #ffffff;
display: flex;
padding: 0.8rem;
.ant-table-thead tr th {
font-weight: 600;
......@@ -102,6 +103,9 @@
}
.cardItem{
width: 18rem;
height: 18rem;
height: 26rem;
margin: 0 2rem;
}
.solutionConfig{
}
\ No newline at end of file
import { Space, Table, Button, Popconfirm, notification } from 'antd';
import React, { useState, useEffect, Modal } from 'react';
import { Space, Table, Button, Popconfirm, notification,Spin } from 'antd';
import React, { useState, useEffect } from 'react';
import styles from '../SchemeConfig.less'
import {
GetAllConfig,
......@@ -163,6 +163,7 @@ const TileData = props => {
return (
<>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.tileBtn}>
<Button type="primary" onClick={() => {
handleAdd();
......@@ -191,6 +192,7 @@ const TileData = props => {
formObj={formObj}
baseMap = {baseMap}
/>
</Spin>
</>
)
}
......
import { Space, Table, Button, Popconfirm, notification } from 'antd';
import { Space, Table, Button, Popconfirm, notification,Spin } from 'antd';
import React, { useState, useEffect } from 'react';
import styles from '../SchemeConfig.less'
import {
......@@ -194,6 +194,7 @@ const VectorData = props => {
return (
<>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.tileBtn}>
<Button type="primary" onClick={() => {
handleAdd();
......@@ -227,6 +228,7 @@ const VectorData = props => {
onCancel={() => setPreviewVisible(false)}
metaData={currentMetaData}
/>
</Spin>
</>
)
}
......
......@@ -145,7 +145,7 @@ const CardData = props => {
<div className={styles.schemeItem}><span className={styles.schemeName}>瓦片</span>
<Button className={styles.schemeBtn} onClick={() => addTile(props.item)}> <PlusOutlined />添加瓦片</Button>
</div>
<div style={{ overflowY: 'scroll', height: '5.5rem' }}>
<div style={{ overflowY: 'scroll', maxHeight: '11.4rem' }}>
{props.item.baseMap && props.item.baseMap.length ? props.item.baseMap.map((baseMapItem, baseindex) => {
return <div className={styles.mapItem} key={baseindex} >
<div className={classnames({
......
import { Button } from 'antd';
import { Button,Spin } from 'antd';
import React, { useState, useEffect } from 'react';
import styles from '../SchemeConfig.less'
import {
......@@ -48,6 +48,7 @@ const VectorData = props => {
};
return (
<>
<Spin tip="loading..." spinning={treeLoading}>
<div style={{ width: 'calc(100vw - 265px)' }}>
<div className={styles.tileBtn}>
<Button type="primary" onClick={() => {
......@@ -72,6 +73,7 @@ const VectorData = props => {
formObj={formObj}
/>
</div>
</Spin>
</>
)
}
......
......@@ -15,7 +15,6 @@ import AddModal from './AddModal'
const VectorData = props => {
const [treeLoading, setTreeLoading] = useState(false);// 弹窗显示
const [schemename, setSchemename] = useState([]);
const [initValues, setInitValues] = useState([]);//角色初始化列表
const [record, setRecord] = useState({}); //选中关联角色的方案名
const [webCurrent, setWebCurrent] = useState(0); // web列表下标
const [handCurrent, setHandCurrent] = useState(0); // hand列表下标
......@@ -25,11 +24,8 @@ const VectorData = props => {
const [flag, setFlag] = useState(0); // 更新list
const [handStatus, setHandStatus] = useState([]); // 更新状态
const [webStatus, setWebStatus] = useState([]); // 更新状态
const [webIndex, setWebIndex] = useState(0); // web默认选中状态
const [handIndex, setHandIndex] = useState(0); // 手持默认选中状态
const [type, setType] = useState(''); // 弹窗类型
const [checkLoading, setCheckLoading] = useState(false)
const [solutionNames, setSolutionNames] = useState('');
const [formObj, setFormObj] = useState({ user: 'admin', password: 'geoserver' });
const columns = [
{
......@@ -39,9 +35,9 @@ const VectorData = props => {
render: (text, record, index) => (
<Space>
<Checkbox
checked={webStatus[index + webCurrent * 3]}
checked={webStatus[index + webCurrent * 5]}
onChange={e => {
onChangeCheck(e, record, index + webCurrent * 3);
onChangeCheck(e, record, index + webCurrent * 5);
}}
/>
</Space>
......@@ -100,9 +96,9 @@ const VectorData = props => {
render: (text, record, index) => (
<Space>
<Checkbox
checked={handStatus[index + handCurrent * 3]}
checked={handStatus[index + handCurrent * 5]}
onChange={e => {
onChangeHand(e, record, index + handCurrent * 3);
onChangeHand(e, record, index + handCurrent * 5);
}}
/>
</Space>
......@@ -167,7 +163,7 @@ const VectorData = props => {
SetServiceConfig(query).then(res => {
if (res.IsSuccess) {
prompt('success', '关联角色成功')
setFlag(flag + 1)
}
else {
prompt('fail', '关联角色失败')
......@@ -175,7 +171,7 @@ const VectorData = props => {
}).catch(err=>{
prompt('fail', '网络请求失败')
})
setFlag(flag + 1)
}
......@@ -412,7 +408,7 @@ const VectorData = props => {
}, [flag]);
// 获取瓦片数据配置数据
const renderTile = () => {
setTreeLoading(true);
setCheckLoading(true)
//查询手持方案
var schemeConfigQueryRequest = GetAllConfig({
terminalType: 'phone',
......@@ -429,7 +425,6 @@ const VectorData = props => {
res[0].Result.map((item, index) => {
if (item.isDefault) {
arr.push(true)
setHandIndex(index)
} else {
arr.push(false)
}
......@@ -446,7 +441,6 @@ const VectorData = props => {
res[1].Result.map((item, index) => {
if (item.type === "pipenet") {
arr.push(true)
setWebIndex(index)
} else {
arr.push(false)
}
......@@ -456,6 +450,9 @@ const VectorData = props => {
setWebData(res[1].Result)
setWebStatus(arr)
}
setCheckLoading(false)
}).catch(e=>{
setCheckLoading(false)
})
};
......@@ -465,7 +462,7 @@ const VectorData = props => {
return (
<>
<Spin tip="loading..." spinning={checkLoading}>
<div>
<div className={styles.solutionConfig}>
<div >
<Divider orientation="left"><div className={styles.divider}> Web <PlusOutlined
onClick={() => { addType('add') }}
......@@ -477,7 +474,7 @@ const VectorData = props => {
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 3,
defaultPageSize: 5,
onChange: (value) => {
setWebCurrent(value - 1)
}
......@@ -500,7 +497,7 @@ const VectorData = props => {
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 3,
defaultPageSize: 10,
onChange: (value) => {
setHandCurrent(value - 1)
}
......
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