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
7d940ca8
Commit
7d940ca8
authored
Jun 12, 2020
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
5173460a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
140 deletions
+132
-140
amos.config.js
amos.config.js
+2
-2
dataProcessor.js
mods/components/3dviewConvertor/view/dataProcessor.js
+2
-2
SafetyIndexWeek.js
...ewConvertor/view/panoramic/statistical/SafetyIndexWeek.js
+128
-136
No files found.
amos.config.js
View file @
7d940ca8
...
...
@@ -11,9 +11,9 @@
objModelURI
:
'/a3dres'
,
// 根url
// baseURI: 'http://172.16.11.30:9008/',
baseURI
:
'http://172.16.3.
77
:8083/'
,
baseURI
:
'http://172.16.3.
122
:8083/'
,
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI
:
'http://172.16.3.
77
:8083/'
,
convertorURI
:
'http://172.16.3.
122
:8083/'
,
patrolURI
:
'http://172.16.3.77:9000/'
,
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
// plugin URI
...
...
mods/components/3dviewConvertor/view/dataProcessor.js
View file @
7d940ca8
...
...
@@ -233,14 +233,14 @@ export const parseLevelFilter = (instance, topic, data) => {
mc
.
node
.
visible
=
visible
;
mc
.
object2DPipe
.
pipeNode
.
show
();
}
else
{
mc
.
show
()
;
mc
.
visible
=
true
;
}
}
else
{
if
(
mc
.
extData
.
type
===
'fireCar'
)
{
mc
.
node
.
visible
=
visible
;
mc
.
object2DPipe
.
pipeNode
.
hide
();
}
else
{
mc
.
hide
()
;
mc
.
visible
=
false
;
}
}
});
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/SafetyIndexWeek.js
View file @
7d940ca8
...
...
@@ -4,7 +4,6 @@ import echarts from 'echarts/lib/echarts';
import
{
safetyIndexWeekAction
}
from
'./../../../services/panoramicService'
;
import
{
getIcon
}
from
'./../../../utils/request'
;
/**
* 一周安全指数
*/
...
...
@@ -15,23 +14,19 @@ const option = {
boundaryGap
:
false
,
data
:
[
'03-15'
,
'03-16'
,
'03-17'
,
'03-18'
,
'03-19'
,
'03-20'
],
axisLabel
:
{
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
'14'
,
fontFamiliy
:
"SourceHanSansCN-Medium,SourceHanSansCN"
},
fontFamiliy
:
'SourceHanSansCN-Medium,SourceHanSansCN'
}
}
},
yAxis
:
{
type
:
'value'
,
splitLine
:
{
show
:
false
},
//去除网格线
splitLine
:
{
show
:
false
},
//去除网格线
axisLine
:
{
lineStyle
:
{
color
:
'#2A5D75'
,
color
:
'#2A5D75'
}
},
// 改变y轴字体颜色和大小
...
...
@@ -39,51 +34,49 @@ const option = {
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
'14'
,
fontFamiliy
:
"SourceHanSansCN-Medium,SourceHanSansCN"
},
},
fontFamiliy
:
'SourceHanSansCN-Medium,SourceHanSansCN'
}
}
},
series
:
[{
data
:
[
0
,
40
,
80
,
100
,
85
,
70
,
85
,
80
],
type
:
'line'
,
smooth
:
true
,
//这个是把线变成
itemStyle
:
{
normal
:
{
color
:
"#FF7400"
,
//折线点的颜色
lineStyle
:
{
width
:
3
,
//折线宽度
color
:
"#DDBF28"
//折线颜色
series
:
[
{
data
:
[
0
,
40
,
80
,
100
,
85
,
70
,
85
,
80
],
type
:
'line'
,
smooth
:
true
,
//这个是把线变成
itemStyle
:
{
normal
:
{
color
:
'#FF7400'
,
//折线点的颜色
lineStyle
:
{
width
:
3
,
//折线宽度
color
:
'#DDBF28'
//折线颜色
}
}
},
areaStyle
:
{
normal
:
{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'#00ADFF'
},
{
offset
:
0.5
,
color
:
'#DDBF28'
},
{
offset
:
1
,
color
:
'#FF7400'
}
])
}
}
},
areaStyle
:
{
normal
:
{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'#00ADFF'
},
{
offset
:
0.5
,
color
:
'#DDBF28'
},
{
offset
:
1
,
color
:
'#FF7400'
}])
}
}
}
]
]
};
class
SafetyIndexWeek
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
@@ -101,35 +94,32 @@ class SafetyIndexWeek extends Component {
data
});
});
}
}
;
getOptionsx
=
(
map
)
=>
{
getOptionsx
=
map
=>
{
return
{
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
map
.
get
(
"dates"
),
data
:
map
.
get
(
'dates'
),
axisLabel
:
{
interval
:
0
,
//横轴信息全部显示
interval
:
0
,
//横轴信息全部显示
// rotate:40,
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
'12'
,
fontFamiliy
:
"SourceHanSansCN-Medium,SourceHanSansCN"
fontFamiliy
:
'SourceHanSansCN-Medium,SourceHanSansCN'
},
margin
:
15
,
//刻度标签与轴线之间的距离。
margin
:
15
//刻度标签与轴线之间的距离。
}
},
yAxis
:
{
type
:
'value'
,
splitLine
:
{
show
:
false
},
//去除网格线
splitLine
:
{
show
:
false
},
//去除网格线
axisLine
:
{
lineStyle
:
{
color
:
'#2A5D75'
,
color
:
'#2A5D75'
}
},
// 改变y轴字体颜色和大小
...
...
@@ -137,113 +127,115 @@ class SafetyIndexWeek extends Component {
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
'12'
,
fontFamiliy
:
"SourceHanSansCN-Medium,SourceHanSansCN"
fontFamiliy
:
'SourceHanSansCN-Medium,SourceHanSansCN'
},
margin
:
15
,
//刻度标签与轴线之间的距离。
},
margin
:
15
//刻度标签与轴线之间的距离。
}
},
series
:
[{
data
:
map
.
get
(
"values"
),
type
:
'line'
,
symbol
:
'circle'
,
//折线点设置为实心点
smooth
:
true
,
//这个是把线变成
itemStyle
:
{
normal
:
{
color
:
"#E1B623"
,
//折线点的颜色
lineStyle
:
{
width
:
3
,
//折线宽度
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[{
offset
:
0
,
color
:
'#FF0000'
},
{
offset
:
0.2
,
color
:
'#DDBF28'
},
{
offset
:
0.4
,
color
:
'#FF7400'
},
{
offset
:
0.5
,
color
:
'#00ADFF'
},
{
offset
:
0.6
,
color
:
'#DDBF28'
}])
}
}
},
areaStyle
:
{
normal
:
{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上#766016 transparent
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'#00ADFF'
},
{
offset
:
0.1
,
color
:
'#6e6a26'
},
{
offset
:
0.2
,
color
:
'#766016'
},
{
offset
:
0.5
,
color
:
'#4b2006'
},{
offset
:
0.6
,
color
:
'#280d07'
}])
}
series
:
[
{
data
:
map
.
get
(
'values'
),
type
:
'line'
,
symbol
:
'circle'
,
//折线点设置为实心点
smooth
:
0.6
,
// itemStyle: {
// normal: {
// color: '#FF7400', //折线点的颜色
// lineStyle: {
// width: 3, //折线宽度
// color: '#DDBF28' //折线颜色
// }
// }
// },
lineStyle
:
{
normal
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
1
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(255, 0, 0, 0)'
// 0% 处的颜色
},
{
offset
:
0.5
,
color
:
'rgba(255, 0, 0, 0.3)'
// 50% 处的颜色
},
{
offset
:
0.9
,
color
:
'rgba(255, 116, 0, 0.67)'
// 90% 处的颜色
},
{
offset
:
0.95
,
color
:
'rgba(221, 191, 40, 0.76)'
// 95% 处的颜色
},
{
offset
:
1
,
color
:
'rgba(0, 173, 255, 0.76)'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
}
},
areaStyle
:
{
normal
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
1
,
x2
:
0
,
y2
:
0
,
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(255, 0, 0, 0)'
// 0% 处的颜色
},
{
offset
:
0.5
,
color
:
'rgba(255, 0, 0, 0.3)'
// 50% 处的颜色
},
{
offset
:
0.9
,
color
:
'rgba(255, 116, 0, 0.67)'
// 90% 处的颜色
},
{
offset
:
0.95
,
color
:
'rgba(221, 191, 40, 0.76)'
// 95% 处的颜色
},
{
offset
:
1
,
color
:
'rgba(0, 173, 255, 0.76)'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
}
}
}
}
]
]
};
}
}
;
handleData
=
(
data
)
=>
{
handleData
=
data
=>
{
let
map
=
new
Map
();
let
dates
=
[];
let
values
=
[];
if
(
data
&&
data
.
length
>
0
)
{
data
.
map
(
item
=>
{
let
time2
=
item
.
date
.
substring
(
5
);
dates
.
push
(
time2
)
values
.
push
(
item
.
value
)
})
dates
.
push
(
time2
)
;
values
.
push
(
item
.
value
)
;
})
;
}
map
.
set
(
"dates"
,
dates
);
map
.
set
(
"values"
,
values
);
map
.
set
(
'dates'
,
dates
);
map
.
set
(
'values'
,
values
);
return
map
;
}
};
render
()
{
let
{
data
}
=
this
.
state
;
let
map
=
this
.
handleData
(
data
);
return
(
<
div
className
=
"safetyIndexWeek"
>
<
div
className
=
"content-week-font-style"
>
<
span
className
=
'titleIcon'
style
=
{{
background
:
`url(
${
getIcon
(
'textleft'
)}
) no-repeat center center/100% 100%`
}}
><
/span>一周安全趋势</
div
>
<
span
className
=
"titleIcon"
style
=
{{
background
:
`url(
${
getIcon
(
'textleft'
)}
) no-repeat center center/100% 100%`
}}
/>一周安全趋
势
<
/div
>
{
/* <img src="/src/assets/panoramic/statistical/main_icon_textleft.png" ></img> */
}
<
ReactEcharts
option
=
{
this
.
getOptionsx
(
map
)}
className
=
'echart-week'
/>
<
ReactEcharts
option
=
{
this
.
getOptionsx
(
map
)}
className
=
"echart-week"
/>
<
/div
>
);
}
}
SafetyIndexWeek
.
propTypes
=
{
};
SafetyIndexWeek
.
propTypes
=
{};
export
default
SafetyIndexWeek
;
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