| | |
| | | return this.deviceList; |
| | | }, |
| | | visualizationTitle() { |
| | | return `日志可视化 - ${this.visDeviceType} ${this.visDeviceNo} (${this.searchForm.day})`; |
| | | return this.i18n('deviceLogs.visualizationPrefix', '日志可视化 - ') + this.visDeviceType + ' ' + this.visDeviceNo + ' (' + this.searchForm.day + ')'; |
| | | }, |
| | | downloadDialogTitle() { |
| | | return this.i18n('deviceLogs.downloadDialogTitle', '文件下载中'); |
| | | }, |
| | | maxSliderValue() { |
| | | return Math.max(0, this.endTime - this.startTime); |
| | |
| | | this.loadDeviceEnums(); |
| | | this.loadDateTree(); |
| | | }, |
| | | mounted() { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.onReady === 'function') { |
| | | let that = this; |
| | | window.WCS_I18N.onReady(function () { |
| | | that.$forceUpdate(); |
| | | }); |
| | | } |
| | | }, |
| | | methods: { |
| | | i18n(key, fallback, params) { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.t === 'function') { |
| | | var translated = window.WCS_I18N.t(key, params); |
| | | if (translated && translated !== key) { |
| | | return translated; |
| | | } |
| | | } |
| | | return fallback || key; |
| | | }, |
| | | // --- Initialization --- |
| | | loadDeviceEnums() { |
| | | let that = this; |