mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-06 23:25:06 +08:00
fix
This commit is contained in:
@ -83,10 +83,10 @@ const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
const xGrid = ref<VxeGridInstance>() // grid Ref
|
||||
const { gridOptions, reloadList, delList } = useVxeGrid<ErrorCodeApi.ErrorCodeVO>({
|
||||
const { gridOptions, reloadList, deleteData } = useVxeGrid<ErrorCodeApi.ErrorCodeVO>({
|
||||
allSchemas: allSchemas,
|
||||
getListApi: ErrorCodeApi.getErrorCodePageApi,
|
||||
delListApi: ErrorCodeApi.deleteErrorCodeApi
|
||||
deleteApi: ErrorCodeApi.deleteErrorCodeApi
|
||||
})
|
||||
// 弹窗相关的变量
|
||||
const dialogVisible = ref(false) // 是否显示弹出层
|
||||
@ -110,23 +110,23 @@ const handleCreate = () => {
|
||||
|
||||
// 修改操作
|
||||
const handleUpdate = async (rowId: number) => {
|
||||
setDialogTile('update')
|
||||
// 设置数据
|
||||
const res = await ErrorCodeApi.getErrorCodeApi(rowId)
|
||||
unref(formRef)?.setValues(res)
|
||||
setDialogTile('update')
|
||||
}
|
||||
|
||||
// 详情操作
|
||||
const handleDetail = async (rowId: number) => {
|
||||
setDialogTile('detail')
|
||||
// 设置数据
|
||||
const res = await ErrorCodeApi.getErrorCodeApi(rowId)
|
||||
detailRef.value = res
|
||||
setDialogTile('detail')
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (rowId: number) => {
|
||||
delList(xGrid, rowId)
|
||||
await deleteData(xGrid, rowId)
|
||||
}
|
||||
|
||||
// 提交新增/修改的表单
|
||||
@ -150,7 +150,7 @@ const submitForm = async () => {
|
||||
} finally {
|
||||
actionLoading.value = false
|
||||
// 刷新列表
|
||||
reloadList(xGrid)
|
||||
await reloadList(xGrid)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user