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
801a2c12
Commit
801a2c12
authored
May 27, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/station/amos-station-module-view
into developer
parents
6b53e693
6a7e1c61
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
449 additions
and
191 deletions
+449
-191
amos.config.js
amos.config.js
+2
-2
right3dIcon.png
...viewConvertor/assets/convertor/moduleEdit/right3dIcon.png
+0
-0
rightBaseMsgIcon.png
...onvertor/assets/convertor/moduleEdit/rightBaseMsgIcon.png
+0
-0
rightModalBG.png
...iewConvertor/assets/convertor/moduleEdit/rightModalBG.png
+0
-0
rightModalTitleIcon.png
...ertor/assets/convertor/moduleEdit/rightModalTitleIcon.png
+0
-0
urlConsts.js
mods/components/3dviewConvertor/consts/urlConsts.js
+9
-10
moduleEditServices.js
...components/3dviewConvertor/services/moduleEditServices.js
+6
-1
index.scss
mods/components/3dviewConvertor/styles/index.scss
+1
-5
moduleEdit.scss
mods/components/3dviewConvertor/styles/moduleEdit.scss
+32
-1
preControl.scss
mods/components/3dviewConvertor/styles/preControl.scss
+12
-11
reservePlan.scss
mods/components/3dviewConvertor/styles/reservePlan.scss
+190
-0
statistical.scss
...ts/3dviewConvertor/styles/view/panoramic/statistical.scss
+41
-28
LayerPool.js
mods/components/3dviewConvertor/view/LayerPool.js
+0
-0
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+6
-5
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+38
-40
ModelHeader.js
mods/components/3dviewConvertor/view/common/ModelHeader.js
+2
-2
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+1
-2
RightEditPointPanel.js
...Convertor/view/moduleEditComponent/RightEditPointPanel.js
+41
-29
RightEditRegionPanel.js
...onvertor/view/moduleEditComponent/RightEditRegionPanel.js
+24
-18
ModelContent.js
...dviewConvertor/view/panoramic/statistical/ModelContent.js
+16
-12
SafetyExecuteList.js
...Convertor/view/panoramic/statistical/SafetyExecuteList.js
+2
-1
SafetyIndex.js
...3dviewConvertor/view/panoramic/statistical/SafetyIndex.js
+25
-23
conf.js
...onents/3dviewConvertor/view/panoramic/statistical/conf.js
+1
-1
No files found.
amos.config.js
View file @
801a2c12
...
...
@@ -11,9 +11,9 @@
objModelURI
:
'/a3dres'
,
// 根url
// baseURI: 'http://172.16.11.30:9008/',
baseURI
:
'http://172.16.3.
63
:8083/'
,
baseURI
:
'http://172.16.3.
122
:8083/'
,
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI
:
'http://172.16.3.
63
:8083/'
,
convertorURI
:
'http://172.16.3.
122
:8083/'
,
patrolURI
:
'http://172.16.3.122:8082/'
,
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
// plugin URI
...
...
mods/components/3dviewConvertor/assets/convertor/moduleEdit/right3dIcon.png
0 → 100644
View file @
801a2c12
420 Bytes
mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightBaseMsgIcon.png
0 → 100644
View file @
801a2c12
343 Bytes
mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalBG.png
0 → 100644
View file @
801a2c12
9.13 KB
mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png
0 → 100644
View file @
801a2c12
664 Bytes
mods/components/3dviewConvertor/consts/urlConsts.js
View file @
801a2c12
...
...
@@ -2,7 +2,6 @@ import * as endConf from 'amos-processor/lib/config/endconf';
const
completePrefix
=
endConf
.
completePrefix
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
pluginURI
=
AmosConfig
.
httpURI
.
pluginURI
;
const
convertorURI
=
AmosConfig
.
httpURI
.
convertorURI
;
// 三维视图
const
view3dURI
=
AmosConfig
.
httpURI
.
convertorURI
;
...
...
@@ -11,7 +10,6 @@ const baseURI = AmosConfig.httpURI.convertorURI;
//规则
const
ruleURI
=
AmosConfig
.
httpURI
.
rulesConfigURI
;
const
baseURI2
=
AmosConfig
.
httpURI
.
baseURI
;
export
const
ConvertorURI
=
convertorURI
;
export
const
FscSerUrl
=
{
...
...
@@ -125,15 +123,16 @@ export const FasSerUrl = {
importExcelDataUrl
:
completePrefix
(
convertorURI
,
'api/excel/import/data/excel/{type}'
),
//导入excel数据type=['fireResource','water']
importExcelFireEquipmentPointUrl
:
completePrefix
(
convertorURI
,
'api/excel/import/fireEquipmentPoint'
),
exportExcelFireEquipmentPointUrl
:
completePrefix
(
convertorURI
,
'api/excel/export?exportType={exportType}&modelName={modelName}'
),
pointModelistUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/list?model={model}'
),
pointModelistUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/list?model={model}'
)
};
export
const
ModuleEditUrl
=
{
getAreaTreeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/region/tree'
),
//
getPointTreeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/tree'
),
saveAreaDataUrl
:
completePrefix
(
convertorURI
,
'api/view3d/region/bind'
),
//
getPointTypeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/type'
),
getPointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/init3dViewNode'
),
//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/bind'
),
//批量保存点绑定关系
getAreaTreeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/region/tree'
),
//
getAreaTreeDetailUrl
:
completePrefix
(
convertorURI
,
'api/view3d/region/detail'
),
//
getPointTreeDetailUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/detail?type={type}&pointId={pointId}'
),
//
getPointTreeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/tree'
),
saveAreaDataUrl
:
completePrefix
(
convertorURI
,
'api/view3d/region/bind'
),
//
getPointTypeUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/type'
),
getPointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/init3dViewNode'
),
//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/bind'
)
//批量保存点绑定关系
}
mods/components/3dviewConvertor/services/moduleEditServices.js
View file @
801a2c12
...
...
@@ -34,7 +34,12 @@ export const saveDesignAction = object => {
export
const
getAreaTreeAction
=
()
=>
{
return
commonGet
(
ModuleEditUrl
.
getAreaTreeUrl
);
}
export
const
getAreaTreeDetailAction
=
(
id
)
=>
{
return
commonGet
(
`
${
ModuleEditUrl
.
getPointTreeDetailUrl
}
/
${
id
}
`
);
}
export
const
getPointTreeDetailAction
=
(
pointId
,
type
)
=>
{
return
commonGet
(
formatUrl
(
ModuleEditUrl
.
getPointTreeDetailUrl
,{
pointId
,
type
}));
}
export
const
getPointTreeAction
=
(
type
)
=>
{
return
commonGet
(
`
${
ModuleEditUrl
.
getPointTreeUrl
}
/
${
type
}
`
);
}
...
...
mods/components/3dviewConvertor/styles/index.scss
View file @
801a2c12
...
...
@@ -13,13 +13,11 @@
@import
'./actionbar.scss'
;
@import
'./moduleEdit.scss'
;
@import
'./searchpane.scss'
;
@import
'./reservePlan.scss'
;
@import
'./../assets/bizFont/iconfont.css'
;
@import
'./../assets/amosFont/iconfont.css'
;
.obj-loading-coms
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -133,5 +131,3 @@
border-image-slice
:
50
50
50
50
;
border-image-repeat
:
stretch
;
}
mods/components/3dviewConvertor/styles/moduleEdit.scss
View file @
801a2c12
...
...
@@ -27,12 +27,14 @@
// border-image:linear-gradient(90deg,rgba(50,217,239,0) 2%,rgba(50,217,239,0.49) 29%,rgba(50,217,239,0.73) 73%,rgba(50,217,239,0) 100%);
}
}
.quipBtn
{
width
:
169px
;
height
:
44px
;
background
:
url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
margin-top
:
10px
;
margin-left
:
70px
;
cursor
:
pointer
;
background
:
url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png')
no-repeat
100%
100%
;
}
}
.bottomBox
{
...
...
@@ -164,17 +166,46 @@
border
:
1px
solid
rgba
(
46
,
217
,
239
,
0
.59
);
padding
:
12px
;
color
:
#fff
;
.basic-demo
{
height
:
calc
(
100%
-
48px
);
}
.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
{
...
...
mods/components/3dviewConvertor/styles/preControl.scss
View file @
801a2c12
...
...
@@ -365,7 +365,7 @@
}
}
.reserve-plan-root
{
.reserve-plan-root
{
height
:
80px
;
.operate-button-root
+
.operate-button-root
{
...
...
@@ -378,40 +378,41 @@
align-items
:
center
;
width
:
250px
;
}
.operate-button-display-root
{
.operate-button-display-root
{
justify-content
:
center
;
}
.operate-button-root
{
.operate-button-root
{
width
:
250px
;
justify-content
:
center
;
.operate-button-left
{
.operate-button-left
{
img
{
img
{
// width: 20px !important;
// height: 20px !important
}
.operate-button-content
{
.operate-button-content
{
margin-left
:
5px
;
font-weight
:
500
;
line-height
:
15px
;
width
:
170px
;
.button-name
{
.button-name
{
font-size
:
14px
!
important
}
.button-desc
{
.button-desc
{
font-size
:
8px
!
important
}
}
}
.operate-button-right
{
.operate-button-right
{
width
:
77px
;
.operate-button-button
{
.operate-button-button
{
margin-left
:
10px
;
width
:
70px
;
height
:
31px
;
...
...
@@ -434,7 +435,7 @@
.quit-btn
{
margin-top
:
10px
;
img
{
img
{
width
:
17px
}
}
...
...
mods/components/3dviewConvertor/styles/reservePlan.scss
0 → 100644
View file @
801a2c12
.step-cxt-root
{
z-index
:
9
;
.drawer-content
{
width
:
$content-width
;
height
:
100%
;
// background: $content-bg;
// border-radius: 1rem 1rem 0 0;
background-image
:
url('../assets/convertor/3dview/prePlan/zhixingtanchuang.png')
;
background-repeat
:
no-repeat
;
-moz-background-size
:
100%
100%
;
background-size
:
100%
100%
;
.drawer-content-header
{
display
:
flex
;
height
:
$content-header-height
;
font-size
:
1
.25rem
;
line-height
:
1
.8
;
align-items
:
center
;
justify-content
:
space-between
;
text-align
:
center
;
.drawer-content-header-title
{
display
:
inline-block
;
// height: $content-header-height;
width
:
87px
;
margin
:
0
auto
;
font-family
:
'PingFangSC-Semibold'
;
font-size
:
15px
;
font-weight
:
600
;
line-height
:
26px
;
color
:
white
;
span
{
margin-left
:
0
.5rem
;
}
}
.drawer-content-header-close
{
width
:
$content-header-height
;
height
:
$content-header-height
;
text-align
:
center
;
cursor
:
pointer
;
i
{
font-size
:
1
.7rem
;
line-height
:
1
.5
;
color
:
red
;
}
}
}
.drawer-content-body
{
height
:
calc
(
100%
-
4
.5rem
);
min-height
:
3rem
;
overflow
:
auto
;
color
:
white
;
}
::-webkit-scrollbar
{
/* 隐藏滚轮 */
display
:
none
;
}
}
}
%operate-button-root-common
{
display
:
flex
;
align-items
:
center
;
width
:
400px
;
height
:
65px
;
justify-content
:
space-between
;
.operate-button-left
{
display
:
flex
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
img
{
width
:
30px
;
height
:
30px
;
}
.operate-button-content
{
margin-left
:
15px
;
font-family
:
'PingFangSC-Semibold'
;
font-weight
:
600
;
line-height
:
26px
;
color
:
white
;
.button-name
{
font-size
:
15px
;
}
.button-desc
{
font-size
:
10px
;
}
}
}
.operate-button-right
{
width
:
91px
;
.operate-button-button
{
width
:
91px
;
height
:
35px
;
padding
:
0
1rem
;
color
:
white
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
border-radius
:
4px
;
opacity
:
1
;
}
.amos-btn
+
.amos-btn
{
margin-left
:
0
;
}
:nth-child
(
2
)
{
margin-top
:
2px
;
}
}
}
.operate-button-root
{
@extend
%operate-button-root-common
;
}
.operate-button-root
+
.operate-button-root
{
padding-left
:
19px
;
margin-left
:
19px
;
border-left
:
2px
solid
#13b1d4
;
}
.step-cxt-line-root
{
display
:
flex
;
align-items
:
center
;
height
:
63px
;
margin
:
10px
15px
0
;
margin-top
:
10px
;
justify-content
:
space-between
;
background
:
linear-gradient
(
180deg
,
rgba
(
9
,
65
,
124
,
1
)
0%
,
rgba
(
0
,
0
,
0
,
0
)
100%
);
border
:
1px
solid
rgba
(
255
,
195
,
0
,
1
);
.step-cxt-line-left
{
display
:
flex
;
padding-left
:
20px
;
align-items
:
center
;
flex
:
0
0
40%
;
}
.step-cxt-line-content
{
margin-left
:
15px
;
font-size
:
15px
;
}
.step-cxt-line-right
{
padding-right
:
20px
;
.operate-button-button
{
width
:
91px
;
height
:
35px
;
padding
:
0
8px
;
color
:
white
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
opacity
:
1
;
}
}
}
.reserve-plan-root
{
@extend
%plan-border-img
;
display
:
flex
;
height
:
100px
;
align-items
:
center
;
justify-content
:
center
;
border-image
:
url('../assets/convertor/3dview/prePlan/jiaohuqu-duan.png')
;
}
.operate-button-display-root
{
@extend
%operate-button-root-common
;
.render-spinner-stick
{
width
:
21px
;
background
:
#ffc000
;
}
}
mods/components/3dviewConvertor/styles/view/panoramic/statistical.scss
View file @
801a2c12
...
...
@@ -3,7 +3,7 @@
// height: 100%;
// width: 100%;
.statistical-left
{
.statistical-left
{
position
:
absolute
;
height
:
100%
;
width
:
350px
;
...
...
@@ -13,10 +13,11 @@
display
:
flex
;
flex-direction
:
column
;
.equipStatusList
{
.equipStatusList
{
padding-left
:
97px
;
padding-top
:
10px
;
flex-grow
:
1
;
overflow-y
:
auto
;
.title-child
{
width
:
100%
;
...
...
@@ -32,6 +33,12 @@
}
}
::-webkit-scrollbar
{
/* 隐藏滚轮 */
display
:
none
;
}
.safetyExecuteList
{
flex
:
2
;
margin-left
:
37px
;
...
...
@@ -114,7 +121,6 @@
width
:
90%
;
span
{
position
:
absolute
;
margin-top
:
3px
;
font-size
:
14px
;
color
:
rgba
(
255
,
255
,
255
,
1
);
...
...
@@ -156,9 +162,7 @@
height
:
100%
;
margin-left
:
30px
;
margin-right
:
20px
;
&
:hover
{
background-color
:
rgba
(
199
,
223
,
245
,
0
.3
);
}
cursor
:
pointer
;
.content-item
{
margin
:
5px
;
...
...
@@ -473,59 +477,68 @@
text-align
:
right
;
margin-top
:
5px
;
margin-right
:
3px
;
float
:
right
;
// margin-top: 5px;
// margin-right: 3px;
img
{
cursor
:
pointer
;
}
}
.model-line
{
float
:
left
;
display
:
inline
;
width
:
32%
;
&
-body
{
display
:
flex
;
height
:
calc
(
100%
-
50px
);
.model-line
{
height
:
88%
;
text-align
:
center
;
padding-left
:
35px
;
margin-top
:
5px
;
margin-left
:
10px
;
overflow
:
auto
;
text-align
:
center
;
flex
:
1
;
.model-title
{
&
-img
{
height
:
30px
;
font-size
:
16px
;
}
.model-title
{
height
:
30px
;
font-size
:
16px
;
color
:rgba
(
240
,
223
,
45
,
1
)
;
padding-top
:
10px
;
}
.model-content
{
.content-div
{
.model-content
{
height
:
calc
(
100%
-
60px
);
padding-left
:
10px
;
overflow
:
auto
;
.content-div
{
min-width
:
80px
;
min-height
:
120px
;
text-align
:
left
;
padding-top
:
20px
;
text-align
:
left
;
.title
{
.title
{
height
:
30px
;
font-size
:
16px
;
color
:rgba
(
240
,
223
,
45
,
1
)
;
}
.next-title
{
.next-title
{
padding-left
:
5px
;
}
.rows
{
.rows
{
padding-left
:
15px
;
font-size
:
14px
;
color
:rgba
(
255
,
255
,
255
,
1
)
;
.row
{
.row
{
display
:
inline-block
;
height
:
28px
;
}
.date
{
.date
{
padding-left
:
25px
;
}
}
}
}
}
}
}
mods/components/3dviewConvertor/view/LayerPool.js
View file @
801a2c12
mods/components/3dviewConvertor/view/MaskContent.js
View file @
801a2c12
...
...
@@ -91,6 +91,7 @@ class MaskContent extends Component {
headerName
,
errorAreaId
}
=
this
.
props
;
alarmStarted
&&
this
.
props
.
editModelChange
(
true
);
const
wsURL
=
completeToken
(
SysWsURL
.
rulews
);
const
controlAnimation
=
{
animateName
:
'zoom-comb-left'
,
...
...
@@ -121,12 +122,12 @@ class MaskContent extends Component {
return
(
<
div
className
=
"mask-content"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
{
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
errorAreaId
=
{
errorAreaId
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
/>
}
{
sideControlShow
&&
<
DataPane
animationProps
=
{
datapaneAnim
}
/>
}
<
SearchPane
visible
=
{
searchPaneVisible
}
changeSearchPaneVisible
=
{()
=>
this
.
changeSearchPaneVisible
}
/
>
{
!
alarmStarted
&&
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
errorAreaId
=
{
errorAreaId
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
/>
}
{
!
alarmStarted
&&
sideControlShow
&&
<
DataPane
animationProps
=
{
datapaneAnim
}
/>
}
{
!
alarmStarted
&&
<
SearchPane
visible
=
{
searchPaneVisible
}
changeSearchPaneVisible
=
{()
=>
this
.
changeSearchPaneVisible
}
/>
}
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
{
!
isShowActionBar
&&
<
ModelHeader
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
isShowActionBar
&&
<
ActionBar
activeAction
=
{
activeAction
}
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/>
}
{
!
alarmStarted
&&
!
isShowActionBar
&&
<
ModelHeader
animationProps
=
{
controlAnimation
}
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
!
alarmStarted
&&
isShowActionBar
&&
<
ActionBar
activeAction
=
{
activeAction
}
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/>
}
{
alarmStarted
&&
<
LayerPool
animationProps
=
{
layerPoolAnimation
}
planStart
=
{
planStart
}
planQuit
=
{
planQuit
}
planStarted
=
{
planStarted
}
/>
}
<
/div
>
);
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
801a2c12
...
...
@@ -200,6 +200,7 @@ class View3D extends Component {
tirggerTransTopic
(
CONSTS
.
forward
,
{
details
:
{
type
:
'prePlan'
,
show
:
false
},
dateTime
:
Date
.
now
()
});
removeFireAlarm2
(
this
);
this
.
cameraFactory
.
fitView
(
desigerHelperConfig
.
cameraEffect
);
this
.
quitEditMode
();
};
alarmStart
=
()
=>
{
...
...
@@ -728,57 +729,55 @@ class View3D extends Component {
}
//选中区域变化
selectItemChange
=
(
selectArea
)
=>
{
console
.
log
(
selectArea
);
this
.
state
.
selectArea
=
selectArea
this
.
setState
({
selectArea
:
selectArea
,
selectArea
,
showRightPanel
:
true
})
})
;
}
//选中点变化
selectPointChange
=
(
selectPoints
)
=>
{
this
.
setState
({
selectPoints
:
selectPoints
,
selectPoints
,
showRightPanel
:
true
})
})
;
}
getAreas
=
(
treeData
)
=>
{
let
{
dragItem
}
=
this
.
state
;
// console.log(treeData)
// let areas = [];
if
(
treeData
&&
treeData
.
length
>
0
)
{
if
(
treeData
&&
treeData
.
length
>
0
)
{
treeData
.
map
((
item
)
=>
{
if
(
item
.
isRegion
&&
item
.
isBind
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
dragItem
)
{
if
(
dragItem
.
parentId
&&
dragItem
.
parentId
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
{
this
.
getAreas
(
item
.
children
)}
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
{
this
.
getAreas
(
item
.
children
)}
}
}
else
{
}
else
{
if
(
dragItem
)
{
if
(
dragItem
&&
dragItem
.
parentId
&&
dragItem
.
parentId
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
if
(
dragItem
&&
dragItem
.
parentId
&&
dragItem
.
parentId
=
==
item
.
id
)
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
noDrop
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
}
else
{
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
this
.
areas
.
push
(
<
PolygonRegion
{...
this
.
areaStyles
.
normal
}
points
=
{
item
.
routePath
?
JSON
.
parse
(
item
.
routePath
).
routePath
:
''
}
onCreated
=
{(
e
)
=>
{
this
.
onRegionCreated
(
e
,
item
)}}
/>
)
;
}
}
}
else
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
{
this
.
getAreas
(
item
.
children
)}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
this
.
getAreas
(
item
.
children
);
}
}
});
...
...
@@ -789,29 +788,28 @@ class View3D extends Component {
this
.
getAreas
(
this
.
state
.
treeData
);
return
this
.
areas
;
}
onRegionCreated
=
(
polygonRegion
,
item
)
=>
{
console
.
log
(
polygonRegion
)
// console.log(polygonRegion.pointInPolygon)
this
.
polygonRegion
[
item
.
id
]
=
polygonRegion
;
console
.
log
(
this
.
polygonRegion
)
}
//保存区域绑定
saveAreaData
=
()
=>
{
let
{
treeData
,
routePathData
,
pageType
}
=
this
.
state
;
let
routePathParams
=
[];
console
.
log
(
routePathData
)
let
{
routePathData
}
=
this
.
state
;
saveAreaDataAction
(
routePathData
).
then
(
d
=>
{
message
.
success
(
'保存成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
treeData
:
data
||
[]
})
treeData
:
data
||
[]
})
;
});
},
eer
=>
{
message
.
error
(
'保存失败!'
);
});
}
//保存点绑定
savePointData
=
()
=>
{
let
{
markers
}
=
this
.
state
;
...
...
@@ -823,14 +821,12 @@ class View3D extends Component {
pointId
:
item
[
i
].
id
,
pointType
:
item
[
i
].
type
,
position3d
:
`
${
item
[
i
].
position
.
x
}
,
${
item
[
i
].
position
.
y
}
,
${
item
[
i
].
position
.
z
}
`
})
})
;
}
}
savePointListAction
(
paramsArr
).
then
(
data
=>
{
console
.
log
(
data
);
})
});
}
// 删除点绑定
deletePointBind
=
()
=>
{
...
...
@@ -841,28 +837,28 @@ class View3D extends Component {
pointId
:
selectPoints
.
id
,
pointType
:
selectPoints
.
type
,
position3d
:
`
${
selectPoints
.
position
.
x
}
,
${
selectPoints
.
position
.
y
}
,
${
selectPoints
.
position
.
z
}
`
})
})
;
savePointListAction
(
pointParams
).
then
(
data
=>
{
console
.
log
(
data
);
})
})
;
}
}
//删除区域
deleteAreaBind
=
()
=>
{
let
{
selectArea
,
routePathData
}
=
this
.
state
;
let
{
selectArea
}
=
this
.
state
;
if
(
selectArea
)
{
let
areaParams
=
[];
areaParams
.
push
({
riskSourceId
:
selectArea
.
id
,
routePath
:
''
})
})
;
saveAreaDataAction
(
areaParams
).
then
(
d
=>
{
message
.
success
(
'删除成功!'
);
getAreaTreeAction
().
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
treeData
:
data
||
[]
})
treeData
:
data
||
[]
})
;
});
},
eer
=>
{
message
.
error
(
'删除失败!'
);
...
...
@@ -1000,6 +996,7 @@ class View3D extends Component {
this
.
getPointList
();
}
}
simpleTipOk
=
()
=>
{
this
.
setState
({
simpleTipVisible
:
false
...
...
@@ -1203,7 +1200,7 @@ class View3D extends Component {
const
{
markers
}
=
this
.
state
;
pointModelistAction
(
actionType
).
then
(
d
=>
{
// if (markerType === 'fireResource') {
markers
[
'impEquipmentMode'
]
=
d
.
filter
(
item
=>
item
.
position
!
=
null
);
markers
[
'impEquipmentMode'
]
=
d
.
dataList
.
filter
(
item
=>
item
.
position
!=
=
null
);
// markers[markerType] = d;
this
.
setState
({
markers
,
...
...
@@ -1254,7 +1251,7 @@ class View3D extends Component {
};
return
exceptionAreas
.
map
((
area
,
index
)
=>
{
const
{
routePath
:
points
=
[]
}
=
area
.
routePath
;
return
<
PolygonRegion
key
=
{
area
.
id
}
{...
regionConf
}
points
=
{
points
}
onCreated
=
{
e
=>
this
.
onRectCreated
(
e
,
area
,
index
)}
/>
;
return
points
.
length
>
0
&&
<
PolygonRegion
key
=
{
area
.
id
}
{...
regionConf
}
points
=
{
points
}
onCreated
=
{
e
=>
this
.
onRectCreated
(
e
,
area
,
index
)}
/>
;
});
}
...
...
@@ -1305,7 +1302,7 @@ class View3D extends Component {
headerName
,
errorAreaId
}
=
this
.
state
;
const
{
dimension
,
hiddenScreenSaver
}
=
this
.
props
;
const
{
dimension
,
hiddenScreenSaver
,
editModelChange
}
=
this
.
props
;
const
graphicProps
=
{
...
dimension
,
...
desigerConf
,
...
...
@@ -1373,6 +1370,7 @@ class View3D extends Component {
onActionItemClick
=
{
this
.
onActionItemClick
}
errorAreaId
=
{
errorAreaId
}
handleExceptModel
=
{
this
.
handleExceptModel
}
editModelChange
=
{
editModelChange
}
/
>
}
modelContentProps
=
{
modelContentProps
}
...
...
@@ -1387,7 +1385,7 @@ class View3D extends Component {
{
editFlag
&&
pageType
===
'region'
?
''
:
<
PointsPool
markers
=
{
markers
}
updateMarker
=
{
this
.
updateMarker
}
planStarted
=
{
alarmStarted
}
stagePilot
=
{
this
.
stagePilot
}
/>
}
{
fireTruckRoute
&&
<
FatLine
{...
lineData
.
fatLineConf
}
linePath
=
{
JSON
.
parse
(
fireTruckRoute
)}
visible
=
{
showFireTruckRoute
}
/>
}
<
FlameFire
position
=
{
firePosition
}
width
=
{
10
}
height
=
{
20
}
depth
=
{
8
}
sliceSpacing
=
{
1
}
visible
=
{
planStarted
}
/
>
{
this
.
renderAreas
()}
{
editFlag
&&
this
.
renderAreas
()}
{
this
.
renderPolygonRegion
(
exceptionAreas
)}
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
<
/A3DDesigner
>
...
...
mods/components/3dviewConvertor/view/common/ModelHeader.js
View file @
801a2c12
...
...
@@ -12,9 +12,9 @@ export default class ModelHeader extends Component {
}
render
()
{
const
{
headerName
}
=
this
.
props
;
const
{
animationProps
,
headerName
}
=
this
.
props
;
return
(
<
div
className
=
'ModuleEditPage'
>
<
div
className
=
'ModuleEditPage'
{...
animationProps
}
>
<
div
className
=
'topBox'
>
<
span
className
=
'editTitle'
>
<
span
className
=
'titleText'
>
{
headerName
}
<
/span
>
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
801a2c12
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
utils
,
Store
}
from
'amos-tool'
;
import
{
utils
}
from
'amos-tool'
;
import
{
Markers
}
from
'amos-3d/lib/designer'
;
import
{
connect3D
}
from
'amos-3d/lib/designer'
;
import
{
BaseObjHelper
}
from
'base-r3d/lib/factory'
;
import
{
safetyIndexIconMapper
}
from
'./../../consts/imgStatic'
;
const
lsTool
=
Store
.
lsTool
;
const
getIcon
=
(
exceptionType
)
=>
{
return
safetyIndexIconMapper
[
exceptionType
];
};
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditPointPanel.js
View file @
801a2c12
...
...
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import
PropTypes
from
'prop-types'
;
import
{
Connect
,
Modal
,
Tree
,
Select
,
Search
,
Button
,
Input
,
InputNumber
,
Form
,
Radio
}
from
'amos-framework'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
{
getAreaTreeAction
,
saveAreaDataAction
}
from
'../../services/moduleEditServices'
import
{
getAreaTreeAction
,
saveAreaDataAction
,
getPointTreeDetailAction
}
from
'../../services/moduleEditServices'
const
eventConnect
=
Connect
.
eventConnect
;
const
TreeNode
=
Tree
.
TreeNode
;
...
...
@@ -20,30 +20,38 @@ class RightEditPointPanel extends Component {
form
:
{
},
rules
:{}
rules
:{},
detailData
:[]
};
}
componentDidMount
()
{
// getAreaTreeAction().then(data => {
// console.log(data);
// this.setState({
// treeData:data || []
// })
// this.props.getAreaData(data || [])
// })
let
{
detailData
}
=
this
.
props
getPointTreeDetailAction
(
detailData
.
id
,
detailData
.
type
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
detailData
:
data
||
[],
},
err
=>
{
console
.
log
(
err
)
});
});
}
componentWillUnmount
()
{
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
nextProps
)
let
{
treeData
,
pointTypeArr
}
=
nextProps
;
// this.setState({
// })
let
{
detailData
}
=
this
.
props
getPointTreeDetailAction
(
detailData
.
id
,
detailData
.
type
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
setState
({
detailData
:
data
||
[],
},
err
=>
{
console
.
log
(
err
)
});
});
}
onChange
=
(
key
,
e
)
=>
{
const
value
=
e
.
target
.
value
;
...
...
@@ -85,8 +93,9 @@ class RightEditPointPanel extends Component {
}
render
()
{
let
{
rules
,
form
,
pointTypeArr
,
pointType
}
=
this
.
state
;
let
{
rules
,
form
,
pointTypeArr
,
pointType
,
detailData
}
=
this
.
state
;
let
{
pageType
}
=
this
.
props
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
28
},
...
...
@@ -96,25 +105,24 @@ class RightEditPointPanel extends Component {
}
return
(
<
div
className
=
"rightEditPanel"
>
<
div
className
=
'rightContainer'
>
<
Form
className
=
"basic-demo"
ref
=
{
component
=>
this
.
form
=
component
}
model
=
{
form
}
rules
=
{
rules
}
>
<
div
className
=
'rightContainer'
>
<
div
className
=
'topForm'
>
<
div
className
=
'rightTitle'
>
<
span
className
=
'titleIcon'
><
/span
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'
/
>
<
span
className
=
'titleText'
>
风险点信息
<
/span
>
<
/div
>
<
div
className
=
'baseMsg'
>
<
div
className
=
'moduleTitle'
>
<
span
className
=
'titleIcon'
><
/span
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightBaseMsgIcon.png'
/
>
<
span
className
=
'titleText'
>
基本信息
<
/span
>
<
/div
>
<
div
className
=
'moduleContent'
>
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
风险名称
<
/div
>
<
FormItem
field
=
"name"
>
<
Input
/>
<
Input
value
=
{
detailData
.
name
}
disabled
/>
<
/FormItem
>
<
/div
>
...
...
@@ -123,6 +131,8 @@ class RightEditPointPanel extends Component {
<
FormItem
field
=
"code"
>
<
Input
onChange
=
{(
e
)
=>
this
.
onChange
(
'name'
,
e
)}
value
=
{
detailData
.
code
}
disabled
/>
<
/FormItem
>
...
...
@@ -130,13 +140,14 @@ class RightEditPointPanel extends Component {
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
风险等级
<
/div
>
<
FormItem
field
=
"level"
>
<
Select
value
=
{
form
.
level
}
onChange
=
{
this
.
onHobbyChange
}
>
{
/*
<Select value={form.level} onChange={this.onHobbyChange}>
<Option value="1">一级</Option>
<Option value="2">二级</Option>
<Option value="3">三级</Option>
<Option value="4">四级</Option>
<Option value="5">五级</Option>
<
/Select
>
</Select> */
}
<
Input
value
=
{
detailData
.
level
}
disabled
/>
<
/FormItem
>
<
/div
>
...
...
@@ -153,17 +164,17 @@ class RightEditPointPanel extends Component {
<
div
className
=
'position'
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"X"
field
=
"positionX"
{...
formItemLayout
}
>
<
InputNumber
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
0
]}
/
>
<
/FormItem
>
<
/div
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"Y"
field
=
"positionY"
{...
formItemLayout
}
>
<
InputNumber
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
1
]}
/
>
<
/FormItem
>
<
/div
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"Z"
field
=
"positionZ"
{...
formItemLayout
}
>
<
InputNumber
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
2
]}
/
>
<
/FormItem
>
<
/div
>
<
/div
>
...
...
@@ -171,7 +182,7 @@ class RightEditPointPanel extends Component {
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
楼层位置
<
/div
>
<
FormItem
field
=
"floorNum"
>
<
Input
/>
<
Input
value
=
{
detailData
.
floor3d
}
disabled
/>
<
/FormItem
>
<
/div
>
...
...
@@ -179,8 +190,8 @@ class RightEditPointPanel extends Component {
<
div
className
=
'itemLabel'
>
是否位于室内
<
/div
>
<
FormItem
field
=
"isIndoor"
>
<
RadioGroup
defaultValue
=
"prop2"
onChange
=
{
value
=>
{
this
.
onRadioChange
(
value
)}}
>
<
Radio
value
=
"prop1"
>
是
<
/Radio
>
<
Radio
value
=
"prop2"
>
否
<
/Radio
>
<
Radio
className
=
'radio-text'
value
=
"prop1"
>
是
<
/Radio
>
<
Radio
className
=
'radio-text'
value
=
"prop2"
>
否
<
/Radio
>
<
/RadioGroup
>
<
/FormItem
>
<
/div
>
...
...
@@ -199,9 +210,10 @@ class RightEditPointPanel extends Component {
// this.props.save()
}}
><
/Button
>
<
/div
>
<
/div
>
<
/Form
>
<
/div
>
<
/div
>
);
}
}
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditRegionPanel.js
View file @
801a2c12
...
...
@@ -20,16 +20,18 @@ class RightEditRegionPanel extends Component {
form
:
{
},
rules
:{}
rules
:{},
treeDetailData
:[]
};
}
componentDidMount
()
{
// getAreaTreeAction().then(data => {
console
.
log
(
JSON
.
stringify
(
this
.
props
.
detailData
))
// getAreaTreeDetailAction().then(data => {
// console.log(data);
// this.setState({
//
tree
Data:data || []
//
treeDetail
Data:data || []
// })
// this.props.getAreaData(data || [])
// })
...
...
@@ -74,9 +76,10 @@ class RightEditRegionPanel extends Component {
handleSubmit
=
(
e
)
=>
{
// e.preventDefault();
this
.
form
.
validate
((
valid
,
dataValues
,
errors
)
=>
{
console
.
log
(
'返回内容:'
,
dataValues
,
valid
,
errors
);
if
(
valid
)
{
//
AmosAlert.success('结果', JSON.stringify(dataValues));
//AmosAlert.success('结果', JSON.stringify(dataValues));
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
...
...
@@ -85,8 +88,8 @@ class RightEditRegionPanel extends Component {
}
render
()
{
let
{
rules
,
form
,
pointTypeArr
,
pointType
}
=
this
.
state
;
let
{
pageType
}
=
this
.
props
;
let
{
rules
,
form
,
pointTypeArr
,
pointType
,
}
=
this
.
state
;
let
{
pageType
,
detailData
}
=
this
.
props
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
28
},
...
...
@@ -96,25 +99,24 @@ class RightEditRegionPanel extends Component {
}
return
(
<
div
className
=
"rightEditPanel"
>
<
div
className
=
'rightContainer'
>
<
Form
className
=
"basic-demo"
ref
=
{
component
=>
this
.
form
=
component
}
model
=
{
form
}
rules
=
{
rules
}
>
<
div
className
=
'rightContainer'
>
<
div
className
=
'topForm'
>
<
div
className
=
'rightTitle'
>
<
span
className
=
'titleIcon'
><
/span
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'
/
>
<
span
className
=
'titleText'
>
风险区域信息
<
/span
>
<
/div
>
<
div
className
=
'baseMsg'
>
<
div
className
=
'moduleTitle'
>
<
span
className
=
'titleIcon'
><
/span
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightBaseMsgIcon.png'
/
>
<
span
className
=
'titleText'
>
基本信息
<
/span
>
<
/div
>
<
div
className
=
'moduleContent'
>
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
风险名称
<
/div
>
<
FormItem
field
=
"name"
>
<
Input
/>
<
Input
value
=
{
detailData
.
name
}
disabled
/>
<
/FormItem
>
<
/div
>
...
...
@@ -123,6 +125,8 @@ class RightEditRegionPanel extends Component {
<
FormItem
field
=
"code"
>
<
Input
onChange
=
{(
e
)
=>
this
.
onChange
(
'name'
,
e
)}
value
=
{
detailData
.
code
}
disabled
/>
<
/FormItem
>
...
...
@@ -130,13 +134,14 @@ class RightEditRegionPanel extends Component {
<
div
className
=
'msgItem'
>
<
div
className
=
'itemLabel'
>
风险等级
<
/div
>
<
FormItem
field
=
"level"
>
<
Select
value
=
{
form
.
level
}
onChange
=
{
this
.
onHobbyChange
}
>
{
/*
<Select value={form.level} onChange={this.onHobbyChange}>
<Option value="1">一级</Option>
<Option value="2">二级</Option>
<Option value="3">三级</Option>
<Option value="4">四级</Option>
<Option value="5">五级</Option>
<
/Select
>
</Select> */
}
<
Input
value
=
{
detailData
.
level
}
disabled
/>
<
/FormItem
>
<
/div
>
...
...
@@ -144,7 +149,7 @@ class RightEditRegionPanel extends Component {
<
/div
>
<
div
className
=
'3dMsg'
>
<
div
className
=
'moduleTitle'
>
<
span
className
=
'titleIcon'
><
/span
>
<
img
src
=
'/mods/components/3dviewConvertor/assets/convertor/moduleEdit/right3dIcon.png'
/
>
<
span
className
=
'titleText'
>
三维信息
<
/span
>
<
/div
>
<
div
className
=
'moduleContent'
>
...
...
@@ -153,17 +158,17 @@ class RightEditRegionPanel extends Component {
<
div
className
=
'position'
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"长"
field
=
"positionX"
{...
formItemLayout
}
>
<
Input
Number
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
0
]}
/
>
<
/FormItem
>
<
/div
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"宽"
field
=
"positionY"
{...
formItemLayout
}
>
<
Input
Number
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
1
]}
/
>
<
/FormItem
>
<
/div
>
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"高"
field
=
"positionZ"
{...
formItemLayout
}
>
<
Input
Number
/>
<
Input
value
=
{
detailData
.
ue4Location
&&
detailData
.
ue4Location
[
2
]}
/
>
<
/FormItem
>
<
/div
>
<
/div
>
...
...
@@ -183,9 +188,10 @@ class RightEditRegionPanel extends Component {
// this.props.save()
}}
><
/Button
>
<
/div
>
<
/div
>
<
/Form
>
<
/div
>
<
/div
>
);
}
}
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/ModelContent.js
View file @
801a2c12
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
safetyIndexDetailAction
}
from
'./../../../services/panoramicService'
;
import
moment
from
'moment'
;
const
format
=
'YYYY-MM-dd'
;
export
default
class
ModelContent
extends
Component
{
...
...
@@ -14,18 +14,10 @@ export default class ModelContent extends Component {
}
componentDidMount
(){
le
t
{
type
}
=
this
.
props
;
cons
t
{
type
}
=
this
.
props
;
this
.
safetyIndexDetail
(
type
);
}
safetyIndexDetail
=
(
type
)
=>
{
safetyIndexDetailAction
(
type
).
then
(
data
=>
{
this
.
setState
({
alarmData
:
data
});
});
}
/**
* 获取标题
*
...
...
@@ -41,6 +33,14 @@ export default class ModelContent extends Component {
return
titleParams
[
v
];
}
safetyIndexDetail
=
(
type
)
=>
{
safetyIndexDetailAction
(
type
).
then
(
data
=>
{
this
.
setState
({
alarmData
:
data
});
});
}
formatData
=
(
str
)
=>
{
let
date
=
str
.
split
(
' '
)[
0
];
return
date
;
...
...
@@ -63,12 +63,12 @@ export default class ModelContent extends Component {
render
()
{
let
{
alarmData
}
=
this
.
state
;
le
t
{
type
}
=
this
.
props
;
cons
t
{
type
}
=
this
.
props
;
return
(
<
div
className
=
'model-content'
>
{(
alarmData
||
[]).
map
(
item
=>
{
return
(
<
div
className
=
'content-div'
>
<
div
key
=
{
item
.
typeCode
}
className
=
'content-div'
>
<
div
className
=
'title'
>
<
span
>|<
/span
>
<
span
className
=
'next-title'
>
{
type
===
'risk'
?
this
.
getTitle
(
item
.
typeCode
)
:
item
.
typeName
}
<
/span
>
...
...
@@ -81,3 +81,7 @@ export default class ModelContent extends Component {
);
}
}
ModelContent
.
propTypes
=
{
type
:
PropTypes
.
string
};
mods/components/3dviewConvertor/view/panoramic/statistical/SafetyExecuteList.js
View file @
801a2c12
...
...
@@ -81,7 +81,8 @@ export default class SafetyExecuteList extends Component {
datas
.
map
((
item
,
index
)
=>
{
return
(
<
div
key
=
{
item
.
id
}
className
=
"title-child"
>
<
span
className
=
"title-text"
>
{
item
.
label
}
<
/span
>
<
span
className
=
"title-text"
>
{
item
.
label
}
<
/span>  
;
<
span
className
=
"title-text"
>
{
item
.
changeDate
}
<
/span
>
<
/div
>
);
})
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/SafetyIndex.js
View file @
801a2c12
...
...
@@ -35,14 +35,14 @@ export default class SafetyIndex extends Component {
const
{
safetyIndexData
}
=
this
.
state
;
return
{
tooltip
:
{
show
:
false
show
:
false
},
toolbox
:
{
show
:
false
,
show
:
false
,
feature
:
{
mark
:
{
show
:
false
},
restore
:
{
show
:
false
},
saveAsImage
:
{
show
:
false
}
mark
:
{
show
:
false
},
restore
:
{
show
:
false
},
saveAsImage
:
{
show
:
false
}
}
},
series
:
[
...
...
@@ -54,10 +54,10 @@ export default class SafetyIndex extends Component {
min
:
0
,
max
:
100
,
endAngle
:
90
,
startAngle
:
-
90
,
startAngle
:
-
90
,
splitNumber
:
3
,
axisLine
:
{
// 坐标轴线
show
:
false
,
show
:
false
,
lineStyle
:
{
// 属性lineStyle控制线条样式
color
:
[
[
0.5
,
'red'
],
...
...
@@ -66,28 +66,28 @@ export default class SafetyIndex extends Component {
[
1
,
'#00C3FF'
]
],
width
:
0
,
opacity
:
0
opacity
:
0
}
},
axisLabel
:
{
// 坐标轴小标记
show
:
false
show
:
false
},
axisTick
:
{
// 坐标轴小标记
show
:
false
show
:
false
},
splitLine
:
{
// 分隔线
show
:
false
show
:
false
},
pointer
:
{
width
:
5
},
title
:
{
show
:
false
show
:
false
},
detail
:
{
show
:
false
show
:
false
},
data
:
[{
value
:
safetyIndexData
.
safetyIndex
,
name
:
'今日安全指数'
}]
data
:
[{
value
:
safetyIndexData
.
safetyIndex
,
name
:
'今日安全指数'
}]
}
]
}
...
...
@@ -103,13 +103,14 @@ export default class SafetyIndex extends Component {
return
(
<
div
className
=
'warnModal'
>
<
div
className
=
'close'
>
<
img
src
=
{
panoramicIcon
.
model_close
}
onClick
=
{()
=>
this
.
modelOpen
(
false
)}
><
/img
>
<
img
src
=
{
panoramicIcon
.
model_close
}
alt
=
''
onClick
=
{()
=>
this
.
modelOpen
(
false
)}
/
>
<
/div
>
<
div
className
=
'warnModal-body'
>
{
warnController
.
map
(
item
=>
{
return
(
<
div
className
=
'model-line'
>
<
div
>
<
img
src
=
{
getIcon
(
item
.
icon
)}
><
/img
>
<
div
key
=
{
item
.
key
}
className
=
'model-line'
>
<
div
className
=
'model-line-img'
>
<
img
src
=
{
getIcon
(
item
.
icon
)}
alt
=
''
/
>
<
/div
>
<
div
className
=
'model-title'
>
{
item
.
label
}
<
/div
>
<
ModelContent
type
=
{
item
.
type
}
/
>
...
...
@@ -117,6 +118,7 @@ export default class SafetyIndex extends Component {
);
})}
<
/div
>
<
/div
>
);
}
...
...
@@ -136,14 +138,14 @@ export default class SafetyIndex extends Component {
<
/span
>
<
/div
>
{
[{
name
:
'风险值上升'
,
num
:
safetyIndexData
.
riskExceptionNum
},
{
name
:
'巡检不合格'
,
num
:
safetyIndexData
.
checkExceptionNum
},
{
name
:
'火灾报警'
,
num
:
safetyIndexData
.
fireExceptionNum
}].
map
((
item
,
index
)
=>
<
div
className
=
"content-item"
>
{
item
.
name
}
{
item
.
num
}
<
/div
>
[{
name
:
'风险异常'
,
num
:
safetyIndexData
.
riskExceptionNum
},
{
name
:
'巡检异常'
,
num
:
safetyIndexData
.
checkExceptionNum
},
{
name
:
'故障告警'
,
num
:
safetyIndexData
.
fireExceptionNum
}].
map
((
item
,
index
)
=>
<
div
key
=
{
item
.
name
}
className
=
"content-item"
>
{
item
.
name
}
{
item
.
num
}
<
/div
>
)
}
<
/div
>
<
ReactEcharts
className
=
'safetyIndex-content-chart'
option
=
{
this
.
getOption
()}
/
>
<
ReactEcharts
className
=
'safetyIndex-content-chart'
option
=
{
this
.
getOption
()}
/
>
{
modelVisable
&&
this
.
renderWarnContent
()}
<
/div
>
);
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/conf.js
View file @
801a2c12
...
...
@@ -2,7 +2,7 @@
* 告警控制
*/
export
const
warnController
=
[
{
key
:
'
fire'
,
icon
:
'model_fire'
,
type
:
'fire'
,
label
:
'火灾
告警'
},
{
key
:
'
equip'
,
icon
:
'model_fire'
,
type
:
'equip'
,
label
:
'故障
告警'
},
{
key
:
'risk'
,
icon
:
'model_risk'
,
type
:
'risk'
,
label
:
'风险异常'
},
{
key
:
'check'
,
icon
:
'model_patrol'
,
type
:
'check'
,
label
:
'巡检异常'
}
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment