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
28ba770c
Commit
28ba770c
authored
May 22, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改爆红
parent
cb004c9f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
36 deletions
+31
-36
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+31
-36
No files found.
mods/components/3dviewConvertor/view/View3D.js
View file @
28ba770c
...
@@ -37,19 +37,16 @@ import AreaLeftTree from './moduleEditComponent/AreaLeftTree';
...
@@ -37,19 +37,16 @@ import AreaLeftTree from './moduleEditComponent/AreaLeftTree';
import
PointLeftTree
from
'./moduleEditComponent/PointLeftTree'
;
import
PointLeftTree
from
'./moduleEditComponent/PointLeftTree'
;
import
RightEditPointPanel
from
'./moduleEditComponent/RightEditPointPanel'
;
import
RightEditPointPanel
from
'./moduleEditComponent/RightEditPointPanel'
;
import
RightEditRegionPanel
from
'./moduleEditComponent/RightEditRegionPanel'
;
import
RightEditRegionPanel
from
'./moduleEditComponent/RightEditRegionPanel'
;
import
{
EVENTS_CONSTS
,
dispatchMouseDown
}
from
'./../consts/EventConsts'
;
import
{
EVENTS_CONSTS
}
from
'./../consts/EventConsts'
;
import
ExceptionArea
from
'./exceptionArea/ExceptionArea'
;
import
ExceptionArea
from
'./exceptionArea/ExceptionArea'
;
import
{
exceptionRegionListAction
}
from
'./../services/panoramicService'
;
import
{
exceptionRegionListAction
}
from
'./../services/panoramicService'
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
view3dFile
=
AmosConfig
.
sysConf
.
convertor
.
view3dFile
;
const
view3dFile
=
AmosConfig
.
sysConf
.
convertor
.
view3dFile
;
let
mousewheelCount
=
AmosConfig
.
sysConf
.
convertor
.
mapLevelconfig
.
mousewheelCount
*
100
;
// const showInterval = AmosConfig.sysConf.convertor.screenSaverConf.delayTime * 1000;
const
{
resizeConnect
}
=
Connect
;
const
{
resizeConnect
}
=
Connect
;
const
eventConnect
=
UIConnect
.
eventConnect
;
const
eventConnect
=
UIConnect
.
eventConnect
;
const
{
BaseObjHelper
}
=
transitionHelper
;
const
{
FlameFire
}
=
FireObject
;
const
{
FlameFire
,
FlameFire2
,
FlameFire3
}
=
FireObject
;
const
LENS_LEVEL
=
{
const
LENS_LEVEL
=
{
ROOT
:
'root'
,
ROOT
:
'root'
,
...
@@ -104,10 +101,10 @@ class View3D extends Component {
...
@@ -104,10 +101,10 @@ class View3D extends Component {
//编辑模式
//编辑模式
drawing
:
false
,
//画线状态
drawing
:
false
,
//画线状态
selectArea
:
""
,
//选中区域
selectArea
:
""
,
//选中区域
selectPoints
:
""
,
//选中点
selectPoints
:
""
,
//选中点
treeData
:
[],
//左树
treeData
:
[],
//左树
pointTypeArr
:[],
pointTypeArr
:
[],
routePathData
:[],
//区域线位置
routePathData
:
[],
//区域线位置
pageType
:
'region'
,
//编辑类型
pageType
:
'region'
,
//编辑类型
pointType
:
''
,
//筛选框点类型
pointType
:
''
,
//筛选框点类型
editFlag
:
false
,
//编辑模式
editFlag
:
false
,
//编辑模式
...
@@ -131,12 +128,12 @@ class View3D extends Component {
...
@@ -131,12 +128,12 @@ class View3D extends Component {
this
.
drowItem
=
''
;
this
.
drowItem
=
''
;
this
.
areas
=
[];
this
.
areas
=
[];
this
.
areaStyles
=
{
this
.
areaStyles
=
{
normal
:{
normal
:
{
regionColor
:
'#02B00F'
,
// 区域颜色
regionColor
:
'#02B00F'
,
// 区域颜色
lineColor
:
'#00FF70'
,
// 边框颜色
lineColor
:
'#00FF70'
,
// 边框颜色
regionOpacity
:
0.3
regionOpacity
:
0.3
},
},
noDrop
:{
noDrop
:
{
regionColor
:
'#969696'
,
// 区域颜色
regionColor
:
'#969696'
,
// 区域颜色
lineColor
:
'#878787'
,
// 边框颜色
lineColor
:
'#878787'
,
// 边框颜色
regionOpacity
:
0.4
regionOpacity
:
0.4
...
@@ -156,6 +153,7 @@ class View3D extends Component {
...
@@ -156,6 +153,7 @@ class View3D extends Component {
this
.
_bindRulesPubSubEvents
();
this
.
_bindRulesPubSubEvents
();
this
.
getExceptionAreaList
();
this
.
getExceptionAreaList
();
}
}
genPenId
=
()
=>
{
genPenId
=
()
=>
{
return
UUID
.
timeUUID
(
'pen'
);
return
UUID
.
timeUUID
(
'pen'
);
};
};
...
@@ -323,7 +321,7 @@ class View3D extends Component {
...
@@ -323,7 +321,7 @@ class View3D extends Component {
break
;
break
;
case
'base3d.fromws.optionArea_'
:
//交互区推数据
case
'base3d.fromws.optionArea_'
:
//交互区推数据
this
.
props
.
trigger
(
eventTopics
.
optionArea_view
,
data
);
this
.
props
.
trigger
(
eventTopics
.
optionArea_view
,
data
);
this
.
setState
({
contingencyPlanId
:
data
.
contingencyPlanId
})
this
.
setState
({
contingencyPlanId
:
data
.
contingencyPlanId
})
break
;
break
;
case
eventTopics
.
map_bubble
:
case
eventTopics
.
map_bubble
:
parseBubbleMarkers
(
this
,
content
);
// 监控屏气泡
parseBubbleMarkers
(
this
,
content
);
// 监控屏气泡
...
@@ -1213,23 +1211,23 @@ class View3D extends Component {
...
@@ -1213,23 +1211,23 @@ class View3D extends Component {
onActionItemClick
=
(
actionType
,
label
,
showLabel
)
=>
{
onActionItemClick
=
(
actionType
,
label
,
showLabel
)
=>
{
this
.
clearMarkers
();
this
.
clearMarkers
();
this
.
props
.
editModelChange
(
false
)
this
.
props
.
editModelChange
(
false
)
;
this
.
setState
({
this
.
setState
({
editFlag
:
false
editFlag
:
false
})
})
;
if
(
showLabel
){
//进入各个模式名称设置
if
(
showLabel
){
//进入各个模式名称设置
this
.
setHeaderName
(
label
);
this
.
setHeaderName
(
label
);
}
}
if
(
actionType
===
"impEquipment"
){
if
(
actionType
===
'impEquipment'
){
this
.
asyncLoadImpEquipment
(
actionType
);
this
.
asyncLoadImpEquipment
(
actionType
);
this
.
props
.
editModelChange
(
true
)
this
.
props
.
editModelChange
(
true
)
;
this
.
setState
({
this
.
setState
({
editFlag
:
false
,
editFlag
:
false
,
isShowActionBar
:
false
,
//隐藏工具栏
isShowActionBar
:
false
,
//隐藏工具栏
startLoadExceptionArea
:
false
,
//隐藏marker
startLoadExceptionArea
:
false
,
//隐藏marker
sideControlShow
:
false
//隐藏耳朵
sideControlShow
:
false
//隐藏耳朵
});
});
}
else
if
(
actionType
===
"editMode"
){
}
else
if
(
actionType
===
'editMode'
){
this
.
editButtonClick
();
this
.
editButtonClick
();
this
.
props
.
editModelChange
(
true
);
this
.
props
.
editModelChange
(
true
);
this
.
setState
({
this
.
setState
({
...
@@ -1238,10 +1236,10 @@ class View3D extends Component {
...
@@ -1238,10 +1236,10 @@ class View3D extends Component {
sideControlShow
:
false
//隐藏耳朵
sideControlShow
:
false
//隐藏耳朵
});
});
}
else
{
}
else
{
this
.
props
.
editModelChange
(
false
)
this
.
props
.
editModelChange
(
false
)
;
this
.
setState
({
this
.
setState
({
editFlag
:
false
editFlag
:
false
})
})
;
}
}
}
}
...
@@ -1336,7 +1334,7 @@ class View3D extends Component {
...
@@ -1336,7 +1334,7 @@ class View3D extends Component {
planStarted
,
planStarted
,
alarmStarted
,
alarmStarted
,
fireEquipmentPosition
,
fireEquipmentPosition
,
drawing
,
pageType
,
pointType
,
pointType
Arr
,
editFlag
,
showRightPanel
,
selectPoints
,
selectArea
,
drawing
,
pageType
,
pointTypeArr
,
editFlag
,
showRightPanel
,
selectPoints
,
selectArea
,
exceptionAreas
,
exceptionMarkers
,
startLoadExceptionArea
,
exceptionAreas
,
exceptionMarkers
,
startLoadExceptionArea
,
sideControlShow
,
sideControlShow
,
isShowActionBar
,
isShowActionBar
,
...
@@ -1364,7 +1362,7 @@ class View3D extends Component {
...
@@ -1364,7 +1362,7 @@ class View3D extends Component {
};
};
const
positionCtlProps
=
{
const
positionCtlProps
=
{
prevProcessTarget
:
this
.
prevProcessTarget
prevProcessTarget
:
this
.
prevProcessTarget
}
}
;
let
firePosition
=
null
;
let
firePosition
=
null
;
if
(
fireEquipmentPosition
&&
fireEquipmentPosition
.
length
>
0
)
{
if
(
fireEquipmentPosition
&&
fireEquipmentPosition
.
length
>
0
)
{
...
@@ -1389,7 +1387,7 @@ class View3D extends Component {
...
@@ -1389,7 +1387,7 @@ class View3D extends Component {
enableModelParser
enableModelParser
disabledEdit
disabledEdit
defaultLoading
=
{
false
}
defaultLoading
=
{
false
}
ref
=
{
node
=>
(
this
.
a3dRef
=
node
)
}
ref
=
{
node
=>
this
.
a3dRef
=
node
}
baseObjs
=
{
objs
}
baseObjs
=
{
objs
}
maskContent
=
{
maskContent
=
{
<
MaskContent
<
MaskContent
...
@@ -1420,7 +1418,7 @@ class View3D extends Component {
...
@@ -1420,7 +1418,7 @@ class View3D extends Component {
positionCtlProps
=
{
positionCtlProps
}
positionCtlProps
=
{
positionCtlProps
}
>
>
{
startAsyncLoad
&&
<
WorkerObjContent
objs
=
{
asyncModels
}
onWorkerMessage
=
{
this
.
onWorkerLoading
}
enableLoading
afterInit
=
{
this
.
onAfterWorkerInit
}
/>
}
{
startAsyncLoad
&&
<
WorkerObjContent
objs
=
{
asyncModels
}
onWorkerMessage
=
{
this
.
onWorkerLoading
}
enableLoading
afterInit
=
{
this
.
onAfterWorkerInit
}
/>
}
{
editFlag
&&
pageType
==
'region'
?
''
:
<
PointsPool
markers
=
{
markers
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
/>
}
{
editFlag
&&
pageType
==
=
'region'
?
''
:
<
PointsPool
markers
=
{
markers
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
/>
}
{
fireTruckRoute
&&
<
FatLine
{...
lineData
.
fatLineConf
}
linePath
=
{
JSON
.
parse
(
fireTruckRoute
)}
visible
=
{
showFireTruckRoute
}
/>
}
{
fireTruckRoute
&&
<
FatLine
{...
lineData
.
fatLineConf
}
linePath
=
{
JSON
.
parse
(
fireTruckRoute
)}
visible
=
{
showFireTruckRoute
}
/>
}
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
{
this
.
renderAreas
()}
{
this
.
renderAreas
()}
...
@@ -1432,7 +1430,7 @@ class View3D extends Component {
...
@@ -1432,7 +1430,7 @@ class View3D extends Component {
{
editFlag
&&
{
editFlag
&&
<
div
>
<
div
>
{
{
pageType
==
'region'
?
pageType
==
=
'region'
?
<
AreaLeftTree
<
AreaLeftTree
startDrow
=
{
this
.
startDrow
}
startDrow
=
{
this
.
startDrow
}
treeData
=
{
this
.
state
.
treeData
}
treeData
=
{
this
.
state
.
treeData
}
...
@@ -1440,12 +1438,11 @@ class View3D extends Component {
...
@@ -1440,12 +1438,11 @@ class View3D extends Component {
selectItemChange
=
{
this
.
selectItemChange
}
selectItemChange
=
{
this
.
selectItemChange
}
// stopDrowing={this.stopDrowing}
// stopDrowing={this.stopDrowing}
pageType
=
{
pageType
}
pageType
=
{
pageType
}
// pointType={pointType}
pointTypeArr
=
{
pointTypeArr
}
pointTypeArr
=
{
pointTypeArr
}
pointTypeChange
=
{
this
.
pointTypeChange
}
pointTypeChange
=
{
this
.
pointTypeChange
}
dragItemChange
=
{
this
.
dragItemChange
}
dragItemChange
=
{
this
.
dragItemChange
}
deleteAreaBind
=
{
this
.
deleteAreaBind
}
deleteAreaBind
=
{
this
.
deleteAreaBind
}
/>
:
/>
:
<
PointLeftTree
<
PointLeftTree
treeData
=
{
this
.
state
.
treeData
}
treeData
=
{
this
.
state
.
treeData
}
savePointData
=
{
this
.
savePointData
}
savePointData
=
{
this
.
savePointData
}
...
@@ -1458,18 +1455,17 @@ class View3D extends Component {
...
@@ -1458,18 +1455,17 @@ class View3D extends Component {
dragItemChange
=
{
this
.
dragItemChange
}
dragItemChange
=
{
this
.
dragItemChange
}
deletePointBind
=
{
this
.
deletePointBind
}
deletePointBind
=
{
this
.
deletePointBind
}
/
>
/
>
}
}
<
div
className
=
'bottomBox'
>
<
div
className
=
'bottomBox'
>
<
span
className
=
{
`editAreaBtn
${
pageType
==
'region'
?
'selected'
:
'noSelect'
}
`
}
onClick
=
{
this
.
changeAreaPoint
.
bind
(
this
,
'region'
)}
><
/span
>
<
span
className
=
{
`editAreaBtn
${
pageType
==
=
'region'
?
'selected'
:
'noSelect'
}
`
}
onClick
=
{
this
.
changeAreaPoint
.
bind
(
this
,
'region'
)}
/
>
<
span
className
=
{
`editPointBtn
${
pageType
==
'point'
?
'selected'
:
'noSelect'
}
`
}
onClick
=
{
this
.
changeAreaPoint
.
bind
(
this
,
'point'
)}
><
/span
>
<
span
className
=
{
`editPointBtn
${
pageType
==
=
'point'
?
'selected'
:
'noSelect'
}
`
}
onClick
=
{
this
.
changeAreaPoint
.
bind
(
this
,
'point'
)}
/
>
<
/div
>
<
/div
>
<
div
className
=
'rightBox'
>
<
div
className
=
'rightBox'
>
{
{
showRightPanel
&&
pageType
==
'region'
?
<
RightEditRegionPanel
detailData
=
{
selectArea
}
/>:
'
'
showRightPanel
&&
pageType
==
=
'region'
?
<
RightEditRegionPanel
detailData
=
{
selectArea
}
/> :
'
'
}
}
{
{
showRightPanel
&&
pageType
==
'point'
?
<
RightEditPointPanel
detailData
=
{
selectPoints
}
/>:
'
'
showRightPanel
&&
pageType
==
=
'point'
?
<
RightEditPointPanel
detailData
=
{
selectPoints
}
/> :
'
'
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1479,8 +1475,7 @@ class View3D extends Component {
...
@@ -1479,8 +1475,7 @@ class View3D extends Component {
header
=
"基本模态框"
header
=
"基本模态框"
visible
=
{
this
.
state
.
simpleTipVisible
}
visible
=
{
this
.
state
.
simpleTipVisible
}
noDefaultHeader
noDefaultHeader
// onCancel={this.simpleTipCancel}
onOk
=
{
this
.
simpleTipOk
}
onOk
=
{
this
.
simpleTipOk
}
content
=
{
<
div
>
{
this
.
tipMsg
}
<
/div>
}
content
=
{
<
div
>
{
this
.
tipMsg
}
<
/div>
}
/>
/>
<
/div
>
<
/div
>
...
...
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