You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.7 KiB

<template>
<div class="dashboard-container">
<div class="dashboard-editor-container">
<panel-group />
<panel-group-t />
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="12">
<div class="chart-wrapper">
<p>本月成交额</p>
<bar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="12">
<div class="chart-wrapper">
<p>本月订单数</p>
<pie-chart />
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import PanelGroup from './dashboard/PanelGroup'
import PanelGroupT from './dashboard/PanelGroupT'
import LineChart from './dashboard/LineChart'
import PieChart from './dashboard/BarChartT'
import BarChart from './dashboard/BarChart'
import { count } from '@/api/visits'
/**
* 记录访问只有页面刷新或者第一次加载才会记录
*/
count().then(res => {
})
export default {
name: 'Dashboard',
components: {
PanelGroup,
PanelGroupT,
LineChart,
PieChart,
BarChart
},
computed: {
...mapGetters([
'roles'
])
},
created() {
this.open()
},
methods: {
open() {
this.$notify({
title: '公众号演示',
dangerouslyUseHTMLString: true,
message: '<img src="https://image.dayouqiantu.cn/qrcode_for_gh_95df5a2881cc_258.jpg">',
duration: 0
});
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 18px 22px 22px 22px;
background-color: rgb(240, 242, 245);
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
</style>