@gsp-svc/formdoc-upload 0.1.28 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/gsp-svc-formdoc-upload.umd.js +176 -155
- package/bundles/gsp-svc-formdoc-upload.umd.js.map +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js.map +1 -1
- package/esm2015/lib/upload/file-upload/file-upload.component.js +33 -8
- package/esm5/lib/upload/file-upload/file-upload.component.js +36 -8
- package/fesm2015/gsp-svc-formdoc-upload.js +170 -152
- package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
- package/fesm5/gsp-svc-formdoc-upload.js +175 -154
- package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
- package/gsp-svc-formdoc-upload.metadata.json +1 -1
- package/lib/upload/file-upload/file-upload.component.d.ts +6 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { ProgressModule } from '@farris/ui-progress';
|
|
|
11
11
|
import { FormsModule } from '@angular/forms';
|
|
12
12
|
import { ComboListModule } from '@farris/ui-combo-list';
|
|
13
13
|
import { LanguageService, HttpService } from '@ecp-caf/caf-common';
|
|
14
|
-
import { Injectable, Pipe, Inject, LOCALE_ID,
|
|
14
|
+
import { Injectable, Pipe, Inject, LOCALE_ID, Component, NgModule, Injector, ComponentFactoryResolver, Input, ViewChild, defineInjectable } from '@angular/core';
|
|
15
15
|
import { BsModalService } from '@farris/ui-modal';
|
|
16
16
|
import { of as of$1 } from 'rxjs';
|
|
17
17
|
import { HttpClientModule } from '@angular/common/http';
|
|
@@ -390,6 +390,151 @@ const FileState = {
|
|
|
390
390
|
FileState[FileState.New] = 'New';
|
|
391
391
|
FileState[FileState.Update] = 'Update';
|
|
392
392
|
|
|
393
|
+
/**
|
|
394
|
+
* @fileoverview added by tsickle
|
|
395
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
396
|
+
*/
|
|
397
|
+
/** @type {?} */
|
|
398
|
+
const LANG_RESOURCES = {
|
|
399
|
+
'zh-CHS': {
|
|
400
|
+
'uploadFile': '上传文件',
|
|
401
|
+
'uploading': '正在上传文件……',
|
|
402
|
+
'selectedCount': '已选择文件数量:',
|
|
403
|
+
'limitCount': '超出系统限制数量:',
|
|
404
|
+
'rechooseFile': ',重新选择上传文件。',
|
|
405
|
+
'save': '保存',
|
|
406
|
+
'cancel': '取消',
|
|
407
|
+
'haveSameName': '已上传过同名文件: ',
|
|
408
|
+
'rename': '重命名',
|
|
409
|
+
'replace': '替换',
|
|
410
|
+
'sizeZero': '文件大小为0',
|
|
411
|
+
'uploadFailure': '上传失败',
|
|
412
|
+
'uploadSucceed': '上传成功',
|
|
413
|
+
'wait': '等一下,文档正在上传。',
|
|
414
|
+
'saveTo': '正在将文件保存到',
|
|
415
|
+
'delete': '删除',
|
|
416
|
+
'selectAll': '全选',
|
|
417
|
+
'selectNull': '全不选',
|
|
418
|
+
'detail': '详情',
|
|
419
|
+
'fileName': '文件名',
|
|
420
|
+
'state': '状态',
|
|
421
|
+
'operation': '操作',
|
|
422
|
+
'size': '大小',
|
|
423
|
+
'close': '关闭',
|
|
424
|
+
'loading': '拼命加载中'
|
|
425
|
+
},
|
|
426
|
+
'en-US': {
|
|
427
|
+
'uploadFile': 'Upload File',
|
|
428
|
+
'uploading': 'File Uploading……',
|
|
429
|
+
'selectedCount': 'Selected files count:',
|
|
430
|
+
'limitCount': 'System limit count:',
|
|
431
|
+
'rechooseFile': ',Reselect upload file.',
|
|
432
|
+
'save': 'Save',
|
|
433
|
+
'cancel': 'Cancel',
|
|
434
|
+
'haveSameName': 'A file with the same name has been uploaded: ',
|
|
435
|
+
'rename': 'Rename',
|
|
436
|
+
'replace': 'Replace',
|
|
437
|
+
'sizeZero': 'File size is 0',
|
|
438
|
+
'uploadFailure': 'Upload failed',
|
|
439
|
+
'uploadSucceed': 'Upload successfully',
|
|
440
|
+
'wait': 'Wait a minute, the file is uploading.',
|
|
441
|
+
'saveTo': 'Saving file to',
|
|
442
|
+
'delete': 'Delete',
|
|
443
|
+
'selectAll': 'Select all',
|
|
444
|
+
'selectNull': 'Not at all',
|
|
445
|
+
'detail': 'Details',
|
|
446
|
+
'fileName': 'Filename',
|
|
447
|
+
'state': 'State',
|
|
448
|
+
'operation': 'Operation',
|
|
449
|
+
'size': 'Size',
|
|
450
|
+
'close': 'Close',
|
|
451
|
+
'loading': 'Loading'
|
|
452
|
+
},
|
|
453
|
+
'en': {
|
|
454
|
+
'uploadFile': 'Upload File',
|
|
455
|
+
'uploading': 'File Uploading……',
|
|
456
|
+
'selectedCount': 'Selected files count:',
|
|
457
|
+
'limitCount': 'System limit count:',
|
|
458
|
+
'rechooseFile': ',Reselect upload file.',
|
|
459
|
+
'save': 'Save',
|
|
460
|
+
'cancel': 'Cancel',
|
|
461
|
+
'haveSameName': 'A file with the same name has been uploaded: ',
|
|
462
|
+
'rename': 'Rename',
|
|
463
|
+
'replace': 'Replace',
|
|
464
|
+
'sizeZero': 'File size is 0',
|
|
465
|
+
'uploadFailure': 'Upload failed',
|
|
466
|
+
'uploadSucceed': 'Upload successfully',
|
|
467
|
+
'wait': 'Wait a minute, the file is uploading.',
|
|
468
|
+
'saveTo': 'Saving file to',
|
|
469
|
+
'delete': 'Delete',
|
|
470
|
+
'selectAll': 'Select all',
|
|
471
|
+
'selectNull': 'Not at all',
|
|
472
|
+
'detail': 'Details',
|
|
473
|
+
'fileName': 'Filename',
|
|
474
|
+
'state': 'State',
|
|
475
|
+
'operation': 'Operation',
|
|
476
|
+
'size': 'Size',
|
|
477
|
+
'close': 'Close',
|
|
478
|
+
'loading': 'Loading'
|
|
479
|
+
},
|
|
480
|
+
'zh-CHT': {
|
|
481
|
+
'uploadFile': '上傳文件',
|
|
482
|
+
'uploading': '正在上傳文件……',
|
|
483
|
+
'selectedCount': '已選擇文件數量:',
|
|
484
|
+
'limitCount': '超出系統限制數量:',
|
|
485
|
+
'rechooseFile': ',重新選擇上傳文件。',
|
|
486
|
+
'save': '保存',
|
|
487
|
+
'cancel': '取消',
|
|
488
|
+
'haveSameName': '已上傳過同名文件: ',
|
|
489
|
+
'rename': '重命名',
|
|
490
|
+
'replace': '替換',
|
|
491
|
+
'sizeZero': '文件大小為0',
|
|
492
|
+
'uploadFailure': '上傳失敗',
|
|
493
|
+
'uploadSucceed': '上傳成功',
|
|
494
|
+
'wait': '等一下,文件正在上傳。',
|
|
495
|
+
'saveTo': '正在將文件保存到',
|
|
496
|
+
'delete': '删除',
|
|
497
|
+
'selectAll': '全選',
|
|
498
|
+
'selectNull': '全不選',
|
|
499
|
+
'detail': '詳情',
|
|
500
|
+
'fileName': '文件名',
|
|
501
|
+
'state': '狀態',
|
|
502
|
+
'operation': '操作',
|
|
503
|
+
'size': '大小',
|
|
504
|
+
'close': '關閉',
|
|
505
|
+
'loading': '拼命加載中'
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* @fileoverview added by tsickle
|
|
511
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
512
|
+
*/
|
|
513
|
+
class LocalLangPipe {
|
|
514
|
+
/**
|
|
515
|
+
* @param {?} localeId
|
|
516
|
+
*/
|
|
517
|
+
constructor(localeId) {
|
|
518
|
+
this.defaultLang = "zh-CHS";
|
|
519
|
+
this.langCode = localStorage.getItem("languageCode") || localeId || this.defaultLang;
|
|
520
|
+
this.lang = LANG_RESOURCES[this.langCode] || LANG_RESOURCES[this.defaultLang];
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* @param {?} name
|
|
524
|
+
* @return {?}
|
|
525
|
+
*/
|
|
526
|
+
transform(name) {
|
|
527
|
+
return this.lang[name] || name;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
LocalLangPipe.decorators = [
|
|
531
|
+
{ type: Pipe, args: [{ name: 'locale' },] }
|
|
532
|
+
];
|
|
533
|
+
/** @nocollapse */
|
|
534
|
+
LocalLangPipe.ctorParameters = () => [
|
|
535
|
+
{ type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }
|
|
536
|
+
];
|
|
537
|
+
|
|
393
538
|
/**
|
|
394
539
|
* @fileoverview added by tsickle
|
|
395
540
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -438,15 +583,23 @@ class FileUploadComponent {
|
|
|
438
583
|
this.oldUploadedFileList = [];
|
|
439
584
|
//uploadedNameList = [];
|
|
440
585
|
this.sameNameAllowed = true;
|
|
586
|
+
this.checkboxPos = { top: '0px' };
|
|
441
587
|
this.fileType = "*";
|
|
442
588
|
this.fileCount = 0;
|
|
443
589
|
this.oldIdList = [];
|
|
590
|
+
this.totalLoad = null;
|
|
444
591
|
this.exStorageFileList = [];
|
|
592
|
+
if (this.injector) {
|
|
593
|
+
this.localeid = localStorage.getItem("languageCode") || this.injector.get(LOCALE_ID);
|
|
594
|
+
this.localepipe = new LocalLangPipe(this.localeid);
|
|
595
|
+
}
|
|
445
596
|
}
|
|
446
597
|
/**
|
|
447
598
|
* @return {?}
|
|
448
599
|
*/
|
|
449
600
|
ngOnInit() {
|
|
601
|
+
if (navigator.userAgent.indexOf('Firefox') >= 0)
|
|
602
|
+
this.checkboxPos.top = '14px';
|
|
450
603
|
//if (this.storageService != null) {
|
|
451
604
|
this.uploadService.getStorageExtensionInfo().subscribe((/**
|
|
452
605
|
* @param {?} res
|
|
@@ -496,15 +649,25 @@ class FileUploadComponent {
|
|
|
496
649
|
this.uploadService.cancel(this.oldIdList, this.rootId).subscribe();
|
|
497
650
|
}
|
|
498
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* @return {?}
|
|
654
|
+
*/
|
|
655
|
+
showLoading() {
|
|
656
|
+
if (this.totalLoad == null)
|
|
657
|
+
this.totalLoad = this.loadService.show({
|
|
658
|
+
message: this.localepipe.transform('uploading')
|
|
659
|
+
});
|
|
660
|
+
}
|
|
499
661
|
/**
|
|
500
662
|
* @param {?} $event
|
|
501
663
|
* @return {?}
|
|
502
664
|
*/
|
|
503
665
|
fileSelected($event) {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
666
|
+
// const loading = this.loadService.show({
|
|
667
|
+
// message: this.localepipe.transform('uploading')
|
|
668
|
+
// });
|
|
669
|
+
this.totalLoad.close();
|
|
670
|
+
this.totalLoad = null;
|
|
508
671
|
this.hasSelectedFile = true;
|
|
509
672
|
this.selectedFiles = document.querySelector('#file');
|
|
510
673
|
if (this.fileCount > 0) {
|
|
@@ -651,7 +814,7 @@ class FileUploadComponent {
|
|
|
651
814
|
this.files = this.files.slice();
|
|
652
815
|
this.fileAllSelected = false;
|
|
653
816
|
$event.target.value = '';
|
|
654
|
-
loading.close();
|
|
817
|
+
// loading.close();
|
|
655
818
|
}
|
|
656
819
|
/**
|
|
657
820
|
* @param {?} file
|
|
@@ -1215,7 +1378,7 @@ class FileUploadComponent {
|
|
|
1215
1378
|
FileUploadComponent.decorators = [
|
|
1216
1379
|
{ type: Component, args: [{
|
|
1217
1380
|
selector: 'app-file-upload',
|
|
1218
|
-
template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>{{'uploadFile' | locale}} </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectAll' | locale}}</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> {{'uploadFailure' | locale}} </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">{{'fileName' | locale}}</th>\n <th style=\"width: 100px; vertical-align: middle\">{{'size' | locale}}</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">{{'state' | locale}}</th>\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\n {{storageExtension.extensionName}}\n </th>\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">{{'operation' | locale}}</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> {{'uploadFailure' | locale}} </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> {{'uploadSucceed' | locale}}</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">{{'delete' | locale}}</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
|
|
1381
|
+
template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>{{'uploadFile' | locale}} </span>\n <input type=\"file\" (focus)=\"showLoading()\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectAll' | locale}}</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> {{'uploadFailure' | locale}} </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\" [ngStyle]=\"checkboxPos\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">{{'fileName' | locale}}</th>\n <th style=\"width: 100px; vertical-align: middle\">{{'size' | locale}}</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">{{'state' | locale}}</th>\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\n {{storageExtension.extensionName}}\n </th>\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">{{'operation' | locale}}</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> {{'uploadFailure' | locale}} </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> {{'uploadSucceed' | locale}}</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">{{'delete' | locale}}</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (focus)=\"showLoading()\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
|
|
1219
1382
|
styles: [".home_page{text-align:center}.home_page img{position:absolute;top:180px;margin-left:-35px;width:70px;height:56px}.home_page div{position:absolute;left:50%;top:255px;margin-left:-75px;width:150px;height:32px;overflow:hidden}.home_page div span{width:150px;height:32px;position:absolute;z-index:10;left:0}.home_page div input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)';z-index:11}.upload_button{width:110px;height:32px;overflow:hidden}.upload_button span{position:relative;right:-4px;top:4px;width:56px;height:22px;font-size:14px}.upload_button input{height:32px;width:110px;position:absolute;left:22px;top:12px;opacity:0;filter:'alpha(opacity=0)';overflow:hidden}.upload_button img{position:relative;left:-6px;top:3px;width:14px;height:14px}.button_group_upload{position:absolute;right:18px;top:12px;height:26px;width:53px}.button_group_upload button{height:26px;width:26px}.fileinput-button{position:absolute;right:60px;bottom:40px;overflow:hidden;width:24px;height:24px;border-radius:12px;transform:scale(2.5);-ms-transform:scale(2.5);-moz-transform:scale(2.5);-webkit-transform:scale(2.5);-o-transform:scale(2.5);color:#0686fd}.fileinput-button input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)'}.pic-droplist{height:24px;color:#e0e1e2;background-color:#e0e1e2}.pic-droplist input-group{display:table-cell;width:100px;text-align:center;border:0}.pic-droplist input-group div{border:0}.pic-droplist input-group div div,.pic-droplist input-group div input{background-color:#e0e1e2}.pic_list{padding:0;height:420px;overflow-y:auto;overflow-x:hidden}.pic_list ul{padding:0;list-style:none;width:100%;margin:20px 0 0 20px}.pic_list ul li{height:180px;width:135px;margin:8px 0 8px 12px;float:left;overflow:hidden;align-items:center;position:relative}.pic_list ul li div{width:135px;height:160px;margin:auto;display:table-cell;vertical-align:middle;text-align:center;position:relative}.pic_list ul li div img{max-width:120px;max-height:118px;align-items:center;margin:auto;vertical-align:middle;text-align:center}.pic_list ul li span.filename{width:100px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue_list{display:block;height:420px;overflow-y:auto}.file_list{list-style:none;margin:0;padding:0;overflow-x:hidden;overflow-y:auto}.file_list li{height:50px;line-height:35px;font-size:16px;position:relative}.file_list li button{float:right;top:6px;right:10px;width:20px}.file_list li p.title{padding:0 0 0 6px;margin:0 210px 0 0}.file_list li p.size{position:absolute;width:100px;top:0;right:100px}"]
|
|
1220
1383
|
}] }
|
|
1221
1384
|
];
|
|
@@ -1358,151 +1521,6 @@ DownloadService.decorators = [
|
|
|
1358
1521
|
/** @nocollapse */
|
|
1359
1522
|
DownloadService.ctorParameters = () => [];
|
|
1360
1523
|
|
|
1361
|
-
/**
|
|
1362
|
-
* @fileoverview added by tsickle
|
|
1363
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1364
|
-
*/
|
|
1365
|
-
/** @type {?} */
|
|
1366
|
-
const LANG_RESOURCES = {
|
|
1367
|
-
'zh-CHS': {
|
|
1368
|
-
'uploadFile': '上传文件',
|
|
1369
|
-
'uploading': '正在上传文件……',
|
|
1370
|
-
'selectedCount': '已选择文件数量:',
|
|
1371
|
-
'limitCount': '超出系统限制数量:',
|
|
1372
|
-
'rechooseFile': ',重新选择上传文件。',
|
|
1373
|
-
'save': '保存',
|
|
1374
|
-
'cancel': '取消',
|
|
1375
|
-
'haveSameName': '已上传过同名文件: ',
|
|
1376
|
-
'rename': '重命名',
|
|
1377
|
-
'replace': '替换',
|
|
1378
|
-
'sizeZero': '文件大小为0',
|
|
1379
|
-
'uploadFailure': '上传失败',
|
|
1380
|
-
'uploadSucceed': '上传成功',
|
|
1381
|
-
'wait': '等一下,文档正在上传。',
|
|
1382
|
-
'saveTo': '正在将文件保存到',
|
|
1383
|
-
'delete': '删除',
|
|
1384
|
-
'selectAll': '全选',
|
|
1385
|
-
'selectNull': '全不选',
|
|
1386
|
-
'detail': '详情',
|
|
1387
|
-
'fileName': '文件名',
|
|
1388
|
-
'state': '状态',
|
|
1389
|
-
'operation': '操作',
|
|
1390
|
-
'size': '大小',
|
|
1391
|
-
'close': '关闭',
|
|
1392
|
-
'loading': '拼命加载中'
|
|
1393
|
-
},
|
|
1394
|
-
'en-US': {
|
|
1395
|
-
'uploadFile': 'Upload File',
|
|
1396
|
-
'uploading': 'File Uploading……',
|
|
1397
|
-
'selectedCount': 'Selected files count:',
|
|
1398
|
-
'limitCount': 'System limit count:',
|
|
1399
|
-
'rechooseFile': ',Reselect upload file.',
|
|
1400
|
-
'save': 'Save',
|
|
1401
|
-
'cancel': 'Cancel',
|
|
1402
|
-
'haveSameName': 'A file with the same name has been uploaded: ',
|
|
1403
|
-
'rename': 'Rename',
|
|
1404
|
-
'replace': 'Replace',
|
|
1405
|
-
'sizeZero': 'File size is 0',
|
|
1406
|
-
'uploadFailure': 'Upload failed',
|
|
1407
|
-
'uploadSucceed': 'Upload successfully',
|
|
1408
|
-
'wait': 'Wait a minute, the file is uploading.',
|
|
1409
|
-
'saveTo': 'Saving file to',
|
|
1410
|
-
'delete': 'Delete',
|
|
1411
|
-
'selectAll': 'Select all',
|
|
1412
|
-
'selectNull': 'Not at all',
|
|
1413
|
-
'detail': 'Details',
|
|
1414
|
-
'fileName': 'Filename',
|
|
1415
|
-
'state': 'State',
|
|
1416
|
-
'operation': 'Operation',
|
|
1417
|
-
'size': 'Size',
|
|
1418
|
-
'close': 'Close',
|
|
1419
|
-
'loading': 'Loading'
|
|
1420
|
-
},
|
|
1421
|
-
'en': {
|
|
1422
|
-
'uploadFile': 'Upload File',
|
|
1423
|
-
'uploading': 'File Uploading……',
|
|
1424
|
-
'selectedCount': 'Selected files count:',
|
|
1425
|
-
'limitCount': 'System limit count:',
|
|
1426
|
-
'rechooseFile': ',Reselect upload file.',
|
|
1427
|
-
'save': 'Save',
|
|
1428
|
-
'cancel': 'Cancel',
|
|
1429
|
-
'haveSameName': 'A file with the same name has been uploaded: ',
|
|
1430
|
-
'rename': 'Rename',
|
|
1431
|
-
'replace': 'Replace',
|
|
1432
|
-
'sizeZero': 'File size is 0',
|
|
1433
|
-
'uploadFailure': 'Upload failed',
|
|
1434
|
-
'uploadSucceed': 'Upload successfully',
|
|
1435
|
-
'wait': 'Wait a minute, the file is uploading.',
|
|
1436
|
-
'saveTo': 'Saving file to',
|
|
1437
|
-
'delete': 'Delete',
|
|
1438
|
-
'selectAll': 'Select all',
|
|
1439
|
-
'selectNull': 'Not at all',
|
|
1440
|
-
'detail': 'Details',
|
|
1441
|
-
'fileName': 'Filename',
|
|
1442
|
-
'state': 'State',
|
|
1443
|
-
'operation': 'Operation',
|
|
1444
|
-
'size': 'Size',
|
|
1445
|
-
'close': 'Close',
|
|
1446
|
-
'loading': 'Loading'
|
|
1447
|
-
},
|
|
1448
|
-
'zh-CHT': {
|
|
1449
|
-
'uploadFile': '上傳文件',
|
|
1450
|
-
'uploading': '正在上傳文件……',
|
|
1451
|
-
'selectedCount': '已選擇文件數量:',
|
|
1452
|
-
'limitCount': '超出系統限制數量:',
|
|
1453
|
-
'rechooseFile': ',重新選擇上傳文件。',
|
|
1454
|
-
'save': '保存',
|
|
1455
|
-
'cancel': '取消',
|
|
1456
|
-
'haveSameName': '已上傳過同名文件: ',
|
|
1457
|
-
'rename': '重命名',
|
|
1458
|
-
'replace': '替換',
|
|
1459
|
-
'sizeZero': '文件大小為0',
|
|
1460
|
-
'uploadFailure': '上傳失敗',
|
|
1461
|
-
'uploadSucceed': '上傳成功',
|
|
1462
|
-
'wait': '等一下,文件正在上傳。',
|
|
1463
|
-
'saveTo': '正在將文件保存到',
|
|
1464
|
-
'delete': '删除',
|
|
1465
|
-
'selectAll': '全選',
|
|
1466
|
-
'selectNull': '全不選',
|
|
1467
|
-
'detail': '詳情',
|
|
1468
|
-
'fileName': '文件名',
|
|
1469
|
-
'state': '狀態',
|
|
1470
|
-
'operation': '操作',
|
|
1471
|
-
'size': '大小',
|
|
1472
|
-
'close': '關閉',
|
|
1473
|
-
'loading': '拼命加載中'
|
|
1474
|
-
},
|
|
1475
|
-
};
|
|
1476
|
-
|
|
1477
|
-
/**
|
|
1478
|
-
* @fileoverview added by tsickle
|
|
1479
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1480
|
-
*/
|
|
1481
|
-
class LocalLangPipe {
|
|
1482
|
-
/**
|
|
1483
|
-
* @param {?} localeId
|
|
1484
|
-
*/
|
|
1485
|
-
constructor(localeId) {
|
|
1486
|
-
this.defaultLang = "zh-CHS";
|
|
1487
|
-
this.langCode = localStorage.getItem("languageCode") || localeId || this.defaultLang;
|
|
1488
|
-
this.lang = LANG_RESOURCES[this.langCode] || LANG_RESOURCES[this.defaultLang];
|
|
1489
|
-
}
|
|
1490
|
-
/**
|
|
1491
|
-
* @param {?} name
|
|
1492
|
-
* @return {?}
|
|
1493
|
-
*/
|
|
1494
|
-
transform(name) {
|
|
1495
|
-
return this.lang[name] || name;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
LocalLangPipe.decorators = [
|
|
1499
|
-
{ type: Pipe, args: [{ name: 'locale' },] }
|
|
1500
|
-
];
|
|
1501
|
-
/** @nocollapse */
|
|
1502
|
-
LocalLangPipe.ctorParameters = () => [
|
|
1503
|
-
{ type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }
|
|
1504
|
-
];
|
|
1505
|
-
|
|
1506
1524
|
/**
|
|
1507
1525
|
* @fileoverview added by tsickle
|
|
1508
1526
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|