From 280edfe55b8f48648d332ae0e33e219b8bae49fa Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期二, 15 四月 2025 15:29:36 +0800 Subject: [PATCH] 修改样式 --- src/components/tools/Detail.vue | 2 +- src/components/menu/Device.vue | 36 ++++++++++++++++++++++++------------ src/views/left/KGSim.vue | 2 ++ src/views/left/Simulation.vue | 3 +++ 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/components/menu/Device.vue b/src/components/menu/Device.vue index 08bb263..11d5ac4 100644 --- a/src/components/menu/Device.vue +++ b/src/components/menu/Device.vue @@ -29,7 +29,7 @@ > <template #default="{ node, data }"> <span v-if="!data.children" class="device-tree-item"> - <div class="device-item-icon"></div> + <!-- <div class="device-item-icon"></div> --> <span class="device-item-text">{{ node.label }}</span> </span> <span v-else class="device-tree-category"> @@ -74,18 +74,18 @@ const devicetList = ref([ { - deviceCode: "303A9016", - deviceId: "1821067878870257666", - deviceName: "瀛欒儭娌�(澧掓儏)", - dictDeviceType: "1437295822", - latitude: 40.56476666, - longitude: 116.5955361, - }, - { deviceCode: "01303A9016", deviceId: "1821067850122498049", deviceName: "瀛欒儭娌�(澧掓儏)", dictDeviceType: "14372958380", + latitude: 40.56476666, + longitude: 116.5955361, + }, + { + deviceCode: "303A9016", + deviceId: "1821067878870257666", + deviceName: "瀛欒儭娌�(澧掓儏)", + dictDeviceType: "1437295822", latitude: 40.56476666, longitude: 116.5955361, }, @@ -241,18 +241,26 @@ }; // 璁$畻灞炴�э細灏嗚澶囧垪琛ㄨ浆鎹负鏍戝舰缁撴瀯 +// 璁$畻灞炴�э細灏嗚澶囧垪琛ㄨ浆鎹负鏍戝舰缁撴瀯 const deviceTree = computed(() => { const typeMap = {}; // 鍏堟寜璁惧绫诲瀷鍒嗙粍 devicetList.value.forEach((device) => { const typeName = getDictName(deviceDictList, device.dictDeviceType); + + if (!typeName) { + console.warn("鏈壘鍒拌澶囩被鍨�:", device); + return; + } + if (!typeMap[typeName]) { typeMap[typeName] = []; } + // 鐩存帴浣跨敤鍘熷鐨勮澶囧悕绉帮紝涓嶈繘琛屼换浣曟浛鎹㈡搷浣� typeMap[typeName].push({ ...device, - deviceName: device.deviceName.replace(`${typeName})`, ")"), // 绉婚櫎閲嶅鐨勭被鍨嬪悕 + deviceName: device.deviceName.trim(), // 鍙幓闄ら灏剧┖鏍� }); }); @@ -262,7 +270,6 @@ children: typeMap[typeName], })); }); - function handleTreeNodeClick(data) { // 鍙湁璁惧鑺傜偣鎵嶅鐞嗙偣鍑讳簨浠� if (!data.children) { @@ -295,7 +302,7 @@ .device-content { padding: 10px; overflow-y: auto; - height: calc(100% - 40px); + height: calc(100% - 70px); } .device-tree { @@ -303,6 +310,8 @@ background: transparent; color: white; margin-top: 10px; + width: 100%; + overflow-x: auto; :deep(.el-tree-node__content) { height: 30px; @@ -352,4 +361,7 @@ color: white !important; background-color: rgb(38, 124, 124, 0.5); } +:deep(.el-tree-node__content) { + padding-left: 0px !important ; +} </style> diff --git a/src/components/tools/Detail.vue b/src/components/tools/Detail.vue index d6b3459..64d6492 100644 --- a/src/components/tools/Detail.vue +++ b/src/components/tools/Detail.vue @@ -191,7 +191,7 @@ .detail-context { position: absolute; - top: 3.125rem; + top: 3.8rem; left: 1.25rem; width: 21.875rem; } diff --git a/src/views/left/KGSim.vue b/src/views/left/KGSim.vue index 8f419a6..143e96b 100644 --- a/src/views/left/KGSim.vue +++ b/src/views/left/KGSim.vue @@ -92,6 +92,8 @@ .simulation-module { color: #61f7d4; font-size: 14px; + height: 100%; + background: url("@/assets/img/screen/leftbg.png"); } .simulation-area { diff --git a/src/views/left/Simulation.vue b/src/views/left/Simulation.vue index e6df209..c170efe 100644 --- a/src/views/left/Simulation.vue +++ b/src/views/left/Simulation.vue @@ -77,4 +77,7 @@ font-size: 14px; color: #61f7d4; } +.el-tab-pane{ + height: 100%; +} </style> \ No newline at end of file -- Gitblit v1.9.3