| | |
| | | type="text" |
| | | :loading="downloadLoading" |
| | | @click="downLoadLogFile(scope.row)" |
| | | v-if="permissionList.downLoadBtn" |
| | | v-if="permissionList.downLoadBtn && scope.row.hasChildren!=1" |
| | | >下载 |
| | | </el-button> |
| | | </template> |
| | |
| | | { |
| | | label: "日志名称", |
| | | prop: "logName", |
| | | width:'80', |
| | | width:'160', |
| | | }, |
| | | { |
| | | label: "日志类型", |
| | | prop: "logType" |
| | | prop: "logType", |
| | | width:'160' |
| | | }, |
| | | { |
| | | /*{ |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width:'180' |
| | | }, |
| | | width:'160' |
| | | },*/ |
| | | { |
| | | label: "最后修改时间", |
| | | prop: "lastModifier", |
| | | width:'180' |
| | | width:'160' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | permissionList() { |
| | | return { |
| | | delBtn: this.vaildData(this.permission.localLog.localLog_delete, false), |
| | | downLoadBtn: this.vaildData(this.permission.localLog.localLog_dwonload, false) |
| | | downLoadBtn: this.vaildData(this.permission.localLog.localLog_download, false) |
| | | }; |
| | | } |
| | | }, |
| | | methods: { |
| | | // 判断客户端所在的操作系统平台 |
| | | isWindows() { |
| | | return navigator.platform.indexOf('Win') !== -1 |
| | | }, |
| | | // 根据操作系统平台返回相应的路径分隔符 |
| | | getPathSeparator() { |
| | | return this.isWindows() ? '\\' : '/' |
| | | }, |
| | | methods: { |
| | | |
| | | downLoadLogFile(row){ |
| | | this.downloadLoading = true; |
| | | let logPath = row.hasChildren ? row.logPath:row.logPath+this.getPathSeparator()+row.logName; |
| | | let logPath = row.hasChildren ? row.logPath:row.logPath+"\\"+row.logName; |
| | | downLoadLog(Object.assign({},row,{logFullPaths:logPath})).then(res=>{ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.downloadLoading = false; |