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
637ce8a7
Commit
637ce8a7
authored
Jun 12, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/station/amos-station-module-view
into developer
parents
912cf982
e42dd624
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
59 deletions
+65
-59
amos.config.js
amos.config.js
+2
-2
PointsPool.js
mods/components/3dviewConvertor/view/PointsPool.js
+1
-1
PromptModal.js
mods/components/3dviewConvertor/view/PromptModal.js
+2
-2
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+43
-22
PointLeftTree.js
...3dviewConvertor/view/moduleEditComponent/PointLeftTree.js
+6
-23
SafetyIndexWeek.js
...ewConvertor/view/panoramic/statistical/SafetyIndexWeek.js
+9
-9
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+2
-0
No files found.
amos.config.js
View file @
637ce8a7
...
...
@@ -11,9 +11,9 @@
objModelURI
:
'/a3dres'
,
// 根url
// baseURI: 'http://172.16.11.30:9008/',
baseURI
:
'http://172.16.3.
122
:8083/'
,
baseURI
:
'http://172.16.3.
77
:8083/'
,
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI
:
'http://172.16.3.
122
:8083/'
,
convertorURI
:
'http://172.16.3.
77
:8083/'
,
patrolURI
:
'http://172.16.3.77:9000/'
,
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
// plugin URI
...
...
mods/components/3dviewConvertor/view/PointsPool.js
View file @
637ce8a7
...
...
@@ -57,7 +57,6 @@ class PointsPool extends Component {
}
onMarkersCreated
=
(
type
,
{
markersCache
})
=>
{
this
.
markerList
[
type
]
=
markersCache
;
(
markersCache
||
[]).
forEach
(
mc
=>
{
const
extData
=
mc
.
getExtData
();
...
...
@@ -106,6 +105,7 @@ class PointsPool extends Component {
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
showRightPanelOnclick
=
{(
d
)
=>
this
.
props
.
showRightPanelOnclick
(
d
)}
/
>
{
/* <PatrolPoint
{...rest}
...
...
mods/components/3dviewConvertor/view/PromptModal.js
View file @
637ce8a7
...
...
@@ -22,9 +22,9 @@ class PromptModal extends Component {
this
.
props
.
saveAreaData
();
}
else
{
if
(
isback
){
this
.
props
.
savePointData
();
this
.
props
.
savePointData
Back
();
}
else
if
(
isSwitch
)
{
this
.
props
.
savePointData
(
);
this
.
props
.
savePointData
Switch
(
pointType
);
}
else
{
this
.
props
.
savePointAndRefreshMarker
(
pointType
,
pointParams
);
}
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
637ce8a7
...
...
@@ -283,7 +283,7 @@ class View3D extends Component {
_bindPubSubEvents
=
()
=>
{
this
.
props
.
subscribe
(
eventTopics
.
base3d_view
,
(
topic
,
data
)
=>
{
console
.
log
(
'subscribe base3d_view'
+
data
);
console
.
log
(
`subscribe base3d_view
${
data
}
`
);
if
(
isControllerEvent
(
topic
))
{
executeView3dCMD
(
this
,
topic
,
data
);
}
else
if
(
isManualOperate
(
topic
))
{
...
...
@@ -924,7 +924,14 @@ class View3D extends Component {
message
.
error
(
'保存失败!'
);
});
}
savePointDataBack
=
async
()
=>
{
await
this
.
savePointData
();
this
.
handleOutExceptModel
();
}
savePointDataSwitch
=
async
(
pointType
)
=>
{
await
this
.
savePointData
();
this
.
pointTypeChangeIsok
(
pointType
);
}
//保存点绑定
savePointData
=
()
=>
{
let
{
markers
,
pointType
}
=
this
.
state
;
...
...
@@ -1050,10 +1057,10 @@ class View3D extends Component {
riskSourceId
:
selectArea
.
id
,
routePath
:
''
});
var
tree
=
new
Object
();
tree
.
children
=
treeData
;
this
.
removeTreeDataRoutePathByChildId
(
selectArea
.
id
,
tree
);
this
.
getAreas
(
tree
.
children
);
//
var tree = new Object();
//
tree.children = treeData;
//
this.removeTreeDataRoutePathByChildId(selectArea.id,tree);
//
this.getAreas(tree.children);
this
.
setState
({
routePathData
:
this
.
state
.
routePathData
,
//treeData: tree.children,
...
...
@@ -1152,11 +1159,7 @@ class View3D extends Component {
this
.
enableCamera
();
}
}
pointTypeChange
=
(
pointType
)
=>
{
let
{
isPointSave
}
=
this
.
state
;
if
(
isPointSave
){
this
.
showConfirm
();
}
pointTypeChangeIsok
=
(
pointType
)
=>
{
this
.
stagePilot
.
positionCtl
.
clearDrag
();
this
.
setState
({
pointType
,
...
...
@@ -1175,7 +1178,16 @@ class View3D extends Component {
});
});
}
showConfirm
=
()
=>
{
pointTypeChange
=
(
pointType
)
=>
{
let
{
isPointSave
}
=
this
.
state
;
if
(
isPointSave
){
this
.
showConfirm
(
pointType
);
}
else
{
this
.
pointTypeChangeIsok
(
pointType
);
}
}
showConfirm
=
(
pointType
)
=>
{
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
...
...
@@ -1183,8 +1195,8 @@ class View3D extends Component {
type
:
'point'
,
btnType
:
'isOk'
,
isback
:
false
,
isSwitch
:
true
isSwitch
:
true
,
pointType
}
});
...
...
@@ -1528,7 +1540,7 @@ class View3D extends Component {
}
initExceptionAreasData
=
()
=>
{
this
.
setState
({
startLoadExceptionArea
:
false
,
exceptionAreas
:
[]
},()
=>
{
this
.
setState
({
startLoadExceptionArea
:
true
},()
=>
{
this
.
getExceptionAreasList
();
});
}
...
...
@@ -1545,6 +1557,7 @@ class View3D extends Component {
});
}
handleOutExceptModel
=
()
=>
{
this
.
clearMarkers
();
this
.
executeOperate
({
key
:
'fitview'
});
//恢复正常视角
this
.
props
.
editModelChange
(
false
);
//显示全景统计
this
.
enableCamera
();
//恢复相机
...
...
@@ -1562,7 +1575,7 @@ class View3D extends Component {
selectPoints
:
''
,
showRightPanel
:
false
});
this
.
clearMarkers
();
}
handleExceptModel
=
(
type
,
areaId
)
=>
{
let
{
isPointSave
,
isAreaSave
}
=
this
.
state
;
...
...
@@ -1642,16 +1655,22 @@ class View3D extends Component {
multLoadWorkerObjContent
=
(
asyncModels
)
=>
{
const
sliceArry
=
chunk
(
asyncModels
,
5
);
//每5个一组
return
sliceArry
.
map
(
objs
=>
{
return
<
WorkerObjContent
return
(
<
WorkerObjContent
onComplete
=
{
this
.
onComplete
}
objs
=
{
objs
}
onWorkerMessage
=
{
this
.
onWorkerLoading
}
enableLoading
afterInit
=
{
this
.
onAfterWorkerInit
}
/>
;
/>
)
;
});
}
showRightPanelOnclick
=
({
extData
,
position
})
=>
{
this
.
setState
({
positionxyz
:
position
,
showRightPanel
:
true
,
selectPoints
:
extData
});
}
addMarker
=
({
extData
,
position
})
=>
{
const
me
=
this
;
const
{
markers
}
=
me
.
state
;
...
...
@@ -1702,6 +1721,7 @@ class View3D extends Component {
rightHeight
,
treeDataList
,
promptData
,
pointType
,
isOutterView
}
=
this
.
state
;
const
{
dimension
,
hiddenScreenSaver
,
editModelChange
}
=
this
.
props
;
...
...
@@ -1746,7 +1766,8 @@ class View3D extends Component {
saveAreaData
=
{
this
.
saveAreaData
}
handleOutExceptModel
=
{
this
.
handleOutExceptModel
}
savePointAndRefreshMarker
=
{(
pointType
,
pointParams
)
=>
this
.
savePointAndRefreshMarker
(
pointType
,
pointParams
)}
savePointData
=
{
this
.
savePointData
}
savePointDataBack
=
{
this
.
savePointDataBack
}
savePointDataSwitch
=
{
this
.
savePointDataSwitch
}
closePromptModal
=
{
this
.
closePromptModal
}
/
>
...
...
@@ -1796,7 +1817,7 @@ class View3D extends Component {
>
{
startAsyncLoad
&&
this
.
multLoadWorkerObjContent
(
asyncModels
)}
{
isEditMode
&&
pageType
===
'region'
?
''
:
isOutterView
&&
<
PointsPool
markers
=
{
markers
}
isEditMode
=
{
isEditMode
}
selectPoints
=
{
selectPoints
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
positionCtl
=
{
this
.
positionCtl
}
addMarker
=
{
this
.
addMarker
}
ref
=
{
node
=>
this
.
pointsPool
=
node
}
/>
}
isOutterView
&&
<
PointsPool
showRightPanelOnclick
=
{
this
.
showRightPanelOnclick
}
markers
=
{
markers
}
isEditMode
=
{
isEditMode
}
selectPoints
=
{
selectPoints
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
positionCtl
=
{
this
.
positionCtl
}
addMarker
=
{
this
.
addMarker
}
ref
=
{
node
=>
this
.
pointsPool
=
node
}
/>
}
{
fireTruckRoute
&&
<
FatLine
{...
lineData
.
fatLineConf
}
linePath
=
{
JSON
.
parse
(
fireTruckRoute
)}
visible
=
{
showFireTruckRoute
}
/>
}
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
{
isEditMode
&&
this
.
renderAreas
()}
...
...
@@ -1828,7 +1849,7 @@ class View3D extends Component {
// stopDrowing={this.stopDrowing}
pageType
=
{
pageType
}
treeDataList
=
{
treeDataList
}
//
pointType={pointType}
pointType
=
{
pointType
}
markers
=
{
markers
}
pointTypeArr
=
{
pointTypeArr
}
pointTypeChange
=
{
this
.
pointTypeChange
}
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/PointLeftTree.js
View file @
637ce8a7
...
...
@@ -42,32 +42,13 @@ class PointLeftTree extends Component {
}
componentWillMount
()
{
const
{
treeData
,
pointTypeArr
,
treeDataList
}
=
this
.
props
;
this
.
setState
({
treeData
,
treeDataList
,
pointTypeArr
,
pointType
:
pointTypeArr
[
0
]
?
pointTypeArr
[
0
].
code
:
''
});
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
nextProps
);
let
{
treeData
,
treeDataList
}
=
nextProps
;
this
.
setState
({
treeData
,
treeDataList
});
}
onSelectChange
=
(
value
,
item
)
=>
{
console
.
log
(
value
,
item
);
this
.
setState
({
pointType
:
value
,
searchValue
:
''
});
this
.
setState
({
searchValue
:
''
});
this
.
props
.
pointTypeChange
(
value
);
}
onSearchChange
=
(
e
,
v
)
=>
{
const
{
treeDataList
,
treeData
}
=
this
.
state
;
const
{
treeDataList
,
treeData
}
=
this
.
props
;
let
value
=
v
?
v
:
''
;
const
expandedKeys
=
treeDataList
.
map
(
item
=>
{
...
...
@@ -100,7 +81,8 @@ class PointLeftTree extends Component {
}
// eslint-disable-next-line react/sort-comp
renderTreeNodes
=
(
data
)
=>
{
const
{
searchValue
,
pointType
}
=
this
.
state
;
const
{
searchValue
}
=
this
.
state
;
const
{
pointType
=
''
}
=
this
.
props
;
if
(
data
.
length
>
0
)
{
return
data
.
map
((
item
)
=>
{
const
index
=
item
.
name
.
indexOf
(
searchValue
);
...
...
@@ -180,7 +162,8 @@ class PointLeftTree extends Component {
}
render
()
{
let
{
treeData
,
pointTypeArr
,
pointType
,
searchValue
}
=
this
.
state
;
const
{
searchValue
}
=
this
.
state
;
const
{
treeData
,
pointTypeArr
,
pointType
=
''
}
=
this
.
props
;
return
(
<
div
className
=
"leftTree"
>
<
div
className
=
'leftContainer'
>
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/SafetyIndexWeek.js
View file @
637ce8a7
...
...
@@ -139,15 +139,15 @@ class SafetyIndexWeek extends Component {
type
:
'line'
,
symbol
:
'circle'
,
//折线点设置为实心点
smooth
:
0.6
,
//
itemStyle: {
//
normal: {
// color: '#FF7400
', //折线点的颜色
//
lineStyle: {
//
width: 3, //折线宽度
//
color: '#DDBF28' //折线颜色
//
}
//
}
//
},
itemStyle
:
{
normal
:
{
color
:
'rgba(255, 0, 0, 0.3)
'
,
//折线点的颜色
//
lineStyle: {
//
width: 3, //折线宽度
//
color: '#DDBF28' //折线颜色
//
}
}
},
lineStyle
:
{
normal
:
{
color
:
{
type
:
'linear'
,
...
...
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
637ce8a7
...
...
@@ -92,8 +92,10 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
};
onMarkerClick
=
(
marker
,
e
)
=>
{
const
{
isClick
}
=
this
.
state
;
if
(
this
.
props
.
isEditMode
)
{
this
.
props
.
showRightPanelOnclick
(
marker
);
return
false
;
}
tirggerPlanTopic
(
CONSTS
.
plan_detail
,
{
type
:
marker
.
extData
.
type
,
data
:
marker
.
extData
});
...
...
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