提交编辑接口
This commit is contained in:
parent
5685943ff9
commit
0f7d76a462
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
//草稿
|
||||
|
|
|
|||
Loading…
Reference in New Issue