diff --git a/src/views/dashboard/workplace/components/data-panel.vue b/src/views/dashboard/workplace/components/data-panel.vue index 14c9cba..6e21d73 100644 --- a/src/views/dashboard/workplace/components/data-panel.vue +++ b/src/views/dashboard/workplace/components/data-panel.vue @@ -75,7 +75,7 @@ - - - - -
- +
+ + + +
- - - - - {{ device.name }} - - - {{ device.productName }} - - -
-
-
-
+ + + + + {{ device.name }} + {{ device.productName }} + + +
+ + + +
@@ -128,10 +127,10 @@ const content = document.createElement('div'); content.className = 'custom-content-marker'; const markerIcon = device.warning === '1' - ? `/api/rest/attachment/${device.icon?.url}` // 警告标记 - : `/api/rest/attachment/${device.icon?.url}`; // 默认标记 + ? `/api/rest/attachment/${device.iconId}` // 警告标记 + : `/api/rest/attachment/${device.iconId}`; // 默认标记 - content.innerHTML = `标记点`; + content.innerHTML = `标记点`; // 创建标记点 const marker = new AMap.Marker({ position: lngLat, @@ -204,4 +203,9 @@ height: 100%; } + /* 设备列表容器样式 */ + .device-list-container { + height: calc(100vh - 100px); /* 根据实际高度调整 */ + overflow-y: auto; /* 添加垂直滚动条 */ + } \ No newline at end of file diff --git a/src/views/iot/product/components/product-edit.vue b/src/views/iot/product/components/product-edit.vue index 6ba69a9..7c52037 100644 --- a/src/views/iot/product/components/product-edit.vue +++ b/src/views/iot/product/components/product-edit.vue @@ -253,6 +253,14 @@ const res = await queryProductDetail(Id); formData.value = res.data; paramsData.value = res.data.params; + + // 判断 iconId 和 previewId 是否存在 + if (!formData.value.iconId) { + formData.value.icon = []; + } + if (!formData.value.previewId) { + formData.value.preview = []; + } }; // 预览图列表