Commit 8cff99c382df37259240a83c19132c3292f8e569
Merge branch 'fix/alarm-list-not-auth' into 'main_dev'
fix: 修复告警列表分享模式未查询告警列表 See merge request yunteng/thingskit-scada!194
Showing
2 changed files
with
3 additions
and
9 deletions
... | ... | @@ -4996,7 +4996,6 @@ App.prototype.updateButtonContainer = function () { |
4996 | 4996 | this.shareButton.setAttribute('title', mxResources.get('share')) |
4997 | 4997 | |
4998 | 4998 | const icon = document.createElement('img') |
4999 | - icon.className = 'geInverseAdaptiveAsset' | |
5000 | 4999 | icon.setAttribute('src', this.shareImage) |
5001 | 5000 | icon.setAttribute('align', 'absmiddle') |
5002 | 5001 | icon.style.marginRight = '4px' |
... | ... | @@ -5138,8 +5137,7 @@ App.prototype.addPreviewButton = function () { |
5138 | 5137 | this.previewButton.style.border = '1px solid transparent' |
5139 | 5138 | this.previewButton.style.color = '#fff' |
5140 | 5139 | |
5141 | - const icon = document.createElement('img') | |
5142 | - icon.className = 'geInverseAdaptiveAsset' | |
5140 | + const icon = document.createElement('img') | |
5143 | 5141 | icon.setAttribute('src', this.previewImage) |
5144 | 5142 | icon.setAttribute('align', 'absmiddle') |
5145 | 5143 | icon.style.marginRight = '4px' |
... | ... | @@ -5189,7 +5187,6 @@ App.prototype.addImportButton = function () { |
5189 | 5187 | this.importButton.style.color = '#fff' |
5190 | 5188 | |
5191 | 5189 | const icon = document.createElement('img') |
5192 | - icon.className = 'geInverseAdaptiveAsset' | |
5193 | 5190 | icon.setAttribute('src', this.importImage) |
5194 | 5191 | icon.setAttribute('align', 'absmiddle') |
5195 | 5192 | icon.style.marginRight = '4px' |
... | ... | @@ -5236,7 +5233,6 @@ App.prototype.addExportButton = function () { |
5236 | 5233 | this.exportButton.style.color = '#fff' |
5237 | 5234 | |
5238 | 5235 | const icon = document.createElement('img') |
5239 | - icon.className = 'geInverseAdaptiveAsset' | |
5240 | 5236 | icon.setAttribute('src', this.exportImage) |
5241 | 5237 | icon.setAttribute('align', 'absmiddle') |
5242 | 5238 | icon.style.marginRight = '4px' |
... | ... | @@ -5291,7 +5287,6 @@ App.prototype.addLockAndUnlockButton = function () { |
5291 | 5287 | this.lockAndUnlockButton.style.cursor = 'not-allowed' |
5292 | 5288 | |
5293 | 5289 | const icon = document.createElement('img') |
5294 | - icon.className = 'geInverseAdaptiveAsset' | |
5295 | 5290 | icon.setAttribute('src', this.secureImage) |
5296 | 5291 | icon.setAttribute('align', 'absmiddle') |
5297 | 5292 | icon.style.marginRight = '4px' |
... | ... | @@ -5378,7 +5373,6 @@ App.prototype.addSaveButton = function () { |
5378 | 5373 | this.saveButton.style.color = '#fff' |
5379 | 5374 | |
5380 | 5375 | const icon = document.createElement('img') |
5381 | - icon.className = 'geInverseAdaptiveAsset' | |
5382 | 5376 | icon.setAttribute('src', this.saveImage) |
5383 | 5377 | icon.setAttribute('align', 'absmiddle') |
5384 | 5378 | icon.style.marginRight = '4px' | ... | ... |
... | ... | @@ -7,7 +7,7 @@ import { fetchAlarmList } from '@/api/alarm' |
7 | 7 | import type { AlarmListItemType } from '@/api/alarm/model' |
8 | 8 | import type { CreateComponentType } from '@/core/Library/types' |
9 | 9 | import { useContentDataStore } from '@/store/modules/contentData' |
10 | -import { isLightboxMode } from '@/utils/env' | |
10 | +import { isLightboxMode, isShareMode } from '@/utils/env' | |
11 | 11 | import { AlarmStatusColorEnum, AlarmStatusEnum, AlarmStatusNameEnum } from '@/enums/datasource' |
12 | 12 | import { formatToDateTime } from '@/utils/dateUtil' |
13 | 13 | |
... | ... | @@ -60,7 +60,7 @@ const initFetchAlarmList = async () => { |
60 | 60 | |
61 | 61 | onMounted(async () => { |
62 | 62 | await nextTick() |
63 | - if (isLightboxMode()) { | |
63 | + if (isLightboxMode() || isShareMode()) { | |
64 | 64 | // 预览模式 |
65 | 65 | await initFetchAlarmList() |
66 | 66 | if (initOptions.polling) | ... | ... |