邵佳豪 5 years ago
parent
commit
d3d2944dd3
  1. 2
      src/app/pages/lockscreen/lockscreen.component.html
  2. 2
      src/app/pages/lockscreen/lockscreen.component.ts
  3. 17
      src/app/ui/all-file/all-file.component.ts
  4. 6
      src/app/ui/eharts-statistics/eharts-statistics.component.ts

2
src/app/pages/lockscreen/lockscreen.component.html

@ -6,8 +6,8 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="input" style="margin-bottom: 50px;">
<label class="role" [ngClass]="{'isCheck': roleType=='1'}" (click)='toggle(1)'>教员</label>
<label class="role" [ngClass]="{'isCheck': roleType=='2'}" (click)='toggle(2)'>学员</label>
<label class="role" [ngClass]="{'isCheck': roleType=='1'}" (click)='toggle(1)'>教员</label>
</div>
<div class="input">

2
src/app/pages/lockscreen/lockscreen.component.ts

@ -20,7 +20,7 @@ export class LockscreenComponent implements OnInit {
}
roleType:string = '1'; //登录角色
roleType:string = '2'; //登录角色
errmsg :string = ''; //错误信息

17
src/app/ui/all-file/all-file.component.ts

@ -681,6 +681,8 @@ export class AllFileComponent {
})
}
isTrueDelete:any = ['基础知识','装备','技战术','消防设施','资料库']; //匹配内置一级目录 是否被选择删除
// 删除文件
deleteFiles(){
@ -688,17 +690,15 @@ export class AllFileComponent {
let isDelete = confirm('您确定要删除选中文件吗')
let arr = []
if (isDelete) {
let notDelete = [] //所有要删除文件 的 一级目录
let arrList = [] //匹配到 禁止删除的 目录
this.selection.selected.forEach((element)=>{
let data = element.key.split("/");
notDelete.push(data[2])
})
this.isTrueDelete.forEach(element => {
notDelete.forEach(elements=>{
if (element==elements) { arrList.push('true') }
})
this.isTrueDelete.forEach(elements => {
if (elements==data[data.length-2] && data.length-2==2) {
arrList.push('true')
}
});
})
if (arrList.length) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -749,9 +749,8 @@ export class AllFileComponent {
})
});
} // if arrList
}

6
src/app/ui/eharts-statistics/eharts-statistics.component.ts

@ -138,9 +138,9 @@ export class EhartsStatisticsComponent implements OnInit {
return b.count - a.count
} )
newData.forEach(element => {
postNames.push(element.postName)
catalogs.push(element.catalog)
counts.push(element.count)
postNames.push(element.postName ? element.postName : '暂无数据')
catalogs.push(element.catalog ? element.catalog : '暂无数据')
counts.push(element.count ? element.count : 0)
});
this.echartsInit(postNames,catalogs,counts)
}

Loading…
Cancel
Save