|
@@ -42,7 +42,6 @@
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<el-button plain size="mini" :disabled="row.childCount | disableNextLevel" @click="handleShowNextLevel(row)">查看子菜单</el-button>
|
|
<el-button plain size="mini" :disabled="row.childCount | disableNextLevel" @click="handleShowNextLevel(row)">查看子菜单</el-button>
|
|
<el-button plain size="mini" @click="handleCreateNextLevel(row)">添加子菜单</el-button>
|
|
<el-button plain size="mini" @click="handleCreateNextLevel(row)">添加子菜单</el-button>
|
|
- <!-- <el-button plain size="mini" @click="handleCreatePermission(row)">添加按钮权限</el-button> -->
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="150" align="center">
|
|
<el-table-column label="操作" width="150" align="center">
|
|
@@ -57,49 +56,16 @@
|
|
|
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
|
|
|
- <!-- <el-dialog title="添加按钮权限" :visible.sync="dialogFormVisible">
|
|
|
|
- <el-form :model="permission">
|
|
|
|
- <el-form-item label="当前菜单:" label-width="150px">
|
|
|
|
- <el-input v-model="menuTitle" readonly />
|
|
|
|
- <input v-model="menuId" type="hidden">
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="权限名称:" label-width="150px">
|
|
|
|
- <el-input v-model="form.name" autocomplete="off" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="submitPermission">确 定</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-dialog> -->
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { fetchList, deleteMenu, updateSelective } from '@/api/sys/menu'
|
|
import { fetchList, deleteMenu, updateSelective } from '@/api/sys/menu'
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
-// const defaultPermission = {
|
|
|
|
-// id: 0,
|
|
|
|
-// name: '',
|
|
|
|
-// desc: '',
|
|
|
|
-// menuId: 0,
|
|
|
|
-// menuTitle: ''
|
|
|
|
-// }
|
|
|
|
export default {
|
|
export default {
|
|
name: 'SysMenuList',
|
|
name: 'SysMenuList',
|
|
components: { Pagination },
|
|
components: { Pagination },
|
|
filters: {
|
|
filters: {
|
|
- iconFilter(value) {
|
|
|
|
- if (!value) {
|
|
|
|
- return ''
|
|
|
|
- }
|
|
|
|
- if (value.substr(0, 7) === 'el-icon') {
|
|
|
|
- return '<i class="' + value + '" />'
|
|
|
|
- } else {
|
|
|
|
- return '<svg-icon :icon-class="' + value + '" />'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
disableNextLevel(value) {
|
|
disableNextLevel(value) {
|
|
if (value === 0) {
|
|
if (value === 0) {
|
|
return true
|
|
return true
|
|
@@ -126,9 +92,6 @@ export default {
|
|
{ label: '启用', key: '0' },
|
|
{ label: '启用', key: '0' },
|
|
{ label: '停用', key: '1' }
|
|
{ label: '停用', key: '1' }
|
|
]
|
|
]
|
|
- // ,
|
|
|
|
- // dialogFormVisible: false,
|
|
|
|
- // permission: Object.assign({}, defaultPermission)
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -189,17 +152,6 @@ export default {
|
|
handleCreateNextLevel(row) {
|
|
handleCreateNextLevel(row) {
|
|
this.$router.push({ path: '/sys/menus/add', query: { parentId: row.id, title: row.title }})
|
|
this.$router.push({ path: '/sys/menus/add', query: { parentId: row.id, title: row.title }})
|
|
},
|
|
},
|
|
- // handleCreatePermission(row) {
|
|
|
|
- // // 添加按钮权限
|
|
|
|
- // this.permission.menuId = row.id
|
|
|
|
- // this.permission.menuTitle = row.title
|
|
|
|
- // this.dialogFormVisible = true
|
|
|
|
- // },
|
|
|
|
- // submitPermission() {
|
|
|
|
- // // 提交菜单权限
|
|
|
|
- // // todo
|
|
|
|
-
|
|
|
|
- // },
|
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
this.$confirm('是否要删除该菜单', '提示', {
|
|
this.$confirm('是否要删除该菜单', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|