this.systemService.getFileCatagories(this.currentAppInstance.id, 'app').subscribe(re => { this.allFileType = re.filter((x) => ['troubleshooting-log', 'coreDump-log'].includes(x.id)); this.allFileType.find((x) => x.id === 'troubleshooting-log').name = '线程'; this.allFileType.find((x) => x.id === 'coreDump-log').name = '内存'; console.log(this.allFileType); this.selectedFileType = this.allFileType.find((x) => x.id === 'troubleshooting-log'); this.pathHeadConst = this.selectedFileType.filePath.substring(this.selectedFileType.filePath.indexOf('/'), this.selectedFileType.filePath.length); this.currentPath = ${this.pathHead}${this.relativePath}; this.selectedFileTypeName = '线程'; this.getFileList(); }, (error) => { this.currentPath = ''; if (this.first === 'true') { this.farrisNotify.error('获取类别错误:网络异常,请检查Agent服务端口等'); this.first = 'false'; } });

优化以下代码thissystemServicegetFileCatagoriesthiscurrentAppInstanceid appsubscribere = thisallFileType = refilterx = xid === troubleshooting-log xid === coreDump-log; thisallFileTypefilterx =

原文地址: http://www.cveoy.top/t/topic/bCm8 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录