From e4900e09f522a4b65dc3f1870d5a821b5a979581 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期一, 09 九月 2024 19:56:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- admin/src/views/index.vue | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue index 38b95a9..a391765 100644 --- a/admin/src/views/index.vue +++ b/admin/src/views/index.vue @@ -1,7 +1,7 @@ <template> <div class="main_home"> <div class="home_header"> - <div class="mb10 fs17">涓嬪崍濂斤紝绯荤粺绠$悊鍛�</div> + <div class="mb10 fs17">涓嬪崍濂斤紝{{ userInfo.realname }}</div> <div class="fs13"> 浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庡洖鍒版櫤鎱х墿娴佸洯鍖哄畨娑堜竴浣撳寲绯荤粺 </div> @@ -225,6 +225,10 @@ import dayjs from 'dayjs' import * as echarts from 'echarts' import { weeks } from '@/utils/config' +import { + getWorkbenchBody, + getWorkbenchHead +} from '@/api' const colors = ['#52a4f7', '#7678f7', '#5fc6d5'] export default { data () { @@ -240,7 +244,13 @@ ] } }, + computed: { + userInfo(){ + return this.$store.state.userInfo + } + }, created () { + this.updateDate() setInterval(() => { this.updateDate() @@ -255,11 +265,20 @@ this.nowWeek = weeks[new Date().getDay()] }, initData () { + this.getWorkBody() //涓讳綋鏁版嵁 + this.getWorkHead() //涓讳綋鏁版嵁 + this.initEchart1() this.initEchart2() this.initEchart3() this.initEchart4() }, + getWorkBody() { + getWorkbenchBody() + }, + getWorkHead() { + getWorkbenchHead() + }, initEchart1 () { const myChart = echarts.init(document.getElementById('echart1')) const option = { -- Gitblit v1.9.3