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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
| <template>
| <view class="work">
| <template v-for="(item, index) in gridList" :key="index">
| <wd-card :title="item.title">
| <wd-grid clickable :column="4">
| <wd-grid-item
| v-for="(child, index) in item.children"
| :key="index"
| :v-has-perm="child.prem"
| use-slot
| link-type="navigateTo"
| :url="child.url"
| >
| <view class="p-2">
| <image class="w-72rpx h-72rpx rounded-8rpx" :src="child.icon" />
| </view>
| <view class="text">{{ child.title }}</view>
| </wd-grid-item>
| </wd-grid>
| </wd-card>
| </template>
| </view>
| </template>
|
| <script lang="ts" setup>
| const gridList = reactive([
| {
| title: "系统管理",
| children: [
| {
| icon: "/static/icons/user.png",
| title: "用户管理",
| url: "/pages/work/user/index",
| prem: "sys:user:query",
| },
| {
| icon: "/static/icons/role.png",
| title: "角色管理",
| url: "/pages/work/role/index",
| prem: "sys:role:query",
| },
|
| {
| icon: "/static/icons/notice.png",
| title: "通知公告",
| url: "/pages/work/notice/index",
| prem: "sys:notice:query",
| },
| {
| icon: "/static/icons/setting.png",
| title: "系统配置",
| url: "/pages/work/config/index",
| prem: "sys:config:query",
| },
| ],
| },
| {
| title: "系统监控",
| children: [
| {
| icon: "/static/icons/log.png",
| title: "系统日志",
| url: "/pages/work/log/index",
| prem: "sys:log:query",
| },
| ],
| },
| ]);
| </script>
|
| <style lang="scss" scoped>
| /* stylelint-disable selector-type-no-unknown */
| page {
| background: #f8f8f8;
| }
| /* stylelint-enable selector-type-no-unknown */
|
| .work {
| padding: 40rpx 0;
| }
| </style>
|
|