diff --git a/src/app/is-login.service.ts b/src/app/is-login.service.ts index c27e403..ce47328 100644 --- a/src/app/is-login.service.ts +++ b/src/app/is-login.service.ts @@ -29,7 +29,8 @@ export class IsLoginService { let link = document.createElement("a"); link.style.display = "none"; link.href = url; - link.setAttribute("download", e.fileName); + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); @@ -67,9 +68,9 @@ export class IsLoginService { let link = document.createElement("a"); link.style.display = "none"; link.href = url; - link.setAttribute("download", e.fileName); + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + link.setAttribute("download", fileName); document.body.appendChild(link); - link.click(); this.isDownloading = false //关闭下载进度条 this.downloadProgress = 0 //初始化进度条 diff --git a/src/app/pages/lockscreen/lockscreen.component.ts b/src/app/pages/lockscreen/lockscreen.component.ts index 81df77c..ae05839 100644 --- a/src/app/pages/lockscreen/lockscreen.component.ts +++ b/src/app/pages/lockscreen/lockscreen.component.ts @@ -29,6 +29,7 @@ export class LockscreenComponent implements OnInit { onSubmit(e){ let params = { roleType: this.roleType } this.http.post('/api/Account/SignIn',e,{params}).subscribe((data:any)=>{ + sessionStorage.setItem('userId',data.userId) sessionStorage.setItem('username',e.name) sessionStorage.setItem('expires',data.expires) sessionStorage.setItem('realName',data.realName) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 60bb7b0..51c235d 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -29,6 +29,7 @@ export class LoginComponent implements OnInit { onSubmit(e){ let params = { roleType: '0' } this.http.post('/api/Account/SignIn',e,{params}).subscribe((data:any)=>{ + sessionStorage.setItem('userId',data.userId) sessionStorage.setItem('username',e.name) sessionStorage.setItem('expires',data.expires) sessionStorage.setItem('realName',data.realName) diff --git a/src/app/ui/all-file/all-file.component.html b/src/app/ui/all-file/all-file.component.html index bd31389..e6c7659 100644 --- a/src/app/ui/all-file/all-file.component.html +++ b/src/app/ui/all-file/all-file.component.html @@ -149,6 +149,9 @@ account_balance 战术学习进入 +
+ account_balance 多人电子沙盘推演系统进入 +
diff --git a/src/app/ui/all-file/all-file.component.ts b/src/app/ui/all-file/all-file.component.ts index cbe35d2..26771f7 100644 --- a/src/app/ui/all-file/all-file.component.ts +++ b/src/app/ui/all-file/all-file.component.ts @@ -94,7 +94,19 @@ export class AllFileComponent { this.aHrefUnsafe = this.sanitizer.bypassSecurityTrustUrl(aHref); return this.aHrefUnsafe } - + aHrefUnsafeLearnFun2(){ + this.roleType = sessionStorage.getItem('roleType') + let username = sessionStorage.getItem('username') + let expires = sessionStorage.getItem('expires') + let realName = sessionStorage.getItem('realName') + let roleType = sessionStorage.getItem('roleType') + let token = sessionStorage.getItem('token') + let refreshToken = sessionStorage.getItem('refreshToken') + let userId = sessionStorage.getItem('userId') + let aHref = `ax2://startup?username=${username}&token=${token}&refreshToken=${refreshToken}&expires=${expires}&realname=${realName}&roleType=${roleType}&userId=${userId}` + this.aHrefUnsafe = this.sanitizer.bypassSecurityTrustUrl(aHref); + return this.aHrefUnsafe + } //获得当前资料库的文件列表 getALLFileList(name){ this.selectedDataBank = name @@ -434,6 +446,11 @@ export class AllFileComponent { let key = `allFiles/${this.selectedDataBank}/战术学习/` this.downloadFile.handleData(key,"进入") } + //记录多角色推演 + openmultirole(){ + let key = `allFiles/${this.selectedDataBank}/多角色推演/` + this.downloadFile.handleData(key,"进入") + } //返回上一级目录 backTominTop(){ let topnum = this.gettoplist(this.selectedDataBank) @@ -934,7 +951,6 @@ export class AllFileComponent { this.snackBar.open('文件夹不支持下载','确定',config) }else{ this.http.get('/api/ObjectMetadata/drives/' + this.selectDownloadFile.key).subscribe(data=>{ - // console.log(123,data) this.download = data this.downloadFile.download(this.download) })