|
|
@@ -1,40 +1,41 @@
|
|
|
<template>
|
|
|
<div class="dashboard-editor-container">
|
|
|
- <github-corner class="github-corner" />
|
|
|
+ <h2>Welcome {{ user.name }}</h2>
|
|
|
+<!-- <github-corner class="github-corner" />-->
|
|
|
|
|
|
- <panel-group @handleSetLineChartData="handleSetLineChartData" />
|
|
|
+<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
|
|
|
|
|
- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
|
|
- <line-chart :chart-data="lineChartData" />
|
|
|
- </el-row>
|
|
|
+<!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">-->
|
|
|
+<!-- <line-chart :chart-data="lineChartData" />-->
|
|
|
+<!-- </el-row>-->
|
|
|
|
|
|
- <el-row :gutter="32">
|
|
|
- <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>
|
|
|
- </el-row>
|
|
|
+<!-- <el-row :gutter="32">-->
|
|
|
+<!-- <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>-->
|
|
|
+<!-- </el-row>-->
|
|
|
|
|
|
- <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;" />
|
|
|
- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
|
|
- <todo-list />
|
|
|
- </el-col>
|
|
|
- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
|
|
- <box-card />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+<!-- <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;" />-->
|
|
|
+<!-- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">-->
|
|
|
+<!-- <todo-list />-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">-->
|
|
|
+<!-- <box-card />-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- </el-row>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -47,6 +48,8 @@ import PieChart from './components/PieChart'
|
|
|
import BarChart from './components/BarChart'
|
|
|
import TodoList from './components/TodoList'
|
|
|
import BoxCard from './components/BoxCard'
|
|
|
+import {mapGetters} from "vuex";
|
|
|
+import usersInfo from "@/utils/usersInfo";
|
|
|
|
|
|
const lineChartData = {
|
|
|
newVisitis: {
|
|
|
@@ -70,24 +73,42 @@ const lineChartData = {
|
|
|
export default {
|
|
|
name: 'DashboardAdmin',
|
|
|
components: {
|
|
|
- GithubCorner,
|
|
|
- PanelGroup,
|
|
|
- LineChart,
|
|
|
- RaddarChart,
|
|
|
- PieChart,
|
|
|
- BarChart,
|
|
|
- TodoList,
|
|
|
- BoxCard
|
|
|
+ // GithubCorner,
|
|
|
+ // PanelGroup,
|
|
|
+ // LineChart,
|
|
|
+ // RaddarChart,
|
|
|
+ // PieChart,
|
|
|
+ // BarChart,
|
|
|
+ // TodoList,
|
|
|
+ // BoxCard,
|
|
|
+ ...mapGetters([
|
|
|
+ 'name',
|
|
|
+ 'avatar',
|
|
|
+ 'roles'
|
|
|
+ ])
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- lineChartData: lineChartData.newVisitis
|
|
|
+ // lineChartData: lineChartData.newVisitis
|
|
|
+ user: {},
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.getUser()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- handleSetLineChartData(type) {
|
|
|
- this.lineChartData = lineChartData[type]
|
|
|
- }
|
|
|
+ // handleSetLineChartData(type) {
|
|
|
+ // this.lineChartData = lineChartData[type]
|
|
|
+ // },
|
|
|
+ getUser() {
|
|
|
+ this.user = {
|
|
|
+ name: usersInfo.adminName(),
|
|
|
+ role: 'admin',
|
|
|
+ email: 'admin@test.com',
|
|
|
+ avatar: this.avatar
|
|
|
+ }
|
|
|
+ console.log(this.user)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|