From 09053ca3d39aebfef37544c5eb5c3dcefe1306ce Mon Sep 17 00:00:00 2001 From: XiuHe <1109326957@qq.com> Date: Thu, 12 Mar 2026 09:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=8D=E7=BD=AE=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=BE=93=E5=85=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/assets/location/edit.vue | 27 ++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/admin/src/views/assets/location/edit.vue b/admin/src/views/assets/location/edit.vue index 686f9485..e35111f2 100644 --- a/admin/src/views/assets/location/edit.vue +++ b/admin/src/views/assets/location/edit.vue @@ -60,14 +60,26 @@ /> - - + + - - + + - - + + @@ -167,6 +179,9 @@ const filterTree = (tree: any[], predicate: (item: any) => boolean): any[] => { const handleSubmit = async () => { await formRef.value?.validate() + if (formData.parentId == 0) { + formData.parentId = NaN + } mode.value == 'edit' ? await updateLocation(formData) : await addLocation(formData) popupRef.value?.close() emit('success')