@gsp-svc/formdoc-upload 0.1.23 → 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.
- package/bundles/gsp-svc-formdoc-upload.umd.js +221 -25
- package/bundles/gsp-svc-formdoc-upload.umd.js.map +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js.map +1 -1
- package/esm2015/gsp-svc-formdoc-upload.js +3 -2
- package/esm2015/lib/formdoc-upload.module.js +8 -3
- package/esm2015/lib/i18n/language.resource.js +116 -0
- package/esm2015/lib/local.pipe.js +48 -0
- package/esm2015/lib/upload/download.service.js +2 -2
- package/esm2015/lib/upload/entity/filestate.js +13 -0
- package/esm2015/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm2015/lib/upload/file-upload/file-upload.component.js +26 -16
- package/esm2015/lib/upload/upload.module.js +9 -4
- package/esm2015/lib/uploaddialog.service.js +18 -8
- package/esm2015/public-api.js +4 -1
- package/esm5/gsp-svc-formdoc-upload.js +3 -2
- package/esm5/lib/formdoc-upload.module.js +8 -3
- package/esm5/lib/i18n/language.resource.js +116 -0
- package/esm5/lib/local.pipe.js +51 -0
- package/esm5/lib/upload/download.service.js +2 -2
- package/esm5/lib/upload/entity/filestate.js +13 -0
- package/esm5/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm5/lib/upload/file-upload/file-upload.component.js +28 -16
- package/esm5/lib/upload/upload.module.js +9 -4
- package/esm5/lib/uploaddialog.service.js +18 -8
- package/esm5/public-api.js +4 -1
- package/fesm2015/gsp-svc-formdoc-upload.js +209 -28
- package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
- package/fesm5/gsp-svc-formdoc-upload.js +216 -28
- package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
- package/gsp-svc-formdoc-upload.d.ts +1 -0
- package/gsp-svc-formdoc-upload.metadata.json +1 -1
- package/lib/i18n/language.resource.d.ts +110 -0
- package/lib/local.pipe.d.ts +8 -0
- package/lib/upload/entity/filestate.d.ts +4 -0
- package/lib/upload/entity/uploadfileinfo.d.ts +2 -0
- package/lib/upload/file-upload/file-upload.component.d.ts +4 -1
- package/lib/uploaddialog.service.d.ts +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -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,
|
|
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;
|
|
@@ -446,6 +449,18 @@ var ExStorageFileInfo = /** @class */ (function () {
|
|
|
446
449
|
return ExStorageFileInfo;
|
|
447
450
|
}());
|
|
448
451
|
|
|
452
|
+
/**
|
|
453
|
+
* @fileoverview added by tsickle
|
|
454
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
455
|
+
*/
|
|
456
|
+
/** @enum {number} */
|
|
457
|
+
var FileState = {
|
|
458
|
+
New: 0,
|
|
459
|
+
Update: 1,
|
|
460
|
+
};
|
|
461
|
+
FileState[FileState.New] = 'New';
|
|
462
|
+
FileState[FileState.Update] = 'Update';
|
|
463
|
+
|
|
449
464
|
/**
|
|
450
465
|
* @fileoverview added by tsickle
|
|
451
466
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -560,13 +575,17 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
560
575
|
*/
|
|
561
576
|
function ($event) {
|
|
562
577
|
var _this = this;
|
|
578
|
+
/** @type {?} */
|
|
579
|
+
var loading = this.loadService.show({
|
|
580
|
+
message: this.localepipe.transform('uploading')
|
|
581
|
+
});
|
|
563
582
|
this.hasSelectedFile = true;
|
|
564
583
|
this.selectedFiles = document.querySelector('#file');
|
|
565
584
|
if (this.fileCount > 0) {
|
|
566
585
|
if (this.selectedFiles.files.length + this.files.length > this.fileCount) {
|
|
567
586
|
/** @type {?} */
|
|
568
587
|
var selectedNum = ((/** @type {?} */ (this.selectedFiles.files.length))) + this.files.length;
|
|
569
|
-
this.msgService.warning('
|
|
588
|
+
this.msgService.warning(this.localepipe.transform('selectedCount') + selectedNum + this.localepipe.transform('limitCount') + this.fileCount + this.localepipe.transform('rechooseFile'));
|
|
570
589
|
return;
|
|
571
590
|
}
|
|
572
591
|
}
|
|
@@ -588,11 +607,11 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
588
607
|
// this.uploadFile(uuid, selectedFile);
|
|
589
608
|
// })
|
|
590
609
|
/** @type {?} */
|
|
591
|
-
var msg_1 = this_1.msgService.show('warning', '
|
|
610
|
+
var msg_1 = this_1.msgService.show('warning', this_1.localepipe.transform('haveSameName') + selectedFile.name, {
|
|
592
611
|
initialState: {
|
|
593
612
|
buttons: [
|
|
594
613
|
{
|
|
595
|
-
text: '
|
|
614
|
+
text: this_1.localepipe.transform('rename'),
|
|
596
615
|
cls: 'btn btn-secondary',
|
|
597
616
|
handle: (/**
|
|
598
617
|
* @return {?}
|
|
@@ -623,7 +642,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
623
642
|
})
|
|
624
643
|
},
|
|
625
644
|
{
|
|
626
|
-
text: '
|
|
645
|
+
text: this_1.localepipe.transform('replace'),
|
|
627
646
|
cls: 'btn btn-secondary',
|
|
628
647
|
handle: (/**
|
|
629
648
|
* @return {?}
|
|
@@ -634,7 +653,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
634
653
|
* @return {?}
|
|
635
654
|
*/
|
|
636
655
|
function (x) { return x.fileName == selectedFile.name; })).metadataId;
|
|
637
|
-
_this.uploadFile(uuid, selectedFile, selectedFile.name);
|
|
656
|
+
_this.uploadFile(uuid, selectedFile, selectedFile.name, FileState.Update);
|
|
638
657
|
_this.uploadedFileTotal--;
|
|
639
658
|
if (_this.oldUploadedFileList.find((/**
|
|
640
659
|
* @param {?} x
|
|
@@ -652,7 +671,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
652
671
|
})
|
|
653
672
|
},
|
|
654
673
|
{
|
|
655
|
-
text: '
|
|
674
|
+
text: this_1.localepipe.transform('cancel'),
|
|
656
675
|
cls: 'btn btn-secondary',
|
|
657
676
|
handle: (/**
|
|
658
677
|
* @return {?}
|
|
@@ -692,14 +711,14 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
692
711
|
if (this.errFileList.length > 0) {
|
|
693
712
|
/** @type {?} */
|
|
694
713
|
var name_1 = this.listToString(this.errFileList);
|
|
695
|
-
this.msgService.warning('
|
|
714
|
+
this.msgService.warning(this.localepipe.transform('haveSameName') + name_1 + this.localepipe.transform('rechooseFile'));
|
|
696
715
|
this.errFileList = [];
|
|
697
716
|
}
|
|
698
717
|
if (this.nullFileList.length > 0) {
|
|
699
718
|
/** @type {?} */
|
|
700
719
|
var name_2 = this.listToString(this.nullFileList);
|
|
701
720
|
name_2 = name_2.substring(0, name_2.length - 1);
|
|
702
|
-
this.msgService.warning(
|
|
721
|
+
this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
|
|
703
722
|
this.nullFileList = [];
|
|
704
723
|
}
|
|
705
724
|
// if (this.errTypeList.length > 0) {
|
|
@@ -710,6 +729,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
710
729
|
this.files = this.files.slice();
|
|
711
730
|
this.fileAllSelected = false;
|
|
712
731
|
$event.target.value = '';
|
|
732
|
+
loading.close();
|
|
713
733
|
};
|
|
714
734
|
/**
|
|
715
735
|
* @param {?} file
|
|
@@ -720,22 +740,25 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
720
740
|
* @return {?}
|
|
721
741
|
*/
|
|
722
742
|
function (file) {
|
|
723
|
-
this.msgService.error('
|
|
743
|
+
this.msgService.error(this.localepipe.transform('uploadFailure') + file.errorMessage);
|
|
724
744
|
};
|
|
725
745
|
/**
|
|
726
746
|
* @param {?} uuid
|
|
727
747
|
* @param {?} selectedFile
|
|
728
748
|
* @param {?} fileName
|
|
749
|
+
* @param {?=} state
|
|
729
750
|
* @return {?}
|
|
730
751
|
*/
|
|
731
752
|
FileUploadComponent.prototype.uploadFile = /**
|
|
732
753
|
* @param {?} uuid
|
|
733
754
|
* @param {?} selectedFile
|
|
734
755
|
* @param {?} fileName
|
|
756
|
+
* @param {?=} state
|
|
735
757
|
* @return {?}
|
|
736
758
|
*/
|
|
737
|
-
function (uuid, selectedFile, fileName) {
|
|
759
|
+
function (uuid, selectedFile, fileName, state) {
|
|
738
760
|
var _this = this;
|
|
761
|
+
if (state === void 0) { state = FileState.New; }
|
|
739
762
|
/** @type {?} */
|
|
740
763
|
var fileInfo;
|
|
741
764
|
// let uuid = UUID.UUID();
|
|
@@ -773,6 +796,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
773
796
|
uploadFileInfo.metadataId = uuid;
|
|
774
797
|
uploadFileInfo.fileName = fileInfo.name;
|
|
775
798
|
uploadFileInfo.fileSize = fileInfo.size;
|
|
799
|
+
uploadFileInfo.state = state;
|
|
776
800
|
var _loop_2 = function () {
|
|
777
801
|
/** @type {?} */
|
|
778
802
|
var uploadInfo = new GspFormUploadEntity;
|
|
@@ -1208,7 +1232,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1208
1232
|
// this.notifyService.success(<NotifyOptions>{
|
|
1209
1233
|
// msg: '保存成功!', timeout: 3000
|
|
1210
1234
|
// });
|
|
1211
|
-
this.msgService.warning('
|
|
1235
|
+
this.msgService.warning(this.localepipe.transform('wait'));
|
|
1212
1236
|
return of$1(false);
|
|
1213
1237
|
}
|
|
1214
1238
|
if (this.storageExtension == null)
|
|
@@ -1219,15 +1243,15 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1219
1243
|
else {
|
|
1220
1244
|
/** @type {?} */
|
|
1221
1245
|
var loading_1 = this.loadService.show({
|
|
1222
|
-
message: '
|
|
1246
|
+
message: this.localepipe.transform('saveTo') + this.storageExtension.extensionName
|
|
1223
1247
|
});
|
|
1224
1248
|
return this.uploadService.changeStorageInstance(this.exStorageFileList, this.rootId).pipe(map((/**
|
|
1225
1249
|
* @param {?} res
|
|
1226
1250
|
* @return {?}
|
|
1227
1251
|
*/
|
|
1228
1252
|
function (res) {
|
|
1229
|
-
if (res != null)
|
|
1230
|
-
|
|
1253
|
+
// if (res != null)
|
|
1254
|
+
// this.msgService.error('保存到' + this.storageExtension.extensionName + "失败,上传文件自动保存到" + this.storageExtension.defaultPropertyName + "存储。" + res.error.Message);
|
|
1231
1255
|
loading_1.close();
|
|
1232
1256
|
return _this.uploadFileInfoList;
|
|
1233
1257
|
})));
|
|
@@ -1357,7 +1381,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
1357
1381
|
FileUploadComponent.decorators = [
|
|
1358
1382
|
{ type: Component, args: [{
|
|
1359
1383
|
selector: 'app-file-upload',
|
|
1360
|
-
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>",
|
|
1361
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}"]
|
|
1362
1386
|
}] }
|
|
1363
1387
|
];
|
|
@@ -1433,7 +1457,7 @@ var DownloadService = /** @class */ (function () {
|
|
|
1433
1457
|
zipName = 'unifile.zip';
|
|
1434
1458
|
if (!zipName.endsWith(".zip"))
|
|
1435
1459
|
zipName += '.zip';
|
|
1436
|
-
return "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + zipName;
|
|
1460
|
+
return "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
|
|
1437
1461
|
};
|
|
1438
1462
|
/**
|
|
1439
1463
|
* @param {?} metadataId
|
|
@@ -1549,12 +1573,160 @@ var DownloadService = /** @class */ (function () {
|
|
|
1549
1573
|
* @fileoverview added by tsickle
|
|
1550
1574
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1551
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';
|
|
1552
1724
|
var UploadModule = /** @class */ (function () {
|
|
1553
1725
|
function UploadModule() {
|
|
1554
1726
|
}
|
|
1555
1727
|
UploadModule.decorators = [
|
|
1556
1728
|
{ type: NgModule, args: [{
|
|
1557
|
-
declarations: [FileUploadComponent],
|
|
1729
|
+
declarations: [FileUploadComponent, LocalLangPipe],
|
|
1558
1730
|
imports: [
|
|
1559
1731
|
CommonModule,
|
|
1560
1732
|
ButtonsModule,
|
|
@@ -1567,7 +1739,8 @@ var UploadModule = /** @class */ (function () {
|
|
|
1567
1739
|
],
|
|
1568
1740
|
exports: [FileUploadComponent],
|
|
1569
1741
|
entryComponents: [FileUploadComponent],
|
|
1570
|
-
providers: [UploadService, DownloadService
|
|
1742
|
+
providers: [UploadService, DownloadService, LanguageService,
|
|
1743
|
+
{ provide: LOCALE_ID, useValue: ɵ0$1 },]
|
|
1571
1744
|
},] }
|
|
1572
1745
|
];
|
|
1573
1746
|
return UploadModule;
|
|
@@ -1655,6 +1828,11 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
1655
1828
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1656
1829
|
this.injector = injector;
|
|
1657
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
|
+
}
|
|
1658
1836
|
}
|
|
1659
1837
|
/**
|
|
1660
1838
|
* @param {?} formId
|
|
@@ -1682,11 +1860,11 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
1682
1860
|
viewerRef.instance.rootId = rootId;
|
|
1683
1861
|
viewerRef.instance.formId = formId;
|
|
1684
1862
|
_this.dlg = _this.modalService.show(viewerRef, {
|
|
1685
|
-
title: '
|
|
1863
|
+
title: _this.localpipe.transform('uploadFile'),
|
|
1686
1864
|
width: 950, height: 570,
|
|
1687
1865
|
buttons: [
|
|
1688
1866
|
{
|
|
1689
|
-
text: '
|
|
1867
|
+
text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: (/**
|
|
1690
1868
|
* @return {?}
|
|
1691
1869
|
*/
|
|
1692
1870
|
function () {
|
|
@@ -1704,7 +1882,7 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
1704
1882
|
})
|
|
1705
1883
|
},
|
|
1706
1884
|
{
|
|
1707
|
-
text: '
|
|
1885
|
+
text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: (/**
|
|
1708
1886
|
* @return {?}
|
|
1709
1887
|
*/
|
|
1710
1888
|
function () {
|
|
@@ -1778,11 +1956,11 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
1778
1956
|
uploadRef.instance.formId = formId;
|
|
1779
1957
|
uploadRef.instance.oldIdList = oldIdList;
|
|
1780
1958
|
_this.dlg = _this.modalService.show(uploadRef, {
|
|
1781
|
-
title: '
|
|
1959
|
+
title: _this.localpipe.transform('uploadFile'),
|
|
1782
1960
|
width: 950, height: 570,
|
|
1783
1961
|
buttons: [
|
|
1784
1962
|
{
|
|
1785
|
-
text: '
|
|
1963
|
+
text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: (/**
|
|
1786
1964
|
* @return {?}
|
|
1787
1965
|
*/
|
|
1788
1966
|
function () {
|
|
@@ -1800,7 +1978,7 @@ var UploadDialogService = /** @class */ (function () {
|
|
|
1800
1978
|
})
|
|
1801
1979
|
},
|
|
1802
1980
|
{
|
|
1803
|
-
text: '
|
|
1981
|
+
text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: (/**
|
|
1804
1982
|
* @return {?}
|
|
1805
1983
|
*/
|
|
1806
1984
|
function () {
|
|
@@ -1892,6 +2070,16 @@ var GspDocMetaProperty = /** @class */ (function () {
|
|
|
1892
2070
|
return GspDocMetaProperty;
|
|
1893
2071
|
}());
|
|
1894
2072
|
|
|
2073
|
+
/**
|
|
2074
|
+
* @fileoverview added by tsickle
|
|
2075
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2076
|
+
*/
|
|
2077
|
+
var FileInfo = /** @class */ (function () {
|
|
2078
|
+
function FileInfo() {
|
|
2079
|
+
}
|
|
2080
|
+
return FileInfo;
|
|
2081
|
+
}());
|
|
2082
|
+
|
|
1895
2083
|
/**
|
|
1896
2084
|
* @fileoverview added by tsickle
|
|
1897
2085
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1902,6 +2090,6 @@ var GspDocMetaProperty = /** @class */ (function () {
|
|
|
1902
2090
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1903
2091
|
*/
|
|
1904
2092
|
|
|
1905
|
-
export { FormdocUploadService, FormdocUploadComponent, FormdocUploadModule, UploadDialogMoudle, UploadDialogComponent, UploadDialogService, UploadService, DownloadService, FileUploadComponent, UploadFileInfo, UploadModule, ɵa, UploadLimit, GspFormDocOperateEntity, GspFormRemoveListEntity, GspFormUploadListEntity, GspFormDocInfo, GspDocMetaProperty, GspFormUploadEntity };
|
|
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 };
|
|
1906
2094
|
|
|
1907
2095
|
//# sourceMappingURL=gsp-svc-formdoc-upload.js.map
|