控制台根据角色配置
This commit is contained in:
parent
4151455e0e
commit
6210499d60
|
|
@ -1,84 +1,31 @@
|
||||||
<template>
|
<template>
|
||||||
<el-main>
|
<work v-if="dashboard=='1'"></work>
|
||||||
<el-row :gutter="15">
|
<stats v-else></stats>
|
||||||
<el-col :span="24">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<div class="welTop">
|
|
||||||
<div class="icon">
|
|
||||||
<el-avatar :size="60" src="img/avatar.jpg"></el-avatar>
|
|
||||||
</div>
|
|
||||||
<div class="main">
|
|
||||||
<h2>嗨~ admin,忙碌了一上午,记得吃午饭哦。</h2>
|
|
||||||
<p>最近更新:动态面包屑,外部链接,Iframe链接等</p>
|
|
||||||
</div>
|
|
||||||
<div class="icons hidden-sm-and-down">
|
|
||||||
<div class="avatar-list">
|
|
||||||
<el-tooltip content="Sakuya" placement="top">
|
|
||||||
<el-avatar class="avatar" :size="30" src="img/avatar.jpg"></el-avatar>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="Lolowan" placement="top">
|
|
||||||
<el-avatar class="avatar" :size="30" src="img/avatar2.gif"></el-avatar>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="Ali" placement="top">
|
|
||||||
<el-avatar class="avatar" :size="30" src="img/avatar3.gif"></el-avatar>
|
|
||||||
</el-tooltip>
|
|
||||||
</div>
|
|
||||||
<p>Participants</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-card shadow="never" header="当前用户权限">
|
|
||||||
<el-tag v-if="$HAS('user.add')">user.add</el-tag>
|
|
||||||
<el-tag v-if="$HAS('user.edit')">user.edit</el-tag>
|
|
||||||
<el-tag v-if="$HAS('user.delete')">user.delete</el-tag>
|
|
||||||
<el-tag v-if="$HAS('list.add')">list.add</el-tag>
|
|
||||||
<el-tag v-if="$HAS('list.edit')">list.edit</el-tag>
|
|
||||||
<el-tag v-if="$HAS('list.delete')">list.delete</el-tag>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<gridLayout></gridLayout>
|
|
||||||
|
|
||||||
</el-main>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import gridLayout from './gridLayout'
|
import { defineAsyncComponent } from 'vue';
|
||||||
|
const stats = defineAsyncComponent(() => import('./stats'));
|
||||||
|
const work = defineAsyncComponent(() => import('./work'));
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "dashboard",
|
|
||||||
components: {
|
components: {
|
||||||
gridLayout
|
stats,
|
||||||
|
work
|
||||||
},
|
},
|
||||||
data() {
|
data(){
|
||||||
return {}
|
return {
|
||||||
|
dashboard: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
this.dashboard = this.$TOOL.data.get("user").dashboard;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style>
|
||||||
.el-row {margin-bottom:15px;}
|
|
||||||
.el-tag+.el-tag {margin-left: 10px;}
|
|
||||||
|
|
||||||
|
|
||||||
.welTop {display: flex;}
|
|
||||||
.welTop .main {margin-left:20px;}
|
|
||||||
.welTop .main h2 {font-size: 20px;color: #3c4a54;}
|
|
||||||
.welTop .main p {color: #999;margin-top:10px;line-height: 1.8;}
|
|
||||||
.welTop .icons {margin-left:auto;text-align: center;}
|
|
||||||
.welTop .icons p {font-size: 12px;}
|
|
||||||
.avatar-list .avatar {margin-left: -10px;border: 3px solid #fff;cursor: pointer;}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
<template>
|
||||||
|
<el-main>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div class="welTop">
|
||||||
|
<div class="icon">
|
||||||
|
<el-avatar :size="60" src="img/avatar.jpg"></el-avatar>
|
||||||
|
</div>
|
||||||
|
<div class="main">
|
||||||
|
<h2>嗨~ admin,忙碌了一上午,记得吃午饭哦。</h2>
|
||||||
|
<p>最近更新:动态面包屑,外部链接,Iframe链接等</p>
|
||||||
|
</div>
|
||||||
|
<div class="icons hidden-sm-and-down">
|
||||||
|
<div class="avatar-list">
|
||||||
|
<el-tooltip content="Sakuya" placement="top">
|
||||||
|
<el-avatar class="avatar" :size="30" src="img/avatar.jpg"></el-avatar>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="Lolowan" placement="top">
|
||||||
|
<el-avatar class="avatar" :size="30" src="img/avatar2.gif"></el-avatar>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="Ali" placement="top">
|
||||||
|
<el-avatar class="avatar" :size="30" src="img/avatar3.gif"></el-avatar>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<p>Participants</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card shadow="never" header="当前用户权限">
|
||||||
|
<el-tag v-if="$HAS('user.add')">user.add</el-tag>
|
||||||
|
<el-tag v-if="$HAS('user.edit')">user.edit</el-tag>
|
||||||
|
<el-tag v-if="$HAS('user.delete')">user.delete</el-tag>
|
||||||
|
<el-tag v-if="$HAS('list.add')">list.add</el-tag>
|
||||||
|
<el-tag v-if="$HAS('list.edit')">list.edit</el-tag>
|
||||||
|
<el-tag v-if="$HAS('list.delete')">list.delete</el-tag>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<gridLayout></gridLayout>
|
||||||
|
|
||||||
|
</el-main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import gridLayout from './gridLayout'
|
||||||
|
export default {
|
||||||
|
name: "dashboard",
|
||||||
|
components: {
|
||||||
|
gridLayout
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-row {margin-bottom:15px;}
|
||||||
|
.el-tag+.el-tag {margin-left: 10px;}
|
||||||
|
|
||||||
|
|
||||||
|
.welTop {display: flex;}
|
||||||
|
.welTop .main {margin-left:20px;}
|
||||||
|
.welTop .main h2 {font-size: 20px;color: #3c4a54;}
|
||||||
|
.welTop .main p {color: #999;margin-top:10px;line-height: 1.8;}
|
||||||
|
.welTop .icons {margin-left:auto;text-align: center;}
|
||||||
|
.welTop .icons p {font-size: 12px;}
|
||||||
|
.avatar-list .avatar {margin-left: -10px;border: 3px solid #fff;cursor: pointer;}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<template>
|
||||||
|
work
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
@ -15,6 +15,16 @@
|
||||||
<el-tree ref="type" node-key="name" :data="type.list" :default-checked-keys="type.checked" :props="type.props" show-checkbox></el-tree>
|
<el-tree ref="type" node-key="name" :data="type.list" :default-checked-keys="type.checked" :props="type.props" show-checkbox></el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="控制台">
|
||||||
|
<el-form label-width="100px" label-position="left">
|
||||||
|
<el-form-item label="控制台视图">
|
||||||
|
<el-select v-model="dashboard" placeholder="请选择">
|
||||||
|
<el-option v-for="item in dashboardOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<div class="el-form-item-msg">用于控制角色登录后控制台的视图</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -40,7 +50,18 @@
|
||||||
list: [],
|
list: [],
|
||||||
checked: [],
|
checked: [],
|
||||||
props: {}
|
props: {}
|
||||||
}
|
},
|
||||||
|
dashboard: "0",
|
||||||
|
dashboardOptions: [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '数据统计'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '工作台'
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue