Commit 7081002e authored by suhuiguang's avatar suhuiguang

1.修改

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