Commit ed0a56dc authored by 陈明豪's avatar 陈明豪

数据统计-接口对接

parent ff3663e8
...@@ -31,3 +31,12 @@ export function listHospital(query) { ...@@ -31,3 +31,12 @@ export function listHospital(query) {
params: query params: query
}) })
} }
// 获取服务项目预约记录
export function listOrder(query) {
return request({
url: '/business/statistics/checkList',
method: 'get',
params: query
})
}
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
trigger: 'item', // 出发方式 trigger: 'item', // 出发方式
formatter: (item) => { formatter: (item) => {
const unit = _this.unit const unit = _this.unit
const percent = item.data.value / _this.sum * 100 const percent = (item.data.value / _this.sum * 100).toFixed(1)
return `<div> return `<div>
${item.data.name} ${item.data.name}
<br> <br>
......
...@@ -42,7 +42,6 @@ export default { ...@@ -42,7 +42,6 @@ export default {
type: 'shadow' type: 'shadow'
}, },
formatter: (axis) => { formatter: (axis) => {
console.log('堆叠', axis)
return `<div> return `<div>
<div>${axis[0].name}</div> <div>${axis[0].name}</div>
<div style="display: flex"> <div style="display: flex">
......
...@@ -33,13 +33,13 @@ export default { ...@@ -33,13 +33,13 @@ export default {
line_color: '', line_color: '',
area_color: '', area_color: '',
unit: '' unit: ''
}
}, },
// y轴是否显示单位 // y轴是否显示单位
showYUnit: { showYUnit: {
type: Boolean, type: Boolean,
default: true default: true
} }
}
}, },
data() { data() {
return {} return {}
......
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
// x轴坐标 // x轴坐标
xData: { xData: {
type: Array, type: Array,
default: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] default: []
}, },
// y轴数据 1 // y轴数据 1
yData1: { yData1: {
...@@ -47,7 +47,14 @@ export default { ...@@ -47,7 +47,14 @@ export default {
data() { data() {
return {} return {}
}, },
watch: {}, watch: {
xData: {
handler(newVal) {
this.setECharts()
},
deep: true
}
},
mounted() { mounted() {
this.setECharts() this.setECharts()
}, },
...@@ -84,7 +91,7 @@ export default { ...@@ -84,7 +91,7 @@ export default {
// } // }
}, },
legend: { legend: {
x: 'right', x: 'center',
y: 'top', y: 'top',
data: [ data: [
_this.yData1.label + '(' + _this.yData1.unit + ')', _this.yData1.label + '(' + _this.yData1.unit + ')',
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<el-row :gutter="24" class="row2"> <el-row :gutter="24" class="row2">
<el-col :span="12"> <el-col :span="12">
<div class="cardDiv" style="padding-bottom: 0"> <div class="cardDiv" style="padding-bottom: 0">
<two-line-chart :y-data1="yData1" :y-data2="yData2" title="预储值波动" /> <two-line-chart v-if="yData1" :y-data1="yData1" :y-data2="yData2" title="预储值波动" />
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<el-row :gutter="24" class="row2"> <el-row :gutter="24" class="row2">
<el-col :span="9"> <el-col :span="9">
<div class="cardDiv" style="padding-bottom: 0"> <div class="cardDiv" style="padding-bottom: 0">
<china-map v-if="mapData.length > 0" :map-data="mapData" unit="家" :sum="mapData[mapData.length - 1].value" title="医院所在城市分析" /> <china-map v-if="mapData.length > 0" :map-data="mapData" unit="家" :sum="(mapData.length > 0 ? mapData[mapData.length - 1].value:0)" title="医院所在城市分析" />
<div v-else style="height: 386px;"> <div v-else style="height: 386px;">
<div class="cardTitle"> <div class="cardTitle">
医院所在城市分析 医院所在城市分析
...@@ -348,14 +348,14 @@ export default { ...@@ -348,14 +348,14 @@ export default {
mapData: [], mapData: [],
yData1: { yData1: {
label: '新增预储值总额', label: '新增预储值总额',
data: [33, 31, 52, 66, 28, 71, 42, 95, 81, 92, 120, 21], data: [],
line_color: '#3490CE', line_color: '#3490CE',
area_color: 'rgba(52,144,206,0.3)', area_color: 'rgba(52,144,206,0.3)',
unit: '万元' unit: '万元'
}, },
yData2: { yData2: {
label: '预储值余额总额', label: '预储值余额总额',
data: [13, 33, 25, 16, 1, 10, 22, 44, 58, 79, 30, 10], data: [],
line_color: '#5FB54B', line_color: '#5FB54B',
area_color: 'rgba(95,181,75,0.3)', area_color: 'rgba(95,181,75,0.3)',
unit: '万元' unit: '万元'
...@@ -394,6 +394,8 @@ export default { ...@@ -394,6 +394,8 @@ export default {
console.log('dataRes', res) console.log('dataRes', res)
this.hospitalInfoStatistics = res.data.hospitalInfoStatistics this.hospitalInfoStatistics = res.data.hospitalInfoStatistics
this.hospitalPercentInfo = res.data.hospitalPercentInfo this.hospitalPercentInfo = res.data.hospitalPercentInfo
this.yData1.data = res.data.prestoredUndulateDTO.newPrestored
this.yData2.data = res.data.prestoredUndulateDTO.balanceArray
this.mapData = res.data.chinaMapDistributionList this.mapData = res.data.chinaMapDistributionList
this.hospitalPrestoredRank = res.data.prestoredRankList this.hospitalPrestoredRank = res.data.prestoredRankList
this.hospitalTimeRank = res.data.enterTimeRankList this.hospitalTimeRank = res.data.enterTimeRankList
......
<template>
<div>
<div class="cardTitle">
{{ title }}
</div>
<div class="emptyDiv">
<div style="align-self:center;width: 100%">
<div>
<img src="../../../assets/data_statistics/guahao_img_wushuju.png">
</div>
<div>暂无数据</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'EmptyTool',
props: ['title'],
data() {
return {}
},
watch: {},
created() {
},
methods: {}
}
</script>
<style scoped>
.cardTitle {
margin-bottom: 10px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #333333;
margin-bottom: 20px;
}
.emptyDiv {
height: 90%;
width: 100%;
text-align: center;
font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
color: #AFAFAF;
display:flex;
}
</style>
...@@ -155,6 +155,7 @@ export default { ...@@ -155,6 +155,7 @@ export default {
} }
} }
.orange_percent_invert { .orange_percent_invert {
//filter: alpha(opacity=10);
::v-deep .el-progress-circle { ::v-deep .el-progress-circle {
svg > path:nth-child(2) { svg > path:nth-child(2) {
stroke: url(#yuchuzhi); // 该url() 中填入的是, 对应组件中的 id 名 stroke: url(#yuchuzhi); // 该url() 中填入的是, 对应组件中的 id 名
...@@ -172,6 +173,7 @@ export default { ...@@ -172,6 +173,7 @@ export default {
} }
.rotateYProgress { .rotateYProgress {
height: 138px;
::v-deep .el-progress{ ::v-deep .el-progress{
padding-top: 20px; padding-top: 20px;
} }
...@@ -181,6 +183,7 @@ export default { ...@@ -181,6 +183,7 @@ export default {
} }
} }
.noRotateProgress { .noRotateProgress {
height: 138px;
padding-top: 20px; padding-top: 20px;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment