| | |
| | | <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> |
| | |
| | | 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 () { |
| | |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | userInfo(){ |
| | | return this.$store.state.userInfo |
| | | } |
| | | }, |
| | | created () { |
| | | |
| | | this.updateDate() |
| | | setInterval(() => { |
| | | this.updateDate() |
| | |
| | | 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 = { |