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
81a0485e
Commit
81a0485e
authored
May 18, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改全景监控样式
parent
0604ed7a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
13 deletions
+145
-13
entry.js
example/entry.js
+6
-3
index.js
mods/components/panoramic/index.js
+3
-3
index.jsx
mods/components/panoramic/index.jsx
+7
-0
index.scss
mods/components/panoramic/styles/view/panoramic/index.scss
+1
-1
statistical.scss
...mponents/panoramic/styles/view/panoramic/statistical.scss
+10
-6
indexLeft.js
...ponents/panoramic/view/panoramic/statistical/indexLeft.js
+59
-0
indexRight.js
...onents/panoramic/view/panoramic/statistical/indexRight.js
+59
-0
No files found.
example/entry.js
View file @
81a0485e
...
...
@@ -22,11 +22,14 @@ class App extends Component {
render
()
{
const
Photo
=
getSketchCompnents
(
'photo'
);
const
ConvertorView3DRoot
=
getSketchCompnents
(
'convertorView3DRoot'
);
const
Panoramic
=
getSketchCompnents
(
'panoramic'
);
const
PanoramicLeft
=
getSketchCompnents
(
'panoramicLeft'
);
const
PanoramicRight
=
getSketchCompnents
(
'panoramicRight'
);
return
(
<
div
>
{
/*<ConvertorView3DRoot />*/
}
<
Panoramic
/>
<
PanoramicLeft
/>
<
ConvertorView3DRoot
/>
<
PanoramicRight
/>
<
/div
>
);
}
...
...
mods/components/panoramic/index.js
View file @
81a0485e
import
panoramic
from
'./view/panoramic
'
;
import
panoramic
Left
from
'./view/panoramic/statistical/indexLeft
'
;
export
default
{
key
:
'panoramic'
,
component
:
panoramic
key
:
'panoramic
Left
'
,
component
:
panoramic
Left
};
mods/components/panoramic/index.jsx
0 → 100644
View file @
81a0485e
import
panoramicRight
from
'./view/panoramic/statistical/indexRight'
;
export
default
{
key
:
'panoramicRight'
,
component
:
panoramicRight
};
mods/components/panoramic/styles/view/panoramic/index.scss
View file @
81a0485e
...
...
@@ -5,6 +5,6 @@
top
:
40px
;
height
:
calc
(
100%
-
40px
);
width
:
100%
;
background
:
black
;
//
background: black;
color
:
white
;
}
mods/components/panoramic/styles/view/panoramic/statistical.scss
View file @
81a0485e
.statistical
{
position
:
absolute
;
height
:
100%
;
width
:
100%
;
//
.statistical {
//
position: absolute;
//
height: 100%;
//
width: 100%;
.statistical-left
{
position
:
absolute
;
height
:
100%
;
width
:
350px
;
float
:
left
;
z-index
:
1
;
.equipStatusList
{
padding-left
:
97px
;
...
...
@@ -192,10 +194,12 @@
}
.statistical-right
{
position
:
absolute
;
height
:
100%
;
width
:
355px
;
float
:
right
;
//
float: right;
padding-top
:
40px
;
right
:
0
;
.echart-week
{
width
:
321px
!
important
;
...
...
@@ -445,7 +449,7 @@
}
}
}
}
//
}
.warnModal
{
position
:
absolute
;
...
...
mods/components/panoramic/view/panoramic/statistical/indexLeft.js
0 → 100644
View file @
81a0485e
import
React
,
{
Component
}
from
'react'
;
import
EquipStatusList
from
'./EquipStatusList'
;
import
SafetyExecuteList
from
'./SafetyExecuteList'
;
import
SafetyIndex
from
'./SafetyIndex'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
SysWsURL
,
{
completeToken
}
from
'./../../../consts/wsUrlConsts'
;
/**
* 全景监控统计
*/
export
default
class
StatisticalLeft
extends
Component
{
handleData
=
(
data
=
{})
=>
{
console
.
log
(
'ws data:'
,
data
);
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
console
.
log
(
data
);
let
refreshType
=
data
.
refreshType
;
let
content
=
data
.
content
;
switch
(
refreshType
){
case
'today_safety_index'
:
console
.
log
(
'今日安全指数刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndex
.
getSafetyIndex
();
break
;
case
'fire_safety'
:
console
.
log
(
'消防安全执行刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyExecute
.
safetyExecuteList
();
break
;
case
'monitor_data'
:
console
.
log
(
'设备状态检测数据刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
equipStatus
.
equipStatusList
();
break
;
case
'error_status'
:
console
.
log
(
'异常区域刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'all'
:
console
.
log
(
'首页左侧刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndex
.
getSafetyIndex
();
this
.
safetyExecute
.
safetyExecuteList
();
this
.
equipStatus
.
equipStatusList
();
break
;
default
:
console
.
log
(
refreshType
,
':类型不支持'
);
}
}
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
viewIndexws
);
return
(
<
div
className
=
"statistical-left"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
SafetyIndex
ref
=
{
node
=>
this
.
safetyIndex
=
node
}
/
>
<
SafetyExecuteList
ref
=
{
node
=>
this
.
safetyExecute
=
node
}
/
>
<
EquipStatusList
ref
=
{
node
=>
this
.
equipStatus
=
node
}
/
>
<
/div
>
);
}
}
mods/components/panoramic/view/panoramic/statistical/indexRight.js
0 → 100644
View file @
81a0485e
import
React
,
{
Component
}
from
'react'
;
import
SafetyIndexWeek
from
'./SafetyIndexWeek'
;
import
StatisticsCheck
from
'./StatisticsCheck'
;
import
StatisticsDuty
from
'./StatisticsDuty'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
SysWsURL
,
{
completeToken
}
from
'../../../consts/wsUrlConsts'
;
/**
* 全景监控统计
*/
export
default
class
StatisticalRight
extends
Component
{
handleData
=
(
data
=
{})
=>
{
console
.
log
(
'ws data:'
,
data
);
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
console
.
log
(
data
);
let
refreshType
=
data
.
refreshType
;
let
content
=
data
.
content
;
switch
(
refreshType
){
case
'error_status'
:
console
.
log
(
'异常区域刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'week_safety_index'
:
console
.
log
(
'一周安全指数趋势刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndexWeek
.
safetyIndexWeekData
();
break
;
case
'today_check_status'
:
console
.
log
(
'今日巡检情况刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
statisticsCheck
.
statisticsCheckData
();
break
;
case
'today_duty'
:
this
.
statisticsDuty
.
statisticsDutyData
();
console
.
log
(
'今日值班刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'all'
:
console
.
log
(
'首页右侧刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndexWeek
.
safetyIndexWeekData
();
this
.
statisticsCheck
.
statisticsCheckData
();
this
.
statisticsDuty
.
statisticsDutyData
();
break
;
default
:
console
.
log
(
refreshType
,
':类型不支持'
);
}
}
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
viewIndexws
);
return
(
<
div
className
=
"statistical-right"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
SafetyIndexWeek
ref
=
{
node
=>
this
.
safetyIndexWeek
=
node
}
/
>
<
StatisticsCheck
ref
=
{
node
=>
this
.
statisticsCheck
=
node
}
/
>
<
StatisticsDuty
ref
=
{
node
=>
this
.
statisticsDuty
=
node
}
/
>
<
/div
>
);
}
}
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