Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-station-module-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
amos-station-module-view
Commits
7081002e
Commit
7081002e
authored
Jun 04, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改
parent
8ec1bf36
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
37 deletions
+62
-37
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+1
-1
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+53
-32
conf.js
mods/components/3dviewConvertor/view/conf.js
+4
-0
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+4
-4
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
7081002e
...
...
@@ -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'
};
mods/components/3dviewConvertor/view/View3D.js
View file @
7081002e
...
...
@@ -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
:
''
});
}
}
...
...
mods/components/3dviewConvertor/view/conf.js
View file @
7081002e
...
...
@@ -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
]
}
};
...
...
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
7081002e
...
...
@@ -197,17 +197,17 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
planeOptions
:
{
width
:
3
0
,
height
:
15
,
width
:
4
0
,
height
:
20
,
position
:
[
0
,
20
,
0
],
doubleSide
:
true
},
canvasOptions
:
{
font
:
'
34
px Microsoft YaHei'
,
font
:
'
28
px Microsoft YaHei'
,
fillStyle
:
'white'
,
textBaseline
:
'middle'
,
textAlign
:
'center'
,
textX
:
128
,
textX
:
128
},
imgWidth
:
256
,
imgHeight
:
128
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment