@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.
Files changed (36) hide show
  1. package/bundles/gsp-svc-formdoc-upload.umd.js +377 -66
  2. package/bundles/gsp-svc-formdoc-upload.umd.js.map +1 -1
  3. package/bundles/gsp-svc-formdoc-upload.umd.min.js +1 -1
  4. package/bundles/gsp-svc-formdoc-upload.umd.min.js.map +1 -1
  5. package/esm2015/lib/i18n/language.resource.js +30 -6
  6. package/esm2015/lib/upload/download.service.js +27 -6
  7. package/esm2015/lib/upload/entity/doctype.js +3 -1
  8. package/esm2015/lib/upload/entity/fileinfo.js +3 -1
  9. package/esm2015/lib/upload/entity/uploadfileinfo.js +3 -1
  10. package/esm2015/lib/upload/entity/uploadlimit.js +4 -1
  11. package/esm2015/lib/upload/file-upload/file-upload.component.js +304 -38
  12. package/esm2015/lib/upload/upload.module.js +3 -1
  13. package/esm2015/lib/upload/upload.service.js +8 -3
  14. package/esm2015/lib/uploaddialog.service.js +2 -1
  15. package/esm5/lib/i18n/language.resource.js +30 -6
  16. package/esm5/lib/upload/download.service.js +27 -6
  17. package/esm5/lib/upload/entity/doctype.js +3 -1
  18. package/esm5/lib/upload/entity/fileinfo.js +3 -1
  19. package/esm5/lib/upload/entity/uploadfileinfo.js +3 -1
  20. package/esm5/lib/upload/entity/uploadlimit.js +4 -1
  21. package/esm5/lib/upload/file-upload/file-upload.component.js +337 -50
  22. package/esm5/lib/upload/upload.module.js +3 -1
  23. package/esm5/lib/upload/upload.service.js +8 -3
  24. package/esm5/lib/uploaddialog.service.js +2 -1
  25. package/fesm2015/gsp-svc-formdoc-upload.js +350 -51
  26. package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
  27. package/fesm5/gsp-svc-formdoc-upload.js +383 -63
  28. package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
  29. package/gsp-svc-formdoc-upload.metadata.json +1 -1
  30. package/lib/i18n/language.resource.d.ts +24 -0
  31. package/lib/upload/entity/doctype.d.ts +2 -1
  32. package/lib/upload/entity/fileinfo.d.ts +1 -0
  33. package/lib/upload/entity/uploadfileinfo.d.ts +1 -0
  34. package/lib/upload/entity/uploadlimit.d.ts +1 -0
  35. package/lib/upload/file-upload/file-upload.component.d.ts +15 -0
  36. 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, Component, NgModule, Injector, ComponentFactoryResolver, ViewChild, Input, defineInjectable } from '@angular/core';
