Browse Source

gis弹框图片

dev
巴林闲侠 2 years ago
parent
commit
7e5706e8b4
  1. 22
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js
  2. 12
      web/client/src/sections/quanju/containers/public/olMap.js

22
web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js

@ -45,7 +45,7 @@ class ReactCarousel extends Component {
// arr1: ""
dizhi: localStorage.getItem("qndmn")
}
// console.log(this.state.imgs);
console.log(this.props.shuzu);
this.state.imgs = this.props.shuzu.filter((item) => {
return item.imgs !== ""
})
@ -61,15 +61,27 @@ class ReactCarousel extends Component {
onMouseLeave={() => { this.start() }} //鼠标退出自动播放
>
<ul className="ul">
<ul className="ul" style={{ paddingInlineStart: 0 }}>
{
this.state.imgs.map((value, index) => {
return (
<li style={{ position: "relative", width: "100%", height: "100%", top: "-5%", fontSize: "12px" }} className={index === this.state.showIndex ? 'show' : ''}
<li style={{
// position: "relative",
width: "100%", height: "100%",
// top: "-5%",
fontSize: "12px"
}} className={index === this.state.showIndex ? 'show' : ''}
key={index}
>
<div style={{ width: "100%", height: "80%", position: "absolute", top: "10%", right: "5%" }}>
<img src={this.state.dizhi + "/" + value.imgs} style={{ width: "100%", height: "100%", marginLeft: "3%", marginRight: "3%" }} />
<div style={{
width: "100%", height: "80%",
// position: "absolute", top: "10%", right: "5%"
}}>
<img src={this.state.dizhi + "/" + value.imgs} style={{
// width: "100%", height: "100%",
width: 140, height: 140,
marginLeft: "3%", marginRight: "3%"
}} />
</div>
</li>

12
web/client/src/sections/quanju/containers/public/olMap.js

@ -12,7 +12,13 @@ const OlMap = (props) => {
const [pointItem, setPointItem] = useState({})
useEffect(() => {
setOlMapOpenData([])
setPointItem({})
if (olMap) {
olMap.closeOverlay('clickOpen')
olMap.closeOverlay('pointClickOpen')
olMap.removeGeometryLayer('geometry0')
}
}, [tab])
useEffect(() => {
@ -256,7 +262,7 @@ const OlMap = (props) => {
scale: 1, // 图标引用
},
},
layerName: 'geometry_road_'// + index
layerName: 'geometry_road_' + index
});
});
}
@ -307,7 +313,7 @@ const OlMap = (props) => {
<div style={{ width: "50%", height: "100%", }}>
{
pointItem.id ?
<Hua shuzu={
<Hua key={pointItem.id} shuzu={
isRoadProject ?
[{
"imgs": pointItem.scene_pic && pointItem.scene_pic.length ?

Loading…
Cancel
Save