优化图纸编辑功能和提交逻辑
This commit is contained in:
@ -99,14 +99,7 @@
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
try {
|
||||
const res =
|
||||
type.value === 'add'
|
||||
? await create(form)
|
||||
: await edit({
|
||||
...form,
|
||||
id: Number(id.value),
|
||||
projectId: Number(projectId.value),
|
||||
})
|
||||
const res = type.value === 'add' ? await create(form) : await edit(form)
|
||||
if (res.code === 0) {
|
||||
// 弹窗提示
|
||||
ElMessage.success('操作成功')
|
||||
@ -148,6 +141,7 @@
|
||||
view({ id: id.value, projectId: projectId.value }).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code === 0) {
|
||||
form.id = data.id
|
||||
form.isDomestic = data.isDomestic
|
||||
form.province = data.province
|
||||
form.city = data.city
|
||||
|
||||
Reference in New Issue
Block a user