Commit 7081002e authored by suhuiguang's avatar suhuiguang

1.修改

parent 8ec1bf36
......@@ -245,5 +245,5 @@ export const safetyIndexIconMapper = {
};
export const markerTitleBgMapper = {
base: require('../assets/convertor/3dview/markers/markerTitle.png')
base: '/mods/components/3dviewConvertor/assets/convertor/3dview/markers/markerTitle.png'
};
......@@ -284,8 +284,8 @@ class View3D extends Component {
let fireEquipmentPosition = data.contingencyRo.fireEquipmentPosition.split(',');
this.setState({ fireEquipmentPosition });
}
assembleTroubleView(this, data, this.state.markers);
this.handleExceptModel('out_except_model');
assembleTroubleView(this, data, this.state.markers);
break;
case 'base3d.fromws.mapArea_action1-2': //镜头切换(旋转+推进)
changeGoodView(this, data);
......@@ -930,9 +930,9 @@ class View3D extends Component {
fireDetection:[]
}
for (let i = 0; i < data.length;i++){
newMarkers[data[i].type].push(data[i])
newMarkers[data[i].type].push(data[i]);
}
this.setState({markers:newMarkers})
this.setState( {markers: newMarkers });
})
this.setState({
......@@ -988,6 +988,7 @@ class View3D extends Component {
showRightPanel: false
});
});
this.disabledCamera();
} else {
getPointTreeAction(pointTypeArr[0].code || '').then(data => {
this.setState({
......@@ -997,16 +998,17 @@ class View3D extends Component {
showRightPanel: false
});
});
this.enableCamera();
}
}
pointTypeChange = (pointType) => {
let {isPointSave} =this.state
if(!isPointSave){
this.showConfirm()
let { isPointSave } = this.state;
if (!isPointSave){
this.showConfirm();
}
this.setState({
pointType,
treeData:[]
treeData: []
});
getPointTreeAction(pointType).then(data => {
this.setState({
......@@ -1277,6 +1279,7 @@ class View3D extends Component {
onActionItemClick = (actionType, label, showLabel) => {
const { pageType } = this.state;
this.clearMarkers();
this.props.editModelChange(false);
this.setState({
......@@ -1297,6 +1300,10 @@ class View3D extends Component {
} else if (actionType === 'editMode'){
this.editButtonClick();
this.props.editModelChange(true);
if (pageType === 'region'){
this.disabledCamera();
}
this.setState({
isShowActionBar: false, //隐藏工具栏
startLoadExceptionArea: false,//隐藏marker
......@@ -1325,6 +1332,18 @@ class View3D extends Component {
}
disabledCamera =()=>{
this.stagePilot.cameraFactory.orbitControl.maxPolarAngle = 0;//不能旋转
this.stagePilot.cameraFactory.orbitControl.minPolarAngle = 0;//不能旋转
this.cameraFactory.fitView(desigerHelperConfig.verticalCameraEffect);//视角调整为平面视角
}
enableCamera =()=>{
this.stagePilot.cameraFactory.orbitControl.maxPolarAngle = desigerConf.cameraOptions.builtInOrbit.maxPolarAngle;//恢复正常视角
this.stagePilot.cameraFactory.orbitControl.minPolarAngle = desigerConf.cameraOptions.builtInOrbit.minPolarAngle;//恢复正常视角
this.executeOperate({ key: 'fitview' });//初始视角
}
onRectCreated = (polygonRegion,area,index) => {
polygonRegion.visible = false;
const { regionHeigth = 10 } = area.routePath;
......@@ -1370,7 +1389,7 @@ class View3D extends Component {
}
handleExceptModel =(type,areaId)=>{
let {isPointSave}=this.state
let { isPointSave } = this.state;
this.clearMarkers();
if (type === 'into_except_model'){//进入耳朵模式
this.props.editModelChange(true);//隐藏全景统计
......@@ -1382,26 +1401,27 @@ class View3D extends Component {
errorAreaId: areaId
});
} else if (type === 'out_except_model'){
if(!isPointSave){
if (!isPointSave){
AmosAlert.confirm('提示', '有未保存数据,是否保存?', {
callback: (flag) => {
if(flag){
this.savePointData()
this.props.editModelChange(false);//显示全景统计
this.setState({
treeData:[],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
headerName: '', //设置头名称
editFlag: false, //推出编辑模式
errorAreaId: ''
});
if (flag){
this.savePointData();
this.executeOperate({ key: 'fitview' });//恢复正常视角
this.props.editModelChange(false);//显示全景统计
this.setState({
treeData: [],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
headerName: '', //设置头名称
editFlag: false, //推出编辑模式
errorAreaId: ''
});
} else {
this.props.editModelChange(false);//显示全景统计
this.setState({
isPointSave:true,
treeData:[],
isPointSave: true,
treeData: [],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
......@@ -1412,17 +1432,18 @@ class View3D extends Component {
}
}
});
}else{
} else {
this.props.editModelChange(false);//显示全景统计
this.enableCamera();//恢复相机
this.setState({
treeData:[],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
headerName: '', //设置头名称
editFlag: false, //推出编辑模式
errorAreaId: ''
});
treeData: [],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
headerName: '', //设置头名称
editFlag: false, //推出编辑模式
errorAreaId: ''
});
}
}
......
......@@ -362,6 +362,10 @@ export const desigerHelperConfig = {
},
objAnchor: {
position: [0, 5, 0]
},
verticalCameraEffect: {
position: [2.3815615940156256, 419.57425506421896, 11.965199740306224],
target: [2.408441971875859, 1.3271790975878637, 3.918674823963386]
}
};
......
......@@ -197,17 +197,17 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
obj.baseObjHelper.titleConfig = {
// 顶牌平面参数
planeOptions: {
width: 30,
height: 15,
width: 40,
height: 20,
position: [0,20,0],
doubleSide: true
},
canvasOptions: {
font: '34px Microsoft YaHei',
font: '28px Microsoft YaHei',
fillStyle: 'white',
textBaseline: 'middle',
textAlign: 'center',
textX: 128,
textX: 128
},
imgWidth: 256,
imgHeight: 128,
......
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