Browse Source

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

release_0.0.4^2
xingyongchun 2 years ago
parent
commit
535e7daa93
  1. 3
      web/client/src/sections/quanju/containers/footer/build/index.js
  2. 90
      web/client/src/sections/quanju/containers/footer/operation/left.js
  3. 8
      web/client/src/sections/quanju/containers/footer/operation/right.js

3
web/client/src/sections/quanju/containers/footer/build/index.js

@ -121,6 +121,7 @@ const Build = (props) => {
// }
// ]
console.log(localStorage.getItem("qndmn"),'七牛')
console.log(xuandata,"宣传")
return (
<div className='bgbuild'>
<div className='bgbuild-left'>
@ -200,7 +201,7 @@ const Build = (props) => {
}} customize={true}>
<div className='build-right-top'>
{/* <img src='/assets/images/quanju/xuanchuanlan.jpg'></img> */}
<video src={xuandata?`${localStorage.getItem("qndmn")}/${xuandata[0].video!==null&&xuandata[0].video?xuandata[0].video[0]:""}`:"#"} autoPlay="autoplay" loop></video>
<video src={xuandata&&xuandata!==null&&xuandata.length!==0?`${localStorage.getItem("qndmn")}/${xuandata[0].video!==null&&xuandata[0].video?xuandata[0].video[0]:""}`:"#"} autoPlay="autoplay" loop></video>
<h2>全面建设好农村公路切实发挥先行官作用</h2>
</div>
</Module>

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

@ -5,8 +5,6 @@ import Module from '../../public/module'
import { getBusTierList } from '../../../actions/example'
import './style.less'
const Left = (props) => {
const [treeData, setTreeData] = useState([])
const [treeDataList, setTreeDataList] = useState([])
@ -29,12 +27,12 @@ const Left = (props) => {
const onChange = (e) => {
const { value } = e.target;
let keys = []
const newExpandedKeys = treeDataList.filter(e => e.key.match(value))
let titles = []
const newExpandedKeys = treeDataList.filter(e => e.title != null && e.title.match(value))
newExpandedKeys.forEach(e => {
keys.push(e.key)
titles.push(e.title)
})
setExpandedKeys(keys);
setExpandedKeys(titles);
setSearchValue(value);
setAutoExpandParent(true);
};
@ -78,51 +76,53 @@ const Left = (props) => {
let busTierOpen = []
let dataList = []
let busTierNewList = []
if (busTier && busTier.data && busTier.data.length > 0) {
busTierNewList.push(busTier && busTier.data && busTier.data[0])
}
if (busTierNewList.length > 0) {
busTierNewList.forEach((e, index) => {
if (index == 0) {
busTierOpen.push(e.name)
}
busTierList.push({
key: e.name,
title: e.name,
children: e.child.map(s => {
return {
key: s.name,
title: s.name,
children: s.child.map(i => {
return {
key: i.name,
title: i.name,
children: i.child.map(x => {
return {
key: x.name,
title: x.name,
}
})
}
})
}
// Math.ceil(Math.random() * 100);
// if (busTier && busTier.data && busTier.data.length > 0) {
// busTierNewList.push(busTier && busTier.data && busTier.data[0])
// }
// if (busTierNewList.length > 0) {
// }
busTier && busTier.data && busTier.data.forEach((e, index) => {
if (index == 0) {
busTierOpen.push(e.name)
}
busTierList.push({
key: e.name,
title: e.name,
children: e.child.map(s => {
return {
key: s.name == '--' || s.name == null ? Math.ceil(Math.random() * 100) : s.name,
title: s.name,
children: s.child.map(i => {
return {
key: i.name == '--' || i.name == null ? Math.ceil(Math.random() * 100) : i.name,
title: i.name,
children: i.child.map(x => {
return {
key: x.name == '--' || x.name == null ? Math.ceil(Math.random() * 100) : x.name,
title: x.name == null ? '--' : x.name,
}
})
}
})
}
})
})
})
busTierNewList.forEach(e => {
e.child.forEach(i => {
i.child.forEach(s => {
s.child.forEach(x => {
dataList.push({
key: x.name,
title: x.name
})
})
busTier && busTier.data && busTier.data.forEach(e => {
e.child.forEach(i => {
i.child.forEach(s => {
s.child.forEach(x => {
dataList.push({
key: x.name,
title: x.name
})
})
})
})
}
})
setTreeData(busTierList)
setExpandedKeys(busTierOpen)
setTreeDataList(dataList)
@ -132,7 +132,7 @@ const Left = (props) => {
<Module style={style} customize={true} title={"公交车辆信息"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}>
<img src='assets/images/quanju/search.png' style={{ width: '5%', margin: '0 1.5% 1% 3.5%' }} />
<img src='/assets/images/quanju/search.png' style={{ width: '5%', margin: '0 1.5% 1% 3.5%' }} />
<Input
style={{
width: '90%',

8
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -37,7 +37,7 @@ const Right = () => {
dataLists.map((data, index) => (
<div key={index} style={{width:'100%',height:'40%'}}>
<div className='busInformation'>
<img src='assets/images/quanju/theBus.png' style={{ width: '15%', display:'block',float:'left' }} />
<img src='/assets/images/quanju/theBus.png' style={{ width: '15%', display:'block',float:'left' }} />
<span>
<h3>所属线路</h3>
<h4>{data.route}</h4>
@ -49,15 +49,15 @@ const Right = () => {
<div style={{
width:'98%',margin:'1% 1%',height:152,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{
width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{
width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
</div>
</div>
))

Loading…
Cancel
Save