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
dbfb0677
Commit
dbfb0677
authored
Jun 10, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/station/amos-station-module-view
into developer
# Conflicts: # mods/components/3dviewConvertor/view/View3D.js
parents
029270c7
ef93eb7e
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
881 additions
and
839 deletions
+881
-839
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+1
-1
actionbar.scss
mods/components/3dviewConvertor/styles/actionbar.scss
+39
-39
moduleEdit.scss
mods/components/3dviewConvertor/styles/moduleEdit.scss
+251
-256
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
+1
-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
+236
-209
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+15
-1
PointLeftTree.js
...3dviewConvertor/view/moduleEditComponent/PointLeftTree.js
+72
-80
RightEditRegionPanel.js
...onvertor/view/moduleEditComponent/RightEditRegionPanel.js
+2
-1
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+68
-71
index.js
mods/components/3dviewConvertor/view/searchPane/index.js
+93
-88
paramsHeader.js
...omponents/3dviewConvertor/view/searchPane/paramsHeader.js
+41
-42
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
dbfb0677
...
@@ -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/actionbar.scss
View file @
dbfb0677
.action-pane-data
{
.action-pane-data
{
position
:
absolute
;
position
:
absolute
;
bottom
:
5%
;
bottom
:
5%
;
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
.action-list
{
.action-list
{
height
:
40px
;
height
:
40px
;
padding
:
0
1rem
;
padding
:
0
1rem
;
border-radius
:
6px
;
background-color
:
rgba
(
216
,
216
,
216
,
0
.24
)
;
background
:rgba
(
216
,
216
,
216
,
0
.24
)
;
border
:
1px
solid
rgba
(
146
,
149
,
151
,
1
);
border
:
1px
solid
rgba
(
146
,
149
,
151
,
1
)
;
border-radius
:
6px
;
.action-item
{
.action-item
{
float
:
left
;
float
:
left
;
width
:
40px
;
width
:
40px
;
height
:
38px
;
height
:
38px
;
text-align
:
center
;
text-align
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
border
:
1px
solid
rgba
(
146
,
149
,
151
,
1
);
border
:
1px
solid
rgba
(
146
,
149
,
151
,
1
);
.action-item-title
{
.action-item-title
{
color
:
#e0e0e0
;
position
:
absolute
;
position
:
absolute
;
top
:
-20px
;
top
:
-20
px
;
width
:
51
px
;
white-space
:
nowrap
;
color
:
#e0e0e0
;
width
:
51px
;
text-align
:
center
;
-webkit-transform-origin-x
:
0
;
white-space
:
nowrap
;
-webkit-transform
:
scale
(
0
.80
)
;
-webkit-transform-origin-x
:
0
;
text-align
:
center
;
-webkit-transform
:
scale
(
0
.8
)
;
}
}
.action-item-content
{
.action-item-content
{
text-align
:
center
;
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
text-align
:
center
;
.action-item-icon
{
.action-item-icon
{
margin
:
8px
;
position
:
relative
;
width
:
21px
;
width
:
21px
;
height
:
21px
;
height
:
21px
;
position
:
relative
;
margin
:
8px
;
}
}
}
}
}
}
.action-active
{
.action-active
{
background
:
linear-gradient
(
180deg
,
rgba
(
0
,
96
,
154
,
0
.8
)
0%
,
rgba
(
0
,
54
,
105
,
0
.5
)
100%
);
background
:
linear-gradient
(
180deg
,
rgba
(
0
,
96
,
154
,
0
.8
)
0%
,
rgba
(
0
,
54
,
105
,
0
.5
)
100%
);
}
}
}
}
}
}
mods/components/3dviewConvertor/styles/moduleEdit.scss
View file @
dbfb0677
.ModuleEditPage
{
.ModuleEditPage
{
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
::-webkit-scrollbar
{
/* 血槽宽度 */
::-webkit-scrollbar
{
width
:
5px
;
/* 血槽宽度 */
height
:
5px
;
width
:
5px
;
background-color
:
rgba
(
10
,
53
,
62
,
1
);
height
:
5px
;
border-radius
:
5px
;
background-color
:
rgba
(
10
,
53
,
62
,
1
);
}
border-radius
:
5px
;
::-webkit-scrollbar-thumb
{
/* 拖动条 */
}
border-radius
:
5px
;
::-webkit-scrollbar-thumb
{
background-color
:
rgba
(
255
,
255
,
255
,
0
.4
);
/* 拖动条 */
}
border-radius
:
5px
;
::-webkit-scrollbar-track
{
/* 背景槽 */
background-color
:
rgba
(
255
,
255
,
255
,
0
.4
);
background-color
:rgba
(
17
,
44
,
88
,
0
.2
)
;
}
}
::-webkit-scrollbar-track
{
/* 背景槽 */
background-color
:
rgba
(
17
,
44
,
88
,
0
.2
);
}
.topBox
{
.topBox
{
position
:
absolute
;
position
:
absolute
;
top
:
45px
;
top
:
45px
;
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
span
{
span
{
display
:
inline-block
;
display
:
inline-block
;
}
}
.editTitle
{
.editTitle
{
width
:
257px
;
width
:
257px
;
height
:
55px
;
height
:
55px
;
background
:
url('../assets/convertor/moduleEdit/title.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/moduleEdit/title.png')
no-repeat
100%
100%
;
// opacity:0.4;
// opacity:0.4;
font-size
:
24px
;
font-size
:
24px
;
text-align
:
center
;
text-align
:
center
;
color
:
#fff
;
color
:
#fff
;
vertical-align
:
top
;
vertical-align
:
top
;
.titleText
{
.titleText
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
line-height
:
55px
;
line-height
:
55px
;
// border-bottom:2px transparent solid;
// border-bottom:2px transparent solid;
// 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%);
// 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
{
.quipBtn
{
width
:
169px
;
width
:
169px
;
...
@@ -50,253 +53,247 @@
...
@@ -50,253 +53,247 @@
cursor
:
pointer
;
cursor
:
pointer
;
background
:
url('../assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
}
}
}
.bottomBox
{
position
:
absolute
;
bottom
:
34px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
span
{
display
:
inline-block
;
width
:
177px
;
height
:
42px
;
line-height
:
42px
;
background
:
rgba
(
46
,
217
,
239
,
0
.2
);
// border: 2px solid #2ED9EF;
margin
:
0
10px
;
text-align
:
center
;
font-size
:
16px
;
// color: #2ED9EF;
cursor
:
pointer
;
}
}
.bottomBox
{
.editAreaBtn
{
position
:
absolute
;
background
:
url('../assets/convertor/moduleEdit/areaBtn.png')
no-repeat
100%
100%
;
bottom
:
34px
;
}
left
:
50%
;
.editPointBtn
{
transform
:
translateX
(
-50%
);
background
:
url('../assets/convertor/moduleEdit/pointBtn.png')
no-repeat
100%
100%
;
span
{
}
display
:
inline-block
;
.editAreaBtn.selected
{
width
:
177px
;
background
:
url('../assets/convertor/moduleEdit/areaBtn_select.png')
no-repeat
100%
100%
;
height
:
42px
;
}
line-height
:
42px
;
.editPointBtn.selected
{
background
:
rgba
(
46
,
217
,
239
,
0
.2
);
background
:
url('../assets/convertor/moduleEdit/poingBtn_select.png')
no-repeat
100%
100%
;
// border: 2px solid #2ED9EF;
}
margin
:
0
10px
;
}
text-align
:
center
;
font-size
:
16px
;
// 左侧树
// color: #2ED9EF;
.leftTree
{
cursor
:
pointer
;
position
:
absolute
;
}
top
:
0
;
.editAreaBtn
{
left
:
15px
;
background
:
url('../assets/convertor/moduleEdit/areaBtn.png')
no-repeat
100%
100%
;
width
:
264px
;
height
:
100%
;
padding-top
:
55px
;
padding-bottom
:
15px
;
user-select
:
none
;
.leftContainer
{
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.68
);
border
:
1px
solid
rgba
(
46
,
217
,
239
,
0
.59
);
padding
:
12px
;
}
.topForm
{
.leftSelect
{
height
:
39px
;
width
:
100%
;
margin-bottom
:
10px
;
background
:
url('../assets/convertor/moduleEdit/selectBox.png')
no-repeat
100%
100%
;
border
:
none
;
line-height
:
31px
;
padding
:
5px
;
color
:
#f0df2d
;
}
.leftSearch
{
height
:
33px
;
line-height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/searchBg.png')
no-repeat
100%
100%
;
input
{
background-color
:
transparent
;
box-shadow
:
none
;
padding-left
:
15px
;
color
:
#fff
;
}
}
.
editPointBtn
{
.
amosicon-search
{
background
:
url('../assets/convertor/moduleEdit/pointBtn.png')
no-repeat
100%
100%
;
color
:
#2ed9ef
;
}
}
.editAreaBtn.selected
{
}
background
:
url('../assets/convertor/moduleEdit/areaBtn_select.png')
no-repeat
100%
100%
;
}
.treeBox
{
height
:
calc
(
100%
-
132px
);
overflow-y
:
auto
;
.amos-tree
{
color
:
rgba
(
15
,
235
,
255
,
1
);
.amos-tree-node-content-wrapper
{
color
:
#fff
;
font-size
:
15px
;
}
}
.editPointBtn.selected
{
}
background
:
url('../assets/convertor/moduleEdit/poingBtn_select.png')
no-repeat
100%
100%
;
.icon
{
margin-left
:
5px
;
vertical-align
:
middle
;
img
{
vertical-align
:
initial
;
margin-left
:
10px
;
}
}
}
}
.bottomBtns
{
padding-top
:
15px
;
text-align
:
center
;
.sureBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/sureBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.deleteBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/deleteBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
}
}
}
// 左侧树
// 右侧面板
.leftTree
{
.rightEditPanel
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
15px
;
right
:
15px
;
width
:
264px
;
width
:
264px
;
height
:
100%
;
height
:
100%
;
padding-top
:
55px
;
padding-top
:
55px
;
padding-bottom
:
15px
;
padding-bottom
:
15px
;
user-select
:
none
;
.rightContainer
{
.leftContainer
{
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.68
);
background-color
:
rgba
(
10
,
53
,
62
,
0
.68
);
border
:
1px
solid
rgba
(
46
,
217
,
239
,
0
.59
);
border
:
1px
solid
rgba
(
46
,
217
,
239
,
0
.59
);
padding
:
12px
;
padding
:
12px
;
color
:
#fff
;
.basic-demo
{
height
:
calc
(
100%
-
53px
);
overflow-y
:
auto
;
}
.amos-form-item-label
{
color
:
#fff
;
}
.topForm
{
.rightTitle
{
margin-left
:
-15px
;
.titleText
{
margin-left
:
5px
;
}
}
}
.topForm
{
.amos-input
{
.leftSelect
{
background-color
:
rgba
(
4
,
30
,
36
,
0
.4
);
height
:
39px
;
border-radius
:
1px
;
width
:
100%
;
border
:
solid
1px
rgba
(
46
,
217
,
239
,
0
.59
);
margin-bottom
:
10px
;
font-size
:
14px
;
background
:
url('../assets/convertor/moduleEdit/selectBox.png')
no-repeat
100%
100%
;
color
:
#fff
;
border
:
none
;
line-height
:
31px
;
padding
:
5px
;
color
:
#F0DF2D
;
}
.leftSearch
{
height
:
33px
;
line-height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/searchBg.png')
no-repeat
100%
100%
;
input
{
background-color
:
transparent
;
box-shadow
:
none
;
padding-left
:
15px
;
color
:
#fff
;
}
.amosicon-search
{
color
:
#2ED9EF
;
}
}
}
}
.treeBox
{
.moduleTitle
{
height
:
calc
(
100%
-
132px
);
height
:
50px
;
overflow-y
:
auto
;
display
:
flex
;
.amos-tree
{
align-items
:
center
;
color
:
rgba
(
15
,
235
,
255
,
1
);
.titleText
{
.amos-tree-node-content-wrapper
{
margin-left
:
5px
;
color
:
#fff
;
}
font-size
:
15px
;
}
}
.icon
{
margin-left
:
5px
;
vertical-align
:
middle
;
img
{
vertical-align
:
initial
;
margin-left
:
10px
;
}
}
}
}
.bottomBtns
{
height
:
calc
(
100%
-
48px
);
padding-top
:
15px
;
padding-left
:
20px
;
text-align
:
center
;
.amos-input
{
.sureBtn
{
width
:
100%
;
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/sureBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.deleteBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/deleteBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
}
}
}
.amos-select
{
width
:
100%
;
// 右侧面板
.rightEditPanel
{
position
:
absolute
;
top
:
0
;
right
:
15px
;
width
:
264px
;
height
:
100%
;
padding-top
:
55px
;
padding-bottom
:
15px
;
.rightContainer
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.68
);
border
:
1px
solid
rgba
(
46
,
217
,
239
,
0
.59
);
padding
:
12px
;
color
:
#fff
;
.basic-demo
{
height
:
calc
(
100%
-
53px
);
overflow-y
:
auto
;
}
.amos-form-item-label
{
color
:
#fff
;
}
.topForm
{
.rightTitle
{
margin-left
:
-15px
;
.titleText
{
margin-left
:
5px
;
}
}
.amos-input
{
background-color
:
rgba
(
4
,
30
,
36
,
0
.4
);
border-radius
:
1px
;
border
:
solid
1px
rgba
(
46
,
217
,
239
,
0
.59
);
font-size
:
14px
;
color
:
#fff
;
}
.moduleTitle
{
height
:
50px
;
display
:
flex
;
align-items
:
center
;
.titleText
{
margin-left
:
5px
;
}
}
height
:
calc
(
100%
-
48px
);
padding-left
:
20px
;
.amos-input
{
width
:
100%
;
}
.amos-select
{
width
:
100%
;
}
.radio-text
{
color
:
#fff
}
}
}
}
.bottomBtns
{
.radio-text
{
position
:
absolute
;
color
:
#fff
;
bottom
:
15px
;
padding-top
:
15px
;
left
:
50%
;
margin-left
:
-100px
;
.sureBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/sureBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.deleteBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/deleteBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.cancelBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/cancelBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
}
}
}
}
}
.bottomBtns
{
.editButton
{
position
:
absolute
;
position
:
absolute
;
bottom
:
15px
;
bottom
:
100px
;
padding-top
:
15px
;
left
:
50%
;
left
:
50%
;
margin-left
:
-100px
;
.sureBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/sureBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.deleteBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/deleteBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
.cancelBtn
{
width
:
100px
;
height
:
33px
;
background
:
url('../assets/convertor/moduleEdit/cancelBtn.png')
no-repeat
100%
100%
;
border
:
none
;
}
}
}
}
.editButton
{
position
:
absolute
;
bottom
:
100px
;
left
:
50%
;
}
}
}
.amos-select-options
{
.amos-select-options
{
.selectOption
{
.selectOption
{
color
:
#fff
;
color
:
#fff
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.8
);
background-color
:
rgba
(
10
,
53
,
62
,
0
.8
);
}
}
.selectOption
:hover
{
.selectOption
:hover
{
color
:
#F0DF2D
;
color
:
#f0df2d
;
background-color
:
rgba
(
10
,
53
,
62
,
0
.8
)
background-color
:
rgba
(
10
,
53
,
62
,
0
.8
)
;
}
}
}
}
.pormpt-modal
{
.pormpt-modal
{
height
:
100%
;
height
:
100%
;
.amos-modal-container
{
.amos-modal-container
{
background-image
:
url('../assets/convertor/3dview/promptModal.png')
;
background-image
:
url('../assets/convertor/3dview/promptModal.png')
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
height
:
253px
;
height
:
253px
;
width
:
392px
!
important
;
width
:
392px
!
important
;
background-color
:
transparent
;
background-color
:
transparent
;
box-shadow
:
none
;
box-shadow
:
none
;
.amos-modal-content
{
.amos-modal-content
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
color
:
#fff
;
color
:
#fff
;
font-size
:
20px
;
font-size
:
20px
;
font-weight
:
normal
;
font-weight
:
normal
;
.prompt-content
{
.prompt-content
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
padding-top
:
40px
;
padding-top
:
40px
;
display
:flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-around
;
justify-content
:
space-around
;
align-items
:
center
;
align-items
:
center
;
.prompt-buttons
{
.prompt-buttons
{
span
{
span
{
display
:
inline-block
;
display
:
inline-block
;
width
:
71px
;
width
:
71px
;
...
@@ -305,24 +302,22 @@
...
@@ -305,24 +302,22 @@
margin
:
0
10px
;
margin
:
0
10px
;
text-align
:
center
;
text-align
:
center
;
}
}
.promptOk
{
.promptOk
{
background
:
url('../assets/convertor/3dview/promptOk.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/3dview/promptOk.png')
no-repeat
100%
100%
;
}
}
.promptNo
{
.promptNo
{
background
:
url('../assets/convertor/3dview/promptNo.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/3dview/promptNo.png')
no-repeat
100%
100%
;
}
}
.promptSave
{
.promptSave
{
background
:
url('../assets/convertor/3dview/promptSave.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/3dview/promptSave.png')
no-repeat
100%
100%
;
}
}
.promptCancel
{
.promptCancel
{
background
:
url('../assets/convertor/3dview/promptCancel.png')
no-repeat
100%
100%
;
background
:
url('../assets/convertor/3dview/promptCancel.png')
no-repeat
100%
100%
;
}
}
}
}
}
}
}
}
}
}
}
}
// .rayd-modal{
// .rayd-modal{
// background-color: rgba(25, 86, 147, 0.6) !important;
// background-color: rgba(25, 86, 147, 0.6) !important;
...
...
mods/components/3dviewConvertor/styles/pointsDetails.scss
View file @
dbfb0677
...
@@ -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 @
dbfb0677
1.94 KB
mods/components/3dviewConvertor/threeres/marker-models/fireEquip.png
0 → 100644
View file @
dbfb0677
1.9 KB
mods/components/3dviewConvertor/threeres/marker-models/hydrant.png
0 → 100644
View file @
dbfb0677
1.97 KB
mods/components/3dviewConvertor/threeres/marker-models/pool.png
0 → 100644
View file @
dbfb0677
2 KB
mods/components/3dviewConvertor/view/MaskContent.js
View file @
dbfb0677
...
@@ -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
();
}
}
}
}
...
...
mods/components/3dviewConvertor/view/PointsPool.js
View file @
dbfb0677
...
@@ -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 @
dbfb0677
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 @
dbfb0677
...
@@ -95,27 +95,28 @@ class View3D extends Component {
...
@@ -95,27 +95,28 @@ class View3D extends Component {
fireEquipmentPosition
:
[],
fireEquipmentPosition
:
[],
contingencyPlanId
:
''
,
contingencyPlanId
:
''
,
markers
:
{
markers
:
{
riskSource
:[],
//风险点 - riskSource;
riskSource
:
[],
//风险点 - riskSource;
patrol
:[],
//巡检点 -
patrol
:
[],
//巡检点 -
impEquipment
:[],
//重点设备 -
impEquipment
:
[],
//重点设备 -
monitorEquipment
:[],
//探测器 -
monitorEquipment
:
[],
//探测器 -
video
:[],
//摄像头 -
video
:
[],
//摄像头 -
fireEquipment
:[],
//消防设备 -
fireEquipment
:
[],
//消防设备 -
person
:[],
person
:
[],
pool
:[],
pool
:
[],
hydrant
:[],
hydrant
:
[],
fireChamber
:[],
fireChamber
:
[],
fireCar
:[],
fireCar
:
[],
fire
:[],
fire
:
[],
fireDetection
:[]
fireDetection
:
[],
fireFoamRoom
:
[]
},
},
markerType
:
null
,
markerType
:
null
,
planStarted
:
false
,
planStarted
:
false
,
alarmStarted
:
false
,
alarmStarted
:
false
,
//编辑模式
//编辑模式
drawing
:
false
,
//画线状态
drawing
:
false
,
//画线状态
selectArea
:
""
,
//选中区域
selectArea
:
''
,
//选中区域
selectPoints
:
""
,
//选中点
selectPoints
:
''
,
//选中点
treeData
:
[],
//左树
treeData
:
[],
//左树
pointTypeArr
:
[],
pointTypeArr
:
[],
routePathData
:
[],
//区域线位置
routePathData
:
[],
//区域线位置
...
@@ -129,17 +130,17 @@ class View3D extends Component {
...
@@ -129,17 +130,17 @@ class View3D extends Component {
sideControlShow
:
false
,
//隐藏耳朵
sideControlShow
:
false
,
//隐藏耳朵
isShowActionBar
:
true
,
//显示工具栏
isShowActionBar
:
true
,
//显示工具栏
errorAreaId
:
''
,
//异常区域id
errorAreaId
:
''
,
//异常区域id
positionxyz
:
''
,
positionxyz
:
''
,
rightHeight
:
10
,
rightHeight
:
10
,
isPointSave
:
false
,
isPointSave
:
false
,
isAreaSave
:
false
,
isAreaSave
:
false
,
treeDataList
:[],
treeDataList
:
[],
promptData
:{
promptData
:
{
promptvisible
:
false
,
promptvisible
:
false
,
promptContent
:
''
,
promptContent
:
''
,
type
:
'region'
,
type
:
'region'
,
btnType
:
'isOk'
,
btnType
:
'isOk'
,
isback
:
false
isback
:
false
}
}
};
};
...
@@ -164,7 +165,7 @@ class View3D extends Component {
...
@@ -164,7 +165,7 @@ class View3D extends Component {
lineColor
:
'#878787'
,
// 边框颜色
lineColor
:
'#878787'
,
// 边框颜色
regionOpacity
:
0.4
regionOpacity
:
0.4
},
},
select
:{
select
:
{
regionColor
:
'#FD0400'
,
// 区域颜色
regionColor
:
'#FD0400'
,
// 区域颜色
lineColor
:
'#FD0400'
,
// 边框颜色
lineColor
:
'#FD0400'
,
// 边框颜色
regionOpacity
:
0.4
regionOpacity
:
0.4
...
@@ -296,8 +297,8 @@ class View3D extends Component {
...
@@ -296,8 +297,8 @@ class View3D extends Component {
_bindRulesPubSubEvents
=
()
=>
{
_bindRulesPubSubEvents
=
()
=>
{
this
.
props
.
subscribe
(
eventTopics
.
fromws
,
(
topic
,
content
)
=>
{
this
.
props
.
subscribe
(
eventTopics
.
fromws
,
(
topic
,
content
)
=>
{
let
data
=
content
.
data
;
let
data
=
content
.
data
;
console
.
log
(
'消息类型--->'
+
topic
);
console
.
log
(
`消息类型--->
${
topic
}
`
);
console
.
log
(
'data=='
+
JSON
.
stringify
(
data
)
);
console
.
log
(
`data==
${
JSON
.
stringify
(
data
)}
`
);
switch
(
topic
)
{
switch
(
topic
)
{
case
'base3d.fromws.mapArea_action1-1'
:
//“极I高端8111换流变A相”所在建筑高亮+报警logo+建筑模型上气泡弹出(极I高端8111换流变A相)
case
'base3d.fromws.mapArea_action1-1'
:
//“极I高端8111换流变A相”所在建筑高亮+报警logo+建筑模型上气泡弹出(极I高端8111换流变A相)
// this.equipmentId = data.equipmentId;
// this.equipmentId = data.equipmentId;
...
@@ -335,7 +336,7 @@ class View3D extends Component {
...
@@ -335,7 +336,7 @@ class View3D extends Component {
dealTroubleMarkers
(
this
,
data
);
//处理设备报警:切换图层到探测器、显示报警的探测器(闪烁-报警,不闪烁-报警解除)--已完成
dealTroubleMarkers
(
this
,
data
);
//处理设备报警:切换图层到探测器、显示报警的探测器(闪烁-报警,不闪烁-报警解除)--已完成
break
;
break
;
case
'base3d.fromws.topArea_CONTINGENCY'
:
//消防报警
case
'base3d.fromws.topArea_CONTINGENCY'
:
//消防报警
data
[
"contingencyPlanId"
]
=
this
.
state
.
contingencyPlanId
;
data
[
'contingencyPlanId'
]
=
this
.
state
.
contingencyPlanId
;
this
.
props
.
trigger
(
eventTopics
.
top_ae_msg
,
data
);
this
.
props
.
trigger
(
eventTopics
.
top_ae_msg
,
data
);
break
;
break
;
case
'base3d.fromws.recordArea_refresh'
:
//记录区刷新
case
'base3d.fromws.recordArea_refresh'
:
//记录区刷新
...
@@ -353,7 +354,7 @@ class View3D extends Component {
...
@@ -353,7 +354,7 @@ class View3D extends Component {
break
;
break
;
case
'base3d.fromws.optionArea_'
:
//交互区推数据
case
'base3d.fromws.optionArea_'
:
//交互区推数据
this
.
props
.
trigger
(
eventTopics
.
optionArea_view
,
data
);
this
.
props
.
trigger
(
eventTopics
.
optionArea_view
,
data
);
this
.
setState
({
contingencyPlanId
:
data
.
contingencyPlanId
})
this
.
setState
({
contingencyPlanId
:
data
.
contingencyPlanId
})
;
break
;
break
;
case
eventTopics
.
map_bubble
:
case
eventTopics
.
map_bubble
:
parseBubbleMarkers
(
this
,
content
);
// 监控屏气泡
parseBubbleMarkers
(
this
,
content
);
// 监控屏气泡
...
@@ -524,7 +525,6 @@ class View3D extends Component {
...
@@ -524,7 +525,6 @@ class View3D extends Component {
cacheObjsSave
(
me
,
obj
,
LENS_LEVEL
);
//缓存对象及对应关系
cacheObjsSave
(
me
,
obj
,
LENS_LEVEL
);
//缓存对象及对应关系
if
(
!
obj
.
isForceParent
)
{
if
(
!
obj
.
isForceParent
)
{
obj
.
on
(
'click'
,
evt
=>
{
obj
.
on
(
'click'
,
evt
=>
{
const
me
=
this
;
if
(
this
.
state
.
isEditMode
===
false
)
{
if
(
this
.
state
.
isEditMode
===
false
)
{
// this.focusPosition(evt.pickedPosition);
// this.focusPosition(evt.pickedPosition);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
...
@@ -566,9 +566,9 @@ class View3D extends Component {
...
@@ -566,9 +566,9 @@ class View3D extends Component {
getPointLoop
=
({
markers
},
pointType
,
treeData
)
=>
{
getPointLoop
=
({
markers
},
pointType
,
treeData
)
=>
{
treeData
.
forEach
(
t
=>
{
treeData
.
forEach
(
t
=>
{
if
(
t
.
isRegion
&&
t
.
children
&&
t
.
children
.
length
>
0
){
if
(
t
.
isRegion
&&
t
.
children
&&
t
.
children
.
length
>
0
){
this
.
getPointLoop
(
{
markers
},
pointType
,
t
.
children
)
this
.
getPointLoop
(
{
markers
},
pointType
,
t
.
children
)
;
}
else
if
(
t
.
position3d
&&
!
t
.
isRegion
){
}
else
if
(
t
.
position3d
&&
!
t
.
isRegion
){
t
.
position
=
t
.
position3d
;
t
.
position
=
t
.
position3d
;
t
.
key
=
`
${
t
.
type
}
-
${
t
.
id
}
`
;
t
.
key
=
`
${
t
.
type
}
-
${
t
.
id
}
`
;
t
.
label
=
t
.
name
;
t
.
label
=
t
.
name
;
...
@@ -580,32 +580,46 @@ class View3D extends Component {
...
@@ -580,32 +580,46 @@ 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
});
}
}
}
}
startDrow
=
(
areaItem
)
=>
{
startDrow
=
(
areaItem
)
=>
{
// this.a3dRef.addPen(m);
// this.a3dRef.addPen(m);
this
.
setState
({
isAreaSave
:
true
});
this
.
setState
({
isAreaSave
:
true
});
console
.
log
(
'drow--------'
)
console
.
log
(
'drow--------'
)
;
this
.
setState
({
this
.
setState
({
selectArea
:
areaItem
,
selectArea
:
areaItem
,
rightHeight
:
10
,
rightHeight
:
10
,
showRightPanel
:
true
showRightPanel
:
true
});
});
this
.
drowItem
=
areaItem
;
this
.
drowItem
=
areaItem
;
this
.
addPen
(
areaItem
.
id
)
this
.
addPen
(
areaItem
.
id
)
;
}
}
addPen
(
areaKey
)
{
addPen
(
areaKey
)
{
let
params
=
{
"displayName"
:
"进攻线路"
,
"thumb"
:
"/a3dres/images/pathline/line-attack.png"
,
"descr"
:
""
,
"objParam"
:
null
,
"type"
:
"pen"
}
let
params
=
{
'displayName'
:
'进攻线路'
,
'thumb'
:
'/a3dres/images/pathline/line-attack.png'
,
'descr'
:
''
,
'objParam'
:
null
,
'type'
:
'pen'
};
// console.log(this.state.selectArea)
// console.log(this.state.selectArea)
const
penProps
=
{
const
penProps
=
{
key
:
this
.
genPenId
(),
key
:
this
.
genPenId
(),
color
:
0x00ff00
,
color
:
0x00ff00
,
areaKey
:
areaKey
,
areaKey
,
...
params
...
params
};
};
this
.
a3dRef
.
newPen
(
penProps
);
this
.
a3dRef
.
newPen
(
penProps
);
...
@@ -639,13 +653,13 @@ class View3D extends Component {
...
@@ -639,13 +653,13 @@ class View3D extends Component {
});
});
me
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
FINISHED
);
me
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
FINISHED
);
this
.
state
.
routePathData
.
push
({
this
.
state
.
routePathData
.
push
({
riskSourceId
:
this
.
drowItem
.
id
,
riskSourceId
:
this
.
drowItem
.
id
,
routePath
:
JSON
.
stringify
({
routePath
:
JSON
.
stringify
({
routePath
:
penPoints
,
routePath
:
penPoints
,
regionHeigth
:
10
regionHeigth
:
10
})
,
})
})
})
;
this
.
setState
({
this
.
setState
({
drawing
:
false
,
drawing
:
false
,
routePathData
:
this
.
state
.
routePathData
routePathData
:
this
.
state
.
routePathData
...
@@ -669,8 +683,8 @@ class View3D extends Component {
...
@@ -669,8 +683,8 @@ class View3D extends Component {
const
me
=
this
;
const
me
=
this
;
me
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
me
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
// 结束绘制
// 结束绘制
this
.
setState
({
this
.
setState
({
drawing
:
false
drawing
:
false
});
});
}
}
...
@@ -767,7 +781,7 @@ class View3D extends Component {
...
@@ -767,7 +781,7 @@ class View3D extends Component {
points
:
pen
.
getFmtPoints
()
points
:
pen
.
getFmtPoints
()
});
});
console
.
log
(
pen
);
console
.
log
(
pen
);
console
.
log
(
pen
.
getFmtPoints
())
console
.
log
(
pen
.
getFmtPoints
())
;
this
.
enableDrawPath
=
false
;
this
.
enableDrawPath
=
false
;
}
}
}
}
...
@@ -785,18 +799,19 @@ class View3D extends Component {
...
@@ -785,18 +799,19 @@ class View3D extends Component {
selectItemChange
=
(
selectArea
)
=>
{
selectItemChange
=
(
selectArea
)
=>
{
this
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
//清除当前路径
this
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
//清除当前路径
// 结束绘制
// 结束绘制
this
.
setState
({
this
.
setState
({
drawing
:
false
drawing
:
false
});
});
this
.
setState
({
this
.
setState
({
selectArea
,
selectArea
,
rightHeight
:
JSON
.
parse
(
selectArea
.
routePath
).
regionHeigth
,
rightHeight
:
JSON
.
parse
(
selectArea
.
routePath
).
regionHeigth
,
showRightPanel
:
true
showRightPanel
:
true
});
});
}
}
//选中点变化
//选中点变化
selectPointChange
=
(
selectPoints
)
=>
{
selectPointChange
=
(
selectPoints
)
=>
{
const
{
markers
,
pointType
}
=
this
.
state
;
const
{
markers
,
pointType
}
=
this
.
state
;
this
.
stagePilot
.
positionCtl
.
clearDrag
();
if
(
selectPoints
.
isRegion
){
if
(
selectPoints
.
isRegion
){
this
.
setState
({
selectArea
:
selectPoints
,
selectPoints
});
this
.
setState
({
selectArea
:
selectPoints
,
selectPoints
});
}
else
{
}
else
{
...
@@ -819,32 +834,32 @@ class View3D extends Component {
...
@@ -819,32 +834,32 @@ class View3D extends Component {
if
(
treeData
&&
treeData
.
length
>
0
)
{
if
(
treeData
&&
treeData
.
length
>
0
)
{
treeData
.
map
((
item
)
=>
{
treeData
.
map
((
item
)
=>
{
if
(
item
.
isRegion
&&
item
.
isBind
)
{
if
(
item
.
isRegion
&&
item
.
isBind
)
{
if
(
selectArea
&&
selectArea
.
id
==
item
.
id
){
if
(
selectArea
&&
selectArea
.
id
=
==
item
.
id
){
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
select
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
select
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)
;
}}
/>
)
;
this
.
getAreas
(
item
.
children
);
this
.
getAreas
(
item
.
children
);
}
else
{
}
else
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
dragItem
)
{
if
(
dragItem
)
{
if
(
dragItem
.
parentId
&&
dragItem
.
parentId
==
item
.
id
)
{
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
{
}
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
)}
{
this
.
getAreas
(
item
.
children
)
;
}
}
else
{
}
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
)}
{
this
.
getAreas
(
item
.
children
)
;
}
}
}
}
else
{
}
else
{
if
(
dragItem
)
{
if
(
dragItem
)
{
if
(
dragItem
&&
dragItem
.
parentId
&&
dragItem
.
parentId
===
item
.
id
)
{
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
)}}
/>
)
;
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)
;
}}
/>
)
;
}
else
{
}
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
{
}
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
)
;
}}
/>
)
;
}
}
}
}
...
@@ -860,7 +875,7 @@ class View3D extends Component {
...
@@ -860,7 +875,7 @@ class View3D extends Component {
}
}
renderAreas
=
()
=>
{
renderAreas
=
()
=>
{
this
.
areas
=
[];
this
.
areas
=
[];
console
.
log
(
this
.
state
.
treeData
)
console
.
log
(
this
.
state
.
treeData
)
;
this
.
getAreas
(
this
.
state
.
treeData
);
this
.
getAreas
(
this
.
state
.
treeData
);
return
this
.
areas
;
return
this
.
areas
;
}
}
...
@@ -873,10 +888,10 @@ class View3D extends Component {
...
@@ -873,10 +888,10 @@ class View3D extends Component {
message
.
success
(
'保存成功!'
);
message
.
success
(
'保存成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
getAreaTreeAction
().
then
(
data
=>
{
//console.log(data);
//console.log(data);
console
.
log
(
JSON
.
stringify
(
data
))
console
.
log
(
JSON
.
stringify
(
data
))
;
this
.
setState
({
this
.
setState
({
treeData
:
data
||
[],
treeData
:
data
||
[],
routePathData
:[]
routePathData
:
[]
});
});
});
});
},
eer
=>
{
},
eer
=>
{
...
@@ -890,7 +905,7 @@ class View3D extends Component {
...
@@ -890,7 +905,7 @@ class View3D extends Component {
//保存区域绑定
//保存区域绑定
saveAreaData
=
()
=>
{
saveAreaData
=
()
=>
{
let
{
routePathData
}
=
this
.
state
;
let
{
routePathData
}
=
this
.
state
;
this
.
setState
({
isAreaSave
:
false
});
this
.
setState
({
isAreaSave
:
false
});
saveAreaDataAction
(
routePathData
).
then
(
d
=>
{
saveAreaDataAction
(
routePathData
).
then
(
d
=>
{
message
.
success
(
'保存成功!'
);
message
.
success
(
'保存成功!'
);
this
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
//清除当前路径
this
.
a3dRef
.
changeDrawState
(
PEN_STATE
.
CLEARED
);
//清除当前路径
...
@@ -900,10 +915,10 @@ class View3D extends Component {
...
@@ -900,10 +915,10 @@ class View3D extends Component {
});
});
getAreaTreeAction
().
then
(
data
=>
{
getAreaTreeAction
().
then
(
data
=>
{
//console.log(data);
//console.log(data);
console
.
log
(
JSON
.
stringify
(
data
))
console
.
log
(
JSON
.
stringify
(
data
))
;
this
.
setState
({
this
.
setState
({
treeData
:
data
||
[],
treeData
:
data
||
[],
routePathData
:[]
routePathData
:
[]
});
});
});
});
},
eer
=>
{
},
eer
=>
{
...
@@ -914,20 +929,42 @@ class View3D extends Component {
...
@@ -914,20 +929,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
(
...
@@ -939,14 +976,18 @@ class View3D extends Component {
...
@@ -939,14 +976,18 @@ class View3D extends Component {
});
});
}
}
);
);
message
.
success
(
'保存成功'
);
isfirst
&&
message
.
success
(
'保存成功'
);
},
error
=>
message
.
error
(
'保存失败'
)
},
error
=>
{
isfirst
&&
message
.
error
(
'保存失败'
);
}
);
);
}
}
// 删除点绑定
// 删除点绑定
deletePointBind
=
()
=>
{
deletePointBind
=
()
=>
{
let
{
selectPoints
,
pointType
Arr
,
pointType
,
markers
}
=
this
.
state
;
let
{
selectPoints
,
pointType
}
=
this
.
state
;
if
(
selectPoints
&&
!
selectPoints
.
isRegion
)
{
if
(
selectPoints
&&
!
selectPoints
.
isRegion
)
{
let
pointParams
=
[];
let
pointParams
=
[];
...
@@ -956,24 +997,7 @@ class View3D extends Component {
...
@@ -956,24 +997,7 @@ class View3D extends Component {
position3d
:
``
position3d
:
``
});
});
this
.
savePointAndRefreshMarker
(
pointType
,
pointParams
);
this
.
savePointAndRefreshMarker
(
pointType
,
pointParams
);
}
else
if
(
selectPoints
&&
selectPoints
.
isRegion
&&
selectPoints
.
children
){
}
else
if
(
selectPoints
&&
selectPoints
.
isRegion
&&
selectPoints
.
children
){
// AmosAlert.confirm('提示', '是否删除该区域下所有点?', {
// callback: (flag) => {
// if (flag){
// let pointParams = [];
// pointParams = selectPoints.children.filter(e => e.position3d && e.position3d.length > 0).map(item=>{
// return {
// pointId: item.id,
// pointType: item.type,
// position3d: ''
// };
// });
// this.savePointAndRefreshMarker(pointType,pointParams);
// } else {
// }
// }
// });
let
pointParams
=
[];
let
pointParams
=
[];
pointParams
=
selectPoints
.
children
.
filter
(
e
=>
e
.
position3d
&&
e
.
position3d
.
length
>
0
).
map
(
item
=>
{
pointParams
=
selectPoints
.
children
.
filter
(
e
=>
e
.
position3d
&&
e
.
position3d
.
length
>
0
).
map
(
item
=>
{
return
{
return
{
...
@@ -983,14 +1007,14 @@ class View3D extends Component {
...
@@ -983,14 +1007,14 @@ class View3D extends Component {
};
};
});
});
this
.
savePointAndRefreshMarker
(
pointType
,
pointParams
);
this
.
savePointAndRefreshMarker
(
pointType
,
pointParams
);
this
.
setState
({
promptData
:
{
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
promptvisible
:
true
,
promptContent
:
'是否删除该区域下所有点?'
,
promptContent
:
'是否删除该区域下所有点?'
,
type
:
'point'
,
type
:
'point'
,
btnType
:
'isOk'
,
btnType
:
'isOk'
,
isback
:
false
,
isback
:
false
}
}
})
})
;
}
}
}
}
...
@@ -1009,10 +1033,10 @@ class View3D extends Component {
...
@@ -1009,10 +1033,10 @@ class View3D extends Component {
//删除区域
//删除区域
deleteAreaBind
=
()
=>
{
deleteAreaBind
=
()
=>
{
let
{
selectArea
,
treeData
}
=
this
.
state
;
let
{
selectArea
}
=
this
.
state
;
if
(
selectArea
)
{
if
(
selectArea
)
{
getPointsByRegionIdAction
(
selectArea
.
id
).
then
(
d
=>
{
getPointsByRegionIdAction
(
selectArea
.
id
).
then
(
d
=>
{
if
(
d
&&
d
.
length
==
0
){
if
(
d
&&
d
.
length
==
=
0
){
this
.
state
.
routePathData
.
push
({
this
.
state
.
routePathData
.
push
({
riskSourceId
:
selectArea
.
id
,
riskSourceId
:
selectArea
.
id
,
routePath
:
''
routePath
:
''
...
@@ -1024,21 +1048,21 @@ class View3D extends Component {
...
@@ -1024,21 +1048,21 @@ class View3D extends Component {
this
.
setState
({
this
.
setState
({
routePathData
:
this
.
state
.
routePathData
,
routePathData
:
this
.
state
.
routePathData
,
//treeData: tree.children,
//treeData: tree.children,
selectArea
:
''
,
selectArea
:
''
});
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
promptContent
:
'确定将选中删除?'
,
type
:
'region'
,
btnType
:
'isOk'
,
isback
:
false
}
});
});
this
.
setState
({
promptData
:{
promptvisible
:
true
,
promptContent
:
'确定将选中删除?'
,
type
:
'region'
,
btnType
:
'isOk'
,
isback
:
false
}
})
}
else
{
}
else
{
message
.
danger
(
'请先清除点的绑定再进行删除!'
);
message
.
danger
(
'请先清除点的绑定再进行删除!'
);
}
}
});
});
}
else
{
}
else
{
message
.
danger
(
'请先选择已绑定的区域再进行删除!'
);
message
.
danger
(
'请先选择已绑定的区域再进行删除!'
);
}
}
}
}
...
@@ -1046,38 +1070,38 @@ class View3D extends Component {
...
@@ -1046,38 +1070,38 @@ class View3D extends Component {
* 处理数据
* 处理数据
*/
*/
generateList
=
data
=>
{
generateList
=
data
=>
{
let
{
treeDataList
}
=
this
.
state
;
let
{
treeDataList
}
=
this
.
state
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
node
=
data
[
i
];
const
node
=
data
[
i
];
const
key
=
node
.
id
;
const
key
=
node
.
id
;
const
title
=
node
.
name
;
const
title
=
node
.
name
;
treeDataList
.
push
({
key
,
title
});
treeDataList
.
push
({
key
,
title
});
if
(
node
.
children
.
length
>
0
)
{
if
(
node
.
children
.
length
>
0
)
{
this
.
generateList
(
node
.
children
);
this
.
generateList
(
node
.
children
);
}
}
}
}
this
.
setState
({
treeDataList
})
this
.
setState
({
treeDataList
});
}
}
removeTreeDataRoutePathByChildId
=
(
areaId
,
obj
)
=>
{
removeTreeDataRoutePathByChildId
=
(
areaId
,
obj
)
=>
{
let
oldSize
=
obj
.
children
.
length
;
let
oldSize
=
obj
.
children
.
length
;
let
flag
=
false
;
let
flag
=
false
;
if
(
oldSize
>
0
){
if
(
oldSize
>
0
){
obj
.
children
&&
obj
.
children
.
some
(
t
=>
{
obj
.
children
&&
obj
.
children
.
some
(
t
=>
{
if
(
t
.
id
==
areaId
){
if
(
t
.
id
=
==
areaId
){
t
.
routePath
=
''
;
t
.
routePath
=
''
;
t
.
isBind
=
false
;
t
.
isBind
=
false
;
flag
=
true
flag
=
true
;
}
}
});
});
if
(
flag
){
//移除
if
(
flag
){
//移除
return
;
return
;
}
else
{
}
else
{
obj
.
children
&&
obj
.
children
.
some
(
t
=>
{
obj
.
children
&&
obj
.
children
.
some
(
t
=>
{
this
.
removeTreeDataRoutePathByChildId
(
areaId
,
t
);
this
.
removeTreeDataRoutePathByChildId
(
areaId
,
t
);
});
});
}
}
}
else
{
}
else
{
return
;
return
;
}
}
}
}
...
@@ -1087,7 +1111,12 @@ class View3D extends Component {
...
@@ -1087,7 +1111,12 @@ class View3D extends Component {
*/
*/
changeAreaPoint
=
(
type
)
=>
{
changeAreaPoint
=
(
type
)
=>
{
let
{
pointTypeArr
}
=
this
.
state
;
let
{
pointTypeArr
}
=
this
.
state
;
this
.
setState
({
treeDataList
:
[]
});
this
.
setState
(
{
treeDataList
:
[],
dragItem
:
''
,
selectArea
:
''
,
selectPoints
:
''
}
);
this
.
stagePilot
.
positionCtl
.
clearDrag
();
//清除已有选中
this
.
stagePilot
.
positionCtl
.
clearDrag
();
//清除已有选中
if
(
type
===
'region'
)
{
if
(
type
===
'region'
)
{
getAreaTreeAction
().
then
(
data
=>
{
getAreaTreeAction
().
then
(
data
=>
{
...
@@ -1107,7 +1136,8 @@ class View3D extends Component {
...
@@ -1107,7 +1136,8 @@ class View3D extends Component {
pointType
:
pointTypeArr
[
0
].
code
||
''
,
pointType
:
pointTypeArr
[
0
].
code
||
''
,
treeData
:
data
||
[],
treeData
:
data
||
[],
pageType
:
'point'
,
pageType
:
'point'
,
showRightPanel
:
false
showRightPanel
:
false
,
selectArea
:
''
});
});
});
});
this
.
enableCamera
();
this
.
enableCamera
();
...
@@ -1118,9 +1148,13 @@ class View3D extends Component {
...
@@ -1118,9 +1148,13 @@ class View3D extends Component {
if
(
isPointSave
){
if
(
isPointSave
){
this
.
showConfirm
();
this
.
showConfirm
();
}
}
this
.
stagePilot
.
positionCtl
.
clearDrag
();
this
.
setState
({
this
.
setState
({
pointType
,
pointType
,
treeData
:
[]
treeData
:
[],
selectArea
:
''
,
selectPoints
:
''
,
dragItem
:
''
});
});
getPointTreeAction
(
pointType
).
then
(
data
=>
{
getPointTreeAction
(
pointType
).
then
(
data
=>
{
//alert(JSON.stringify(data))
//alert(JSON.stringify(data))
...
@@ -1132,35 +1166,26 @@ class View3D extends Component {
...
@@ -1132,35 +1166,26 @@ class View3D extends Component {
});
});
}
}
showConfirm
=
()
=>
{
showConfirm
=
()
=>
{
// AmosAlert.confirm('提示', '有未保存数据,是否保存?', {
this
.
setState
({
promptData
:
// callback: (flag) => {
{
// if (flag){
promptvisible
:
true
,
// this.savePointData();
promptContent
:
`有未保存数据,是否保存?`
,
// } else {
type
:
'point'
,
// this.setState({ isPointSave: true });
btnType
:
'isOk'
,
// }
isback
:
false
// }
}
// });
});
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
promptContent
:
`有未保存数据,是否保存??`
,
type
:
'point'
,
btnType
:
'isOk'
,
isback
:
false
}
})
};
};
dragItemChange
=
(
dragItem
)
=>
{
dragItemChange
=
(
dragItem
)
=>
{
let
{
treeData
}
=
this
.
state
;
this
.
stagePilot
.
positionCtl
.
clearDrag
()
;
if
(
dragItem
.
isRegion
)
{
if
(
dragItem
.
isRegion
)
{
//是区域
//是区域
}
else
{
}
else
{
if
(
dragItem
.
isBind
)
{
if
(
dragItem
.
isBind
)
{
//已绑定
//已绑定
}
else
{
}
else
{
let
hasRegion
=
false
;
//未绑定
}
}
}
}
this
.
setState
({
this
.
setState
({
...
@@ -1185,7 +1210,7 @@ class View3D extends Component {
...
@@ -1185,7 +1210,7 @@ class View3D extends Component {
if
(
objs
.
length
>
0
){
if
(
objs
.
length
>
0
){
position
=
objs
[
0
].
point
;
position
=
objs
[
0
].
point
;
}
}
const
isInside
=
this
.
polygonRegion
[
dragItem
.
parentId
].
pointInPolygon
([
position
.
x
,
position
.
y
,
position
.
z
])
const
isInside
=
this
.
polygonRegion
[
dragItem
.
parentId
].
pointInPolygon
([
position
.
x
,
position
.
y
,
position
.
z
])
;
console
.
log
(
isInside
);
console
.
log
(
isInside
);
if
(
dragItem
)
{
if
(
dragItem
)
{
if
(
isInside
===
false
)
{
if
(
isInside
===
false
)
{
...
@@ -1211,7 +1236,7 @@ class View3D extends Component {
...
@@ -1211,7 +1236,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
),
...
@@ -1236,7 +1261,7 @@ class View3D extends Component {
...
@@ -1236,7 +1261,7 @@ class View3D extends Component {
this
.
setState
({
isEditMode
});
this
.
setState
({
isEditMode
});
if
(
isEditMode
===
true
)
{
if
(
isEditMode
===
true
)
{
getAreaTreeAction
().
then
(
treeData
=>
{
getAreaTreeAction
().
then
(
treeData
=>
{
this
.
generateList
(
treeData
)
this
.
generateList
(
treeData
)
;
this
.
setState
({
this
.
setState
({
treeData
:
treeData
||
[]
treeData
:
treeData
||
[]
});
});
...
@@ -1452,7 +1477,7 @@ class View3D extends Component {
...
@@ -1452,7 +1477,7 @@ class View3D extends Component {
// markers[markerType] = d;
// markers[markerType] = d;
this
.
setState
({
this
.
setState
({
markers
,
markers
,
markerType
:
"impEquipmentMode"
markerType
:
'impEquipmentMode'
});
});
return
;
return
;
});
});
...
@@ -1519,17 +1544,19 @@ class View3D extends Component {
...
@@ -1519,17 +1544,19 @@ class View3D extends Component {
this
.
props
.
editModelChange
(
false
);
//显示全景统计
this
.
props
.
editModelChange
(
false
);
//显示全景统计
this
.
enableCamera
();
//恢复相机
this
.
enableCamera
();
//恢复相机
this
.
setState
({
this
.
setState
({
treeData
:
[],
treeData
:
[],
pageType
:
'region'
,
//区域
pageType
:
'region'
,
//区域
sideControlShow
:
false
,
//隐藏耳朵
sideControlShow
:
false
,
//隐藏耳朵
isShowActionBar
:
true
,
//显示工具栏
isShowActionBar
:
true
,
//显示工具栏
startLoadExceptionArea
:
true
,
//显示marker,
startLoadExceptionArea
:
true
,
//显示marker,
headerName
:
''
,
//设置头名称
headerName
:
''
,
//设置头名称
isEditMode
:
false
,
//推出编辑模式
isEditMode
:
false
,
//推出编辑模式
errorAreaId
:
''
,
errorAreaId
:
''
,
selectArea
:
""
,
//选中区域
dragItem
:
''
,
selectPoints
:
""
,
//选中点
selectArea
:
''
,
});
selectPoints
:
''
,
showRightPanel
:
false
});
}
}
handleExceptModel
=
(
type
,
areaId
)
=>
{
handleExceptModel
=
(
type
,
areaId
)
=>
{
let
{
isPointSave
,
isAreaSave
}
=
this
.
state
;
let
{
isPointSave
,
isAreaSave
}
=
this
.
state
;
...
@@ -1545,30 +1572,30 @@ class View3D extends Component {
...
@@ -1545,30 +1572,30 @@ class View3D extends Component {
});
});
}
else
if
(
type
===
'out_except_model'
){
}
else
if
(
type
===
'out_except_model'
){
this
.
stagePilot
.
positionCtl
.
clearDrag
();
this
.
stagePilot
.
positionCtl
.
clearDrag
();
if
(
isAreaSave
){
if
(
isAreaSave
){
this
.
setState
({
promptData
:
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
promptContent
:
`要在退出之前保存对风险区域的更改吗?`
,
type
:
'region'
,
btnType
:
'isSave'
,
isback
:
true
}
});
return
;
}
else
{
if
(
isPointSave
){
this
.
setState
({
promptData
:
{
{
promptvisible
:
true
,
promptvisible
:
true
,
promptContent
:
`要在退出之前保存对风险区域
的更改吗?`
,
promptContent
:
`要在退出之前保存对风险点
的更改吗?`
,
type
:
'region
'
,
type
:
'point
'
,
btnType
:
'isSave'
,
btnType
:
'isSave'
,
isback
:
true
isback
:
true
}
}
})
});
return
}
else
{
if
(
isPointSave
){
this
.
setState
({
promptData
:
{
promptvisible
:
true
,
promptContent
:
`要在退出之前保存对风险点的更改吗?`
,
type
:
'point'
,
btnType
:
'isSave'
,
isback
:
true
}
})
}
else
{
}
else
{
this
.
handleOutExceptModel
()
this
.
handleOutExceptModel
()
;
}
}
}
}
}
}
...
@@ -1604,7 +1631,7 @@ class View3D extends Component {
...
@@ -1604,7 +1631,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
){
...
@@ -1625,10 +1652,10 @@ class View3D extends Component {
...
@@ -1625,10 +1652,10 @@ class View3D extends Component {
}
}
closePromptModal
=
()
=>
{
closePromptModal
=
()
=>
{
this
.
setState
({
this
.
setState
({
promptData
:
{
promptvisible
:
false
},
promptData
:
{
promptvisible
:
false
},
isPointSave
:
false
,
isPointSave
:
false
,
isAreaSave
:
false
,}
isAreaSave
:
false
)
});
}
}
render
()
{
render
()
{
const
{
const
{
...
@@ -1648,7 +1675,6 @@ class View3D extends Component {
...
@@ -1648,7 +1675,6 @@ class View3D extends Component {
isShowActionBar
,
isShowActionBar
,
headerName
,
headerName
,
errorAreaId
,
errorAreaId
,
positionxyz
,
rightHeight
,
rightHeight
,
treeDataList
,
treeDataList
,
promptData
promptData
...
@@ -1692,10 +1718,11 @@ class View3D extends Component {
...
@@ -1692,10 +1718,11 @@ class View3D extends Component {
return
(
return
(
<
div
className
=
'ModuleEditPage'
>
<
div
className
=
'ModuleEditPage'
>
<
PromptModal
promptData
=
{
promptData
}
<
PromptModal
promptData
=
{
promptData
}
saveAreaData
=
{
this
.
saveAreaData
}
saveAreaData
=
{
this
.
saveAreaData
}
handleOutExceptModel
=
{
this
.
handleOutExceptModel
}
handleOutExceptModel
=
{
this
.
handleOutExceptModel
}
savePointData
=
{
this
.
savePointData
}
savePointData
=
{
this
.
savePointData
}
closePromptModal
=
{
this
.
closePromptModal
}
/
>
closePromptModal
=
{
this
.
closePromptModal
}
/
>
<
div
<
div
className
=
'designerBox'
className
=
'designerBox'
...
@@ -1748,7 +1775,7 @@ class View3D extends Component {
...
@@ -1748,7 +1775,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
&&
...
@@ -1788,10 +1815,10 @@ class View3D extends Component {
...
@@ -1788,10 +1815,10 @@ class View3D extends Component {
<
/div
>
<
/div
>
<
div
className
=
'rightBox'
>
<
div
className
=
'rightBox'
>
{
{
showRightPanel
&&
pageType
===
'region'
?
<
RightEditRegionPanel
detailData
=
{
selectArea
}
rightHeight
=
{
rightHeight
}
closeRightPanel
=
{()
=>
this
.
setState
({
showRightPanel
:
false
})}
changeRoutePath
=
{
this
.
changeRoutePath
}
routePathData
=
{
this
.
state
.
routePathData
}
/> : '
'
showRightPanel
&&
pageType
===
'region'
?
<
RightEditRegionPanel
detailData
=
{
selectArea
}
rightHeight
=
{
rightHeight
}
closeRightPanel
=
{()
=>
this
.
setState
({
showRightPanel
:
false
})}
changeRoutePath
=
{
this
.
changeRoutePath
}
routePathData
=
{
this
.
state
.
routePathData
}
/> : '
'
}
}
{
{
showRightPanel
&&
pageType
===
'point'
?
<
RightEditPointPanel
detailData
=
{
selectPoints
}
showRightPanel
=
{
showRightPanel
}
closeRightPanel
=
{()
=>
this
.
setState
({
showRightPanel
:
false
})}
markers
=
{
markers
}
changeMarkersData
=
{
this
.
changeMarkersData
}
/> : '
'
showRightPanel
&&
pageType
===
'point'
?
<
RightEditPointPanel
detailData
=
{
selectPoints
}
showRightPanel
=
{
showRightPanel
}
closeRightPanel
=
{()
=>
this
.
setState
({
showRightPanel
:
false
})}
markers
=
{
markers
}
changeMarkersData
=
{
this
.
changeMarkersData
}
/> : '
'
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
dbfb0677
...
@@ -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/moduleEditComponent/PointLeftTree.js
View file @
dbfb0677
/* eslint-disable react/prop-types */
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
Connect
,
Tree
,
Select
,
Search
,
Button
}
from
'amos-framework'
;
import
{
Connect
,
Tree
,
Select
,
Search
,
Button
}
from
'amos-framework'
;
...
@@ -29,15 +30,15 @@ class PointLeftTree extends Component {
...
@@ -29,15 +30,15 @@ class PointLeftTree extends Component {
this
.
state
=
{
this
.
state
=
{
// showScreenSaver: false //是否打开屏保
// showScreenSaver: false //是否打开屏保
expandedKeys
:
[],
expandedKeys
:
[],
autoExpandParent
:
true
,
autoExpandParent
:
true
,
checkedKeys
:
[],
checkedKeys
:
[],
selectedKeys
:
[],
selectedKeys
:
[],
treeData
:
[],
treeData
:
[],
pointTypeArr
:
[],
pointTypeArr
:
[],
pointType
:
''
,
pointType
:
''
,
treeDataList
:
[],
treeDataList
:
[],
searchValue
:
''
searchValue
:
''
};
};
}
}
...
@@ -53,27 +54,22 @@ class PointLeftTree extends Component {
...
@@ -53,27 +54,22 @@ class PointLeftTree extends Component {
// console.log(this.props)
// console.log(this.props)
}
}
componentWillUnmount
()
{
}
componentWillReceiveProps
(
nextProps
)
{
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
nextProps
)
console
.
log
(
nextProps
);
let
{
treeData
,
pointTypeArr
,
treeDataList
}
=
nextProps
;
let
{
treeData
,
treeDataList
}
=
nextProps
;
this
.
setState
({
this
.
setState
({
treeData
,
treeData
,
treeDataList
,
treeDataList
//pointTypeArr,
});
//pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
}
}
onSelectChange
=
(
value
,
item
)
=>
{
onSelectChange
=
(
value
,
item
)
=>
{
console
.
log
(
value
,
item
);
console
.
log
(
value
,
item
);
this
.
setState
({
pointType
:
value
})
this
.
setState
({
pointType
:
value
});
this
.
props
.
pointTypeChange
(
value
);
this
.
props
.
pointTypeChange
(
value
);
}
}
onSearchChange
=
e
=>
{
onSearchChange
=
e
=>
{
const
{
treeDataList
,
treeData
}
=
this
.
state
const
{
treeDataList
,
treeData
}
=
this
.
state
;
const
value
=
e
.
target
.
value
;
const
value
=
e
.
target
.
value
;
const
expandedKeys
=
treeDataList
const
expandedKeys
=
treeDataList
.
map
(
item
=>
{
.
map
(
item
=>
{
...
@@ -84,16 +80,13 @@ class PointLeftTree extends Component {
...
@@ -84,16 +80,13 @@ class PointLeftTree extends Component {
})
})
.
filter
((
item
,
i
,
self
)
=>
item
&&
self
.
indexOf
(
item
)
===
i
);
.
filter
((
item
,
i
,
self
)
=>
item
&&
self
.
indexOf
(
item
)
===
i
);
this
.
setState
({
this
.
setState
({
expandedKeys
,
expandedKeys
,
searchValue
:
value
,
searchValue
:
value
,
autoExpandParent
:
true
autoExpandParent
:
true
});
});
}
}
onExpand
=
(
expandedKeys
)
=>
{
onExpand
=
(
expandedKeys
)
=>
{
//console.log('onExpand', arguments);
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys.
this
.
setState
({
this
.
setState
({
expandedKeys
,
expandedKeys
,
autoExpandParent
:
false
autoExpandParent
:
false
...
@@ -107,10 +100,11 @@ class PointLeftTree extends Component {
...
@@ -107,10 +100,11 @@ class PointLeftTree extends Component {
}
}
// eslint-disable-next-line react/sort-comp
renderTreeNodes
=
(
data
)
=>
{
renderTreeNodes
=
(
data
)
=>
{
let
{
searchValue
}
=
this
.
state
let
{
searchValue
}
=
this
.
state
;
// console.log(data);
// console.log(data);
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
return
data
.
map
((
item
)
=>
{
return
data
.
map
((
item
)
=>
{
const
index
=
item
.
name
.
indexOf
(
searchValue
);
const
index
=
item
.
name
.
indexOf
(
searchValue
);
const
beforeStr
=
item
.
name
.
substr
(
0
,
index
);
const
beforeStr
=
item
.
name
.
substr
(
0
,
index
);
...
@@ -162,11 +156,12 @@ class PointLeftTree extends Component {
...
@@ -162,11 +156,12 @@ class PointLeftTree extends Component {
<
/span>
}
<
/span>
}
<
/div
>
<
/div
>
}
}
key
=
{
item
.
id
}
key
=
{
item
.
id
}
dataRef
=
{
item
}
dataRef
=
{
item
}
onDragStart
=
{()
=>
{
onDragStart
=
{()
=>
{
this
.
props
.
dragItemChange
(
item
)
this
.
props
.
dragItemChange
(
item
);
}}
>
}}
>
{
this
.
renderTreeNodes
(
item
.
children
)}
{
this
.
renderTreeNodes
(
item
.
children
)}
<
/TreeNode
>
<
/TreeNode
>
);
);
...
@@ -184,55 +179,52 @@ class PointLeftTree extends Component {
...
@@ -184,55 +179,52 @@ class PointLeftTree extends Component {
this
.
props
.
selectPointChange
(
selectItem
);
this
.
props
.
selectPointChange
(
selectItem
);
}
}
render
()
{
render
()
{
let
{
treeData
,
checkedPointsKeys
,
pointTypeArr
,
pointType
}
=
this
.
state
;
let
{
treeData
,
pointTypeArr
,
pointType
}
=
this
.
state
;
let
{
pageType
}
=
this
.
props
;
return
(
return
(
<
div
className
=
"leftTree"
>
<
div
className
=
"leftTree"
>
<
div
className
=
'leftContainer'
>
<
div
className
=
'leftContainer'
>
<
div
className
=
'topForm'
>
<
div
className
=
'topForm'
>
{(
pointType
!=
''
)
&&
{(
pointType
!==
''
)
&&
<
Select
onChange
=
{
this
.
onSelectChange
}
defaultValue
=
{
pointType
}
value
=
{
pointType
}
className
=
'leftSelect'
>
<
Select
onChange
=
{
this
.
onSelectChange
}
defaultValue
=
{
pointType
}
value
=
{
pointType
}
className
=
'leftSelect'
>
{
{
pointTypeArr
.
map
(
item
=>
{
pointTypeArr
.
map
(
(
item
)
=>
{
return
(
<
Option
className
=
'selectOption'
value
=
{
item
.
code
}
>
{
item
.
name
}
<
/Option>
)
return
(
<
Option
key
=
{
item
}
className
=
'selectOption'
value
=
{
item
.
code
}
>
{
item
.
name
}
<
/Option>
)
;
})
})
}
}
<
/Select
>
<
/Select
>
}
}
<
Search
className
=
'leftSearch'
icon
=
"search"
onChange
=
{
this
.
onSearchChange
}
onIconClick
=
{
this
.
onSearchChange
}
/
>
<
Search
className
=
'leftSearch'
icon
=
"search"
onChange
=
{
this
.
onSearchChange
}
onIconClick
=
{
this
.
onSearchChange
}
/
>
<
/div
>
<
/div
>
<
div
className
=
'treeBox'
>
<
div
className
=
'treeBox'
>
<
Tree
<
Tree
// checkable
selectable
// checkStrictly
onExpand
=
{
this
.
onExpand
}
selectable
=
{
true
}
expandedKeys
=
{
this
.
state
.
expandedKeys
}
onExpand
=
{
this
.
onExpand
}
autoExpandParent
=
{
this
.
state
.
autoExpandParent
}
expandedKeys
=
{
this
.
state
.
expandedKeys
}
onSelect
=
{
this
.
onTreeSelect
}
autoExpandParent
=
{
this
.
state
.
autoExpandParent
}
selectedKeys
=
{
this
.
state
.
selectedKeys
}
// onCheck={this.onCheck}
blockNode
// checkedKeys={checkedPointsKeys}
>
onSelect
=
{
this
.
onTreeSelect
}
{
this
.
renderTreeNodes
(
treeData
)}
selectedKeys
=
{
this
.
state
.
selectedKeys
}
<
/Tree
>
blockNode
<
/div
>
>
<
div
className
=
'bottomBtns'
>
{
this
.
renderTreeNodes
(
treeData
)}
<
Button
<
/Tree
>
className
=
'sureBtn'
<
/div
>
onClick
=
{()
=>
{
<
div
className
=
'bottomBtns'
>
this
.
props
.
savePointData
();
<
Button
}}
className
=
'sureBtn'
/
>
onClick
=
{()
=>
{
<
Button
this
.
props
.
savePointData
()
className
=
'deleteBtn'
}}
><
/Button
>
onClick
=
{()
=>
{
<
Button
this
.
props
.
deletePointBind
();
className
=
'deleteBtn'
}}
onClick
=
{()
=>
{
/
>
this
.
props
.
deletePointBind
()
}}
><
/Button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditRegionPanel.js
View file @
dbfb0677
...
@@ -89,7 +89,6 @@ class RightEditRegionPanel extends Component {
...
@@ -89,7 +89,6 @@ class RightEditRegionPanel extends Component {
this
.
form
.
validate
((
valid
,
dataValues
,
errors
)
=>
{
this
.
form
.
validate
((
valid
,
dataValues
,
errors
)
=>
{
console
.
log
(
'返回内容:'
,
dataValues
,
valid
,
errors
);
console
.
log
(
'返回内容:'
,
dataValues
,
valid
,
errors
);
if
(
valid
)
{
if
(
valid
)
{
let
routePathData
=
[
{
let
routePathData
=
[
{
riskSourceId
:
detailData
.
id
,
riskSourceId
:
detailData
.
id
,
routePath
:
JSON
.
stringify
({
routePath
:
JSON
.
stringify
({
...
@@ -106,8 +105,10 @@ class RightEditRegionPanel extends Component {
...
@@ -106,8 +105,10 @@ class RightEditRegionPanel extends Component {
})
})
}
}
this
.
props
.
changeRoutePath
(
routePathDataNode
);
this
.
props
.
changeRoutePath
(
routePathDataNode
);
this
.
props
.
closeRightPanel
()
}
else
{
}
else
{
console
.
log
(
'error submit!!'
);
console
.
log
(
'error submit!!'
);
this
.
props
.
closeRightPanel
()
return
false
;
return
false
;
}
}
});
});
...
...
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
dbfb0677
...
@@ -15,10 +15,10 @@ const getIcon = (markerType, level) => {
...
@@ -15,10 +15,10 @@ const getIcon = (markerType, level) => {
if
(
markerType
===
'riskSource'
||
markerType
===
'patrol'
||
markerType
===
'impEquipmentMode'
)
{
if
(
markerType
===
'riskSource'
||
markerType
===
'patrol'
||
markerType
===
'impEquipmentMode'
)
{
return
marker3DIoncMapper
[
`
${
markerType
}
_
${
level
}
`
];
return
marker3DIoncMapper
[
`
${
markerType
}
_
${
level
}
`
];
}
}
return
marker3DIoncMapper
[
`
${
markerType
}
`
]
return
marker3DIoncMapper
[
`
${
markerType
}
`
]
;
};
};
const
createMarkerLabel
=
(
text
)
=>
{
const
createMarkerLabel
=
text
=>
{
const
div
=
document
.
createElement
(
'div'
);
const
div
=
document
.
createElement
(
'div'
);
div
.
style
.
position
=
'absolute'
;
div
.
style
.
position
=
'absolute'
;
div
.
style
.
marginTop
=
'-3rem'
;
div
.
style
.
marginTop
=
'-3rem'
;
...
@@ -27,18 +27,17 @@ const createMarkerLabel = (text) => {
...
@@ -27,18 +27,17 @@ const createMarkerLabel = (text) => {
return
div
;
return
div
;
};
};
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
:
'消防栓'
},
pool
:
{
file
:
'pool'
,
label
:
'灭火水池'
},
pool
:
{
file
:
'pool'
,
label
:
'灭火水池'
}
};
};
export
default
function
marker3DFactory
(
WrappedComponent
=
'div'
,
options
){
export
default
function
marker3DFactory
(
WrappedComponent
=
'div'
,
options
)
{
const
{
markerType
,
markerParams
}
=
options
;
const
{
markerType
,
markerParams
}
=
options
;
class
MarkerPoints
extends
Component
{
class
MarkerPoints
extends
Component
{
static
propTypes
=
{
static
propTypes
=
{
// marker 显隐
// marker 显隐
visible
:
PropTypes
.
bool
,
visible
:
PropTypes
.
bool
,
...
@@ -52,25 +51,25 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -52,25 +51,25 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
click
:
this
.
onMarkerClick
,
click
:
this
.
onMarkerClick
,
// dblclick: this.onMarkerDblClick,
// dblclick: this.onMarkerDblClick,
dragend
:
this
.
markerDragend
,
dragend
:
this
.
markerDragend
,
mouseover
:
(
marker
)
=>
{
mouseover
:
marker
=>
{
console
.
log
(
'111'
)
console
.
log
(
'111'
)
;
if
(
marker
.
object2DPipe
)
{
if
(
marker
.
object2DPipe
)
{
marker
.
object2DPipe
.
pipeNode
.
visible
=
true
;
marker
.
object2DPipe
.
pipeNode
.
visible
=
true
;
marker
.
object2DPipe
.
pipeNode
.
elementVisible
=
true
;
marker
.
object2DPipe
.
pipeNode
.
elementVisible
=
true
;
marker
.
object2DPipe
.
toggleDisplay
(
true
);
marker
.
object2DPipe
.
toggleDisplay
(
true
);
}
}
if
(
marker
.
extData
.
type
===
'riskSource'
)
{
if
(
marker
.
extData
.
type
===
'riskSource'
)
{
marker
.
baseObjHelper
.
title
=
marker
.
extData
.
name
;
marker
.
baseObjHelper
.
title
=
marker
.
extData
.
name
;
marker
.
object2DPipe
&&
marker
.
object2DPipe
.
toggleDisplay
(
true
);
marker
.
object2DPipe
&&
marker
.
object2DPipe
.
toggleDisplay
(
true
);
}
}
},
},
mouseout
:
(
marker
)
=>
{
mouseout
:
marker
=>
{
if
(
marker
.
object2DPipe
)
{
if
(
marker
.
object2DPipe
)
{
marker
.
object2DPipe
.
pipeNode
.
visible
=
false
;
marker
.
object2DPipe
.
pipeNode
.
visible
=
false
;
marker
.
object2DPipe
.
pipeNode
.
elementVisible
=
false
;
marker
.
object2DPipe
.
pipeNode
.
elementVisible
=
false
;
marker
.
object2DPipe
.
toggleDisplay
(
false
);
marker
.
object2DPipe
.
toggleDisplay
(
false
);
}
}
if
(
marker
.
extData
.
type
===
'riskSource'
)
{
if
(
marker
.
extData
.
type
===
'riskSource'
)
{
marker
.
baseObjHelper
.
title
=
marker
.
extData
.
title
;
marker
.
baseObjHelper
.
title
=
marker
.
extData
.
title
;
marker
.
object2DPipe
.
toggleDisplay
(
false
);
marker
.
object2DPipe
.
toggleDisplay
(
false
);
}
}
...
@@ -83,41 +82,44 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -83,41 +82,44 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
componentWillMount
=
()
=>
{
componentWillMount
=
()
=>
{
this
.
setState
({
planStarted
:
this
.
props
.
planStarted
});
this
.
setState
({
planStarted
:
this
.
props
.
planStarted
});
}
}
;
componentWillReceiveProps
=
nextProps
=>
{
componentWillReceiveProps
=
nextProps
=>
{
if
(
nextProps
.
isEditMode
)
{
if
(
nextProps
.
isEditMode
)
{
this
.
markersCache
.
eachValue
(
obj
=>
{
this
.
markersCache
.
eachValue
(
obj
=>
{
// this.setTopCardConf(obj, obj.extData);
// this.setTopCardConf(obj, obj.extData);
if
(
nextProps
.
selectPoints
.
type
==
obj
.
extData
.
type
&&
nextProps
.
selectPoints
.
id
==
obj
.
extData
.
id
)
{
if
(
nextProps
.
selectPoints
.
type
==
obj
.
extData
.
type
&&
nextProps
.
selectPoints
.
id
==
obj
.
extData
.
id
)
{
this
.
setTwinkleConf
(
obj
);
this
.
setTwinkleConf
(
obj
);
}
}
});
});
}
}
this
.
setState
({
planStarted
:
nextProps
.
planStarted
});
this
.
setState
({
planStarted
:
nextProps
.
planStarted
});
}
}
;
componentWillUnmount
()
{
componentWillUnmount
()
{
this
.
objAnchorHelper
&&
this
.
objAnchorHelper
.
destroy
();
this
.
objAnchorHelper
&&
this
.
objAnchorHelper
.
destroy
();
}
}
onMarkerDblClick
=
(
marker
,
e
)
=>
{
onMarkerDblClick
=
(
marker
,
e
)
=>
{
console
.
log
(
'marker3DFactory'
,
'onMarkerDblClick'
)
console
.
log
(
'marker3DFactory'
,
'onMarkerDblClick'
);
if
(
this
.
props
.
isEditMode
)
{
if
(
this
.
props
.
isEditMode
)
{
return
false
return
false
;
}
}
clearTimeout
(
this
.
time
);
clearTimeout
(
this
.
time
);
// tirggerPlanTopic(CONSTS.plan_detail, { type: marker.extData.type, data: marker.extData });
// tirggerPlanTopic(CONSTS.plan_detail, { type: marker.extData.type, data: marker.extData });
if
(
marker
.
extData
.
markerType
===
'fire'
&&
void
0
!==
marker
.
extData
.
show
)
{
if
(
marker
.
extData
.
markerType
===
'fire'
&&
void
0
!==
marker
.
extData
.
show
)
{
tirggerTransTopic
(
CONSTS
.
forward
,
{
details
:
{
type
:
'impEquipment'
,
dialogId
:
marker
.
extData
.
equipmentId
,
show
:
marker
.
extData
.
show
},
dateTime
:
Date
.
now
()
});
tirggerTransTopic
(
CONSTS
.
forward
,
{
details
:
{
type
:
'impEquipment'
,
dialogId
:
marker
.
extData
.
equipmentId
,
show
:
marker
.
extData
.
show
},
dateTime
:
Date
.
now
()
});
return
;
return
;
}
}
this
.
pdRef
.
tirggerBussines
(
marker
);
this
.
pdRef
.
tirggerBussines
(
marker
);
}
}
;
onMarkerClick
=
(
marker
,
e
)
=>
{
onMarkerClick
=
(
marker
,
e
)
=>
{
const
{
isClick
}
=
this
.
state
;
const
{
isClick
}
=
this
.
state
;
if
(
this
.
props
.
isEditMode
)
{
if
(
this
.
props
.
isEditMode
)
{
return
false
return
false
;
}
}
tirggerPlanTopic
(
CONSTS
.
plan_detail
,
{
type
:
marker
.
extData
.
type
,
data
:
marker
.
extData
});
tirggerPlanTopic
(
CONSTS
.
plan_detail
,
{
type
:
marker
.
extData
.
type
,
data
:
marker
.
extData
});
...
@@ -125,7 +127,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -125,7 +127,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
this
.
setState
({
isClick
:
false
});
//将isClick 变成false,将不会执行处理事件
this
.
setState
({
isClick
:
false
});
//将isClick 变成false,将不会执行处理事件
// this.pdRef && this.pdRef.onOpenClick(marker);
// this.pdRef && this.pdRef.onOpenClick(marker);
this
.
time
=
setTimeout
(()
=>
this
.
pdRef
&&
this
.
pdRef
.
onOpenClick
(
marker
),
1000
);
this
.
time
=
setTimeout
(()
=>
this
.
pdRef
&&
this
.
pdRef
.
onOpenClick
(
marker
),
1000
);
}
else
{
}
else
{
this
.
onMarkerDblClick
(
marker
,
e
);
this
.
onMarkerDblClick
(
marker
,
e
);
}
}
const
that
=
this
;
// 为定时器中的setState绑定this
const
that
=
this
;
// 为定时器中的setState绑定this
...
@@ -133,50 +135,51 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -133,50 +135,51 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
// 设置延迟事件,3秒后将执行
// 设置延迟事件,3秒后将执行
that
.
setState
({
isClick
:
true
});
// 将isClick设置为true
that
.
setState
({
isClick
:
true
});
// 将isClick设置为true
},
1000
);
},
1000
);
}
}
;
markerDragend
=
(
marker
,
evt
)
=>
{
markerDragend
=
(
marker
,
evt
)
=>
{
if
(
marker
){
if
(
marker
)
{
console
.
log
(
marker
.
position
);
console
.
log
(
marker
.
position
);
console
.
log
(
marker
.
extData
);
console
.
log
(
marker
.
extData
);
this
.
props
.
addMarker
(
marker
);
this
.
props
.
addMarker
(
marker
);
}
}
}
}
;
markerCreated
=
({
markersCache
})
=>
{
markerCreated
=
({
markersCache
})
=>
{
let
{
isEditMode
,
selectKey
}
=
this
.
props
;
let
{
isEditMode
,
selectKey
}
=
this
.
props
;
this
.
markersCache
=
markersCache
;
this
.
markersCache
=
markersCache
;
this
.
stagePilot
=
this
.
props
.
stagePilot
;
this
.
stagePilot
=
this
.
props
.
stagePilot
;
this
.
outlineHelper
=
this
.
stagePilot
?
this
.
stagePilot
.
outlineHelper
:
undefined
;
this
.
outlineHelper
=
this
.
stagePilot
?
this
.
stagePilot
.
outlineHelper
:
undefined
;
markersCache
.
eachValue
(
obj
=>
{
markersCache
.
eachValue
(
obj
=>
{
this
.
setTopCardConf
(
obj
,
obj
.
extData
);
this
.
setTopCardConf
(
obj
,
obj
.
extData
);
if
(
obj
.
extData
.
type
===
"riskSource"
&&
markerType
!=
'impEquipmentMode'
&&
!
isEditMode
)
{
if
(
obj
.
extData
.
type
===
'riskSource'
&&
markerType
!=
'impEquipmentMode'
&&
!
isEditMode
)
{
this
.
setTwinkleConf
(
obj
);
this
.
setTwinkleConf
(
obj
);
}
}
});
});
}
}
;
setTwinkleConf
=
(
obj
)
=>
{
setTwinkleConf
=
obj
=>
{
const
{
twinkle
,
frequency
}
=
obj
.
extData
;
const
{
twinkle
,
frequency
}
=
obj
.
extData
;
let
pulsePeriod
=
(
twinkle
&&
frequency
!=
0
?
1
/
frequency
:
null
)
let
pulsePeriod
=
twinkle
&&
frequency
!=
0
?
1
/
frequency
:
null
;
let
color
=
twinkle
&&
frequency
!=
0
?
'#FF0000'
:
null
;
let
color
=
twinkle
&&
frequency
!=
0
?
'#FF0000'
:
null
;
if
(
!
obj
.
baseObjHelper
.
outlineHelper
){
if
(
!
obj
.
baseObjHelper
.
outlineHelper
)
{
obj
.
baseObjHelper
.
setOutlineHelper
(
this
.
outlineHelper
);
obj
.
baseObjHelper
.
setOutlineHelper
(
this
.
outlineHelper
);
}
}
obj
.
baseObjHelper
.
style
.
outlineColor
=
color
;
obj
.
baseObjHelper
.
style
.
outlineColor
=
color
;
pulsePeriod
&&
obj
.
baseObjHelper
.
outlineHelper
.
setConfig
({
pulsePeriod
&&
pulsePeriod
:
pulsePeriod
.
toFixed
(
2
)
obj
.
baseObjHelper
.
outlineHelper
.
setConfig
({
});
pulsePeriod
:
pulsePeriod
.
toFixed
(
2
)
}
});
};
setTopCardConf
=
(
obj
,
extData
)
=>
{
setTopCardConf
=
(
obj
,
extData
)
=>
{
const
{
title
,
label
,
type
,
showInfo
,
name
}
=
extData
;
const
{
title
,
label
,
type
,
showInfo
,
name
}
=
extData
;
let
cardTitle
=
null
;
let
cardTitle
=
null
;
console
.
log
(
extData
)
console
.
log
(
extData
)
;
obj
.
baseObjHelper
.
titleConfig
=
{
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
// 顶牌平面参数
planeOptions
:
{
planeOptions
:
{
width
:
40
,
width
:
40
,
height
:
20
,
height
:
20
,
position
:
[
0
,
20
,
0
],
position
:
[
0
,
20
,
0
],
doubleSide
:
true
doubleSide
:
true
},
},
canvasOptions
:
{
canvasOptions
:
{
...
@@ -190,36 +193,36 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -190,36 +193,36 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
imgHeight
:
128
,
imgHeight
:
128
,
image
:
markerTitleBgMapper
[
'base'
]
image
:
markerTitleBgMapper
[
'base'
]
};
};
if
(
type
===
'riskSource'
&&
!
this
.
props
.
isEditMode
)
{
if
(
type
===
'riskSource'
&&
!
this
.
props
.
isEditMode
)
{
cardTitle
=
'风险值'
+
title
cardTitle
=
'风险值'
+
title
;
}
else
{
}
else
{
cardTitle
=
name
?
name
:
title
;
cardTitle
=
name
?
name
:
title
;
}
}
obj
.
baseObjHelper
.
title
=
cardTitle
;
obj
.
baseObjHelper
.
title
=
cardTitle
;
}
}
;
buildMarkerOptions
=
(
markers
,
markerType
,
defaultParams
=
{})
=>
{
buildMarkerOptions
=
(
markers
,
markerType
,
defaultParams
=
{})
=>
{
console
.
log
(
markers
)
console
.
log
(
markers
)
;
const
{
isEditMode
}
=
this
.
props
;
const
{
isEditMode
}
=
this
.
props
;
if
(
!
utils
.
isEmpty
(
markers
)){
if
(
!
utils
.
isEmpty
(
markers
))
{
markers
.
forEach
(
m
=>
{
markers
.
forEach
(
m
=>
{
const
url
=
getIcon
(
markerType
,
m
.
level
);
const
url
=
getIcon
(
markerType
,
m
.
level
);
let
position
;
let
position
;
if
(
!
utils
.
isArray
(
m
.
position
)){
if
(
!
utils
.
isArray
(
m
.
position
))
{
position
=
Object
.
values
(
m
.
position
);
position
=
Object
.
values
(
m
.
position
);
}
}
for
(
let
k
of
Object
.
keys
(
defaultParams
))
{
for
(
let
k
of
Object
.
keys
(
defaultParams
))
{
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!=
'useModel'
&&
!
isEditMode
)
{
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!==
'useModel'
&&
!
isEditMode
)
{
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-
${
m
.
level
}
`
});
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-
${
m
.
level
}
`
});
}
else
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!=
'useModel'
&&
isEditMode
)
{
}
else
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!==
'useModel'
&&
isEditMode
)
{
if
(
markerType
===
'riskSource'
)
{
if
(
markerType
===
'riskSource'
)
{
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-4`
});
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-4`
});
}
else
{
}
else
{
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-1`
});
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-1`
});
}
}
}
else
if
(
markerType
===
'fireResource'
&&
k
!=
'useModel'
&&
isEditMode
&&
urlMapper
[
m
.
type
])
{
}
else
if
(
markerType
===
'fireResource'
&&
k
!==
'useModel'
&&
isEditMode
&&
urlMapper
[
m
.
type
])
{
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
urlMapper
[
m
.
type
].
file
}
`
});
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
urlMapper
[
m
.
type
].
file
}
`
});
}
else
{
}
else
{
m
[
k
]
=
defaultParams
[
k
];
m
[
k
]
=
defaultParams
[
k
];
}
}
}
}
...
@@ -236,21 +239,15 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
...
@@ -236,21 +239,15 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
};
};
render
()
{
render
()
{
const
{
markers
,
isEditMode
,
...
rest
}
=
this
.
props
;
const
{
markers
,
isEditMode
,
...
rest
}
=
this
.
props
;
const
{
planStarted
}
=
this
.
state
;
const
{
planStarted
}
=
this
.
state
;
let
dialogStyle
=
{
zIndex
:
1000
};
let
dialogStyle
=
{
zIndex
:
1000
};
const
result
=
this
.
buildMarkerOptions
(
markers
,
markerType
,
markerParams
);
const
result
=
this
.
buildMarkerOptions
(
markers
,
markerType
,
markerParams
);
return
(
return
(
<
WrappedComponent
>
<
WrappedComponent
>
<
Markers
<
Markers
{...
rest
}
draggable
=
{
isEditMode
}
markers
=
{
result
}
events
=
{
this
.
markerEvents
}
onCreated
=
{
this
.
markerCreated
}
/
>
{...
rest
}
{
!
planStarted
&&
<
PointDialog
style
=
{
dialogStyle
}
ref
=
{
node
=>
(
this
.
pdRef
=
node
)}
/>
}
draggable
=
{
isEditMode
}
markers
=
{
result
}
events
=
{
this
.
markerEvents
}
onCreated
=
{
this
.
markerCreated
}
/
>
{
!
planStarted
&&
<
PointDialog
style
=
{
dialogStyle
}
ref
=
{
node
=>
this
.
pdRef
=
node
}
/>
}
<
/WrappedComponent
>
<
/WrappedComponent
>
);
);
}
}
...
...
mods/components/3dviewConvertor/view/searchPane/index.js
View file @
dbfb0677
...
@@ -20,73 +20,73 @@ const getColumns = (self,retrieveType) => {
...
@@ -20,73 +20,73 @@ const getColumns = (self,retrieveType) => {
switch
(
retrieveType
)
{
switch
(
retrieveType
)
{
case
'riskSource'
:
case
'riskSource'
:
return
[
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'等级'
,
dataIndex
:
'levelStr'
,
key
:
'level'
,
width
:
'25%'
},
{
title
:
'等级'
,
dataIndex
:
'levelStr'
,
key
:
'level'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
];
];
case
'patrol'
:
case
'patrol'
:
return
[
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'16.5%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'16.5%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'16.5%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'16.5%'
},
{
title
:
'路线'
,
dataIndex
:
'routeName'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'路线'
,
dataIndex
:
'routeName'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'状态'
,
dataIndex
:
'title'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'状态'
,
dataIndex
:
'title'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'责任人'
,
dataIndex
:
'person'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'责任人'
,
dataIndex
:
'person'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'16.5%'
}
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'16.5%'
}
];
];
case
'monitorEquipment'
:
case
'monitorEquipment'
:
return
[
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
]
]
;
case
'video'
:
case
'video'
:
return
[
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
]
]
;
default
:
default
:
return
[
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'33%'
},
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'33%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'33%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'33%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'33%'
}
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'33%'
}
];
];
}
}
};
};
const
getMsgColumns
=
()
=>
{
const
getMsgColumns
=
()
=>
{
return
[
return
[
{
title
:
'标题'
,
dataIndex
:
'title'
,
key
:
'title'
,
width
:
'15%'
},
{
title
:
'标题'
,
dataIndex
:
'title'
,
key
:
'title'
,
width
:
'15%'
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
'15%'
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
'15%'
},
{
title
:
'时间'
,
dataIndex
:
'timeStr'
,
key
:
'timeStr'
,
width
:
'15%'
},
{
title
:
'时间'
,
dataIndex
:
'timeStr'
,
key
:
'timeStr'
,
width
:
'15%'
},
{
title
:
'内容'
,
dataIndex
:
'content'
,
key
:
'content'
,
width
:
'55%'
}
{
title
:
'内容'
,
dataIndex
:
'content'
,
key
:
'content'
,
width
:
'55%'
}
]
]
;
}
}
;
const
getRecordColumns
=
()
=>
{
const
getRecordColumns
=
()
=>
{
return
[
return
[
{
title
:
'名称'
,
dataIndex
:
'fire_Equipment_Name'
,
key
:
'name'
,
width
:
'33%'
},
{
title
:
'名称'
,
dataIndex
:
'fire_Equipment_Name'
,
key
:
'name'
,
width
:
'33%'
},
{
title
:
'时间'
,
dataIndex
:
'create_time'
,
key
:
'create_time'
,
width
:
'33%'
},
{
title
:
'时间'
,
dataIndex
:
'create_time'
,
key
:
'create_time'
,
width
:
'33%'
},
{
title
:
'重点设备'
,
dataIndex
:
'equipment_Name'
,
key
:
'equipment_Name'
,
width
:
'33%'
}
{
title
:
'重点设备'
,
dataIndex
:
'equipment_Name'
,
key
:
'equipment_Name'
,
width
:
'33%'
}
]
]
;
}
}
;
const
getTrajectoryColumns
=
()
=>
{
const
getTrajectoryColumns
=
()
=>
{
return
[
return
[
{
title
:
'巡检人'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
'33%'
},
{
title
:
'巡检人'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
'33%'
},
{
title
:
'时间'
,
dataIndex
:
'checkTime'
,
key
:
'checkTime'
,
width
:
'33%'
},
{
title
:
'时间'
,
dataIndex
:
'checkTime'
,
key
:
'checkTime'
,
width
:
'33%'
},
{
title
:
'轨迹'
,
dataIndex
:
'pointName'
,
key
:
'pointName'
,
width
:
'33%'
}
{
title
:
'轨迹'
,
dataIndex
:
'pointName'
,
key
:
'pointName'
,
width
:
'33%'
}
]
]
;
}
}
;
const
tabs
=
[
const
tabs
=
[
{
id
:
'1'
,
key
:
'search'
,
closable
:
false
,
title
:
'检索'
},
{
id
:
'1'
,
key
:
'search'
,
closable
:
false
,
title
:
'检索'
},
{
id
:
'2'
,
key
:
'message'
,
closable
:
false
,
title
:
'消息'
},
{
id
:
'2'
,
key
:
'message'
,
closable
:
false
,
title
:
'消息'
},
{
id
:
'3'
,
key
:
'record'
,
closable
:
false
,
title
:
'步骤'
},
{
id
:
'3'
,
key
:
'record'
,
closable
:
false
,
title
:
'步骤'
},
{
id
:
'4'
,
key
:
'trajectory'
,
closable
:
false
,
title
:
'轨迹'
}
,
{
id
:
'4'
,
key
:
'trajectory'
,
closable
:
false
,
title
:
'轨迹'
}
];
];
class
SearchPane
extends
Component
{
class
SearchPane
extends
Component
{
...
@@ -110,21 +110,19 @@ class SearchPane extends Component {
...
@@ -110,21 +110,19 @@ class SearchPane extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
type
}
=
this
.
props
;
const
{
activeKey
}
=
this
.
state
;
this
.
fetchRetrieveData
();
this
.
fetchRetrieveData
();
}
}
paramsOnChange
=
(
filter
)
=>
{
paramsOnChange
=
(
filter
)
=>
{
const
{
activeKey
}
=
this
.
state
;
const
{
activeKey
}
=
this
.
state
;
if
(
activeKey
===
'search'
){
if
(
activeKey
===
'search'
){
this
.
setState
({
filter
},
this
.
fetchRetrieveData
);
this
.
setState
({
filter
},
this
.
fetchRetrieveData
);
}
else
if
(
activeKey
===
'message'
){
}
else
if
(
activeKey
===
'message'
){
this
.
setState
({
filter
},
this
.
fetchMsgData
);
this
.
setState
({
filter
},
this
.
fetchMsgData
);
}
else
if
(
activeKey
===
'record'
){
}
else
if
(
activeKey
===
'record'
){
this
.
setState
({
filter
},
this
.
fetchRecordData
);
this
.
setState
({
filter
},
this
.
fetchRecordData
);
}
else
if
(
activeKey
===
'trajectory'
){
}
else
if
(
activeKey
===
'trajectory'
){
this
.
setState
({
filter
},
this
.
fetchTrajectoryData
);
this
.
setState
({
filter
},
this
.
fetchTrajectoryData
);
}
}
}
}
...
@@ -146,16 +144,16 @@ class SearchPane extends Component {
...
@@ -146,16 +144,16 @@ class SearchPane extends Component {
onTabClick
=
(
value
)
=>
{
onTabClick
=
(
value
)
=>
{
this
.
pageConfig
.
current
=
0
;
this
.
pageConfig
.
current
=
0
;
if
(
value
===
'search'
){
if
(
value
===
'search'
){
this
.
fetchRetrieveData
();
this
.
fetchRetrieveData
();
}
else
if
(
value
===
'message'
){
}
else
if
(
value
===
'message'
){
this
.
fetchMsgData
();
this
.
fetchMsgData
();
}
else
if
(
value
===
'record'
){
}
else
if
(
value
===
'record'
){
this
.
fetchRecordData
();
this
.
fetchRecordData
();
}
else
if
(
value
===
'trajectory'
){
}
else
if
(
value
===
'trajectory'
){
this
.
fetchTrajectoryData
()
this
.
fetchTrajectoryData
()
;
}
}
this
.
setState
({
activeKey
:
value
,
filter
:
[]
});
this
.
setState
({
activeKey
:
value
,
filter
:
[]
});
}
}
getPanelHeight
=
()
=>
{
getPanelHeight
=
()
=>
{
...
@@ -165,14 +163,14 @@ class SearchPane extends Component {
...
@@ -165,14 +163,14 @@ class SearchPane extends Component {
fetchTrajectoryData
=
()
=>
{
fetchTrajectoryData
=
()
=>
{
const
{
filter
}
=
this
.
state
;
const
{
filter
}
=
this
.
state
;
recordAction
(
filter
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
recordAction
(
filter
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
this
.
setState
({
trajectoryDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
this
.
setState
({
trajectoryDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
});
});
}
}
//步骤
//步骤
fetchRecordData
=
()
=>
{
fetchRecordData
=
()
=>
{
const
{
filter
}
=
this
.
state
;
const
{
filter
}
=
this
.
state
;
exeRecordAction
(
filter
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
exeRecordAction
(
filter
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
this
.
setState
({
recordDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
this
.
setState
({
recordDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
});
});
}
}
//消息
//消息
...
@@ -189,7 +187,7 @@ class SearchPane extends Component {
...
@@ -189,7 +187,7 @@ class SearchPane extends Component {
}
}
});
});
msgAction
(
searchParam
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
msgAction
(
searchParam
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
this
.
setState
({
msgDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
this
.
setState
({
msgDataList
:
d
.
content
,
totalCount
:
d
.
totalElements
});
});
});
}
}
//检索
//检索
...
@@ -205,7 +203,7 @@ class SearchPane extends Component {
...
@@ -205,7 +203,7 @@ class SearchPane extends Component {
(
filter
||
[]
).
forEach
((
item
,
i
)
=>
{
(
filter
||
[]
).
forEach
((
item
,
i
)
=>
{
if
(
item
.
name
===
'type'
)
{
if
(
item
.
name
===
'type'
)
{
type
=
item
.
value
;
type
=
item
.
value
;
this
.
setState
({
retrieveType
:
type
})
this
.
setState
({
retrieveType
:
type
})
;
}
else
if
(
item
.
name
===
'dataLevel'
)
{
}
else
if
(
item
.
name
===
'dataLevel'
)
{
dataLevel
=
item
.
value
;
dataLevel
=
item
.
value
;
}
else
if
(
item
.
name
===
'nodeState'
)
{
}
else
if
(
item
.
name
===
'nodeState'
)
{
...
@@ -222,8 +220,8 @@ class SearchPane extends Component {
...
@@ -222,8 +220,8 @@ class SearchPane extends Component {
searchAction
(
inputText
,
dataLevel
,
orgCode
,
nodeState
,
protectObjName
,
routeName
,
type
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
searchAction
(
inputText
,
dataLevel
,
orgCode
,
nodeState
,
protectObjName
,
routeName
,
type
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
this
.
setState
({
this
.
setState
({
dataList
:
d
.
content
,
dataList
:
d
.
content
,
totalCount
:
d
.
totalElements
,
totalCount
:
d
.
totalElements
})
});
});
});
}
}
...
@@ -239,8 +237,8 @@ class SearchPane extends Component {
...
@@ -239,8 +237,8 @@ class SearchPane extends Component {
onRetrieveRowDoubleClick
=
(
record
)
=>
{
onRetrieveRowDoubleClick
=
(
record
)
=>
{
// 更新视图数据
// 更新视图数据
let
views
=
new
Array
();
let
views
=
new
Array
();
if
(
record
.
position
){
if
(
record
.
position
){
record
.
id
=
record
.
id
.
replace
(
record
.
type
+
'-'
,
''
);
record
.
id
=
record
.
id
.
replace
(
`
${
record
.
type
}
-`
,
''
);
views
.
push
(
record
);
views
.
push
(
record
);
let
args
=
{
let
args
=
{
target
:
views
,
target
:
views
,
...
@@ -248,20 +246,27 @@ class SearchPane extends Component {
...
@@ -248,20 +246,27 @@ class SearchPane extends Component {
};
};
update3DViewData
(
args
);
update3DViewData
(
args
);
this
.
props
.
focusPosition
(
this
.
toCameraPosition
(
record
.
position
));
this
.
props
.
focusPosition
(
this
.
toCameraPosition
(
record
.
position
));
}
else
{
}
else
{
message
.
danger
(
'坐标未绑定!!!'
);
message
.
danger
(
'坐标未绑定!!!'
);
}
}
}
}
toCameraPosition
=
(
item
)
=>
{
toCameraPosition
=
(
item
)
=>
{
return
{
x
:
item
.
x
,
y
:
item
.
y
+
200
,
z
:
item
.
z
+
200
}
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
;
}
}
}
render
()
{
render
()
{
const
{
dataList
,
activeKey
,
retrieveType
,
totalCount
,
msgDataList
,
recordDataList
,
trajectoryDataList
}
=
this
.
state
;
const
{
dataList
,
activeKey
,
retrieveType
,
totalCount
,
msgDataList
,
recordDataList
,
trajectoryDataList
}
=
this
.
state
;
return
(
return
(
<
div
>
<
div
>
{
this
.
props
.
visible
&&
<
div
className
=
"search-pane-bg"
/>
}
{
this
.
props
.
visible
&&
<
div
className
=
"search-pane-bg"
/>
}
{
this
.
props
.
visible
&&
<
SidePane
className
=
"search-pane"
>
{
this
.
props
.
visible
&&
<
SidePane
className
=
"search-pane"
>
<
div
className
=
"search-pane-close"
onClick
=
{
this
.
props
.
changeSearchPaneVisible
()}
>
<
div
className
=
"search-pane-close"
onClick
=
{
this
.
props
.
changeSearchPaneVisible
()}
>
<
Icon
icon
=
"close"
/>
<
Icon
icon
=
"close"
/>
...
@@ -276,23 +281,23 @@ class SearchPane extends Component {
...
@@ -276,23 +281,23 @@ class SearchPane extends Component {
<
Tab
key
=
{
item
.
key
}
activeKey
=
{
item
.
key
}
closable
=
{
item
.
closable
}
>
{
item
.
title
}
<
/Tab>
)
<
Tab
key
=
{
item
.
key
}
activeKey
=
{
item
.
key
}
closable
=
{
item
.
closable
}
>
{
item
.
title
}
<
/Tab>
)
)}
)}
<
/TabList
>
<
/TabList
>
<
ParamsHeader
paramsOnChange
=
{
this
.
paramsOnChange
}
activeKey
=
{
activeKey
}
/
>
<
ParamsHeader
paramsOnChange
=
{
this
.
paramsOnChange
}
activeKey
=
{
activeKey
}
/
>
<
TabPanel
activeKey
=
"search"
>
<
TabPanel
activeKey
=
"search"
>
{
/* <div className="search-pane-table"> */
}
{
/* <div className="search-pane-table"> */
}
<
AmosGridTable
<
AmosGridTable
rowKey
=
"id"
rowKey
=
"id"
columns
=
{
getColumns
(
this
,
retrieveType
)}
columns
=
{
getColumns
(
this
,
retrieveType
)}
getTableDataAction
=
{()
=>
{}}
getTableDataAction
=
{()
=>
{}}
callBack
=
{
this
.
reload
}
callBack
=
{
this
.
reload
}
isPageable
=
{
true
}
isPageable
setPageConfig
=
{
this
.
setPageConfig
}
setPageConfig
=
{
this
.
setPageConfig
}
isChecked
=
{
false
}
isChecked
=
{
false
}
// getPanelHeight={this.getPanelHeight}
// getPanelHeight={this.getPanelHeight}
dataList
=
{
dataList
}
dataList
=
{
dataList
}
totals
=
{
totalCount
}
totals
=
{
totalCount
}
onRowDoubleClick
=
{
this
.
onRetrieveRowDoubleClick
}
onRowDoubleClick
=
{
this
.
onRetrieveRowDoubleClick
}
getTableDataAction
=
{
this
.
fetchRetrieveData
}
getTableDataAction
=
{
this
.
fetchRetrieveData
}
/
>
/
>
{
/* </div> */
}
{
/* </div> */
}
<
/TabPanel
>
<
/TabPanel
>
<
TabPanel
activeKey
=
"message"
>
<
TabPanel
activeKey
=
"message"
>
...
@@ -300,9 +305,9 @@ class SearchPane extends Component {
...
@@ -300,9 +305,9 @@ class SearchPane extends Component {
columns
=
{
getMsgColumns
()}
columns
=
{
getMsgColumns
()}
getTableDataAction
=
{()
=>
{}}
getTableDataAction
=
{()
=>
{}}
callBack
=
{
this
.
reload
}
callBack
=
{
this
.
reload
}
isPageable
=
{
true
}
isPageable
setPageConfig
=
{
this
.
setPageConfig
}
setPageConfig
=
{
this
.
setPageConfig
}
isChecked
=
{
false
}
isChecked
=
{
false
}
dataList
=
{
msgDataList
}
dataList
=
{
msgDataList
}
totals
=
{
totalCount
}
totals
=
{
totalCount
}
getTableDataAction
=
{
this
.
fetchMsgData
}
getTableDataAction
=
{
this
.
fetchMsgData
}
...
@@ -313,9 +318,9 @@ class SearchPane extends Component {
...
@@ -313,9 +318,9 @@ class SearchPane extends Component {
columns
=
{
getRecordColumns
()}
columns
=
{
getRecordColumns
()}
getTableDataAction
=
{()
=>
{}}
getTableDataAction
=
{()
=>
{}}
callBack
=
{
this
.
reload
}
callBack
=
{
this
.
reload
}
isPageable
=
{
true
}
isPageable
setPageConfig
=
{
this
.
setPageConfig
}
setPageConfig
=
{
this
.
setPageConfig
}
isChecked
=
{
false
}
isChecked
=
{
false
}
dataList
=
{
recordDataList
}
dataList
=
{
recordDataList
}
totals
=
{
totalCount
}
totals
=
{
totalCount
}
getTableDataAction
=
{
this
.
fetchRecordData
}
getTableDataAction
=
{
this
.
fetchRecordData
}
...
@@ -326,9 +331,9 @@ class SearchPane extends Component {
...
@@ -326,9 +331,9 @@ class SearchPane extends Component {
columns
=
{
getTrajectoryColumns
()}
columns
=
{
getTrajectoryColumns
()}
getTableDataAction
=
{()
=>
{}}
getTableDataAction
=
{()
=>
{}}
callBack
=
{
this
.
reload
}
callBack
=
{
this
.
reload
}
isPageable
=
{
true
}
isPageable
setPageConfig
=
{
this
.
setPageConfig
}
setPageConfig
=
{
this
.
setPageConfig
}
isChecked
=
{
false
}
isChecked
=
{
false
}
dataList
=
{
trajectoryDataList
}
dataList
=
{
trajectoryDataList
}
totals
=
{
totalCount
}
totals
=
{
totalCount
}
getTableDataAction
=
{
this
.
fetchTrajectoryData
}
getTableDataAction
=
{
this
.
fetchTrajectoryData
}
...
...
mods/components/3dviewConvertor/view/searchPane/paramsHeader.js
View file @
dbfb0677
...
@@ -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