Commit 16ff3558 authored by suhuiguang's avatar suhuiguang

1.增加非点编辑模式下,选中清除

parent a45d7f06
...@@ -555,7 +555,7 @@ class View3D extends Component { ...@@ -555,7 +555,7 @@ class View3D extends Component {
this.getPointLoop( { markers }, pointType, t.children) this.getPointLoop( { markers }, pointType, t.children)
}else if(t.position3d){ }else if(t.position3d){
t.position = t.position3d; t.position = t.position3d;
t.key = `${t.type}-${t.id}`; t.key = `${t.type}-${t.id}`;
t.label = t.name; t.label = t.name;
markers[pointType].push(t); markers[pointType].push(t);
} }
...@@ -925,7 +925,7 @@ class View3D extends Component { ...@@ -925,7 +925,7 @@ class View3D extends Component {
deletePointBind = () => { deletePointBind = () => {
let { selectPoints ,pointTypeArr,pointType,markers} = this.state; let { selectPoints ,pointTypeArr,pointType,markers} = this.state;
if (selectPoints && !selectPoints.isRegion) { if (selectPoints && !selectPoints.isRegion) {
let pointParams = []; let pointParams = [];
pointParams.push({ pointParams.push({
pointId: selectPoints.id, pointId: selectPoints.id,
...@@ -1037,10 +1037,11 @@ class View3D extends Component { ...@@ -1037,10 +1037,11 @@ class View3D extends Component {
*/ */
changeAreaPoint = (type) => { changeAreaPoint = (type) => {
let { pointTypeArr } = this.state; let { pointTypeArr } = this.state;
this.setState({treeDataList:[]}) this.setState({ treeDataList: [] });
this.stagePilot.positionCtl.clearDrag();//清除已有选中
if (type === 'region') { if (type === 'region') {
getAreaTreeAction().then(data => { getAreaTreeAction().then(data => {
this.generateList(data) this.generateList(data);
this.setState({ this.setState({
treeData: data || [], treeData: data || [],
pageType: 'region', pageType: 'region',
...@@ -1108,7 +1109,7 @@ class View3D extends Component { ...@@ -1108,7 +1109,7 @@ class View3D extends Component {
} }
drop = (event) => { drop = (event) => {
console.log('drop'); this.stagePilot.positionCtl.clearDrag();
event.preventDefault(); event.preventDefault();
this.setState({ isPointSave: false }); this.setState({ isPointSave: false });
let { dragItem,markers } = this.state; let { dragItem,markers } = this.state;
...@@ -1146,10 +1147,10 @@ class View3D extends Component { ...@@ -1146,10 +1147,10 @@ class View3D extends Component {
levelStr: dragItem.levelStr levelStr: dragItem.levelStr
}; };
let selectPoints = { let selectPoints = {
id: dragItem.id, id: dragItem.id,
type: dragItem.type type: dragItem.type
} };
markers[`${type}`] = markers[`${type}`].filter(e => e.id != dragItem.id ); markers[`${type}`] = markers[`${type}`].filter(e => e.id != dragItem.id );
markers[`${type}`].push(addPointParam); markers[`${type}`].push(addPointParam);
this.setState({ this.setState({
...@@ -1474,6 +1475,7 @@ class View3D extends Component { ...@@ -1474,6 +1475,7 @@ class View3D extends Component {
errorAreaId: areaId errorAreaId: areaId
}); });
} else if (type === 'out_except_model'){ } else if (type === 'out_except_model'){
this.stagePilot.positionCtl.clearDrag();
if (!isPointSave){ if (!isPointSave){
AmosAlert.confirm('提示', '有未保存数据,是否保存?', { AmosAlert.confirm('提示', '有未保存数据,是否保存?', {
callback: (flag) => { callback: (flag) => {
......
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