优化图纸编辑功能和提交逻辑

This commit is contained in:
wangqiao
2025-09-13 12:51:48 +08:00
parent f3fb25349b
commit 2901b24f43
2 changed files with 3 additions and 9 deletions

View File

@ -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