Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
station-elec-manage-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
station-elec-manage-view
Commits
67626b8d
Commit
67626b8d
authored
Jun 18, 2020
by
王海涛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:station/station-elec-manage-view into developer
parents
995f138a
2d89080e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
6 deletions
+117
-6
mockData.js
src/_mock/syData/mockData.js
+10
-0
AllSafety.js
src/view/monitor/duty/statistical/AllSafety.js
+107
-6
No files found.
src/_mock/syData/mockData.js
0 → 100644
View file @
67626b8d
//总体消防安全
export
const
AllSafetyDataMock
=
{
redCount
:
1
,
blueConunt
:
1
,
shengshenCount
:
1
,
xiajiangCount
:
1
,
zongshu
:
80
,
hege
:
40
,
buhege
:
60
};
src/view/monitor/duty/statistical/AllSafety.js
View file @
67626b8d
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
ReactEcharts
from
'amos-viz/lib/echarts'
;
import
ReactEcharts
from
'amos-viz/lib/echarts'
;
import
CommonCard
from
'../../../common/commonCard/CommonCard'
;
import
CommonCard
from
'../../../common/commonCard/CommonCard'
;
import
{
AllSafetyDataMock
}
from
'./../../../../_mock/syData/mockData'
;
/**
/**
* 总体消防安全情况
* 总体消防安全情况
*/
*/
...
@@ -109,13 +110,113 @@ class AllSafety extends Component {
...
@@ -109,13 +110,113 @@ class AllSafety extends Component {
};
};
}
}
componentDidMount
()
{}
componentDidMount
()
{
this
.
setState
({
data
:
AllSafetyDataMock
});
}
getOptionsx
=
()
=>
{
getOptionsx
=
()
=>
{
return
option
;
const
{
data
}
=
this
.
state
;
return
{
tooltip
:
{
trigger
:
'item'
,
formatter
:
'{a} <br/>{b}: {c} ({d}%)'
},
color
:
[
'#F70D0E'
,
'#00CACE'
],
graphic
:
[
{
//环形图中间添加文字
type
:
'text'
,
//通过不同top值可以设置上下显示
left
:
'center'
,
top
:
'30%'
,
style
:
{
text
:
data
.
zongshu
,
//'80' + '\n' + '总数'
textAlign
:
'center'
,
fill
:
'rgba(255,255,255,1)'
,
//文字的颜色
width
:
30
,
height
:
30
,
fontSize
:
25
,
fontFamily
:
'Microsoft YaHei'
,
fontWeight
:
'bold'
}
},
{
//环形图中间添加文字
type
:
'text'
,
//通过不同top值可以设置上下显示
left
:
'center'
,
top
:
'45%'
,
style
:
{
text
:
'站点'
,
textAlign
:
'center'
,
fill
:
'rgba(255,255,255,1)'
,
//文字的颜色
width
:
24
,
height
:
16
,
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontWeight
:
400
}
}
],
series
:
[
{
name
:
'总体消防安全情况'
,
type
:
'pie'
,
radius
:
[
'65%'
,
'80%'
],
center
:
[
'50%'
,
'40%'
],
avoidLabelOverlap
:
false
,
// hoverAnimation: false, //是否突出
labelLine
:
{
normal
:
{
show
:
false
}
},
data
:
[
{
value
:
data
.
buhege
,
name
:
'不合格'
},
{
value
:
data
.
hege
,
name
:
'正常'
}
]
},
{
name
:
'中间的背景'
,
type
:
'pie'
,
radius
:
[
'0%'
,
'60%'
],
center
:
[
'50%'
,
'40%'
],
label
:
{
show
:
false
},
itemStyle
:
{
normal
:
{
color
:
'rgba(24,219,159,0.1)'
}
},
//隐藏多余文字提示
label
:
{
show
:
false
},
labelLine
:
{
show
:
false
},
tooltip
:
{
show
:
false
},
// hoverAnimation: false,
data
:
[
100
]
}
]
};;
};
};
render
()
{
render
()
{
let
{
data
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"AllSafety"
>
<
div
className
=
"AllSafety"
>
<
div
className
=
"all-safety-content"
>
<
div
className
=
"all-safety-content"
>
...
@@ -126,19 +227,19 @@ class AllSafety extends Component {
...
@@ -126,19 +227,19 @@ class AllSafety extends Component {
<
/div
>
<
/div
>
<
div
className
=
"all-safety-right"
>
<
div
className
=
"all-safety-right"
>
<
div
className
=
"all-safety-right-one"
>
<
div
className
=
"all-safety-right-one"
>
<
div
className
=
"right-one-font"
>
1
个
<
/div
>
<
div
className
=
"right-one-font"
>
{
data
.
redCount
}
个
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"all-safety-right-two"
>
<
div
className
=
"all-safety-right-two"
>
<
div
className
=
"right-two-font"
>
<
div
className
=
"right-two-font"
>
<
span
className
=
"jiantou"
>&
darr
;
<
/span>-
1
<
span
className
=
"jiantou"
>&
darr
;
<
/span>-
{data.xiajiangCount
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"all-safety-right-three"
>
<
div
className
=
"all-safety-right-three"
>
<
div
className
=
"right-three-font"
>
1
个
<
/div
>
<
div
className
=
"right-three-font"
>
{
data
.
blueConunt
}
个
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"all-safety-right-four"
>
<
div
className
=
"all-safety-right-four"
>
<
div
className
=
"right-four-font"
>
<
div
className
=
"right-four-font"
>
<
span
className
=
"jiantou"
>&
uarr
;
<
/span>+
1
<
span
className
=
"jiantou"
>&
uarr
;
<
/span>+
{data.shengshenCount
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/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