|
@@ -2,14 +2,13 @@
|
|
|
<div class="menu-management-container">
|
|
<div class="menu-management-container">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :lg="4" :md="8" :sm="24" :xl="4" :xs="24">
|
|
<el-col :lg="4" :md="8" :sm="24" :xl="4" :xs="24">
|
|
|
- <el-card shadow="hover">
|
|
|
|
|
|
|
+ <el-card shadow="hover" class="menu-left">
|
|
|
<el-tree
|
|
<el-tree
|
|
|
:data="data"
|
|
:data="data"
|
|
|
:default-expanded-keys="['root']"
|
|
:default-expanded-keys="['root']"
|
|
|
node-key="id"
|
|
node-key="id"
|
|
|
:props="defaultProps"
|
|
:props="defaultProps"
|
|
|
- @node-click="handleNodeClick"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @node-click="handleNodeClick" />
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :lg="20" :md="16" :sm="24" :xl="20" :xs="24">
|
|
<el-col :lg="20" :md="16" :sm="24" :xl="20" :xs="24">
|
|
@@ -19,8 +18,7 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- @click="handleEdit('')"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="handleEdit('')">
|
|
|
添加
|
|
添加
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</vab-query-form-top-panel>
|
|
</vab-query-form-top-panel>
|
|
@@ -28,16 +26,15 @@
|
|
|
<el-table
|
|
<el-table
|
|
|
v-loading="listLoading"
|
|
v-loading="listLoading"
|
|
|
border
|
|
border
|
|
|
|
|
+ :height="$noPagingTableHeight(1)"
|
|
|
:data="list"
|
|
:data="list"
|
|
|
default-expand-all
|
|
default-expand-all
|
|
|
row-key="path"
|
|
row-key="path"
|
|
|
- :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="标题"
|
|
label="标题"
|
|
|
prop="meta.title"
|
|
prop="meta.title"
|
|
|
- show-overflow-tooltip
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
<el-table-column label="name" prop="name" show-overflow-tooltip />
|
|
<el-table-column label="name" prop="name" show-overflow-tooltip />
|
|
|
<el-table-column label="路径" prop="path" show-overflow-tooltip />
|
|
<el-table-column label="路径" prop="path" show-overflow-tooltip />
|
|
|
<el-table-column label="是否隐藏" show-overflow-tooltip>
|
|
<el-table-column label="是否隐藏" show-overflow-tooltip>
|
|
@@ -48,8 +45,7 @@
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="是否隐藏当前节点"
|
|
label="是否隐藏当前节点"
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
- width="100"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ width="100">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ row.meta.levelHidden ? '是' : '否' }}
|
|
{{ row.meta.levelHidden ? '是' : '否' }}
|
|
|
</template>
|
|
</template>
|
|
@@ -57,8 +53,7 @@
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="vue文件路径"
|
|
label="vue文件路径"
|
|
|
prop="component"
|
|
prop="component"
|
|
|
- show-overflow-tooltip
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ show-overflow-tooltip />
|
|
|
<el-table-column label="重定向" show-overflow-tooltip>
|
|
<el-table-column label="重定向" show-overflow-tooltip>
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ row.redirect ? row.redirect : '无' }}
|
|
{{ row.redirect ? row.redirect : '无' }}
|
|
@@ -68,8 +63,7 @@
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<vab-icon
|
|
<vab-icon
|
|
|
v-if="row.meta && row.meta.icon"
|
|
v-if="row.meta && row.meta.icon"
|
|
|
- :icon="row.meta.icon"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :icon="row.meta.icon" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="是否固定" show-overflow-tooltip>
|
|
<el-table-column label="是否固定" show-overflow-tooltip>
|
|
@@ -80,8 +74,7 @@
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="是否无缓存"
|
|
label="是否无缓存"
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
- width="120"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ width="120">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ row.meta && row.meta.noKeepAlive ? '是' : '否' }}
|
|
{{ row.meta && row.meta.noKeepAlive ? '是' : '否' }}
|
|
|
</template>
|
|
</template>
|
|
@@ -91,8 +84,7 @@
|
|
|
<el-tag
|
|
<el-tag
|
|
|
v-if="row.meta && row.meta.badge"
|
|
v-if="row.meta && row.meta.badge"
|
|
|
effect="dark"
|
|
effect="dark"
|
|
|
- type="danger"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ type="danger">
|
|
|
{{ row.meta.badge }}
|
|
{{ row.meta.badge }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</template>
|
|
</template>
|
|
@@ -102,7 +94,11 @@
|
|
|
{{ row.meta && row.meta.dot ? '是' : '否' }}
|
|
{{ row.meta && row.meta.dot ? '是' : '否' }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" show-overflow-tooltip width="185">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="操作"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ width="185"
|
|
|
|
|
+ fixed="right">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-button type="primary" @click="handleEdit(row)">
|
|
<el-button type="primary" @click="handleEdit(row)">
|
|
|
<vab-icon icon="edit-2-line" />
|
|
<vab-icon icon="edit-2-line" />
|
|
@@ -117,8 +113,7 @@
|
|
|
<template #empty>
|
|
<template #empty>
|
|
|
<el-image
|
|
<el-image
|
|
|
class="vab-data-empty"
|
|
class="vab-data-empty"
|
|
|
- :src="require('@/assets/empty_images/data_empty.png')"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :src="require('@/assets/empty_images/data_empty.png')" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -131,10 +126,10 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { getList } from '@/api/router'
|
|
import { getList } from '@/api/router'
|
|
|
import { doDelete, getTree } from '@/api/menuManagement'
|
|
import { doDelete, getTree } from '@/api/menuManagement'
|
|
|
- import Edit from './components/MenuManagementEdit'
|
|
|
|
|
|
|
+ import Edit from './components/MenuEdit'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- name: 'MenuManagement',
|
|
|
|
|
|
|
+ name: 'Menu',
|
|
|
components: { Edit },
|
|
components: { Edit },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -192,4 +187,7 @@
|
|
|
padding: 0 !important;
|
|
padding: 0 !important;
|
|
|
background: $base-color-background !important;
|
|
background: $base-color-background !important;
|
|
|
}
|
|
}
|
|
|
|
|
+ .menu-left {
|
|
|
|
|
+ height: calc(100vh - 213px);
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|