修改接口
parent
9a19ae9332
commit
865e09f2f2
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue