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
b9b7506e
Commit
b9b7506e
authored
Jun 05, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改
parent
16ff3558
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
147 deletions
+78
-147
PointsPool.js
mods/components/3dviewConvertor/view/PointsPool.js
+0
-10
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+38
-41
RightEditPointPanel.js
...Convertor/view/moduleEditComponent/RightEditPointPanel.js
+39
-95
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+1
-1
No files found.
mods/components/3dviewConvertor/view/PointsPool.js
View file @
b9b7506e
...
...
@@ -59,16 +59,6 @@ class PointsPool extends Component {
onMarkersCreated
=
(
type
,
{
markersCache
})
=>
{
this
.
markerList
[
type
]
=
markersCache
;
let
stagePilot
=
this
.
props
.
stagePilot
;
debugger
;
// if(markersCache&&stagePilot) {
// // console.log(this.markerList)
// console.log(markersCache)
// // console.log(this.props)
// markersCache.eachValue(item => {
// item.node._userData = { ...item.extData };
// stagePilot.positionCtl.objects.push(item.node); })
// }
(
markersCache
||
[]).
forEach
(
mc
=>
{
const
extData
=
mc
.
getExtData
();
if
(
extData
.
hasOwnProperty
(
'visible'
)){
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
b9b7506e
...
...
@@ -780,18 +780,22 @@ class View3D extends Component {
}
//选中点变化
selectPointChange
=
(
selectPoints
)
=>
{
if
(
selectPoints
.
isRegion
){
this
.
setState
({
selectArea
:
selectPoints
})
}
else
{
this
.
dragItemChange
(
selectPoints
)
const
{
markers
,
pointType
}
=
this
.
state
;
if
(
selectPoints
.
isRegion
){
this
.
setState
({
selectArea
:
selectPoints
});
}
else
{
this
.
dragItemChange
(
selectPoints
);
markers
[
pointType
].
map
(
e
=>
{
if
(
e
.
id
===
selectPoints
.
id
){
selectPoints
.
position
=
e
.
position
;
}
});
this
.
setState
({
selectArea
:
''
,
selectArea
:
''
,
selectPoints
,
showRightPanel
:
true
,
selectPoints
showRightPanel
:
true
});
}
}
getAreas
=
(
treeData
)
=>
{
...
...
@@ -1259,29 +1263,22 @@ class View3D extends Component {
});
};
/**
* 更新 markers data
* 批量更新
* @params {Object} markersData {markerType<String>: markers<Array>}
*/
changeMarkersData
=
markersData
=>
{
if
(
!
utils
.
isEmpty
(
markersData
))
{
const
{
markers
}
=
this
.
state
;
const
newMarkers
=
Object
.
assign
({},
markers
,
markersData
);
this
.
setState
({
markers
:
newMarkers
changeMarkersData
=
(
position
,
type
,
id
)
=>
{
const
me
=
this
;
const
{
markers
,
selectPoints
}
=
me
.
state
;
const
index
=
markers
[
type
].
findIndex
(
e
=>
e
.
id
===
id
);
if
(
index
>=
0
){
markers
[
type
][
index
].
position
=
position
;
markers
[
type
][
index
].
isEdit
=
true
;
selectPoints
.
position
=
position
;
me
.
setState
({
markers
,
selectPoints
});
}
};
createInfowindow
=
text
=>
{
const
div
=
document
.
createElement
(
'div'
);
div
.
style
.
position
=
'absolute'
;
div
.
className
=
'three-ui-infowindow'
;
div
.
innerText
=
text
;
return
div
;
};
afterRender
=
()
=>
{
// this.infoHelper && this.infoHelper.update();
};
...
...
@@ -1546,19 +1543,19 @@ class View3D extends Component {
const
{
markers
}
=
me
.
state
;
const
isInside
=
me
.
polygonRegion
&&
extData
.
parentId
&&
me
.
polygonRegion
[
extData
.
parentId
].
pointInPolygon
([
position
.
x
,
position
.
y
,
position
.
z
]);
// if (isInside){
markers
[
extData
.
type
].
forEach
(
e
=>
{
if
(
e
.
id
===
extData
.
id
){
e
.
position
=
position
;
e
.
isEdit
=
true
;
}
});
extData
.
position
=
position
;
this
.
setState
({
markers
,
positionxyz
:
position
,
showRightPanel
:
true
,
selectPoints
:
extData
});
markers
[
extData
.
type
].
forEach
(
e
=>
{
if
(
e
.
id
===
extData
.
id
){
e
.
position
=
position
;
e
.
isEdit
=
true
;
}
});
extData
.
position
=
position
;
this
.
setState
({
markers
,
positionxyz
:
position
,
showRightPanel
:
true
,
selectPoints
:
extData
});
// } else {
// message.error('不能放置非所在区域');
// }
...
...
@@ -1670,7 +1667,7 @@ class View3D extends Component {
>
{
startAsyncLoad
&&
<
WorkerObjContent
objs
=
{
asyncModels
}
onWorkerMessage
=
{
this
.
onWorkerLoading
}
enableLoading
afterInit
=
{
this
.
onAfterWorkerInit
}
/>
}
{
isEditMode
&&
pageType
===
'region'
?
''
:
<
PointsPool
markers
=
{
markers
}
isEditMode
=
{
isEditMode
}
selectPoints
=
{
selectPoints
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
positionCtl
=
{
this
.
positionCtl
}
addMarker
=
{
this
.
addMarker
}
/>
}
<
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
}
/>
}
{
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
()}
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditPointPanel.js
View file @
b9b7506e
This diff is collapsed.
Click to expand it.
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
b9b7506e
...
...
@@ -134,7 +134,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
}
}
markerCreated
=
({
markersCache
})
=>
{
let
{
isEditMode
,
selectKey
}
=
this
.
props
let
{
isEditMode
,
selectKey
}
=
this
.
props
;
this
.
markersCache
=
markersCache
;
this
.
stagePilot
=
this
.
props
.
stagePilot
;
this
.
outlineHelper
=
this
.
stagePilot
?
this
.
stagePilot
.
outlineHelper
:
undefined
;
...
...
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