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
8d5a96a1
Commit
8d5a96a1
authored
May 27, 2020
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风险点,风险区域
parent
af248adc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
34 deletions
+82
-34
moduleEdit.scss
mods/components/3dviewConvertor/styles/moduleEdit.scss
+20
-2
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+44
-19
RightEditPointPanel.js
...Convertor/view/moduleEditComponent/RightEditPointPanel.js
+8
-8
RightEditRegionPanel.js
...onvertor/view/moduleEditComponent/RightEditRegionPanel.js
+10
-5
report.20200527.165548.32612.0.001.json
report.20200527.165548.32612.0.001.json
+0
-0
No files found.
mods/components/3dviewConvertor/styles/moduleEdit.scss
View file @
8d5a96a1
.ModuleEditPage
{
position
:
relative
;
height
:
100%
;
::-webkit-scrollbar
{
/* 血槽宽度 */
width
:
5px
;
height
:
5px
;
background-color
:
rgba
(
10
,
53
,
62
,
1
);
border-radius
:
5px
;
}
::-webkit-scrollbar-thumb
{
/* 拖动条 */
border-radius
:
5px
;
background-color
:
rgba
(
255
,
255
,
255
,
0
.4
);
}
::-webkit-scrollbar-track
{
/* 背景槽 */
background-color
:rgba
(
17
,
44
,
88
,
0
.2
)
;
}
.topBox
{
position
:
absolute
;
top
:
34px
;
...
...
@@ -158,6 +171,7 @@
height
:
100%
;
padding
:
32px
0
;
.rightContainer
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.68
);
...
...
@@ -165,7 +179,8 @@
padding
:
12px
;
color
:
#fff
;
.basic-demo
{
height
:
calc
(
100%
-
48px
);
height
:
calc
(
100%
-
53px
);
overflow-y
:
auto
;
}
.amos-form-item-label
{
color
:
#fff
;
...
...
@@ -207,8 +222,11 @@
}
}
.bottomBtns
{
position
:
absolute
;
bottom
:
15px
;
padding-top
:
15px
;
text-align
:
center
;
left
:
50%
;
margin-left
:
-100px
;
.sureBtn
{
width
:
100px
;
height
:
33px
;
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
8d5a96a1
...
...
@@ -209,6 +209,7 @@ class View3D extends Component {
};
componentWillUnmount
()
{
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
}
...
...
@@ -530,12 +531,11 @@ class View3D extends Component {
let
{
markers
}
=
this
.
state
getPointListAction
().
then
(
data
=>
{
// console.log(data);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
console
.
log
(
JSON
.
stringify
(
data
))
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
markers
[
data
[
i
].
type
].
push
(
data
[
i
])
this
.
setState
({
markers
})
}
this
.
setState
({
markers
})
})
}
startDrow
=
(
areaItem
)
=>
{
...
...
@@ -798,11 +798,17 @@ class View3D extends Component {
saveAreaData
=
()
=>
{
let
{
treeData
,
routePathData
,
pageType
}
=
this
.
state
;
let
routePathParams
=
[];
console
.
log
(
routePathData
)
//
console.log(routePathData)
saveAreaDataAction
(
routePathData
).
then
(
d
=>
{
message
.
success
(
'保存成功!'
);
this
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
//清除当前路径
// 结束绘制
this
.
setState
({
drawing
:
false
});
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
//console.log(data);
console
.
log
(
JSON
.
stringify
(
data
))
this
.
setState
({
treeData
:
data
||
[]
})
...
...
@@ -813,7 +819,7 @@ class View3D extends Component {
}
//保存点绑定
savePointData
=
()
=>
{
let
{
markers
}
=
this
.
state
;
let
{
markers
,
pointTypeArr
}
=
this
.
state
;
let
paramsArr
=
[];
for
(
let
key
in
markers
){
let
item
=
markers
[
key
];
...
...
@@ -826,23 +832,39 @@ class View3D extends Component {
}
}
savePointListAction
(
paramsArr
).
then
(
data
=>
{
console
.
log
(
data
);
getPointTreeAction
(
pointTypeArr
[
0
].
code
||
''
).
then
(
data
=>
{
this
.
setState
({
pointType
:
pointTypeArr
[
0
].
code
||
''
,
treeData
:
data
||
[],
pageType
:
'point'
,
showRightPanel
:
false
});
});
})
}
// 删除点绑定
deletePointBind
=
()
=>
{
let
{
selectPoints
}
=
this
.
state
;
let
{
selectPoints
,
pointTypeArr
,
markers
}
=
this
.
state
;
if
(
selectPoints
)
{
let
pointParams
=
[];
pointParams
.
push
({
pointId
:
selectPoints
.
id
,
pointType
:
selectPoints
.
type
,
position3d
:
`
${
selectPoints
.
position
.
x
}
,
${
selectPoints
.
position
.
y
}
,
${
selectPoints
.
position
.
z
}
`
position3d
:
``
})
savePointListAction
(
pointParams
).
then
(
data
=>
{
console
.
log
(
data
);
getPointTreeAction
(
pointTypeArr
[
0
].
code
||
''
).
then
(
data
=>
{
this
.
getPointList
()
this
.
setState
({
pointType
:
pointTypeArr
[
0
].
code
||
''
,
treeData
:
data
||
[],
pageType
:
'point'
,
showRightPanel
:
false
});
});
})
}
}
...
...
@@ -856,9 +878,9 @@ class View3D extends Component {
routePath
:
''
})
saveAreaDataAction
(
areaParams
).
then
(
d
=>
{
message
.
success
(
'删除成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
treeData
:
data
||
[]
})
...
...
@@ -885,7 +907,6 @@ class View3D extends Component {
});
}
else
{
getPointTreeAction
(
pointTypeArr
[
0
].
code
||
''
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
pointType
:
pointTypeArr
[
0
].
code
||
''
,
treeData
:
data
||
[],
...
...
@@ -896,8 +917,11 @@ class View3D extends Component {
}
}
pointTypeChange
=
(
pointType
)
=>
{
this
.
setState
({
pointType
,
treeData
:[]
});
getPointTreeAction
(
pointType
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
pointType
,
treeData
:
data
||
[]
...
...
@@ -963,7 +987,7 @@ class View3D extends Component {
levelStr
:
'level_2'
};
markers
.
riskSource
.
push
(
addPointParam
);
console
.
log
(
markers
);
this
.
setState
({
markers
});
...
...
@@ -1234,9 +1258,9 @@ class View3D extends Component {
}
getExceptionAreasList
=
()
=>
{
exceptionRegionListAction
().
then
(
data
=>
{
this
.
setState
({
exceptionAreas
:
data
});
});
//
exceptionRegionListAction().then(data=>{
//
this.setState({ exceptionAreas: data });
//
});
}
initExceptionAreasData
=
()
=>
{
...
...
@@ -1271,6 +1295,7 @@ class View3D extends Component {
}
else
if
(
type
===
'out_except_model'
){
this
.
props
.
editModelChange
(
false
);
//显示全景统计
this
.
setState
({
treeData
:[],
sideControlShow
:
false
,
//隐藏耳朵
isShowActionBar
:
true
,
//显示工具栏
startLoadExceptionArea
:
true
,
//显示marker,
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditPointPanel.js
View file @
8d5a96a1
...
...
@@ -43,7 +43,7 @@ class RightEditPointPanel extends Component {
}
componentWillReceiveProps
(
nextProps
)
{
let
{
detailData
}
=
this
.
p
rops
let
{
detailData
}
=
nextP
rops
getPointTreeDetailAction
(
detailData
.
id
,
detailData
.
type
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
...
...
@@ -95,7 +95,6 @@ class RightEditPointPanel extends Component {
render
()
{
let
{
rules
,
form
,
pointTypeArr
,
pointType
,
detailData
}
=
this
.
state
;
let
{
pageType
}
=
this
.
props
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
28
},
...
...
@@ -106,10 +105,9 @@ class RightEditPointPanel extends Component {
return
(
<
div
className
=
"rightEditPanel"
>
<
div
className
=
'rightContainer'
>
<
Form
className
=
"basic-demo"
ref
=
{
component
=>
this
.
form
=
component
}
model
=
{
form
}
rules
=
{
rules
}
>
<
Form
className
=
"basic-demo"
ref
=
{
component
=>
this
.
form
=
component
}
model
=
{
form
}
rules
=
{
rules
}
>
<
div
className
=
'topForm'
>
<
div
className
=
'rightTitle'
>
<
div
className
=
'rightTitle'
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'
/>
<
span
className
=
'titleText'
>
风险点信息
<
/span
>
<
/div
>
...
...
@@ -198,7 +196,10 @@ class RightEditPointPanel extends Component {
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
'bottomBtns'
>
<
/Form
>
<
div
className
=
'bottomBtns'
>
<
Button
className
=
'sureBtn'
onClick
=
{()
=>
{
...
...
@@ -210,9 +211,8 @@ class RightEditPointPanel extends Component {
// this.props.save()
}}
><
/Button
>
<
/div
>
<
/Form
>
<
/div
>
<
/div
>
);
}
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditRegionPanel.js
View file @
8d5a96a1
...
...
@@ -27,7 +27,7 @@ class RightEditRegionPanel extends Component {
}
componentDidMount
()
{
console
.
log
(
JSON
.
stringify
(
this
.
props
.
detailData
))
console
.
log
(
JSON
.
stringify
(
this
.
props
.
detailData
))
// getAreaTreeDetailAction().then(data => {
// console.log(data);
// this.setState({
...
...
@@ -76,7 +76,7 @@ console.log(JSON.stringify(this.props.detailData))
handleSubmit
=
(
e
)
=>
{
// e.preventDefault();
this
.
form
.
validate
((
valid
,
dataValues
,
errors
)
=>
{
alert
(
JSON
.
stringify
(
dataValues
))
console
.
log
(
'返回内容:'
,
dataValues
,
valid
,
errors
);
if
(
valid
)
{
//AmosAlert.success('结果', JSON.stringify(dataValues));
...
...
@@ -156,7 +156,7 @@ console.log(JSON.stringify(this.props.detailData))
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
三维坐标
<
/div
>
<
div
className
=
'position'
>
<
div
className
=
'positionItem'
>
{
/*
<div className='positionItem'>
<FormItem label="长" field="positionX" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[0]} />
</FormItem>
...
...
@@ -165,10 +165,11 @@ console.log(JSON.stringify(this.props.detailData))
<FormItem label="宽" field="positionY" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[1]} />
</FormItem>
<
/div
>
</div>
*/
}
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"高"
field
=
"positionZ"
{...
formItemLayout
}
>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
2
]}
/
>
<
Input
defaultValue
=
{
0
}
onChange
=
{(
e
)
=>
this
.
onChange
(
'positionZ'
,
e
)}
/
>
{
/* <Input value={detailData.ue4Location && detailData.ue4Location[2]} /> */
}
<
/FormItem
>
<
/div
>
<
/div
>
...
...
@@ -177,16 +178,20 @@ console.log(JSON.stringify(this.props.detailData))
<
/div
>
<
/div
>
<
div
className
=
'bottomBtns'
>
<
Button
className
=
'sureBtn'
onClick
=
{()
=>
{
this
.
handleSubmit
()
}}
><
/Button
>
<
Button
className
=
'cancelBtn'
onClick
=
{()
=>
{
// this.props.save()
}}
><
/Button
>
<
/div
>
<
/Form
>
...
...
report.20200527.165548.32612.0.001.json
0 → 100644
View file @
8d5a96a1
This diff is collapsed.
Click to expand it.
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