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
38bd48ea
Commit
38bd48ea
authored
Jun 10, 2020
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
6cafbc87
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
183 additions
and
116 deletions
+183
-116
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+1
-1
pointsDetails.scss
mods/components/3dviewConvertor/styles/pointsDetails.scss
+1
-3
fireDetector.png
...s/3dviewConvertor/threeres/marker-models/fireDetector.png
+0
-0
fireEquip.png
...ents/3dviewConvertor/threeres/marker-models/fireEquip.png
+0
-0
hydrant.png
...onents/3dviewConvertor/threeres/marker-models/hydrant.png
+0
-0
pool.png
...omponents/3dviewConvertor/threeres/marker-models/pool.png
+0
-0
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+2
-1
PointsPool.js
mods/components/3dviewConvertor/view/PointsPool.js
+16
-1
PromptModal.js
mods/components/3dviewConvertor/view/PromptModal.js
+45
-46
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+61
-20
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+15
-1
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+1
-1
index.js
mods/components/3dviewConvertor/view/searchPane/index.js
+0
-0
paramsHeader.js
...omponents/3dviewConvertor/view/searchPane/paramsHeader.js
+41
-42
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
38bd48ea
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
search
:
require
(
'../assets/convertor/3dview/datapanel/search.png'
),
search
:
require
(
'../assets/convertor/3dview/datapanel/search.png'
),
smilingFace
:
require
(
'../assets/convertor/3dview/datapanel/smilingFace.png'
),
smilingFace
:
require
(
'../assets/convertor/3dview/datapanel/smilingFace.png'
),
user
:
require
(
'../assets/convertor/3dview/datapanel/user.png'
),
user
:
require
(
'../assets/convertor/3dview/datapanel/user.png'
),
searchPane
:
require
(
'../assets/convertor/3dview/actionbars/chaxun.png'
)
,
searchPane
:
require
(
'../assets/convertor/3dview/actionbars/chaxun.png'
)
},
},
markers
:
{
markers
:
{
riskSource_0
:
require
(
'../assets/convertor/3dview/markers/risk-0.png'
),
riskSource_0
:
require
(
'../assets/convertor/3dview/markers/risk-0.png'
),
...
...
mods/components/3dviewConvertor/styles/pointsDetails.scss
View file @
38bd48ea
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
.carousel-img
{
.carousel-img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
padding
:
5px
padding
:
5px
;
}
}
.carousel-indicators
{
.carousel-indicators
{
...
@@ -138,9 +138,7 @@
...
@@ -138,9 +138,7 @@
float
:
left
;
float
:
left
;
width
:
131px
;
//9.84%;
width
:
131px
;
//9.84%;
height
:
40px
;
height
:
40px
;
//background: $biz-table-title-color;//#333;
background
:
rgba
(
25
,
86
,
147
,
1
);
background
:
rgba
(
25
,
86
,
147
,
1
);
// border-left: 1px solid $core-border-color;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
flex
:
1
;
flex
:
1
;
}
}
...
...
mods/components/3dviewConvertor/threeres/marker-models/fireDetector.png
0 → 100644
View file @
38bd48ea
1.94 KB
mods/components/3dviewConvertor/threeres/marker-models/fireEquip.png
0 → 100644
View file @
38bd48ea
1.9 KB
mods/components/3dviewConvertor/threeres/marker-models/hydrant.png
0 → 100644
View file @
38bd48ea
1.97 KB
mods/components/3dviewConvertor/threeres/marker-models/pool.png
0 → 100644
View file @
38bd48ea
2 KB
mods/components/3dviewConvertor/view/MaskContent.js
View file @
38bd48ea
...
@@ -56,7 +56,7 @@ class MaskContent extends Component {
...
@@ -56,7 +56,7 @@ class MaskContent extends Component {
this
.
setState
({
activeAction
:
type
});
this
.
setState
({
activeAction
:
type
});
}
}
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
type
,
label
,
showLabel
);
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
type
,
label
,
showLabel
);
if
(
type
===
"search"
){
if
(
type
===
'search'
){
this
.
changeSearchPaneVisible
();
this
.
changeSearchPaneVisible
();
}
}
}
}
...
@@ -69,6 +69,7 @@ class MaskContent extends Component {
...
@@ -69,6 +69,7 @@ class MaskContent extends Component {
handleExceptModel
=
(
type
)
=>
{
handleExceptModel
=
(
type
)
=>
{
this
.
initViewModel
();
this
.
initViewModel
();
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
type
);
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
type
);
this
.
props
.
focusPosition
(
this
.
toCameraPosition
(
record
.
position
));
}
}
initViewModel
=
()
=>
{
initViewModel
=
()
=>
{
...
...
mods/components/3dviewConvertor/view/PointsPool.js
View file @
38bd48ea
...
@@ -93,7 +93,7 @@ class PointsPool extends Component {
...
@@ -93,7 +93,7 @@ class PointsPool extends Component {
}
}
return
(
return
(
<
Shuttle
>
<
Shuttle
>
<
RiskPoint
<
RiskPoint
{...
rest
}
{...
rest
}
markers
=
{
markers
.
riskSource
}
markers
=
{
markers
.
riskSource
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'riskSource'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'riskSource'
,
val
)}
...
@@ -136,12 +136,18 @@ class PointsPool extends Component {
...
@@ -136,12 +136,18 @@ class PointsPool extends Component {
markers
=
{
markers
.
pool
}
markers
=
{
markers
.
pool
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'pool'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'pool'
,
val
)}
isEditMode
=
{
this
.
props
.
isEditMode
}
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
/
>
<
FireResourcePoint
<
FireResourcePoint
{...
rest
}
{...
rest
}
markers
=
{
markers
.
hydrant
}
markers
=
{
markers
.
hydrant
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'hydrant'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'hydrant'
,
val
)}
isEditMode
=
{
this
.
props
.
isEditMode
}
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
/
>
<
FireResourcePoint
<
FireResourcePoint
{...
rest
}
{...
rest
}
...
@@ -157,12 +163,18 @@ class PointsPool extends Component {
...
@@ -157,12 +163,18 @@ class PointsPool extends Component {
markers
=
{
markers
.
fireChamber
}
markers
=
{
markers
.
fireChamber
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireChamber'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireChamber'
,
val
)}
isEditMode
=
{
this
.
props
.
isEditMode
}
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
/
>
<
FireResourcePoint
<
FireResourcePoint
{...
rest
}
{...
rest
}
markers
=
{
markers
.
fireFoamRoom
}
markers
=
{
markers
.
fireFoamRoom
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireFoamRoom'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireFoamRoom'
,
val
)}
isEditMode
=
{
this
.
props
.
isEditMode
}
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
/
>
{
!
hideDetector
?
{
!
hideDetector
?
<
FireResourcePoint
<
FireResourcePoint
...
@@ -204,6 +216,9 @@ class PointsPool extends Component {
...
@@ -204,6 +216,9 @@ class PointsPool extends Component {
markers
=
{
markers
.
fireCar
}
markers
=
{
markers
.
fireCar
}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireCar'
,
val
)}
onCreated
=
{(
val
)
=>
this
.
onMarkersCreated
(
'fireCar'
,
val
)}
isEditMode
=
{
this
.
props
.
isEditMode
}
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
/
>
<
PointStatistics
<
PointStatistics
{...
rest
}
{...
rest
}
...
...
mods/components/3dviewConvertor/view/PromptModal.js
View file @
38bd48ea
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Modal
,
Button
}
from
'amos-framework'
;
import
{
Modal
}
from
'amos-framework'
;
class
PromptModal
extends
Component
{
class
PromptModal
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{};
};
}
}
cancel
=
()
=>
{
cancel
=
()
=>
{
const
{
isback
}
=
this
.
props
.
promptData
const
{
isback
}
=
this
.
props
.
promptData
;
this
.
props
.
closePromptModal
()
this
.
props
.
closePromptModal
()
;
if
(
isback
)
{
if
(
isback
)
{
this
.
props
.
handleOutExceptModel
()
this
.
props
.
handleOutExceptModel
()
;
}
}
}
}
;
saveData
=
()
=>
{
saveData
=
()
=>
{
const
{
isback
,
type
}
=
this
.
props
.
promptData
const
{
isback
,
type
}
=
this
.
props
.
promptData
;
if
(
isback
)
{
if
(
isback
)
{
this
.
props
.
handleOutExceptModel
()
this
.
props
.
handleOutExceptModel
()
;
}
}
this
.
props
.
closePromptModal
()
this
.
props
.
closePromptModal
();
if
(
type
==
'region'
)
if
(
type
===
'region'
)
{
{
this
.
props
.
saveAreaData
();
this
.
props
.
saveAreaData
()
}
else
{
}
else
{
this
.
props
.
savePointData
();
this
.
props
.
savePointData
()
}
}
};
}
render
()
{
render
()
{
const
{
promptData
}
=
this
.
props
const
{
promptData
}
=
this
.
props
;
return
(
return
(
<
Modal
<
Modal
visible
=
{
promptData
.
promptvisible
}
visible
=
{
promptData
.
promptvisible
}
className
=
{
'pormpt-modal'
}
className
=
{
'pormpt-modal'
}
content
=
{
<
div
className
=
'prompt-content'
>
content
=
{
<
div
>
{
promptData
.
promptContent
}
<
/div
>
<
div
className
=
"prompt-content"
>
{
promptData
.
btnType
==
'isOk'
?
<
div
>
{
promptData
.
promptContent
}
<
/div
>
<
div
className
=
'prompt-buttons'
>
{
promptData
.
btnType
==
'isOk'
?
(
<
span
className
=
{
'promptOk'
}
onClick
=
{
this
.
saveData
}
/
>
<
div
className
=
"prompt-buttons"
>
<
span
className
=
{
'promptNo'
}
onClick
=
{
this
.
cancel
}
/
>
<
span
className
=
{
'promptOk'
}
onClick
=
{
this
.
saveData
}
/
>
<
/div>
:
<
span
className
=
{
'promptNo'
}
onClick
=
{
this
.
cancel
}
/
>
<
div
className
=
'prompt-buttons'
>
<
/div
>
<
span
className
=
{
'promptSave'
}
onClick
=
{
this
.
saveData
}
/
>
)
:
(
<
span
className
=
{
'promptCancel'
}
onClick
=
{
this
.
cancel
}
/
>
<
div
className
=
"prompt-buttons"
>
<
/div
>
<
span
className
=
{
'promptSave'
}
onClick
=
{
this
.
saveData
}
/
>
}
<
span
className
=
{
'promptCancel'
}
onClick
=
{
this
.
cancel
}
/
>
<
/div
>
<
/div
>
}
)}
noDefaultFooter
<
/div
>
noDefaultHeader
}
destroyContent
noDefaultFooter
onCancel
=
{
this
.
cancel
}
noDefaultHeader
closable
=
{
false
}
destroyContent
/
>
onCancel
=
{
this
.
cancel
}
closable
=
{
false
}
/
>
);
);
}
}
}
}
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
38bd48ea
...
@@ -98,7 +98,8 @@ class View3D extends Component {
...
@@ -98,7 +98,8 @@ class View3D extends Component {
fireChamber
:
[],
fireChamber
:
[],
fireCar
:
[],
fireCar
:
[],
fire
:
[],
fire
:
[],
fireDetection
:
[]
fireDetection
:
[],
fireFoamRoom
:
[]
},
},
markerType
:
null
,
markerType
:
null
,
planStarted
:
false
,
planStarted
:
false
,
...
@@ -510,7 +511,7 @@ class View3D extends Component {
...
@@ -510,7 +511,7 @@ class View3D extends Component {
const
me
=
this
;
const
me
=
this
;
if
(
!
obj
.
isForceParent
)
{
if
(
!
obj
.
isForceParent
)
{
obj
.
on
(
'click'
,
evt
=>
{
obj
.
on
(
'click'
,
evt
=>
{
if
(
this
.
state
.
isEditMode
==
false
)
{
if
(
this
.
state
.
isEditMode
==
=
false
)
{
console
.
log
(
'obj click:'
,
evt
);
console
.
log
(
'obj click:'
,
evt
);
// this.focusPosition(evt.pickedPosition);
// this.focusPosition(evt.pickedPosition);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
...
@@ -575,8 +576,22 @@ class View3D extends Component {
...
@@ -575,8 +576,22 @@ class View3D extends Component {
getPointList
=
(
pointType
,
treeData
)
=>
{
getPointList
=
(
pointType
,
treeData
)
=>
{
this
.
clearMarkers
();
this
.
clearMarkers
();
if
(
treeData
){
if
(
treeData
){
let
markers
=
{};
let
markers
=
{
markers
[
pointType
]
=
[];
riskSource
:
[],
//风险点
patrol
:
[],
//巡检点
impEquipment
:
[],
//重点设备
monitorEquipment
:
[],
//探测器
video
:
[],
//摄像头
fireEquipment
:
[],
//消防设备
person
:
[],
pool
:
[],
hydrant
:
[],
fireChamber
:
[],
fireCar
:
[],
fire
:
[],
fireDetection
:
[],
fireFoamRoom
:
[]
};
this
.
getPointLoop
(
{
markers
},
pointType
,
treeData
);
this
.
getPointLoop
(
{
markers
},
pointType
,
treeData
);
this
.
setState
({
markers
});
this
.
setState
({
markers
});
}
}
...
@@ -909,20 +924,42 @@ class View3D extends Component {
...
@@ -909,20 +924,42 @@ class View3D extends Component {
//保存点绑定
//保存点绑定
savePointData
=
()
=>
{
savePointData
=
()
=>
{
let
{
markers
,
pointType
,
isPointSave
}
=
this
.
state
;
let
{
markers
,
pointType
}
=
this
.
state
;
this
.
setState
({
isPointSave
:
false
});
this
.
setState
({
isPointSave
:
false
});
let
paramsArr
=
[];
paramsArr
=
markers
[
pointType
].
filter
(
e
=>
e
.
isEdit
).
map
(
item
=>
{
if
(
pointType
===
'fireEquipment'
)
{
return
{
let
typeArr
=
[
'fireEquipment'
,
'pool'
,
'hydrant'
,
'fireChamber'
,
'fireCar'
,
'fireFoamRoom'
];
pointId
:
item
.
id
,
for
(
let
i
=
0
;
i
<
typeArr
.
length
;
i
++
){
pointType
:
item
.
type
,
let
paramsArr
=
[];
position3d
:
item
.
position
.
length
>
1
?
`
${
item
.
position
[
0
]}
,
${
item
.
position
[
1
]}
,
${
item
.
position
[
2
]}
`
:
null
if
(
markers
[
typeArr
[
i
]].
length
>
0
){
};
paramsArr
=
markers
[
typeArr
[
i
]].
filter
(
e
=>
e
.
isEdit
).
map
(
item
=>
{
});
return
{
this
.
savePointList
(
pointType
,
paramsArr
);
pointId
:
item
.
id
,
pointType
:
item
.
type
,
position3d
:
item
.
position
.
length
>
1
?
`
${
item
.
position
[
0
]}
,
${
item
.
position
[
1
]}
,
${
item
.
position
[
2
]}
`
:
null
};
});
if
(
i
===
0
){
this
.
savePointList
(
pointType
,
paramsArr
);
}
else
{
this
.
savePointList
(
pointType
,
paramsArr
,
true
);
}
}
}
}
else
{
let
paramsArr
=
[];
paramsArr
=
markers
[
pointType
].
filter
(
e
=>
e
.
isEdit
).
map
(
item
=>
{
return
{
pointId
:
item
.
id
,
pointType
:
item
.
type
,
position3d
:
item
.
position
.
length
>
1
?
`
${
item
.
position
[
0
]}
,
${
item
.
position
[
1
]}
,
${
item
.
position
[
2
]}
`
:
null
};
});
this
.
savePointList
(
pointType
,
paramsArr
);
}
}
}
savePointList
=
(
pointType
,
paramsArr
)
=>
{
savePointList
=
(
pointType
,
paramsArr
,
isfirst
=
true
)
=>
{
savePointListAction
(
paramsArr
).
then
(
savePointListAction
(
paramsArr
).
then
(
data
=>
{
data
=>
{
getPointTreeAction
(
pointType
).
then
(
getPointTreeAction
(
pointType
).
then
(
...
@@ -934,8 +971,12 @@ class View3D extends Component {
...
@@ -934,8 +971,12 @@ class View3D extends Component {
});
});
}
}
);
);
message
.
success
(
'保存成功'
);
isfirst
&&
message
.
success
(
'保存成功'
);
},
error
=>
message
.
error
(
'保存失败'
)
},
error
=>
{
isfirst
&&
message
.
error
(
'保存失败'
);
}
);
);
}
}
...
@@ -1190,7 +1231,7 @@ class View3D extends Component {
...
@@ -1190,7 +1231,7 @@ class View3D extends Component {
id
:
dragItem
.
id
,
id
:
dragItem
.
id
,
type
:
dragItem
.
type
type
:
dragItem
.
type
};
};
markers
[
`
${
type
}
`
]
=
markers
[
`
${
type
}
`
].
filter
(
e
=>
e
.
id
!==
dragItem
.
id
);
markers
[
`
${
type
}
`
]
=
markers
[
`
${
type
}
`
]
&&
markers
[
`
${
type
}
`
]
.
filter
(
e
=>
e
.
id
!==
dragItem
.
id
);
markers
[
`
${
type
}
`
].
push
(
addPointParam
);
markers
[
`
${
type
}
`
].
push
(
addPointParam
);
this
.
setState
({
this
.
setState
({
markers
:
deepCopy
(
markers
),
markers
:
deepCopy
(
markers
),
...
@@ -1572,7 +1613,7 @@ class View3D extends Component {
...
@@ -1572,7 +1613,7 @@ class View3D extends Component {
addMarker
=
({
extData
,
position
})
=>
{
addMarker
=
({
extData
,
position
})
=>
{
const
me
=
this
;
const
me
=
this
;
const
{
markers
}
=
me
.
state
;
const
{
markers
}
=
me
.
state
;
const
isInside
=
me
.
polygonRegion
&&
extData
.
parentId
&&
me
.
polygonRegion
[
extData
.
parentId
].
pointInPolygon
([
position
.
x
,
position
.
y
,
position
.
z
]);
//
const isInside = me.polygonRegion && extData.parentId && me.polygonRegion[extData.parentId].pointInPolygon([position.x,position.y,position.z]);
// if (isInside){
// if (isInside){
markers
[
extData
.
type
].
forEach
(
e
=>
{
markers
[
extData
.
type
].
forEach
(
e
=>
{
if
(
e
.
id
===
extData
.
id
){
if
(
e
.
id
===
extData
.
id
){
...
@@ -1716,7 +1757,7 @@ class View3D extends Component {
...
@@ -1716,7 +1757,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
)}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
focusPosition
=
{
this
.
focusPosition
}
/>
}
<
/A3DDesigner
>
<
/A3DDesigner
>
<
/div
>
<
/div
>
{
isEditMode
&&
{
isEditMode
&&
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
38bd48ea
...
@@ -44,10 +44,13 @@ class ExceptionArea extends Component {
...
@@ -44,10 +44,13 @@ class ExceptionArea extends Component {
}
}
onMarkerClick
=
(
marker
)
=>
{
onMarkerClick
=
(
marker
)
=>
{
console
.
log
(
marker
);
const
{
extData
}
=
marker
;
const
{
extData
}
=
marker
;
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'into_except_model'
,
extData
.
id
);
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'into_except_model'
,
extData
.
id
);
this
.
props
.
focusPosition
(
this
.
toCameraPosition
(
extData
.
position
));
}
}
setTopCardConf
=
(
obj
,{
safetyIndex
})
=>
{
setTopCardConf
=
(
obj
,{
safetyIndex
})
=>
{
obj
.
baseObjHelper
.
titleConfig
=
{
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
// 顶牌平面参数
...
@@ -71,6 +74,16 @@ class ExceptionArea extends Component {
...
@@ -71,6 +74,16 @@ class ExceptionArea extends Component {
obj
.
baseObjHelper
.
title
=
safetyIndex
;
obj
.
baseObjHelper
.
title
=
safetyIndex
;
}
}
toCameraPosition
=
(
item
)
=>
{
if
(
item
&&
item
.
x
){
return
{
x
:
item
.
x
,
y
:
item
.
y
+
200
,
z
:
item
.
z
+
200
};
}
else
if
(
item
&&
item
[
0
]){
return
{
x
:
item
[
0
]
,
y
:
item
[
1
]
+
200
,
z
:
item
[
2
]
+
200
};
}
else
{
return
;
}
}
markerCreated
=
({
markersCache
})
=>
{
markerCreated
=
({
markersCache
})
=>
{
this
.
markersCache
=
markersCache
;
this
.
markersCache
=
markersCache
;
markersCache
.
eachValue
(
item
=>
{
markersCache
.
eachValue
(
item
=>
{
...
@@ -97,7 +110,8 @@ class ExceptionArea extends Component {
...
@@ -97,7 +110,8 @@ class ExceptionArea extends Component {
ExceptionArea
.
propTypes
=
{
ExceptionArea
.
propTypes
=
{
markers
:
PropTypes
.
array
,
markers
:
PropTypes
.
array
,
handleExceptModel
:
PropTypes
.
func
handleExceptModel
:
PropTypes
.
func
,
focusPosition
:
PropTypes
.
func
};
};
export
default
ExceptionArea
;
export
default
ExceptionArea
;
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
38bd48ea
...
@@ -28,7 +28,7 @@ const createMarkerLabel = text => {
...
@@ -28,7 +28,7 @@ const createMarkerLabel = text => {
};
};
const
urlMapper
=
{
const
urlMapper
=
{
fireCar
:
{
file
:
'fire-car'
,
label
:
'消防车'
},
fireCar
:
{
file
:
'fire-car'
,
label
:
'消防车'
},
fireEquipment
:
{
file
:
'
fireEquip'
,
label
:
'消防车
'
},
fireEquipment
:
{
file
:
'
pool'
,
label
:
'消防
'
},
fireFoamRoom
:
{
file
:
'fireFoam'
,
label
:
'泡沫间'
},
fireFoamRoom
:
{
file
:
'fireFoam'
,
label
:
'泡沫间'
},
fireChamber
:
{
file
:
'fireChamber'
,
label
:
'消防室'
},
fireChamber
:
{
file
:
'fireChamber'
,
label
:
'消防室'
},
hydrant
:
{
file
:
'hydrant'
,
label
:
'消防栓'
},
hydrant
:
{
file
:
'hydrant'
,
label
:
'消防栓'
},
...
...
mods/components/3dviewConvertor/view/searchPane/index.js
View file @
38bd48ea
This diff is collapsed.
Click to expand it.
mods/components/3dviewConvertor/view/searchPane/paramsHeader.js
View file @
38bd48ea
...
@@ -4,7 +4,7 @@ import { Button, Input, Select, Group } from 'amos-framework';
...
@@ -4,7 +4,7 @@ import { Button, Input, Select, Group } from 'amos-framework';
import
{
SingleQueryEnum
}
from
'amos-processor/lib/config/queryEnum'
;
import
{
SingleQueryEnum
}
from
'amos-processor/lib/config/queryEnum'
;
import
{
trim
}
from
'amos-tool'
;
import
{
trim
}
from
'amos-tool'
;
import
{
DatePicker
}
from
'amos-antd'
;
import
{
DatePicker
}
from
'amos-antd'
;
import
moment
from
"moment"
;
import
moment
from
'moment'
;
import
imgStatic
from
'./../../consts/imgStatic'
;
import
imgStatic
from
'./../../consts/imgStatic'
;
import
{
import
{
getImpEquipmentAction
,
getImpEquipmentAction
,
...
@@ -16,9 +16,9 @@ const Option = Select.Option;
...
@@ -16,9 +16,9 @@ const Option = Select.Option;
const
MsgTypeEnum
=
[{
id
:
'protal'
,
name
:
'巡检'
},
{
id
:
'equiment'
,
name
:
'设备'
},
{
id
:
'risk'
,
name
:
'风险'
}];
const
MsgTypeEnum
=
[{
id
:
'protal'
,
name
:
'巡检'
},
{
id
:
'equiment'
,
name
:
'设备'
},
{
id
:
'risk'
,
name
:
'风险'
}];
const
groupStyle
=
{
display
:
'unset'
,
width
:
'100%'
};
const
groupStyle
=
{
display
:
'unset'
,
width
:
'100%'
};
const
selectStyle
=
{
width
:
'25%'
,
minWidth
:
'20%'
,
marginRight
:
'14px'
};
const
selectStyle
=
{
width
:
'25%'
,
minWidth
:
'20%'
,
marginRight
:
'14px'
};
const
inputStyle
=
{
width
:
'30%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
const
inputStyle
=
{
width
:
'30%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
const
datePickerStyle
=
{
width
:
'30%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
const
datePickerStyle
=
{
width
:
'30%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
const
enterkey
=
13
;
const
enterkey
=
13
;
/**
/**
*
*
...
@@ -45,7 +45,7 @@ class paramsHeader extends Component {
...
@@ -45,7 +45,7 @@ class paramsHeader extends Component {
impEquiList
:
[],
impEquiList
:
[],
filter
:
[],
filter
:
[],
recordFilter
:
[],
recordFilter
:
[],
statusList
:
[]
,
statusList
:
[]
};
};
}
}
...
@@ -61,10 +61,10 @@ class paramsHeader extends Component {
...
@@ -61,10 +61,10 @@ class paramsHeader extends Component {
msgTextValue
:
undefined
,
msgTextValue
:
undefined
,
recordTextValue
:
undefined
,
recordTextValue
:
undefined
,
filter
:
[],
filter
:
[],
recordFilter
:
[]
,
recordFilter
:
[]
})
})
;
}
}
}
}
onChange
=
(
e
)
=>
{
onChange
=
(
e
)
=>
{
this
.
setState
({
value
:
e
.
target
.
value
});
this
.
setState
({
value
:
e
.
target
.
value
});
...
@@ -74,9 +74,9 @@ class paramsHeader extends Component {
...
@@ -74,9 +74,9 @@ class paramsHeader extends Component {
let
showRiskLevel
=
false
;
let
showRiskLevel
=
false
;
let
showImpEquiList
=
false
;
let
showImpEquiList
=
false
;
if
(
value
===
'riskSource'
){
if
(
value
===
'riskSource'
){
showRiskLevel
=
true
;
showRiskLevel
=
true
;
}
else
if
(
value
===
'monitorEquipment'
){
}
else
if
(
value
===
'monitorEquipment'
){
showImpEquiList
=
true
;
showImpEquiList
=
true
;
}
}
this
.
setState
({
showRiskLevel
,
showImpEquiList
});
this
.
setState
({
showRiskLevel
,
showImpEquiList
});
...
@@ -85,8 +85,8 @@ class paramsHeader extends Component {
...
@@ -85,8 +85,8 @@ class paramsHeader extends Component {
onPamarmsChange
=
(
name
,
value
)
=>
{
onPamarmsChange
=
(
name
,
value
)
=>
{
let
{
filter
}
=
this
.
state
;
let
{
filter
}
=
this
.
state
;
if
(
name
===
'time'
){
if
(
name
===
'time'
){
value
=
value
==
null
?
''
:
moment
(
value
).
format
(
"YYYY-MM-DD"
);
value
=
value
==
null
?
''
:
moment
(
value
).
format
(
'YYYY-MM-DD'
);
}
}
if
(
value
)
{
if
(
value
)
{
const
flag
=
filter
.
some
(
e
=>
{
const
flag
=
filter
.
some
(
e
=>
{
...
@@ -99,19 +99,19 @@ class paramsHeader extends Component {
...
@@ -99,19 +99,19 @@ class paramsHeader extends Component {
}
else
{
}
else
{
filter
=
filter
.
filter
(
e
=>
e
.
name
!==
name
);
filter
=
filter
.
filter
(
e
=>
e
.
name
!==
name
);
}
}
if
(
name
===
'inputText'
){
if
(
name
===
'inputText'
){
this
.
setState
({
textValue
:
value
,
filter
});
this
.
setState
({
textValue
:
value
,
filter
});
}
else
if
(
name
===
'title'
){
}
else
if
(
name
===
'title'
){
this
.
setState
({
msgTextValue
:
value
,
filter
});
this
.
setState
({
msgTextValue
:
value
,
filter
});
}
else
{
}
else
{
this
.
setState
({
filter
},
this
.
props
.
paramsOnChange
(
filter
));
this
.
setState
({
filter
},
this
.
props
.
paramsOnChange
(
filter
));
}
}
}
}
paramsTypeonChange
=
(
name
,
value
,
type
,
key
)
=>
{
paramsTypeonChange
=
(
name
,
value
,
type
,
key
)
=>
{
let
{
recordFilter
}
=
this
.
state
;
let
{
recordFilter
}
=
this
.
state
;
if
(
name
===
'checkTime'
){
if
(
name
===
'checkTime'
){
value
=
value
==
null
?
''
:
moment
(
value
).
format
(
"YYYY-MM-DD"
);
value
=
value
==
null
?
''
:
moment
(
value
).
format
(
'YYYY-MM-DD'
);
}
}
if
(
value
)
{
if
(
value
)
{
const
flag
=
recordFilter
.
some
(
e
=>
{
const
flag
=
recordFilter
.
some
(
e
=>
{
...
@@ -125,16 +125,15 @@ class paramsHeader extends Component {
...
@@ -125,16 +125,15 @@ class paramsHeader extends Component {
}
else
{
}
else
{
recordFilter
=
recordFilter
.
filter
(
e
=>
e
.
name
!==
name
);
recordFilter
=
recordFilter
.
filter
(
e
=>
e
.
name
!==
name
);
}
}
debugger
;
if
(
name
===
'contingencyName'
){
if
(
name
===
'contingencyName'
){
this
.
setState
({
recordTextValue
:
value
,
recordFilter
});
this
.
setState
({
recordTextValue
:
value
,
recordFilter
})
}
else
if
(
name
===
'pointName'
){
}
else
if
(
name
===
'pointName'
){
if
(
key
===
'record'
){
if
(
key
===
'record'
){
this
.
setState
({
recordTextValue
:
value
,
recordFilter
});
this
.
setState
({
recordTextValue
:
value
,
recordFilter
});
}
else
{
}
else
{
this
.
setState
({
trajectoryTextValue
:
value
,
recordFilter
});
this
.
setState
({
trajectoryTextValue
:
value
,
recordFilter
});
}
}
}
else
{
//不为input时直接查询
}
else
{
//不为input时直接查询
this
.
setState
({
recordFilter
},
this
.
props
.
paramsOnChange
(
recordFilter
));
this
.
setState
({
recordFilter
},
this
.
props
.
paramsOnChange
(
recordFilter
));
}
}
}
}
...
@@ -142,8 +141,8 @@ class paramsHeader extends Component {
...
@@ -142,8 +141,8 @@ class paramsHeader extends Component {
//检索
//检索
getSearchContent
=
()
=>
{
getSearchContent
=
()
=>
{
const
{
showRiskLevel
,
showImpEquiList
,
impEquiList
,
filter
}
=
this
.
state
;
const
{
showRiskLevel
,
showImpEquiList
,
impEquiList
,
filter
}
=
this
.
state
;
let
levelStyle
=
{
width
:
'20%'
,
minWidth
:
'15%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
let
levelStyle
=
{
width
:
'20%'
,
minWidth
:
'15%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
let
implStyle
=
{
width
:
'35%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
let
implStyle
=
{
width
:
'35%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
return
(
<
Group
style
=
{
groupStyle
}
>
return
(
<
Group
style
=
{
groupStyle
}
>
<
Select
<
Select
key
=
"searchType"
key
=
"searchType"
...
@@ -160,7 +159,7 @@ class paramsHeader extends Component {
...
@@ -160,7 +159,7 @@ class paramsHeader extends Component {
onChange
=
{(
e
)
=>
this
.
onPamarmsChange
(
'inputText'
,
e
.
target
.
value
)}
onChange
=
{(
e
)
=>
this
.
onPamarmsChange
(
'inputText'
,
e
.
target
.
value
)}
placeholder
=
"输入关键字"
placeholder
=
"输入关键字"
/>
/>
<
img
className
=
"params-input-img"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
filter
)}
/
>
<
img
className
=
"params-input-img"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
filter
)}
/
>
<
/div
>
<
/div
>
{
{
showRiskLevel
&&
showRiskLevel
&&
...
@@ -171,7 +170,7 @@ class paramsHeader extends Component {
...
@@ -171,7 +170,7 @@ class paramsHeader extends Component {
renderOption
=
{
item
=>
<
Option
className
=
'modalSelectOption'
key
=
{
item
.
key
}
value
=
{
item
.
key
}
>
{
item
.
label
}
<
/Option>
}
renderOption
=
{
item
=>
<
Option
className
=
'modalSelectOption'
key
=
{
item
.
key
}
value
=
{
item
.
key
}
>
{
item
.
label
}
<
/Option>
}
defaultOption
=
{
<
Option
className
=
'modalSelectOption'
>
全部
<
/Option>
}
defaultOption
=
{
<
Option
className
=
'modalSelectOption'
>
全部
<
/Option>
}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'dataLevel'
,
v
)}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'dataLevel'
,
v
)}
/
>
/
>
}
}
{
{
showImpEquiList
&&
showImpEquiList
&&
...
@@ -182,7 +181,7 @@ class paramsHeader extends Component {
...
@@ -182,7 +181,7 @@ class paramsHeader extends Component {
renderOption
=
{
item
=>
<
Option
className
=
'modalSelectOption'
key
=
{
item
.
name
}
value
=
{
item
.
name
}
>
{
item
.
name
}
<
/Option>
}
renderOption
=
{
item
=>
<
Option
className
=
'modalSelectOption'
key
=
{
item
.
name
}
value
=
{
item
.
name
}
>
{
item
.
name
}
<
/Option>
}
defaultOption
=
{
<
Option
className
=
'modalSelectOption'
>
全部
<
/Option>
}
defaultOption
=
{
<
Option
className
=
'modalSelectOption'
>
全部
<
/Option>
}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'impEquipment'
,
v
)}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'impEquipment'
,
v
)}
/
>
/
>
}
}
<
/Group>
)
;
<
/Group>
)
;
...
@@ -207,7 +206,7 @@ class paramsHeader extends Component {
...
@@ -207,7 +206,7 @@ class paramsHeader extends Component {
onChange
=
{(
e
)
=>
this
.
onPamarmsChange
(
'title'
,
e
.
target
.
value
)}
onChange
=
{(
e
)
=>
this
.
onPamarmsChange
(
'title'
,
e
.
target
.
value
)}
placeholder
=
"输入关键字"
placeholder
=
"输入关键字"
/>
/>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
filter
)}
/
>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
filter
)}
/
>
<
/div
>
<
/div
>
<
DatePicker
<
DatePicker
key
=
"time"
key
=
"time"
...
@@ -216,7 +215,7 @@ class paramsHeader extends Component {
...
@@ -216,7 +215,7 @@ class paramsHeader extends Component {
placeholder
=
"时间"
placeholder
=
"时间"
format
=
"YYYY/MM/DD"
format
=
"YYYY/MM/DD"
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'time'
,
v
)}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'time'
,
v
)}
/
>
/
>
<
/Group>
)
;
<
/Group>
)
;
...
@@ -230,7 +229,7 @@ class paramsHeader extends Component {
...
@@ -230,7 +229,7 @@ class paramsHeader extends Component {
key
=
"recordImpl"
key
=
"recordImpl"
style
=
{
selectStyle
}
style
=
{
selectStyle
}
data
=
{
impEquiList
}
data
=
{
impEquiList
}
renderOption
=
{
item
=>
<
Option
key
=
{
item
.
id
+
item
.
name
}
value
=
{
item
.
id
}
>
{
item
.
name
}
<
/Option>
}
renderOption
=
{
item
=>
<
Option
key
=
{
item
.
id
+
item
.
name
}
value
=
{
item
.
id
}
>
{
item
.
name
}
<
/Option>
}
defaultOption
=
{
<
Option
>
重点设备
<
/Option>
}
defaultOption
=
{
<
Option
>
重点设备
<
/Option>
}
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'equipmentId'
,
v
,
SingleQueryEnum
.
EQUAL
)}
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'equipmentId'
,
v
,
SingleQueryEnum
.
EQUAL
)}
/
>
/
>
...
@@ -241,7 +240,7 @@ class paramsHeader extends Component {
...
@@ -241,7 +240,7 @@ class paramsHeader extends Component {
onChange
=
{(
e
)
=>
this
.
paramsTypeonChange
(
'contingencyName'
,
e
.
target
.
value
,
SingleQueryEnum
.
LIKE
,
'record'
)}
onChange
=
{(
e
)
=>
this
.
paramsTypeonChange
(
'contingencyName'
,
e
.
target
.
value
,
SingleQueryEnum
.
LIKE
,
'record'
)}
placeholder
=
"输入关键字"
placeholder
=
"输入关键字"
/>
/>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
recordFilter
)}
/
>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
recordFilter
)}
/
>
<
/div
>
<
/div
>
<
DatePicker
<
DatePicker
key
=
"createTime"
key
=
"createTime"
...
@@ -250,7 +249,7 @@ class paramsHeader extends Component {
...
@@ -250,7 +249,7 @@ class paramsHeader extends Component {
placeholder
=
"时间"
placeholder
=
"时间"
format
=
"YYYY/MM/DD"
format
=
"YYYY/MM/DD"
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'createTime'
,
v
,
SingleQueryEnum
.
EQUAL
)}
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'createTime'
,
v
,
SingleQueryEnum
.
EQUAL
)}
/
>
/
>
<
/Group>
)
;
<
/Group>
)
;
}
}
...
@@ -273,7 +272,7 @@ class paramsHeader extends Component {
...
@@ -273,7 +272,7 @@ class paramsHeader extends Component {
onChange
=
{(
e
)
=>
this
.
paramsTypeonChange
(
'pointName'
,
e
.
target
.
value
,
SingleQueryEnum
.
LIKE
)}
onChange
=
{(
e
)
=>
this
.
paramsTypeonChange
(
'pointName'
,
e
.
target
.
value
,
SingleQueryEnum
.
LIKE
)}
placeholder
=
"输入关键字"
placeholder
=
"输入关键字"
/>
/>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
recordFilter
)}
/
>
<
img
className
=
"params-input-img1"
src
=
{
imgStatic
.
datapane
.
searchPane
}
alt
=
""
onClick
=
{()
=>
this
.
props
.
paramsOnChange
(
recordFilter
)}
/
>
<
/div
>
<
/div
>
<
DatePicker
<
DatePicker
key
=
"createTime"
key
=
"createTime"
...
@@ -282,19 +281,19 @@ class paramsHeader extends Component {
...
@@ -282,19 +281,19 @@ class paramsHeader extends Component {
placeholder
=
"时间"
placeholder
=
"时间"
format
=
"YYYY/MM/DD"
format
=
"YYYY/MM/DD"
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'beginDate'
,
v
,
SingleQueryEnum
.
EQUAL
)}
onChange
=
{(
v
)
=>
this
.
paramsTypeonChange
(
'beginDate'
,
v
,
SingleQueryEnum
.
EQUAL
)}
/
>
/
>
<
/Group>
)
;
<
/Group>
)
;
}
}
getContent
=
()
=>
{
getContent
=
()
=>
{
const
{
activeKey
}
=
this
.
props
;
const
{
activeKey
}
=
this
.
props
;
if
(
activeKey
===
'search'
){
if
(
activeKey
===
'search'
){
return
this
.
getSearchContent
();
return
this
.
getSearchContent
();
}
else
if
(
activeKey
===
'message'
){
}
else
if
(
activeKey
===
'message'
){
return
this
.
getMessageContent
();
return
this
.
getMessageContent
();
}
else
if
(
activeKey
===
'record'
){
}
else
if
(
activeKey
===
'record'
){
return
this
.
getRecordContent
();
return
this
.
getRecordContent
();
}
else
{
}
else
{
return
this
.
getTrajectoryContent
();
return
this
.
getTrajectoryContent
();
}
}
}
}
...
...
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