From a1647a5152e3d368ec2fb738ca7cc858e220d06c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 24 九月 2024 09:15:08 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
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