|
|
|
|
@ -212,18 +212,6 @@
|
|
|
|
|
.card1-body:has(#bar-chart) {
|
|
|
|
|
height: calc(100% - 39px);
|
|
|
|
|
}
|
|
|
|
|
.content:has(.type-switch .type-switch__item input:nth-child(1):checked) #bar-chart {
|
|
|
|
|
display: block !important;
|
|
|
|
|
}
|
|
|
|
|
.content:has(.type-switch .type-switch__item input:nth-child(1):checked) #bar-chart1 {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
.content:has(.type-switch .type-switch__item input:nth-child(2):checked) #bar-chart {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
.content:has(.type-switch .type-switch__item input:nth-child(2):checked) #bar-chart1 {
|
|
|
|
|
display: block !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hospital-select {
|
|
|
|
|
padding: 0 6px;
|
|
|
|
|
@ -337,7 +325,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card1-body">
|
|
|
|
|
<div id="bar-chart"></div>
|
|
|
|
|
<div id="bar-chart1"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -446,44 +433,16 @@
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
barChart.setOption(option)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var barChart1 = echarts.init(document.querySelector("#bar-chart1"));
|
|
|
|
|
var option1 = {
|
|
|
|
|
title: {
|
|
|
|
|
text: '订单量趋势'
|
|
|
|
|
},
|
|
|
|
|
// grid: {
|
|
|
|
|
// top: "10%",
|
|
|
|
|
// left: "15%",
|
|
|
|
|
// right: "15%",
|
|
|
|
|
// height: "80%"
|
|
|
|
|
// },
|
|
|
|
|
tooltip: {},
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['订单']
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
data: orderList.map(function (item) {
|
|
|
|
|
return item.month
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
yAxis: {},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '订单',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: orderList.map(function (item) {
|
|
|
|
|
return item.total
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
barChart1.setOption(option1)
|
|
|
|
|
}
|
|
|
|
|
function typeSwitchListener () {
|
|
|
|
|
$("[name=type-switch]").change(function () {
|
|
|
|
|
console.log($(this.val()))
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
(function () {
|
|
|
|
|
initPieChart()
|
|
|
|
|
initBarChart()
|
|
|
|
|
typeSwitchListener()
|
|
|
|
|
})()
|
|
|
|
|
</script>
|
|
|
|
|
@endpush
|
|
|
|
|
|