|
@@ -93,8 +93,8 @@ const message = useMessage() // 消息弹窗
|
|
|
// 列表相关的变量
|
|
|
const [registerTable, { reload, deleteData, exportList }] = useXTable({
|
|
|
allSchemas: allSchemas,
|
|
|
- getListApi: ConfigApi.getConfigPage,
|
|
|
- deleteApi: ConfigApi.deleteConfig,
|
|
|
+ getListApi: ConfigApi.getConfigPageApi,
|
|
|
+ deleteApi: ConfigApi.deleteConfigApi,
|
|
|
exportListApi: ConfigApi.exportConfigApi
|
|
|
})
|
|
|
|
|
@@ -117,7 +117,6 @@ const setDialogTile = (type: string) => {
|
|
|
const handleCreate = async () => {
|
|
|
setDialogTile('create')
|
|
|
await nextTick()
|
|
|
- console.log(allSchemas.formSchema, 'allSchemas.formSchema')
|
|
|
if (allSchemas.formSchema[2].field !== 'key') {
|
|
|
unref(formRef)?.addSchema(
|
|
|
{
|
|
@@ -134,7 +133,7 @@ const handleCreate = async () => {
|
|
|
const handleUpdate = async (rowId: number) => {
|
|
|
setDialogTile('update')
|
|
|
// 设置数据
|
|
|
- const res = await ConfigApi.getConfig(rowId)
|
|
|
+ const res = await ConfigApi.getConfigApi(rowId)
|
|
|
unref(formRef)?.delSchema('key')
|
|
|
unref(formRef)?.setValues(res)
|
|
|
}
|
|
@@ -142,7 +141,7 @@ const handleUpdate = async (rowId: number) => {
|
|
|
// 详情操作
|
|
|
const handleDetail = async (rowId: number) => {
|
|
|
setDialogTile('detail')
|
|
|
- const res = await ConfigApi.getConfig(rowId)
|
|
|
+ const res = await ConfigApi.getConfigApi(rowId)
|
|
|
detailData.value = res
|
|
|
}
|
|
|
|
|
@@ -157,10 +156,10 @@ const submitForm = async () => {
|
|
|
try {
|
|
|
const data = unref(formRef)?.formModel as ConfigApi.ConfigVO
|
|
|
if (actionType.value === 'create') {
|
|
|
- await ConfigApi.createConfig(data)
|
|
|
+ await ConfigApi.createConfigApi(data)
|
|
|
message.success(t('common.createSuccess'))
|
|
|
} else {
|
|
|
- await ConfigApi.updateConfig(data)
|
|
|
+ await ConfigApi.updateConfigApi(data)
|
|
|
message.success(t('common.updateSuccess'))
|
|
|
}
|
|
|
dialogVisible.value = false
|