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
e2c7e38b
Commit
e2c7e38b
authored
May 27, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改编辑模式退出后区域显示bug
2.页面样式
parent
e94546a5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
77 deletions
+81
-77
moduleEdit.scss
mods/components/3dviewConvertor/styles/moduleEdit.scss
+9
-7
statistical.scss
...ts/3dviewConvertor/styles/view/panoramic/statistical.scss
+33
-27
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+34
-37
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+1
-2
SafetyIndex.js
...3dviewConvertor/view/panoramic/statistical/SafetyIndex.js
+3
-3
conf.js
...onents/3dviewConvertor/view/panoramic/statistical/conf.js
+1
-1
No files found.
mods/components/3dviewConvertor/styles/moduleEdit.scss
View file @
e2c7e38b
...
...
@@ -27,13 +27,15 @@
// border-image:linear-gradient(90deg,rgba(50,217,239,0) 2%,rgba(50,217,239,0.49) 29%,rgba(50,217,239,0.73) 73%,rgba(50,217,239,0) 100%);
}
}
.quipBtn
{
width
:
169px
;
height
:
44px
;
background
:
url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
margin-top
:
10px
;
margin-left
:
70px
;
}
.quipBtn
{
width
:
169px
;
height
:
44px
;
margin-top
:
10px
;
margin-left
:
70px
;
cursor
:
pointer
;
background
:
url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
}
}
.bottomBox
{
position
:
absolute
;
...
...
mods/components/3dviewConvertor/styles/view/panoramic/statistical.scss
View file @
e2c7e38b
...
...
@@ -3,35 +3,41 @@
// height: 100%;
// width: 100%;
.statistical-left
{
position
:
absolute
;
height
:
100%
;
width
:
350px
;
float
:
left
;
z-index
:
1
;
color
:
white
;
display
:
flex
;
flex-direction
:
column
;
.statistical-left
{
position
:
absolute
;
height
:
100%
;
width
:
350px
;
float
:
left
;
z-index
:
1
;
color
:
white
;
display
:
flex
;
flex-direction
:
column
;
.equipStatusList
{
padding-left
:
97px
;
padding-top
:
10px
;
flex-grow
:
1
;
overflow-y
:
auto
;
.title-child
{
width
:
100%
;
height
:
55px
;
//margin-top: 5px;
}
.title-date
{
height
:
20px
;
font-size
:
13px
;
}
.title-text
{
font-size
:
15px
;
}
}
.equipStatusList
{
padding-left
:
97px
;
padding-top
:
10px
;
flex-grow
:
1
;
overflow-y
:
auto
;
.title-child
{
width
:
100%
;
height
:
55px
;
//margin-top: 5px;
}
.title-date
{
height
:
20px
;
font-size
:
13px
;
}
.title-text
{
font-size
:
15px
;
}
}
::-webkit-scrollbar
{
/* 隐藏滚轮 */
display
:
none
;
}
.safetyExecuteList
{
flex
:
2
;
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
e2c7e38b
...
...
@@ -729,56 +729,55 @@ class View3D extends Component {
}
//选中区域变化
selectItemChange
=
(
selectArea
)
=>
{
this
.
state
.
selectArea
=
selectArea
this
.
setState
({
selectArea
:
selectArea
,
selectArea
,
showRightPanel
:
true
})
})
;
}
//选中点变化
selectPointChange
=
(
selectPoints
)
=>
{
this
.
setState
({
selectPoints
:
selectPoints
,
selectPoints
,
showRightPanel
:
true
})
})
;
}
getAreas
=
(
treeData
)
=>
{
let
{
dragItem
}
=
this
.
state
;
// console.log(treeData)
// let areas = [];
if
(
treeData
&&
treeData
.
length
>
0
)
{
if
(
treeData
&&
treeData
.
length
>
0
)
{
treeData
.
map
((
item
)
=>
{
if
(
item
.
isRegion
&&
item
.
isBind
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
dragItem
)
{
if
(
dragItem
.
parentId
&&
dragItem
.
parentId
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
{
this
.
getAreas
(
item
.
children
)}
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
{
this
.
getAreas
(
item
.
children
)}
}
}
else
{
}
else
{
if
(
dragItem
)
{
if
(
dragItem
&&
dragItem
.
parentId
&&
dragItem
.
parentId
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
if
(
dragItem
&&
dragItem
.
parentId
&&
dragItem
.
parentId
=
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
}
}
else
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
{
this
.
getAreas
(
item
.
children
)}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
this
.
getAreas
(
item
.
children
);
}
}
});
...
...
@@ -789,29 +788,28 @@ class View3D extends Component {
this
.
getAreas
(
this
.
state
.
treeData
);
return
this
.
areas
;
}
onRegionCreated
=
(
polygonRegion
,
item
)
=>
{
console
.
log
(
polygonRegion
)
// console.log(polygonRegion.pointInPolygon)
this
.
polygonRegion
[
item
.
id
]
=
polygonRegion
;
console
.
log
(
this
.
polygonRegion
)
}
//保存区域绑定
saveAreaData
=
()
=>
{
let
{
treeData
,
routePathData
,
pageType
}
=
this
.
state
;
let
routePathParams
=
[];
console
.
log
(
routePathData
)
let
{
routePathData
}
=
this
.
state
;
saveAreaDataAction
(
routePathData
).
then
(
d
=>
{
message
.
success
(
'保存成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
treeData
:
data
||
[]
})
treeData
:
data
||
[]
})
;
});
},
eer
=>
{
message
.
error
(
'保存失败!'
);
});
}
//保存点绑定
savePointData
=
()
=>
{
let
{
markers
}
=
this
.
state
;
...
...
@@ -823,14 +821,12 @@ class View3D extends Component {
pointId
:
item
[
i
].
id
,
pointType
:
item
[
i
].
type
,
position3d
:
`
${
item
[
i
].
position
.
x
}
,
${
item
[
i
].
position
.
y
}
,
${
item
[
i
].
position
.
z
}
`
})
})
;
}
}
savePointListAction
(
paramsArr
).
then
(
data
=>
{
console
.
log
(
data
);
})
});
}
// 删除点绑定
deletePointBind
=
()
=>
{
...
...
@@ -841,28 +837,28 @@ class View3D extends Component {
pointId
:
selectPoints
.
id
,
pointType
:
selectPoints
.
type
,
position3d
:
`
${
selectPoints
.
position
.
x
}
,
${
selectPoints
.
position
.
y
}
,
${
selectPoints
.
position
.
z
}
`
})
})
;
savePointListAction
(
pointParams
).
then
(
data
=>
{
console
.
log
(
data
);
})
})
;
}
}
//删除区域
deleteAreaBind
=
()
=>
{
let
{
selectArea
,
routePathData
}
=
this
.
state
;
let
{
selectArea
}
=
this
.
state
;
if
(
selectArea
)
{
let
areaParams
=
[];
areaParams
.
push
({
riskSourceId
:
selectArea
.
id
,
riskSourceId
:
selectArea
.
id
,
routePath
:
''
})
})
;
saveAreaDataAction
(
areaParams
).
then
(
d
=>
{
message
.
success
(
'删除成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
treeData
:
data
||
[]
})
treeData
:
data
||
[]
})
;
});
},
eer
=>
{
message
.
error
(
'删除失败!'
);
...
...
@@ -1000,6 +996,7 @@ class View3D extends Component {
this
.
getPointList
();
}
}
simpleTipOk
=
()
=>
{
this
.
setState
({
simpleTipVisible
:
false
...
...
@@ -1388,7 +1385,7 @@ class View3D extends Component {
{
editFlag
&&
pageType
===
'region'
?
''
:
<
PointsPool
markers
=
{
markers
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
/>
}
{
fireTruckRoute
&&
<
FatLine
{...
lineData
.
fatLineConf
}
linePath
=
{
JSON
.
parse
(
fireTruckRoute
)}
visible
=
{
showFireTruckRoute
}
/>
}
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
{
this
.
renderAreas
()}
{
editFlag
&&
this
.
renderAreas
()}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
<
/A3DDesigner
>
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
e2c7e38b
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
utils
,
Store
}
from
'amos-tool'
;
import
{
utils
}
from
'amos-tool'
;
import
{
Markers
}
from
'amos-3d/lib/designer'
;
import
{
connect3D
}
from
'amos-3d/lib/designer'
;
import
{
BaseObjHelper
}
from
'base-r3d/lib/factory'
;
import
{
safetyIndexIconMapper
}
from
'./../../consts/imgStatic'
;
const
lsTool
=
Store
.
lsTool
;
const
getIcon
=
(
exceptionType
)
=>
{
return
safetyIndexIconMapper
[
exceptionType
];
};
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/SafetyIndex.js
View file @
e2c7e38b
...
...
@@ -138,9 +138,9 @@ export default class SafetyIndex extends Component {
<
/span
>
<
/div
>
{
[{
name
:
'风险值
上升
'
,
num
:
safetyIndexData
.
riskExceptionNum
},
{
name
:
'巡检
不合格
'
,
num
:
safetyIndexData
.
checkExceptionNum
},
{
name
:
'
火灾报警
'
,
num
:
safetyIndexData
.
fireExceptionNum
}].
map
((
item
,
index
)
=>
[{
name
:
'风险值
异常
'
,
num
:
safetyIndexData
.
riskExceptionNum
},
{
name
:
'巡检
异常
'
,
num
:
safetyIndexData
.
checkExceptionNum
},
{
name
:
'
设备故障
'
,
num
:
safetyIndexData
.
fireExceptionNum
}].
map
((
item
,
index
)
=>
<
div
key
=
{
item
.
name
}
className
=
"content-item"
>
{
item
.
name
}
{
item
.
num
}
<
/div
>
)
}
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/conf.js
View file @
e2c7e38b
...
...
@@ -2,7 +2,7 @@
* 告警控制
*/
export
const
warnController
=
[
{
key
:
'fire'
,
icon
:
'model_fire'
,
type
:
'fire'
,
label
:
'
火灾告警
'
},
{
key
:
'fire'
,
icon
:
'model_fire'
,
type
:
'fire'
,
label
:
'
设备故障
'
},
{
key
:
'risk'
,
icon
:
'model_risk'
,
type
:
'risk'
,
label
:
'风险异常'
},
{
key
:
'check'
,
icon
:
'model_patrol'
,
type
:
'check'
,
label
:
'巡检异常'
}
];
...
...
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