@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
|
@@ -10,8 +10,9 @@ import { ProgressModule } from '@farris/ui-progress';
|
|
|
10
10
|
import { FormsModule } from '@angular/forms';
|
|
11
11
|
import { ComboListModule } from '@farris/ui-combo-list';
|
|
12
12
|
import { FarrisFormsModule } from '@farris/ui-forms';
|
|
13
|
+
import { BasePathService, FarrisRTFModule } from '@farris/rtf';
|
|
13
14
|
import { CacheService, HttpService, LanguageService, SessionService } from '@ecp-caf/caf-common';
|
|
14
|
-
import { Injectable, Pipe, Inject, LOCALE_ID,
|
|
15
|
+
import { Injectable, Pipe, Inject, LOCALE_ID, Injector, ComponentFactoryResolver, Component, ViewChild, Input, NgModule, defineInjectable } from '@angular/core';
|
|
15
16
|
import { BsModalService } from '@farris/ui-modal';
|
|
16
17
|
import { of as of$1 } from 'rxjs';
|
|
17
18
|
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
|
@@ -96,6 +97,7 @@ var DocType = {
|
|
|
96
97
|
Txt: 4,
|
|
97
98
|
Image: 5,
|
|
98
99
|
Other: 6,
|
|
100
|
+
Zip: 7,
|
|
99
101
|
};
|
|
100
102
|
DocType[DocType.Word] = 'Word';
|
|
101
103
|
DocType[DocType.Excel] = 'Excel';
|
|
@@ -103,7 +105,8 @@ DocType[DocType.Powerpoint] = 'Powerpoint';
|
|
|
103
105
|
DocType[DocType.Pdf] = 'Pdf';
|
|
104
106
|
DocType[DocType.Txt] = 'Txt';
|
|
105
107
|
DocType[DocType.Image] = 'Image';
|
|
106
|
-
DocType[DocType.Other] = 'Other';
|
|
108
|
+
DocType[DocType.Other] = 'Other';
|
|
109
|
+
DocType[DocType.Zip] = 'Zip';
|
|
107
110
|
|
|
108
111
|
/**
|
|
109
112
|
* @fileoverview added by tsickle
|
|
@@ -324,7 +327,9 @@ var UploadService = /** @class */ (function () {
|
|
|
324
327
|
/** @type {?} */
|
|
325
328
|
var url = "/api/runtime/dfs/v1.0/formdoc/slice";
|
|
326
329
|
//url = "/api/runtime/dfs/v1.0/formdoc/list";
|
|
327
|
-
|
|
330
|
+
/** @type {?} */
|
|
331
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
332
|
+
return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
|
|
328
333
|
* @param {?} res
|
|
329
334
|
* @return {?}
|
|
330
335
|
*/
|
|
@@ -427,11 +432,13 @@ var UploadService = /** @class */ (function () {
|
|
|
427
432
|
/** @type {?} */
|
|
428
433
|
var url = "/api/runtime/dfs/v1.0/formdoc/copy";
|
|
429
434
|
/** @type {?} */
|
|
435
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
436
|
+
/** @type {?} */
|
|
430
437
|
var request = new CopyFileRequest;
|
|
431
438
|
request.metadataId = metadataId;
|
|
432
439
|
request.rootId = rootId;
|
|
433
440
|
request.path = path;
|
|
434
|
-
return this.httpclient.post(
|
|
441
|
+
return this.httpclient.post(baseUrl, request, { responseType: 'text' }).pipe(tap((/**
|
|
435
442
|
* @param {?} res
|
|
436
443
|
* @return {?}
|
|
437
444
|
*/
|
|
@@ -576,7 +583,7 @@ var LANG_RESOURCES = {
|
|
|
576
583
|
'uploading': '正在上传文件……',
|
|
577
584
|
'selectedCount': '已选择文件数量:',
|
|
578
585
|
'limitCount': '超出系统限制数量:',
|
|
579
|
-
'rechooseFile': '
|
|
586
|
+
'rechooseFile': ',请重新选择上传文件。',
|
|
580
587
|
'save': '保存',
|
|
581
588
|
'cancel': '取消',
|
|
582
589
|
'haveSameName': '已上传过同名文件: ',
|
|
@@ -598,7 +605,13 @@ var LANG_RESOURCES = {
|
|
|
598
605
|
'size': '大小',
|
|
599
606
|
'close': '关闭',
|
|
600
607
|
'loading': '拼命加载中',
|
|
601
|
-
'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。'
|
|
608
|
+
'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。',
|
|
609
|
+
'invalidCharacters': '文件名包含特殊字符',
|
|
610
|
+
'invalidExtNames': '文档类型不允许上传',
|
|
611
|
+
'whiteExtNames': '。允许上传的文件类型为:',
|
|
612
|
+
'blackExtNames': '。不允许上传的文件类型为:',
|
|
613
|
+
'UnrecognizedFileType': '无法确定文件类型',
|
|
614
|
+
'fileNameOverSize': '文件名超出长度限制,最长允许'
|
|
602
615
|
},
|
|
603
616
|
'en-US': {
|
|
604
617
|
'uploadFile': 'Upload File',
|
|
@@ -627,7 +640,13 @@ var LANG_RESOURCES = {
|
|
|
627
640
|
'size': 'Size',
|
|
628
641
|
'close': 'Close',
|
|
629
642
|
'loading': 'Loading',
|
|
630
|
-
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
|
|
643
|
+
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
|
|
644
|
+
'invalidCharacters': 'The file name contains special characters',
|
|
645
|
+
'invalidExtNames': 'Document type does not allow uploading',
|
|
646
|
+
'whiteExtNames': '.The file types allowed for uploading are:',
|
|
647
|
+
'blackExtNames': '.The file types that are not allowed to be uploaded are:',
|
|
648
|
+
'UnrecognizedFileType': 'Unrecognized file type',
|
|
649
|
+
'fileNameOverSize': 'fileName oversize,the lengthest is'
|
|
631
650
|
},
|
|
632
651
|
'en': {
|
|
633
652
|
'uploadFile': 'Upload File',
|
|
@@ -656,7 +675,13 @@ var LANG_RESOURCES = {
|
|
|
656
675
|
'size': 'Size',
|
|
657
676
|
'close': 'Close',
|
|
658
677
|
'loading': 'Loading',
|
|
659
|
-
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
|
|
678
|
+
'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
|
|
679
|
+
'invalidCharacters': 'The file name contains special characters',
|
|
680
|
+
'invalidExtNames': 'Document type does not allow uploading',
|
|
681
|
+
'whiteExtNames': '.The file types allowed for uploading are:',
|
|
682
|
+
'blackExtNames': '.The file types that are not allowed to be uploaded are:',
|
|
683
|
+
'UnrecognizedFileType': 'Unrecognized file type',
|
|
684
|
+
'fileNameOverSize': 'fileName oversize,the lengthest is'
|
|
660
685
|
},
|
|
661
686
|
'zh-CHT': {
|
|
662
687
|
'uploadFile': '上傳文件',
|
|
@@ -685,7 +710,13 @@ var LANG_RESOURCES = {
|
|
|
685
710
|
'size': '大小',
|
|
686
711
|
'close': '關閉',
|
|
687
712
|
'loading': '拼命加載中',
|
|
688
|
-
'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。'
|
|
713
|
+
'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。',
|
|
714
|
+
'invalidCharacters': '文件名包含特殊字符',
|
|
715
|
+
'invalidExtNames': '文檔類型不允許上傳',
|
|
716
|
+
'whiteExtNames': '。允許上傳的文件類型為:',
|
|
717
|
+
'blackExtNames': '。不允許上傳的文件類型為:',
|
|
718
|
+
'UnrecognizedFileType': '無法確定文件類型',
|
|
719
|
+
'fileNameOverSize': '文件名超出长度限制,最长允许'
|
|
689
720
|
},
|
|
690
721
|
};
|
|
691
722
|
|
|
@@ -787,12 +818,20 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
787
818
|
this.errTypeList = [];
|
|
788
819
|
this.nullFileList = [];
|
|
789
820
|
this.beyondFileList = [];
|
|
821
|
+
this.fileNameOversizeList = [];
|
|
822
|
+
this.invalidCharactersFileList = [];
|
|
823
|
+
this.invalidExtNamesFileList = [];
|
|
824
|
+
this.unrecognizedTypeFileList = [];
|
|
825
|
+
this.invalidCharacters = '';
|
|
826
|
+
this.invalidExtNames = '';
|
|
790
827
|
this.showType = 0;
|
|
791
828
|
this.mouseOn = false;
|
|
829
|
+
this.isWhiteList = false;
|
|
792
830
|
this.bufferSize = 5 * 1024 * 1024;
|
|
793
831
|
this.selectedFileCount = 0;
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
832
|
+
this.uploadBtnDisabled = false;
|
|
833
|
+
this.uploadIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/upload.svg');
|
|
834
|
+
this.uploadLittleIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/uploadIcon.svg');
|
|
796
835
|
this.hasSelectedFile = false;
|
|
797
836
|
this.fileAllSelected = false;
|
|
798
837
|
this.uploadProcess = { width: '0%' };
|
|
@@ -812,6 +851,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
812
851
|
this.uploadedFileInfoList = [];
|
|
813
852
|
this.oldUploadedFileList = [];
|
|
814
853
|
//uploadedNameList = [];
|
|
854
|
+
this.uploadInfoErrorMessage = "";
|
|
815
855
|
this.sameNameAllowed = true;
|
|
816
856
|
this.maxFileSize = 0;
|
|
817
857
|
this.checkboxPos = { top: '0px' };
|
|
@@ -819,6 +859,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
819
859
|
this.fileCount = 0;
|
|
820
860
|
this.oldIdList = [];
|
|
821
861
|
this.securityInfo = null;
|
|
862
|
+
this.fileNameLength = 0;
|
|
822
863
|
this.totalLoad = null;
|
|
823
864
|
this.exStorageFileList = [];
|
|
824
865
|
if (this.injector) {
|
|
@@ -885,9 +926,18 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
885
926
|
* @return {?}
|
|
886
927
|
*/
|
|
887
928
|
function (res) {
|
|
888
|
-
if (res
|
|
929
|
+
if (res.error != null) {
|
|
930
|
+
_this.uploadInfoErrorMessage = res.error.Message;
|
|
931
|
+
// console.log('获取上传信息报错,错误信息为:',errMsg);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
_this.uploadBtnDisabled = false;
|
|
889
936
|
_this.sameNameAllowed = res.sameNameAllowed;
|
|
890
937
|
_this.maxFileSize = parseInt(JSON.parse(res.validateConfiguration).maxFileSize);
|
|
938
|
+
_this.isWhiteList = JSON.parse(res.validateConfiguration).whiteList;
|
|
939
|
+
_this.invalidCharacters = JSON.parse(res.validateConfiguration).invalidCharacters;
|
|
940
|
+
_this.invalidExtNames = JSON.parse(res.validateConfiguration).invalidExtNames.toLowerCase();
|
|
891
941
|
_this.allowedMultiUpload = res.allowedMultiUpload;
|
|
892
942
|
if (!_this.sameNameAllowed) {
|
|
893
943
|
_this.uploadService.getUploadedFileInfoList(_this.formId, _this.rootId).subscribe((/**
|
|
@@ -919,6 +969,52 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
919
969
|
// message: this.localepipe.transform('uploading')
|
|
920
970
|
// });
|
|
921
971
|
};
|
|
972
|
+
/**
|
|
973
|
+
* @return {?}
|
|
974
|
+
*/
|
|
975
|
+
FileUploadComponent.prototype.getRightClass = /**
|
|
976
|
+
* @return {?}
|
|
977
|
+
*/
|
|
978
|
+
function () {
|
|
979
|
+
if (this.uploadBtnDisabled) {
|
|
980
|
+
return 'btn btn-primary btn-lg disabled';
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
return 'btn btn-primary btn-lg';
|
|
984
|
+
}
|
|
985
|
+
};
|
|
986
|
+
/**
|
|
987
|
+
* @param {?} name
|
|
988
|
+
* @return {?}
|
|
989
|
+
*/
|
|
990
|
+
FileUploadComponent.prototype.findInvalidCharacter = /**
|
|
991
|
+
* @param {?} name
|
|
992
|
+
* @return {?}
|
|
993
|
+
*/
|
|
994
|
+
function (name) {
|
|
995
|
+
/** @type {?} */
|
|
996
|
+
var charList = [];
|
|
997
|
+
this.invalidCharacters.split('|').forEach((/**
|
|
998
|
+
* @param {?} element
|
|
999
|
+
* @return {?}
|
|
1000
|
+
*/
|
|
1001
|
+
function (element) {
|
|
1002
|
+
if (name.indexOf(element) >= 0)
|
|
1003
|
+
charList.push(element);
|
|
1004
|
+
}));
|
|
1005
|
+
return charList;
|
|
1006
|
+
};
|
|
1007
|
+
/**
|
|
1008
|
+
* @param {?} file
|
|
1009
|
+
* @return {?}
|
|
1010
|
+
*/
|
|
1011
|
+
FileUploadComponent.prototype.hasFileType = /**
|
|
1012
|
+
* @param {?} file
|
|
1013
|
+
* @return {?}
|
|
1014
|
+
*/
|
|
1015
|
+
function (file) {
|
|
1016
|
+
return file.name.includes('.');
|
|
1017
|
+
};
|
|
922
1018
|
/**
|
|
923
1019
|
* @param {?} $event
|
|
924
1020
|
* @return {?}
|
|
@@ -929,6 +1025,11 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
929
1025
|
*/
|
|
930
1026
|
function ($event) {
|
|
931
1027
|
var _this = this;
|
|
1028
|
+
if (this.uploadInfoErrorMessage) {
|
|
1029
|
+
this.msgService.error(this.uploadInfoErrorMessage);
|
|
1030
|
+
this.uploadBtnDisabled = true;
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
932
1033
|
this.hasSelectedFile = true;
|
|
933
1034
|
this.selectedFiles = document.querySelector('#file');
|
|
934
1035
|
if (this.fileCount > 0) {
|
|
@@ -942,6 +1043,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
942
1043
|
var _loop_1 = function (i) {
|
|
943
1044
|
/** @type {?} */
|
|
944
1045
|
var selectedFile = this_1.selectedFiles.files[i];
|
|
1046
|
+
selectedFile.isAllowedUpload = true;
|
|
945
1047
|
//selectedFile.slice
|
|
946
1048
|
/** @type {?} */
|
|
947
1049
|
var uuid = UUID.UUID();
|
|
@@ -949,12 +1051,94 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
949
1051
|
this_1.nullFileList.push(selectedFile.name);
|
|
950
1052
|
return "continue";
|
|
951
1053
|
}
|
|
1054
|
+
if (this_1.fileNameLength > 0 && selectedFile.name.length > this_1.fileNameLength) {
|
|
1055
|
+
this_1.fileNameOversizeList.push(selectedFile.name);
|
|
1056
|
+
return "continue";
|
|
1057
|
+
}
|
|
952
1058
|
if (this_1.maxFileSize != null && this_1.maxFileSize > 0) {
|
|
953
1059
|
if (selectedFile.size > this_1.maxFileSize * 1000) {
|
|
954
1060
|
this_1.beyondFileList.push(selectedFile.name);
|
|
955
1061
|
return "continue";
|
|
956
1062
|
}
|
|
957
1063
|
}
|
|
1064
|
+
/** @type {?} */
|
|
1065
|
+
var invalidCharList = this_1.findInvalidCharacter(selectedFile.name);
|
|
1066
|
+
/** @type {?} */
|
|
1067
|
+
var invalidCharListFilter = invalidCharList.filter((/**
|
|
1068
|
+
* @param {?} s
|
|
1069
|
+
* @return {?}
|
|
1070
|
+
*/
|
|
1071
|
+
function (s) {
|
|
1072
|
+
return s && s.trim();
|
|
1073
|
+
}));
|
|
1074
|
+
/** @type {?} */
|
|
1075
|
+
var errorMessage = "";
|
|
1076
|
+
if (invalidCharListFilter.length > 0) {
|
|
1077
|
+
invalidCharListFilter.forEach((/**
|
|
1078
|
+
* @param {?} element
|
|
1079
|
+
* @param {?} index
|
|
1080
|
+
* @return {?}
|
|
1081
|
+
*/
|
|
1082
|
+
function (element, index) {
|
|
1083
|
+
errorMessage += "\"";
|
|
1084
|
+
errorMessage += element;
|
|
1085
|
+
errorMessage += "\"";
|
|
1086
|
+
errorMessage += (index === invalidCharListFilter.length - 1) ? "" : ",";
|
|
1087
|
+
}));
|
|
1088
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1089
|
+
selectedFile.isAllowedUpload = false;
|
|
1090
|
+
this_1.msgService.warning(this_1.localepipe.transform('invalidCharacters') + errorMessage + this_1.localepipe.transform('rechooseFile'));
|
|
1091
|
+
return { value: void 0 };
|
|
1092
|
+
}
|
|
1093
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1094
|
+
selectedFile.isAllowedUpload = false;
|
|
1095
|
+
this_1.invalidCharactersFileList.push(selectedFile.name);
|
|
1096
|
+
return "continue";
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
if (!this_1.hasFileType(selectedFile)) {
|
|
1100
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1101
|
+
selectedFile.isAllowedUpload = false;
|
|
1102
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('UnrecognizedFileType') + this_1.localepipe.transform('rechooseFile'));
|
|
1103
|
+
return { value: void 0 };
|
|
1104
|
+
}
|
|
1105
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1106
|
+
selectedFile.isAllowedUpload = false;
|
|
1107
|
+
this_1.unrecognizedTypeFileList.push(selectedFile.name);
|
|
1108
|
+
return "continue";
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
// let curFileSuffix = selectedFile.name.split('.')[1];
|
|
1112
|
+
/** @type {?} */
|
|
1113
|
+
var curFileSuffix = selectedFile.name.substr(selectedFile.name.lastIndexOf('.') + 1).toLowerCase();
|
|
1114
|
+
/** @type {?} */
|
|
1115
|
+
var extNames = this_1.listToString(this_1.invalidExtNames.split('|'));
|
|
1116
|
+
/** @type {?} */
|
|
1117
|
+
var extNamesAry = this_1.invalidExtNames.split('|');
|
|
1118
|
+
if (!this_1.isWhiteList && extNamesAry.includes(curFileSuffix)) {
|
|
1119
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1120
|
+
selectedFile.isAllowedUpload = false;
|
|
1121
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('blackExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
|
|
1122
|
+
return { value: void 0 };
|
|
1123
|
+
}
|
|
1124
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1125
|
+
selectedFile.isAllowedUpload = false;
|
|
1126
|
+
this_1.invalidExtNamesFileList.push(selectedFile.name);
|
|
1127
|
+
return "continue";
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
if (this_1.isWhiteList && !extNamesAry.includes(curFileSuffix)) {
|
|
1131
|
+
if (this_1.selectedFiles.files.length === 1) {
|
|
1132
|
+
selectedFile.isAllowedUpload = false;
|
|
1133
|
+
this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('whiteExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
|
|
1134
|
+
return { value: void 0 };
|
|
1135
|
+
}
|
|
1136
|
+
if (this_1.selectedFiles.files.length > 1) {
|
|
1137
|
+
selectedFile.isAllowedUpload = false;
|
|
1138
|
+
this_1.invalidExtNamesFileList.push(selectedFile.name);
|
|
1139
|
+
return "continue";
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
958
1142
|
if (!this_1.sameNameAllowed) {
|
|
959
1143
|
if (this_1.uploadedFileInfoList.find((/**
|
|
960
1144
|
* @param {?} x
|
|
@@ -1041,12 +1225,16 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1041
1225
|
return "continue";
|
|
1042
1226
|
}
|
|
1043
1227
|
}
|
|
1044
|
-
|
|
1228
|
+
if (selectedFile.isAllowedUpload === true) {
|
|
1229
|
+
this_1.uploadFile(uuid, selectedFile, selectedFile.name);
|
|
1230
|
+
}
|
|
1045
1231
|
};
|
|
1046
1232
|
var this_1 = this;
|
|
1047
1233
|
//this.flag = 0;
|
|
1048
1234
|
for (var i = 0; i < this.selectedFiles.files.length; i++) {
|
|
1049
|
-
_loop_1(i);
|
|
1235
|
+
var state_1 = _loop_1(i);
|
|
1236
|
+
if (typeof state_1 === "object")
|
|
1237
|
+
return state_1.value;
|
|
1050
1238
|
}
|
|
1051
1239
|
if (this.errFileList.length > 0) {
|
|
1052
1240
|
/** @type {?} */
|
|
@@ -1057,17 +1245,39 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1057
1245
|
if (this.nullFileList.length > 0) {
|
|
1058
1246
|
/** @type {?} */
|
|
1059
1247
|
var name_2 = this.listToString(this.nullFileList);
|
|
1060
|
-
name_2 = name_2.substring(0, name_2.length - 1);
|
|
1061
1248
|
this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
|
|
1062
1249
|
this.nullFileList = [];
|
|
1063
1250
|
}
|
|
1251
|
+
if (this.fileNameOversizeList.length > 0) {
|
|
1252
|
+
/** @type {?} */
|
|
1253
|
+
var name_3 = this.listToString(this.fileNameOversizeList);
|
|
1254
|
+
this.msgService.warning(name_3 + this.localepipe.transform('fileNameOverSize') + this.fileNameLength + this.localepipe.transform('rechooseFile'));
|
|
1255
|
+
this.fileNameOversizeList = [];
|
|
1256
|
+
}
|
|
1064
1257
|
if (this.beyondFileList.length > 0) {
|
|
1065
1258
|
/** @type {?} */
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1068
|
-
this.msgService.warning(name_3 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
|
|
1259
|
+
var name_4 = this.listToString(this.beyondFileList);
|
|
1260
|
+
this.msgService.warning(name_4 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
|
|
1069
1261
|
this.beyondFileList = [];
|
|
1070
1262
|
}
|
|
1263
|
+
if (this.invalidCharactersFileList.length > 0) {
|
|
1264
|
+
/** @type {?} */
|
|
1265
|
+
var name_5 = this.listToString(this.invalidCharactersFileList);
|
|
1266
|
+
this.msgService.warning(name_5 + this.localepipe.transform('invalidCharacters') + this.localepipe.transform('rechooseFile'));
|
|
1267
|
+
this.invalidCharactersFileList = [];
|
|
1268
|
+
}
|
|
1269
|
+
if (this.invalidExtNamesFileList.length > 0) {
|
|
1270
|
+
/** @type {?} */
|
|
1271
|
+
var name_6 = this.listToString(this.invalidExtNamesFileList);
|
|
1272
|
+
this.msgService.warning(name_6 + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('rechooseFile'));
|
|
1273
|
+
this.invalidExtNamesFileList = [];
|
|
1274
|
+
}
|
|
1275
|
+
if (this.unrecognizedTypeFileList.length > 0) {
|
|
1276
|
+
/** @type {?} */
|
|
1277
|
+
var name_7 = this.listToString(this.unrecognizedTypeFileList);
|
|
1278
|
+
this.msgService.warning(name_7 + this.localepipe.transform('UnrecognizedFileType') + this.localepipe.transform('rechooseFile'));
|
|
1279
|
+
this.unrecognizedTypeFileList = [];
|
|
1280
|
+
}
|
|
1071
1281
|
this.files = this.files.slice();
|
|
1072
1282
|
this.fileAllSelected = false;
|
|
1073
1283
|
$event.target.value = '';
|
|
@@ -1119,7 +1329,8 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1119
1329
|
extensionDropListId: 0,
|
|
1120
1330
|
extensionName: "",
|
|
1121
1331
|
securityDropListId: 0,
|
|
1122
|
-
securityInfo: this.securityInfoList[0]
|
|
1332
|
+
securityInfo: this.securityInfoList[0],
|
|
1333
|
+
style: {}
|
|
1123
1334
|
};
|
|
1124
1335
|
if (this.storageExtension != null)
|
|
1125
1336
|
fileInfo.extensionName = this.defaultPropertyName;
|
|
@@ -1146,6 +1357,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1146
1357
|
else if (type.includes("powerpoint") || type.includes("presentation")) {
|
|
1147
1358
|
this.addDocInfo(selectedFile, fileInfo, DocType.Powerpoint);
|
|
1148
1359
|
}
|
|
1360
|
+
else if (type.includes("zip") || selectedFile.name.includes(".rar")) {
|
|
1361
|
+
this.addDocInfo(selectedFile, fileInfo, DocType.Zip);
|
|
1362
|
+
}
|
|
1149
1363
|
else {
|
|
1150
1364
|
this.addDocInfo(selectedFile, fileInfo, DocType.Other);
|
|
1151
1365
|
// let name: string = selectedFile.name;
|
|
@@ -1178,6 +1392,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1178
1392
|
uploadFileInfo.metadataId = uuid;
|
|
1179
1393
|
uploadFileInfo.fileName = fileInfo.name;
|
|
1180
1394
|
uploadFileInfo.fileSize = fileInfo.size;
|
|
1395
|
+
uploadFileInfo.originalSize = fileInfo.fileSize;
|
|
1181
1396
|
uploadFileInfo.state = state;
|
|
1182
1397
|
uploadFileInfo.securityInfo = this.securityInfoList[0];
|
|
1183
1398
|
//判断是否支持分片上传
|
|
@@ -1289,19 +1504,21 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1289
1504
|
}
|
|
1290
1505
|
else {
|
|
1291
1506
|
/** @type {?} */
|
|
1292
|
-
var
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1507
|
+
var entity_1 = new GspFormStreamEntity;
|
|
1508
|
+
entity_1.formId = this.formId;
|
|
1509
|
+
entity_1.metadataId = uuid;
|
|
1510
|
+
entity_1.mode = OperatingModes.Temp;
|
|
1511
|
+
entity_1.rootId = this.rootId;
|
|
1512
|
+
entity_1.size = selectedFile.size;
|
|
1513
|
+
entity_1.fileName = fileName;
|
|
1299
1514
|
if (this.haveExtensionProperty)
|
|
1300
|
-
|
|
1515
|
+
entity_1.exPropertyName = this.defaultPropertyName;
|
|
1301
1516
|
/** @type {?} */
|
|
1302
1517
|
var formData = new FormData();
|
|
1303
|
-
formData.append('uploadEntity', JSON.stringify(
|
|
1518
|
+
formData.append('uploadEntity', JSON.stringify(entity_1));
|
|
1304
1519
|
formData.append('file', selectedFile);
|
|
1520
|
+
/** @type {?} */
|
|
1521
|
+
var intervalId_1;
|
|
1305
1522
|
this.uploadSingleFile(formData).subscribe((/**
|
|
1306
1523
|
* @param {?} res
|
|
1307
1524
|
* @return {?}
|
|
@@ -1319,26 +1536,70 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1319
1536
|
_this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
|
|
1320
1537
|
_this.uploadedFileTotal++;
|
|
1321
1538
|
}
|
|
1539
|
+
clearInterval(intervalId_1);
|
|
1322
1540
|
}));
|
|
1541
|
+
/** @type {?} */
|
|
1542
|
+
var index_1 = -1;
|
|
1543
|
+
this.files.forEach((/**
|
|
1544
|
+
* @param {?} x
|
|
1545
|
+
* @return {?}
|
|
1546
|
+
*/
|
|
1547
|
+
function (x) {
|
|
1548
|
+
if (x.name == fileInfo.name) {
|
|
1549
|
+
if (index_1 == -1)
|
|
1550
|
+
index_1 = _this.files.indexOf(x);
|
|
1551
|
+
}
|
|
1552
|
+
}));
|
|
1553
|
+
if (index_1 != -1 && index_1 != this.files.length - 1) {
|
|
1554
|
+
this.files.splice(index_1, 1);
|
|
1555
|
+
this.uploadFileInfoList.splice(index_1, 1);
|
|
1556
|
+
this.uploadedFileInfoList.splice(index_1, 1);
|
|
1557
|
+
this.uploadedFileTotal--;
|
|
1558
|
+
}
|
|
1559
|
+
intervalId_1 = setInterval((/**
|
|
1560
|
+
* @return {?}
|
|
1561
|
+
*/
|
|
1562
|
+
function () {
|
|
1563
|
+
_this.getUploadProcess(entity_1.metadataId).subscribe((/**
|
|
1564
|
+
* @param {?} res
|
|
1565
|
+
* @return {?}
|
|
1566
|
+
*/
|
|
1567
|
+
function (res) {
|
|
1568
|
+
if (res.error != null)
|
|
1569
|
+
_this.files[_this.files.indexOf(fileInfo)].uploadProcess = 10;
|
|
1570
|
+
else {
|
|
1571
|
+
if (res < 10)
|
|
1572
|
+
res = 10;
|
|
1573
|
+
if (res > 90)
|
|
1574
|
+
res = 90;
|
|
1575
|
+
_this.files[_this.files.indexOf(fileInfo)].uploadProcess = res;
|
|
1576
|
+
}
|
|
1577
|
+
}));
|
|
1578
|
+
}), 200);
|
|
1323
1579
|
}
|
|
1580
|
+
};
|
|
1581
|
+
/**
|
|
1582
|
+
* @param {?} metadataId
|
|
1583
|
+
* @return {?}
|
|
1584
|
+
*/
|
|
1585
|
+
FileUploadComponent.prototype.getUploadProcess = /**
|
|
1586
|
+
* @param {?} metadataId
|
|
1587
|
+
* @return {?}
|
|
1588
|
+
*/
|
|
1589
|
+
function (metadataId) {
|
|
1324
1590
|
/** @type {?} */
|
|
1325
|
-
var
|
|
1326
|
-
this.
|
|
1327
|
-
* @param {?}
|
|
1591
|
+
var url = "/api/runtime/dfs/v1.0/formdoc/upload/process?metadataid=" + metadataId;
|
|
1592
|
+
return this.httpclient.get(url).pipe(tap((/**
|
|
1593
|
+
* @param {?} res
|
|
1328
1594
|
* @return {?}
|
|
1329
1595
|
*/
|
|
1330
|
-
function (
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
this.files.splice(index, 1);
|
|
1338
|
-
this.uploadFileInfoList.splice(index, 1);
|
|
1339
|
-
this.uploadedFileInfoList.splice(index, 1);
|
|
1340
|
-
//this.uploadedFileTotal--;
|
|
1341
|
-
}
|
|
1596
|
+
function (res) { })), catchError((/**
|
|
1597
|
+
* @param {?} error
|
|
1598
|
+
* @return {?}
|
|
1599
|
+
*/
|
|
1600
|
+
function (error) {
|
|
1601
|
+
return of$1(error);
|
|
1602
|
+
})));
|
|
1342
1603
|
};
|
|
1343
1604
|
/**
|
|
1344
1605
|
* @param {?} formdata
|
|
@@ -1351,7 +1612,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1351
1612
|
function (formdata) {
|
|
1352
1613
|
/** @type {?} */
|
|
1353
1614
|
var url = "/api/runtime/dfs/v1.0/formdoc/single";
|
|
1354
|
-
|
|
1615
|
+
/** @type {?} */
|
|
1616
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
1617
|
+
return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
|
|
1355
1618
|
* @param {?} res
|
|
1356
1619
|
* @return {?}
|
|
1357
1620
|
*/
|
|
@@ -1374,7 +1637,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1374
1637
|
function (formdata) {
|
|
1375
1638
|
/** @type {?} */
|
|
1376
1639
|
var url = "/api/runtime/dfs/v1.0/formdoc/slice";
|
|
1377
|
-
|
|
1640
|
+
/** @type {?} */
|
|
1641
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
1642
|
+
return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
|
|
1378
1643
|
* @param {?} res
|
|
1379
1644
|
* @return {?}
|
|
1380
1645
|
*/
|
|
@@ -1397,7 +1662,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1397
1662
|
function (request) {
|
|
1398
1663
|
/** @type {?} */
|
|
1399
1664
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/init";
|
|
1400
|
-
|
|
1665
|
+
/** @type {?} */
|
|
1666
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
1667
|
+
return this.httpclient.post(baseUrl, request).pipe(tap((/**
|
|
1401
1668
|
* @param {?} res
|
|
1402
1669
|
* @return {?}
|
|
1403
1670
|
*/
|
|
@@ -1420,7 +1687,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1420
1687
|
function (formdata) {
|
|
1421
1688
|
/** @type {?} */
|
|
1422
1689
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/upload";
|
|
1423
|
-
|
|
1690
|
+
/** @type {?} */
|
|
1691
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
1692
|
+
return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
|
|
1424
1693
|
* @param {?} res
|
|
1425
1694
|
* @return {?}
|
|
1426
1695
|
*/
|
|
@@ -1443,7 +1712,9 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1443
1712
|
function (request) {
|
|
1444
1713
|
/** @type {?} */
|
|
1445
1714
|
var url = "/api/runtime/dfs/v1.0/formdoc/multi/complete";
|
|
1446
|
-
|
|
1715
|
+
/** @type {?} */
|
|
1716
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
1717
|
+
return this.httpclient.post(baseUrl, request).pipe(tap((/**
|
|
1447
1718
|
* @param {?} res
|
|
1448
1719
|
* @return {?}
|
|
1449
1720
|
*/
|
|
@@ -1639,32 +1910,37 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1639
1910
|
var _this = this;
|
|
1640
1911
|
switch (docType) {
|
|
1641
1912
|
case DocType.Word: {
|
|
1642
|
-
fileInfo.source = "/platform/runtime/dfs/images/word.png";
|
|
1913
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/word.png");
|
|
1643
1914
|
this.files.push(fileInfo);
|
|
1644
1915
|
break;
|
|
1645
1916
|
}
|
|
1646
1917
|
case DocType.Pdf: {
|
|
1647
|
-
fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
|
|
1918
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/pdf.png");
|
|
1648
1919
|
this.files.push(fileInfo);
|
|
1649
1920
|
break;
|
|
1650
1921
|
}
|
|
1651
1922
|
case DocType.Excel: {
|
|
1652
|
-
fileInfo.source = "/platform/runtime/dfs/images/excel.png";
|
|
1923
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/excel.png");
|
|
1653
1924
|
this.files.push(fileInfo);
|
|
1654
1925
|
break;
|
|
1655
1926
|
}
|
|
1656
1927
|
case DocType.Txt: {
|
|
1657
|
-
fileInfo.source = "/platform/runtime/dfs/images/txt.png";
|
|
1928
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/txt.png");
|
|
1929
|
+
this.files.push(fileInfo);
|
|
1930
|
+
break;
|
|
1931
|
+
}
|
|
1932
|
+
case DocType.Zip: {
|
|
1933
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/zip.png");
|
|
1658
1934
|
this.files.push(fileInfo);
|
|
1659
1935
|
break;
|
|
1660
1936
|
}
|
|
1661
1937
|
case DocType.Powerpoint: {
|
|
1662
|
-
fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
|
|
1938
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/ppt.png");
|
|
1663
1939
|
this.files.push(fileInfo);
|
|
1664
1940
|
break;
|
|
1665
1941
|
}
|
|
1666
1942
|
case DocType.Other: {
|
|
1667
|
-
fileInfo.source = "/platform/runtime/dfs/images/file.png";
|
|
1943
|
+
fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/file.png");
|
|
1668
1944
|
this.files.push(fileInfo);
|
|
1669
1945
|
break;
|
|
1670
1946
|
}
|
|
@@ -1685,6 +1961,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1685
1961
|
imgUrl = sanitizer.bypassSecurityTrustResourceUrl(imgUrl);
|
|
1686
1962
|
}
|
|
1687
1963
|
fileInfo.source = imgUrl;
|
|
1964
|
+
fileInfo.style = { "max-width": "120px", "max-height": "118px" };
|
|
1688
1965
|
_this.files.push(fileInfo);
|
|
1689
1966
|
//因为异步处理的差异,补偿一次删除
|
|
1690
1967
|
/** @type {?} */
|
|
@@ -1717,10 +1994,16 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1717
1994
|
* @return {?}
|
|
1718
1995
|
*/
|
|
1719
1996
|
function (strList) {
|
|
1997
|
+
/** @type {?} */
|
|
1998
|
+
var result = strList.filter((/**
|
|
1999
|
+
* @param {?} item
|
|
2000
|
+
* @return {?}
|
|
2001
|
+
*/
|
|
2002
|
+
function (item) { return item.trim() !== ''; }));
|
|
1720
2003
|
/** @type {?} */
|
|
1721
2004
|
var name = "";
|
|
1722
|
-
for (var i = 0; i <
|
|
1723
|
-
name +=
|
|
2005
|
+
for (var i = 0; i < result.length; i++) {
|
|
2006
|
+
name += result[i] + (i === result.length - 1 ? "" : ",");
|
|
1724
2007
|
}
|
|
1725
2008
|
return name;
|
|
1726
2009
|
};
|
|
@@ -1949,11 +2232,24 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1949
2232
|
function (file) {
|
|
1950
2233
|
file.mouseOn = false;
|
|
1951
2234
|
};
|
|
2235
|
+
/**
|
|
2236
|
+
* @param {?} oldUrl
|
|
2237
|
+
* @return {?}
|
|
2238
|
+
*/
|
|
2239
|
+
FileUploadComponent.prototype.createBaseUrl = /**
|
|
2240
|
+
* @param {?} oldUrl
|
|
2241
|
+
* @return {?}
|
|
2242
|
+
*/
|
|
2243
|
+
function (oldUrl) {
|
|
2244
|
+
/** @type {?} */
|
|
2245
|
+
var baseUrl = BasePathService.convertPath(oldUrl);
|
|
2246
|
+
return baseUrl;
|
|
2247
|
+
};
|
|
1952
2248
|
FileUploadComponent.decorators = [
|
|
1953
2249
|
{ type: Component, args: [{
|
|
1954
2250
|
selector: 'app-file-upload',
|
|
1955
|
-
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>",
|
|
1956
|
-
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:
|
|
2251
|
+
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",
|
|
2252
|
+
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}"]
|
|
1957
2253
|
}] }
|
|
1958
2254
|
];
|
|
1959
2255
|
/** @nocollapse */
|
|
@@ -1970,6 +2266,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1970
2266
|
fileCount: [{ type: Input }],
|
|
1971
2267
|
oldIdList: [{ type: Input }],
|
|
1972
2268
|
securityInfo: [{ type: Input }],
|
|
2269
|
+
fileNameLength: [{ type: Input }],
|
|
1973
2270
|
opCell: [{ type: ViewChild, args: ['opCell',] }]
|
|
1974
2271
|
};
|
|
1975
2272
|
return FileUploadComponent;
|
|
@@ -1993,7 +2290,11 @@ var DownloadService = /** @class */ (function () {
|
|
|
1993
2290
|
* @return {?}
|
|
1994
2291
|
*/
|
|
1995
2292
|
function (metadataId, rootId) {
|
|
1996
|
-
|
|
2293
|
+
/** @type {?} */
|
|
2294
|
+
var url = "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2295
|
+
/** @type {?} */
|
|
2296
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
2297
|
+
return baseUrl;
|
|
1997
2298
|
};
|
|
1998
2299
|
/**
|
|
1999
2300
|
* @param {?} metadataId
|
|
@@ -2006,7 +2307,11 @@ var DownloadService = /** @class */ (function () {
|
|
|
2006
2307
|
* @return {?}
|
|
2007
2308
|
*/
|
|
2008
2309
|
function (metadataId, rootId) {
|
|
2009
|
-
|
|
2310
|
+
/** @type {?} */
|
|
2311
|
+
var url = "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2312
|
+
/** @type {?} */
|
|
2313
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
2314
|
+
return baseUrl;
|
|
2010
2315
|
};
|
|
2011
2316
|
/**
|
|
2012
2317
|
* @param {?} metadataIdList
|
|
@@ -2021,7 +2326,11 @@ var DownloadService = /** @class */ (function () {
|
|
|
2021
2326
|
function (metadataIdList, rootId) {
|
|
2022
2327
|
/** @type {?} */
|
|
2023
2328
|
var list = JSON.parse(metadataIdList);
|
|
2024
|
-
|
|
2329
|
+
/** @type {?} */
|
|
2330
|
+
var url = "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
|
|
2331
|
+
/** @type {?} */
|
|
2332
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
2333
|
+
return baseUrl;
|
|
2025
2334
|
};
|
|
2026
2335
|
/**
|
|
2027
2336
|
* @param {?} metadataIdList
|
|
@@ -2042,7 +2351,11 @@ var DownloadService = /** @class */ (function () {
|
|
|
2042
2351
|
zipName = 'unifile.zip';
|
|
2043
2352
|
if (!zipName.endsWith(".zip"))
|
|
2044
2353
|
zipName += '.zip';
|
|
2045
|
-
|
|
2354
|
+
/** @type {?} */
|
|
2355
|
+
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);
|
|
2356
|
+
/** @type {?} */
|
|
2357
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
2358
|
+
return baseUrl;
|
|
2046
2359
|
};
|
|
2047
2360
|
/**
|
|
2048
2361
|
* @param {?} metadataId
|
|
@@ -2058,7 +2371,11 @@ var DownloadService = /** @class */ (function () {
|
|
|
2058
2371
|
*/
|
|
2059
2372
|
function (metadataId, rootId, version) {
|
|
2060
2373
|
//let list:string[]=JSON.parse(metadataIdList);
|
|
2061
|
-
|
|
2374
|
+
/** @type {?} */
|
|
2375
|
+
var url = "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
|
|
2376
|
+
/** @type {?} */
|
|
2377
|
+
var baseUrl = BasePathService.convertPath(url);
|
|
2378
|
+
return baseUrl;
|
|
2062
2379
|
};
|
|
2063
2380
|
/**
|
|
2064
2381
|
* @private
|
|
@@ -2167,6 +2484,7 @@ var UploadModule = /** @class */ (function () {
|
|
|
2167
2484
|
declarations: [FileUploadComponent, LocalLangPipe],
|
|
2168
2485
|
imports: [
|
|
2169
2486
|
CommonModule,
|
|
2487
|
+
FarrisRTFModule,
|
|
2170
2488
|
NotifyModule,
|
|
2171
2489
|
MessagerModule.forRoot(),
|
|
2172
2490
|
LoadingModule.forRoot(),
|
|
@@ -2389,6 +2707,7 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
2389
2707
|
if (limit != null) {
|
|
2390
2708
|
uploadRef.instance.fileCount = limit.fileCount;
|
|
2391
2709
|
uploadRef.instance.securityInfo = limit.securityInfo;
|
|
2710
|
+
uploadRef.instance.fileNameLength = limit.fileNameLength;
|
|
2392
2711
|
if (limit.fileType != null && limit.fileType != "")
|
|
2393
2712
|
uploadRef.instance.fileType = limit.fileType;
|
|
2394
2713
|
}
|
|
@@ -2486,6 +2805,7 @@ var UploadLimit = /** @class */ (function () {
|
|
|
2486
2805
|
this.fileType = "*";
|
|
2487
2806
|
this.fileCount = 0;
|
|
2488
2807
|
this.securityInfo = null;
|
|
2808
|
+
this.fileNameLength = 0;
|
|
2489
2809
|
}
|
|
2490
2810
|
return UploadLimit;
|
|
2491
2811
|
}());
|