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
2ceb61fd
Commit
2ceb61fd
authored
May 20, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
29d9f281
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
index.js
mods/components/3dviewConvertor/view/actionbar/index.js
+20
-6
conf.js
mods/components/3dviewConvertor/view/conf.js
+3
-3
No files found.
mods/components/3dviewConvertor/view/actionbar/index.js
View file @
2ceb61fd
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
classNames
from
'classnames'
;
import
{
Connect
}
from
'amos-framework'
;
import
{
SidePane
}
from
'amos-framework'
;
import
{
actionBars
}
from
'./../conf'
;
import
BizIcon
from
'./../common/icon/BizIcon'
import
{
eventTopics
}
from
'./../consts'
;
import
BizIcon
from
'./../common/icon/BizIcon'
;
const
eventConnect
=
Connect
.
eventConnect
;
/**
* 底部操作栏
*/
@
eventConnect
class
ActionBar
extends
Component
{
constructor
(
props
)
{
...
...
@@ -17,9 +22,16 @@ class ActionBar extends Component {
};
}
itemClick
=
(
activeAction
)
=>
{
this
.
setState
({
activeAction
});
itemClick
=
(
item
)
=>
{
if
(
!
item
.
singleClick
){
this
.
setState
({
activeAction
:
item
.
type
});
}
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
();
this
.
props
.
trigger
(
eventTopics
.
innate_operater
,
{
key
:
item
.
type
,
value
:
true
});
}
render
()
{
...
...
@@ -32,11 +44,13 @@ class ActionBar extends Component {
actionBars
.
map
(
a
=>
{
const
cls
=
classNames
({
'action-item'
:
true
,
'action-active'
:
activeAction
===
a
.
type
'action-active'
:
activeAction
===
a
.
type
&&
!
a
.
singleClick
});
return
(
<
div
className
=
{
cls
}
onClick
=
{()
=>
this
.
itemClick
(
a
.
type
)}
>
<
p
className
=
"action-item-title"
>
{
a
.
label
}
<
/p
>
<
div
className
=
{
cls
}
onClick
=
{()
=>
this
.
itemClick
(
a
)}
>
<
div
className
=
"action-item-title"
>
<
p
className
=
""
>
{
a
.
label
}
<
/p
>
<
/div
>
<
img
className
=
"action-item-icon"
src
=
{
require
(
`./../../assets/convertor/3dview/actionbars/
${
a
.
icon
}
.png`
)}
/
>
<
/div
>
);
...
...
mods/components/3dviewConvertor/view/conf.js
View file @
2ceb61fd
...
...
@@ -79,11 +79,11 @@ export const viewController = [
* 视图控制
*/
export
const
actionBars
=
[
{
key
:
'impEquipment-action'
,
icon
:
'impEquipment'
,
type
:
'impEquipmentMode'
,
singleClick
:
tru
e
,
label
:
'重点设备'
},
{
key
:
'panoramic-action'
,
icon
:
'panoramic'
,
type
:
'panoramicMode'
,
singleClick
:
tru
e
,
label
:
'全景'
},
{
key
:
'impEquipment-action'
,
icon
:
'impEquipment'
,
type
:
'impEquipmentMode'
,
singleClick
:
fals
e
,
label
:
'重点设备'
},
{
key
:
'panoramic-action'
,
icon
:
'panoramic'
,
type
:
'panoramicMode'
,
singleClick
:
fals
e
,
label
:
'全景'
},
{
key
:
'burst-action'
,
icon
:
'burst'
,
type
:
'burst'
,
singleClick
:
true
,
label
:
'分解'
},
{
key
:
'fitview-action'
,
icon
:
'fitview'
,
type
:
'fitview'
,
singleClick
:
true
,
label
:
'初始视图'
},
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
tru
e
,
label
:
'编辑'
}
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
fals
e
,
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