From 45e7f337bf44b3093dd20d1c32c5a4a1fb342b5d Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 21 Sep 2023 15:54:11 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentProcessAmount/index.vue | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/views/monitoring/equipmentProcessAmount/index.vue b/src/views/monitoring/equipmentProcessAmount/index.vue index e8a54590..d060bbb0 100644 --- a/src/views/monitoring/equipmentProcessAmount/index.vue +++ b/src/views/monitoring/equipmentProcessAmount/index.vue @@ -16,18 +16,23 @@ title="点击切换工厂" @mouseenter="factoryListOpen = true" @mouseleave="factoryListOpen = false"> - {{ currentFactory || '工厂名称' }} + {{ currentFactory?.label || '工厂名称' }}
-
@@ -35,7 +40,8 @@ class="side-bar__left" style="width: 240px; padding: 12px; height: 100%"> @@ -314,12 +320,15 @@ export default { }, factoryChangeHandler(event) { - console.log('clicked factory change.......'); this.factoryListOpen = false; + const fcId = event.target.dataset.value; + console.log('fc id', fcId); + this.handleSidebarItemClick({ id: fcId, type: '工厂' }); + this.currentFactory = this.sidebarContent.find((item) => item.id == fcId); }, handleSidebarItemClick({ label, id, type }) { - console.log('lable clicked!', label, id, type); + console.log('label clicked!', label, id, type); switch (type) { case '设备': this.queryParams.equipmentId = id; @@ -424,10 +433,10 @@ export default { } .factory-list__selector::after { - content: ''; + /* content: ''; */ position: absolute; top: 16px; - left: 100px; + right: 12px; display: inline-block; width: 8px; height: 8px; @@ -482,7 +491,7 @@ li { border-radius: 4px; font-size: 16px; line-height: 1; - padding: 8px 4px; + padding: 8px 32px 8px 8px; min-width: 64px; }