Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
whp-xl
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
lizhichao
whp-xl
Commits
55c2ca2f
Commit
55c2ca2f
authored
Jun 17, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/lizhichao/whp-xl
parents
366b1d5d
d9246893
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
demo.vue
dcit-hcsystem-hcsystem-master/src/views/Enterprises/demo.vue
+31
-11
No files found.
dcit-hcsystem-hcsystem-master/src/views/Enterprises/demo.vue
View file @
55c2ca2f
<
template
style=
""
>
<div
class=
"pie"
style=
"width:100%;height: 700px;"
>
<div
id=
"pie1"
style=
"float:left;width:
4
0%;height: 500px;"
>
<div
id=
"pie1"
style=
"float:left;width:
5
0%;height: 500px;"
>
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
<div
id=
"main1"
style=
"width:
5
00px;height:500px;"
></div>
<div
id=
"main1"
style=
"width:
7
00px;height:500px;"
></div>
</div>
<div
id=
"pie2"
style=
"float:right;width:
5
0%;height: 500px;"
>
<div
id=
"main2"
style=
"width:
6
50px;height:500px;"
></div>
<div
id=
"pie2"
style=
"float:right;width:
4
0%;height: 500px;"
>
<div
id=
"main2"
style=
"width:
5
50px;height:500px;"
></div>
</div>
</div>
</
template
>
...
...
@@ -37,16 +37,18 @@ export default {
var
getData2
=
[];
METHOD
.
axiosGet
(
this
,
`/enterprise
Goods/getNumberByEnterprise
`
,
`/enterprise
Info/getNumberByRegulation
`
,
function
(
res
)
{
if
(
res
.
code
===
0
)
{
//先进行赋值
for
(
let
i
=
0
;
i
<
res
.
data
.
result
.
length
;
i
++
)
{
var
obj
=
new
Object
();
var
arr
=
new
Object
();
obj
.
name
=
res
.
data
.
result
[
i
].
name
;
// obj.name = res.data.result[i].name;
// obj.value = res.data.result[i].number;
obj
.
name
=
res
.
data
.
result
[
i
].
type
;
obj
.
value
=
res
.
data
.
result
[
i
].
number
;
arr
=
res
.
data
.
result
[
i
].
nam
e
;
arr
=
res
.
data
.
result
[
i
].
typ
e
;
getData1
[
i
]
=
obj
;
getData2
[
i
]
=
arr
;
}
...
...
@@ -67,6 +69,9 @@ export default {
text
:
'企业按监管分类统计'
,
//主标题
// subtext: '饼状图',//副标题
x
:
'center'
,
//x轴方向对齐方式
textStyle
:
{
color
:
"#fff"
,
}
},
tooltip
:
{
trigger
:
'item'
,
...
...
@@ -77,6 +82,9 @@ export default {
right
:
'right'
,
// data: ['探测器','二氧化碳报警器','水压探测器','有毒气体报警器','搜索引擎']
data
:
[],
textStyle
:
{
//图例文字的样式
color
:
'#fff'
,
}
},
series
:
[
{
...
...
@@ -105,15 +113,17 @@ export default {
var
getData2
=
[];
METHOD
.
axiosGet
(
this
,
`/enterprise
Info/getNumberByRegulation
`
,
`/enterprise
Goods/getNumberByEnterprise
`
,
function
(
res
)
{
if
(
res
.
code
===
0
)
{
//先进行赋值
for
(
let
i
=
0
;
i
<
res
.
data
.
result
.
length
;
i
++
)
{
var
obj
=
new
Object
();
var
arr
=
new
Object
();
// obj = res.data.result[i].number;
// arr = res.data.result[i].type;
obj
=
res
.
data
.
result
[
i
].
number
;
arr
=
res
.
data
.
result
[
i
].
typ
e
;
arr
=
res
.
data
.
result
[
i
].
nam
e
;
getData1
[
i
]
=
obj
;
getData2
[
i
]
=
arr
;
}
...
...
@@ -132,11 +142,18 @@ export default {
// color:['rgb(8,252,7)','rgb(255,168,0)','rgb(0,121,254)','rgb(0,255,251)','rgb(3,120,251)','rgb(0,200,251)'],
title
:
{
text
:
'企业危险源数量统计'
,
//主标题
color
:
'#fff'
,
// subtext: '柱状图',
textStyle
:
{
color
:
"#fff"
,
}
},
tooltip
:
{},
legend
:
{
data
:[
'危险源'
]
data
:[
'危险源'
],
textStyle
:
{
//图例文字的样式
color
:
'#fff'
,
}
},
xAxis
:
{
axisLabel
:
{
...
...
@@ -153,7 +170,10 @@ export default {
// data: [5, 20, 36, 10, 10, 20],
data
:
[],
}],
textStyle
:
{
color
:
"#fff"
,
fontSize
:
18
},
});
}
}
...
...
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