fix
This commit is contained in:
@@ -174,10 +174,10 @@ const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
const xGrid = ref<VxeGridInstance>() // 列表 Grid Ref
|
||||
const { gridOptions, reloadList, delList } = useVxeGrid<RoleApi.RoleVO>({
|
||||
const { gridOptions, reloadList, deleteData } = useVxeGrid<RoleApi.RoleVO>({
|
||||
allSchemas: allSchemas,
|
||||
getListApi: RoleApi.getRolePageApi,
|
||||
delListApi: RoleApi.deleteRoleApi
|
||||
deleteApi: RoleApi.deleteRoleApi
|
||||
})
|
||||
|
||||
// ========== CRUD 相关 ==========
|
||||
@@ -202,15 +202,23 @@ const handleCreate = () => {
|
||||
|
||||
// 修改操作
|
||||
const handleUpdate = async (rowId: number) => {
|
||||
setDialogTile('update')
|
||||
// 设置数据
|
||||
const res = await RoleApi.getRoleApi(rowId)
|
||||
unref(formRef)?.setValues(res)
|
||||
setDialogTile('update')
|
||||
}
|
||||
|
||||
// 详情操作
|
||||
const handleDetail = async (rowId: number) => {
|
||||
// 设置数据
|
||||
const res = await RoleApi.getRoleApi(rowId)
|
||||
detailRef.value = res
|
||||
setDialogTile('detail')
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (rowId: number) => {
|
||||
await delList(xGrid, rowId)
|
||||
await deleteData(xGrid, rowId)
|
||||
}
|
||||
|
||||
// 提交按钮
|
||||
@@ -234,20 +242,12 @@ const submitForm = async () => {
|
||||
} finally {
|
||||
actionLoading.value = false
|
||||
// 刷新列表
|
||||
reloadList(xGrid)
|
||||
await reloadList(xGrid)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 详情操作
|
||||
const handleDetail = async (rowId: number) => {
|
||||
setDialogTile('detail')
|
||||
// 设置数据
|
||||
const res = await RoleApi.getRoleApi(rowId)
|
||||
detailRef.value = res
|
||||
}
|
||||
|
||||
// ========== 数据权限 ==========
|
||||
const dataScopeForm = reactive({
|
||||
id: 0,
|
||||
|
Reference in New Issue
Block a user