From 7c73f060eda95a88f32736ca106659c33675bbcc Mon Sep 17 00:00:00 2001 From: CGD <3030332422@qq.com> Date: Sat, 12 Apr 2025 09:28:19 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/DeviceManagement.vue | 81 +++++++++++++++---- 1 file changed, 64 insertions(+), 17 deletions(-) diff --git a/main/manager-web/src/views/DeviceManagement.vue b/main/manager-web/src/views/DeviceManagement.vue index 13d5a640..bffefb07 100644 --- a/main/manager-web/src/views/DeviceManagement.vue +++ b/main/manager-web/src/views/DeviceManagement.vue @@ -4,10 +4,8 @@

设备列表

- - + 添加设备 - - + + @@ -41,7 +39,12 @@
- + + {{ isAllSelected ? '取消全选' : '全选' }} + + + 新增 +
@@ -79,6 +82,8 @@ export default { data() { return { addDeviceDialogVisible: false, + selectedDevices: [], + isAllSelected: false, currentAgentId: this.$route.query.agentId || '', currentPage: 1, pageSize: 5, @@ -119,6 +124,16 @@ export default { } }, methods: { + + handleSelectionChange(val) { + this.selectedDevices = val; + this.isAllSelected = val.length === this.paginatedDeviceList.length; + }, + toggleAllSelection() { + this.$refs.deviceTable.toggleAllSelection(); + }, + + handleAddDevice() { this.addDeviceDialogVisible = true; }, @@ -222,21 +237,18 @@ export default { } .add-device-btn { - float: right; - background: #409eff; - border: none; - border-radius: 10px; - width: 105px; + background: linear-gradient(135deg, #6b8cff, #a966ff) !important; + border: none !important; + color: white !important; + margin-left: 10px; height: 32px; - display: flex; - align-items: center; - justify-content: center; - font-size: 14px; - gap: 8px; - margin-bottom: 15px; + padding: 7px 12px; + border-radius: 4px !important; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); &:hover { - background: #3a8ee6; + transform: translateY(-1px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); } } @@ -301,4 +313,39 @@ export default { font-size: 14px; margin-left: 10px; } + +.table_bottom { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 20px; +} + +.ctrl_btn { + display: flex; + gap: 8px; + padding-left: 26px; + + .el-button { + min-width: 72px; + height: 32px; + padding: 7px 12px; + border-radius: 4px; + border: none; + transition: all 0.3s; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); + + &:hover { + transform: translateY(-1px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + } + } + + .el-button--primary { + background: #5f70f3; + color: white; + } +} + +