Browse Source

Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev

release_0.0.4
巴林闲侠 3 years ago
parent
commit
917e7f7c7c
  1. 10
      web/client/src/sections/quanju/containers/example.js
  2. 3
      web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
  3. 36
      web/client/src/sections/quanju/containers/footer/operation/left.js

10
web/client/src/sections/quanju/containers/example.js

@ -7,6 +7,8 @@ import Header from './heand';
import Footer from './footer'; import Footer from './footer';
import ProTable, { TableDropdown } from '@ant-design/pro-table'; import ProTable, { TableDropdown } from '@ant-design/pro-table';
const MAPID = 'screenGis'
const Example = (props) => { const Example = (props) => {
const { dispatch, actions, user, loading } = props const { dispatch, actions, user, loading } = props
const [tabKey, setTabKey] = useState('leadership') const [tabKey, setTabKey] = useState('leadership')
@ -24,9 +26,8 @@ const Example = (props) => {
useEffect(() => { useEffect(() => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
const map = new AMap.Map("amapId", { const map = new AMap.Map(MAPID, {
//resizeEnable: true, //resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块 center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块
// center: [115.857952, 28.683003],//地图中心点 // center: [115.857952, 28.683003],//地图中心点
@ -54,6 +55,9 @@ const Example = (props) => {
amapKeys.forEach(key => { amapKeys.forEach(key => {
localStorage.removeItem(key) localStorage.removeItem(key)
}) })
map.clearMap();
if (map) map.destroy();
map = null;
clearTimeout(timer) clearTimeout(timer)
} }
}, []) }, [])
@ -67,7 +71,7 @@ const Example = (props) => {
document.body.clientHeight / 1080 document.body.clientHeight / 1080
)})`, */ )})`, */
}}> }}>
<div id='amapId' style={{ position: 'absolute', width: "100%", height: "100%" }}></div> <div id={MAPID} style={{ position: 'absolute', width: "100%", height: "100%" }}></div>
<div style={{ width: "100%", height: "10%" }}> <div style={{ width: "100%", height: "10%" }}>
<Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} /> <Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} />
</div> </div>

3
web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js

@ -15,7 +15,7 @@ let underColorList = [
"rgba(255,194,20,0.5)" "rgba(255,194,20,0.5)"
] ]
const type = ['road', 'culvert', 'bridge'] const type = ['culvert','', 'road', 'bridge']
const RightBottom = (props) => { const RightBottom = (props) => {
const { roadMaintenances } = props const { roadMaintenances } = props
@ -45,6 +45,7 @@ const RightBottom = (props) => {
} }
}).filter(f => f !== undefined) }).filter(f => f !== undefined)
const otherNum = totalData - typesNum const otherNum = totalData - typesNum
console.log();
otherNum !== null && list?.push({ name: '其他', value: otherNum }) otherNum !== null && list?.push({ name: '其他', value: otherNum })
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
return ( return (

36
web/client/src/sections/quanju/containers/footer/operation/left.js

@ -27,8 +27,8 @@ const Left = (props) => {
const onChange = (e) => { const onChange = (e) => {
const { value } = e.target; const { value } = e.target;
let keys = [] let keys = []
const newExpandedKeys = treeDataList.filter(e=> e.key.match(value)) const newExpandedKeys = treeDataList.filter(e => e.key.match(value))
newExpandedKeys.forEach(e=>{ newExpandedKeys.forEach(e => {
keys.push(e.key) keys.push(e.key)
}) })
setExpandedKeys(keys); setExpandedKeys(keys);
@ -66,12 +66,12 @@ const Left = (props) => {
key: e.name, key: e.name,
title: e.name, title: e.name,
}) })
e.child.forEach(i=>{ e.child.forEach(i => {
dataList.push({ dataList.push({
key: i.name, key: i.name,
title: i.name, title: i.name,
}) })
i.child.forEach(s=>{ i.child.forEach(s => {
dataList.push({ dataList.push({
key: s.vehicleLicensePlateNumber, key: s.vehicleLicensePlateNumber,
title: s.vehicleLicensePlateNumber, title: s.vehicleLicensePlateNumber,
@ -103,18 +103,22 @@ const Left = (props) => {
/> />
</div> </div>
<div className='busList'> <div className='busList'>
<Tree {
rootStyle={{ treeData.length > 0 ?
marginTop: '1%', <Tree
background: 'none', rootStyle={{
borderColor: 'none', marginTop: '1%',
color: 'rgba(255, 255, 255, 1)' background: 'none',
}} borderColor: 'none',
onExpand={onExpand} color: 'rgba(255, 255, 255, 1)'
expandedKeys={expandedKeys} }}
autoExpandParent={autoExpandParent} onExpand={onExpand}
treeData={treeData} expandedKeys={expandedKeys}
/> autoExpandParent={autoExpandParent}
treeData={treeData}
/> : <div style={{width:'100%',color:'#fff',textAlign:'center',marginTop:'90%'}}></div>
}
</div> </div>
</div> </div>
</Module> </Module>

Loading…
Cancel
Save