feat:首页新增常用功能模块
This commit is contained in:
parent
78fed5ce17
commit
bc588890bb
48
src/views/components/CommonMenu/index.vue
Normal file
48
src/views/components/CommonMenu/index.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="tool-wrap">
|
||||
<template v-for="item in menuList">
|
||||
<div class="tool-item" v-if="checkPermi(item)">
|
||||
<router-link :to="item.path">
|
||||
<svg-icon :name="item.name" class-name="card-panel-icon mb10" :color="item.color" />
|
||||
<div>{{ item.title }}</div>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const menuList = ref([
|
||||
{ path: '/tool/gen', title: '代码生成', color: '#40c9c6', name: 'code', permi: ['tool:gen:list'] },
|
||||
{ path: '/tool/file', title: '文件存储', color: '#6A5ACD', name: 'upload', permi: ['tool:file:list'] },
|
||||
// // { path: '/system/user', title: '角色管理', color: '#7FFF00', name: 'peoples' },
|
||||
{ path: '/system/dict', title: '字典管理', color: '#B0E0E6', name: 'dict', permi: ['system:dict:list'] },
|
||||
{ path: '/monitor/job', title: '定时任务', color: '#D2691E', name: 'job', permi: ['monitor:job:list'] }
|
||||
])
|
||||
|
||||
function checkPermi(v) {
|
||||
if (v && v.permi) {
|
||||
return proxy.$auth.hasPermiOr(v.permi)
|
||||
}
|
||||
return true
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tool-wrap {
|
||||
display: flex;
|
||||
|
||||
.tool-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
width: 110px;
|
||||
|
||||
.card-panel-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -84,6 +84,18 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="15">
|
||||
<el-col :md="24" :lg="24" :xl="24" class="mb10">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<span>常用功能</span>
|
||||
</template>
|
||||
|
||||
<CommonMenu></CommonMenu>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
||||
|
||||
<el-row :gutter="32">
|
||||
@ -128,6 +140,7 @@ import RaddarChart from './dashboard/RaddarChart'
|
||||
import PieChart from './dashboard/PieChart'
|
||||
import BarChart from './dashboard/BarChart'
|
||||
import WordCloudChat from './dashboard/WordCloud.vue'
|
||||
import CommonMenu from './components/CommonMenu'
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user