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