Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supervise-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
牛晓林
supervise-front
Commits
21dc1005
Commit
21dc1005
authored
Aug 20, 2019
by
杨子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加饼图
parent
00350ea8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
70 deletions
+225
-70
qs-mark.component.html
src/app/qs-mark/qs-mark.component.html
+4
-5
qs-mark.component.less
src/app/qs-mark/qs-mark.component.less
+2
-65
qs-mark.component.ts
src/app/qs-mark/qs-mark.component.ts
+219
-0
No files found.
src/app/qs-mark/qs-mark.component.html
View file @
21dc1005
...
@@ -21,10 +21,9 @@
...
@@ -21,10 +21,9 @@
</nz-tree>
</nz-tree>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"loading"
>
<div
echarts
[
options
]="
options1
"
(
chartClick
)="
onChartEvent
($
event
,
'
chartClick
')"
theme=
"macarons"
<div
class=
"left"
></div>
class=
"demo-chart"
></div>
<div
class=
"right"
></div>
<div
echarts
[
options
]="
options2
"
(
chartClick
)="
onChartEvent
($
event
,
'
chartClick
')"
theme=
"macarons"
<div
class=
"progress"
>
质量监管
</div>
class=
"demo-chart"
></div>
</div>
</div>
</div>
</div>
</div>
src/app/qs-mark/qs-mark.component.less
View file @
21dc1005
...
@@ -38,70 +38,7 @@
...
@@ -38,70 +38,7 @@
}
}
.demo-chart {
.demo-chart {
height: 400px;
height: 500px;
}
width: 500px;
.loading {
margin: 100px auto;
width: 8em;
height: 8em;
position: relative;
}
.loading .progress {
position: absolute;
width: 6em;
height: 6em;
background-color: white;
border-radius: 50%;
left: 1em;
top: 1em;
line-height: 6em;
text-align: center;
}
.left,
.right {
width: 4em;
height: 8em;
overflow: hidden;
position: relative;
float: left;
float: left;
background-color: #999999
}
.left {
border-radius: 8em 0 0 8em;
}
.right {
border-radius: 0 8em 8em 0;
}
.left:after,
.right:after {
content: "";
position: absolute;
display: block;
width: 4em;
height: 8em;
background-color: white;
border-radius: 8em 0 0 8em;
background-color: red;
}
.right:after {
content: "";
position: absolute;
display: block;
border-radius: 0 8em 8em 0;
}
.left:after {
transform-origin: right center;
}
.right:after {
transform-origin: left center;
transform: rotateZ(45deg);
}
}
src/app/qs-mark/qs-mark.component.ts
View file @
21dc1005
...
@@ -12,7 +12,222 @@ export class QsMarkComponent implements OnInit {
...
@@ -12,7 +12,222 @@ export class QsMarkComponent implements OnInit {
nodes
=
[{
title
:
"高速公路"
,
key
:
"1"
},
{
title
:
"普通干线"
,
key
:
"0"
}];
nodes
=
[{
title
:
"高速公路"
,
key
:
"1"
},
{
title
:
"普通干线"
,
key
:
"0"
}];
constructor
(
private
http
:
HttpClient
,
private
d
:
DefaultService
)
{}
constructor
(
private
http
:
HttpClient
,
private
d
:
DefaultService
)
{}
options1
=
{
legend
:
{
orient
:
"vertical"
,
x
:
"left"
,
data
:
[]
},
color
:
[
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
],
calculable
:
false
,
series
:
[
{
name
:
""
,
type
:
"pie"
,
selectedMode
:
"single"
,
selectedOffset
:
0
,
radius
:
[
0
,
90
],
// for funnel
x
:
"20%"
,
width
:
"40%"
,
y
:
"90%"
,
funnelAlign
:
"right"
,
max
:
1548
,
itemStyle
:
{
normal
:
{
label
:
{
position
:
"inner"
,
fontWeight
:
"bold"
,
fontSize
:
16
},
labelLine
:
{
show
:
false
}
}
},
data
:
[
{
value
:
335
,
name
:
"安全监管
\
n
\
n
\
n
\
n
\
n"
,
link
:
"http://tydeh.zhinengjianshe.com?username=dehzhb&password=a"
,
label
:
{
fontWeight
:
"bold"
,
fontSize
:
20
,
verticalAlign
:
"middle"
}
}
]
},
{
name
:
""
,
type
:
"pie"
,
radius
:
[
100
,
200
],
// for funnel
x
:
"80%"
,
width
:
"70%"
,
funnelAlign
:
"left"
,
max
:
1048
,
itemStyle
:
{
normal
:
{
label
:
{
position
:
"inner"
},
labelLine
:
{
show
:
true
},
borderWidth
:
5
,
//设置border的宽度有多大
borderColor
:
"#fff"
}
},
data
:
[
{
value
:
500
,
name
:
"人员信息"
},
{
value
:
500
,
name
:
"风险信息"
},
{
value
:
500
,
name
:
"机械设备信息"
},
{
value
:
500
,
name
:
"安全投入信息"
},
{
value
:
500
,
name
:
"隐患信息"
},
{
value
:
500
,
name
:
"应急预案信息"
},
{
value
:
500
,
name
:
"应急资源信息"
}
]
}
]
};
options2
=
{
legend
:
{
orient
:
"vertical"
,
x
:
"left"
,
data
:
[]
},
color
:
[
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
,
"#015293"
],
calculable
:
false
,
series
:
[
{
name
:
""
,
type
:
"pie"
,
selectedMode
:
"single"
,
selectedOffset
:
0
,
radius
:
[
0
,
90
],
// for funnel
x
:
"20%"
,
width
:
"40%"
,
y
:
"90%"
,
funnelAlign
:
"right"
,
max
:
1548
,
itemStyle
:
{
normal
:
{
label
:
{
position
:
"inner"
,
fontWeight
:
"bold"
,
fontSize
:
16
},
labelLine
:
{
show
:
false
}
}
},
data
:
[
{
value
:
335
,
name
:
"质量监管
\
n
\
n
\
n
\
n
\
n"
,
label
:
{
fontWeight
:
"bold"
,
fontSize
:
20
,
verticalAlign
:
"middle"
}
}
]
},
{
name
:
""
,
type
:
"pie"
,
radius
:
[
100
,
200
],
startAngle
:
50
,
// for funnel
x
:
"80%"
,
width
:
"70%"
,
funnelAlign
:
"left"
,
max
:
1048
,
itemStyle
:
{
normal
:
{
label
:
{
position
:
"inner"
},
labelLine
:
{
show
:
false
},
borderWidth
:
5
,
//设置border的宽度有多大
borderColor
:
"#fff"
}
},
data
:
[
{
value
:
500
,
name
:
"责任体系"
},
{
value
:
500
,
name
:
"试验检测"
},
{
value
:
500
,
name
:
"工序检验"
,
link
:
"http://47.92.203.246/pcByFullScreen/#/pcByFullScreen/"
},
{
value
:
500
,
name
:
"质量督导检查"
},
{
value
:
500
,
name
:
"工程评价"
},
{}
]
}
]
};
ngOnInit
()
{}
ngOnInit
()
{}
nzEvent
(
event
:
Required
<
NzFormatEmitEvent
>
)
{
nzEvent
(
event
:
Required
<
NzFormatEmitEvent
>
)
{
...
@@ -45,4 +260,8 @@ export class QsMarkComponent implements OnInit {
...
@@ -45,4 +260,8 @@ export class QsMarkComponent implements OnInit {
}
}
}
}
}
}
onChartEvent
(
event
:
any
,
type
:
string
)
{
console
.
log
(
"chart event:"
,
type
,
event
);
window
.
open
(
event
.
data
.
link
);
}
}
}
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