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
144c5ccd
Commit
144c5ccd
authored
Jun 17, 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
3361ed6d
a20b98b8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
21 deletions
+48
-21
ConvertorView3DRoot.js
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
+12
-14
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+15
-3
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+6
-2
index.js
mods/components/3dviewConvertor/view/actionbar/index.js
+15
-2
No files found.
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
View file @
144c5ccd
import
React
from
'react'
;
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
Connect
,
Modal
}
from
'amos-framework'
;
import
{
Modal
}
from
'amos-framework'
;
import
Basic
from
'amos-designer/lib/pages/sketchs'
;
import
Basic
from
'amos-designer/lib/pages/sketchs'
;
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'
;
...
@@ -11,18 +11,17 @@ import Statistical from './../view/panoramic/statistical';
...
@@ -11,18 +11,17 @@ import Statistical from './../view/panoramic/statistical';
// 引入换流站3dview模块主体样式文件
// 引入换流站3dview模块主体样式文件
import
'./../styles'
;
import
'./../styles'
;
const
eventConnect
=
Connect
.
eventConnect
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
enableScreenSaver
=
AmosConfig
.
sysConf
.
convertor
.
screenSaverConf
.
enable
;
const
enableScreenSaver
=
AmosConfig
.
sysConf
.
convertor
.
screenSaverConf
.
enable
;
const
delayTime
=
AmosConfig
.
sysConf
.
convertor
.
screenSaverConf
.
delayTime
;
const
delayTime
=
AmosConfig
.
sysConf
.
convertor
.
screenSaverConf
.
delayTime
;
const
timeOutTime
=
1000
;
/**
/**
* 换流站3dview
* 换流站3dview
*
*
* @class ConvertorView3DRoot
* @class ConvertorView3DRoot
* @extends {Basic}
* @extends {Basic}
*/
*/
@
eventConnect
class
ConvertorView3DRoot
extends
Basic
{
class
ConvertorView3DRoot
extends
Basic
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
...
@@ -31,7 +30,6 @@ class ConvertorView3DRoot extends Basic {
...
@@ -31,7 +30,6 @@ class ConvertorView3DRoot extends Basic {
isEdit
:
false
isEdit
:
false
};
};
this
.
pushTimeOutId
=
null
;
this
.
pushTimeOutId
=
null
;
}
}
componentDidMount
()
{}
componentDidMount
()
{}
...
@@ -44,16 +42,12 @@ class ConvertorView3DRoot extends Basic {
...
@@ -44,16 +42,12 @@ class ConvertorView3DRoot extends Basic {
}
}
editModelChange
=
(
status
)
=>
{
editModelChange
=
(
status
)
=>
{
this
.
setState
({
this
.
setState
({
isEdit
:
status
});
isEdit
:
status
});
}
}
onLoadCompleted
=
()
=>
{
onLoadCompleted
=
()
=>
{
console
.
log
(
'3d resources load completed'
);
console
.
log
(
'3d resources load completed'
);
this
.
setState
({
this
.
setState
({
showScreenSaver
:
true
});
showScreenSaver
:
true
});
};
};
getScreenSaverContext
=
()
=>
{
getScreenSaverContext
=
()
=>
{
...
@@ -86,17 +80,20 @@ class ConvertorView3DRoot extends Basic {
...
@@ -86,17 +80,20 @@ class ConvertorView3DRoot extends Basic {
this
.
setState
({
this
.
setState
({
showScreenSaver
:
true
showScreenSaver
:
true
});
});
},
1000
);
},
timeOutTime
);
}
}
}
}
render
()
{
render
()
{
const
{
isEdit
}
=
this
.
state
;
const
{
isEdit
}
=
this
.
state
;
const
{
isPermissionControl
=
false
,
bizPerActionBars
=
{}
}
=
this
.
props
;
return
(
return
(
<
div
style
=
{{
height
:
'100%'
}}
>
<
div
style
=
{{
height
:
'100%'
}}
>
{
isEdit
?
''
:
<
Statistical
/>
}
{
isEdit
?
''
:
<
Statistical
/>
}
<
div
className
=
"sys-view-3d"
>
<
div
className
=
"sys-view-3d"
>
<
View3D
<
View3D
isPermissionControl
=
{
isPermissionControl
}
bizPerActionBars
=
{
bizPerActionBars
}
ref
=
{
node
=>
this
.
view3d
=
node
}
ref
=
{
node
=>
this
.
view3d
=
node
}
onLoadCompleted
=
{
this
.
onLoadCompleted
}
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
...
@@ -111,7 +108,8 @@ class ConvertorView3DRoot extends Basic {
...
@@ -111,7 +108,8 @@ class ConvertorView3DRoot extends Basic {
ConvertorView3DRoot
.
propTypes
=
{
ConvertorView3DRoot
.
propTypes
=
{
subscribe
:
PropTypes
.
func
,
subscribe
:
PropTypes
.
func
,
trigger
:
PropTypes
.
func
trigger
:
PropTypes
.
func
,
isPermissionControl
:
PropTypes
.
bool
,
bizPerActionBars
:
PropTypes
.
arrays
};
};
export
default
ConvertorView3DRoot
;
export
default
ConvertorView3DRoot
;
mods/components/3dviewConvertor/view/MaskContent.js
View file @
144c5ccd
...
@@ -88,7 +88,9 @@ class MaskContent extends Component {
...
@@ -88,7 +88,9 @@ class MaskContent extends Component {
isShowActionBar
,
isShowActionBar
,
headerName
,
headerName
,
errorAreaId
,
errorAreaId
,
focusPosition
focusPosition
,
isPermissionControl
,
bizPerActionBars
}
=
this
.
props
;
}
=
this
.
props
;
alarmStarted
&&
this
.
props
.
editModelChange
(
true
);
alarmStarted
&&
this
.
props
.
editModelChange
(
true
);
const
wsURL
=
completeToken
(
SysWsURL
.
rulews
);
const
wsURL
=
completeToken
(
SysWsURL
.
rulews
);
...
@@ -117,7 +119,15 @@ class MaskContent extends Component {
...
@@ -117,7 +119,15 @@ class MaskContent extends Component {
{
!
alarmStarted
&&
isShowActionBar
&&
<
SearchPane
visible
=
{
searchPaneVisible
}
focusPosition
=
{
focusPosition
}
changeSearchPaneVisible
=
{
this
.
changeSearchPaneVisible
}
/>
}
{
!
alarmStarted
&&
isShowActionBar
&&
<
SearchPane
visible
=
{
searchPaneVisible
}
focusPosition
=
{
focusPosition
}
changeSearchPaneVisible
=
{
this
.
changeSearchPaneVisible
}
/>
}
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
{
!
alarmStarted
&&
!
isShowActionBar
&&
<
ModelHeader
animationProps
=
{
controlAnimation
}
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
!
alarmStarted
&&
!
isShowActionBar
&&
<
ModelHeader
animationProps
=
{
controlAnimation
}
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
!
alarmStarted
&&
isShowActionBar
&&
<
ActionBar
activeAction
=
{
activeAction
}
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/>
}
{
!
alarmStarted
&&
isShowActionBar
&&
<
ActionBar
isPermissionControl
=
{
isPermissionControl
}
bizPerActionBars
=
{
bizPerActionBars
}
PeractiveAction
=
{
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
}
/>
}
<
/div
>
<
/div
>
);
);
...
@@ -147,7 +157,9 @@ MaskContent.propTypes = {
...
@@ -147,7 +157,9 @@ MaskContent.propTypes = {
handleExceptModel
:
PropTypes
.
func
,
handleExceptModel
:
PropTypes
.
func
,
errorAreaId
:
PropTypes
.
number
,
errorAreaId
:
PropTypes
.
number
,
editModelChange
:
PropTypes
.
func
,
editModelChange
:
PropTypes
.
func
,
focusPosition
:
PropTypes
.
func
focusPosition
:
PropTypes
.
func
,
isPermissionControl
:
PropTypes
.
bool
,
bizPerActionBars
:
PropTypes
.
arrays
};
};
MaskContent
.
defaultProps
=
{
MaskContent
.
defaultProps
=
{
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
144c5ccd
...
@@ -1719,7 +1719,7 @@ class View3D extends Component {
...
@@ -1719,7 +1719,7 @@ class View3D extends Component {
isOutterView
,
isOutterView
,
routePathData
routePathData
}
=
this
.
state
;
}
=
this
.
state
;
const
{
dimension
,
hiddenScreenSaver
,
editModelChange
}
=
this
.
props
;
const
{
dimension
,
hiddenScreenSaver
,
editModelChange
,
isPermissionControl
,
bizPerActionBars
}
=
this
.
props
;
const
graphicProps
=
{
const
graphicProps
=
{
...
dimension
,
...
dimension
,
...
desigerConf
,
...
desigerConf
,
...
@@ -1799,6 +1799,8 @@ class View3D extends Component {
...
@@ -1799,6 +1799,8 @@ class View3D extends Component {
handleExceptModel
=
{
this
.
handleExceptModel
}
handleExceptModel
=
{
this
.
handleExceptModel
}
editModelChange
=
{
editModelChange
}
editModelChange
=
{
editModelChange
}
focusPosition
=
{
this
.
focusPosition
}
focusPosition
=
{
this
.
focusPosition
}
isPermissionControl
=
{
isPermissionControl
}
bizPerActionBars
=
{
bizPerActionBars
}
/
>
/
>
}
}
modelContentProps
=
{
modelContentProps
}
modelContentProps
=
{
modelContentProps
}
...
@@ -1882,7 +1884,9 @@ View3D.propTypes = {
...
@@ -1882,7 +1884,9 @@ View3D.propTypes = {
onLoadCompleted
:
PropTypes
.
func
,
onLoadCompleted
:
PropTypes
.
func
,
alarmStart
:
PropTypes
.
func
,
alarmStart
:
PropTypes
.
func
,
planStart
:
PropTypes
.
func
,
planStart
:
PropTypes
.
func
,
editModelChange
:
PropTypes
.
func
editModelChange
:
PropTypes
.
func
,
isPermissionControl
:
PropTypes
.
bool
,
bizPerActionBars
:
PropTypes
.
arrays
};
};
export
default
View3D
;
export
default
View3D
;
mods/components/3dviewConvertor/view/actionbar/index.js
View file @
144c5ccd
...
@@ -16,6 +16,16 @@ class ActionBar extends Component {
...
@@ -16,6 +16,16 @@ class ActionBar extends Component {
super
(
props
);
super
(
props
);
}
}
getActionBars
=
()
=>
{
const
{
isPermissionControl
=
false
,
bizPerActionBars
=
{}
}
=
this
.
props
;
if
(
isPermissionControl
){
return
actionBars
.
filter
(
bar
=>
bizPerActionBars
[
bar
.
key
]
&&
bizPerActionBars
[
bar
.
key
].
hasPermission
);
}
else
{
return
actionBars
;
}
}
itemClick
=
(
item
)
=>
{
itemClick
=
(
item
)
=>
{
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
item
);
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
item
);
this
.
props
.
trigger
(
eventTopics
.
innate_operater
,
{
this
.
props
.
trigger
(
eventTopics
.
innate_operater
,
{
...
@@ -26,11 +36,12 @@ class ActionBar extends Component {
...
@@ -26,11 +36,12 @@ class ActionBar extends Component {
render
()
{
render
()
{
const
{
animationProps
,
activeAction
=
'panoramic'
}
=
this
.
props
;
const
{
animationProps
,
activeAction
=
'panoramic'
}
=
this
.
props
;
const
permissionBars
=
this
.
getActionBars
();
return
(
return
(
<
SidePane
className
=
"action-pane-data"
left
=
{
false
}
top
=
{
false
}
{...
animationProps
}
>
<
SidePane
className
=
"action-pane-data"
left
=
{
false
}
top
=
{
false
}
{...
animationProps
}
>
<
div
className
=
"action-list"
>
<
div
className
=
"action-list"
>
{
{
act
ionBars
.
map
(
a
=>
{
permiss
ionBars
.
map
(
a
=>
{
const
cls
=
classNames
({
const
cls
=
classNames
({
'action-item'
:
true
,
'action-item'
:
true
,
'action-active'
:
activeAction
===
a
.
type
&&
!
a
.
singleClick
'action-active'
:
activeAction
===
a
.
type
&&
!
a
.
singleClick
...
@@ -57,7 +68,9 @@ ActionBar.propTypes = {
...
@@ -57,7 +68,9 @@ ActionBar.propTypes = {
animationProps
:
PropTypes
.
object
,
animationProps
:
PropTypes
.
object
,
onActionItemClick
:
PropTypes
.
func
,
onActionItemClick
:
PropTypes
.
func
,
trigger
:
PropTypes
.
func
,
trigger
:
PropTypes
.
func
,
activeAction
:
PropTypes
activeAction
:
PropTypes
,
isPermissionControl
:
PropTypes
.
bool
,
bizPerActionBars
:
PropTypes
.
arrays
};
};
export
default
ActionBar
;
export
default
ActionBar
;
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