|
|
|
@ -2,9 +2,12 @@
|
|
|
|
|
<el-container>
|
|
|
|
|
<div style="width: 45%">
|
|
|
|
|
<ve-line :data="chartData_H" :extend="chartExtend_H" height="400px"></ve-line>
|
|
|
|
|
<ve-pie :data="chartData_reason" :extend="chartExtend_reason" height="400px"></ve-pie>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="width: 45%">
|
|
|
|
|
<ve-line :data="chartData_D" :extend="chartExtend_D" height="400px"></ve-line>
|
|
|
|
|
<ve-pie :data="chartData_place" :extend="chartExtend_place" height="400px"></ve-pie>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-container>
|
|
|
|
@ -32,6 +35,23 @@ export default {
|
|
|
|
|
y: 'bottom', //在图片中的y轴位置 top, bottom
|
|
|
|
|
textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
this.chartExtend_place = {
|
|
|
|
|
title: {
|
|
|
|
|
text: '外出地点情况',
|
|
|
|
|
x: 'middle', //在图片中的x轴位置 left, right, middle
|
|
|
|
|
y: 'bottom', //在图片中的y轴位置 top, bottom
|
|
|
|
|
textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
this.chartExtend_reason = {
|
|
|
|
|
title: {
|
|
|
|
|
text: '外出理由情况',
|
|
|
|
|
x: 'middle', //在图片中的x轴位置 left, right, middle
|
|
|
|
|
y: 'bottom', //在图片中的y轴位置 top, bottom
|
|
|
|
|
textAlign: 'center' //整体(包括 text 和 subtext)的水平对齐 auto, left, right, center
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
chartData_H: {
|
|
|
|
@ -42,6 +62,14 @@ export default {
|
|
|
|
|
columns: ["日期", "预计离开人数", "预计返回人数", "实际离开人数", "实际返回人数"],
|
|
|
|
|
rows: []
|
|
|
|
|
},
|
|
|
|
|
chartData_place: {
|
|
|
|
|
columns: ["place", "value"],
|
|
|
|
|
rows: []
|
|
|
|
|
},
|
|
|
|
|
chartData_reason: {
|
|
|
|
|
columns: ["reason", "value"],
|
|
|
|
|
rows: []
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {},
|
|
|
|
@ -66,6 +94,20 @@ export default {
|
|
|
|
|
axios.get('http://localhost:8181/dataAnalysis/DATime/' + id + '/D').then(function (resp) {
|
|
|
|
|
_this.chartData_D.rows = resp.data;
|
|
|
|
|
})
|
|
|
|
|
axios.get('http://localhost:8181/dataAnalysis/place/' + id).then(function (resp) {
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < resp.data.length; i++) {
|
|
|
|
|
resp.data[i]["value"] = Number(resp.data[i]["value"])
|
|
|
|
|
}
|
|
|
|
|
_this.chartData_place.rows = resp.data;
|
|
|
|
|
console.log(_this.chartData_place)
|
|
|
|
|
})
|
|
|
|
|
axios.get('http://localhost:8181/dataAnalysis/reason/' + id).then(function (resp) {
|
|
|
|
|
for (let i = 0; i < resp.data.length; i++) {
|
|
|
|
|
resp.data[i]["value"] = Number(resp.data[i]["value"])
|
|
|
|
|
}
|
|
|
|
|
_this.chartData_reason.rows = resp.data;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|