@gsp-svc/formdoc-upload 0.2.10 → 1.1.0
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 +377 -66
- 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/i18n/language.resource.js +30 -6
- package/esm2015/lib/upload/download.service.js +27 -6
- package/esm2015/lib/upload/entity/doctype.js +3 -1
- package/esm2015/lib/upload/entity/fileinfo.js +3 -1
- package/esm2015/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm2015/lib/upload/entity/uploadlimit.js +4 -1
- package/esm2015/lib/upload/file-upload/file-upload.component.js +304 -38
- package/esm2015/lib/upload/upload.module.js +3 -1
- package/esm2015/lib/upload/upload.service.js +8 -3
- package/esm2015/lib/uploaddialog.service.js +2 -1
- package/esm5/lib/i18n/language.resource.js +30 -6
- package/esm5/lib/upload/download.service.js +27 -6
- package/esm5/lib/upload/entity/doctype.js +3 -1
- package/esm5/lib/upload/entity/fileinfo.js +3 -1
- package/esm5/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm5/lib/upload/entity/uploadlimit.js +4 -1
- package/esm5/lib/upload/file-upload/file-upload.component.js +337 -50
- package/esm5/lib/upload/upload.module.js +3 -1
- package/esm5/lib/upload/upload.service.js +8 -3
- package/esm5/lib/uploaddialog.service.js +2 -1
- package/fesm2015/gsp-svc-formdoc-upload.js +350 -51
- package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
- package/fesm5/gsp-svc-formdoc-upload.js +383 -63
- package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
- package/gsp-svc-formdoc-upload.metadata.json +1 -1
- package/lib/i18n/language.resource.d.ts +24 -0
- package/lib/upload/entity/doctype.d.ts +2 -1
- package/lib/upload/entity/fileinfo.d.ts +1 -0
- package/lib/upload/entity/uploadfileinfo.d.ts +1 -0
- package/lib/upload/entity/uploadlimit.d.ts +1 -0
- package/lib/upload/file-upload/file-upload.component.d.ts +15 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@farris/ui-dialog'), require('@angular/common'), require('rxjs/observable/of'), require('rxjs/operators'), require('angular2-uuid'), require('@angular/platform-browser'), require('@farris/ui-messager'), require('@farris/ui-loading'), require('@farris/ui-progress'), require('@angular/forms'), require('@farris/ui-combo-list'), require('@farris/ui-forms'), require('@ecp-caf/caf-common'), require('@angular/core'), require('@farris/ui-modal'), require('rxjs'), require('@angular/common/http'), require('@farris/ui-notify')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@gsp-svc/formdoc-upload', ['exports', '@farris/ui-dialog', '@angular/common', 'rxjs/observable/of', 'rxjs/operators', 'angular2-uuid', '@angular/platform-browser', '@farris/ui-messager', '@farris/ui-loading', '@farris/ui-progress', '@angular/forms', '@farris/ui-combo-list', '@farris/ui-forms', '@ecp-caf/caf-common', '@angular/core', '@farris/ui-modal', 'rxjs', '@angular/common/http', '@farris/ui-notify'], factory) :
|
|
4
|
-
(factory((global['gsp-svc'] = global['gsp-svc'] || {}, global['gsp-svc']['formdoc-upload'] = {}),global.uiDialog,global.ng.common,global.rxjs['observable/of'],global.rxjs.operators,global.angular2Uuid,global.ng.platformBrowser,global.uiMessager,global.uiLoading,global.uiProgress,global.ng.forms,global.uiComboList,global.uiForms,global.cafCommon,global.ng.core,global.uiModal,global.rxjs,global.ng.common.http,global.uiNotify));
|
|
5
|
-
}(this, (function (exports,uiDialog,common,of,operators,angular2Uuid,platformBrowser,uiMessager,uiLoading,uiProgress,forms,uiComboList,uiForms,cafCommon,i0,uiModal,rxjs,http,uiNotify) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@farris/ui-dialog'), require('@angular/common'), require('rxjs/observable/of'), require('rxjs/operators'), require('angular2-uuid'), require('@angular/platform-browser'), require('@farris/ui-messager'), require('@farris/ui-loading'), require('@farris/ui-progress'), require('@angular/forms'), require('@farris/ui-combo-list'), require('@farris/ui-forms'), require('@farris/rtf'), require('@ecp-caf/caf-common'), require('@angular/core'), require('@farris/ui-modal'), require('rxjs'), require('@angular/common/http'), require('@farris/ui-notify')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@gsp-svc/formdoc-upload', ['exports', '@farris/ui-dialog', '@angular/common', 'rxjs/observable/of', 'rxjs/operators', 'angular2-uuid', '@angular/platform-browser', '@farris/ui-messager', '@farris/ui-loading', '@farris/ui-progress', '@angular/forms', '@farris/ui-combo-list', '@farris/ui-forms', '@farris/rtf', '@ecp-caf/caf-common', '@angular/core', '@farris/ui-modal', 'rxjs', '@angular/common/http', '@farris/ui-notify'], factory) :
|
|
4
|
+
(factory((global['gsp-svc'] = global['gsp-svc'] || {}, global['gsp-svc']['formdoc-upload'] = {}),global.uiDialog,global.ng.common,global.rxjs['observable/of'],global.rxjs.operators,global.angular2Uuid,global.ng.platformBrowser,global.uiMessager,global.uiLoading,global.uiProgress,global.ng.forms,global.uiComboList,global.uiForms,global.rtf,global.cafCommon,global.ng.core,global.uiModal,global.rxjs,global.ng.common.http,global.uiNotify));
|
|
5
|
+
}(this, (function (exports,uiDialog,common,of,operators,angular2Uuid,platformBrowser,uiMessager,uiLoading,uiProgress,forms,uiComboList,uiForms,rtf,cafCommon,i0,uiModal,rxjs,http,uiNotify) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @fileoverview added by tsickle
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
Txt: 4,
|
|
84
84
|
Image: 5,
|
|
85
85
|
Other: 6,
|
|
86
|
+
Zip: 7,
|
|
86
87
|
};
|
|
87
88
|
DocType[DocType.Word] = 'Word';
|
|
88
89
|
DocType[DocType.Excel] = 'Excel';
|
|
@@ -90,7 +91,8 @@
|
|
|
90
91
|
DocType[DocType.Pdf] = 'Pdf';
|
|
91
92
|
DocType[DocType.Txt] = 'Txt';
|
|
92
93
|
DocType[DocType.Image] = 'Image';
|
|
93
|
-
DocType[DocType.Other] = 'Other';
|
|
94
|
+
DocType[DocType.Other] = 'Other';
|
|
95
|
+
DocType[DocType.Zip] = 'Zip';
|
|
94
96
|
|
|
95
97
|
/**
|
|
96
98
|
* @fileoverview added by tsickle
|
|
@@ -305,7 +307,9 @@
|
|
|
305
307
|
/** @type {?} */
|
|
306
308
|
var url = "/api/runtime/dfs/v1.0/formdoc/slice";
|
|
307
309
|
//url = "/api/runtime/dfs/v1.0/formdoc/list";
|
|
308
|
-
|
|
310
|
+
/** @type {?} */
|
|
311
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
312
|
+
return this.httpclient.post(baseUrl, formdata).pipe(operators.tap(( /**
|
|
309
313
|
* @param {?} res
|
|
310
314
|
* @return {?}
|
|
311
315
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -400,11 +404,13 @@
|
|
|
400
404
|
/** @type {?} */
|
|
401
405
|
var url = "/api/runtime/dfs/v1.0/formdoc/copy";
|
|
402
406
|
/** @type {?} */
|
|
407
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
408
|
+
/** @type {?} */
|
|
403
409
|
var request = new CopyFileRequest;
|
|
404
410
|
request.metadataId = metadataId;
|
|
405
411
|
request.rootId = rootId;
|
|
406
412
|
request.path = path;
|
|
407
|
-
return this.httpclient.post(
|
|
413
|
+
return this.httpclient.post(baseUrl, request, { responseType: 'text' }).pipe(operators.tap(( /**
|
|
408
414
|
* @param {?} res
|
|
409
415
|
* @return {?}
|
|
410
416
|
*/function (res) { })));
|
|
@@ -543,7 +549,7 @@
|
|
|
543
549
|
'uploading': '正在上传文件……',
|
|
544
550
|
'selectedCount': '已选择文件数量:',
|
|
545
551
|
'limitCount': '超出系统限制数量:',
|
|
546
|
-
'rechooseFile': '
|
|
552
|
+
'rechooseFile': ',请重新选择上传文件。',
|
|
547
553
|
'save': '保存',
|
|
548
554
|
'cancel': '取消',
|
|
549
555
|
'haveSameName': '已上传过同名文件: ',
|
|
@@ -565,7 +571,13 @@
|
|
|
565
571
|
'size': '大小',
|
|
566
572
|
'close': '关闭',
|
|
567
573
|
'loading': '拼命加载中',
|
|
568
|
-
'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。'
|
|
574
|
+
'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。',
|
|
575
|
+
'invalidCharacters': '文件名包含特殊字符',
|
|
576
|
+
'invalidExtNames': '文档类型不允许上传',
|
|
577
|
+
'whiteExtNames': '。允许上传的文件类型为:',
|
|
578
|
+
'blackExtNames': '。不允许上传的文件类型为:',
|
|
579
|
+
'UnrecognizedFileType': '无法确定文件类型',
|
|
580
|
+
'fileNameOverSize': '文件名超出长度限制,最长允许'
|
|
569
581
|
},
|
|
570
582
|
'en-US': {
|
|
571
583
|
'uploadFile': 'Upload File',
|
|
@@ -594,7 +606,13 @@
|
|
|
594
606
|
'size': 'Size',
|
|
595
607
|
'close': 'Close',
|
|
596
608
|
'loading': 'Loading',
|
|
597
|
-
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
|
|
609
|
+
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
|
|
610
|
+
'invalidCharacters': 'The file name contains special characters',
|
|
611
|
+
'invalidExtNames': 'Document type does not allow uploading',
|
|
612
|
+
'whiteExtNames': '.The file types allowed for uploading are:',
|
|
613
|
+
'blackExtNames': '.The file types that are not allowed to be uploaded are:',
|
|
614
|
+
'UnrecognizedFileType': 'Unrecognized file type',
|
|
615
|
+
'fileNameOverSize': 'fileName oversize,the lengthest is'
|
|
598
616
|
},
|
|
599
617
|
'en': {
|
|
600
618
|
'uploadFile': 'Upload File',
|
|
@@ -623,7 +641,13 @@
|
|
|
623
641
|
'size': 'Size',
|
|
624
642
|
'close': 'Close',
|
|
625
643
|
'loading': 'Loading',
|
|
626
|
-
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
|
|
644
|
+
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
|
|
645
|
+
'invalidCharacters': 'The file name contains special characters',
|
|
646
|
+
'invalidExtNames': 'Document type does not allow uploading',
|
|
647
|
+
'whiteExtNames': '.The file types allowed for uploading are:',
|
|
648
|
+
'blackExtNames': '.The file types that are not allowed to be uploaded are:',
|
|
649
|
+
'UnrecognizedFileType': 'Unrecognized file type',
|
|
650
|
+
'fileNameOverSize': 'fileName oversize,the lengthest is'
|
|
627
651
|
},
|
|
628
652
|
'zh-CHT': {
|
|
629
653
|
'uploadFile': '上傳文件',
|
|
@@ -652,7 +676,13 @@
|
|
|
652
676
|
'size': '大小',
|
|
653
677
|
'close': '關閉',
|
|
654
678
|
'loading': '拼命加載中',
|
|
655
|
-
'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。'
|
|
679
|
+
'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。',
|
|
680
|
+
'invalidCharacters': '文件名包含特殊字符',
|
|
681
|
+
'invalidExtNames': '文檔類型不允許上傳',
|
|
682
|
+
'whiteExtNames': '。允許上傳的文件類型為:',
|
|
683
|
+
'blackExtNames': '。不允許上傳的文件類型為:',
|
|
684
|
+
'UnrecognizedFileType': '無法確定文件類型',
|
|
685
|
+
'fileNameOverSize': '文件名超出长度限制,最长允许'
|
|
656
686
|
},
|
|
657
687
|
};
|
|
658
688
|
|
|
@@ -746,12 +776,20 @@
|
|
|
746
776
|
this.errTypeList = [];
|
|
747
777
|
this.nullFileList = [];
|
|
748
778
|
this.beyondFileList = [];
|
|
779
|
+
this.fileNameOversizeList = [];
|
|
780
|
+
this.invalidCharactersFileList = [];
|
|
781
|
+
this.invalidExtNamesFileList = [];
|
|
782
|
+
this.unrecognizedTypeFileList = [];
|
|
783
|
+
this.invalidCharacters = '';
|
|
784
|
+
this.invalidExtNames = '';
|
|
749
785
|
this.showType = 0;
|
|
750
786
|
this.mouseOn = false;
|
|
787
|
+
this.isWhiteList = false;
|
|
751
788
|
this.bufferSize = 5 * 1024 * 1024;
|
|
752
789
|
this.selectedFileCount = 0;
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
790
|
+
this.uploadBtnDisabled = false;
|
|
791
|
+
this.uploadIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/upload.svg');
|
|
792
|
+
this.uploadLittleIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/uploadIcon.svg');
|
|
755
793
|
this.hasSelectedFile = false;
|
|
756
794
|
this.fileAllSelected = false;
|
|
757
795
|
this.uploadProcess = { width: '0%' };
|
|
@@ -771,6 +809,7 @@
|
|
|
771
809
|
this.uploadedFileInfoList = [];
|
|
772
810
|
this.oldUploadedFileList = [];
|
|
773
811
|
//uploadedNameList = [];
|
|
812
|
+
this.uploadInfoErrorMessage = "";
|
|
774
813
|
this.sameNameAllowed = true;
|
|
775
814
|
this.maxFileSize = 0;
|
|
776
815
|
this.checkboxPos = { top: '0px' };
|
|
@@ -778,6 +817,7 @@
|
|
|
778
817
|
this.fileCount = 0;
|
|
779
818
|
this.oldIdList = [];
|
|
780
819
|
this.securityInfo = null;
|
|
820
|
+
this.fileNameLength = 0;
|
|
781
821
|
this.totalLoad = null;
|
|
782
822
|
this.exStorageFileList = [];
|
|
783
823
|
if (this.injector) {
|
|
@@ -839,9 +879,18 @@
|
|
|
839
879
|
* @param {?} res
|
|
840
880
|
* @return {?}
|
|
841
881
|
*/function (res) {
|
|
842
|
-
if (res
|
|
882
|
+
if (res.error != null) {
|
|
883
|
+
_this.uploadInfoErrorMessage = res.error.Message;
|
|
884
|
+
// console.log('获取上传信息报错,错误信息为:',errMsg);
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
_this.uploadBtnDisabled = false;
|
|
843
889
|
_this.sameNameAllowed = res.sameNameAllowed;
|
|
844
890
|
_this.maxFileSize = parseInt(JSON.parse(res.validateConfiguration).maxFileSize);
|
|
891
|
+
_this.isWhiteList = JSON.parse(res.validateConfiguration).whiteList;
|
|
892
|
+
_this.invalidCharacters = JSON.parse(res.validateConfiguration).invalidCharacters;
|
|
893
|
+
_this.invalidExtNames = JSON.parse(res.validateConfiguration).invalidExtNames.toLowerCase();
|
|
845
894
|
_this.allowedMultiUpload = res.allowedMultiUpload;
|
|
846
895
|
if (!_this.sameNameAllowed) {
|
|
847
896
|
_this.uploadService.getUploadedFileInfoList(_this.formId, _this.rootId).subscribe(( /**
|
|
@@ -872,6 +921,51 @@
|
|
|
872
921
|
// message: this.localepipe.transform('uploading')
|
|
873
922
|
// });
|
|
874
923
|
};
|
|
924
|
+
/**
|
|
925
|
+
* @return {?}
|
|
926
|
+
*/
|
|
927
|
+
FileUploadComponent.prototype.getRightClass = /**
|
|
928
|
+
* @return {?}
|
|
929
|
+
*/
|
|
930
|
+
function () {
|
|
931
|
+
if (this.uploadBtnDisabled) {
|
|
932
|
+
return 'btn btn-primary btn-lg disabled';
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
return 'btn btn-primary btn-lg';
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* @param {?} name
|
|
940
|
+
* @return {?}
|
|
941
|
+
*/
|
|
942
|
+
FileUploadComponent.prototype.findInvalidCharacter = /**
|
|
943
|
+
* @param {?} name
|
|
944
|
+
* @return {?}
|
|
945
|
+
*/
|
|
946
|
+
function (name) {
|
|
947
|
+
/** @type {?} */
|
|
948
|
+
var charList = [];
|
|
949
|
+
this.invalidCharacters.split('|').forEach(( /**
|
|
950
|
+
* @param {?} element
|
|
951
|
+
* @return {?}
|
|
952
|
+
*/function (element) {
|
|
953
|
+
if (name.indexOf(element) >= 0)
|
|
954
|
+
charList.push(element);
|
|
955
|
+
}));
|
|
956
|
+
return charList;
|
|
957
|
+
};
|
|
958
|
+
/**
|
|
959
|
+
* @param {?} file
|
|
960
|
+
* @return {?}
|
|
961
|
+
*/
|
|
962
|
+
FileUploadComponent.prototype.hasFileType = /**
|
|
963
|
+
* @param {?} file
|
|
964
|
+
* @return {?}
|
|
965
|
+
*/
|
|
966
|
+
function (file) {
|
|
967
|
+
return file.name.includes('.');
|
|
968
|
+
};
|
|
875
969
|
/**
|
|
876
970
|
* @param {?} $event
|
|
877
971
|
* @return {?}
|
|
@@ -882,6 +976,11 @@
|
|
|
882
976
|
*/
|
|
883
977
|
function ($event) {
|
|
884
978
|
var _this = this;
|
|
979
|
+
if (this.uploadInfoErrorMessage) {
|
|
980
|
+
this.msgService.error(this.uploadInfoErrorMessage);
|
|
981
|
+
this.uploadBtnDisabled = true;
|
|
982
|
+
return;
|
|
983
|
+
}
|
|
885
984
|
this.hasSelectedFile = true;
|
|
886
985
|
this.selectedFiles = document.querySelector('#file');
|
|
887
986
|
if (this.fileCount > 0) {
|
|
@@ -895,6 +994,7 @@
|
|
|
895
994
|
var _loop_1 = function (i) {
|
|
896
995
|
/** @type {?} */
|
|
897
996
|
var selectedFile = this_1.selectedFiles.files[i];
|
|
997
|
+
selectedFile.isAllowedUpload = true;
|
|
898
998
|
//selectedFile.slice
|
|
899
999
|
/** @type {?} */
|
|
900
1000
|
var uuid = angular2Uuid.UUID.UUID();
|
|
@@ -902,12 +1002,92 @@
|
|
|
902
1002
|
this_1.nullFileList.push(selectedFile.name);
|
|
903
1003
|
return "continue";
|
|
904
1004
|
}
|
|
1005
|
+
if (this_1.fileNameLength > 0 && selectedFile.name.length > this_1.fileNameLength) {
|
|
1006
|
+
this_1.fileNameOversizeList.push(selectedFile.name);
|
|
1007
|
+
return "continue";
|
|
1008
|
+
}
|
|
905
1009
|
if (this_1.maxFileSize != null && this_1.maxFileSize > 0) {
|
|
906
1010
|
if (selectedFile.size > this_1.maxFileSize * 1000) {
|
|
907
1011
|
this_1.beyondFileList.push(selectedFile.name);
|
|
908
1012
|
return "continue";
|
|
909
1013
|
}
|
|
910
1014
|
}
|
|
1015
|
+
/** @type {?} */
|
|
1016
|
+
var invalidCharList = this_1.findInvalidCharacter(selectedFile.name);
|
|
1017
|
+
/** @type {?} */
|
|
1018
|
+
var invalidCharListFilter = invalidCharList.filter(( /**
|
|
1019
|
+
* @param {?} s
|
|
1020
|
+
* @return {?}
|
|
1021
|
+
*/function (s) {
|
|
1022
|
+
return s && s.trim();
|
|
1023
|
+
}));
|
|
1024
|
+
/** @type {?} */
|
|
1025
|
+
var errorMessage = "";
|
|
1026
|
+
if (invalidCharListFilter.length > 0) {
|
|
1027
|
+
invalidCharListFilter.forEach(( /**
|
|
1028
|
+
* @param {?} element
|
|
1029
|
+
* @param {?} index
|
|
1030
|
+
* @return {?}
|
|
1031
|
+
*/function (element, index) {
|
|
1032
|
+
errorMessage += "\"";
|
|
1033
|
+
errorMessage += element;
|
|
1034
|
+
errorMessage += "\"";
|
|
1035
|
+
errorMessage += (index === invalidCharListFilter.length - 1) ? "" : ",";
|
|
1036
|
+
}));
|
|
1037
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1038
|
+
selectedFile.isAllowedUpload = false;
|
|
1039
|
+
this_1.msgService.warning(this_1.localepipe.transform('invalidCharacters') + errorMessage + this_1.localepipe.transform('rechooseFile'));
|
|
1040
|
+
return { value: void 0 };
|
|
1041
|
+
}
|
|
1042
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1043
|
+
selectedFile.isAllowedUpload = false;
|
|
1044
|
+
this_1.invalidCharactersFileList.push(selectedFile.name);
|
|
1045
|
+
return "continue";
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
if (!this_1.hasFileType(selectedFile)) {
|
|
1049
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1050
|
+
selectedFile.isAllowedUpload = false;
|
|
1051
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('UnrecognizedFileType') + this_1.localepipe.transform('rechooseFile'));
|
|
1052
|
+
return { value: void 0 };
|
|
1053
|
+
}
|
|
1054
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1055
|
+
selectedFile.isAllowedUpload = false;
|
|
1056
|
+
this_1.unrecognizedTypeFileList.push(selectedFile.name);
|
|
1057
|
+
return "continue";
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
// let curFileSuffix = selectedFile.name.split('.')[1];
|
|
1061
|
+
/** @type {?} */
|
|
1062
|
+
var curFileSuffix = selectedFile.name.substr(selectedFile.name.lastIndexOf('.') + 1).toLowerCase();
|
|
1063
|
+
/** @type {?} */
|
|
1064
|
+
var extNames = this_1.listToString(this_1.invalidExtNames.split('|'));
|
|
1065
|
+
/** @type {?} */
|
|
1066
|
+
var extNamesAry = this_1.invalidExtNames.split('|');
|
|
1067
|
+
if (!this_1.isWhiteList && extNamesAry.includes(curFileSuffix)) {
|
|
1068
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1069
|
+
selectedFile.isAllowedUpload = false;
|
|
1070
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('blackExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
|
|
1071
|
+
return { value: void 0 };
|
|
1072
|
+
}
|
|
1073
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1074
|
+
selectedFile.isAllowedUpload = false;
|
|
1075
|
+
this_1.invalidExtNamesFileList.push(selectedFile.name);
|
|
1076
|
+
return "continue";
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
if (this_1.isWhiteList && !extNamesAry.includes(curFileSuffix)) {
|
|
1080
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1081
|
+
selectedFile.isAllowedUpload = false;
|
|
1082
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('whiteExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
|
|
1083
|
+
return { value: void 0 };
|
|
1084
|
+
}
|
|
1085
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1086
|
+
selectedFile.isAllowedUpload = false;
|
|
1087
|
+
this_1.invalidExtNamesFileList.push(selectedFile.name);
|
|
1088
|
+
return "continue";
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
911
1091
|
if (!this_1.sameNameAllowed) {
|
|
912
1092
|
if (this_1.uploadedFileInfoList.find(( /**
|
|
913
1093
|
* @param {?} x
|
|
@@ -986,12 +1166,16 @@
|
|
|
986
1166
|
return "continue";
|
|
987
1167
|
}
|
|
988
1168
|
}
|
|
989
|
-
|
|
1169
|
+
if (selectedFile.isAllowedUpload === true) {
|
|
1170
|
+
this_1.uploadFile(uuid, selectedFile, selectedFile.name);
|
|
1171
|
+
}
|
|
990
1172
|
};
|
|
991
1173
|
var this_1 = this;
|
|
992
1174
|
//this.flag = 0;
|
|
993
1175
|
for (var i = 0; i < this.selectedFiles.files.length; i++) {
|
|
994
|
-
_loop_1(i);
|
|
1176
|
+
var state_1 = _loop_1(i);
|
|
1177
|
+
if (typeof state_1 === "object")
|
|
1178
|
+
return state_1.value;
|
|
995
1179
|
}
|
|
996
1180
|
if (this.errFileList.length > 0) {
|
|
997
1181
|
/** @type {?} */
|
|
@@ -1002,17 +1186,39 @@
|
|
|
1002
1186
|
if (this.nullFileList.length > 0) {
|
|
1003
1187
|
/** @type {?} */
|
|
1004
1188
|
var name_2 = this.listToString(this.nullFileList);
|
|
1005
|
-
name_2 = name_2.substring(0, name_2.length - 1);
|
|
1006
1189
|
this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
|
|
1007
1190
|
this.nullFileList = [];
|
|
1008
1191
|
}
|
|
1192
|
+
if (this.fileNameOversizeList.length > 0) {
|
|
1193
|
+
/** @type {?} */
|
|
1194
|
+
var name_3 = this.listToString(this.fileNameOversizeList);
|
|
1195
|
+
this.msgService.warning(name_3 + this.localepipe.transform('fileNameOverSize') + this.fileNameLength + this.localepipe.transform('rechooseFile'));
|
|
1196
|
+
this.fileNameOversizeList = [];
|
|
1197
|
+
}
|
|
1009
1198
|
if (this.beyondFileList.length > 0) {
|
|
1010
1199
|
/** @type {?} */
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
this.msgService.warning(name_3 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
|
|
1200
|
+
var name_4 = this.listToString(this.beyondFileList);
|
|
1201
|
+
this.msgService.warning(name_4 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
|
|
1014
1202
|
this.beyondFileList = [];
|
|
1015
1203
|
}
|
|
1204
|
+
if (this.invalidCharactersFileList.length > 0) {
|
|
1205
|
+
/** @type {?} */
|
|
1206
|
+
var name_5 = this.listToString(this.invalidCharactersFileList);
|
|
1207
|
+
this.msgService.warning(name_5 + this.localepipe.transform('invalidCharacters') + this.localepipe.transform('rechooseFile'));
|
|
1208
|
+
this.invalidCharactersFileList = [];
|
|
1209
|
+
}
|
|
1210
|
+
if (this.invalidExtNamesFileList.length > 0) {
|
|
1211
|
+
/** @type {?} */
|
|
1212
|
+
var name_6 = this.listToString(this.invalidExtNamesFileList);
|
|
1213
|
+
this.msgService.warning(name_6 + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('rechooseFile'));
|
|
1214
|
+
this.invalidExtNamesFileList = [];
|
|
1215
|
+
}
|
|
1216
|
+
if (this.unrecognizedTypeFileList.length > 0) {
|
|
1217
|
+
/** @type {?} */
|
|
1218
|
+
var name_7 = this.listToString(this.unrecognizedTypeFileList);
|
|
1219
|
+
this.msgService.warning(name_7 + this.localepipe.transform('UnrecognizedFileType') + this.localepipe.transform('rechooseFile'));
|
|
1220
|
+
this.unrecognizedTypeFileList = [];
|
|
1221
|
+
}
|
|
1016
1222
|
this.files = this.files.slice();
|
|
1017
1223
|
this.fileAllSelected = false;
|
|
1018
1224
|
$event.target.value = '';
|
|
@@ -1064,7 +1270,8 @@
|
|
|
1064
1270
|
extensionDropListId: 0,
|
|
1065
1271
|
extensionName: "",
|
|
1066
1272
|
securityDropListId: 0,
|
|
1067
|
-
securityInfo: this.securityInfoList[0]
|
|
1273
|
+
securityInfo: this.securityInfoList[0],
|
|
1274
|
+
style: {}
|
|
1068
1275
|
};
|
|
1069
1276
|
if (this.storageExtension != null)
|
|
1070
1277
|
fileInfo.extensionName = this.defaultPropertyName;
|
|
@@ -1091,6 +1298,9 @@
|
|
|
1091
1298
|
else if (type.includes("powerpoint") || type.includes("presentation")) {
|
|
1092
1299
|
this.addDocInfo(selectedFile, fileInfo, DocType.Powerpoint);
|
|
1093
1300
|
}
|
|
1301
|
+
else if (type.includes("zip") || selectedFile.name.includes(".rar")) {
|
|
1302
|
+
this.addDocInfo(selectedFile, fileInfo, DocType.Zip);
|
|
1303
|
+
}
|
|
1094
1304
|
else {
|
|
1095
1305
|
this.addDocInfo(selectedFile, fileInfo, DocType.Other);
|
|
1096
1306
|
// let name: string = selectedFile.name;
|
|
@@ -1125,6 +1335,7 @@
|
|
|
1125
1335
|
uploadFileInfo.metadataId = uuid;
|
|
1126
1336
|
uploadFileInfo.fileName = fileInfo.name;
|
|
1127
1337
|
uploadFileInfo.fileSize = fileInfo.size;
|
|
1338
|
+
uploadFileInfo.originalSize = fileInfo.fileSize;
|
|
1128
1339
|
uploadFileInfo.state = state;
|
|
1129
1340
|
uploadFileInfo.securityInfo = this.securityInfoList[0];
|
|
1130
1341
|
//判断是否支持分片上传
|
|
@@ -1233,19 +1444,21 @@
|
|
|
1233
1444
|
}
|
|
1234
1445
|
else {
|
|
1235
1446
|
/** @type {?} */
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1447
|
+
var entity_1 = new GspFormStreamEntity;
|
|
1448
|
+
entity_1.formId = this.formId;
|
|
1449
|
+
entity_1.metadataId = uuid;
|
|
1450
|
+
entity_1.mode = OperatingModes.Temp;
|
|
1451
|
+
entity_1.rootId = this.rootId;
|
|
1452
|
+
entity_1.size = selectedFile.size;
|
|
1453
|
+
entity_1.fileName = fileName;
|
|
1243
1454
|
if (this.haveExtensionProperty)
|
|
1244
|
-
|
|
1455
|
+
entity_1.exPropertyName = this.defaultPropertyName;
|
|
1245
1456
|
/** @type {?} */
|
|
1246
1457
|
var formData = new FormData();
|
|
1247
|
-
formData.append('uploadEntity', JSON.stringify(
|
|
1458
|
+
formData.append('uploadEntity', JSON.stringify(entity_1));
|
|
1248
1459
|
formData.append('file', selectedFile);
|
|
1460
|
+
/** @type {?} */
|
|
1461
|
+
var intervalId_1;
|
|
1249
1462
|
this.uploadSingleFile(formData).subscribe(( /**
|
|
1250
1463
|
* @param {?} res
|
|
1251
1464
|
* @return {?}
|
|
@@ -1262,25 +1475,65 @@
|
|
|
1262
1475
|
_this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
|
|
1263
1476
|
_this.uploadedFileTotal++;
|
|
1264
1477
|
}
|
|
1478
|
+
clearInterval(intervalId_1);
|
|
1265
1479
|
}));
|
|
1480
|
+
/** @type {?} */
|
|
1481
|
+
var index_1 = -1;
|
|
1482
|
+
this.files.forEach(( /**
|
|
1483
|
+
* @param {?} x
|
|
1484
|
+
* @return {?}
|
|
1485
|
+
*/function (x) {
|
|
1486
|
+
if (x.name == fileInfo.name) {
|
|
1487
|
+
if (index_1 == -1)
|
|
1488
|
+
index_1 = _this.files.indexOf(x);
|
|
1489
|
+
}
|
|
1490
|
+
}));
|
|
1491
|
+
if (index_1 != -1 && index_1 != this.files.length - 1) {
|
|
1492
|
+
this.files.splice(index_1, 1);
|
|
1493
|
+
this.uploadFileInfoList.splice(index_1, 1);
|
|
1494
|
+
this.uploadedFileInfoList.splice(index_1, 1);
|
|
1495
|
+
this.uploadedFileTotal--;
|
|
1496
|
+
}
|
|
1497
|
+
intervalId_1 = setInterval(( /**
|
|
1498
|
+
* @return {?}
|
|
1499
|
+
*/function () {
|
|
1500
|
+
_this.getUploadProcess(entity_1.metadataId).subscribe(( /**
|
|
1501
|
+
* @param {?} res
|
|
1502
|
+
* @return {?}
|
|
1503
|
+
*/function (res) {
|
|
1504
|
+
if (res.error != null)
|
|
1505
|
+
_this.files[_this.files.indexOf(fileInfo)].uploadProcess = 10;
|
|
1506
|
+
else {
|
|
1507
|
+
if (res < 10)
|
|
1508
|
+
res = 10;
|
|
1509
|
+
if (res > 90)
|
|
1510
|
+
res = 90;
|
|
1511
|
+
_this.files[_this.files.indexOf(fileInfo)].uploadProcess = res;
|
|
1512
|
+
}
|
|
1513
|
+
}));
|
|
1514
|
+
}), 200);
|
|
1266
1515
|
}
|
|
1516
|
+
};
|
|
1517
|
+
/**
|
|
1518
|
+
* @param {?} metadataId
|
|
1519
|
+
* @return {?}
|
|
1520
|
+
*/
|
|
1521
|
+
FileUploadComponent.prototype.getUploadProcess = /**
|
|
1522
|
+
* @param {?} metadataId
|
|
1523
|
+
* @return {?}
|
|
1524
|
+
*/
|
|
1525
|
+
function (metadataId) {
|
|
1267
1526
|
/** @type {?} */
|
|
1268
|
-
var
|
|
1269
|
-
this.
|
|
1270
|
-
* @param {?}
|
|
1527
|
+
var url = "/api/runtime/dfs/v1.0/formdoc/upload/process?metadataid=" + metadataId;
|
|
1528
|
+
return this.httpclient.get(url).pipe(operators.tap(( /**
|
|
1529
|
+
* @param {?} res
|
|
1271
1530
|
* @return {?}
|
|
1272
|
-
*/function (
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
}));
|
|
1278
|
-
if (index != -1 && index != this.files.length - 1) {
|
|
1279
|
-
this.files.splice(index, 1);
|
|
1280
|
-
this.uploadFileInfoList.splice(index, 1);
|
|
1281
|
-
this.uploadedFileInfoList.splice(index, 1);
|
|
1282
|
-
//this.uploadedFileTotal--;
|
|
1283
|
-
}
|
|
1531
|
+
*/function (res) { })), operators.catchError(( /**
|
|
1532
|
+
* @param {?} error
|
|
1533
|
+
* @return {?}
|
|
1534
|
+
*/function (error) {
|
|
1535
|
+
return rxjs.of(error);
|
|
1536
|
+
})));
|
|
1284
1537
|
};
|
|
1285
1538
|
/**
|
|
1286
1539
|
* @param {?} formdata
|
|
@@ -1293,7 +1546,9 @@
|
|
|
1293
1546
|
function (formdata) {
|
|
1294
1547
|
/** @type {?} */
|
|
1295
1548
|
var url = "/api/runtime/dfs/v1.0/formdoc/single";
|
|
1296
|
-
|
|
1549
|
+
/** @type {?} */
|
|
1550
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
1551
|
+
return this.httpclient.post(baseUrl, formdata).pipe(operators.tap(( /**
|
|
1297
1552
|
* @param {?} res
|
|
1298
1553
|
* @return {?}
|
|
1299
1554
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -1314,7 +1569,9 @@
|
|
|
1314
1569
|
function (formdata) {
|
|
1315
1570
|
/** @type {?} */
|
|
1316
1571
|
var url = "/api/runtime/dfs/v1.0/formdoc/slice";
|
|
1317
|
-
|
|
1572
|
+
/** @type {?} */
|
|
1573
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
1574
|
+
return this.httpclient.post(baseUrl, formdata).pipe(operators.tap(( /**
|
|
1318
1575
|
* @param {?} res
|
|
1319
1576
|
* @return {?}
|
|
1320
1577
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -1335,7 +1592,9 @@
|
|
|
1335
1592
|
function (request) {
|
|
1336
1593
|
/** @type {?} */
|
|
1337
1594
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/init";
|
|
1338
|
-
|
|
1595
|
+
/** @type {?} */
|
|
1596
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
1597
|
+
return this.httpclient.post(baseUrl, request).pipe(operators.tap(( /**
|
|
1339
1598
|
* @param {?} res
|
|
1340
1599
|
* @return {?}
|
|
1341
1600
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -1356,7 +1615,9 @@
|
|
|
1356
1615
|
function (formdata) {
|
|
1357
1616
|
/** @type {?} */
|
|
1358
1617
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/upload";
|
|
1359
|
-
|
|
1618
|
+
/** @type {?} */
|
|
1619
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
1620
|
+
return this.httpclient.post(baseUrl, formdata).pipe(operators.tap(( /**
|
|
1360
1621
|
* @param {?} res
|
|
1361
1622
|
* @return {?}
|
|
1362
1623
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -1377,7 +1638,9 @@
|
|
|
1377
1638
|
function (request) {
|
|
1378
1639
|
/** @type {?} */
|
|
1379
1640
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/complete";
|
|
1380
|
-
|
|
1641
|
+
/** @type {?} */
|
|
1642
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
1643
|
+
return this.httpclient.post(baseUrl, request).pipe(operators.tap(( /**
|
|
1381
1644
|
* @param {?} res
|
|
1382
1645
|
* @return {?}
|
|
1383
1646
|
*/function (res) { })), operators.catchError(( /**
|
|
@@ -1563,32 +1826,37 @@
|
|
|
1563
1826
|
var _this = this;
|
|
1564
1827
|
switch (docType) {
|
|
1565
1828
|
case DocType.Word: {
|
|
1566
|
-
fileInfo.source = "/platform/runtime/dfs/images/word.png";
|
|
1829
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/word.png");
|
|
1567
1830
|
this.files.push(fileInfo);
|
|
1568
1831
|
break;
|
|
1569
1832
|
}
|
|
1570
1833
|
case DocType.Pdf: {
|
|
1571
|
-
fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
|
|
1834
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/pdf.png");
|
|
1572
1835
|
this.files.push(fileInfo);
|
|
1573
1836
|
break;
|
|
1574
1837
|
}
|
|
1575
1838
|
case DocType.Excel: {
|
|
1576
|
-
fileInfo.source = "/platform/runtime/dfs/images/excel.png";
|
|
1839
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/excel.png");
|
|
1577
1840
|
this.files.push(fileInfo);
|
|
1578
1841
|
break;
|
|
1579
1842
|
}
|
|
1580
1843
|
case DocType.Txt: {
|
|
1581
|
-
fileInfo.source = "/platform/runtime/dfs/images/txt.png";
|
|
1844
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/txt.png");
|
|
1845
|
+
this.files.push(fileInfo);
|
|
1846
|
+
break;
|
|
1847
|
+
}
|
|
1848
|
+
case DocType.Zip: {
|
|
1849
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/zip.png");
|
|
1582
1850
|
this.files.push(fileInfo);
|
|
1583
1851
|
break;
|
|
1584
1852
|
}
|
|
1585
1853
|
case DocType.Powerpoint: {
|
|
1586
|
-
fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
|
|
1854
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/ppt.png");
|
|
1587
1855
|
this.files.push(fileInfo);
|
|
1588
1856
|
break;
|
|
1589
1857
|
}
|
|
1590
1858
|
case DocType.Other: {
|
|
1591
|
-
fileInfo.source = "/platform/runtime/dfs/images/file.png";
|
|
1859
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/file.png");
|
|
1592
1860
|
this.files.push(fileInfo);
|
|
1593
1861
|
break;
|
|
1594
1862
|
}
|
|
@@ -1608,6 +1876,7 @@
|
|
|
1608
1876
|
imgUrl = sanitizer.bypassSecurityTrustResourceUrl(imgUrl);
|
|
1609
1877
|
}
|
|
1610
1878
|
fileInfo.source = imgUrl;
|
|
1879
|
+
fileInfo.style = { "max-width": "120px", "max-height": "118px" };
|
|
1611
1880
|
_this.files.push(fileInfo);
|
|
1612
1881
|
//因为异步处理的差异,补偿一次删除
|
|
1613
1882
|
/** @type {?} */
|
|
@@ -1640,9 +1909,14 @@
|
|
|
1640
1909
|
*/
|
|
1641
1910
|
function (strList) {
|
|
1642
1911
|
/** @type {?} */
|
|
1912
|
+
var result = strList.filter(( /**
|
|
1913
|
+
* @param {?} item
|
|
1914
|
+
* @return {?}
|
|
1915
|
+
*/function (item) { return item.trim() !== ''; }));
|
|
1916
|
+
/** @type {?} */
|
|
1643
1917
|
var name = "";
|
|
1644
|
-
for (var i = 0; i <
|
|
1645
|
-
name +=
|
|
1918
|
+
for (var i = 0; i < result.length; i++) {
|
|
1919
|
+
name += result[i] + (i === result.length - 1 ? "" : ",");
|
|
1646
1920
|
}
|
|
1647
1921
|
return name;
|
|
1648
1922
|
};
|
|
@@ -1861,11 +2135,24 @@
|
|
|
1861
2135
|
function (file) {
|
|
1862
2136
|
file.mouseOn = false;
|
|
1863
2137
|
};
|
|
2138
|
+
/**
|
|
2139
|
+
* @param {?} oldUrl
|
|
2140
|
+
* @return {?}
|
|
2141
|
+
*/
|
|
2142
|
+
FileUploadComponent.prototype.createBaseUrl = /**
|
|
2143
|
+
* @param {?} oldUrl
|
|
2144
|
+
* @return {?}
|
|
2145
|
+
*/
|
|
2146
|
+
function (oldUrl) {
|
|
2147
|
+
/** @type {?} */
|
|
2148
|
+
var baseUrl = rtf.BasePathService.convertPath(oldUrl);
|
|
2149
|
+
return baseUrl;
|
|
2150
|
+
};
|
|
1864
2151
|
FileUploadComponent.decorators = [
|
|
1865
2152
|
{ type: i0.Component, args: [{
|
|
1866
2153
|
selector: 'app-file-upload',
|
|
1867
|
-
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\"\n title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\"\n 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\"\n class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\"\n class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\"\n class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <farris-radio-group class=\"button_group_upload\" [(model)]=\"radioButtonGroupValue\" [horizontal]=\"false\">\n <farris-radio-button [label]=\"'showByGroup'\" (click)=\"showByGroup()\">\n <span class=\"f-icon f-icon-sudoku-new\"> </span>\n </farris-radio-button>\n <farris-radio-button [label]=\"'showByList'\" (click)=\"showByList()\">\n <span class=\"f-icon f-icon-page-title-define\"> </span>\n </farris-radio-button>\n\n </farris-radio-group>\n\n <!-- <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \"\n style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\"\n [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\"\n (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'\"\n [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\"\n 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-warn\"></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; \"\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' |\n 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\"\n 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\"\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\"\n [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 *ngIf=\"haveSecurityInfo\"\n 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]=\"securityInfoList\"\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"securityChange($event,file)\"\n [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 [ngStyle]=\"checkboxPos\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\"\n [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\"\n 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\"\n style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px; border: none;\"\n (click)=\"listDeleteFile(file)\">\n <span style=\"position: relative; right: 2px; \" class=\"f-icon f-icon-delete\"> </span>\n </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\"\n [(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\"\n [(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\"\n (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' |\n locale}}</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\"\n style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\"\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\"\n [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&&haveSecurityInfo\"\n style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"securityInfoList\"\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"securityChange($event,file)\"\n [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\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\"\n (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\">{{'uploadFile' | locale}} </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n <!-- <input type=\"file\" (focus)=\"showLoading()\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\"> -->\n </div>\n</div>",
|
|
1868
|
-
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:90px}.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:
|
|
2154
|
+
template: "<div *ngIf=\"hasSelectedFile\">\r\n\r\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\r\n <div class=\"btn btn-secondary upload_button\">\r\n <img [src]=\"uploadLittleIconAddress\">\r\n <span>{{'uploadFile' | locale}} </span>\r\n <input type=\"file\" (focus)=\"showLoading()\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\"\r\n title=\"\" [accept]=\"fileType\" [disabled]=\"uploadBtnDisabled\">\r\n </div>\r\n\r\n\r\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\"\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectAll' | locale}}</button>\r\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\"\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\r\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\"\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\r\n\r\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\"\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\r\n <span class=\"help_text\" *ngIf=\"files.length >0\">\u6587\u4EF6\u4E2A\u6570\uFF1A{{files.length}}</span>\r\n\r\n <farris-radio-group class=\"button_group_upload\" [(model)]=\"radioButtonGroupValue\" [horizontal]=\"false\">\r\n <farris-radio-button [label]=\"'showByGroup'\" (click)=\"showByGroup()\">\r\n <span class=\"f-icon f-icon-sudoku-new\"> </span>\r\n </farris-radio-button>\r\n <farris-radio-button [label]=\"'showByList'\" (click)=\"showByList()\">\r\n <span class=\"f-icon f-icon-page-title-define\"> </span>\r\n </farris-radio-button>\r\n\r\n </farris-radio-group>\r\n\r\n <!-- <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \"\r\n style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\r\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\"\r\n [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\r\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\"\r\n (click)=\"showByList()\"></button>\r\n </kendo-buttongroup> -->\r\n\r\n\r\n </div>\r\n\r\n <!-- <div class=\"progress\" style=\"height: 12px;\">\r\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\r\n </div> -->\r\n\r\n <div class=\"pic_list\" *ngIf=\"showType==0\">\r\n <ul *ngFor=\"let file of files\">\r\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\r\n <div *ngIf=\"file.isUploading\">\r\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\"\r\n [status]=\"'active'\"></farris-progress>\r\n </div>\r\n\r\n <table *ngIf=\"!file.uploadResult && !file.isUploading\"\r\n style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\r\n <tr style=\"margin: 0 auto ; height: 80px;\">\r\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-warn\"></span></td>\r\n </tr>\r\n <tr style=\"margin: 0 auto ; height: 30px;\">\r\n <td style=\"text-align: center\"> {{'uploadFailure' | locale}} </td>\r\n </tr>\r\n <tr>\r\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \"\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' |\r\n locale}}</button></td>\r\n </tr>\r\n </table>\r\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\r\n <img [src]='file.source' [ngStyle]=\"file.style\">\r\n <div *ngIf=\"haveExtensionProperty\"\r\n style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\r\n\r\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\r\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\"\r\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\"\r\n [enableClear]=\"false\">\r\n <!-- <ng-template #itemTemp let-item>\r\n <div class=\"combo-list\">\r\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\r\n <span class=\"combo-list-label\">{{item.label}}</span>\r\n </div>\r\n </ng-template> -->\r\n </farris-combo-list>\r\n </div>\r\n </div>\r\n <div *ngIf=\"haveSecurityInfo\"\r\n style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\r\n\r\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\r\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"securityInfoList\"\r\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"securityChange($event,file)\"\r\n [enableClear]=\"false\">\r\n <!-- <ng-template #itemTemp let-item>\r\n <div class=\"combo-list\">\r\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\r\n <span class=\"combo-list-label\">{{item.label}}</span>\r\n </div>\r\n </ng-template> -->\r\n </farris-combo-list>\r\n </div>\r\n </div>\r\n </div>\r\n <table *ngIf=\"!file.isUploading\">\r\n <tr style=\"height: 20px\">\r\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\r\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\r\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\r\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\"\r\n [ngStyle]=\"checkboxPos\">\r\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\"\r\n [(ngModel)]=\"file.selectd\">\r\n <label class=\"custom-control-label\"\r\n style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\r\n </div>\r\n </div>\r\n </td>\r\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\r\n {{file.picListDisplayName}}</td>\r\n </tr>\r\n </table>\r\n <!-- <span>{{file.picListDisplayName}}</span> -->\r\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\r\n <button *ngIf=\"!file.isUploading && file.mouseOn\"\r\n style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px; border: none;\"\r\n (click)=\"listDeleteFile(file)\">\r\n <span style=\"position: relative; right: 2px; \" class=\"f-icon f-icon-delete\"> </span>\r\n </button>\r\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\r\n </li>\r\n </ul>\r\n <br>\r\n </div>\r\n\r\n <div class=\"queue_list\" *ngIf=\"showType==1\">\r\n <table>\r\n <tr style=\"height: 50px; table-layout:fixed;\">\r\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\r\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\r\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\r\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\r\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\"\r\n [(ngModel)]=\"fileAllSelected\">\r\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\r\n </div>\r\n </div>\r\n </th>\r\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">{{'fileName' | locale}}</th>\r\n <th style=\"width: 100px; vertical-align: middle\">{{'size' | locale}}</th>\r\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">{{'state' | locale}}</th>\r\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\r\n {{storageExtension.extensionName}}\r\n </th>\r\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">{{'operation' | locale}}</th>\r\n </tr>\r\n </table>\r\n <div style=\"height: 370px; overflow: auto;\">\r\n <table>\r\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\r\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\r\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\r\n <div style=\"width: 500px;margin:0 auto\">\r\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\r\n </farris-progress>\r\n </div>\r\n\r\n </td>\r\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\r\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\r\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\r\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\r\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\"\r\n [(ngModel)]=\"file.selectd\">\r\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\r\n </div>\r\n </div>\r\n </td>\r\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\r\n {{file.queueListDisplayName}}</td>\r\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\r\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\r\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\r\n <tr style=\"margin: 0 auto\">\r\n <td><span class=\"f-icon f-icon-error\"></span></td>\r\n <td> {{'uploadFailure' | locale}} </td>\r\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\"\r\n (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\r\n </tr>\r\n </table>\r\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\r\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\r\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> {{'uploadSucceed' |\r\n locale}}</span>\r\n </td>\r\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\"\r\n style=\"text-align: center; width: 100px; vertical-align: middle;\">\r\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\"\r\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\"\r\n [enableClear]=\"false\">\r\n <!-- <ng-template #itemTemp let-item>\r\n <div class=\"combo-list\">\r\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\r\n <span class=\"combo-list-label\">{{item.label}}</span>\r\n </div>\r\n </ng-template> -->\r\n </farris-combo-list>\r\n </td>\r\n <td *ngIf=\"!file.isUploading&&haveSecurityInfo\"\r\n style=\"text-align: center; width: 100px; vertical-align: middle;\">\r\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"securityInfoList\"\r\n [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"securityChange($event,file)\"\r\n [enableClear]=\"false\">\r\n <!-- <ng-template #itemTemp let-item>\r\n <div class=\"combo-list\">\r\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\r\n <span class=\"combo-list-label\">{{item.label}}</span>\r\n </div>\r\n </ng-template> -->\r\n </farris-combo-list>\r\n </td>\r\n\r\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\r\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\r\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\"\r\n (click)=\"listDeleteFile(file)\">{{'delete' | locale}}</button>\r\n </td>\r\n\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\r\n <img [src]=\"uploadIconAddress\">\r\n <div>\r\n <span [class]=\"getRightClass()\">{{'uploadFile' | locale}} </span>\r\n <input type=\"file\" style=\"height: 32px;\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\" [disabled]=\"uploadBtnDisabled\">\r\n <!-- <input type=\"file\" (focus)=\"showLoading()\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\"> -->\r\n </div>\r\n</div>\r\n",
|
|
2155
|
+
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:90px}.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:400px;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:179px;width:135px;margin:8px 0 8px 12px;float:left;overflow:hidden;align-items:center;position:relative}.pic_list ul li div{width:135px;height:159px;margin:auto;display:table-cell;vertical-align:middle;text-align:center;position:relative}.pic_list ul li div img{max-width:60px;max-height:60px;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}input#file:disabled{cursor:not-allowed}.help_text{color:rgba(0,0,0,.35);position:absolute;top:16px;right:120px}"]
|
|
1869
2156
|
}] }
|
|
1870
2157
|
];
|
|
1871
2158
|
/** @nocollapse */
|
|
@@ -1884,6 +2171,7 @@
|
|
|
1884
2171
|
fileCount: [{ type: i0.Input }],
|
|
1885
2172
|
oldIdList: [{ type: i0.Input }],
|
|
1886
2173
|
securityInfo: [{ type: i0.Input }],
|
|
2174
|
+
fileNameLength: [{ type: i0.Input }],
|
|
1887
2175
|
opCell: [{ type: i0.ViewChild, args: ['opCell',] }]
|
|
1888
2176
|
};
|
|
1889
2177
|
return FileUploadComponent;
|
|
@@ -1907,7 +2195,11 @@
|
|
|
1907
2195
|
* @return {?}
|
|
1908
2196
|
*/
|
|
1909
2197
|
function (metadataId, rootId) {
|
|
1910
|
-
|
|
2198
|
+
/** @type {?} */
|
|
2199
|
+
var url = "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2200
|
+
/** @type {?} */
|
|
2201
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
2202
|
+
return baseUrl;
|
|
1911
2203
|
};
|
|
1912
2204
|
/**
|
|
1913
2205
|
* @param {?} metadataId
|
|
@@ -1920,7 +2212,11 @@
|
|
|
1920
2212
|
* @return {?}
|
|
1921
2213
|
*/
|
|
1922
2214
|
function (metadataId, rootId) {
|
|
1923
|
-
|
|
2215
|
+
/** @type {?} */
|
|
2216
|
+
var url = "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2217
|
+
/** @type {?} */
|
|
2218
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
2219
|
+
return baseUrl;
|
|
1924
2220
|
};
|
|
1925
2221
|
/**
|
|
1926
2222
|
* @param {?} metadataIdList
|
|
@@ -1935,7 +2231,11 @@
|
|
|
1935
2231
|
function (metadataIdList, rootId) {
|
|
1936
2232
|
/** @type {?} */
|
|
1937
2233
|
var list = JSON.parse(metadataIdList);
|
|
1938
|
-
|
|
2234
|
+
/** @type {?} */
|
|
2235
|
+
var url = "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
|
|
2236
|
+
/** @type {?} */
|
|
2237
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
2238
|
+
return baseUrl;
|
|
1939
2239
|
};
|
|
1940
2240
|
/**
|
|
1941
2241
|
* @param {?} metadataIdList
|
|
@@ -1956,7 +2256,11 @@
|
|
|
1956
2256
|
zipName = 'unifile.zip';
|
|
1957
2257
|
if (!zipName.endsWith(".zip"))
|
|
1958
2258
|
zipName += '.zip';
|
|
1959
|
-
|
|
2259
|
+
/** @type {?} */
|
|
2260
|
+
var url = "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
|
|
2261
|
+
/** @type {?} */
|
|
2262
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
2263
|
+
return baseUrl;
|
|
1960
2264
|
};
|
|
1961
2265
|
/**
|
|
1962
2266
|
* @param {?} metadataId
|
|
@@ -1972,7 +2276,11 @@
|
|
|
1972
2276
|
*/
|
|
1973
2277
|
function (metadataId, rootId, version) {
|
|
1974
2278
|
//let list:string[]=JSON.parse(metadataIdList);
|
|
1975
|
-
|
|
2279
|
+
/** @type {?} */
|
|
2280
|
+
var url = "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2281
|
+
/** @type {?} */
|
|
2282
|
+
var baseUrl = rtf.BasePathService.convertPath(url);
|
|
2283
|
+
return baseUrl;
|
|
1976
2284
|
};
|
|
1977
2285
|
/**
|
|
1978
2286
|
* @private
|
|
@@ -2081,6 +2389,7 @@
|
|
|
2081
2389
|
declarations: [FileUploadComponent, LocalLangPipe],
|
|
2082
2390
|
imports: [
|
|
2083
2391
|
common.CommonModule,
|
|
2392
|
+
rtf.FarrisRTFModule,
|
|
2084
2393
|
uiNotify.NotifyModule,
|
|
2085
2394
|
uiMessager.MessagerModule.forRoot(),
|
|
2086
2395
|
uiLoading.LoadingModule.forRoot(),
|
|
@@ -2301,6 +2610,7 @@
|
|
|
2301
2610
|
if (limit != null) {
|
|
2302
2611
|
uploadRef.instance.fileCount = limit.fileCount;
|
|
2303
2612
|
uploadRef.instance.securityInfo = limit.securityInfo;
|
|
2613
|
+
uploadRef.instance.fileNameLength = limit.fileNameLength;
|
|
2304
2614
|
if (limit.fileType != null && limit.fileType != "")
|
|
2305
2615
|
uploadRef.instance.fileType = limit.fileType;
|
|
2306
2616
|
}
|
|
@@ -2396,6 +2706,7 @@
|
|
|
2396
2706
|
this.fileType = "*";
|
|
2397
2707
|
this.fileCount = 0;
|
|
2398
2708
|
this.securityInfo = null;
|
|
2709
|
+
this.fileNameLength = 0;
|
|
2399
2710
|
}
|
|
2400
2711
|
return UploadLimit;
|
|
2401
2712
|
}());
|