Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
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
刘怀志
pet-business-web
Commits
dbf55d83
Commit
dbf55d83
authored
Jul 26, 2023
by
陈明豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据统计-宠主数据统计-前端部分
parent
5f59987f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1117 additions
and
328 deletions
+1117
-328
chongzhutongji_icon_kayue.png
src/assets/data_statistics/chongzhutongji_icon_kayue.png
+0
-0
chongzhutongji_img_kayue.png
src/assets/data_statistics/chongzhutongji_img_kayue.png
+0
-0
columnarChart.vue
...views/data-statistics/echars-components/columnarChart.vue
+8
-2
crosswiseColumnarChart.vue
...a-statistics/echars-components/crosswiseColumnarChart.vue
+118
-0
crosswiseColumnarChartOneLine.vue
...stics/echars-components/crosswiseColumnarChartOneLine.vue
+97
-0
radar-chart-for-petowner-hospital.vue
...s/echars-components/radar-chart-for-petowner-hospital.vue
+133
-0
radar-chart-for-petowner-platfrom.vue
...s/echars-components/radar-chart-for-petowner-platfrom.vue
+2
-2
twoLineChart.vue
src/views/data-statistics/echars-components/twoLineChart.vue
+2
-3
hospital-data-statistics.vue
...ics/hospital-data-statistics/hospital-data-statistics.vue
+0
-6
pet-data-statistics.vue
...ta-statistics/pet-data-statistics/pet-data-statistics.vue
+757
-315
No files found.
src/assets/data_statistics/chongzhutongji_icon_kayue.png
0 → 100644
View file @
dbf55d83
1011 Bytes
src/assets/data_statistics/chongzhutongji_img_kayue.png
0 → 100644
View file @
dbf55d83
5.38 KB
src/views/data-statistics/echars-components/columnarChart.vue
View file @
dbf55d83
...
@@ -45,13 +45,16 @@ export default {
...
@@ -45,13 +45,16 @@ export default {
}
}
},
},
grid
:
{
grid
:
{
x
:
6
0
,
x
:
5
0
,
x2
:
10
,
x2
:
10
,
y2
:
40
y2
:
40
},
},
xAxis
:
{
xAxis
:
{
type
:
'category'
,
type
:
'category'
,
data
:
_this
.
xData
data
:
_this
.
xData
,
axisLabel
:
{
interval
:
0
}
},
},
yAxis
:
{
yAxis
:
{
type
:
'value'
,
type
:
'value'
,
...
@@ -63,6 +66,9 @@ export default {
...
@@ -63,6 +66,9 @@ export default {
tooltip
:
{
tooltip
:
{
show
:
true
,
// 鼠标移入是否触发数据
show
:
true
,
// 鼠标移入是否触发数据
trigger
:
'axis'
,
// 出发方式
trigger
:
'axis'
,
// 出发方式
axisPointer
:
{
type
:
'shadow'
},
formatter
:
(
axis
)
=>
{
formatter
:
(
axis
)
=>
{
return
`<div>
return
`<div>
<div>
${
axis
[
0
].
name
}
</div>
<div>
${
axis
[
0
].
name
}
</div>
...
...
src/views/data-statistics/echars-components/crosswiseColumnarChart.vue
0 → 100644
View file @
dbf55d83
<
template
>
<div
ref=
"CrosswiseColumnar"
class=
"CrosswiseColumnarChart"
>
123
</div>
</
template
>
<
script
>
export
default
{
name
:
'CrosswiseColumnarChart'
,
props
:
[
'title'
,
'yData1'
,
'yData2'
,
'xData'
,
'unit'
],
data
()
{
return
{}
},
watch
:
{},
created
()
{
},
mounted
()
{
this
.
setChart
()
},
methods
:
{
setChart
()
{
const
_this
=
this
// 基于准备好的dom,初始化echarts实例
const
mapChart
=
this
.
$echarts
.
init
(
this
.
$refs
.
CrosswiseColumnar
)
mapChart
.
setOption
({
title
:
{
left
:
'left'
,
text
:
_this
.
title
,
textStyle
:
{
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontWeight
:
'bold'
,
color
:
'#333333'
// margin-bottom: 20px,
}
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'shadow'
}
},
legend
:
{
left
:
'right'
},
grid
:
{
left
:
'3%'
,
right
:
'6%'
,
bottom
:
'3%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value}'
+
_this
.
unit
}
// boundaryGap: [0, 0.01]
},
yAxis
:
{
type
:
'category'
,
data
:
_this
.
xData
},
series
:
[
{
name
:
_this
.
yData1
.
name
,
type
:
'bar'
,
data
:
_this
.
yData1
.
data
,
barWidth
:
'12px'
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
0
,
20
,
20
,
0
]
}
},
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[{
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
_this
.
yData1
.
startColor
},
// 柱图渐变色
{
offset
:
1
,
// 指100%处的颜色
color
:
_this
.
yData1
.
endColor
}
])
},
{
name
:
_this
.
yData2
.
name
,
type
:
'bar'
,
data
:
_this
.
yData2
.
data
,
barWidth
:
'12px'
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
0
,
20
,
20
,
0
]
}
},
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[{
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
_this
.
yData2
.
startColor
},
// 柱图渐变色
{
offset
:
1
,
// 指100%处的颜色
color
:
_this
.
yData2
.
endColor
}
])
}
]
})
}
}
}
</
script
>
<
style
scoped
>
.CrosswiseColumnarChart
{
width
:
100%
;
height
:
500px
;
}
</
style
>
src/views/data-statistics/echars-components/crosswiseColumnarChartOneLine.vue
0 → 100644
View file @
dbf55d83
<
template
>
<div
ref=
"CrosswiseColumnar"
class=
"CrosswiseColumnarChart"
>
123
</div>
</
template
>
<
script
>
export
default
{
name
:
'CrosswiseColumnarChartOneLine'
,
props
:
[
'title'
,
'yData'
,
'xData'
,
'unit'
],
data
()
{
return
{}
},
watch
:
{},
created
()
{
},
mounted
()
{
this
.
setChart
()
},
methods
:
{
setChart
()
{
const
_this
=
this
// 基于准备好的dom,初始化echarts实例
const
mapChart
=
this
.
$echarts
.
init
(
this
.
$refs
.
CrosswiseColumnar
)
mapChart
.
setOption
({
title
:
{
left
:
'left'
,
text
:
_this
.
title
,
textStyle
:
{
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontWeight
:
'bold'
,
color
:
'#333333'
// margin-bottom: 20px,
}
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'shadow'
}
},
legend
:
{
left
:
'right'
},
grid
:
{
left
:
'3%'
,
right
:
'6%'
,
bottom
:
'3%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value}'
+
_this
.
unit
}
// boundaryGap: [0, 0.01]
},
yAxis
:
{
type
:
'category'
,
data
:
_this
.
xData
},
series
:
[
{
name
:
_this
.
yData
.
name
,
type
:
'bar'
,
data
:
_this
.
yData
.
data
,
barWidth
:
'12px'
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
0
,
20
,
20
,
0
]
}
},
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[{
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
_this
.
yData
.
startColor
},
// 柱图渐变色
{
offset
:
1
,
// 指100%处的颜色
color
:
_this
.
yData
.
endColor
}
])
}
]
})
}
}
}
</
script
>
<
style
scoped
>
.CrosswiseColumnarChart
{
width
:
100%
;
height
:
500px
;
}
</
style
>
src/views/data-statistics/echars-components/radar-chart-for-p
latform-petowner
.vue
→
src/views/data-statistics/echars-components/radar-chart-for-p
etowner-hospital
.vue
View file @
dbf55d83
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'RadarChartForP
latformPetOwner
'
,
name
:
'RadarChartForP
etOwnerHospital
'
,
props
:
[
'
title'
,
'radarIndicatorData'
,
'radarLegendData
'
],
props
:
[
'
yData1'
,
'yData2
'
],
data
()
{
data
()
{
return
{}
return
{}
},
},
...
@@ -17,13 +17,13 @@ export default {
...
@@ -17,13 +17,13 @@ export default {
},
},
methods
:
{
methods
:
{
setCharts
()
{
setCharts
()
{
//
const _this = this
const
_this
=
this
// 基于准备好的dom,初始化echarts实例
// 基于准备好的dom,初始化echarts实例
const
mapChart
=
this
.
$echarts
.
init
(
this
.
$refs
.
radarMap
)
const
mapChart
=
this
.
$echarts
.
init
(
this
.
$refs
.
radarMap
)
mapChart
.
setOption
({
mapChart
.
setOption
({
title
:
{
title
:
{
left
:
'left'
,
left
:
'left'
,
text
:
'宠主
绑定医院
数量分析'
,
text
:
'宠主
宠物
数量分析'
,
textStyle
:
{
textStyle
:
{
fontSize
:
12
,
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontFamily
:
'Microsoft YaHei'
,
...
@@ -33,70 +33,10 @@ export default {
...
@@ -33,70 +33,10 @@ export default {
},
},
tooltip
:
{
tooltip
:
{
show
:
true
show
:
true
// formatter: function(item) {
// console.log('radarItem', item)
// return `
<
div
>
//
<
div
>
$
{
item
.
name
}
<
/div
>
//
<
div
style
=
"display: flex;width: 180px"
>
//
<
div
style
=
"width: 10%"
>
//
<
div
style
=
"background: #00afff;width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"
><
/div
>
//
<
/div
>
//
<
div
style
=
"width: 60%"
>
//
<
div
>
5000
元以下
<
/div
>
//
<
/div
>
//
<
div
style
=
"width: 30%"
>
//
<
div
style
=
"text-align: right"
>
$
{
item
.
value
[
0
]}
<
/div
>
//
<
/div
>
//
<
/div
>
//
<
div
style
=
"display: flex;width: 180px"
>
//
<
div
style
=
"width: 10%"
>
//
<
div
style
=
"background: #00afff;width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"
><
/div
>
//
<
/div
>
//
<
div
style
=
"width: 60%"
>
//
<
div
>
5000
~
12000
元
<
/div
>
//
<
/div
>
//
<
div
style
=
"width: 30%"
>
//
<
div
style
=
"text-align: right"
>
$
{
item
.
value
[
1
]}
<
/div
>
//
<
/div
>
//
<
/div
>
//
<
div
style
=
"display: flex;width: 180px"
>
//
<
div
style
=
"width: 10%"
>
//
<
div
style
=
"background: #00afff;width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"
><
/div
>
//
<
/div
>
//
<
div
style
=
"width: 60%"
>
//
<
div
>
12000
~
30000
元
<
/div
>
//
<
/div
>
//
<
div
style
=
"width: 30%"
>
//
<
div
style
=
"text-align: right"
>
$
{
item
.
value
[
2
]}
<
/div
>
//
<
/div
>
//
<
/div
>
//
<
div
style
=
"display: flex;width: 180px"
>
//
<
div
style
=
"width: 10%"
>
//
<
div
style
=
"background: #00afff;width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"
><
/div
>
//
<
/div
>
//
<
div
style
=
"width: 60%"
>
//
<
div
>
530000
~
100000
元
<
/div
>
//
<
/div
>
//
<
div
style
=
"width: 30%"
>
//
<
div
style
=
"text-align: right"
>
$
{
item
.
value
[
3
]}
<
/div
>
//
<
/div
>
//
<
/div
>
//
<
div
style
=
"display: flex;width: 180px"
>
//
<
div
style
=
"width: 10%"
>
//
<
div
style
=
"background: #00afff;width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"
><
/div
>
//
<
/div
>
//
<
div
style
=
"width: 60%"
>
//
<
div
>
100000
元以上
<
/div
>
//
<
/div
>
//
<
div
style
=
"width: 30%"
>
//
<
div
style
=
"text-align: right"
>
$
{
item
.
value
[
4
]}
<
/div
>
//
<
/div
>
//
<
/div
>
//
<
/div>
`
// }
},
},
legend
:
{
legend
:
{
data
:
[
'历史入驻量'
,
'当前有效数量'
],
data
:
[
'绑定宠物数量'
,
'就诊宠物数量'
],
left
:
'right'
,
textStyle
:
{
// 图例的公用文本样式。
textStyle
:
{
// 图例的公用文本样式。
fontSize
:
12
,
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontFamily
:
'Microsoft YaHei'
,
...
@@ -107,13 +47,13 @@ export default {
...
@@ -107,13 +47,13 @@ export default {
radar
:
{
radar
:
{
// shape: 'circle',
// shape: 'circle',
center
:
[
'50%'
,
'55%'
],
center
:
[
'50%'
,
'55%'
],
radius
:
1
3
0
,
radius
:
1
4
0
,
indicator
:
[
indicator
:
[
{
name
:
'
5000元以下
'
,
max
:
50
},
{
name
:
'
1只
'
,
max
:
50
},
{
name
:
'
5000~12000元
'
,
max
:
50
},
{
name
:
'
2只
'
,
max
:
50
},
{
name
:
'
12000~30000元
'
,
max
:
50
},
{
name
:
'
3~4只
'
,
max
:
50
},
{
name
:
'
30000~100000元
'
,
max
:
50
},
{
name
:
'
4~5只
'
,
max
:
50
},
{
name
:
'
100000元
以上'
,
max
:
50
}
{
name
:
'
5只
以上'
,
max
:
50
}
],
],
axisName
:
{
// (圆外的标签)雷达图每个指示器名称的配置项。
axisName
:
{
// (圆外的标签)雷达图每个指示器名称的配置项。
color
:
'#666666'
,
color
:
'#666666'
,
...
@@ -128,8 +68,8 @@ export default {
...
@@ -128,8 +68,8 @@ export default {
type
:
'radar'
,
type
:
'radar'
,
data
:
[
data
:
[
{
{
value
:
[
42
,
30
,
20
,
35
,
50
,
18
]
,
value
:
_this
.
yData1
,
name
:
'
历史入驻
量'
,
name
:
'
绑定宠物数
量'
,
symbol
:
'emptyCircle'
,
// 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none', emptyCircle
symbol
:
'emptyCircle'
,
// 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none', emptyCircle
symbolSize
:
6
,
symbolSize
:
6
,
itemStyle
:
{
itemStyle
:
{
...
@@ -153,8 +93,8 @@ export default {
...
@@ -153,8 +93,8 @@ export default {
}
}
},
},
{
{
value
:
[
50
,
14
,
28
,
26
,
42
,
21
]
,
value
:
_this
.
yData2
,
name
:
'
当前有效
数量'
,
name
:
'
就诊宠物
数量'
,
symbol
:
'emptyCircle'
,
symbol
:
'emptyCircle'
,
symbolSize
:
6
,
symbolSize
:
6
,
itemStyle
:
{
itemStyle
:
{
...
...
src/views/data-statistics/echars-components/radar-chart-for-petowner-platfrom.vue
View file @
dbf55d83
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'RadarChartForPetOwnerPlatform'
,
name
:
'RadarChartForPetOwnerPlatform'
,
props
:
[
'
title'
,
'
yData1'
,
'yData2'
],
props
:
[
'yData1'
,
'yData2'
],
data
()
{
data
()
{
return
{}
return
{}
},
},
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
},
},
legend
:
{
legend
:
{
data
:
[
'历史入驻量'
,
'当前有效数量'
],
data
:
[
'历史入驻量'
,
'当前有效数量'
],
left
:
'
right
'
,
left
:
'
center
'
,
textStyle
:
{
// 图例的公用文本样式。
textStyle
:
{
// 图例的公用文本样式。
fontSize
:
12
,
fontSize
:
12
,
fontFamily
:
'Microsoft YaHei'
,
fontFamily
:
'Microsoft YaHei'
,
...
...
src/views/data-statistics/echars-components/twoLineChart.vue
View file @
dbf55d83
...
@@ -66,7 +66,7 @@ export default {
...
@@ -66,7 +66,7 @@ export default {
}
}
},
},
grid
:
{
grid
:
{
x
:
7
0
,
x
:
8
0
,
x2
:
15
x2
:
15
},
},
xAxis
:
{
xAxis
:
{
...
@@ -79,6 +79,7 @@ export default {
...
@@ -79,6 +79,7 @@ export default {
axisLabel
:
{
axisLabel
:
{
formatter
:
'{value}'
+
_this
.
yData1
.
unit
formatter
:
'{value}'
+
_this
.
yData1
.
unit
}
}
// containLabel: true
},
},
legend
:
{
legend
:
{
x
:
'right'
,
x
:
'right'
,
...
@@ -122,7 +123,6 @@ export default {
...
@@ -122,7 +123,6 @@ export default {
// symbol: 'circle', // 设置拐点为实心圆
// symbol: 'circle', // 设置拐点为实心圆
type
:
'line'
,
type
:
'line'
,
smooth
:
true
,
smooth
:
true
,
stack
:
'x'
,
// y轴是否从零开始
// 折线下区域的颜色
// 折线下区域的颜色
areaStyle
:
{
areaStyle
:
{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
...
@@ -142,7 +142,6 @@ export default {
...
@@ -142,7 +142,6 @@ export default {
data
:
_this
.
yData2
.
data
,
data
:
_this
.
yData2
.
data
,
type
:
'line'
,
type
:
'line'
,
smooth
:
true
,
smooth
:
true
,
stack
:
'x'
,
areaStyle
:
{
areaStyle
:
{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
_this
.
yData2
.
area_color
// 0% 处的颜色
offset
:
0
,
color
:
_this
.
yData2
.
area_color
// 0% 处的颜色
...
...
src/views/data-statistics/hospital-data-statistics/hospital-data-statistics.vue
View file @
dbf55d83
...
@@ -185,12 +185,6 @@
...
@@ -185,12 +185,6 @@
</el-col>
</el-col>
<el-col
:span=
"9"
>
<el-col
:span=
"9"
>
<div
class=
"cardDiv"
style=
"padding-bottom: 0px"
>
<div
class=
"cardDiv"
style=
"padding-bottom: 0px"
>
<!--
<div
style=
"text-align: right;position: absolute;z-index: 10;width: 34%"
>
-->
<!--
<el-radio-group
v-model=
"radarSelect"
>
-->
<!--
<el-radio-button
label=
"lastYear"
class=
"radioButton"
>
去年
</el-radio-button>
-->
<!--
<el-radio-button
label=
"currentYear"
class=
"radioButton"
>
今年
</el-radio-button>
-->
<!--
</el-radio-group>
-->
<!--
</div>
-->
<radar-chart-for-hospital
<radar-chart-for-hospital
:y-data1=
"[42, 30, 20, 35, 50, 18]"
:y-data1=
"[42, 30, 20, 35, 50, 18]"
:y-data2=
"[50, 14, 28, 26, 42, 21]"
:y-data2=
"[50, 14, 28, 26, 42, 21]"
...
...
src/views/data-statistics/pet-data-statistics/pet-data-statistics.vue
View file @
dbf55d83
This diff is collapsed.
Click to expand it.
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