fix: 修复角色页面跳转bug

This commit is contained in:
lilinyuan
2024-06-01 20:49:27 +08:00
parent d7a4eef7db
commit 9acd05a2cc

View File

@@ -144,9 +144,9 @@ const tableConfig = reactive({
// }
// )
if(authStore.roles.includes('superAdmin')) {
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
} else if(!row.template) {
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
}
return (
<div>
@@ -200,7 +200,7 @@ const formatDataScope = (dataScope) => {
const handleAdd = () => {
router.push({
path: '/system/roleadd',
name: 'Roleadd',
query: {
isAdd: 1
}
@@ -209,7 +209,7 @@ const handleAdd = () => {
const handleEdit = (row) => {
router.push({
path: '/system/roleedit',
name: 'Roleedit',
query: {
id: row.roleId
}
@@ -221,14 +221,14 @@ const handleAssign = (row) => {
}
const handleDel = (row) => {
if (!(row.template && authStore.roles.includes('superAdmin'))) {
ElNotification({
title: '提示',
message: '模版角色只能由超级管理员删除!',
type: 'warning'
})
return
}
// if (!(row.template && authStore.roles.includes('superAdmin'))) {
// ElNotification({
// title: '提示',
// message: '模版角色只能由超级管理员删除!',
// type: 'warning'
// })
// return
// }
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
type: 'warning',