提示信息,角色删除

master
lzq 2025-08-30 16:01:47 +08:00
parent b8db7db6f2
commit e4b6dc082c
2 changed files with 3 additions and 4 deletions

View File

@ -22,7 +22,7 @@
<IxButton @click="modify(record)"></IxButton>
<IxButton @click="lookup(record)"></IxButton>
<IxButton @click="modify(record)"></IxButton>
<IxPopconfirm :title="'是否删除菜单:【' + record.title + '】?'" placement="top" @ok="del(record)">
<IxPopconfirm :title="'是否删除角色:【' + (record.roleName ?? record.roleCode) + '】?'" placement="top" @ok="del(record)">
<IxButton>删除</IxButton>
</IxPopconfirm>
</IxButtonGroup>
@ -50,7 +50,6 @@ import { useFormGroup } from '@idux/cdk'
import nav from '@/common/router/nav.ts'
import { TreeSelectNode } from '@idux/components/tree-select/src/types'
import Toast from '@/components/toast'
import UserApi from '@/pages/sys/user/user-api.ts'
import RoleApi from '@/pages/sys/role/role-api.ts'
import { useRoleDetailStore } from '@/pages/sys/role/role-detail/role-detail-store.ts'
@ -172,7 +171,7 @@ function pagingChangeHandler() {
function del(...recode: { id: string }[]) {
const toastId = Toast.loading('正在提交')
UserApi.del(recode.map(it => it.id))
RoleApi.del(recode.map(it => it.id))
.then(_ => {
Toast.success('删除成功')
pageList()

View File

@ -21,7 +21,7 @@
<IxButtonGroup :gap="16" mode="link">
<IxButton @click="lookup(record)"></IxButton>
<IxButton @click="modify(record)"></IxButton>
<IxPopconfirm :title="'是否删除菜单:【' + record.title + '】?'" placement="top" @ok="del(record)">
<IxPopconfirm :title="'是否删除用户:【' + (record.nickname ?? record.username )+ '】?'" placement="top" @ok="del(record)">
<IxButton>删除</IxButton>
</IxPopconfirm>
</IxButtonGroup>