@gsp-svc/formdoc-upload 0.1.27 → 0.1.28

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.
@@ -10,8 +10,8 @@ import { LoadingService, LoadingModule } from '@farris/ui-loading';
10
10
  import { ProgressModule } from '@farris/ui-progress';
11
11
  import { FormsModule } from '@angular/forms';
12
12
  import { ComboListModule } from '@farris/ui-combo-list';
13
- import { HttpService } from '@ecp-caf/caf-common';
14
- import { Injectable, Component, NgModule, ViewChild, Input, Injector, ComponentFactoryResolver, defineInjectable } from '@angular/core';
13
+ import { LanguageService, HttpService } from '@ecp-caf/caf-common';
14
+ import { Injectable, Pipe, Inject, LOCALE_ID, NgModule, Injector, ComponentFactoryResolver, Component, ViewChild, Input, defineInjectable } from '@angular/core';
15
15
  import { BsModalService } from '@farris/ui-modal';
16
16
  import { of as of$1 } from 'rxjs';
17
17
  import { HttpClientModule } from '@angular/common/http';
@@ -65,6 +65,7 @@ var FormdocUploadComponent = /** @class */ (function () {
65
65
  * @fileoverview added by tsickle
66
66
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
67
67
  */
68
+ var ɵ0 = localStorage.getItem('languageCode') || 'zh-CHS';
68
69
  var FormdocUploadModule = /** @class */ (function () {
69
70
  function FormdocUploadModule() {
70
71
  }
@@ -72,7 +73,9 @@ var FormdocUploadModule = /** @class */ (function () {
72
73
  { type: NgModule, args: [{
73
74
  declarations: [FormdocUploadComponent],
74
75
  imports: [],
75
- exports: [FormdocUploadComponent]
76
+ exports: [FormdocUploadComponent],
77
+ providers: [LanguageService,
78
+ { provide: LOCALE_ID, useValue: ɵ0 },]
76
79
  },] }
77
80
  ];
78
81
  return FormdocUploadModule;
@@ -574,7 +577,7 @@ var FileUploadComponent = /** @class */ (function () {
574
577
  var _this = this;
575
578
  /** @type {?} */
576
579
  var loading = this.loadService.show({
577
- message: '正在上传文件……'
580
+ message: this.localepipe.transform('uploading')
578
581
  });
579
582
  this.hasSelectedFile = true;
580
583
  this.selectedFiles = document.querySelector('#file');
@@ -582,7 +585,7 @@ var FileUploadComponent = /** @class */ (function () {
582
585
  if (this.selectedFiles.files.length + this.files.length > this.fileCount) {
583
586
  /** @type {?} */
584
587
  var selectedNum = ((/** @type {?} */ (this.selectedFiles.files.length))) + this.files.length;
585
- this.msgService.warning('已选择' + selectedNum + '个文件,超过系统设置的数量限制' + this.fileCount + '个,请重新选择上传文件。');
588
+ this.msgService.warning(this.localepipe.transform('selectedCount') + selectedNum + this.localepipe.transform('limitCount') + this.fileCount + this.localepipe.transform('rechooseFile'));
586
589
  return;
587
590
  }
588
591
  }
@@ -604,11 +607,11 @@ var FileUploadComponent = /** @class */ (function () {
604
607
  // this.uploadFile(uuid, selectedFile);
605
608
  // })
606
609
  /** @type {?} */
607
- var msg_1 = this_1.msgService.show('warning', '已上传过同名文件: ' + selectedFile.name, {
610
+ var msg_1 = this_1.msgService.show('warning', this_1.localepipe.transform('haveSameName') + selectedFile.name, {
608
611
  initialState: {
609
612
  buttons: [
610
613
  {
611
- text: '重命名',
614
+ text: this_1.localepipe.transform('rename'),
612
615
  cls: 'btn btn-secondary',
613
616
  handle: (/**
614
617
  * @return {?}
@@ -639,7 +642,7 @@ var FileUploadComponent = /** @class */ (function () {
639
642
  })
640
643
  },
641
644
  {
642
- text: '替换',
645
+ text: this_1.localepipe.transform('replace'),
643
646
  cls: 'btn btn-secondary',
644
647
  handle: (/**
645
648
  * @return {?}
@@ -668,7 +671,7 @@ var FileUploadComponent = /** @class */ (function () {
668
671
  })
669
672
  },
670
673
  {
671
- text: '取消',
674
+ text: this_1.localepipe.transform('cancel'),
672
675
  cls: 'btn btn-secondary',
673
676
  handle: (/**
674
677
  * @return {?}
@@ -708,14 +711,14 @@ var FileUploadComponent = /** @class */ (function () {
708
711
  if (this.errFileList.length > 0) {
709
712
  /** @type {?} */
710
713
  var name_1 = this.listToString(this.errFileList);
711
- this.msgService.warning('已上传同名文件: ' + name_1 + '请重新选择上传文件。');
714
+ this.msgService.warning(this.localepipe.transform('haveSameName') + name_1 + this.localepipe.transform('rechooseFile'));
712
715
  this.errFileList = [];
713
716
  }
714
717
  if (this.nullFileList.length > 0) {
715
718
  /** @type {?} */
716
719
  var name_2 = this.listToString(this.nullFileList);
717
720
  name_2 = name_2.substring(0, name_2.length - 1);
718
- this.msgService.warning('文件: ' + name_2 + ' 大小为0,请重新选择上传文件。');
721
+ this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
719
722
  this.nullFileList = [];
720
723
  }
721
724
  // if (this.errTypeList.length > 0) {
@@ -737,7 +740,7 @@ var FileUploadComponent = /** @class */ (function () {
737
740
  * @return {?}
738
741
  */
739
742
  function (file) {
740
- this.msgService.error('上传附件失败。' + file.errorMessage);
743
+ this.msgService.error(this.localepipe.transform('uploadFailure') + file.errorMessage);
741
744
  };
742
745
  /**
743
746
  * @param {?} uuid
@@ -1229,7 +1232,7 @@ var FileUploadComponent = /** @class */ (function () {
1229
1232
  // this.notifyService.success(<NotifyOptions>{
1230
1233
  // msg: '保存成功!', timeout: 3000
1231
1234
  // });
1232
- this.msgService.warning('等一下,文档正在上传。');
1235
+ this.msgService.warning(this.localepipe.transform('wait'));
1233
1236
  return of$1(false);
1234
1237
  }
1235
1238
  if (this.storageExtension == null)
@@ -1240,15 +1243,15 @@ var FileUploadComponent = /** @class */ (function () {
1240
1243
  else {
1241
1244
  /** @type {?} */
1242
1245
  var loading_1 = this.loadService.show({
1243
- message: '正在将文件保存到' + this.storageExtension.extensionName
1246
+ message: this.localepipe.transform('saveTo') + this.storageExtension.extensionName
1244
1247
  });
1245
1248
  return this.uploadService.changeStorageInstance(this.exStorageFileList, this.rootId).pipe(map((/**
1246
1249
  * @param {?} res
1247
1250
  * @return {?}
1248
1251
  */
1249
1252
  function (res) {
1250
- if (res != null)
1251
- _this.msgService.error('保存到' + _this.storageExtension.extensionName + "失败,上传文件自动保存到" + _this.storageExtension.defaultPropertyName + "存储。" + res.error.Message);
1253
+ // if (res != null)
1254
+ // this.msgService.error('保存到' + this.storageExtension.extensionName + "失败,上传文件自动保存到" + this.storageExtension.defaultPropertyName + "存储。" + res.error.Message);
1252
1255
  loading_1.close();
1253
1256
  return _this.uploadFileInfoList;
1254
1257
  })));
@@ -1378,7 +1381,7 @@ var FileUploadComponent = /** @class */ (function () {
1378
1381
  FileUploadComponent.decorators = [
1379
1382
  { type: Component, args: [{
1380
1383
  selector: 'app-file-upload',
1381
- template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">\u5168\u9009</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">\u5168\u4E0D\u9009</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">\u5220\u9664</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">\u5220\u9664</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> \u4E0A\u4F20\u5931\u8D25 </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\u6587\u4EF6\u540D</th>\n <th style=\"width: 100px; vertical-align: middle\">\u5927\u5C0F</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">\u72B6\u6001</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\">\u64CD\u4F5C</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> \u4E0A\u4F20\u5931\u8D25 </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</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> \u4E0A\u4F20\u6210\u529F</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">\u5220\u9664</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
1384
+ template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>{{'uploadFile' | locale}} </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectAll' | locale}}</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> {{'uploadFailure' | locale}} </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">{{'fileName' | locale}}</th>\n <th style=\"width: 100px; vertical-align: middle\">{{'size' | locale}}</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">{{'state' | locale}}</th>\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\n {{storageExtension.extensionName}}\n </th>\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">{{'operation' | locale}}</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> {{'uploadFailure' | locale}} </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> {{'uploadSucceed' | locale}}</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">{{'delete' | locale}}</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
1382
1385
  styles: [".home_page{text-align:center}.home_page img{position:absolute;top:180px;margin-left:-35px;width:70px;height:56px}.home_page div{position:absolute;left:50%;top:255px;margin-left:-75px;width:150px;height:32px;overflow:hidden}.home_page div span{width:150px;height:32px;position:absolute;z-index:10;left:0}.home_page div input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)';z-index:11}.upload_button{width:110px;height:32px;overflow:hidden}.upload_button span{position:relative;right:-4px;top:4px;width:56px;height:22px;font-size:14px}.upload_button input{height:32px;width:110px;position:absolute;left:22px;top:12px;opacity:0;filter:'alpha(opacity=0)';overflow:hidden}.upload_button img{position:relative;left:-6px;top:3px;width:14px;height:14px}.button_group_upload{position:absolute;right:18px;top:12px;height:26px;width:53px}.button_group_upload button{height:26px;width:26px}.fileinput-button{position:absolute;right:60px;bottom:40px;overflow:hidden;width:24px;height:24px;border-radius:12px;transform:scale(2.5);-ms-transform:scale(2.5);-moz-transform:scale(2.5);-webkit-transform:scale(2.5);-o-transform:scale(2.5);color:#0686fd}.fileinput-button input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)'}.pic-droplist{height:24px;color:#e0e1e2;background-color:#e0e1e2}.pic-droplist input-group{display:table-cell;width:100px;text-align:center;border:0}.pic-droplist input-group div{border:0}.pic-droplist input-group div div,.pic-droplist input-group div input{background-color:#e0e1e2}.pic_list{padding:0;height:420px;overflow-y:auto;overflow-x:hidden}.pic_list ul{padding:0;list-style:none;width:100%;margin:20px 0 0 20px}.pic_list ul li{height:180px;width:135px;margin:8px 0 8px 12px;float:left;overflow:hidden;align-items:center;position:relative}.pic_list ul li div{width:135px;height:160px;margin:auto;display:table-cell;vertical-align:middle;text-align:center;position:relative}.pic_list ul li div img{max-width:120px;max-height:118px;align-items:center;margin:auto;vertical-align:middle;text-align:center}.pic_list ul li span.filename{width:100px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue_list{display:block;height:420px;overflow-y:auto}.file_list{list-style:none;margin:0;padding:0;overflow-x:hidden;overflow-y:auto}.file_list li{height:50px;line-height:35px;font-size:16px;position:relative}.file_list li button{float:right;top:6px;right:10px;width:20px}.file_list li p.title{padding:0 0 0 6px;margin:0 210px 0 0}.file_list li p.size{position:absolute;width:100px;top:0;right:100px}"]
1383
1386
  }] }
1384
1387
  ];
@@ -1570,12 +1573,160 @@ var DownloadService = /** @class */ (function () {
1570
1573
  * @fileoverview added by tsickle
1571
1574
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1572
1575
  */
1576
+ /** @type {?} */
1577
+ var LANG_RESOURCES = {
1578
+ 'zh-CHS': {
1579
+ 'uploadFile': '上传文件',
1580
+ 'uploading': '正在上传文件……',
1581
+ 'selectedCount': '已选择文件数量:',
1582
+ 'limitCount': '超出系统限制数量:',
1583
+ 'rechooseFile': ',重新选择上传文件。',
1584
+ 'save': '保存',
1585
+ 'cancel': '取消',
1586
+ 'haveSameName': '已上传过同名文件: ',
1587
+ 'rename': '重命名',
1588
+ 'replace': '替换',
1589
+ 'sizeZero': '文件大小为0',
1590
+ 'uploadFailure': '上传失败',
1591
+ 'uploadSucceed': '上传成功',
1592
+ 'wait': '等一下,文档正在上传。',
1593
+ 'saveTo': '正在将文件保存到',
1594
+ 'delete': '删除',
1595
+ 'selectAll': '全选',
1596
+ 'selectNull': '全不选',
1597
+ 'detail': '详情',
1598
+ 'fileName': '文件名',
1599
+ 'state': '状态',
1600
+ 'operation': '操作',
1601
+ 'size': '大小',
1602
+ 'close': '关闭',
1603
+ 'loading': '拼命加载中'
1604
+ },
1605
+ 'en-US': {
1606
+ 'uploadFile': 'Upload File',
1607
+ 'uploading': 'File Uploading……',
1608
+ 'selectedCount': 'Selected files count:',
1609
+ 'limitCount': 'System limit count:',
1610
+ 'rechooseFile': ',Reselect upload file.',
1611
+ 'save': 'Save',
1612
+ 'cancel': 'Cancel',
1613
+ 'haveSameName': 'A file with the same name has been uploaded: ',
1614
+ 'rename': 'Rename',
1615
+ 'replace': 'Replace',
1616
+ 'sizeZero': 'File size is 0',
1617
+ 'uploadFailure': 'Upload failed',
1618
+ 'uploadSucceed': 'Upload successfully',
1619
+ 'wait': 'Wait a minute, the file is uploading.',
1620
+ 'saveTo': 'Saving file to',
1621
+ 'delete': 'Delete',
1622
+ 'selectAll': 'Select all',
1623
+ 'selectNull': 'Not at all',
1624
+ 'detail': 'Details',
1625
+ 'fileName': 'Filename',
1626
+ 'state': 'State',
1627
+ 'operation': 'Operation',
1628
+ 'size': 'Size',
1629
+ 'close': 'Close',
1630
+ 'loading': 'Loading'
1631
+ },
1632
+ 'en': {
1633
+ 'uploadFile': 'Upload File',
1634
+ 'uploading': 'File Uploading……',
1635
+ 'selectedCount': 'Selected files count:',
1636
+ 'limitCount': 'System limit count:',
1637
+ 'rechooseFile': ',Reselect upload file.',
1638
+ 'save': 'Save',
1639
+ 'cancel': 'Cancel',
1640
+ 'haveSameName': 'A file with the same name has been uploaded: ',
1641
+ 'rename': 'Rename',
1642
+ 'replace': 'Replace',
1643
+ 'sizeZero': 'File size is 0',
1644
+ 'uploadFailure': 'Upload failed',
1645
+ 'uploadSucceed': 'Upload successfully',
1646
+ 'wait': 'Wait a minute, the file is uploading.',
1647
+ 'saveTo': 'Saving file to',
1648
+ 'delete': 'Delete',
1649
+ 'selectAll': 'Select all',
1650
+ 'selectNull': 'Not at all',
1651
+ 'detail': 'Details',
1652
+ 'fileName': 'Filename',
1653
+ 'state': 'State',
1654
+ 'operation': 'Operation',
1655
+ 'size': 'Size',
1656
+ 'close': 'Close',
1657
+ 'loading': 'Loading'
1658
+ },
1659
+ 'zh-CHT': {
1660
+ 'uploadFile': '上傳文件',
1661
+ 'uploading': '正在上傳文件……',
1662
+ 'selectedCount': '已選擇文件數量:',
1663
+ 'limitCount': '超出系統限制數量:',
1664
+ 'rechooseFile': ',重新選擇上傳文件。',
1665
+ 'save': '保存',
1666
+ 'cancel': '取消',
1667
+ 'haveSameName': '已上傳過同名文件: ',
1668
+ 'rename': '重命名',
1669
+ 'replace': '替換',
1670
+ 'sizeZero': '文件大小為0',
1671
+ 'uploadFailure': '上傳失敗',
1672
+ 'uploadSucceed': '上傳成功',
1673
+ 'wait': '等一下,文件正在上傳。',
1674
+ 'saveTo': '正在將文件保存到',
1675
+ 'delete': '删除',
1676
+ 'selectAll': '全選',
1677
+ 'selectNull': '全不選',
1678
+ 'detail': '詳情',
1679
+ 'fileName': '文件名',
1680
+ 'state': '狀態',
1681
+ 'operation': '操作',
1682
+ 'size': '大小',
1683
+ 'close': '關閉',
1684
+ 'loading': '拼命加載中'
1685
+ },
1686
+ };
1687
+
1688
+ /**
1689
+ * @fileoverview added by tsickle
1690
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1691
+ */
1692
+ var LocalLangPipe = /** @class */ (function () {
1693
+ function LocalLangPipe(localeId) {
1694
+ this.defaultLang = "zh-CHS";
1695
+ this.langCode = localStorage.getItem("languageCode") || localeId || this.defaultLang;
1696
+ this.lang = LANG_RESOURCES[this.langCode] || LANG_RESOURCES[this.defaultLang];
1697
+ }
1698
+ /**
1699
+ * @param {?} name
1700
+ * @return {?}
1701
+ */
1702
+ LocalLangPipe.prototype.transform = /**
1703
+ * @param {?} name
1704
+ * @return {?}
1705
+ */
1706
+ function (name) {
1707
+ return this.lang[name] || name;
1708
+ };
1709
+ LocalLangPipe.decorators = [
1710
+ { type: Pipe, args: [{ name: 'locale' },] }
1711
+ ];
1712
+ /** @nocollapse */
1713
+ LocalLangPipe.ctorParameters = function () { return [
1714
+ { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }
1715
+ ]; };
1716
+ return LocalLangPipe;
1717
+ }());
1718
+
1719
+ /**
1720
+ * @fileoverview added by tsickle
1721
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1722
+ */
1723
+ var ɵ0$1 = localStorage.getItem('languageCode') || 'zh-CHS';
1573
1724
  var UploadModule = /** @class */ (function () {
1574
1725
  function UploadModule() {
1575
1726
  }
1576
1727
  UploadModule.decorators = [
1577
1728
  { type: NgModule, args: [{
1578
- declarations: [FileUploadComponent],
1729
+ declarations: [FileUploadComponent, LocalLangPipe],
1579
1730
  imports: [
1580
1731
  CommonModule,
1581
1732
  ButtonsModule,
@@ -1588,7 +1739,8 @@ var UploadModule = /** @class */ (function () {
1588
1739
  ],
1589
1740
  exports: [FileUploadComponent],
1590
1741
  entryComponents: [FileUploadComponent],
1591
- providers: [UploadService, DownloadService]
1742
+ providers: [UploadService, DownloadService, LanguageService,
1743
+ { provide: LOCALE_ID, useValue: ɵ0$1 },]
1592
1744
  },] }
1593
1745
  ];
1594
1746
  return UploadModule;
@@ -1676,6 +1828,11 @@ var UploadDialogService = /** @class */ (function () {
1676
1828
  this.componentFactoryResolver = componentFactoryResolver;
1677
1829
  this.injector = injector;
1678
1830
  this.fileInfoList = [];
1831
+ if (this.injector) {
1832
+ this.modalService = this.injector.get(BsModalService);
1833
+ this.localeid = localStorage.getItem("languageCode") || this.injector.get(LOCALE_ID);
1834
+ this.localpipe = new LocalLangPipe(this.localeid);
1835
+ }
1679
1836
  }
1680
1837
  /**
1681
1838
  * @param {?} formId
@@ -1703,11 +1860,11 @@ var UploadDialogService = /** @class */ (function () {
1703
1860
  viewerRef.instance.rootId = rootId;
1704
1861
  viewerRef.instance.formId = formId;
1705
1862
  _this.dlg = _this.modalService.show(viewerRef, {
1706
- title: '上传文件',
1863
+ title: _this.localpipe.transform('uploadFile'),
1707
1864
  width: 950, height: 570,
1708
1865
  buttons: [
1709
1866
  {
1710
- text: '保存', cls: 'k-button k-button-icontext k-primary', handle: (/**
1867
+ text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: (/**
1711
1868
  * @return {?}
1712
1869
  */
1713
1870
  function () {
@@ -1725,7 +1882,7 @@ var UploadDialogService = /** @class */ (function () {
1725
1882
  })
1726
1883
  },
1727
1884
  {
1728
- text: '关闭', cls: 'k-button k-button-icontext', handle: (/**
1885
+ text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: (/**
1729
1886
  * @return {?}
1730
1887
  */
1731
1888
  function () {
@@ -1799,11 +1956,11 @@ var UploadDialogService = /** @class */ (function () {
1799
1956
  uploadRef.instance.formId = formId;
1800
1957
  uploadRef.instance.oldIdList = oldIdList;
1801
1958
  _this.dlg = _this.modalService.show(uploadRef, {
1802
- title: '上传文件',
1959
+ title: _this.localpipe.transform('uploadFile'),
1803
1960
  width: 950, height: 570,
1804
1961
  buttons: [
1805
1962
  {
1806
- text: '保存', cls: 'k-button k-button-icontext k-primary', handle: (/**
1963
+ text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: (/**
1807
1964
  * @return {?}
1808
1965
  */
1809
1966
  function () {
@@ -1821,7 +1978,7 @@ var UploadDialogService = /** @class */ (function () {
1821
1978
  })
1822
1979
  },
1823
1980
  {
1824
- text: '关闭', cls: 'k-button k-button-icontext', handle: (/**
1981
+ text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: (/**
1825
1982
  * @return {?}
1826
1983
  */
1827
1984
  function () {
@@ -1933,6 +2090,6 @@ var FileInfo = /** @class */ (function () {
1933
2090
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1934
2091
  */
1935
2092
 
1936
- export { FormdocUploadService, FormdocUploadComponent, FormdocUploadModule, UploadDialogMoudle, UploadDialogComponent, UploadDialogService, UploadService, DownloadService, FileUploadComponent, UploadFileInfo, UploadModule, ɵa, UploadLimit, GspFormDocOperateEntity, GspFormRemoveListEntity, GspFormUploadListEntity, GspFormDocInfo, GspDocMetaProperty, GspFormUploadEntity, FileInfo, OperatingModes, FileState };
2093
+ export { FormdocUploadService, FormdocUploadComponent, FormdocUploadModule, UploadDialogMoudle, UploadDialogComponent, UploadDialogService, UploadService, DownloadService, FileUploadComponent, UploadFileInfo, UploadModule, ɵa, UploadLimit, GspFormDocOperateEntity, GspFormRemoveListEntity, GspFormUploadListEntity, GspFormDocInfo, GspDocMetaProperty, GspFormUploadEntity, FileInfo, OperatingModes, FileState, LocalLangPipe as ɵb };
1937
2094
 
1938
2095
  //# sourceMappingURL=gsp-svc-formdoc-upload.js.map