接口修改
This commit is contained in:
parent
f1e801e9ad
commit
a5fedfe15b
@ -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)
|
||||||
})
|
})
|
||||||
|
@ -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
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user