15
+ import { Injectable, Pipe, Inject, LOCALE_ID, Component, Injector, ComponentFactoryResolver, NgModule, ViewChild, Input, 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';
@@ -90,6 +91,7 @@ const DocType = {
90
91
  Txt: 4,
91
92
  Image: 5,
92
93
  Other: 6,
94
+ Zip: 7,
93
95
  };
94
96
  DocType[DocType.Word] = 'Word';
95
97
  DocType[DocType.Excel] = 'Excel';
@@ -97,7 +99,8 @@ DocType[DocType.Powerpoint] = 'Powerpoint';
97
99
  DocType[DocType.Pdf] = 'Pdf';
98
100
  DocType[DocType.Txt] = 'Txt';
99
101
  DocType[DocType.Image] = 'Image';
100
- DocType[DocType.Other] = 'Other';
102
+ DocType[DocType.Other] = 'Other';
103
+ DocType[DocType.Zip] = 'Zip';
101
104
 
102
105
  /**
103
106
  * @fileoverview added by tsickle
@@ -277,7 +280,9 @@ class UploadService {
277
280
  /** @type {?} */
278
281
  let url = "/api/runtime/dfs/v1.0/formdoc/slice";
279
282
  //url = "/api/runtime/dfs/v1.0/formdoc/list";
280
- return this.httpclient.post(url, formdata).pipe(tap((/**
283
+ /** @type {?} */
284
+ const baseUrl = BasePathService.convertPath(url);
285
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
281
286
  * @param {?} res
282
287
  * @return {?}
283
288
  */
@@ -362,11 +367,13 @@ class UploadService {
362
367
  /** @type {?} */
363
368
  let url = "/api/runtime/dfs/v1.0/formdoc/copy";
364
369
  /** @type {?} */
370
+ const baseUrl = BasePathService.convertPath(url);
371
+ /** @type {?} */
365
372
  let request = new CopyFileRequest;
366
373
  request.metadataId = metadataId;
367
374
  request.rootId = rootId;
368
375
  request.path = path;
369
- return this.httpclient.post(url, request, { responseType: 'text' }).pipe(tap((/**
376
+ return this.httpclient.post(baseUrl, request, { responseType: 'text' }).pipe(tap((/**
370
377
  * @param {?} res
371
378
  * @return {?}
372
379
  */
@@ -490,7 +497,7 @@ const LANG_RESOURCES = {
490
497
  'uploading': '正在上传文件……',
491
498
  'selectedCount': '已选择文件数量:',
492
499
  'limitCount': '超出系统限制数量:',
493
- 'rechooseFile': ',重新选择上传文件。',
500
+ 'rechooseFile': ',请重新选择上传文件。',
494
501
  'save': '保存',
495
502
  'cancel': '取消',
496
503
  'haveSameName': '已上传过同名文件: ',
@@ -512,7 +519,13 @@ const LANG_RESOURCES = {
512
519
  'size': '大小',
513
520
  'close': '关闭',
514
521
  'loading': '拼命加载中',
515
- 'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。'
522
+ 'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。',
523
+ 'invalidCharacters': '文件名包含特殊字符',
524
+ 'invalidExtNames': '文档类型不允许上传',
525
+ 'whiteExtNames': '。允许上传的文件类型为:',
526
+ 'blackExtNames': '。不允许上传的文件类型为:',
527
+ 'UnrecognizedFileType': '无法确定文件类型',
528
+ 'fileNameOverSize': '文件名超出长度限制,最长允许'
516
529
  },
517
530
  'en-US': {
518
531
  'uploadFile': 'Upload File',
@@ -541,7 +554,13 @@ const LANG_RESOURCES = {
541
554
  'size': 'Size',
542
555
  'close': 'Close',
543
556
  'loading': 'Loading',
544
- 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
557
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
558
+ 'invalidCharacters': 'The file name contains special characters',
559
+ 'invalidExtNames': 'Document type does not allow uploading',
560
+ 'whiteExtNames': '.The file types allowed for uploading are:',
561
+ 'blackExtNames': '.The file types that are not allowed to be uploaded are:',
562
+ 'UnrecognizedFileType': 'Unrecognized file type',
563
+ 'fileNameOverSize': 'fileName oversize,the lengthest is'
545
564
  },
546
565
  'en': {
547
566
  'uploadFile': 'Upload File',
@@ -570,7 +589,13 @@ const LANG_RESOURCES = {
570
589
  'size': 'Size',
571
590
  'close': 'Close',
572
591
  'loading': 'Loading',
573
- 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
592
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
593
+ 'invalidCharacters': 'The file name contains special characters',
594
+ 'invalidExtNames': 'Document type does not allow uploading',
595
+ 'whiteExtNames': '.The file types allowed for uploading are:',
596
+ 'blackExtNames': '.The file types that are not allowed to be uploaded are:',
597
+ 'UnrecognizedFileType': 'Unrecognized file type',
598
+ 'fileNameOverSize': 'fileName oversize,the lengthest is'
574
599
  },
575
600
  'zh-CHT': {
576
601
  'uploadFile': '上傳文件',
@@ -599,7 +624,13 @@ const LANG_RESOURCES = {
599
624
  'size': '大小',
600
625
  'close': '關閉',
601
626
  'loading': '拼命加載中',
602
- 'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。'
627
+ 'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。',
628
+ 'invalidCharacters': '文件名包含特殊字符',
629
+ 'invalidExtNames': '文檔類型不允許上傳',
630
+ 'whiteExtNames': '。允許上傳的文件類型為:',
631
+ 'blackExtNames': '。不允許上傳的文件類型為:',
632
+ 'UnrecognizedFileType': '無法確定文件類型',
633
+ 'fileNameOverSize': '文件名超出长度限制,最长允许'
603
634
  },
604
635
  };
605
636
 
@@ -690,12 +721,20 @@ class FileUploadComponent {
690
721
  this.errTypeList = [];
691
722
  this.nullFileList = [];
692
723
  this.beyondFileList = [];
724
+ this.fileNameOversizeList = [];
725
+ this.invalidCharactersFileList = [];
726
+ this.invalidExtNamesFileList = [];
727
+ this.unrecognizedTypeFileList = [];
728
+ this.invalidCharacters = '';
729
+ this.invalidExtNames = '';
693
730
  this.showType = 0;
694
731
  this.mouseOn = false;
732
+ this.isWhiteList = false;
695
733
  this.bufferSize = 5 * 1024 * 1024;
696
734
  this.selectedFileCount = 0;
697
- this.uploadIconAddress = '/platform/runtime/dfs/images/upload.svg';
698
- this.uploadLittleIconAddress = '/platform/runtime/dfs/images/uploadIcon.svg';
735
+ this.uploadBtnDisabled = false;
736
+ this.uploadIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/upload.svg');
737
+ this.uploadLittleIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/uploadIcon.svg');
699
738
  this.hasSelectedFile = false;
700
739
  this.fileAllSelected = false;
701
740
  this.uploadProcess = { width: '0%' };
@@ -715,6 +754,7 @@ class FileUploadComponent {
715
754
  this.uploadedFileInfoList = [];
716
755
  this.oldUploadedFileList = [];
717
756
  //uploadedNameList = [];
757
+ this.uploadInfoErrorMessage = "";
718
758
  this.sameNameAllowed = true;
719
759
  this.maxFileSize = 0;
720
760
  this.checkboxPos = { top: '0px' };
@@ -722,6 +762,7 @@ class FileUploadComponent {
722
762
  this.fileCount = 0;
723
763
  this.oldIdList = [];
724
764
  this.securityInfo = null;
765
+ this.fileNameLength = 0;
725
766
  this.totalLoad = null;
726
767
  this.exStorageFileList = [];
727
768
  if (this.injector) {
@@ -785,9 +826,18 @@ class FileUploadComponent {
785
826
  * @return {?}
786
827
  */
787
828
  res => {
788
- if (res != null && res.error == null) {
829
+ if (res.error != null) {
830
+ this.uploadInfoErrorMessage = res.error.Message;
831
+ // console.log('获取上传信息报错,错误信息为:',errMsg);
832
+ return;
833
+ }
834
+ else {
835
+ this.uploadBtnDisabled = false;
789
836
  this.sameNameAllowed = res.sameNameAllowed;
790
837
  this.maxFileSize = parseInt(JSON.parse(res.validateConfiguration).maxFileSize);
838
+ this.isWhiteList = JSON.parse(res.validateConfiguration).whiteList;
839
+ this.invalidCharacters = JSON.parse(res.validateConfiguration).invalidCharacters;
840
+ this.invalidExtNames = JSON.parse(res.validateConfiguration).invalidExtNames.toLowerCase();
791
841
  this.allowedMultiUpload = res.allowedMultiUpload;
792
842
  if (!this.sameNameAllowed) {
793
843
  this.uploadService.getUploadedFileInfoList(this.formId, this.rootId).subscribe((/**
@@ -816,11 +866,51 @@ class FileUploadComponent {
816
866
  // message: this.localepipe.transform('uploading')
817
867
  // });
818
868
  }
869
+ /**
870
+ * @return {?}
871
+ */
872
+ getRightClass() {
873
+ if (this.uploadBtnDisabled) {
874
+ return 'btn btn-primary btn-lg disabled';
875
+ }
876
+ else {
877
+ return 'btn btn-primary btn-lg';
878
+ }
879
+ }
880
+ /**
881
+ * @param {?} name
882
+ * @return {?}
883
+ */
884
+ findInvalidCharacter(name) {
885
+ /** @type {?} */
886
+ let charList = [];
887
+ this.invalidCharacters.split('|').forEach((/**
888
+ * @param {?} element
889
+ * @return {?}
890
+ */
891
+ element => {
892
+ if (name.indexOf(element) >= 0)
893
+ charList.push(element);
894
+ }));
895
+ return charList;
896
+ }
897
+ /**
898
+ * @param {?} file
899
+ * @return {?}
900
+ */
901
+ hasFileType(file) {
902
+ return file.name.includes('.');
903
+ }
819
904
  /**
820
905
  * @param {?} $event
821
906
  * @return {?}
822
907
  */
823
908
  fileSelected($event) {
909
+ if (this.uploadInfoErrorMessage) {
910
+ this.msgService.error(this.uploadInfoErrorMessage);
911
+ this.uploadBtnDisabled = true;
912
+ return;
913
+ }
824
914
  this.hasSelectedFile = true;
825
915
  this.selectedFiles = document.querySelector('#file');
826
916
  if (this.fileCount > 0) {
@@ -835,6 +925,7 @@ class FileUploadComponent {
835
925
  for (let i = 0; i < this.selectedFiles.files.length; i++) {
836
926
  /** @type {?} */
837
927
  let selectedFile = this.selectedFiles.files[i];
928
+ selectedFile.isAllowedUpload = true;
838
929
  //selectedFile.slice
839
930
  /** @type {?} */
840
931
  let uuid = UUID.UUID();
@@ -842,12 +933,94 @@ class FileUploadComponent {
842
933
  this.nullFileList.push(selectedFile.name);
843
934
  continue;
844
935
  }
936
+ if (this.fileNameLength > 0 && selectedFile.name.length > this.fileNameLength) {
937
+ this.fileNameOversizeList.push(selectedFile.name);
938
+ continue;
939
+ }
845
940
  if (this.maxFileSize != null && this.maxFileSize > 0) {
846
941
  if (selectedFile.size > this.maxFileSize * 1000) {
847
942
  this.beyondFileList.push(selectedFile.name);
848
943
  continue;
849
944
  }
850
945
  }
946
+ /** @type {?} */
947
+ const invalidCharList = this.findInvalidCharacter(selectedFile.name);
948
+ /** @type {?} */
949
+ let invalidCharListFilter = invalidCharList.filter((/**
950
+ * @param {?} s
951
+ * @return {?}
952
+ */
953
+ (s) => {
954
+ return s && s.trim();
955
+ }));
956
+ /** @type {?} */
957
+ let errorMessage = "";
958
+ if (invalidCharListFilter.length > 0) {
959
+ invalidCharListFilter.forEach((/**
960
+ * @param {?} element
961
+ * @param {?} index
962
+ * @return {?}
963
+ */
964
+ (element, index) => {
965
+ errorMessage += "\"";
966
+ errorMessage += element;
967
+ errorMessage += "\"";
968
+ errorMessage += (index === invalidCharListFilter.length - 1) ? "" : ",";
969
+ }));
970
+ if (this.selectedFiles.files.length === 1) {
971
+ selectedFile.isAllowedUpload = false;
972
+ this.msgService.warning(this.localepipe.transform('invalidCharacters') + errorMessage + this.localepipe.transform('rechooseFile'));
973
+ return;
974
+ }
975
+ if (this.selectedFiles.files.length > 1) {
976
+ selectedFile.isAllowedUpload = false;
977
+ this.invalidCharactersFileList.push(selectedFile.name);
978
+ continue;
979
+ }
980
+ }
981
+ if (!this.hasFileType(selectedFile)) {
982
+ if (this.selectedFiles.files.length === 1) {
983
+ selectedFile.isAllowedUpload = false;
984
+ this.msgService.warning(selectedFile.name + this.localepipe.transform('UnrecognizedFileType') + this.localepipe.transform('rechooseFile'));
985
+ return;
986
+ }
987
+ if (this.selectedFiles.files.length > 1) {
988
+ selectedFile.isAllowedUpload = false;
989
+ this.unrecognizedTypeFileList.push(selectedFile.name);
990
+ continue;
991
+ }
992
+ }
993
+ // let curFileSuffix = selectedFile.name.split('.')[1];
994
+ /** @type {?} */
995
+ let curFileSuffix = selectedFile.name.substr(selectedFile.name.lastIndexOf('.') + 1).toLowerCase();
996
+ /** @type {?} */
997
+ const extNames = this.listToString(this.invalidExtNames.split('|'));
998
+ /** @type {?} */
999
+ const extNamesAry = this.invalidExtNames.split('|');
1000
+ if (!this.isWhiteList && extNamesAry.includes(curFileSuffix)) {
1001
+ if (this.selectedFiles.files.length === 1) {
1002
+ selectedFile.isAllowedUpload = false;
1003
+ this.msgService.warning(selectedFile.name + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('blackExtNames') + extNames + this.localepipe.transform('rechooseFile'));
1004
+ return;
1005
+ }
1006
+ if (this.selectedFiles.files.length > 1) {
1007
+ selectedFile.isAllowedUpload = false;
1008
+ this.invalidExtNamesFileList.push(selectedFile.name);
1009
+ continue;
1010
+ }
1011
+ }
1012
+ if (this.isWhiteList && !extNamesAry.includes(curFileSuffix)) {
1013
+ if (this.selectedFiles.files.length === 1) {
1014
+ selectedFile.isAllowedUpload = false;
1015
+ this.msgService.warning(selectedFile.name + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('whiteExtNames') + extNames + this.localepipe.transform('rechooseFile'));
1016
+ return;
1017
+ }
1018
+ if (this.selectedFiles.files.length > 1) {
1019
+ selectedFile.isAllowedUpload = false;
1020
+ this.invalidExtNamesFileList.push(selectedFile.name);
1021
+ continue;
1022
+ }
1023
+ }
851
1024
  if (!this.sameNameAllowed) {
852
1025
  if (this.uploadedFileInfoList.find((/**
853
1026
  * @param {?} x
@@ -934,7 +1107,9 @@ class FileUploadComponent {
934
1107
  continue;
935
1108
  }
936
1109
  }
937
- this.uploadFile(uuid, selectedFile, selectedFile.name);
1110
+ if (selectedFile.isAllowedUpload === true) {
1111
+ this.uploadFile(uuid, selectedFile, selectedFile.name);
1112
+ }
938
1113
  }
939
1114
  if (this.errFileList.length > 0) {
940
1115
  /** @type {?} */
@@ -945,17 +1120,39 @@ class FileUploadComponent {
945
1120
  if (this.nullFileList.length > 0) {
946
1121
  /** @type {?} */
947
1122
  let name = this.listToString(this.nullFileList);
948
- name = name.substring(0, name.length - 1);
949
1123
  this.msgService.warning(name + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
950
1124
  this.nullFileList = [];
951
1125
  }
1126
+ if (this.fileNameOversizeList.length > 0) {
1127
+ /** @type {?} */
1128
+ let name = this.listToString(this.fileNameOversizeList);
1129
+ this.msgService.warning(name + this.localepipe.transform('fileNameOverSize') + this.fileNameLength + this.localepipe.transform('rechooseFile'));
1130
+ this.fileNameOversizeList = [];
1131
+ }
952
1132
  if (this.beyondFileList.length > 0) {
953
1133
  /** @type {?} */
954
1134
  let name = this.listToString(this.beyondFileList);
955
- name = name.substring(0, name.length - 1);
956
1135
  this.msgService.warning(name + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
957
1136
  this.beyondFileList = [];
958
1137
  }
1138
+ if (this.invalidCharactersFileList.length > 0) {
1139
+ /** @type {?} */
1140
+ let name = this.listToString(this.invalidCharactersFileList);
1141
+ this.msgService.warning(name + this.localepipe.transform('invalidCharacters') + this.localepipe.transform('rechooseFile'));
1142
+ this.invalidCharactersFileList = [];
1143
+ }
1144
+ if (this.invalidExtNamesFileList.length > 0) {
1145
+ /** @type {?} */
1146
+ let name = this.listToString(this.invalidExtNamesFileList);
1147
+ this.msgService.warning(name + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('rechooseFile'));
1148
+ this.invalidExtNamesFileList = [];
1149
+ }
1150
+ if (this.unrecognizedTypeFileList.length > 0) {
1151
+ /** @type {?} */
1152
+ let name = this.listToString(this.unrecognizedTypeFileList);
1153
+ this.msgService.warning(name + this.localepipe.transform('UnrecognizedFileType') + this.localepipe.transform('rechooseFile'));
1154
+ this.unrecognizedTypeFileList = [];
1155
+ }
959
1156
  this.files = this.files.slice();
960
1157
  this.fileAllSelected = false;
961
1158
  $event.target.value = '';
@@ -997,7 +1194,8 @@ class FileUploadComponent {
997
1194
  extensionDropListId: 0,
998
1195
  extensionName: "",
999
1196
  securityDropListId: 0,
1000
- securityInfo: this.securityInfoList[0]
1197
+ securityInfo: this.securityInfoList[0],
1198
+ style: {}
1001
1199
  };
1002
1200
  if (this.storageExtension != null)
1003
1201
  fileInfo.extensionName = this.defaultPropertyName;
@@ -1024,6 +1222,9 @@ class FileUploadComponent {
1024
1222
  else if (type.includes("powerpoint") || type.includes("presentation")) {
1025
1223
  this.addDocInfo(selectedFile, fileInfo, DocType.Powerpoint);
1026
1224
  }
1225
+ else if (type.includes("zip") || selectedFile.name.includes(".rar")) {
1226
+ this.addDocInfo(selectedFile, fileInfo, DocType.Zip);
1227
+ }
1027
1228
  else {
1028
1229
  this.addDocInfo(selectedFile, fileInfo, DocType.Other);
1029
1230
  // let name: string = selectedFile.name;
@@ -1047,6 +1248,7 @@ class FileUploadComponent {
1047
1248
  uploadFileInfo.metadataId = uuid;
1048
1249
  uploadFileInfo.fileName = fileInfo.name;
1049
1250
  uploadFileInfo.fileSize = fileInfo.size;
1251
+ uploadFileInfo.originalSize = fileInfo.fileSize;
1050
1252
  uploadFileInfo.state = state;
1051
1253
  uploadFileInfo.securityInfo = this.securityInfoList[0];
1052
1254
  //判断是否支持分片上传
@@ -1171,6 +1373,8 @@ class FileUploadComponent {
1171
1373
  let formData = new FormData();
1172
1374
  formData.append('uploadEntity', JSON.stringify(entity));
1173
1375
  formData.append('file', selectedFile);
1376
+ /** @type {?} */
1377
+ let intervalId;
1174
1378
  this.uploadSingleFile(formData).subscribe((/**
1175
1379
  * @param {?} res
1176
1380
  * @return {?}
@@ -1188,26 +1392,66 @@ class FileUploadComponent {
1188
1392
  this.uploadedFileInfoList = this.uploadedFileInfoList.concat(uploadFileInfo);
1189
1393
  this.uploadedFileTotal++;
1190
1394
  }
1395
+ clearInterval(intervalId);
1191
1396
  }));
1397
+ /** @type {?} */
1398
+ let index = -1;
1399
+ this.files.forEach((/**
1400
+ * @param {?} x
1401
+ * @return {?}
1402
+ */
1403
+ x => {
1404
+ if (x.name == fileInfo.name) {
1405
+ if (index == -1)
1406
+ index = this.files.indexOf(x);
1407
+ }
1408
+ }));
1409
+ if (index != -1 && index != this.files.length - 1) {
1410
+ this.files.splice(index, 1);
1411
+ this.uploadFileInfoList.splice(index, 1);
1412
+ this.uploadedFileInfoList.splice(index, 1);
1413
+ this.uploadedFileTotal--;
1414
+ }
1415
+ intervalId = setInterval((/**
1416
+ * @return {?}
1417
+ */
1418
+ () => {
1419
+ this.getUploadProcess(entity.metadataId).subscribe((/**
1420
+ * @param {?} res
1421
+ * @return {?}
1422
+ */
1423
+ res => {
1424
+ if (res.error != null)
1425
+ this.files[this.files.indexOf(fileInfo)].uploadProcess = 10;
1426
+ else {
1427
+ if (res < 10)
1428
+ res = 10;
1429
+ if (res > 90)
1430
+ res = 90;
1431
+ this.files[this.files.indexOf(fileInfo)].uploadProcess = res;
1432
+ }
1433
+ }));
1434
+ }), 200);
1192
1435
  }
1436
+ }
1437
+ /**
1438
+ * @param {?} metadataId
1439
+ * @return {?}
1440
+ */
1441
+ getUploadProcess(metadataId) {
1193
1442
  /** @type {?} */
1194
- let index = -1;
1195
- this.files.forEach((/**
1196
- * @param {?} x
1443
+ let url = "/api/runtime/dfs/v1.0/formdoc/upload/process?metadataid=" + metadataId;
1444
+ return this.httpclient.get(url).pipe(tap((/**
1445
+ * @param {?} res
1197
1446
  * @return {?}
1198
1447
  */
1199
- x => {
1200
- if (x.name == fileInfo.name) {
1201
- if (index == -1)
1202
- index = this.files.indexOf(x);
1203
- }
1204
- }));
1205
- if (index != -1 && index != this.files.length - 1) {
1206
- this.files.splice(index, 1);
1207
- this.uploadFileInfoList.splice(index, 1);
1208
- this.uploadedFileInfoList.splice(index, 1);
1209
- //this.uploadedFileTotal--;
1210
- }
1448
+ res => { })), catchError((/**
1449
+ * @param {?} error
1450
+ * @return {?}
1451
+ */
1452
+ (error) => {
1453
+ return of$1(error);
1454
+ })));
1211
1455
  }
1212
1456
  /**
1213
1457
  * @param {?} formdata
@@ -1216,7 +1460,9 @@ class FileUploadComponent {
1216
1460
  uploadSingleFile(formdata) {
1217
1461
  /** @type {?} */
1218
1462
  let url = "/api/runtime/dfs/v1.0/formdoc/single";
1219
- return this.httpclient.post(url, formdata).pipe(tap((/**
1463
+ /** @type {?} */
1464
+ const baseUrl = BasePathService.convertPath(url);
1465
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1220
1466
  * @param {?} res
1221
1467
  * @return {?}
1222
1468
  */
@@ -1235,7 +1481,9 @@ class FileUploadComponent {
1235
1481
  uploadSliceFile(formdata) {
1236
1482
  /** @type {?} */
1237
1483
  let url = "/api/runtime/dfs/v1.0/formdoc/slice";
1238
- return this.httpclient.post(url, formdata).pipe(tap((/**
1484
+ /** @type {?} */
1485
+ const baseUrl = BasePathService.convertPath(url);
1486
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1239
1487
  * @param {?} res
1240
1488
  * @return {?}
1241
1489
  */
@@ -1254,7 +1502,9 @@ class FileUploadComponent {
1254
1502
  initMultiUpload(request) {
1255
1503
  /** @type {?} */
1256
1504
  let url = "/api/runtime/dfs/v1.0/formdoc/multi/init";
1257
- return this.httpclient.post(url, request).pipe(tap((/**
1505
+ /** @type {?} */
1506
+ const baseUrl = BasePathService.convertPath(url);
1507
+ return this.httpclient.post(baseUrl, request).pipe(tap((/**
1258
1508
  * @param {?} res
1259
1509
  * @return {?}
1260
1510
  */
@@ -1273,7 +1523,9 @@ class FileUploadComponent {
1273
1523
  multiUpload(formdata) {
1274
1524
  /** @type {?} */
1275
1525
  let url = "/api/runtime/dfs/v1.0/formdoc/multi/upload";
1276
- return this.httpclient.post(url, formdata).pipe(tap((/**
1526
+ /** @type {?} */
1527
+ const baseUrl = BasePathService.convertPath(url);
1528
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1277
1529
  * @param {?} res
1278
1530
  * @return {?}
1279
1531
  */
@@ -1292,7 +1544,9 @@ class FileUploadComponent {
1292
1544
  completeMultiUpload(request) {
1293
1545
  /** @type {?} */
1294
1546
  let url = "/api/runtime/dfs/v1.0/formdoc/multi/complete";
1295
- return this.httpclient.post(url, request).pipe(tap((/**
1547
+ /** @type {?} */
1548
+ const baseUrl = BasePathService.convertPath(url);
1549
+ return this.httpclient.post(baseUrl, request).pipe(tap((/**
1296
1550
  * @param {?} res
1297
1551
  * @return {?}
1298
1552
  */
@@ -1458,32 +1712,37 @@ class FileUploadComponent {
1458
1712
  addDocInfo(selectdFile, fileInfo, docType) {
1459
1713
  switch (docType) {
1460
1714
  case DocType.Word: {
1461
- fileInfo.source = "/platform/runtime/dfs/images/word.png";
1715
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/word.png");
1462
1716
  this.files.push(fileInfo);
1463
1717
  break;
1464
1718
  }
1465
1719
  case DocType.Pdf: {
1466
- fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
1720
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/pdf.png");
1467
1721
  this.files.push(fileInfo);
1468
1722
  break;
1469
1723
  }
1470
1724
  case DocType.Excel: {
1471
- fileInfo.source = "/platform/runtime/dfs/images/excel.png";
1725
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/excel.png");
1472
1726
  this.files.push(fileInfo);
1473
1727
  break;
1474
1728
  }
1475
1729
  case DocType.Txt: {
1476
- fileInfo.source = "/platform/runtime/dfs/images/txt.png";
1730
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/txt.png");
1731
+ this.files.push(fileInfo);
1732
+ break;
1733
+ }
1734
+ case DocType.Zip: {
1735
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/zip.png");
1477
1736
  this.files.push(fileInfo);
1478
1737
  break;
1479
1738
  }
1480
1739
  case DocType.Powerpoint: {
1481
- fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
1740
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/ppt.png");
1482
1741
  this.files.push(fileInfo);
1483
1742
  break;
1484
1743
  }
1485
1744
  case DocType.Other: {
1486
- fileInfo.source = "/platform/runtime/dfs/images/file.png";
1745
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/file.png");
1487
1746
  this.files.push(fileInfo);
1488
1747
  break;
1489
1748
  }
@@ -1504,6 +1763,7 @@ class FileUploadComponent {
1504
1763
  imgUrl = sanitizer.bypassSecurityTrustResourceUrl(imgUrl);
1505
1764
  }
1506
1765
  fileInfo.source = imgUrl;
1766
+ fileInfo.style = { "max-width": "120px", "max-height": "118px" };
1507
1767
  this.files.push(fileInfo);
1508
1768
  //因为异步处理的差异,补偿一次删除
1509
1769
  /** @type {?} */
@@ -1532,10 +1792,16 @@ class FileUploadComponent {
1532
1792
  * @return {?}
1533
1793
  */
1534
1794
  listToString(strList) {
1795
+ /** @type {?} */
1796
+ const result = strList.filter((/**
1797
+ * @param {?} item
1798
+ * @return {?}
1799
+ */
1800
+ item => item.trim() !== ''));
1535
1801
  /** @type {?} */
1536
1802
  let name = "";
1537
- for (let i = 0; i < strList.length; i++) {
1538
- name += strList[i] + ",";
1803
+ for (let i = 0; i < result.length; i++) {
1804
+ name += result[i] + (i === result.length - 1 ? "" : ",");
1539
1805
  }
1540
1806
  return name;
1541
1807
  }
@@ -1721,12 +1987,21 @@ class FileUploadComponent {
1721
1987
  mouseOut(file) {
1722
1988
  file.mouseOn = false;
1723
1989
  }
1990
+ /**
1991
+ * @param {?} oldUrl
1992
+ * @return {?}
1993
+ */
1994
+ createBaseUrl(oldUrl) {
1995
+ /** @type {?} */
1996
+ const baseUrl = BasePathService.convertPath(oldUrl);
1997
+ return baseUrl;
1998
+ }
1724
1999
  }
1725
2000
  FileUploadComponent.decorators = [
1726
2001
  { type: Component, args: [{
1727
2002
  selector: 'app-file-upload',
1728
- 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>",
1729
- 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:415px;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:120px;max-height:118px;align-items:center;margin:auto;vertical-align:middle;text-align:center}.pic_list ul li span.filename{width:100px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue_list{display:block;height:420px;overflow-y:auto}.file_list{list-style:none;margin:0;padding:0;overflow-x:hidden;overflow-y:auto}.file_list li{height:50px;line-height:35px;font-size:16px;position:relative}.file_list li button{float:right;top:6px;right:10px;width:20px}.file_list li p.title{padding:0 0 0 6px;margin:0 210px 0 0}.file_list li p.size{position:absolute;width:100px;top:0;right:100px}"]
2003
+ 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",
2004
+ 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}"]
1730
2005
  }] }
1731
2006
  ];
1732
2007
  /** @nocollapse */
@@ -1743,6 +2018,7 @@ FileUploadComponent.propDecorators = {
1743
2018
  fileCount: [{ type: Input }],
1744
2019
  oldIdList: [{ type: Input }],
1745
2020
  securityInfo: [{ type: Input }],
2021
+ fileNameLength: [{ type: Input }],
1746
2022
  opCell: [{ type: ViewChild, args: ['opCell',] }]
1747
2023
  };
1748
2024
 
@@ -1758,7 +2034,11 @@ class DownloadService {
1758
2034
  * @return {?}
1759
2035
  */
1760
2036
  getDownloadUrl(metadataId, rootId) {
1761
- return "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2037
+ /** @type {?} */
2038
+ const url = "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2039
+ /** @type {?} */
2040
+ const baseUrl = BasePathService.convertPath(url);
2041
+ return baseUrl;
1762
2042
  }
1763
2043
  /**
1764
2044
  * @param {?} metadataId
@@ -1766,7 +2046,11 @@ class DownloadService {
1766
2046
  * @return {?}
1767
2047
  */
1768
2048
  getStreamDownloadUrl(metadataId, rootId) {
1769
- return "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2049
+ /** @type {?} */
2050
+ const url = "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2051
+ /** @type {?} */
2052
+ const baseUrl = BasePathService.convertPath(url);
2053
+ return baseUrl;
1770
2054
  }
1771
2055
  /**
1772
2056
  * @param {?} metadataIdList
@@ -1776,7 +2060,11 @@ class DownloadService {
1776
2060
  getMultipleDownloadUrl(metadataIdList, rootId) {
1777
2061
  /** @type {?} */
1778
2062
  let list = JSON.parse(metadataIdList);
1779
- return "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
2063
+ /** @type {?} */
2064
+ const url = "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
2065
+ /** @type {?} */
2066
+ const baseUrl = BasePathService.convertPath(url);
2067
+ return baseUrl;
1780
2068
  }
1781
2069
  /**
1782
2070
  * @param {?} metadataIdList
@@ -1791,7 +2079,11 @@ class DownloadService {
1791
2079
  zipName = 'unifile.zip';
1792
2080
  if (!zipName.endsWith(".zip"))
1793
2081
  zipName += '.zip';
1794
- return "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
2082
+ /** @type {?} */
2083
+ const url = "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
2084
+ /** @type {?} */
2085
+ const baseUrl = BasePathService.convertPath(url);
2086
+ return baseUrl;
1795
2087
  }
1796
2088
  /**
1797
2089
  * @param {?} metadataId
@@ -1801,7 +2093,11 @@ class DownloadService {
1801
2093
  */
1802
2094
  getHistoryDownloadUrl(metadataId, rootId, version) {
1803
2095
  //let list:string[]=JSON.parse(metadataIdList);
1804
- return "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2096
+ /** @type {?} */
2097
+ const url = "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2098
+ /** @type {?} */
2099
+ const baseUrl = BasePathService.convertPath(url);
2100
+ return baseUrl;
1805
2101
  }
1806
2102
  /**
1807
2103
  * @private
@@ -1889,6 +2185,7 @@ UploadModule.decorators = [
1889
2185
  declarations: [FileUploadComponent, LocalLangPipe],
1890
2186
  imports: [
1891
2187
  CommonModule,
2188
+ FarrisRTFModule,
1892
2189
  NotifyModule,
1893
2190
  MessagerModule.forRoot(),
1894
2191
  LoadingModule.forRoot(),
@@ -2087,6 +2384,7 @@ class UploadDialogService {
2087
2384
  if (limit != null) {
2088
2385
  uploadRef.instance.fileCount = limit.fileCount;
2089
2386
  uploadRef.instance.securityInfo = limit.securityInfo;
2387
+ uploadRef.instance.fileNameLength = limit.fileNameLength;
2090
2388
  if (limit.fileType != null && limit.fileType != "")
2091
2389
  uploadRef.instance.fileType = limit.fileType;
2092
2390
  }
@@ -2180,6 +2478,7 @@ class UploadLimit {
2180
2478
  this.fileType = "*";
2181
2479
  this.fileCount = 0;
2182
2480
  this.securityInfo = null;
2481
+ this.fileNameLength = 0;
2183
2482
  }
2184
2483
  }
2185
2484