From f20a554bdb24e9dfde9dc6a69d78595944f61d15 Mon Sep 17 00:00:00 2001 From: mark <mark18340872469@163.com> Date: 星期二, 25 十月 2022 14:53:57 +0800 Subject: [PATCH] 设备管理 样式调整 --- src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue | 58 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 41 insertions(+), 17 deletions(-) diff --git a/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue b/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue index 166d1cc..5d4415e 100644 --- a/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue +++ b/src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue @@ -59,7 +59,11 @@ :key="item.id" :class="{ active: activeTabObj.id === item.id }" > - <div class="tab" @click="chooseTab(item)"> + <div + class="tab" + @click="chooseTab(item)" + @dblclick="chooseEdit(item)" + > {{ item.name }} </div> <div class="iconfont del" @click="handleTabsEdit(item.id, 'remove')"> @@ -177,6 +181,33 @@ }; }); }, + chooseEdit(data) { + this.$prompt("璇疯緭鍏ユ柊鐨勬椂闂存鍚嶇О", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + }) + .then(({ value }) => { + let repeat = false; + this.VideoManageData.TimeRules.forEach((item) => { + if (item.name === value) { + repeat = true; + } + }); + console.log("aaa"); + console.log(repeat); + if (repeat) { + this.$notify({ + message: "鍚嶇О涓嶈兘閲嶅", + type: "warning", + }); + return; + } + + this.activeTabObj.name = value; + this.save(); + }) + .catch(() => {}); + }, handleTabsEdit(tabId, action) { let tabs = this.VideoManageData.TimeRules; @@ -236,14 +267,11 @@ return; } - this.$confirm( - "姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鍒�, 鎵�鍏宠仈鐨勪换鍔″皢浼氬け鏁堬紝鏄惁缁х画?", - { - center: true, - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - } - ) + this.$confirm("姝ゆ搷浣滃皢鍒犻櫎璇ヨ鍒�, 鎵�鍏宠仈鐨勪换鍔″皢浼氬け鏁堬紝鏄惁缁х画?", { + center: true, + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + }) .then(() => { deleteTimeRule({ id: tabId }).then((rsp) => { if (rsp && rsp.success) { @@ -325,10 +353,6 @@ this.isAdding = false; }) .catch(() => { - this.$notify({ - type: "warning", - message: rsp.msg, - }); this.isAdding = false; }); }, @@ -371,7 +395,7 @@ padding: 0 20px; margin-top: 20px; display: flex; - justify-content: end; + justify-content: flex-end; text-align: center; line-height: 32px; font-size: 14px; @@ -427,7 +451,7 @@ position: absolute; padding-bottom: 13px; padding-right: 18px; - top: 16px; + top: 12px; left: -34px; cursor: pointer; border-bottom: 1px solid #e9ebee; @@ -440,7 +464,7 @@ .swiper-next-border { position: absolute; - top: 16px; + top: 12px; right: -34px; padding-bottom: 13px; padding-left: 18px; @@ -468,7 +492,7 @@ .btns { position: absolute; display: flex; - justify-content: end; + justify-content: flex-end; align-items: center; left: 0; right: 0; -- Gitblit v1.8.0