Commit 5a6f1a864573f9fbc28e58b3dbcfbe498ac7079f

Authored by ww
1 parent 69fe9a7e

fix: DEFECT-1342修复告警列表设备为必填项

@@ -6646,7 +6646,11 @@ DataFormatPanel.prototype.addDataFont = function (container) { @@ -6646,7 +6646,11 @@ DataFormatPanel.prototype.addDataFont = function (container) {
6646 } 6646 }
6647 6647
6648 function getAlarmListSubmitValue(filed = {}) { 6648 function getAlarmListSubmitValue(filed = {}) {
6649 - 6649 + console.log(field?.devicesInfo)
  6650 + if(!field?.devicesInfo) {
  6651 + UseLayUi.errorMsg('请先进行设备绑定!')
  6652 + return
  6653 + }
6650 const value = { 6654 const value = {
6651 configurationId, 6655 configurationId,
6652 contentId: currentPageId.id, 6656 contentId: currentPageId.id,
@@ -14399,11 +14403,13 @@ class DispatchCenter { @@ -14399,11 +14403,13 @@ class DispatchCenter {
14399 const id = node.getAttribute(UUID) 14403 const id = node.getAttribute(UUID)
14400 const element = document.getElementById(id) 14404 const element = document.getElementById(id)
14401 if (element) { 14405 if (element) {
14402 - const [err, data] = await to(ConfigurationNodeApi.getAlarmList({ page: 1, pageSize: 30, startTime: Number(startTime), endTime: Number(endTime), deviceIds })) 14406 + const [err, data] = await to(ConfigurationNodeApi.getAlarmList({ page: 1, pageSize: 30, startTime: Number(startTime), endTime: Number(endTime), deviceIds }))
14403 if (err) return 14407 if (err) return
14404 if (data?.items && data?.items?.length) { 14408 if (data?.items && data?.items?.length) {
14405 const template = AlarmListComponent.createAlarmItem(data.items) 14409 const template = AlarmListComponent.createAlarmItem(data.items)
14406 $(`#${id}`).find('.list-wrapper').html(template) 14410 $(`#${id}`).find('.list-wrapper').html(template)
  14411 + } else {
  14412 + $(`#${id}`).find('.list-wrapper').html(`<div>暂无数据</div>`)
14407 } 14413 }
14408 if (autoPlay) { 14414 if (autoPlay) {
14409 const wrapperHeight = $(`#${id}`).height() 14415 const wrapperHeight = $(`#${id}`).height()