diff --git a/src/views/system/System.vue b/src/views/system/System.vue index 00476a7..614b59e 100644 --- a/src/views/system/System.vue +++ b/src/views/system/System.vue @@ -63,11 +63,11 @@ const getData = async () => { ...dev, forge_dbid: parseInt(dev.forge_dbid), room_dbid: parseInt(dev.room_dbid), - device_coordinate_3d: JSON.parse(dev.device_coordinate_3d), + device_coordinate_3d: dev.device_coordinate_3d ? JSON.parse(dev.device_coordinate_3d) : "", alarmMsg: "", is_show: true, currentColor: dev.device_normal_point_color, - spriteDbId: 10 + index, + spriteDbId: 10 + dev.main_id, sensorTypes: dev.points.map(({ points }) => points), floor_guid: d.floor_guid, is2DActive: false diff --git a/src/views/system/SystemFloor.vue b/src/views/system/SystemFloor.vue index c526cc5..a7153b8 100644 --- a/src/views/system/SystemFloor.vue +++ b/src/views/system/SystemFloor.vue @@ -36,7 +36,7 @@ const defaultOption = (map, data = []) => { ...sameOption, symbolSize: 10, itemStyle: { - color: data?.[0]?.[3]?.device_normal_color || "#b02a02", + color: data?.[0]?.[3]?.device_normal_color || "#009100", }, data, }, @@ -44,7 +44,7 @@ const defaultOption = (map, data = []) => { ...sameOption, symbolSize: 20, itemStyle: { - color: data?.[0]?.[3]?.device_normal_color || "#b02a02", + color: data?.[0]?.[3]?.device_normal_color || "#009100", }, data: [], }