Browse Source

[合并]合并代码

master
邵佳豪 5 years ago
parent
commit
a3c75d583f
  1. 4
      src/app/ui/all-file/all-file.component.html
  2. 14
      src/app/ui/all-file/all-file.component.ts
  3. 6
      src/app/ui/upload-files/upload-files.component.html

4
src/app/ui/all-file/all-file.component.html

@ -58,9 +58,9 @@
<div class="titleleft">
<span class="goBack" (click)='backToTop()' *ngIf="selectedDataBank.includes('/')">返回根目录</span>
&nbsp;
<span class="goBack" (click)='backTominTop()' *ngIf="selectedDataBank.includes('/')">返回上一级目录</span>
<span class="goBack" (click)='backTominTop()' *ngIf="selectedDataBank.includes('/')">返回上一级</span>
<span style="margin: 0 3px;color: #c5d8f3;">|</span>
<span class="allFile">全部文件</span>
<span class="allFile" *ngIf="!selectedDataBank.includes('/')">全部文件</span>
<span style="margin: 0 3px;color: #c5d8f3;"></span>
<span class="allFile">{{selectedDataBank}}</span>
</div>

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

@ -401,7 +401,7 @@ export class AllFileComponent {
let fileSize = file.size || null //上传文件的总大小
let shardSize = 5 * 1024 * 1024 //5MB一个分片
this.uploadisLoading2 = true
// this.uploadProgress2 = 0 + "/" + filesnum
this.uploadProgress2 = 0 + "/" + filesnum
this.child.uploading(file) //子组件 当前文件正在上传
if (file && fileSize<=shardSize) { //上传文件<=5MB时
@ -412,9 +412,9 @@ export class AllFileComponent {
this.objectName2 = data.objectName
this.filesTag2.push("data")
// this.zone.run(() => {
//   setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
// });
this.zone.run(() => {
  setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
});
result("成功了")
this.child.endUpload(file) //子组件 当前文件上传成功
@ -485,9 +485,9 @@ export class AllFileComponent {
this.http.post(`/api/CompleteMultipartUpload/drives/${this.objectName2}`,data,{params:paramsData}).subscribe(data=>{
this.filesTag2.push("data")
// this.zone.run(() => {
//   setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
// });
this.zone.run(() => {
  setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
});
result("成功了")

6
src/app/ui/upload-files/upload-files.component.html

@ -1,8 +1,8 @@
<div class="content">
<div class="header">
<label style="font-size: 14px;">上传中...</label>
<button mat-raised-button style="margin-left: 70%;" *ngIf="isShow" (click)='toggle()'><mat-icon>keyboard_arrow_down</mat-icon></button>
<button mat-raised-button style="margin-left: 70%;" *ngIf="!isShow" (click)='toggle()'><mat-icon>keyboard_arrow_up</mat-icon></button>
<label style="font-size: 14px;">{{thatFile.uploadProgress2}} 上传中...</label>
<button mat-raised-button style="margin-left: 60%;" *ngIf="isShow" (click)='toggle()'><mat-icon>keyboard_arrow_down</mat-icon></button>
<button mat-raised-button style="margin-left: 60%;" *ngIf="!isShow" (click)='toggle()'><mat-icon>keyboard_arrow_up</mat-icon></button>
</div>
<div style="margin-top: 10px; border-top: 1px solid #e2e2e2;" [hidden]="!isShow">

Loading…
Cancel
Save