Compare commits
No commits in common. "1d94670489864ffaec5c2261902d14559e0ef5d5" and "6988a7afcb8e04d879c446975188ef7fe887c2f1" have entirely different histories.
1d94670489
...
6988a7afcb
|
|
@ -107,7 +107,6 @@ const apiurl = {
|
||||||
xcxj_dcl: service_fxdd + "/inspect/detail/handle/list",//巡查巡检-待处理问题
|
xcxj_dcl: service_fxdd + "/inspect/detail/handle/list",//巡查巡检-待处理问题
|
||||||
xcxj_by: service_fxdd + "/inspect/task/month",//巡查巡检-本月巡查记录
|
xcxj_by: service_fxdd + "/inspect/task/month",//巡查巡检-本月巡查记录
|
||||||
xcxj_bn: service_fxdd + "/inspect/task/year",//巡查巡检-本年巡查记录
|
xcxj_bn: service_fxdd + "/inspect/task/year",//巡查巡检-本年巡查记录
|
||||||
xcxj_gj: service_fxdd + "/inspectTaskTrack/list",//巡查巡检-巡查轨迹
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//防汛调度-小玉潭
|
//防汛调度-小玉潭
|
||||||
|
|
|
||||||
|
|
@ -125,37 +125,6 @@ const Page = ({mySetTms}) => {
|
||||||
mapObj.addLayer(vectorLayer);
|
mapObj.addLayer(vectorLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const onRowClick = async(data)=>{
|
|
||||||
const { code, data:res } = await httppost2(apiurl.home.xcxj_gj+'?taskId='+data.id)
|
|
||||||
if(code!==200){
|
|
||||||
message.error('请求失败')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(res.length===0){
|
|
||||||
message.error('无轨迹信息')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const list = res.map(o=>[o.lgtd-0.0115,o.lttd-0.0036])
|
|
||||||
|
|
||||||
data.data = {
|
|
||||||
"type":"MultiLineString",
|
|
||||||
"coordinates":[
|
|
||||||
[
|
|
||||||
...list
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
addHlLayer(data?.data,'HlItem_'+data.id,'#00FFFF',data)
|
|
||||||
const center = geometryCenter({type:"LineString",coordinates:data.data.coordinates[0]});
|
|
||||||
dispatch.runtime.setFeaturePop({
|
|
||||||
id: data.id,
|
|
||||||
data: data,
|
|
||||||
type: 'xunjian',
|
|
||||||
lgtd: center[0],
|
|
||||||
lttd: center[1],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="xunchaxunjian">
|
<div className="xunchaxunjian">
|
||||||
|
|
@ -194,7 +163,30 @@ const Page = ({mySetTms}) => {
|
||||||
scroll={{ y: "300px"}}
|
scroll={{ y: "300px"}}
|
||||||
onRow={
|
onRow={
|
||||||
(data)=>({
|
(data)=>({
|
||||||
onClick:()=>onRowClick(data)
|
onClick:()=>{
|
||||||
|
data.data = {
|
||||||
|
"type":"MultiLineString",
|
||||||
|
"coordinates":[
|
||||||
|
[
|
||||||
|
[114.746, 31.479],
|
||||||
|
[114.776, 31.509]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
if(!data.data){
|
||||||
|
message.error('无轨迹信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
addHlLayer(data?.data,'HlItem_'+data.id,'#00FFFF',data)
|
||||||
|
const center = geometryCenter({type:"LineString",coordinates:data.data.coordinates[0]});
|
||||||
|
dispatch.runtime.setFeaturePop({
|
||||||
|
id: data.id,
|
||||||
|
data: data,
|
||||||
|
type: 'xunjian',
|
||||||
|
lgtd: center[0],
|
||||||
|
lttd: center[1],
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue