接口修改

This commit is contained in:
gexinzhineng/gxzn27 2023-04-03 18:02:31 +08:00
parent f1e801e9ad
commit a5fedfe15b
3 changed files with 10 additions and 10 deletions

View File

@ -79,10 +79,10 @@ const submitForm = async () => {
data.conf = encodeConf(designer) //
data.fields = encodeFields(designer) //
if (!data.id) {
await FormApi.createForm(data)
await FormApi.createFormApi(data)
message.success(t('common.createSuccess'))
} else {
await FormApi.updateForm(data)
await FormApi.updateFormApi(data)
message.success(t('common.updateSuccess'))
}
modelVisible.value = false
@ -99,7 +99,7 @@ onMounted(async () => {
return
}
//
const data = await FormApi.getForm(id)
const data = await FormApi.getFormApi(id)
formData.value = data
setConfAndFields(designer, data.conf, data.fields)
})

View File

@ -162,13 +162,13 @@ const open = async (type: string, id?: number) => {
if (id) {
formLoading.value = true
try {
formData.value = await ModelApi.getModel(id)
formData.value = await ModelApi.getModelApi(id)
} finally {
formLoading.value = false
}
}
//
formList.value = await FormApi.getSimpleFormList()
formList.value = await FormApi.getSimpleFormsApi()
}
defineExpose({ open }) // open
@ -184,7 +184,7 @@ const submitForm = async () => {
try {
const data = formData.value as unknown as ModelApi.ModelVO
if (formType.value === 'create') {
await ModelApi.createModel(data)
await ModelApi.createModelApi(data)
//
await ElMessageBox.alert(
'<strong>新建模型成功!</strong>后续需要执行如下 4 个步骤:' +
@ -200,7 +200,7 @@ const submitForm = async () => {
}
)
} else {
await ModelApi.updateModel(data)
await ModelApi.updateModelApi(data)
message.success(t('common.updateSuccess'))
}
modelVisible.value = false

View File

@ -62,10 +62,10 @@ const save = async (bpmnXml) => {
} as unknown as ModelApi.ModelVO
//
if (data.id) {
await ModelApi.updateModel(data)
await ModelApi.updateModelApi(data)
message.success('修改成功')
} else {
await ModelApi.createModel(data)
await ModelApi.createModelApi(data)
message.success('新增成功')
}
//
@ -85,7 +85,7 @@ onMounted(async () => {
return
}
//
const data = await ModelApi.getModel(modelId)
const data = await ModelApi.getModelApi(modelId)
xmlString.value = data.bpmnXml
model.value = {
...data,