1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| <template>
| <div v-if="pageLoading">
| <el-main>
| <el-card shadow="never">
| <el-skeleton :rows="1"></el-skeleton>
| </el-card>
| <el-card shadow="never" style="margin-top: 15px;">
| <el-skeleton></el-skeleton>
| </el-card>
| </el-main>
| </div>
| <work v-if="dashboard=='1'" @on-mounted="onMounted"></work>
| <widgets v-else @on-mounted="onMounted"></widgets>
| </template>
|
| <script>
| import { defineAsyncComponent } from 'vue';
| const work = defineAsyncComponent(() => import('./work'));
| const widgets = defineAsyncComponent(() => import('./widgets'));
|
| export default {
| name: "dashboard",
| components: {
| work,
| widgets
| },
| data(){
| return {
| pageLoading: true,
| dashboard: '0'
| }
| },
| created(){
| this.dashboard = this.$TOOL.data.get("USER_INFO").dashboard || '0';
| },
| mounted(){
|
| },
| methods: {
| onMounted(){
| this.pageLoading = false
| }
| }
| }
| </script>
|
| <style>
| </style>
|
|