Skip to content

Commit

Permalink
feat: 完善仪表盘快捷操作区块内容
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Sep 7, 2023
1 parent 13d2aff commit 0178fbb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@
:header-style="{ paddingBottom: '0' }"
:body-style="{ padding: '24px 20px 0 20px' }"
>
<template #extra>
<a-link>{{ $t('workplace.quickOperation.setup') }}</a-link>
</template>
<a-row :gutter="8">
<a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
<div class="icon">
<component :is="link.icon" />
<div @click="router.replace({ path: link.path })">
<div class="icon">
<svg-icon :icon-class="link.icon" />
</div>
<a-typography-paragraph class="text">
{{ link.text }}
</a-typography-paragraph>
</div>
<a-typography-paragraph class="text">
{{ $t(link.text) }}
</a-typography-paragraph>
</a-col>
</a-row>
<a-divider class="split-line" style="margin: 0" />
</a-card>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const links = [
{ text: 'workplace.contentManagement', icon: 'icon-file' },
{ text: 'workplace.contentStatistical', icon: 'icon-storage' },
{ text: 'workplace.advanced', icon: 'icon-settings' },
{ text: 'workplace.onlinePromotion', icon: 'icon-mobile' },
{ text: 'workplace.contentPutIn', icon: 'icon-fire' },
{ text: '用户管理', icon: 'user', path: '/system/user' },
{ text: '角色管理', icon: 'safe', path: '/system/role' },
{ text: '部门管理', icon: 'user-group', path: '/system/dept' },
{ text: '代码生成', icon: 'code', path: '/tool/generator' },
{ text: '在线用户', icon: 'anonymity', path: '/monitor/online' },
{ text: '操作日志', icon: 'history', path: '/monitor/log/operation' },
];
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,28 @@
<div style="margin-bottom: -1rem">
<a-row :gutter="8">
<a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
<div class="icon">
<component :is="link.icon" />
<div @click="router.replace({ path: link.path })">
<div class="icon">
<svg-icon :icon-class="link.icon" />
</div>
<a-typography-paragraph class="text">
{{ link.text }}
</a-typography-paragraph>
</div>
<a-typography-paragraph class="text">
{{ $t(link.text) }}
</a-typography-paragraph>
</a-col>
</a-row>
</div>
</a-card>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const links = [
{
text: 'workplace.contentManagement',
icon: 'icon-storage',
},
{
text: 'workplace.contentStatistical',
icon: 'icon-file',
},
{
text: 'workplace.advanced',
icon: 'icon-settings',
},
{ text: '在线用户', icon: 'anonymity', path: '/monitor/online' },
{ text: '代码生成', icon: 'code', path: '/tool/generator' },
{ text: '角色管理', icon: 'safe', path: '/system/role' },
];
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ export default {
'workplace.docs.userGuide': 'User Guide',
'workplace.docs.faq': 'FAQ',
'workplace.docs.changelog': 'Change Log',
//
'workplace.contentManagement': 'Content Management',
'workplace.contentStatistical': 'Content Statistical',
'workplace.advanced': 'Advanced',
'workplace.onlinePromotion': 'Online Promotion',
'workplace.contentPutIn': 'Put In',
'workplace.announcement': 'Announcement',
'workplace.recently.visited': 'Recently Visited',
'workplace.record.nodata': 'No data',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export default {
'workplace.docs.userGuide': '使用指南',
'workplace.docs.faq': '常见问题',
'workplace.docs.changelog': '更新日志',
'workplace.contentManagement': '内容管理',
'workplace.contentStatistical': '内容分析',
'workplace.advanced': '高级管理',
'workplace.onlinePromotion': '线上推广',
'workplace.contentPutIn': '内容投放',
'workplace.announcement': '公告',
'workplace.recently.visited': '最近访问',
'workplace.record.nodata': '暂无数据',
Expand Down

0 comments on commit 0178fbb

Please sign in to comment.