Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
sgaqgl-vue
Commits
02cc7407
Commit
02cc7407
authored
Dec 24, 2022
by
黄自鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
856a03ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
223 additions
and
75 deletions
+223
-75
index.vue
src/views/dangerManagement/yhznytj/index.vue
+223
-75
No files found.
src/views/dangerManagement/yhznytj/index.vue
View file @
02cc7407
...
@@ -32,7 +32,12 @@
...
@@ -32,7 +32,12 @@
</el-select>
</el-select>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<el-radio
v-model=
"queryParams.hzfs"
label=
"FL"
>
按分类
</el-radio>
<el-radio
v-model=
"queryParams.hzfs"
label=
"DJ"
>
按等级
</el-radio>
</div>
</el-col>
</el-row>
</el-row>
</div>
</div>
<!-- 按钮操作-->
<!-- 按钮操作-->
...
@@ -43,6 +48,11 @@
...
@@ -43,6 +48,11 @@
</TablePager>
</TablePager>
</div>
</div>
<div
class=
"chartsbody"
>
<div
id=
"yhtjChart"
v-echartResize=
"resize"
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -60,6 +70,18 @@
...
@@ -60,6 +70,18 @@
export
default
{
export
default
{
mixins
:
[
tableMixin
],
mixins
:
[
tableMixin
],
name
:
'appVersion'
,
name
:
'appVersion'
,
async
mounted
()
{
var
yhtjChart
=
document
.
getElementById
(
'yhtjChart'
);
var
inityhtjChart
=
echarts
.
init
(
yhtjChart
);
this
.
myChart
=
inityhtjChart
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
computed
:
{
radio
()
{
let
val
=
this
.
queryParams
.
hzfs
return
val
}
},
/* 初始额外赋值*/
/* 初始额外赋值*/
async
mounted
()
{
async
mounted
()
{
...
@@ -68,14 +90,16 @@
...
@@ -68,14 +90,16 @@
},
},
data
()
{
data
()
{
return
{
return
{
yearsToNow
:[],
myChart
:{},
yearsToNow
:
[],
/*需要的额外参数 */
/*需要的额外参数 */
/* 基础url*/
/* 基础url*/
baseUrl
:
'aqgl/yhgl/yhjl/yhtj'
,
baseUrl
:
'aqgl/yhgl/yhjl/yhtj'
,
/* 查询参数*/
/* 查询参数*/
queryParams
:
{
queryParams
:
{
year
:
''
,
hzfs
:
'FL'
,
month
:
''
year
:
''
,
month
:
''
},
},
getYearsToNow
()
{
getYearsToNow
()
{
// this.yearsToNow=[2020,2021,2022]
// this.yearsToNow=[2020,2021,2022]
...
@@ -100,42 +124,53 @@
...
@@ -100,42 +124,53 @@
{
{
prop
:
'year'
,
prop
:
'year'
,
label
:
'年份'
,
label
:
'年份'
,
width
:
292
width
:
200
},
},
{
{
prop
:
'month'
,
prop
:
'month'
,
label
:
'月份'
,
label
:
'月份'
,
width
:
292
width
:
200
},
{
prop
:
'yhflName'
,
label
:
'分类名称'
,
width
:
200
},
{
prop
:
'yhdjName'
,
label
:
'隐患等级'
,
width
:
200
},
},
{
{
prop
:
'allCount'
,
prop
:
'allCount'
,
label
:
'隐患数量'
,
label
:
'隐患数量'
,
width
:
30
0
width
:
15
0
},
},
{
{
prop
:
'wclCount'
,
prop
:
'wclCount'
,
label
:
'未处理完毕数量'
,
label
:
'未处理完毕数量'
,
width
:
30
0
width
:
15
0
},
},
{
{
prop
:
'yclCount'
,
prop
:
'yclCount'
,
label
:
'已处理完毕数量'
,
label
:
'已处理完毕数量'
,
width
:
30
0
width
:
15
0
},
},
{
{
prop
:
'cqwclCount'
,
prop
:
'cqwclCount'
,
label
:
'超期未处理数量'
,
label
:
'超期未处理数量'
,
width
:
30
0
width
:
15
0
},
},
{
{
prop
:
'cqyclCount'
,
prop
:
'cqyclCount'
,
label
:
'超期已处理数量'
,
label
:
'超期已处理数量'
,
width
:
30
0
width
:
15
0
},
},
{
{
prop
:
'cqCount'
,
prop
:
'cqCount'
,
label
:
'超期总数量'
,
label
:
'超期总数量'
,
width
:
30
0
width
:
15
0
},
},
// {
// {
// prop: 'yqzgsj',
// prop: 'yqzgsj',
...
@@ -145,8 +180,116 @@
...
@@ -145,8 +180,116 @@
]
]
}
}
},
},
watch
:
{
radio
(
val
)
{
val
==
'FL'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'yhdjName'
&&
(
item
.
show
=
false
);
item
.
prop
==
'yhflName'
&&
(
item
.
show
=
true
)
})
val
==
'DJ'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'yhdjName'
&&
(
item
.
show
=
true
);
item
.
prop
==
'yhflName'
&&
(
item
.
show
=
false
)
})
},
},
methods
:
{
methods
:
{
resize
(){
this
.
myChart
.
resize
()
},
getData
:
function
(
e
)
{
this
.
tabData
=
e
this
.
myChart
.
setOption
(
this
.
setOption
());
},
setOption
(){
let
fxdList
=
[]
let
wclCountList
=
[]
let
yclCountList
=
[]
this
.
tabData
.
forEach
(
item
=>
{
fxdList
.
push
(
item
.
yhflName
)
wclCountList
.
push
(
item
.
wclCount
+
item
.
yclCount
)
yclCountList
.
push
(
item
.
yclCount
)
})
var
option
=
{
dataZoom
:
[
{
show
:
true
,
start
:
0
,
end
:
10
},
{
type
:
'inside'
,
start
:
0
,
end
:
10
},
{
show
:
false
,
yAxisIndex
:
0
,
filterMode
:
'empty'
,
width
:
20
,
height
:
'80%'
,
showDataShadow
:
false
,
left
:
'93%'
}
],
grid
:
{
top
:
'10%'
,
left
:
'6%'
,
right
:
'3%'
,
bottom
:
'25%'
,
// containLabel: true
},
xAxis
:
{
type
:
'category'
,
data
:
fxdList
,
axisLabel
:
{
interval
:
0
,
//代表显示所有x轴标签显示
rotate
:
15
,
//代表逆时针旋转45度
}
},
yAxis
:
{
type
:
'value'
},
legend
:
{
data
:
[
'隐患数量'
,
'处理完毕数量'
]
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'shadow'
}
},
series
:
[
{
name
:
'隐患数量'
,
data
:
wclCountList
,
type
:
'bar'
,
barMaxWidth
:
'20px'
,
itemStyle
:
{
color
:
'#f00000'
,
shadowColor
:
'#f00000'
,
borderType
:
'dashed'
,
}
},
{
name
:
'处理完毕数量'
,
data
:
yclCountList
,
type
:
'bar'
,
itemStyle
:
{
color
:
'#91cc75'
,
shadowColor
:
'#91cc75'
,
borderType
:
'dashed'
,
},
barMaxWidth
:
'20px'
,
}
]
};
return
option
},
/* 基础查询*/
/* 基础查询*/
query
:
queryYhhz
,
query
:
queryYhhz
,
/* 初始化赋值操作*/
/* 初始化赋值操作*/
...
@@ -155,16 +298,21 @@
...
@@ -155,16 +298,21 @@
},
},
},
},
components
:
{
components
:
{
Edit
,
Edit
,
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
#yhtjChart
{
height
:
100%
;
width
:
100%
;
border
:
1px
solid
#eee
;
}
.chartsbody
{
height
:
330px
;
padding
:
5px
;
}
</
style
>
</
style
>
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