Files

95 lines
2.1 KiB
Vue
Raw Normal View History

2022-01-11 08:57:13 +08:00
<template>
2022-01-25 16:22:12 +08:00
<div class="app-container">
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" /> -->
首页
<!-- <el-row style="background: #fff; padding: 16px 16px 0; margin-bottom: 32px">
2022-01-11 08:57:13 +08:00
<line-chart :chart-data="lineChartData" />
2022-01-25 16:22:12 +08:00
</el-row> -->
2022-01-11 08:57:13 +08:00
2022-01-25 16:22:12 +08:00
<!-- <el-row :gutter="32">
2022-01-11 08:57:13 +08:00
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
2022-01-25 16:22:12 +08:00
</el-row> -->
2022-01-11 08:57:13 +08:00
</div>
</template>
<script>
2022-01-25 16:22:12 +08:00
import PanelGroup from "./dashboard/PanelGroup";
import LineChart from "./dashboard/LineChart";
import RaddarChart from "./dashboard/RaddarChart";
import PieChart from "./dashboard/PieChart";
import BarChart from "./dashboard/BarChart";
2022-01-11 08:57:13 +08:00
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
2022-01-25 16:22:12 +08:00
actualData: [120, 82, 91, 154, 162, 140, 145],
2022-01-11 08:57:13 +08:00
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
2022-01-25 16:22:12 +08:00
actualData: [180, 160, 151, 106, 145, 150, 130],
2022-01-11 08:57:13 +08:00
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
2022-01-25 16:22:12 +08:00
actualData: [120, 90, 100, 138, 142, 130, 130],
2022-01-11 08:57:13 +08:00
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
2022-01-25 16:22:12 +08:00
actualData: [120, 82, 91, 154, 162, 140, 130],
},
};
2022-01-11 08:57:13 +08:00
export default {
2022-01-25 16:22:12 +08:00
name: "Index",
2022-01-11 08:57:13 +08:00
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
2022-01-25 16:22:12 +08:00
BarChart,
2022-01-11 08:57:13 +08:00
},
data() {
return {
2022-01-25 16:22:12 +08:00
lineChartData: lineChartData.newVisitis,
};
2022-01-11 08:57:13 +08:00
},
methods: {
handleSetLineChartData(type) {
2022-01-25 16:22:12 +08:00
this.lineChartData = lineChartData[type];
},
},
};
2022-01-11 08:57:13 +08:00
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
2022-01-25 16:22:12 +08:00
background-color: rgb(255, 255, 255);
2022-01-11 08:57:13 +08:00
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
2022-01-25 16:22:12 +08:00
@media (max-width: 1024px) {
2022-01-11 08:57:13 +08:00
.chart-wrapper {
padding: 8px;
}
}
</style>