Commit 939d0bb2 by zhangquan

添加loading

1 parent fddb5188
...@@ -286,6 +286,12 @@ export default { ...@@ -286,6 +286,12 @@ export default {
return `${year}-${month}-${day} 00:00:00` return `${year}-${month}-${day} 00:00:00`
}, },
getDosageChartsData(vehicleId) { getDosageChartsData(vehicleId) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
GET_DOSAGE_ANALYSIS_DATA({ vehicleId }).then(res => { GET_DOSAGE_ANALYSIS_DATA({ vehicleId }).then(res => {
this.showDosage = res && res.data && res.data.mileage && res.data.mileage.length this.showDosage = res && res.data && res.data.mileage && res.data.mileage.length
if (res && res.data) { if (res && res.data) {
...@@ -310,6 +316,8 @@ export default { ...@@ -310,6 +316,8 @@ export default {
this.drawLine(xList, y1DataList, y2DataList, y3DataList) this.drawLine(xList, y1DataList, y2DataList, y3DataList)
} }
} }
}).finally(end => {
loading.close()
}) })
}, },
getPreviousWeekWednesday(dateString){ getPreviousWeekWednesday(dateString){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!