接口修改

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

View File

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

View File

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