Junjie
1 天以前 66a9fc7a0065c4b1f0d488018659da98ee8594e7
src/main/webapp/static/js/deviceLogs/deviceLogs.js
@@ -56,7 +56,10 @@
            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);
@@ -81,7 +84,24 @@
        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;
@@ -842,4 +862,4 @@
            }
        }
    }
});
});