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
7122aeb3
Commit
7122aeb3
authored
Jun 18, 2020
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
144c5ccd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
7 deletions
+46
-7
amos.config.js
amos.config.js
+3
-3
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+24
-0
dataProcessor.js
mods/components/3dviewConvertor/view/dataProcessor.js
+14
-4
index.js
mods/components/3dviewConvertor/view/searchPane/index.js
+5
-0
No files found.
amos.config.js
View file @
7122aeb3
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
objModelURI
:
'/a3dres'
,
objModelURI
:
'/a3dres'
,
// 根url
// 根url
// baseURI: 'http://172.16.11.30:9008/',
// baseURI: 'http://172.16.11.30:9008/',
baseURI
:
'http://172.16.3.
122
:8083/'
,
baseURI
:
'http://172.16.3.
63
:8083/'
,
// convertorURI: 'http://172.16.3.122:8083/',
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI
:
'http://172.16.3.
122
:8083/'
,
convertorURI
:
'http://172.16.3.
63
:8083/'
,
patrolURI
:
'http://172.16.3.
122
:9000/'
,
patrolURI
:
'http://172.16.3.
63
:9000/'
,
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
// plugin URI
// plugin URI
pluginURI
:
'http://172.16.11.40:8099/'
,
pluginURI
:
'http://172.16.11.40:8099/'
,
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
7122aeb3
...
@@ -257,12 +257,14 @@ class View3D extends Component {
...
@@ -257,12 +257,14 @@ class View3D extends Component {
}
}
_registerEvents
=
()
=>
{
_registerEvents
=
()
=>
{
this
.
r3d
.
on
(
'dbclick'
,
evt
=>
{
this
.
r3d
.
on
(
'dbclick'
,
evt
=>
{
if
(
evt
.
button
!==
0
)
{
if
(
evt
.
button
!==
0
)
{
return
;
return
;
}
}
const
object
=
evt
.
object
;
const
object
=
evt
.
object
;
if
(
object
)
{
if
(
object
)
{
alert
(
1
)
this
.
cameraFactory
.
flyTo
({
this
.
cameraFactory
.
flyTo
({
position
:
object
.
position
.
toArray
(),
position
:
object
.
position
.
toArray
(),
duration
:
6000
duration
:
6000
...
@@ -287,6 +289,7 @@ class View3D extends Component {
...
@@ -287,6 +289,7 @@ class View3D extends Component {
if
(
isControllerEvent
(
topic
))
{
if
(
isControllerEvent
(
topic
))
{
executeView3dCMD
(
this
,
topic
,
data
);
executeView3dCMD
(
this
,
topic
,
data
);
}
else
if
(
isManualOperate
(
topic
))
{
}
else
if
(
isManualOperate
(
topic
))
{
parseManual
(
this
,
topic
,
data
);
parseManual
(
this
,
topic
,
data
);
}
else
if
(
topic
===
eventTopics
.
show_fire_equip
)
{
}
else
if
(
topic
===
eventTopics
.
show_fire_equip
)
{
this
.
asyncLoadMarkerData
(
'fireResource'
);
this
.
asyncLoadMarkerData
(
'fireResource'
);
...
@@ -1534,6 +1537,26 @@ class View3D extends Component {
...
@@ -1534,6 +1537,26 @@ class View3D extends Component {
this
.
getExceptionAreasList
();
this
.
getExceptionAreasList
();
});
});
}
}
selectonRectCreated
=
(
polygonRegion
)
=>
{
polygonRegion
.
visible
=
true
;
}
selectPolygonRegion
=
(
exceptionAreas
,
id
)
=>
{
const
regionConf
=
{
regionColor
:
'#76d015'
,
// 区域颜色
lineColor
:
'#ffffff'
,
// 边框颜色
regionOpacity
:
1
// 不透明度 (默认是 0.5 半透明)
};
if
(
id
&&
exceptionAreas
){
return
exceptionAreas
.
map
((
area
,
index
)
=>
{
if
(
area
.
id
===
id
){
const
{
routePath
:
points
=
[]
}
=
area
.
routePath
;
return
points
.
length
>
0
&&
<
PolygonRegion
key
=
{
area
.
id
}
{...
regionConf
}
points
=
{
points
}
onCreated
=
{
e
=>
this
.
selectonRectCreated
(
e
)}
/>
;
}
});
}
}
renderPolygonRegion
=
(
exceptionAreas
)
=>
{
renderPolygonRegion
=
(
exceptionAreas
)
=>
{
const
regionConf
=
{
const
regionConf
=
{
...
@@ -1819,6 +1842,7 @@ class View3D extends Component {
...
@@ -1819,6 +1842,7 @@ class View3D extends Component {
<
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
}
/
>
{
isEditMode
&&
this
.
renderAreas
()}
{
isEditMode
&&
this
.
renderAreas
()}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
errorAreaId
&&
this
.
selectPolygonRegion
(
exceptionAreas
,
errorAreaId
)}
{
isOutterView
&&
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
focusObject
=
{
this
.
focusObject
}
/>
}
{
isOutterView
&&
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
focusObject
=
{
this
.
focusObject
}
/>
}
<
/A3DDesigner
>
<
/A3DDesigner
>
<
/div
>
<
/div
>
...
...
mods/components/3dviewConvertor/view/dataProcessor.js
View file @
7122aeb3
...
@@ -69,6 +69,16 @@ export const isPoint = (type) => {
...
@@ -69,6 +69,16 @@ export const isPoint = (type) => {
export
const
parseSearchMenuMarkers
=
(
instance
,
content
)
=>
{
export
const
parseSearchMenuMarkers
=
(
instance
,
content
)
=>
{
if
(
content
)
{
if
(
content
)
{
const
{
markers
}
=
instance
.
state
;
const
{
markers
}
=
instance
.
state
;
instance
.
setState
({
markers
:
{
'riskSource'
:
[],
'patrol'
:
[],
'impEquipment'
:
[],
'monitorEquipment'
:
[],
'video'
:
[],
'fireEquipment'
:
[],
'person'
:
[],
'pool'
:
[],
'hydrant'
:
[],
'fireChamber'
:
[],
'fireCar'
:
[],
'fire'
:
[],
'fireDetection'
:
[],
'fireFoamRoom'
:
[],
'risk'
:
[],
'data'
:
[],
'room'
:
[],
'statistics'
:
[],
'impEquipmentMode'
:
[]
}
});
// if (content.length === 0){
// instance.setState({
// markers: { 'riskSource': [],'patrol': [],'impEquipment': [],'monitorEquipment': [],'video': [],'fireEquipment': [],'person': [],'pool': [],'hydrant': [],'fireChamber': [],'fireCar': [],'fire': [],'fireDetection': [],'fireFoamRoom': [],'risk': [],'data': [],'room': [],'statistics': [],'impEquipmentMode': [] }
// });
// return ;
// }
console
.
log
(
JSON
.
stringify
(
markers
));
content
.
map
(
(
item
)
=>
{
content
.
map
(
(
item
)
=>
{
const
{
type
}
=
item
;
const
{
type
}
=
item
;
const
markersArr
=
markers
[
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)]
||
[];
const
markersArr
=
markers
[
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)]
||
[];
...
@@ -91,8 +101,8 @@ export const parseSearchMenuMarkers = (instance, content) => {
...
@@ -91,8 +101,8 @@ export const parseSearchMenuMarkers = (instance, content) => {
markers
markers
});
});
}
else
{
}
else
{
markersArr
.
push
(
item
);
//
markersArr.push(item);
markers
[
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)]
=
markersArr
;
markers
[
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)]
=
[...
item
]
;
instance
.
setState
({
instance
.
setState
({
markers
markers
});
});
...
@@ -135,7 +145,7 @@ export const parseBubbleMarkers = (instance, content) => {
...
@@ -135,7 +145,7 @@ export const parseBubbleMarkers = (instance, content) => {
level
=
bizobj
.
riskLevel
;
level
=
bizobj
.
riskLevel
;
}
}
if
(
'risk'
===
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)){
if
(
'risk'
===
type
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)){
level
=
bizobj
.
nodeState
;
level
=
bizobj
.
nodeState
;
}
}
needUpdate
=
true
;
needUpdate
=
true
;
...
@@ -144,7 +154,7 @@ export const parseBubbleMarkers = (instance, content) => {
...
@@ -144,7 +154,7 @@ export const parseBubbleMarkers = (instance, content) => {
showInfo
,
showInfo
,
twinkle
,
twinkle
,
title
:
titleContent
,
title
:
titleContent
,
level
:
level
level
};
};
}
}
return
ma
;
return
ma
;
...
...
mods/components/3dviewConvertor/view/searchPane/index.js
View file @
7122aeb3
...
@@ -264,6 +264,11 @@ class SearchPane extends Component {
...
@@ -264,6 +264,11 @@ class SearchPane extends Component {
}
}
closeModal
(){
closeModal
(){
let
args
=
{
target
:
[],
operateType
:
operateTypes
.
POINT_SEARCH
};
update3DViewData
(
args
);
this
.
props
.
changeSearchPaneVisible
();
this
.
props
.
changeSearchPaneVisible
();
this
.
setState
({
activeKey
:
'search'
},()
=>
this
.
paramsOnChange
([]));
this
.
setState
({
activeKey
:
'search'
},()
=>
this
.
paramsOnChange
([]));
...
...
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