Commit 23897607 authored by suhuiguang's avatar suhuiguang

1,修改缺陷

parent b6f728ac
......@@ -247,3 +247,8 @@ export const safetyIndexIconMapper = {
export const markerTitleBgMapper = {
base: '/mods/components/3dviewConvertor/assets/convertor/3dview/markers/markerTitle.png'
};
export const equipStatusIconMapper = {
equip_false: '/mods/components/3dviewConvertor/assets/convertor/3dview/markers/pa-0.png',
equip_true: '/mods/components/3dviewConvertor/assets/convertor/3dview/markers/pa-1.png'
};
......@@ -2,11 +2,10 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { utils,UUID, deepCopy } from 'amos-tool';
import { PubSub } from 'ray-eventpool';
import { Connect as UIConnect, Modal,message,AmosAlert, Toast } from 'amos-framework';
import { Connect as UIConnect, message, AmosAlert } from 'amos-framework';
import { FatLine } from 'amos-3d/lib/advanced';
import A3DDesigner, { Connect, FireObject,DESIGNER_CONSTS,PolygonRegion } from 'amos-3d/lib/designer';
import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent';
import { transitionHelper } from 'amos-3d/lib/helpers';
import * as endConf from 'amos-processor/lib/config/endconf';
import { LensJumpFactory } from 'base-r3d/lib/factory';
import { CONSTS } from '../consts/storageConsts';
......@@ -120,9 +119,9 @@ class View3D extends Component {
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
errorAreaId: '' ,//异常区域id
positionxyz:'',
rightHeight:1,
isPointSave:true,
positionxyz: '',
rightHeight: 1,
isPointSave: true,
};
getObjFromNet(view3dFile, (objs, asyncModels) => {
......@@ -895,15 +894,20 @@ class View3D extends Component {
});
}
}
savePointListAction(paramsArr).then(data => {
getPointTreeAction(pointType).then(data => {
this.setState({
treeData: data || [],
pageType: 'point',
showRightPanel: false
});
});
})
savePointListAction(paramsArr).then(
data => {
getPointTreeAction(pointType).then(
data => {
this.setState({
treeData: data || [],
pageType: 'point',
showRightPanel: false
});
}
);
message.success('保存成功');
},error => message.error('保存失败')
);
}
......@@ -951,36 +955,29 @@ class View3D extends Component {
})
}
}
toastWarningInfo =(content)=>{
Toast.warning({
title:'警告',
content,
placement:'topMiddle',
})
}
//删除区域
deleteAreaBind = () => {
let { selectArea,treeData } = this.state;
debugger;
if (selectArea) {
getPointsByRegionIdAction(selectArea.id).then(d => {
if(d && d.length == 0){
this.state.routePathData.push({
riskSourceId: selectArea.id,
routePath: '',
})
var tree = new Object();
tree.children = treeData;
this.removeTreeDataRoutePathByChildId(selectArea.id,tree);
this.getAreas(tree.children);
this.setState({
routePathData: this.state.routePathData,
treeData: tree.children,
});
}else{
this.toastWarningInfo('请先清除点的绑定再进行删除!')
}
});
getPointsByRegionIdAction(selectArea.id).then(d => {
if (d && d.length == 0){
this.state.routePathData.push({
riskSourceId: selectArea.id,
routePath: ''
});
var tree = new Object();
tree.children = treeData;
this.removeTreeDataRoutePathByChildId(selectArea.id,tree);
this.getAreas(tree.children);
this.setState({
routePathData: this.state.routePathData,
treeData: tree.children
});
} else {
message.danger('请先清除点的绑定再进行删除!');
}
});
}
}
......@@ -1055,10 +1052,10 @@ class View3D extends Component {
showConfirm = () => {
AmosAlert.confirm('提示', '有未保存数据,是否保存?', {
callback: (flag) => {
if(flag){
this.savePointData()
if (flag){
this.savePointData();
} else {
this.setState({isPointSave:true})
this.setState({ isPointSave: true });
}
}
});
......@@ -1082,11 +1079,11 @@ class View3D extends Component {
drop = (event) => {
event.preventDefault();
this.setState({isPointSave:false})
this.setState({ isPointSave: false });
let { dragItem,markers } = this.state;
if (dragItem) {
if (dragItem.isBind) {
this.toastWarningInfo('只能放置未绑定的标记点')
message.danger('只能放置未绑定的标记点');
return false;
}
......@@ -1100,7 +1097,7 @@ class View3D extends Component {
console.log(isInside);
if (dragItem) {
if (isInside === false) {
this.toastWarningInfo('只能放置在当前区域')
message.danger('只能放置在当前区域');
return false;
}
let uid = UUID.uuidFast();
......
import React, { Component } from 'react';
import { equipStatusListAction } from './../../../services/panoramicService';
import { equipStatusIconMapper } from './../../../consts/imgStatic';
const getIcon = (status)=>{
return equipStatusIconMapper[`equip_${status}`];
};
/**
* 设备状态消息
*/
......@@ -32,7 +37,7 @@ export default class EquipStatusList extends Component {
return (
<div key={item.id} className="title-child">
<div className="title-date" >{item.changeDate}</div>
<div className="title-text" >{item.label}</div>
<div className="title-text" >{item.label}&nbsp;&nbsp;<img src={getIcon(item.status)} alt="" /></div>
</div>
);
})
......
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