提交 | 用户 | 时间
|
314507
|
1 |
<template> |
8e4ab7
|
2 |
<div> |
H |
3 |
<h1>这里是主页</h1> |
|
4 |
</div> |
|
5 |
<!-- <div>--> |
|
6 |
<!-- <h1>应用列表</h1>--> |
|
7 |
<!-- </div>--> |
|
8 |
<!-- <el-skeleton :loading="loading" animated>--> |
|
9 |
<!-- <div id="app" v-for="(item, index) in appList" :key="`dynamics-${index}`">--> |
|
10 |
<!-- <div class="card" @click="gotoApp(item)">--> |
|
11 |
<!-- <img :src="item.icon" style="width: 100px; height: 100px" />--> |
|
12 |
<!-- <div>--> |
|
13 |
<!-- {{item.appName}}--> |
|
14 |
<!-- </div>--> |
|
15 |
<!-- </div>--> |
|
16 |
<!-- </div>--> |
|
17 |
<!-- </el-skeleton>--> |
|
18 |
|
314507
|
19 |
</template> |
H |
20 |
<script lang="ts" setup> |
8e4ab7
|
21 |
|
H |
22 |
import * as AppApi from '@/api/system/app' |
|
23 |
import {Apps} from "@/views/Home/types"; |
|
24 |
import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; |
314507
|
25 |
|
H |
26 |
|
|
27 |
defineOptions({ name: 'Home' }) |
|
28 |
|
8e4ab7
|
29 |
const { wsCache } = useCache() |
H |
30 |
|
|
31 |
const loading = ref(true) |
|
32 |
|
|
33 |
// let appList = reactive<Apps[]>([]) |
|
34 |
// |
|
35 |
// const getAppList = async () => { |
|
36 |
// const data = await AppApi.getAppList() |
|
37 |
// appList = Object.assign(appList, data) |
|
38 |
// } |
|
39 |
// |
|
40 |
// const getAppMenuList = async (id) => { |
|
41 |
// const data = await AppApi.getAppMenuList(id) |
|
42 |
// let userInfo = wsCache.get(CACHE_KEY.USER) |
|
43 |
// let routers = wsCache.get(CACHE_KEY.ROLE_ROUTERS) |
|
44 |
// console.log(userInfo) |
|
45 |
// console.log(routers) |
|
46 |
// userInfo.menus = data |
|
47 |
// wsCache.set(CACHE_KEY.USER, userInfo) |
|
48 |
// wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
|
49 |
// window.location.href = '/energy/index' |
|
50 |
// } |
|
51 |
// |
|
52 |
// const getAllApi = async () => { |
|
53 |
// await Promise.all([ |
|
54 |
// getAppList() |
|
55 |
// ]) |
|
56 |
// loading.value = false |
|
57 |
// } |
|
58 |
// |
|
59 |
// // getAllApi() |
|
60 |
// |
|
61 |
// // 进入应用 |
|
62 |
// const gotoApp = async (item) => { |
|
63 |
// let id = item.id |
|
64 |
// getAppMenuList(id) |
|
65 |
// } |
314507
|
66 |
|
H |
67 |
</script> |
8e4ab7
|
68 |
|
H |
69 |
<style lang="scss" scoped> |
|
70 |
#app{ |
|
71 |
width: 300px; |
|
72 |
height: 200px; |
|
73 |
display: inline-block; |
|
74 |
background: transparent; |
|
75 |
} |
|
76 |
.card{ |
|
77 |
border: thin dashed gainsboro; |
|
78 |
width: 150px; |
|
79 |
height: 100px; |
|
80 |
padding: 30px; |
|
81 |
text-align: center; |
|
82 |
justify-content: center; |
|
83 |
font-size: 15px; |
|
84 |
font-weight: bolder; |
|
85 |
color: blue; |
|
86 |
background: aliceblue; |
|
87 |
border-radius: 10px; |
|
88 |
} |
|
89 |
</style> |