修改接口

pull/74/MERGE^2
gexinzhineng/gxzn27 2023-03-31 16:04:20 +08:00
parent 9a19ae9332
commit 865e09f2f2
1 changed files with 6 additions and 6 deletions

View File

@ -93,8 +93,8 @@ const message = useMessage() // 消息弹窗
// //
const [registerTable, { reload, deleteData, exportList }] = useXTable({ const [registerTable, { reload, deleteData, exportList }] = useXTable({
allSchemas: allSchemas, allSchemas: allSchemas,
getListApi: ConfigApi.getConfigPageApi, getListApi: ConfigApi.getConfigPage,
deleteApi: ConfigApi.deleteConfigApi, deleteApi: ConfigApi.deleteConfig,
exportListApi: ConfigApi.exportConfigApi exportListApi: ConfigApi.exportConfigApi
}) })
@ -134,7 +134,7 @@ const handleCreate = async () => {
const handleUpdate = async (rowId: number) => { const handleUpdate = async (rowId: number) => {
setDialogTile('update') setDialogTile('update')
// //
const res = await ConfigApi.getConfigApi(rowId) const res = await ConfigApi.getConfig(rowId)
unref(formRef)?.delSchema('key') unref(formRef)?.delSchema('key')
unref(formRef)?.setValues(res) unref(formRef)?.setValues(res)
} }
@ -142,7 +142,7 @@ const handleUpdate = async (rowId: number) => {
// //
const handleDetail = async (rowId: number) => { const handleDetail = async (rowId: number) => {
setDialogTile('detail') setDialogTile('detail')
const res = await ConfigApi.getConfigApi(rowId) const res = await ConfigApi.getConfig(rowId)
detailData.value = res detailData.value = res
} }
@ -157,10 +157,10 @@ const submitForm = async () => {
try { try {
const data = unref(formRef)?.formModel as ConfigApi.ConfigVO const data = unref(formRef)?.formModel as ConfigApi.ConfigVO
if (actionType.value === 'create') { if (actionType.value === 'create') {
await ConfigApi.createConfigApi(data) await ConfigApi.createConfig(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await ConfigApi.updateConfigApi(data) await ConfigApi.updateConfig(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
dialogVisible.value = false dialogVisible.value = false