Commit 882454f3 authored by shanqiyun's avatar shanqiyun

.

parent 5b53aa58
...@@ -933,27 +933,28 @@ class View3D extends Component { ...@@ -933,27 +933,28 @@ class View3D extends Component {
savePointListAction(pointParams).then(data => { savePointListAction(pointParams).then(data => {
getPointTreeAction(pointType).then(data => { getPointTreeAction(pointType).then(data => {
getPointListAction().then(data => { this.getPointList(pointType,data);
let newMarkers ={ // getPointListAction().then(data => {
riskSource:[],//风险点 - riskSource; // let newMarkers ={
patrol:[],//巡检点 - // riskSource:[],//风险点 - riskSource;
impEquipment:[],//重点设备 - // patrol:[],//巡检点 -
monitorEquipment:[],//探测器 - // impEquipment:[],//重点设备 -
video:[],//摄像头 - // monitorEquipment:[],//探测器 -
fireEquipment:[],//消防设备 - // video:[],//摄像头 -
person:[], // fireEquipment:[],//消防设备 -
pool:[], // person:[],
hydrant:[], // pool:[],
fireChamber:[], // hydrant:[],
fireCar:[], // fireChamber:[],
fire:[], // fireCar:[],
fireDetection:[] // fire:[],
} // fireDetection:[]
for (let i = 0; i < data.length;i++){ // }
newMarkers[data[i].type].push(data[i]); // for (let i = 0; i < data.length;i++){
} // newMarkers[data[i].type].push(data[i]);
this.setState( {markers: newMarkers }); // }
}) // this.setState( {markers: newMarkers });
// })
this.setState({ this.setState({
treeData: data || [], treeData: data || [],
...@@ -1539,7 +1540,7 @@ class View3D extends Component { ...@@ -1539,7 +1540,7 @@ class View3D extends Component {
const me = this; const me = this;
const { markers } = me; const { markers } = me;
const isInside = me.polygonRegion && extData.parentId && me.polygonRegion[extData.parentId].pointInPolygon([position.x,position.y,position.z]); const isInside = me.polygonRegion && extData.parentId && me.polygonRegion[extData.parentId].pointInPolygon([position.x,position.y,position.z]);
if (isInside){ // if (isInside){
markers[extData.type].forEach(e => { markers[extData.type].forEach(e => {
if (e.id === extData.id){ if (e.id === extData.id){
e.position = `${position[0]},${position[1]},${position[2]}`; e.position = `${position[0]},${position[1]},${position[2]}`;
...@@ -1553,9 +1554,9 @@ class View3D extends Component { ...@@ -1553,9 +1554,9 @@ class View3D extends Component {
showRightPanel: true, showRightPanel: true,
selectPoints: extData selectPoints: extData
}); });
} else { // } else {
message.error('不能放置非所在区域'); // message.error('不能放置非所在区域');
} // }
} }
render() { render() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment