Browse Source

[完善]进入页面默认选中菜单

master
邵佳豪 5 years ago
parent
commit
883bc803c9
  1. 4
      src/app/navigation/navigation.component.html
  2. 1
      src/app/navigation/navigation.component.ts
  3. 10
      src/app/ui/all-file/all-file.component.ts
  4. 3
      src/app/ui/all-file/folderdalog.html

4
src/app/navigation/navigation.component.html

@ -2,7 +2,7 @@
<mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme"> <mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme">
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;"> <mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<div class="biglogobox"> <div class="biglogobox">
<img src="../../assets/images/logo.png" alt=""> <img src="../../assets/images/logo.png" alt="logo">
</div> </div>
<div class="navbox"> <div class="navbox">
<div class="openSystem" style="border-bottom: 1px solid gray;"> <div class="openSystem" style="border-bottom: 1px solid gray;">
@ -31,7 +31,7 @@
</ul> --> </ul> -->
<mat-accordion multi="true"> <mat-accordion multi="true">
<mat-expansion-panel> <mat-expansion-panel expanded>
<mat-expansion-panel-header> <mat-expansion-panel-header>
支队级 支队级
</mat-expansion-panel-header> </mat-expansion-panel-header>

1
src/app/navigation/navigation.component.ts

@ -65,6 +65,7 @@ export class NavigationComponent implements OnInit {
// } // }
// }) // })
// this.getAllDataBank() // this.getAllDataBank()
this.selectedDataBank = "支队级-主官"
} }

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

@ -64,7 +64,8 @@ export class AllFileComponent {
ngOnInit(): void { ngOnInit(): void {
this.dataSource.sort = this.sort; this.dataSource.sort = this.sort;
this.getAllDataBank() // this.getAllDataBank()
this.getALLFileList("支队级-主官")
} }
//获得所有资料库,默认显示第一个资料库的文件 //获得所有资料库,默认显示第一个资料库的文件
@ -375,8 +376,6 @@ export class AllFileComponent {
//上传文件夹 //上传文件夹
async selectFiles (e) { async selectFiles (e) {
// console.log(e)
this.fileArr = e.target.files || null //上传的文件 this.fileArr = e.target.files || null //上传的文件
this.uploadisLoading2 = true this.uploadisLoading2 = true
this.child.handleData() //子组件处理数据格式 this.child.handleData() //子组件处理数据格式
@ -479,9 +478,9 @@ export class AllFileComponent {
}); });
this.PartNumberETag2.push(result) this.PartNumberETag2.push(result)
if (this.PartNumberETag2.length === allSlice) { if (this.PartNumberETag2.length === allSlice) {
this.endUploading2(e,_result,reject,filesnum,selectedDataBank2)} this.endUploading2(e,_result,reject,filesnum,selectedDataBank2)
}
}//for循环 }//for循环
} }
//完成分块上传 //完成分块上传
@ -496,7 +495,6 @@ export class AllFileComponent {
  setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);   setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
}); });
result("成功了") result("成功了")
this.child.endUpload(e) //子组件 当前文件上传成功 this.child.endUpload(e) //子组件 当前文件上传成功

3
src/app/ui/all-file/folderdalog.html

@ -1,9 +1,9 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> <form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<mat-form-field> <mat-form-field>
<input matInput id="name" name="name" type='text' <input matInput id="name" name="name" type='text'
required required
style="font-size: 12px;" style="font-size: 12px;"
onfocus="this.select()"
[(ngModel)]="newFolderName" placeholder="创建文件夹"> [(ngModel)]="newFolderName" placeholder="创建文件夹">
</mat-form-field> </mat-form-field>
@ -11,5 +11,4 @@
<button type="submit" class="savebtn" mat-raised-button color="primary" [disabled]='form.invalid'>确定</button> <button type="submit" class="savebtn" mat-raised-button color="primary" [disabled]='form.invalid'>确定</button>
<button type="button" mat-button (click)="onNoClick()" mat-raised-button>取消</button> <button type="button" mat-button (click)="onNoClick()" mat-raised-button>取消</button>
</div> </div>
</form> </form>
Loading…
Cancel
Save