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
7eafa4bf
Commit
7eafa4bf
authored
Aug 01, 2023
by
陈明豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据统计-接口对接
parent
5899c566
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
25 deletions
+78
-25
statistics.js
src/api/business/statistics.js
+8
-0
radar-chart-for-petowner-platfrom.vue
...s/echars-components/radar-chart-for-petowner-platfrom.vue
+3
-3
hospital-data-statistics.vue
...ics/hospital-data-statistics/hospital-data-statistics.vue
+0
-1
pet-data-statistics.vue
...ta-statistics/pet-data-statistics/pet-data-statistics.vue
+34
-17
service-statistics.vue
...data-statistics/service-statistics/service-statistics.vue
+33
-4
No files found.
src/api/business/statistics.js
View file @
7eafa4bf
...
...
@@ -16,6 +16,14 @@ export function getHospitalStatistics() {
})
}
// 获取业务统计
export
function
getBusinessStatistics
()
{
return
request
({
url
:
'/business/statistics/businessStatistics'
,
method
:
'get'
})
}
export
function
listHospital
(
query
)
{
return
request
({
url
:
'/system/hospital/list'
,
...
...
src/views/data-statistics/echars-components/radar-chart-for-petowner-platfrom.vue
View file @
7eafa4bf
...
...
@@ -36,7 +36,7 @@ export default {
show
:
true
},
legend
:
{
data
:
[
'
历史入驻量'
,
'当前有效数量
'
],
data
:
[
'
年消费额'
,
'年充值额
'
],
left
:
'center'
,
textStyle
:
{
// 图例的公用文本样式。
fontSize
:
12
,
...
...
@@ -70,7 +70,7 @@ export default {
data
:
[
{
value
:
_this
.
yData1
,
name
:
'
历史入驻量
'
,
name
:
'
年消费额
'
,
symbol
:
'emptyCircle'
,
// 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none', emptyCircle
symbolSize
:
6
,
itemStyle
:
{
...
...
@@ -95,7 +95,7 @@ export default {
},
{
value
:
_this
.
yData2
,
name
:
'
当前有效数量
'
,
name
:
'
年充值额
'
,
symbol
:
'emptyCircle'
,
symbolSize
:
6
,
itemStyle
:
{
...
...
src/views/data-statistics/hospital-data-statistics/hospital-data-statistics.vue
View file @
7eafa4bf
...
...
@@ -475,7 +475,6 @@ export default {
const
authorizationExpirationDate
=
this
.
addDays
(
row
.
createTime
,
row
.
dueDate
)
row
.
authorizationExpirationDate
=
authorizationExpirationDate
const
local
=
process
.
env
.
VUE_APP_WEB
console
.
log
(
'local'
,
local
)
window
.
location
.
href
=
`${local
}
/hospital-management/hospital-details?detail=${row
}
`
localStorage
.
setItem
(
'hospitalDetail'
,
JSON
.
stringify
(
row
))
}
...
...
src/views/data-statistics/pet-data-statistics/pet-data-statistics.vue
View file @
7eafa4bf
...
...
@@ -249,17 +249,23 @@
</el-col>
<el-col
:span=
"9"
>
<div
class=
"cardDiv"
style=
"padding-bottom: 0px"
>
<div
v-if=
"radarPetOwnerPlatform
.yData1.length > 0 || radarPetOwnerPlatform
.yData2.length > 0"
style=
"text-align: right;position: absolute;z-index: 10;width: 34%;"
>
<div
v-if=
"radarPetOwnerPlatform
CurrentYear.yData1.length > 0 || radarPetOwnerPlatformCurrentYear
.yData2.length > 0"
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-pet-owner-platform
v-if=
"radarPetOwnerPlatform.yData1.length > 0 || radarPetOwnerPlatform.yData2.length > 0"
:y-data1=
"radarPetOwnerPlatform.yData1"
:y-data2=
"radarPetOwnerPlatform.yData2"
:max=
"getArrayMax([getArrayMax(radarPetOwnerPlatform.yData1),getArrayMax(radarPetOwnerPlatform.yData2)])"
v-if=
"(radarPetOwnerPlatformLastYear.yData1.length > 0 || radarPetOwnerPlatformLastYear.yData2.length > 0) && radarSelect === 'lastYear'"
:y-data1=
"radarPetOwnerPlatformLastYear.yData1"
:y-data2=
"radarPetOwnerPlatformLastYear.yData2"
:max=
"getArrayMax([getArrayMax(radarPetOwnerPlatformLastYear.yData1),getArrayMax(radarPetOwnerPlatformLastYear.yData2)])"
/>
<radar-chart-for-pet-owner-platform
v-if=
"(radarPetOwnerPlatformCurrentYear.yData1.length > 0 || radarPetOwnerPlatformCurrentYear.yData2.length > 0) && radarSelect === 'currentYear'"
:y-data1=
"radarPetOwnerPlatformCurrentYear.yData1"
:y-data2=
"radarPetOwnerPlatformCurrentYear.yData2"
:max=
"getArrayMax([getArrayMax(radarPetOwnerPlatformCurrentYear.yData1),getArrayMax(radarPetOwnerPlatformCurrentYear.yData2)])"
/>
<div
v-else
style=
"height: 386px;"
>
<div
class=
"cardTitle"
style=
"margin-bottom: 29px"
>
...
...
@@ -654,7 +660,7 @@ export default {
ColumnarChart
,
OverlongTool
,
TwoLineChart
,
ProgressColor
},
data
()
{
return
{
loading
:
tru
e
,
loading
:
fals
e
,
isPlatformRole
:
true
,
crosswiseShow
:
false
,
customerStatistics
:
{},
...
...
@@ -836,7 +842,11 @@ export default {
xData
:
[
'1家'
,
'2~4家'
,
'5~8家'
,
'8家以上'
],
yData
:
[]
},
radarPetOwnerPlatform
:
{
radarPetOwnerPlatformCurrentYear
:
{
yData1
:
[],
yData2
:
[]
},
radarPetOwnerPlatformLastYear
:
{
yData1
:
[],
yData2
:
[]
},
...
...
@@ -1136,13 +1146,14 @@ export default {
methods
:
{
// 获取宠主数据统计数据
getStatisticsDataForPlatFrom
()
{
this
.
loading
=
true
//
this.loading = true
getPetDataStatistics
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
'res'
,
res
)
console
.
log
(
'platRes'
,
res
)
// debugger
this
.
customerStatistics
=
res
.
data
.
customerStatistics
this
.
yData1
.
data
=
res
.
data
.
newCustomerStatistics
.
addNum
this
.
yData2
.
data
=
res
.
data
.
newCustomerStatistics
.
registerNum
this
.
yData1
.
data
=
res
.
data
.
newCustomerStatistics
.
map
(
x
=>
{
return
x
.
addNum
})
this
.
yData2
.
data
=
res
.
data
.
newCustomerStatistics
.
map
(
x
=>
{
return
x
.
registerNum
})
this
.
y1_data
.
data
=
res
.
data
.
PetNumAnalysis
.
dimension
this
.
y2_data
.
data
=
res
.
data
.
PetNumAnalysis
.
dimensionTwoNum
...
...
@@ -1152,16 +1163,19 @@ export default {
this
.
columnarChartData
.
yData
=
res
.
data
.
HospitalNumAnalysis
.
dimension
this
.
radarPetOwnerPlatform
.
yData1
=
res
.
data
.
PayAmountAnalysis
.
dimension
this
.
radarPetOwnerPlatform
.
yData2
=
res
.
data
.
PayAmountAnalysis
.
dimensionTwoNum
this
.
radarPetOwnerPlatformCurrentYear
.
yData1
=
res
.
data
.
PayAmountAnalysis
.
dimension
this
.
radarPetOwnerPlatformCurrentYear
.
yData2
=
res
.
data
.
RechargeAmountAnalysis
.
dimension
this
.
radarPetOwnerPlatformLastYear
.
yData1
=
(
res
.
data
.
PayAmountAnalysis
.
dimensionTwoNum
||
[])
this
.
radarPetOwnerPlatformLastYear
.
yData2
=
(
res
.
data
.
RechargeAmountAnalysis
.
dimensionTwoNum
||
[])
this
.
crosswiseShow
=
true
this
.
loading
=
false
//
this.loading = false
}
})
},
getStatisticsDataForHospital
()
{
this
.
loading
=
true
//
this.loading = true
getPetDataStatistics
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
'hospitalRoleRes'
,
res
)
...
...
@@ -1178,9 +1192,12 @@ export default {
this
.
topUpColumnarChartData
.
yData
=
res
.
data
.
RechargeAnalysis
.
dimension
this
.
radarPetOwnerHospital
.
yData1
=
res
.
data
.
PetCountAnalysis
.
dimension
this
.
radarPetOwnerHospital
.
yData2
=
res
.
data
.
PetCountAnalysis
.
dimensionTwoNum
this
.
loading
=
false
if
(
res
.
data
.
PetCountAnalysis
.
dimensionTwoNum
!==
undefined
&&
res
.
data
.
PetCountAnalysis
.
dimensionTwoNum
!==
null
)
{
this
.
radarPetOwnerHospital
.
yData2
=
res
.
data
.
PetCountAnalysis
.
dimensionTwoNum
}
// this.loading = false
}
})
},
...
...
src/views/data-statistics/service-statistics/service-statistics.vue
View file @
7eafa4bf
...
...
@@ -13,7 +13,7 @@
<el-col
:span=
"6"
>
<div
class=
"service_info_statistics service_info_statistics_device"
>
<div
style=
"display: flex;"
>
<div
class=
"numberColor"
>
76
</div>
<div
class=
"numberColor"
>
{{
formatNum
(
businessInformation
.
serviceEquipment
)
}}
</div>
<div
class=
"fontColor"
>
台
</div>
</div>
<div
class=
"bottomText"
>
...
...
@@ -27,7 +27,7 @@
<el-col
:span=
"6"
>
<div
class=
"service_info_statistics service_info_statistics_project"
>
<div
style=
"display: flex;"
>
<div
class=
"numberColor"
>
827
</div>
<div
class=
"numberColor"
>
{{
formatNum
(
businessInformation
.
serviceProject
)
}}
</div>
<div
class=
"fontColor"
>
项
</div>
</div>
<div
class=
"bottomText"
>
...
...
@@ -41,7 +41,7 @@
<el-col
:span=
"6"
>
<div
class=
"service_info_statistics service_info_statistics_order"
>
<div
style=
"display: flex;"
>
<div
class=
"numberColor"
>
3,421
</div>
<div
class=
"numberColor"
>
{{
formatNum
(
businessInformation
.
appointmentsNum
)
}}
</div>
<div
class=
"fontColor"
>
次
</div>
</div>
<div
class=
"bottomText"
>
...
...
@@ -55,7 +55,7 @@
<el-col
:span=
"6"
>
<div
class=
"service_info_statistics service_info_statistics_income"
>
<div
style=
"display: flex;"
>
<div
class=
"numberColor"
>
348,936,33
</div>
<div
class=
"numberColor"
>
{{
formatNum
(
businessInformation
.
appointmentsAmount
)
}}
</div>
<div
class=
"fontColor"
>
元
</div>
</div>
<div
class=
"bottomText"
>
...
...
@@ -668,6 +668,7 @@ import PercentTool from '@/views/data-statistics/other-components/percentTool.vu
import
OneLineChart
from
'@/views/data-statistics/echars-components/oneLineChart.vue'
import
PileUpChart
from
'@/views/data-statistics/echars-components/pileUpChart.vue'
import
RadarChartOneLineBigger
from
'@/views/data-statistics/echars-components/radar-chart-one-line-bigger.vue'
import
{
getBusinessStatistics
}
from
'@/api/business/statistics'
export
default
{
name
:
'ServiceStatistics'
,
...
...
@@ -675,6 +676,7 @@ export default {
data
()
{
return
{
isPlatformRole
:
true
,
businessInformation
:
{},
mapData
:
[
{
name
:
'北京市'
,
...
...
@@ -1466,8 +1468,35 @@ export default {
}
},
created
()
{
console
.
log
(
'store--->'
,
this
.
$store
.
state
.
user
.
userType
)
if
(
this
.
$store
.
state
.
user
.
userType
===
'00'
)
{
this
.
isPlatformRole
=
true
this
.
getDataForPlatform
()
}
else
{
this
.
isPlatformRole
=
false
}
},
methods
:
{
getDataForPlatform
()
{
getBusinessStatistics
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
'业务统计数据===>'
,
res
)
this
.
businessInformation
=
res
.
data
.
businessInformation
}
})
},
formatNum
(
value
)
{
return
Number
(
value
).
toLocaleString
()
},
getArrayMax
(
array
=
[])
{
let
max
=
0
for
(
let
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
array
[
i
]
>
max
)
{
max
=
array
[
i
]
}
}
return
max
}
}
}
</
script
>
...
...
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