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

数据统计-接口对接

parent ff3663e8
......@@ -31,3 +31,12 @@ export function listHospital(query) {
params: query
})
}
// 获取服务项目预约记录
export function listOrder(query) {
return request({
url: '/business/statistics/checkList',
method: 'get',
params: query
})
}
......@@ -89,7 +89,7 @@ export default {
trigger: 'item', // 出发方式
formatter: (item) => {
const unit = _this.unit
const percent = item.data.value / _this.sum * 100
const percent = (item.data.value / _this.sum * 100).toFixed(1)
return `<div>
${item.data.name}
<br>
......
......@@ -42,7 +42,6 @@ export default {
type: 'shadow'
},
formatter: (axis) => {
console.log('堆叠', axis)
return `<div>
<div>${axis[0].name}</div>
<div style="display: flex">
......
......@@ -33,12 +33,12 @@ export default {
line_color: '',
area_color: '',
unit: ''
},
// y轴是否显示单位
showYUnit: {
type: Boolean,
default: true
}
},
// y轴是否显示单位
showYUnit: {
type: Boolean,
default: true
}
},
data() {
......
......@@ -14,7 +14,7 @@ export default {
// x轴坐标
xData: {
type: Array,
default: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
default: []
},
// y轴数据 1
yData1: {
......@@ -47,7 +47,14 @@ export default {
data() {
return {}
},
watch: {},
watch: {
xData: {
handler(newVal) {
this.setECharts()
},
deep: true
}
},
mounted() {
this.setECharts()
},
......@@ -84,7 +91,7 @@ export default {
// }
},
legend: {
x: 'right',
x: 'center',
y: 'top',
data: [
_this.yData1.label + '(' + _this.yData1.unit + ')',
......
......@@ -105,7 +105,7 @@
<el-row :gutter="24" class="row2">
<el-col :span="12">
<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>
</el-col>
<el-col :span="8">
......@@ -182,7 +182,7 @@
<el-row :gutter="24" class="row2">
<el-col :span="9">
<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 class="cardTitle">
医院所在城市分析
......@@ -348,14 +348,14 @@ export default {
mapData: [],
yData1: {
label: '新增预储值总额',
data: [33, 31, 52, 66, 28, 71, 42, 95, 81, 92, 120, 21],
data: [],
line_color: '#3490CE',
area_color: 'rgba(52,144,206,0.3)',
unit: '万元'
},
yData2: {
label: '预储值余额总额',
data: [13, 33, 25, 16, 1, 10, 22, 44, 58, 79, 30, 10],
data: [],
line_color: '#5FB54B',
area_color: 'rgba(95,181,75,0.3)',
unit: '万元'
......@@ -394,6 +394,8 @@ export default {
console.log('dataRes', res)
this.hospitalInfoStatistics = res.data.hospitalInfoStatistics
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.hospitalPrestoredRank = res.data.prestoredRankList
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 {
}
}
.orange_percent_invert {
//filter: alpha(opacity=10);
::v-deep .el-progress-circle {
svg > path:nth-child(2) {
stroke: url(#yuchuzhi); // 该url() 中填入的是, 对应组件中的 id 名
......@@ -172,6 +173,7 @@ export default {
}
.rotateYProgress {
height: 138px;
::v-deep .el-progress{
padding-top: 20px;
}
......@@ -181,6 +183,7 @@ export default {
}
}
.noRotateProgress {
height: 138px;
padding-top: 20px;
}
</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