Commit 084c33ec255b6de06e2492ed6348230cfeed27ab

Authored by fengtao
1 parent 12aed116

fixDEFECT-880 网关设备没有历史数据

... ... @@ -232,7 +232,7 @@
232 232 width: 330, // 信息窗口宽度
233 233 height: 0, // 信息窗口高度
234 234 };
235   - const { name, organizationDTO, deviceState, deviceProfile } = record;
  235 + const { name, organizationDTO, deviceState, deviceProfile, deviceType } = record;
236 236 const { address, longitude, latitude } = record.deviceInfo;
237 237 // 创建信息窗口对象
238 238 const res = await getDeviceActiveTime(entityId);
... ... @@ -264,7 +264,11 @@
264 264 </div>
265 265 <div style="display:flex;justify-content:end; margin-top:10px">
266 266 <button onclick="openDeviceInfoDrawer()" style="margin-right:10px;color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">设备信息</button>
267   - <button onclick="openHistoryModal()" style="color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">历史数据</button>
  267 + <button onclick="openHistoryModal()" style="display:${
  268 + deviceType !== 'GATEWAY' ? 'block' : 'none'
  269 + };color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">${
  270 + deviceType !== 'GATEWAY' ? '历史数据' : ''
  271 + }</button>
268 272 </div>
269 273 `,
270 274 options
... ...