From b2d0ac2db80c08783fd848933230618cc30d76a2 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 30 八月 2023 11:38:24 +0800
Subject: [PATCH] 添加锦汇企业编码. 修复点位列表平铺的bug

---
 src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue b/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue
index abc0e5f..3b0863a 100644
--- a/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue
+++ b/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue
@@ -64,7 +64,7 @@
       </div>
     </div>
     <div class="control">
-      <div class="button editBtn" @click="edit = !edit">
+      <div class="button editBtn" @click="editOrSave">
         {{ edit ? "閿佸畾" : "缂栬緫" }}
       </div>
       <div class="button addBtn" @click="handleTabsEdit('', 'add')">
@@ -84,10 +84,10 @@
       </TimeSliderItem>
     </div>
 
-    <div class="btns">
+    <!-- <div class="btns">
       <div class="cancelBtn button" @click="close">鍙栨秷</div>
       <div class="confirmBtn button" @click="save">纭畾</div>
-    </div>
+    </div> -->
   </div>
 </template>
 
@@ -174,8 +174,6 @@
               repeat = true
             }
           })
-          console.log("aaa")
-          console.log(repeat)
           if (repeat) {
             this.$notify({
               message: "鍚嶇О涓嶈兘閲嶅",
@@ -221,6 +219,7 @@
                 }
               }
               this.isAdding = false
+              this.edit = true
             })
             .catch(() => {
               this.$notify({
@@ -272,12 +271,10 @@
     windowSizeChange() {
       let timeSlideWidth = document.querySelector(".sub-time-box").clientWidth
       this.cavasLength = timeSlideWidth
-      console.log("鏃堕棿缁勪欢瀹藉害锛�", timeSlideWidth)
     },
     updateTimeRule(rule) {
       saveTimeRule(rule)
         .then(async (rsp) => {
-          console.log(rsp, "rrr1333331rrrrrrrrrrrrr")
           if (rsp && rsp.success) {
             await this.VideoManageData.getTimeRule()
             this.isAdding = false
@@ -319,7 +316,6 @@
     save() {
       saveTimeRule(this.activeTabObj)
         .then(async (rsp) => {
-          console.log(rsp, "rrr112222rrrrrrrrrrrrr")
           if (rsp && rsp.success) {
             this.$notify({
               type: "success",
@@ -332,6 +328,14 @@
         .catch(() => {
           this.isAdding = false
         })
+    },
+    editOrSave() {
+      this.edit = !this.edit
+      // console.log(this.edit, "this.edit")
+      if (!this.edit) {
+        // 閿佸畾
+        this.save()
+      }
     }
   }
 }

--
Gitblit v1.8.0