提交编辑接口

This commit is contained in:
zzyuan 2024-12-03 13:31:59 +08:00
parent 5685943ff9
commit 0f7d76a462
2 changed files with 26 additions and 9 deletions

View File

@ -16,6 +16,10 @@ export const getDetailApi = (id: any) => {
export const equipmentAddApi = (data: any) => {
return post('/material-mall/dev', data)
}
// 编辑装备
export const equipmentEditApi = (data: any) => {
return post('/material-mall/dev/edit', data)
}
// 保存草稿
export const insertDraftApi = (data: any) => {

View File

@ -17,6 +17,7 @@ import {
getEquipmentListApi, //
getDetailApi, //
equipmentAddApi, //
equipmentEditApi, //
insertDraftApi, //稿
removeDeviceApi, //
updateUpDownApi, //
@ -474,6 +475,17 @@ const submitBtn = () => {
insurancePdf: insurancePdf.value, //
examinationPdf: examinationPdf.value, //
}
if(equipmentDeploymentParams.value.maId&&equipmentDeploymentParams.value.maId!=""){
const res: any = await equipmentEditApi(param)
if (res.code === 200) {
ElMessage({
type: 'success',
message: '保存成功',
})
dialogFormVisibleSettlein.value = false
getList()
}
}else{
const res: any = await equipmentAddApi(param)
if (res.code === 200) {
ElMessage({
@ -481,10 +493,11 @@ const submitBtn = () => {
message: '保存成功',
})
dialogFormVisibleSettlein.value = false
// ruleFormRef.value.resetField()
getList()
}
}
}
})
}
//稿