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
b9166369
Commit
b9166369
authored
May 22, 2020
by
baoshuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并修改
parent
62f910f4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
13 deletions
+143
-13
EventConsts.js
mods/components/3dviewConvertor/consts/EventConsts.js
+86
-0
statistical.scss
...ts/3dviewConvertor/styles/view/panoramic/statistical.scss
+1
-0
ConvertorView3DRoot.js
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
+20
-5
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+35
-8
statistical.scss
...mponents/panoramic/styles/view/panoramic/statistical.scss
+1
-0
No files found.
mods/components/3dviewConvertor/consts/EventConsts.js
0 → 100644
View file @
b9166369
import
{
PubSub
}
from
'ray-eventpool'
;
export
const
EVENTS_CONSTS
=
{
// 3D stage 操作
A3D_CAMERA_EFFECTS
:
'a3d_camera_effects'
,
// --------- 画布数据操作 --------
// sketch active change. [sketch 选中]
SKETCH_ACTIVE_CHANGE
:
'sketch_active_change'
,
// design sketch data config change. [sketch 数据配置变化]
DATA_CONFIG_CAHNGE
:
'data_config_change'
,
// design animations config change. [场景动画配置变化]
ANIMATION_CAHNGE
:
'animations_config_change'
,
// design sketch data need reload. [sketch 数据重新加载]
DATA_RELOAD
:
'data_reload'
,
// design sketch visual param property change. [sketch 组件显示参数配置信息变化]
SKETCH_PARAMS_CHANGE
:
'sketch_params_change'
,
// design scene base model change. [画布 - 基础场景模型 配置信息变化]
SCENE_BASE_MODEL_CHANGE
:
'scene_base_model_change'
,
// design scene property change. [画布显示参数配置信息变化]
SCENE_PARAMS_CHANGE
:
'scene_params_change'
,
// design scene change. [画布切换]
SCENE_ACTIVE_CHANGE
:
'scene_active_change'
,
// reference change
SKETCH_REFERENCE_CHANGE
:
'sketch_reference_change'
,
// particle/routePath
// -- 细节事件 --
PICKER_COORDINATE
:
'picker_coordinate'
,
// 拾取坐标点
PICKER_COORDINATE_SAVE
:
'picker_coordinate_save'
,
// 保存拾取坐标点
// 动画中绘制路径
DRAW_PATHPOINTS
:
'draw_pathpoints'
,
// 绘制路径
DRAW_PATHPOINTS_SAVE
:
'draw_pathpoints_save'
,
// 保存绘制路径
// 线路 routeline editors
ROUTE_LINE_CHANGE
:
'route_line_change'
,
// 线路切换
// -- 场景处理 --
STAGE_CAMERA_INFO
:
'stage_camera_info'
// 场景摄像机信息同步
};
/**
* 操作类型
*/
export
const
OPERATE_TYPE
=
{
/** 新增 */
ADD
:
'add'
,
/** 删除 */
DEL
:
'del'
,
/** 修改 */
UPDATE
:
'update'
,
/** 查询 */
SEARCH
:
'search'
};
/**
* HTML Event 事件
*/
export
const
EVENT_TYPES
=
{
MOUSE_DOWN
:
'on_mouse_down'
,
MOUSE_MOVE
:
'on_mouse_move'
,
MOUSE_UP
:
'on_mouse_up'
,
};
// --- general publish function
/**
* 分发画布上鼠标按下事件
* @param {*} event
*/
export
function
dispatchMouseDown
(
event
)
{
PubSub
.
publish
(
EVENT_TYPES
.
MOUSE_DOWN
,
event
);
}
/**
* 分发画布上鼠标移动事件
* @param {*} event
*/
export
function
dispatchMouseMove
(
event
)
{
PubSub
.
publish
(
EVENT_TYPES
.
MOUSE_MOVE
,
event
);
}
/**
* 分发画布上鼠标抬起
* @param {*} event
*/
export
function
dispatchMouseUp
(
event
)
{
PubSub
.
publish
(
EVENT_TYPES
.
MOUSE_UP
,
event
);
}
mods/components/3dviewConvertor/styles/view/panoramic/statistical.scss
View file @
b9166369
...
...
@@ -200,6 +200,7 @@
//float: right;
padding-top
:
40px
;
right
:
0
;
top
:
0
;
.echart-week
{
width
:
321px
!
important
;
...
...
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
View file @
b9166369
...
...
@@ -31,7 +31,8 @@ class ConvertorView3DRoot extends Basic {
super
(
props
);
this
.
state
=
{
showScreenSaver
:
false
//是否打开屏保
showScreenSaver
:
false
,
//是否打开屏保
isEdit
:
false
};
this
.
pushTimeOutId
=
null
;
}
...
...
@@ -44,6 +45,14 @@ class ConvertorView3DRoot extends Basic {
this
.
pushTimeOutId
=
null
;
}
}
// componentWillReceiveProps = nextProps => {
// this.setState({ alarmStarted: nextProps.alarmStarted });
// }
editModelChange
=
(
status
)
=>
{
this
.
setState
({
isEdit
:
status
})
}
onLoadCompleted
=
()
=>
{
console
.
log
(
'3d resources load completed'
);
...
...
@@ -95,19 +104,25 @@ class ConvertorView3DRoot extends Basic {
this
.
props
.
trigger
(
topic
,
data
);
};
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
convertorView3dws
);
return
(
<
div
>
{
/* <PanoramicLeft /> */
}
{
this
.
state
.
isEdit
?
''
:
<
PanoramicLeft
/>
}
<
div
className
=
"sys-view-3d"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
View3D
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
/
>
<
View3D
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
editModelChange
=
{
this
.
editModelChange
}
/
>
{
this
.
getScreenSaver
()}
<
/div
>
{
/* <PanoramicRight /> */
}
{
this
.
state
.
isEdit
?
''
:
<
PanoramicRight
/>
}
<
/div
>
);
}
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
b9166369
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
utils
,
UUID
}
from
'amos-tool'
;
import
{
PubSub
}
from
'ray-eventpool'
;
import
{
Connect
as
UIConnect
,
Modal
,
message
}
from
'amos-framework'
;
import
{
FatLine
}
from
'amos-3d/lib/advanced'
;
import
A3DDesigner
,
{
Connect
,
FireObject
,
PolygonRegion
}
from
'amos-3d/lib/designer'
;
import
A3DDesigner
,
{
Connect
,
FireObject
,
DESIGNER_CONSTS
,
PolygonRegion
}
from
'amos-3d/lib/designer'
;
import
WorkerObjContent
from
'amos-3d/lib/worker/WorkerObjContent'
;
import
{
transitionHelper
}
from
'amos-3d/lib/helpers'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
...
...
@@ -37,6 +38,7 @@ import AreaLeftTree from './moduleEditComponent/AreaLeftTree';
import
PointLeftTree
from
'./moduleEditComponent/PointLeftTree'
;
import
RightEditPointPanel
from
'./moduleEditComponent/RightEditPointPanel'
;
import
RightEditRegionPanel
from
'./moduleEditComponent/RightEditRegionPanel'
;
import
{
EVENTS_CONSTS
,
dispatchMouseDown
}
from
'./../consts/EventConsts'
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
view3dFile
=
AmosConfig
.
sysConf
.
convertor
.
view3dFile
;
...
...
@@ -56,7 +58,7 @@ const layerConfig = {
defaultSelects
:
''
,
layers
:
[]
};
const
{
PEN_STATE
}
=
DESIGNER_CONSTS
;
/**
* 换流站3dview
...
...
@@ -133,7 +135,11 @@ class View3D extends Component {
lineColor
:
'#878787'
,
// 边框颜色
regionOpacity
:
0.4
}
}
};
this
.
nativeProps
=
{
onMouseDown
:
this
.
onMouseDown
,
onMouseMove
:
this
.
onMouseMove
};
}
componentDidMount
()
{
...
...
@@ -491,10 +497,13 @@ class View3D extends Component {
const
me
=
this
;
if
(
!
obj
.
isForceParent
)
{
obj
.
on
(
'click'
,
evt
=>
{
console
.
log
(
'obj click:'
,
evt
);
// this.focusPosition(evt.pickedPosition);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
me
.
focusObject
(
evt
.
object
);
if
(
this
.
state
.
editFlag
==
false
)
{
console
.
log
(
'obj click:'
,
evt
);
// this.focusPosition(evt.pickedPosition);
me
.
outlineFactory
.
toggleOutline
(
evt
.
object
);
me
.
focusObject
(
evt
.
object
);
}
});
}
// 处理跳跃
...
...
@@ -549,6 +558,7 @@ class View3D extends Component {
}
startDrow
=
(
areaItem
)
=>
{
// this.a3dRef.addPen();
console
.
log
(
'drow--------'
)
this
.
drowItem
=
areaItem
;
this
.
addPen
(
areaItem
.
id
)
}
...
...
@@ -992,7 +1002,10 @@ class View3D extends Component {
editButtonClick
=
()
=>
{
let
{
editFlag
}
=
this
.
state
;
editFlag
=
!
editFlag
;
if
(
editFlag
==
true
)
{
return
false
;
}
editFlag
=
true
;
this
.
setState
({
editFlag
})
if
(
editFlag
==
true
)
{
getAreaTreeAction
().
then
(
data
=>
{
...
...
@@ -1186,10 +1199,24 @@ class View3D extends Component {
onActionItemClick
=
(
actionType
)
=>
{
console
.
log
(
'onActionItemClick'
);
this
.
clearMarkers
();
this
.
props
.
editModelChange
(
false
)
this
.
setState
({
editFlag
:
false
})
if
(
actionType
===
"impEquipment"
){
this
.
asyncLoadImpEquipment
(
actionType
);
this
.
props
.
editModelChange
(
false
)
this
.
setState
({
editFlag
:
false
})
}
else
if
(
actionType
===
"editMode"
){
this
.
editButtonClick
()
this
.
props
.
editModelChange
(
true
)
}
else
{
this
.
props
.
editModelChange
(
false
)
this
.
setState
({
editFlag
:
false
})
}
}
...
...
mods/components/panoramic/styles/view/panoramic/statistical.scss
View file @
b9166369
...
...
@@ -200,6 +200,7 @@
//float: right;
padding-top
:
40px
;
right
:
0
;
top
:
0
;
.echart-week
{
width
:
321px
!
important
;
...
...
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