ww664853070 2 years ago
parent
commit
751f5bb858
  1. 3
      weapp/src/packages/patrol/index.jsx
  2. BIN
      web/client/assets/images/gis/pointer.png
  3. 6
      web/client/src/sections/quanju/containers/example.js
  4. 22
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js
  5. 2
      web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
  6. 61
      web/client/src/sections/quanju/containers/public/olMap.js

3
weapp/src/packages/patrol/index.jsx

@ -947,7 +947,8 @@ const Index = () => {
<AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton>
}
{
handleType == '已处理' || wait == 'wait' || handle == 'handle' ? <view>
// handleType == '' ||
wait == 'wait' || handle == 'handle' ? <view>
<view className='patrol-img'><text style={{ color: 'red' }}>*</text>处理内容</view>
<AtTextarea
title='处理内容:'

BIN
web/client/assets/images/gis/pointer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

@ -24,7 +24,7 @@ const Example = (props) => {
console.log(tab);
if (tab === 'conserve') {
dispatch(getReportList({
reportType: 'patrol',
reportType: 'conserve',
isTop: true
})).then(res => {
console.log(res);
@ -32,6 +32,8 @@ const Example = (props) => {
setPatrolList(res.payload.data || [])
}
})
}
if (tab === 'build') {
dispatch(getReportList({
reportType: 'road',
isTop: true
@ -56,7 +58,7 @@ const Example = (props) => {
</div>
<div style={{ position: 'absolute', width: "100%", height: "90%" }}>
{/* <Gis tabKey={tabKey} /> */}
<OlMap patrolList={patrolList} roadProjectList={roadProjectList} />
<OlMap patrolList={patrolList} roadProjectList={roadProjectList} tab={tabKey} />
<Footer tabKey={tabKey} dispatch={dispatch} />
</div>
</div>

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>

2
web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js

@ -36,7 +36,7 @@ const Leftcenter = ({ videoCenterList }) => {
setNum(num + 1);
// setTu(list[num].img);
}
}, 2000 * 10);
}, 1000 * 60 * 5);
return () => clearInterval(timer);
}, [num]);

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

@ -6,14 +6,20 @@ import moment from 'moment';
import { OlMapRequest } from '$utils'
const OlMap = (props) => {
const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList } = props
const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList, tab } = props
const [olMapOpenData, setOlMapOpenData] = useState([])
const [olMap, setOlMap] = useState()
const [pointItem, setPointItem] = useState({})
useEffect(() => {
}, [])
setOlMapOpenData([])
setPointItem({})
if (olMap) {
olMap.closeOverlay('clickOpen')
olMap.closeOverlay('pointClickOpen')
olMap.removeGeometryLayer('geometry0')
}
}, [tab])
useEffect(() => {
if (olMapGeoDataHost) {
@ -148,7 +154,11 @@ const OlMap = (props) => {
}, [olMapGeoDataHost])
useEffect(() => {
if (patrolList.length && olMap) {
if (patrolList.length && olMap && tab == 'conserve') {
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
patrolList.forEach((d, index) => {
console.log(d, index);
olMap.addGeometryLayer({
@ -164,7 +174,7 @@ const OlMap = (props) => {
setPointItem(d)
olMap.addOverlay('pointClickOpen', {
id: 'pointClickOpen',
offset: [0, 25], // 偏移
offset: [0, 4], // 偏移
position: [d.longitude, d.latitude], // 坐标
autoPan: true,
autoPanMargin: 100,
@ -178,9 +188,8 @@ const OlMap = (props) => {
],
style: {
icon: {
src: '/assets/images/worker.png',
// anchor: [0.5, 1],
scale: 0.08, // 图标引用
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
// stroke: { width: 1, color: '#ffff00' },
// circle: {
@ -191,9 +200,8 @@ const OlMap = (props) => {
},
selectStyle: {
icon: {
src: '/assets/images/worker.png',
// anchor: [0.5, 1],
scale: 0.08, // 图标引用
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
// circle: {
// radius: 16, // 直径
@ -206,10 +214,14 @@ const OlMap = (props) => {
});
});
}
}, [patrolList, olMap])
}, [patrolList, olMap, tab])
useEffect(() => {
if (roadProjectList.length && olMap) {
if (roadProjectList.length && olMap && tab == 'build') {
patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index)
})
roadProjectList.forEach((d, index) => {
olMap.addGeometryLayer({
features: [
@ -224,7 +236,7 @@ const OlMap = (props) => {
setPointItem(d)
olMap.addOverlay('pointClickOpen', {
id: 'pointClickOpen',
offset: [0, 25], // 偏移
offset: [0, 4], // 偏移
position: [d.longitude, d.latitude], // 坐标
// position: [115.944220000000, 28.545380000000],
autoPan: true,
@ -240,21 +252,21 @@ const OlMap = (props) => {
],
style: {
icon: {
src: '/assets/images/worker.png',
scale: 0.08, // 图标引用
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
selectStyle: {
icon: {
src: '/assets/images/worker.png',
scale: 0.08, // 图标引用
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
layerName: 'geometry_road_' + index
});
});
}
}, [roadProjectList, olMap])
}, [roadProjectList, olMap, tab])
const isRoadProject = pointItem.report_type == 'road'
return (
@ -301,7 +313,13 @@ 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 ?
pointItem.scene_pic[0] : ""
}] :
[{
"imgs": pointItem.conserve_after_pic ?
pointItem.conserve_after_pic[0] : ""
}, {
@ -310,7 +328,8 @@ const OlMap = (props) => {
}, {
"imgs": pointItem.conserve_underway_pic ?
pointItem.conserve_underway_pic[0] : ""
}]} />
}]}
/>
: ''
}
</div>

Loading…
Cancel
Save