2017-08-28 05:12:44 +00:00
|
|
|
<template>
|
2017-10-24 08:30:46 +00:00
|
|
|
<div class="dashboard-editor-container">
|
|
|
|
<github-corner></github-corner>
|
2017-11-17 03:36:49 +00:00
|
|
|
|
2017-11-17 10:45:40 +00:00
|
|
|
<panel-group @handleSetLineChartData="handleSetLineChartData"></panel-group>
|
2017-11-16 09:25:28 +00:00
|
|
|
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
2017-11-17 09:51:41 +00:00
|
|
|
<line-chart :chart-data="lineChartData"></line-chart>
|
2017-11-16 09:25:28 +00:00
|
|
|
</el-row>
|
2017-08-28 05:12:44 +00:00
|
|
|
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-row :gutter="32">
|
|
|
|
<el-col :xs="24" :sm="24" :lg="8">
|
2017-11-17 03:36:49 +00:00
|
|
|
<div class="chart-wrapper">
|
2017-11-16 09:25:28 +00:00
|
|
|
<raddar-chart></raddar-chart>
|
|
|
|
</div>
|
2017-10-24 08:30:46 +00:00
|
|
|
</el-col>
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-col :xs="24" :sm="24" :lg="8">
|
2017-11-16 09:25:28 +00:00
|
|
|
<div class="chart-wrapper">
|
|
|
|
<pie-chart></pie-chart>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-col :xs="24" :sm="24" :lg="8">
|
2017-11-17 03:36:49 +00:00
|
|
|
<div class="chart-wrapper">
|
2017-11-16 09:25:28 +00:00
|
|
|
<bar-chart></bar-chart>
|
|
|
|
</div>
|
2017-10-24 08:30:46 +00:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2017-08-28 05:12:44 +00:00
|
|
|
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-row :gutter="8">
|
|
|
|
<el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 24}" :lg="{span: 12}" :xl="{span: 12}" style="padding-right:8px;margin-bottom:30px;">
|
2017-11-16 09:25:28 +00:00
|
|
|
<transaction-table></transaction-table>
|
2017-10-24 08:30:46 +00:00
|
|
|
</el-col>
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-col :xs="{span: 12}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 5}">
|
|
|
|
<todo-list></todo-list>
|
2017-11-16 09:25:28 +00:00
|
|
|
</el-col>
|
2017-12-04 06:28:26 +00:00
|
|
|
<el-col :xs="{span: 12}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 5}">
|
2017-11-16 09:25:28 +00:00
|
|
|
<box-card></box-card>
|
2017-10-24 08:30:46 +00:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2017-08-28 05:12:44 +00:00
|
|
|
|
2017-10-24 08:30:46 +00:00
|
|
|
</div>
|
2017-08-28 05:12:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2017-10-24 08:30:46 +00:00
|
|
|
import GithubCorner from '@/components/GithubCorner'
|
2017-11-17 09:51:41 +00:00
|
|
|
import PanelGroup from './components/PanelGroup'
|
2017-11-16 09:25:28 +00:00
|
|
|
import LineChart from './components/LineChart'
|
|
|
|
import RaddarChart from './components/RaddarChart'
|
|
|
|
import PieChart from './components/PieChart'
|
|
|
|
import BarChart from './components/BarChart'
|
|
|
|
import TransactionTable from './components/TransactionTable'
|
|
|
|
import TodoList from './components/TodoList'
|
|
|
|
import BoxCard from './components/BoxCard'
|
|
|
|
|
|
|
|
const lineChartData = {
|
|
|
|
newVisitis: {
|
|
|
|
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
|
|
|
actualData: [120, 82, 91, 154, 162, 140, 145]
|
|
|
|
},
|
|
|
|
messages: {
|
|
|
|
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
2017-11-17 06:57:39 +00:00
|
|
|
actualData: [180, 160, 151, 106, 145, 150, 130]
|
2017-11-16 09:25:28 +00:00
|
|
|
},
|
|
|
|
purchases: {
|
|
|
|
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
|
|
|
actualData: [120, 90, 100, 138, 142, 130, 130]
|
|
|
|
},
|
|
|
|
shoppings: {
|
|
|
|
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
|
|
|
actualData: [120, 82, 91, 154, 162, 140, 130]
|
|
|
|
}
|
|
|
|
}
|
2017-08-28 05:12:44 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'dashboard-admin',
|
2017-11-16 09:25:28 +00:00
|
|
|
components: {
|
|
|
|
GithubCorner,
|
2017-11-17 09:51:41 +00:00
|
|
|
PanelGroup,
|
2017-11-16 09:25:28 +00:00
|
|
|
LineChart,
|
|
|
|
RaddarChart,
|
|
|
|
PieChart,
|
|
|
|
BarChart,
|
|
|
|
TransactionTable,
|
|
|
|
TodoList,
|
|
|
|
BoxCard
|
|
|
|
},
|
2017-08-28 05:12:44 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2017-11-16 09:25:28 +00:00
|
|
|
lineChartData: lineChartData.newVisitis
|
2017-08-28 05:12:44 +00:00
|
|
|
}
|
|
|
|
},
|
2017-11-16 09:25:28 +00:00
|
|
|
methods: {
|
|
|
|
handleSetLineChartData(type) {
|
|
|
|
this.lineChartData = lineChartData[type]
|
|
|
|
}
|
2017-08-28 05:12:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
.dashboard-editor-container {
|
2017-12-04 06:28:26 +00:00
|
|
|
padding: 32px;
|
2017-11-16 09:25:28 +00:00
|
|
|
background-color: rgb(240, 242, 245);
|
|
|
|
.chart-wrapper {
|
|
|
|
background: #fff;
|
2017-12-04 06:28:26 +00:00
|
|
|
padding: 16px 16px 0;
|
|
|
|
margin-bottom: 32px;
|
2017-11-16 09:25:28 +00:00
|
|
|
}
|
2017-08-28 05:12:44 +00:00
|
|
|
}
|
|
|
|
</style>
|