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
0c1fa213
Commit
0c1fa213
authored
May 22, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.提交修改控制及合并异常区域代码
parent
872063cb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
218 additions
and
64 deletions
+218
-64
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+8
-0
urlConsts.js
mods/components/3dviewConvertor/consts/urlConsts.js
+3
-11
panoramicService.js
mods/components/3dviewConvertor/services/panoramicService.js
+8
-0
exception_all.png
...onents/3dviewConvertor/threeres/markers/exception_all.png
+0
-0
exception_all@2x.png
...nts/3dviewConvertor/threeres/markers/exception_all@2x.png
+0
-0
exception_fault.png
...ents/3dviewConvertor/threeres/markers/exception_fault.png
+0
-0
exception_fault@2x.png
...s/3dviewConvertor/threeres/markers/exception_fault@2x.png
+0
-0
exception_risk.png
...nents/3dviewConvertor/threeres/markers/exception_risk.png
+0
-0
exception_risk@2x.png
...ts/3dviewConvertor/threeres/markers/exception_risk@2x.png
+0
-0
transparent_rpn.png
...ents/3dviewConvertor/threeres/markers/transparent_rpn.png
+0
-0
ConvertorView3DRoot.js
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
+10
-11
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+39
-21
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+0
-0
index.js
mods/components/3dviewConvertor/view/actionbar/index.js
+8
-16
ModelHeader.js
mods/components/3dviewConvertor/view/common/ModelHeader.js
+32
-0
conf.js
mods/components/3dviewConvertor/view/conf.js
+5
-5
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+105
-0
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
0c1fa213
...
@@ -208,3 +208,11 @@ export const marker3DIoncMapper = {
...
@@ -208,3 +208,11 @@ export const marker3DIoncMapper = {
croom_0
:
'/mods/components/3dviewConvertor/threeres/markers/croom-0.png'
,
croom_0
:
'/mods/components/3dviewConvertor/threeres/markers/croom-0.png'
,
croom_1
:
'/mods/components/3dviewConvertor/threeres/markers/croom-1.png'
croom_1
:
'/mods/components/3dviewConvertor/threeres/markers/croom-1.png'
};
};
export
const
safetyIndexIconMapper
=
{
allEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_all@2x.png'
,
faultEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_fault.png'
,
riskEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_risk.png'
,
transparent_rpn
:
require
(
'./../threeres/markers/transparent_rpn.png'
)
};
mods/components/3dviewConvertor/consts/urlConsts.js
View file @
0c1fa213
...
@@ -62,15 +62,8 @@ export const FscSerUrl = {
...
@@ -62,15 +62,8 @@ export const FscSerUrl = {
safetyIndexWeekUrl
:
completePrefix
(
convertorURI
,
'api/view3d/safetyIndex/week'
),
//一周安全指数趋势查询
safetyIndexWeekUrl
:
completePrefix
(
convertorURI
,
'api/view3d/safetyIndex/week'
),
//一周安全指数趋势查询
statisticsCheckUrl
:
completePrefix
(
convertorURI
,
'api/view3d/statistics/check'
),
//今日巡检统计接口
statisticsCheckUrl
:
completePrefix
(
convertorURI
,
'api/view3d/statistics/check'
),
//今日巡检统计接口
statisticsDutyUrl
:
completePrefix
(
convertorURI
,
'api/view3d/statistics/duty'
),
//今日值班统计
statisticsDutyUrl
:
completePrefix
(
convertorURI
,
'api/view3d/statistics/duty'
),
//今日值班统计
onlineDayUrl
:
completePrefix
(
convertorURI
,
'api/view3d/online/date'
)
//消防安全执行天数
onlineDayUrl
:
completePrefix
(
convertorURI
,
'api/view3d/online/date'
),
//消防安全执行天数
exceptionRegionListUrl
:
completePrefix
(
baseURI
,
'api/view3d/region/exception/list'
),
//异常区域查询
};
};
export
const
FasSerUrl
=
{
export
const
FasSerUrl
=
{
...
@@ -143,4 +136,4 @@ export const ModuleEditUrl = {
...
@@ -143,4 +136,4 @@ export const ModuleEditUrl = {
getPointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/init3dViewNode'
),
//获取初始三维点 type=impEquipment&riskSourceId=1
getPointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/init3dViewNode'
),
//获取初始三维点 type=impEquipment&riskSourceId=1
savePointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/bind'
),
//批量保存点绑定关系
savePointListUrl
:
completePrefix
(
convertorURI
,
'api/view3d/point/bind'
),
//批量保存点绑定关系
}
}
\ No newline at end of file
mods/components/3dviewConvertor/services/panoramicService.js
View file @
0c1fa213
...
@@ -58,3 +58,11 @@ export const statisticsCheckAction = () => {
...
@@ -58,3 +58,11 @@ export const statisticsCheckAction = () => {
export
const
statisticsDutyAction
=
()
=>
{
export
const
statisticsDutyAction
=
()
=>
{
return
commonGet
(
FscSerUrl
.
statisticsDutyUrl
);
return
commonGet
(
FscSerUrl
.
statisticsDutyUrl
);
};
};
/**
* 异常区域
*/
export
const
exceptionRegionListAction
=
()
=>
{
return
commonGet
(
FscSerUrl
.
exceptionRegionListUrl
);
};
mods/components/3dviewConvertor/threeres/markers/exception_all.png
0 → 100644
View file @
0c1fa213
5.54 KB
mods/components/3dviewConvertor/threeres/markers/exception_all@2x.png
0 → 100644
View file @
0c1fa213
17 KB
mods/components/3dviewConvertor/threeres/markers/exception_fault.png
0 → 100644
View file @
0c1fa213
589 Bytes
mods/components/3dviewConvertor/threeres/markers/exception_fault@2x.png
0 → 100644
View file @
0c1fa213
1.21 KB
mods/components/3dviewConvertor/threeres/markers/exception_risk.png
0 → 100644
View file @
0c1fa213
5 KB
mods/components/3dviewConvertor/threeres/markers/exception_risk@2x.png
0 → 100644
View file @
0c1fa213
15.8 KB
mods/components/3dviewConvertor/threeres/markers/transparent_rpn.png
0 → 100644
View file @
0c1fa213
81 Bytes
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
View file @
0c1fa213
...
@@ -6,6 +6,7 @@ import AmosWebSocket from 'amos-websocket';
...
@@ -6,6 +6,7 @@ import AmosWebSocket from 'amos-websocket';
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
PilotController
from
'amos-viz/lib/board/PilotController'
;
import
PilotController
from
'amos-viz/lib/board/PilotController'
;
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
{
eventTopics
}
from
'./consts'
;
import
ScreenSaverView
from
'./screenSaver/ScreenSaverView'
;
import
ScreenSaverView
from
'./screenSaver/ScreenSaverView'
;
import
View3D
from
'./View3D'
;
import
View3D
from
'./View3D'
;
import
PanoramicLeft
from
'./../view/panoramic/statistical/indexLeft'
;
import
PanoramicLeft
from
'./../view/panoramic/statistical/indexLeft'
;
...
@@ -29,7 +30,6 @@ const delayTime = AmosConfig.sysConf.convertor.screenSaverConf.delayTime;
...
@@ -29,7 +30,6 @@ const delayTime = AmosConfig.sysConf.convertor.screenSaverConf.delayTime;
class
ConvertorView3DRoot
extends
Basic
{
class
ConvertorView3DRoot
extends
Basic
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
showScreenSaver
:
false
,
//是否打开屏保
showScreenSaver
:
false
,
//是否打开屏保
isEdit
:
false
isEdit
:
false
...
@@ -51,7 +51,7 @@ class ConvertorView3DRoot extends Basic {
...
@@ -51,7 +51,7 @@ class ConvertorView3DRoot extends Basic {
editModelChange
=
(
status
)
=>
{
editModelChange
=
(
status
)
=>
{
this
.
setState
({
this
.
setState
({
isEdit
:
status
isEdit
:
status
})
})
;
}
}
onLoadCompleted
=
()
=>
{
onLoadCompleted
=
()
=>
{
...
@@ -106,23 +106,22 @@ class ConvertorView3DRoot extends Basic {
...
@@ -106,23 +106,22 @@ class ConvertorView3DRoot extends Basic {
render
()
{
render
()
{
const
{
isEdit
}
=
this
.
state
;
debugger
const
wsURL
=
completeToken
(
SysWsURL
.
convertorView3dws
);
const
wsURL
=
completeToken
(
SysWsURL
.
convertorView3dws
);
return
(
return
(
<
div
>
<
div
>
{
{
this
.
state
.
isEdit
?
''
:
<
PanoramicLeft
/>
isEdit
?
''
:
<
PanoramicLeft
/>
}
}
<
div
className
=
"sys-view-3d"
>
<
div
className
=
"sys-view-3d"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
View3D
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
editModelChange
=
{
this
.
editModelChange
}
/
>
<
View3D
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
editModelChange
=
{
this
.
editModelChange
}
/
>
{
this
.
getScreenSaver
()}
{
this
.
getScreenSaver
()}
<
/div
>
<
/div
>
{
{
this
.
state
.
isEdit
?
''
:
<
PanoramicRight
/>
isEdit
?
''
:
<
PanoramicRight
/>
}
}
<
/div
>
<
/div
>
);
);
}
}
...
...
mods/components/3dviewConvertor/view/MaskContent.js
View file @
0c1fa213
...
@@ -5,13 +5,12 @@ import AmosWebSocket from 'amos-websocket';
...
@@ -5,13 +5,12 @@ import AmosWebSocket from 'amos-websocket';
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
SideControl
from
'./sideControl'
;
import
SideControl
from
'./sideControl'
;
import
DataPane
from
'./datapane'
;
import
DataPane
from
'./datapane'
;
import
Explain
from
'./explain'
;
import
RulesLayer
from
'./global/RulesLayer'
;
import
globalMsg
from
'./pagefactory/msgFactory'
;
import
globalMsg
from
'./pagefactory/msgFactory'
;
import
{
eventTopics
,
rulesDataFactory
}
from
'./consts'
;
import
{
eventTopics
,
rulesDataFactory
}
from
'./consts'
;
import
LayerPool
from
'./LayerPool'
;
import
LayerPool
from
'./LayerPool'
;
import
TopMsg
from
'./sideControl/TopMsg'
;
import
TopMsg
from
'./sideControl/TopMsg'
;
import
ActionBar
from
'./actionbar'
;
import
ActionBar
from
'./actionbar'
;
import
ModelHeader
from
'./common/ModelHeader'
;
const
eventConnect
=
Connect
.
eventConnect
;
const
eventConnect
=
Connect
.
eventConnect
;
...
@@ -21,7 +20,8 @@ class MaskContent extends Component {
...
@@ -21,7 +20,8 @@ class MaskContent extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
sideControlShow
:
true
planStarted
:
false
,
activeAction
:
'panoramic'
};
};
}
}
...
@@ -29,11 +29,11 @@ class MaskContent extends Component {
...
@@ -29,11 +29,11 @@ class MaskContent extends Component {
this
.
setState
({
planStarted
:
this
.
props
.
planStarted
});
this
.
setState
({
planStarted
:
this
.
props
.
planStarted
});
}
}
componentWillReceiveProps
=
(
nextProps
)
=>
{
componentWillReceiveProps
=
(
nextProps
)
=>
{
this
.
setState
({
planStarted
:
nextProps
.
planStarted
});
this
.
setState
({
planStarted
:
nextProps
.
planStarted
});
}
}
/**
/**
* 监控视图消息 (规则 ws)
* 监控视图消息 (规则 ws)
*/
*/
...
@@ -48,23 +48,36 @@ class MaskContent extends Component {
...
@@ -48,23 +48,36 @@ class MaskContent extends Component {
this
.
props
.
trigger
(
topic
,
content
);
this
.
props
.
trigger
(
topic
,
content
);
};
};
actionBarClick
=
(
type
)
=>
{
actionBarClick
=
({
singleClick
,
type
,
label
,
showLabel
})
=>
{
this
.
changeSideControlShow
(
type
);
if
(
!
singleClick
){
//设置选中状态
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
type
);
this
.
setState
({
activeAction
:
type
});
}
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
type
,
label
,
showLabel
);
}
handleExceptModel
=
(
type
)
=>
{
this
.
initViewModel
();
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
type
);
}
}
changeSideControlShow
=
(
type
)
=>
{
initViewModel
=
()
=>
{
let
sideControlShow
=
false
;
this
.
setState
({
activeAction
:
'panoramic'
});
if
(
type
===
"panoramicMode"
){
sideControlShow
=
true
;
}
this
.
setState
({
sideControlShow
});
}
}
render
()
{
render
()
{
const
{
planStarted
,
sideControlShow
}
=
this
.
state
;
const
{
planStarted
,
activeAction
}
=
this
.
state
;
const
{
multiple
,
onItemClick
,
layerConfig
,
showExplain
,
onExplainClose
,
alarmStarted
,
alarmStart
,
planStart
,
planQuit
}
=
this
.
props
;
const
{
const
{
onActionItemClick
}
=
this
.
props
;
multiple
,
onItemClick
,
layerConfig
,
alarmStarted
,
alarmStart
,
planStart
,
planQuit
,
sideControlShow
,
isShowActionBar
,
headerName
}
=
this
.
props
;
const
wsURL
=
completeToken
(
SysWsURL
.
convertorRulews
);
const
wsURL
=
completeToken
(
SysWsURL
.
convertorRulews
);
const
controlAnimation
=
{
const
controlAnimation
=
{
animateName
:
'zoom-comb-left'
,
animateName
:
'zoom-comb-left'
,
...
@@ -98,10 +111,9 @@ class MaskContent extends Component {
...
@@ -98,10 +111,9 @@ class MaskContent extends Component {
{
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
/>
}
{
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
/>
}
{
sideControlShow
&&
<
DataPane
animationProps
=
{
datapaneAnim
}
/>
}
{
sideControlShow
&&
<
DataPane
animationProps
=
{
datapaneAnim
}
/>
}
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
<
ActionBar
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/
>
{
!
isShowActionBar
&&
<
ModelHeader
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
/* <RulesLayer />
{
isShowActionBar
&&
<
ActionBar
activeAction
=
{
activeAction
}
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/>
}
{alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />}
{
/*{alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />}*/
}
<Explain visible={showExplain} onExplainClose={onExplainClose} />*/
}
<
/div
>
<
/div
>
);
);
}
}
...
@@ -121,7 +133,13 @@ MaskContent.propTypes = {
...
@@ -121,7 +133,13 @@ MaskContent.propTypes = {
alarmStart
:
PropTypes
.
func
,
alarmStart
:
PropTypes
.
func
,
planStart
:
PropTypes
.
func
,
planStart
:
PropTypes
.
func
,
planQuit
:
PropTypes
.
func
,
planQuit
:
PropTypes
.
func
,
alarmStarted
:
PropTypes
.
bool
alarmStarted
:
PropTypes
.
bool
,
onActionItemClick
:
PropTypes
.
func
,
sideControlShow
:
PropTypes
.
bool
,
isShowActionBar
:
PropTypes
.
bool
,
headerName
:
PropTypes
.
string
,
setHeaderName
:
PropTypes
.
string
,
handleExceptModel
:
PropTypes
.
func
};
};
MaskContent
.
defaultProps
=
{
MaskContent
.
defaultProps
=
{
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
0c1fa213
This diff is collapsed.
Click to expand it.
mods/components/3dviewConvertor/view/actionbar/index.js
View file @
0c1fa213
...
@@ -5,29 +5,19 @@ import { Connect } from 'amos-framework';
...
@@ -5,29 +5,19 @@ import { Connect } from 'amos-framework';
import
{
SidePane
}
from
'amos-framework'
;
import
{
SidePane
}
from
'amos-framework'
;
import
{
actionBars
}
from
'./../conf'
;
import
{
actionBars
}
from
'./../conf'
;
import
{
eventTopics
}
from
'./../consts'
;
import
{
eventTopics
}
from
'./../consts'
;
import
BizIcon
from
'./../common/icon/BizIcon'
;
const
eventConnect
=
Connect
.
eventConnect
;
const
eventConnect
=
Connect
.
eventConnect
;
/**
/**
* 底部操作栏
* 底部操作栏
*/
*/
@
eventConnect
@
eventConnect
class
ActionBar
extends
Component
{
class
ActionBar
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
activeAction
:
"panoramicMode"
};
}
}
itemClick
=
(
item
)
=>
{
itemClick
=
(
item
)
=>
{
if
(
!
item
.
singleClick
){
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
item
);
this
.
setState
({
activeAction
:
item
.
type
});
}
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
item
.
type
);
this
.
props
.
trigger
(
eventTopics
.
innate_operater
,
{
this
.
props
.
trigger
(
eventTopics
.
innate_operater
,
{
key
:
item
.
type
,
key
:
item
.
type
,
value
:
true
value
:
true
...
@@ -35,8 +25,7 @@ class ActionBar extends Component {
...
@@ -35,8 +25,7 @@ class ActionBar extends Component {
}
}
render
()
{
render
()
{
const
{
activeAction
}
=
this
.
state
;
const
{
animationProps
,
activeAction
=
'panoramic'
}
=
this
.
props
;
const
{
onActionItemClick
,
animationProps
}
=
this
.
props
;
return
(
return
(
<
SidePane
className
=
"action-pane-data"
{...
animationProps
}
>
<
SidePane
className
=
"action-pane-data"
{...
animationProps
}
>
<
div
className
=
"action-list"
>
<
div
className
=
"action-list"
>
...
@@ -47,12 +36,12 @@ class ActionBar extends Component {
...
@@ -47,12 +36,12 @@ class ActionBar extends Component {
'action-active'
:
activeAction
===
a
.
type
&&
!
a
.
singleClick
'action-active'
:
activeAction
===
a
.
type
&&
!
a
.
singleClick
});
});
return
(
return
(
<
div
className
=
{
cls
}
onClick
=
{()
=>
this
.
itemClick
(
a
)}
>
<
div
key
=
{
a
.
key
}
className
=
{
cls
}
onClick
=
{()
=>
this
.
itemClick
(
a
)}
>
<
div
className
=
"action-item-title"
>
<
div
className
=
"action-item-title"
>
<
p
className
=
""
>
{
a
.
label
}
<
/p
>
<
p
className
=
""
>
{
a
.
label
}
<
/p
>
<
/div
>
<
/div
>
<
div
className
=
"action-item-content"
>
<
div
className
=
"action-item-content"
>
<
img
className
=
"action-item-icon"
src
=
{
require
(
`./../../assets/convertor/3dview/actionbars/
${
a
.
icon
}
.png`
)}
/
>
<
img
className
=
"action-item-icon"
alt
=
""
src
=
{
require
(
`./../../assets/convertor/3dview/actionbars/
${
a
.
icon
}
.png`
)}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
@@ -65,7 +54,10 @@ class ActionBar extends Component {
...
@@ -65,7 +54,10 @@ class ActionBar extends Component {
}
}
ActionBar
.
propTypes
=
{
ActionBar
.
propTypes
=
{
animationProps
:
PropTypes
.
object
animationProps
:
PropTypes
.
object
,
onActionItemClick
:
PropTypes
.
func
,
trigger
:
PropTypes
.
func
,
activeAction
:
PropTypes
};
};
export
default
ActionBar
;
export
default
ActionBar
;
mods/components/3dviewConvertor/view/common/ModelHeader.js
0 → 100644
View file @
0c1fa213
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
export
default
class
ModelHeader
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
quitEditMode
=
(
e
)
=>
{
e
.
stopPropagation
();
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'out_except_model'
);
}
render
()
{
const
{
headerName
}
=
this
.
props
;
return
(
<
div
className
=
'ModuleEditPage'
>
<
div
className
=
'topBox'
>
<
span
className
=
'editTitle'
>
<
span
className
=
'titleText'
>
{
headerName
}
<
/span
>
<
/span
>
<
span
className
=
'quipBtn'
onClick
=
{
this
.
quitEditMode
}
/
>
<
/div
>
<
/div
>
);
}
}
ModelHeader
.
propTypes
=
{
headerName
:
PropTypes
.
string
,
handleExceptModel
:
PropTypes
.
func
};
mods/components/3dviewConvertor/view/conf.js
View file @
0c1fa213
...
@@ -79,11 +79,11 @@ export const viewController = [
...
@@ -79,11 +79,11 @@ export const viewController = [
* 视图控制
* 视图控制
*/
*/
export
const
actionBars
=
[
export
const
actionBars
=
[
{
key
:
'impEquipment-action'
,
icon
:
'impEquipment'
,
type
:
'impEquipment'
,
singleClick
:
false
,
label
:
'重点设备'
},
{
key
:
'impEquipment-action'
,
icon
:
'impEquipment'
,
type
:
'impEquipment'
,
singleClick
:
false
,
label
:
'重点设备'
,
showLabel
:
true
},
{
key
:
'panoramic-action'
,
icon
:
'panoramic'
,
type
:
'panoramic'
,
singleClick
:
false
,
label
:
'全景'
},
{
key
:
'panoramic-action'
,
icon
:
'panoramic'
,
type
:
'panoramic'
,
singleClick
:
false
,
label
:
'全景'
,
showLabel
:
true
},
{
key
:
'burst-action'
,
icon
:
'burst'
,
type
:
'burst'
,
singleClick
:
true
,
label
:
'分解'
},
{
key
:
'burst-action'
,
icon
:
'burst'
,
type
:
'burst'
,
singleClick
:
true
,
label
:
'分解'
,
showLabel
:
false
},
{
key
:
'fitview-action'
,
icon
:
'fitview'
,
type
:
'fitview'
,
singleClick
:
true
,
label
:
'初始视图'
},
{
key
:
'fitview-action'
,
icon
:
'fitview'
,
type
:
'fitview'
,
singleClick
:
true
,
label
:
'初始视图'
,
showLabel
:
false
},
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
false
,
label
:
'编辑'
}
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
false
,
label
:
'编辑'
,
showLabel
:
true
}
];
];
/**
/**
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
0 → 100644
View file @
0c1fa213
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
utils
,
Store
}
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
];
};
const
buildMarkerOptions
=
(
markers
)
=>
{
if
(
!
utils
.
isEmpty
(
markers
)){
markers
.
forEach
(
m
=>
{
const
url
=
getIcon
(
m
.
exceptionType
||
'allEror'
);
let
position
;
if
(
!
utils
.
isArray
(
m
.
position
)){
position
=
Object
.
values
(
m
.
position
);
}
m
.
key
=
m
.
key
||
m
.
id
;
m
.
url
=
url
;
m
.
position
=
utils
.
isArray
(
m
.
position
)
?
m
.
position
:
position
;
m
.
size
=
23
;
});
}
return
markers
;
};
/**
* 异常区域点
*/
@
connect3D
class
ExceptionArea
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
markerEvents
=
{
click
:
this
.
onMarkerClick
};
}
componentWillMount
=
()
=>
{
}
onMarkerClick
=
(
marker
)
=>
{
const
{
extData
}
=
marker
;
lsTool
.
write
(
'errorAreaId'
,
extData
.
id
);
this
.
props
.
handleExceptModel
&&
this
.
props
.
handleExceptModel
(
'into_except_model'
);
}
setTopCardConf
=
(
obj
,{
safetyIndex
})
=>
{
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
planeOptions
:
{
width
:
40
,
height
:
40
,
position
:
[
0
,
4
,
0
],
doubleSide
:
true
},
canvasOptions
:
{
font
:
'34px Microsoft YaHei'
,
fillStyle
:
'white'
,
textBaseline
:
'middle'
,
textAlign
:
'center'
,
textX
:
128
},
imgWidth
:
256
,
imgHeight
:
128
,
image
:
safetyIndexIconMapper
[
'transparent_rpn'
]
};
obj
.
baseObjHelper
.
title
=
safetyIndex
;
}
markerCreated
=
({
markersCache
})
=>
{
this
.
markersCache
=
markersCache
;
markersCache
.
eachValue
(
item
=>
{
const
obj
=
item
.
node
;
const
boh
=
new
BaseObjHelper
({
obj
});
obj
.
baseObjHelper
=
boh
;
this
.
setTopCardConf
(
obj
,
item
.
extData
);
});
}
render
()
{
const
{
markers
=
[],
...
rest
}
=
this
.
props
;
const
result
=
buildMarkerOptions
(
markers
);
return
(
<
Markers
{...
rest
}
markers
=
{
result
}
events
=
{
this
.
markerEvents
}
onCreated
=
{
this
.
markerCreated
}
/
>
);
}
}
ExceptionArea
.
propTypes
=
{
markers
:
PropTypes
.
array
,
handleExceptModel
:
PropTypes
.
func
};
export
default
ExceptionArea
;
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