From ec2ed600ba8088a291838b0d448dbfd9e2150e2a Mon Sep 17 00:00:00 2001 From: ludc Date: 星期日, 26 十一月 2023 18:12:31 +0800 Subject: [PATCH] 本地日志下载调试linux中运行,修改读取失败问题 --- Source/UBCS-WEB/src/views/monitor/log/localLog.vue | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/UBCS-WEB/src/views/monitor/log/localLog.vue b/Source/UBCS-WEB/src/views/monitor/log/localLog.vue index 90d9130..ee2fff4 100644 --- a/Source/UBCS-WEB/src/views/monitor/log/localLog.vue +++ b/Source/UBCS-WEB/src/views/monitor/log/localLog.vue @@ -121,11 +121,18 @@ }; } }, - methods: { - + methods: { + // 鍒ゆ柇瀹㈡埛绔墍鍦ㄧ殑鎿嶄綔绯荤粺骞冲彴 + isWindows() { + return navigator.platform.indexOf('Win') !== -1 + }, + // 鏍规嵁鎿嶄綔绯荤粺骞冲彴杩斿洖鐩稿簲鐨勮矾寰勫垎闅旂 + getPathSeparator() { + return this.isWindows() ? '\\' : '/' + }, downLoadLogFile(row){ this.downloadLoading = true; - let logPath = row.hasChildren ? row.logPath:row.logPath+"\\"+row.logName; + let logPath = row.hasChildren ? row.logPath:row.logPath+this.getPathSeparator()+row.logName; downLoadLog(Object.assign({},row,{logFullPaths:logPath})).then(res=>{ func.downloadFileByBlobHandler(res); this.downloadLoading = false; -- Gitblit v1.9.3