From 2925d0cae10aa2ca40747ee8636f44584995cc7f Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期一, 28 十一月 2022 16:45:21 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_ui

---
 src/views/systemSetting/device/bayonet/create/index.vue |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/views/systemSetting/device/bayonet/create/index.vue b/src/views/systemSetting/device/bayonet/create/index.vue
index 6e144b3..31c6da0 100644
--- a/src/views/systemSetting/device/bayonet/create/index.vue
+++ b/src/views/systemSetting/device/bayonet/create/index.vue
@@ -129,17 +129,21 @@
 
   created() {
     this.bayonet = deepClone(this.originalBayonet);
+    if (this.originalBayonet) {
+      this.bayonet.bayonetName = this.originalBayonet.name;
+    }
   },
 
   methods: {
       onSubmit() {
         this.$refs.device.validate(valid => {
           if (valid) {
+            this.bayonet.longitude = Number(this.bayonet.longitude);
+            this.bayonet.latitude = Number(this.bayonet.latitude);
+            this.bayonet.inOutCityType = Number(this.bayonet.inOutCityType);
+            this.bayonet.belongArea = Number(this.bayonet.belongArea);
             const copyBayonet = deepClone(this.bayonet);
             delete copyBayonet.id;
-            copyBayonet.longitude = Number(copyBayonet.longitude);
-            copyBayonet.latitude = Number(copyBayonet.latitude);
-            copyBayonet.inOutCityType = Number(copyBayonet.inOutCityType);
             if (!this.isEdit) {
               bayonet.addBayonet(this.bayonet)
                   .then(() => {

--
Gitblit v1.8.0