@gsp-svc/formdoc-upload 0.2.20 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/gsp-svc-formdoc-upload.umd.js +121 -32
- package/bundles/gsp-svc-formdoc-upload.umd.js.map +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js +1 -1
- package/bundles/gsp-svc-formdoc-upload.umd.min.js.map +1 -1
- package/esm2015/lib/upload/entity/doctype.js +3 -1
- package/esm2015/lib/upload/entity/fileinfo.js +3 -1
- package/esm2015/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm2015/lib/upload/file-upload/file-upload.component.js +113 -24
- package/esm2015/lib/uploaddialog.service.js +1 -1
- package/esm5/lib/upload/entity/doctype.js +3 -1
- package/esm5/lib/upload/entity/fileinfo.js +3 -1
- package/esm5/lib/upload/entity/uploadfileinfo.js +3 -1
- package/esm5/lib/upload/file-upload/file-upload.component.js +128 -32
- package/esm5/lib/uploaddialog.service.js +1 -1
- package/fesm2015/gsp-svc-formdoc-upload.js +111 -24
- package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
- package/fesm5/gsp-svc-formdoc-upload.js +127 -33
- package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
- package/gsp-svc-formdoc-upload.metadata.json +1 -1
- package/lib/upload/entity/doctype.d.ts +2 -1
- package/lib/upload/entity/fileinfo.d.ts +1 -0
- package/lib/upload/entity/uploadfileinfo.d.ts +1 -0
- package/lib/upload/file-upload/file-upload.component.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@farris/ui-dialog"),require("@angular/common"),require("rxjs/observable/of"),require("rxjs/operators"),require("angular2-uuid"),require("@angular/platform-browser"),require("@farris/ui-messager"),require("@farris/ui-loading"),require("@farris/ui-progress"),require("@angular/forms"),require("@farris/ui-combo-list"),require("@farris/ui-forms"),require("@farris/rtf"),require("@ecp-caf/caf-common"),require("@angular/core"),require("@farris/ui-modal"),require("rxjs"),require("@angular/common/http"),require("@farris/ui-notify")):"function"==typeof define&&define.amd?define("@gsp-svc/formdoc-upload",["exports","@farris/ui-dialog","@angular/common","rxjs/observable/of","rxjs/operators","angular2-uuid","@angular/platform-browser","@farris/ui-messager","@farris/ui-loading","@farris/ui-progress","@angular/forms","@farris/ui-combo-list","@farris/ui-forms","@farris/rtf","@ecp-caf/caf-common","@angular/core","@farris/ui-modal","rxjs","@angular/common/http","@farris/ui-notify"],t):t((e["gsp-svc"]=e["gsp-svc"]||{},e["gsp-svc"]["formdoc-upload"]={}),e.uiDialog,e.ng.common,e.rxjs["observable/of"],e.rxjs.operators,e.angular2Uuid,e.ng.platformBrowser,e.uiMessager,e.uiLoading,e.uiProgress,e.ng.forms,e.uiComboList,e.uiForms,e.rtf,e.cafCommon,e.ng.core,e.uiModal,e.rxjs,e.ng.common.http,e.uiNotify)}(this,function(e,t,i,o,l,h,s,n,a,r,c,p,d,u,f,m,g,v,x,y){"use strict";var b=function(){function e(){}return e.decorators=[{type:m.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[]},e.ngInjectableDef=m.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),F=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:m.Component,args:[{selector:"lib-formdoc-upload",template:"\n <p>\n formdoc-upload works!\n </p>\n "}]}],e.ctorParameters=function(){return[]},e}(),I=localStorage.getItem("languageCode")||"zh-CHS",S=function(){function e(){}return e.decorators=[{type:m.NgModule,args:[{declarations:[F],imports:[x.HttpClientModule],exports:[F],providers:[f.LanguageService,f.HttpService,f.CacheService,f.SessionService,{provide:m.LOCALE_ID,useValue:I}]}]}],e}(),w={Word:0,Excel:1,Powerpoint:2,Pdf:3,Txt:4,Image:5,Other:6};w[w.Word]="Word",w[w.Excel]="Excel",w[w.Powerpoint]="Powerpoint",w[w.Pdf]="Pdf",w[w.Txt]="Txt",w[w.Image]="Image",w[w.Other]="Other";var L={Formal:0,Temp:1};L[L.Formal]="Formal",L[L.Temp]="Temp";var N=function ie(){},C=function ne(){},k=function oe(){},U=function le(){},z=function(){function e(e,t){this.http=e,this.httpclient=t}return e.prototype.uploadList=function(e,t){return e.rootId=t,"/api/runtime/dfs/v1.0/formdoc/list",this.http.post("/api/runtime/dfs/v1.0/formdoc/list",e).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.commit=function(e,t){var i=new C;return i.metadataIdList=e,i.rootId=t,"/api/runtime/dfs/v1.0/formdoc/commit",this.http.post("/api/runtime/dfs/v1.0/formdoc/commit",i).pipe()},e.prototype.cancel=function(e,t){var i=new C;return i.metadataIdList=e,i.rootId=t,"/api/runtime/dfs/v1.0/formdoc/cancel",this.http.put("/api/runtime/dfs/v1.0/formdoc/cancel",i).pipe()},e.prototype.removeList=function(e,t){var i=new N;return i.metadataIdList=e,i.mode=L.Temp,i.rootId=t,this.http["delete"]("/api/runtime/dfs/v1.0/formdoc/list",i).pipe()},e.prototype.getFile=function(e,t){var i;return i=""==t?"/api/runtime/dfs/v1.0/formdoc/file/"+e:"/api/runtime/dfs/v1.0/formdoc/file/"+e+"/"+t,this.http.get(i).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.uploadFile=function(e){return this.http.post("/api/runtime/dfs/v1.0/formdoc",e).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.uploadSliceFile=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/slice");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.getStorageExtensionInfo=function(){return this.http.get("/api/runtime/dfs/v1.0/storagestrategy/extension").pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.getSecurityInfoList=function(e){var t="/api/runtime/dfs/v1.0/storagestrategy/security";return t=t+"?id="+e.securityId+"&level="+e.securityLevel,this.http.get(t).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.changeStorageInstance=function(e,t){var i=new k;return i.fileInfoList=e,i.rootId=t,this.http.post("/api/runtime/dfs/v1.0/formdoc/changeinstance",i).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.copyFile=function(e,t,i){var n=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/copy"),o=new U;return o.metadataId=e,o.rootId=t,o.path=i,this.httpclient.post(n,o,{responseType:"text"}).pipe(l.tap(function(e){}))},e.prototype.saveSecurityInfo=function(e,i){var n=[];return e.forEach(function(e){var t={id:e.metadataId,rootId:i,exProperty:JSON.stringify(e.securityInfo)};n.push(t)}),this.http.post("/api/runtime/dfs/v1.0/doc/exproperty",n).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.getUploadedFileInfoList=function(e,t){var i="/api/runtime/dfs/v1.0/formdoc/uploadedfile/infolist?formid="+e+"&rootid="+t;return this.http.get(i).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.prototype.getUploadInfo=function(e){var t="/api/runtime/dfs/v1.0/rootsetting/info?id="+e;return this.http.get(t).pipe(l.tap(function(e){}),l.catchError(function(e){return o.of(e)}))},e.decorators=[{type:m.Injectable}],e.ctorParameters=function(){return[{type:f.HttpService},{type:x.HttpClient}]},e}(),E=function se(){},T=function ae(){},P={New:0,Update:1};P[P.New]="New",P[P.Update]="Update";var M={"zh-CHS":{uploadFile:"上传文件",uploading:"正在上传文件……",selectedCount:"已选择文件数量:",limitCount:"超出系统限制数量:",rechooseFile:",请重新选择上传文件。",save:"保存",cancel:"取消",haveSameName:"已上传过同名文件: ",rename:"重命名",replace:"替换",sizeZero:"文件大小为0",sizeMax:"文件大小超出限制",uploadFailure:"上传失败",uploadSucceed:"上传成功",wait:"等一下,文档正在上传。",saveTo:"正在将文件保存到","delete":"删除",selectAll:"全选",selectNull:"全不选",detail:"详情",fileName:"文件名",state:"状态",operation:"操作",size:"大小",close:"关闭",loading:"拼命加载中",mismatchChunkSize:"文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。",invalidCharacters:"文件名包含特殊字符",invalidExtNames:"文档类型不允许上传",whiteExtNames:"。允许上传的文件类型为:",blackExtNames:"。不允许上传的文件类型为:",UnrecognizedFileType:"无法确定文件类型",fileNameOverSize:"文件名超出长度限制,最长允许"},"en-US":{uploadFile:"Upload File",uploading:"File Uploading……",selectedCount:"Selected files count:",limitCount:"System limit count:",rechooseFile:",Reselect upload file.",save:"Save",cancel:"Cancel",haveSameName:"A file with the same name has been uploaded: ",rename:"Rename",replace:"Replace",sizeZero:"File size is 0",sizeMax:"File size beyond limit",uploadFailure:"Upload failed",uploadSucceed:"Upload successfully",wait:"Wait a minute, the file is uploading.",saveTo:"Saving file to","delete":"Delete",selectAll:"Select all",selectNull:"Not at all",detail:"Details",fileName:"Filename",state:"State",operation:"Operation",size:"Size",close:"Close",loading:"Loading",mismatchChunkSize:"The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.",invalidCharacters:"The file name contains special characters",invalidExtNames:"Document type does not allow uploading",whiteExtNames:".The file types allowed for uploading are:",blackExtNames:".The file types that are not allowed to be uploaded are:",UnrecognizedFileType:"Unrecognized file type",fileNameOverSize:"fileName oversize,the lengthest is"},en:{uploadFile:"Upload File",uploading:"File Uploading……",selectedCount:"Selected files count:",limitCount:"System limit count:",rechooseFile:",Reselect upload file.",save:"Save",cancel:"Cancel",haveSameName:"A file with the same name has been uploaded: ",rename:"Rename",replace:"Replace",sizeZero:"File size is 0",sizeMax:"File size beyond limit",uploadFailure:"Upload failed",uploadSucceed:"Upload successfully",wait:"Wait a minute, the file is uploading.",saveTo:"Saving file to","delete":"Delete",selectAll:"Select all",selectNull:"Not at all",detail:"Details",fileName:"Filename",state:"State",operation:"Operation",size:"Size",close:"Close",loading:"Loading",mismatchChunkSize:"The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.",invalidCharacters:"The file name contains special characters",invalidExtNames:"Document type does not allow uploading",whiteExtNames:".The file types allowed for uploading are:",blackExtNames:".The file types that are not allowed to be uploaded are:",UnrecognizedFileType:"Unrecognized file type",fileNameOverSize:"fileName oversize,the lengthest is"},"zh-CHT":{uploadFile:"上傳文件",uploading:"正在上傳文件……",selectedCount:"已選擇文件數量:",limitCount:"超出系統限制數量:",rechooseFile:",重新選擇上傳文件。",save:"保存",cancel:"取消",haveSameName:"已上傳過同名文件: ",rename:"重命名",replace:"替換",sizeZero:"文件大小為0",sizeMax:"文件大小超出限制",uploadFailure:"上傳失敗",uploadSucceed:"上傳成功",wait:"等一下,文件正在上傳。",saveTo:"正在將文件保存到","delete":"删除",selectAll:"全選",selectNull:"全不選",detail:"詳情",fileName:"文件名",state:"狀態",operation:"操作",size:"大小",close:"關閉",loading:"拼命加載中",mismatchChunkSize:"文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。",invalidCharacters:"文件名包含特殊字符",invalidExtNames:"文檔類型不允許上傳",whiteExtNames:"。允許上傳的文件類型為:",blackExtNames:"。不允許上傳的文件類型為:",UnrecognizedFileType:"無法確定文件類型",fileNameOverSize:"文件名超出长度限制,最长允许"}},O=function(){function e(e){this.defaultLang="zh-CHS",this.langCode=localStorage.getItem("languageCode")||e||this.defaultLang,this.lang=M[this.langCode]||M[this.defaultLang]}return e.prototype.transform=function(e){return this.lang[e]||e},e.decorators=[{type:m.Pipe,args:[{name:"locale"}]}],e.ctorParameters=function(){return[{type:String,decorators:[{type:m.Inject,args:[m.LOCALE_ID]}]}]},e}(),D=function re(){},A=function ce(){},B=function pe(){},R=function de(){},_=function(){function e(e,t,i,n){this.msgService=e,this.uploadService=t,this.loadService=i,this.injector=n,this.files=[],this.metadataIdList=[],this.uploadFileInfoList=[],this.errFileList=[],this.errTypeList=[],this.nullFileList=[],this.beyondFileList=[],this.fileNameOversizeList=[],this.invalidCharactersFileList=[],this.invalidExtNamesFileList=[],this.unrecognizedTypeFileList=[],this.invalidCharacters="",this.invalidExtNames="",this.showType=0,this.mouseOn=!1,this.isWhiteList=!1,this.bufferSize=5242880,this.selectedFileCount=0,this.uploadIconAddress=this.createBaseUrl("/platform/runtime/dfs/images/upload.svg"),this.uploadLittleIconAddress=this.createBaseUrl("/platform/runtime/dfs/images/uploadIcon.svg"),this.hasSelectedFile=!1,this.fileAllSelected=!1,this.uploadProcess={width:"0%"},this.fileTotalChunk={},this.requestArray=new Array,this.requestBodyArray=new Array,this.uploadedChunk={},this.uploadedProcess={},this.defaultPropertyName="",this.propertiesNames=[],this.securityInfoList=[],this.queueListStyle={width:"480px"},this.dropListValue="",this.uploadedFileTotal=0,this.haveExtensionProperty=!1,this.haveSecurityInfo=!1,this.uploadedFileInfoList=[],this.oldUploadedFileList=[],this.sameNameAllowed=!0,this.maxFileSize=0,this.checkboxPos={top:"0px"},this.fileType="*",this.fileCount=0,this.oldIdList=[],this.securityInfo=null,this.fileNameLength=0,this.totalLoad=null,this.exStorageFileList=[],this.injector&&(this.httpclient=this.injector.get(x.HttpClient),this.localeid=localStorage.getItem("languageCode")||this.injector.get(m.LOCALE_ID),this.localepipe=new O(this.localeid))}return e.prototype.ngOnInit=function(){var i=this;0<=navigator.userAgent.indexOf("Firefox")&&(this.checkboxPos.top="14px"),null!=this.securityInfo&&this.uploadService.getSecurityInfoList(this.securityInfo).subscribe(function(e){i.haveSecurityInfo=!0;var t=0;e.forEach(function(e){i.securityInfoList.push({id:t.toString(),securityId:e.securityId,securityLevel:e.securityLevel,name:e.name}),t++})}),this.uploadService.getStorageExtensionInfo().subscribe(function(e){if(null!=e&&null==e.error){i.storageExtension=e,i.defaultPropertyName=i.storageExtension.defaultPropertyName,i.propertiesNames.push({id:"0",name:i.storageExtension.defaultPropertyName});var t=0;i.storageExtension.extensionPropertyNameList.forEach(function(e){i.propertiesNames.push({id:(++t).toString(),name:e})}),i.queueListStyle.width="380px",i.haveExtensionProperty=!0}}),this.uploadService.getUploadInfo(this.rootId).subscribe(function(e){null!=e&&null==e.error&&(i.sameNameAllowed=e.sameNameAllowed,i.maxFileSize=parseInt(JSON.parse(e.validateConfiguration).maxFileSize),i.isWhiteList=JSON.parse(e.validateConfiguration).whiteList,i.invalidCharacters=JSON.parse(e.validateConfiguration).invalidCharacters,i.invalidExtNames=JSON.parse(e.validateConfiguration).invalidExtNames.toLowerCase(),i.allowedMultiUpload=e.allowedMultiUpload,i.sameNameAllowed||i.uploadService.getUploadedFileInfoList(i.formId,i.rootId).subscribe(function(e){null!=e&&null==e.error&&(i.uploadedFileInfoList=e,i.oldUploadedFileList=JSON.parse(JSON.stringify(e)))}))}),null!=this.oldIdList&&this.oldIdList.length,this.radioButtonGroupValue="showByGroup"},e.prototype.showLoading=function(){this.hasSelectedFile=!0},e.prototype.findInvalidCharacter=function(t){var i=[];return this.invalidCharacters.split("|").forEach(function(e){0<=t.indexOf(e)&&i.push(e)}),i},e.prototype.hasFileType=function(e){return e.name.includes(".")},e.prototype.fileSelected=function(e){var c=this;if(this.hasSelectedFile=!0,this.selectedFiles=document.querySelector("#file"),0<this.fileCount&&this.selectedFiles.files.length+this.files.length>this.fileCount){var t=this.selectedFiles.files.length+this.files.length;this.msgService.warning(this.localepipe.transform("selectedCount")+t+this.localepipe.transform("limitCount")+this.fileCount+this.localepipe.transform("rechooseFile"))}else{for(var i=function(e){var o=p.selectedFiles.files[e];o.isAllowedUpload=!0;var l=h.UUID.UUID();if(0==o.size)return p.nullFileList.push(o.name),"continue";if(0<p.fileNameLength&&o.name.length>p.fileNameLength)return p.fileNameOversizeList.push(o.name),"continue";if(null!=p.maxFileSize&&0<p.maxFileSize&&o.size>1e3*p.maxFileSize)return p.beyondFileList.push(o.name),"continue";var i=p.findInvalidCharacter(o.name),n="";if(0<i.length){if(i.forEach(function(e,t){n+='"',n+=e,n+='"',n+=t===i.length-1?"":","}),1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(p.localepipe.transform("invalidCharacters")+n+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidCharactersFileList.push(o.name),"continue"}if(!p.hasFileType(o)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("UnrecognizedFileType")+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.unrecognizedTypeFileList.push(o.name),"continue"}var t=o.name.substr(o.name.lastIndexOf(".")+1).toLowerCase(),s=p.listToString(p.invalidExtNames.split("|")),a=p.invalidExtNames.split("|");if(!p.isWhiteList&&a.includes(t)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("invalidExtNames")+p.localepipe.transform("blackExtNames")+s+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidExtNamesFileList.push(o.name),"continue"}if(p.isWhiteList&&!a.includes(t)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("invalidExtNames")+p.localepipe.transform("whiteExtNames")+s+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidExtNamesFileList.push(o.name),"continue"}if(!p.sameNameAllowed&&null!=p.uploadedFileInfoList.find(function(e){return e.fileName==o.name})){var r=p.msgService.show("warning",p.localepipe.transform("haveSameName")+o.name,{initialState:{buttons:[{text:p.localepipe.transform("rename"),cls:"btn btn-secondary",handle:function(){for(var t,e=o.name,i=!0,n=1;i;)t=e.substring(0,e.lastIndexOf("."))+"("+n+")"+e.substring(e.lastIndexOf(".")),null!=c.uploadedFileInfoList.find(function(e){return e.fileName==t})?n++:i=!1;c.uploadFile(l,o,t),r.close()}},{text:p.localepipe.transform("replace"),cls:"btn btn-secondary",handle:function(){l=c.uploadedFileInfoList.find(function(e){return e.fileName==o.name}).metadataId,c.uploadFile(l,o,o.name,P.Update),c.uploadedFileTotal--,c.oldUploadedFileList.find(function(e){return e.fileName==o.name})&&(c.uploadedFileTotal++,c.uploadedFileInfoList.splice(c.uploadedFileInfoList.indexOf(c.uploadedFileInfoList.filter(function(e){return e.fileName==o.name})[0]),1)),r.close()}},{text:p.localepipe.transform("cancel"),cls:"btn btn-secondary",handle:function(){r.close()}}]}});return"continue"}!0===o.isAllowedUpload&&p.uploadFile(l,o,o.name)},p=this,n=0;n<this.selectedFiles.files.length;n++){var o=i(n);if("object"==typeof o)return o.value}if(0<this.errFileList.length){var l=this.listToString(this.errFileList);this.msgService.warning(this.localepipe.transform("haveSameName")+l+this.localepipe.transform("rechooseFile")),this.errFileList=[]}if(0<this.nullFileList.length){var s=this.listToString(this.nullFileList);this.msgService.warning(s+this.localepipe.transform("sizeZero")+this.localepipe.transform("rechooseFile")),this.nullFileList=[]}if(0<this.fileNameOversizeList.length){var a=this.listToString(this.fileNameOversizeList);this.msgService.warning(a+this.localepipe.transform("fileNameOverSize")+this.fileNameLength+this.localepipe.transform("rechooseFile")),this.fileNameOversizeList=[]}if(0<this.beyondFileList.length){var r=this.listToString(this.beyondFileList);this.msgService.warning(r+this.localepipe.transform("sizeMax")+this.maxFileSize+"KB"+this.localepipe.transform("rechooseFile")),this.beyondFileList=[]}if(0<this.invalidCharactersFileList.length){var d=this.listToString(this.invalidCharactersFileList);this.msgService.warning(d+this.localepipe.transform("invalidCharacters")+this.localepipe.transform("rechooseFile")),this.invalidCharactersFileList=[]}if(0<this.invalidExtNamesFileList.length){var u=this.listToString(this.invalidExtNamesFileList);this.msgService.warning(u+this.localepipe.transform("invalidExtNames")+this.localepipe.transform("rechooseFile")),this.invalidExtNamesFileList=[]}if(0<this.unrecognizedTypeFileList.length){var f=this.listToString(this.unrecognizedTypeFileList);this.msgService.warning(f+this.localepipe.transform("UnrecognizedFileType")+this.localepipe.transform("rechooseFile")),this.unrecognizedTypeFileList=[]}this.files=this.files.slice(),this.fileAllSelected=!1,e.target.value=""}},e.prototype.showErrorMessage=function(e){this.msgService.error(this.localepipe.transform("uploadFailure")+e.errorMessage)},e.prototype.handleFileInfo=function(e,t,i){var n;n={id:e,name:i,type:t.type,source:"",size:this.getFileSize(t.size),fileSize:t.size,picListDisplayName:this.getPicListDisplayName(i),queueListDisplayName:this.getQueueDisplayName(i),hasUploaded:!1,mouseOn:!1,selectd:!1,isUploading:!0,uploadResult:!1,uploadProcess:0,errorMessage:"",extensionDropListId:0,extensionName:"",securityDropListId:0,securityInfo:this.securityInfoList[0]},null!=this.storageExtension&&(n.extensionName=this.defaultPropertyName);var o=t.type;return o.includes("tiff")?this.addDocInfo(t,n,w.Other):o.includes("image")?this.addDocInfo(t,n,w.Image):o.includes("word")?this.addDocInfo(t,n,w.Word):o.includes("pdf")?this.addDocInfo(t,n,w.Pdf):o.includes("plain")?this.addDocInfo(t,n,w.Txt):o.includes("sheet")||o.includes("excel")?this.addDocInfo(t,n,w.Excel):o.includes("powerpoint")||o.includes("presentation")?this.addDocInfo(t,n,w.Powerpoint):this.addDocInfo(t,n,w.Other),n},e.prototype.uploadFile=function(c,p,e,t){var d=this;void 0===t&&(t=P.New);var u=this.handleFileInfo(c,p,e),f=new E;if(f.metadataId=c,f.fileName=u.name,f.fileSize=u.size,f.state=t,f.securityInfo=this.securityInfoList[0],this.allowedMultiUpload){var i=new D;i.path=this.formId,i.metadataId=c,i.rootId=this.rootId,i.size=u.fileSize,i.fileName=e,this.initMultiUpload(i).subscribe(function(e){if(null!=e.error)d.files[d.files.indexOf(u)].uploadResult=!1,d.files[d.files.indexOf(u)].isUploading=!1,d.files[d.files.indexOf(u)].errorMessage=e.error.Message;else{var i=e.uploadId,t=Math.ceil(p.size/d.bufferSize),n=0,o=[];for(d.fileTotalChunk[c]=t,d.uploadedChunk[c]=0;n<t;){var l=Math.min((n+1)*d.bufferSize,p.size),s=p.slice(n*d.bufferSize,l),a=new R;a.metadataId=c,a.rootId=d.rootId,a.uploadId=i,a.index=n,a.total=t,a.size=s.size;var r=new FormData;r.append("multiRequest",JSON.stringify(a)),r.append("file",s),d.multiUpload(r).subscribe(function(e){if(null!=e.error)d.files[d.files.indexOf(u)].uploadResult=!1,d.files[d.files.indexOf(u)].isUploading=!1,d.files[d.files.indexOf(u)].errorMessage=e.error.Message;else if(o.push(e.result),d.uploadedChunk[c]++,d.files[d.files.indexOf(u)].uploadProcess=Number.parseInt((d.uploadedChunk[c]/d.fileTotalChunk[c]*100).toFixed(0)),d.uploadedChunk[c]==d.fileTotalChunk[c])if(o.length==d.fileTotalChunk[c]){var t=new A;t.metadataId=c,t.partList=o,t.rootId=d.rootId,t.uploadId=i,t.size=u.fileSize,d.haveExtensionProperty&&(t.exPropertyName=d.defaultPropertyName),d.completeMultiUpload(t).subscribe(function(e){200!=e.status?(d.files[d.files.indexOf(u)].uploadResult=!1,d.files[d.files.indexOf(u)].isUploading=!1,d.files[d.files.indexOf(u)].errorMessage=e.error.Message):(d.files[d.files.indexOf(u)].uploadResult=!0,d.files[d.files.indexOf(u)].isUploading=!1,d.uploadFileInfoList=d.uploadFileInfoList.concat(f),d.uploadedFileInfoList=d.uploadedFileInfoList.concat(f),d.uploadedFileTotal++)})}else d.files[d.files.indexOf(u)].uploadResult=!1,d.files[d.files.indexOf(u)].isUploading=!1,d.files[d.files.indexOf(u)].errorMessage=d.localepipe.transform("mismatchChunkSize")}),n+=1}}})}else{var n=new B;n.formId=this.formId,n.metadataId=c,n.mode=L.Temp,n.rootId=this.rootId,n.size=p.size,n.fileName=e,this.haveExtensionProperty&&(n.exPropertyName=this.defaultPropertyName);var o=new FormData;o.append("uploadEntity",JSON.stringify(n)),o.append("file",p),this.uploadSingleFile(o).subscribe(function(e){null!=e?(d.files[d.files.indexOf(u)].uploadResult=!1,d.files[d.files.indexOf(u)].isUploading=!1,d.files[d.files.indexOf(u)].errorMessage=e.error.Message):(d.files[d.files.indexOf(u)].uploadResult=!0,d.files[d.files.indexOf(u)].isUploading=!1,d.uploadFileInfoList=d.uploadFileInfoList.concat(f),d.uploadedFileInfoList=d.uploadedFileInfoList.concat(f),d.uploadedFileTotal++)})}var l=-1;this.files.forEach(function(e){e.name==u.name&&-1==l&&(l=d.files.indexOf(e))}),-1!=l&&l!=this.files.length-1&&(this.files.splice(l,1),this.uploadFileInfoList.splice(l,1),this.uploadedFileInfoList.splice(l,1))},e.prototype.uploadSingleFile=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/single");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return v.of(e)}))},e.prototype.uploadSliceFile=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/slice");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return v.of(e)}))},e.prototype.initMultiUpload=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/init");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return v.of(e)}))},e.prototype.multiUpload=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/upload");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return v.of(e)}))},e.prototype.completeMultiUpload=function(e){var t=u.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/complete");return this.httpclient.post(t,e).pipe(l.tap(function(e){}),l.catchError(function(e){return v.of(e)}))},e.prototype.selectAllFile=function(){this.fileAllSelected?(this.files.forEach(function(e){e.selectd=!1}),this.fileAllSelected=!1,this.selectedFileCount=0):(this.files.forEach(function(e){e.selectd=!0}),this.fileAllSelected=!0,this.selectedFileCount=this.files.length)},e.prototype.checkoutSelectFile=function(e){e.selectd=!e.selectd,e.selectd?this.selectedFileCount++:this.selectedFileCount--,this.selectedFileCount==this.files.length?this.fileAllSelected=!0:this.fileAllSelected=!1},e.prototype.listDeleteFile=function(t){if(t.selectd&&this.selectedFileCount--,this.files.splice(this.files.indexOf(t),1),t.uploadResult){var e=[];e.push(t.id),this.uploadService.cancel(e,this.rootId).subscribe(),this.uploadFileInfoList.splice(this.uploadFileInfoList.indexOf(this.uploadFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),this.uploadedFileInfoList.splice(this.uploadedFileInfoList.indexOf(this.uploadedFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),this.uploadedFileTotal--}0==this.selectedFileCount&&(this.fileAllSelected=!1)},e.prototype.listMultipleDeleteFile=function(){var e=this,t=[];this.files.forEach(function(e){document.getElementById(e.name).checked&&t.push(e)});var i=[];t.forEach(function(t){i.push(t.id),e.files.splice(e.files.indexOf(t),1),t.uploadResult&&(e.uploadFileInfoList.splice(e.uploadFileInfoList.indexOf(e.uploadFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),e.uploadedFileInfoList.splice(e.uploadedFileInfoList.indexOf(e.uploadedFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),e.uploadedFileTotal--)}),this.uploadService.cancel(i,this.rootId).subscribe();var n=document.getElementById("allCheckBox");null!=n&&(n.checked=!1),this.selectedFileCount=0,this.fileAllSelected=!1},e.prototype.getPicListDisplayName=function(e){return e.length<=10?e:e.substring(0,2)+"…"+e.substring(e.lastIndexOf(".")-2)},e.prototype.getQueueDisplayName=function(e){return e},e.prototype.addDocInfo=function(e,n,t){var o=this;switch(t){case w.Word:n.source=this.createBaseUrl("/platform/runtime/dfs/images/word.png"),this.files.push(n);break;case w.Pdf:n.source=this.createBaseUrl("/platform/runtime/dfs/images/pdf.png"),this.files.push(n);break;case w.Excel:n.source=this.createBaseUrl("/platform/runtime/dfs/images/excel.png"),this.files.push(n);break;case w.Txt:n.source=this.createBaseUrl("/platform/runtime/dfs/images/txt.png"),this.files.push(n);break;case w.Powerpoint:n.source=this.createBaseUrl("/platform/runtime/dfs/images/ppt.png"),this.files.push(n);break;case w.Other:n.source=this.createBaseUrl("/platform/runtime/dfs/images/file.png"),this.files.push(n);break;case w.Image:var l=new FileReader;l.readAsDataURL(e),l.onload=function(e){var t=l.result;null!=o.injector&&(t=o.injector.get(s.DomSanitizer).bypassSecurityTrustResourceUrl(t));n.source=t,o.files.push(n);var i=-1;o.files.forEach(function(e){e.name==n.name&&-1==i&&(i=o.files.indexOf(e))}),-1!=i&&i!=o.files.length-1&&(o.files.splice(i,1),o.uploadFileInfoList.splice(i,1),o.uploadedFileInfoList.splice(i,1))}}},e.prototype.listToString=function(e){for(var t=e.filter(function(e){return""!==e.trim()}),i="",n=0;n<t.length;n++)i+=t[n]+(n===t.length-1?"":",");return i},e.prototype.securityChange=function(e,t){t.securityInfo=e.data,this.uploadFileInfoList.filter(function(e){return e.metadataId=t.id})[0].securityInfo=e.data},e.prototype.typeChange=function(e,t){t.extensionName=e.data.name;var i=new T;t.extensionName==this.storageExtension.defaultPropertyName?0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length&&this.exStorageFileList.splice(this.exStorageFileList.findIndex(function(e){return e.metadataId==t.id}),1):0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length?(i=this.exStorageFileList.filter(function(e){return e.metadataId==t.id})[0]).exPropertyName=t.extensionName:(i.metadataId=t.id,i.exPropertyName=t.extensionName,this.exStorageFileList.push(i))},e.prototype.upload=function(){var t=this;if(this.uploadedFileTotal!=this.files.filter(function(e){return e.isUploading||e.uploadResult}).length)return this.msgService.warning(this.localepipe.transform("wait")),v.of(!1);if(this.haveSecurityInfo&&this.uploadService.saveSecurityInfo(this.uploadFileInfoList,this.rootId).subscribe(),null==this.storageExtension)return v.of(this.uploadFileInfoList);if(0==this.exStorageFileList.length)return v.of(this.uploadFileInfoList);var i=this.loadService.show({message:this.localepipe.transform("saveTo")+this.storageExtension.extensionName});return this.uploadService.changeStorageInstance(this.exStorageFileList,this.rootId).pipe(l.map(function(e){return i.close(),t.uploadFileInfoList}))},e.prototype.cancel=function(){var t=this;0!=this.uploadFileInfoList.length&&(this.uploadFileInfoList.forEach(function(e){t.metadataIdList.push(e.metadataId)}),this.uploadService.cancel(this.metadataIdList,this.rootId).subscribe())},e.prototype.getUploadFileInfoList=function(){return this.uploadFileInfoList},e.prototype["delete"]=function(t){this.files.splice(this.files.indexOf(t),1),t.uploadResult&&this.uploadedFileTotal--,0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length&&this.exStorageFileList.splice(this.exStorageFileList.findIndex(function(e){return e.metadataId==t.id}),1)},e.prototype.getFileSize=function(e){return e<102400?(e/1024).toFixed(1)+"K":e<1048576?(e/1024).toFixed(0)+"K":e<104857600?(e/1024/1024).toFixed(1)+"M":e<1073741824?(e/1024/1024).toFixed(0)+"M":(e/1024/1024/1024).toFixed(1)+"G"},e.prototype.showByGroup=function(){this.showType=0},e.prototype.showByList=function(){this.showType=1,0!=this.selectedFileCount&&this.selectedFileCount==this.files.length&&(this.fileAllSelected=!0)},e.prototype.mouseOver=function(e){e.mouseOn=!0},e.prototype.mouseOut=function(e){e.mouseOn=!1},e.prototype.createBaseUrl=function(e){return u.BasePathService.convertPath(e)},e.decorators=[{type:m.Component,args:[{selector:"app-file-upload",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 \x3c!-- <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> --\x3e\n\n\n </div>\n\n \x3c!-- <div class="progress" style="height: 12px;">\n <div class="progress-bar" role="progressbar" [ngStyle]="uploadProcess"></div>\n </div> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <input type="checkbox" [id]="file.name" (click)="checkoutSelectFile(file.name)"> --\x3e\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 \x3c!-- <span>{{file.picListDisplayName}}</span> --\x3e\n \x3c!-- <p class="filename">{{file.picListDisplayName}}</p> --\x3e\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 \x3c!-- <button *ngIf="file.hasUploaded" class="k-primary" kendoButton [icon]="\'check\'" [disabled]="true"></button> --\x3e\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 \x3c!-- <input type="checkbox" id="allCheckBox" (click)="selectAllFile()"> --\x3e\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 \x3c!-- <div style="width:100%; display: table-cell; vertical-align: middle; text-align: center; "> --\x3e\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 \x3c!-- <input type="checkbox" [id]="file.name" (click)="checkoutSelectFile(file.name)"> --\x3e\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 \x3c!-- <span *ngIf="!file.uploadResult"><span class="f-icon f-icon-error"></span> 上传失败 <button\n class="btn-link btn ng-star-inserted" (click)="showErrorMessage(file)">详情</button></span> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <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> --\x3e\n </farris-combo-list>\n </td>\n\n <td *ngIf="!file.isUploading" style="text-align: center; width: 140px; vertical-align: middle;">\n \x3c!-- <button *ngIf="file.uploadResult" class="btn-link btn ng-star-inserted" (click)="retryUploadFile(file.name)">重试</button> --\x3e\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 \x3c!-- <input type="file" (focus)="showLoading()" (change)="fileSelected($event)" id="file" multiple="multiple" title="" [accept]="fileType"> --\x3e\n </div>\n</div>',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}"]}]}],e.ctorParameters=function(){return[{type:n.MessagerService},{type:z},{type:a.LoadingService},{type:m.Injector}]},e.propDecorators={formId:[{type:m.Input}],rootId:[{type:m.Input}],fileType:[{type:m.Input}],fileCount:[{type:m.Input}],oldIdList:[{type:m.Input}],securityInfo:[{type:m.Input}],fileNameLength:[{type:m.Input}],opCell:[{type:m.ViewChild,args:["opCell"]}]},e}(),q=function(){function e(){}return e.prototype.getDownloadUrl=function(e,t){var i="/api/runtime/dfs/v1.0/doc/filecontent?metadataid="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(e,t));return u.BasePathService.convertPath(i)},e.prototype.getStreamDownloadUrl=function(e,t){var i="/api/runtime/dfs/v1.0/formdoc/stream?metadataid="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(e,t));return u.BasePathService.convertPath(i)},e.prototype.getMultipleDownloadUrl=function(e,t){var i=JSON.parse(e),n="/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(i[0],t));return u.BasePathService.convertPath(n)},e.prototype.getMultipleDownloadUrlWithName=function(e,t,i){var n=JSON.parse(e);null!=i&&""!=i||(i="unifile.zip"),i.endsWith(".zip")||(i+=".zip");var o="/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(n[0],t))+"&zipName="+encodeURIComponent(i);return u.BasePathService.convertPath(o)},e.prototype.getHistoryDownloadUrl=function(e,t,i){var n="/api/runtime/dfs/v1.0/doc/historycontent?metadataid="+e+"&rootid="+t+"&version="+i+"&token="+this.getToken(this.mergeString(e,t));return u.BasePathService.convertPath(n)},e.prototype.mergeString=function(e,t){var i=e.length<t.length?e.length:t.length,n="",o=0;for(o=0;o<i;o++)n+=e.substring(o,o+1),n+=t.substring(o,o+1);return n+=e.length<t.length?t.substring(o):e.substring(o)},e.prototype.getToken=function(e){var t=[1,2,3];24<e.length&&(e=e.substring(0,24));var i=Math.floor(e.length/3),n=e.substring(0,i),o=e.substring(i,2*i),l=e.substring(2*i,3*i),s=[],a=Math.ceil(3*Math.random());s.push(t[a-1]),t.splice(a-1,1),a=Math.ceil(2*Math.random()),s.push(t[a-1]),t.splice(a-1,1),s.push(t[0]);var r=Math.round((new Date).getTime()/1e3)+"";return r.substring(0,5)+"times"+s[0]+s[1]+s[2]+this.switchStr(n,o,l,s[0])+this.switchStr(n,o,l,s[1])+this.switchStr(n,o,l,s[2])+"times"+r.substring(5)},e.prototype.switchStr=function(e,t,i,n){switch(n){case 1:return e;case 2:return t;case 3:return i}},e.decorators=[{type:m.Injectable}],e.ctorParameters=function(){return[]},e}(),j=localStorage.getItem("languageCode")||"zh-CHS",G=function(){function e(){}return e.decorators=[{type:m.NgModule,args:[{declarations:[_,O],imports:[i.CommonModule,u.FarrisRTFModule,y.NotifyModule,n.MessagerModule.forRoot(),a.LoadingModule.forRoot(),r.ProgressModule,c.FormsModule,d.FarrisFormsModule,p.ComboListModule,x.HttpClientModule],exports:[_],entryComponents:[_],providers:[z,q,f.LanguageService,f.HttpService,f.CacheService,f.SessionService,{provide:m.LOCALE_ID,useValue:j}]}]}],e}(),H=G,W=function(){function e(e){this.modalService=e,this.metadataIdList=[]}return e.prototype.ngOnInit=function(){},e.prototype.showDialog=function(){var e=this;this.dlg=this.modalService.show(_,{title:"选择文件",width:800,height:500,buttons:[{text:"上传",cls:"k-button k-button-icontext k-primary",iconCls:"k-icon k-i-check",handle:function(){e.fileUpload.upload(),e.dlg.close()}},{text:"关闭",cls:"k-button k-button-icontext",iconCls:"k-icon k-i-close",handle:function(){e.fileUpload.cancel(),e.dlg.close()}}],showButtons:!0}),this.dlg.content.formId=this.formId},e.decorators=[{type:m.Component,args:[{selector:"app-uploaddialog",template:"\n",styles:[""]}]}],e.ctorParameters=function(){return[{type:g.BsModalService}]},e.propDecorators={formId:[{type:m.Input}],fileUpload:[{type:m.ViewChild,args:[_]}]},e}(),J=function(){function e(e,t,i){this.modalService=e,this.componentFactoryResolver=t,this.injector=i,this.fileInfoList=[],this.injector&&(this.modalService=this.injector.get(g.BsModalService),this.localeid=localStorage.getItem("languageCode")||this.injector.get(m.LOCALE_ID),this.localpipe=new O(this.localeid))}return e.prototype.showDialog=function(i,n){var o=this,l=0;return new Promise(function(t){var e=o.componentFactoryResolver.resolveComponentFactory(_).create(o.injector);e.instance.rootId=n,e.instance.formId=i,o.dlg=o.modalService.show(e,{title:o.localpipe.transform("uploadFile"),width:950,height:570,buttons:[{text:o.localpipe.transform("save"),cls:"k-button k-button-icontext k-primary",handle:function(){o.dlg.content.upload().subscribe(function(e){e&&(t(e),l=1,o.dlg.close())})}},{text:o.localpipe.transform("close"),cls:"k-button k-button-icontext",handle:function(){o.dlg.close()}}],showButtons:!0,showMaxButton:!1,beforeClose:function(){return 0==l&&o.dlg.content.cancel(),v.of(!0)}})})},e.prototype.uploadFile=function(e,t,i){return void 0===i&&(i=[]),this.uploadFileWithLimit(e,t,null,i)},e.prototype.uploadFileWithLimit=function(i,n,o,l){var s=this;void 0===l&&(l=[]);var a=0;return new Promise(function(t){var e=s.componentFactoryResolver.resolveComponentFactory(_).create(s.injector);null!=o&&(e.instance.fileCount=o.fileCount,e.instance.securityInfo=o.securityInfo,e.instance.fileNameLength=o.fileNameLength,null!=o.fileType&&""!=o.fileType&&(e.instance.fileType=o.fileType)),e.instance.rootId=n,e.instance.formId=i,e.instance.oldIdList=l,s.dlg=s.modalService.show(e,{title:s.localpipe.transform("uploadFile"),width:950,height:570,buttons:[{text:s.localpipe.transform("save"),cls:"k-button k-button-icontext k-primary",handle:function(){s.dlg.content.upload().subscribe(function(e){e&&(t(e),a=1,s.dlg.close())})}},{text:s.localpipe.transform("close"),cls:"k-button k-button-icontext",handle:function(){s.dlg.close()}}],showButtons:!0,showMaxButton:!1,beforeClose:function(){return 0==a&&s.dlg.content.cancel(),v.of(!0)}})})},e.decorators=[{type:m.Injectable}],e.ctorParameters=function(){return[{type:g.BsModalService},{type:m.ComponentFactoryResolver},{type:m.Injector}]},e}(),V=function(){function e(){}return e.decorators=[{type:m.NgModule,args:[{declarations:[W],imports:[i.CommonModule,t.FarrisDialogModule,n.MessagerModule.forRoot(),G,y.NotifyModule.forRoot(),x.HttpClientModule],exports:[W,_],entryComponents:[W,_],providers:[g.BsModalService,f.HttpService,J,z]}]}],e}(),$=function ue(){this.fileType="*",this.fileCount=0,this.securityInfo=null,this.fileNameLength=0},Z=function fe(){},K=function he(){},Q=function me(){},X=function ge(){},Y=function ve(){},ee=function xe(){},te=function ye(){};e.FormdocUploadService=b,e.FormdocUploadComponent=F,e.FormdocUploadModule=S,e.UploadDialogMoudle=V,e.UploadDialogComponent=W,e.UploadDialogService=J,e.UploadService=z,e.DownloadService=q,e.FileUploadComponent=_,e.UploadFileInfo=E,e.UploadModule=G,e.ɵa=H,e.UploadLimit=$,e.GspFormDocOperateEntity=C,e.GspFormRemoveListEntity=N,e.GspFormUploadListEntity=Z,e.GspFormDocInfo=K,e.GspDocMetaProperty=Q,e.GspFormUploadEntity=X,e.FileInfo=Y,e.OperatingModes=L,e.FileState=P,e.GspDocSecurityBaseInfo=ee,e.SecurityEntity=te,e.ExStorageFileInfo=T,e.CopyFileRequest=U,e.ɵb=O,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@farris/ui-dialog"),require("@angular/common"),require("rxjs/observable/of"),require("rxjs/operators"),require("angular2-uuid"),require("@angular/platform-browser"),require("@farris/ui-messager"),require("@farris/ui-loading"),require("@farris/ui-progress"),require("@angular/forms"),require("@farris/ui-combo-list"),require("@farris/ui-forms"),require("@farris/rtf"),require("@ecp-caf/caf-common"),require("@angular/core"),require("@farris/ui-modal"),require("rxjs"),require("@angular/common/http"),require("@farris/ui-notify")):"function"==typeof define&&define.amd?define("@gsp-svc/formdoc-upload",["exports","@farris/ui-dialog","@angular/common","rxjs/observable/of","rxjs/operators","angular2-uuid","@angular/platform-browser","@farris/ui-messager","@farris/ui-loading","@farris/ui-progress","@angular/forms","@farris/ui-combo-list","@farris/ui-forms","@farris/rtf","@ecp-caf/caf-common","@angular/core","@farris/ui-modal","rxjs","@angular/common/http","@farris/ui-notify"],t):t((e["gsp-svc"]=e["gsp-svc"]||{},e["gsp-svc"]["formdoc-upload"]={}),e.uiDialog,e.ng.common,e.rxjs["observable/of"],e.rxjs.operators,e.angular2Uuid,e.ng.platformBrowser,e.uiMessager,e.uiLoading,e.uiProgress,e.ng.forms,e.uiComboList,e.uiForms,e.rtf,e.cafCommon,e.ng.core,e.uiModal,e.rxjs,e.ng.common.http,e.uiNotify)}(this,function(e,t,i,l,n,D,B,o,s,r,a,p,d,c,u,f,h,m,g,v){"use strict";y.decorators=[{type:f.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[]},y.ngInjectableDef=f.defineInjectable({factory:function(){return new y},token:y,providedIn:"root"});var A=y;function y(){}b.prototype.ngOnInit=function(){},b.decorators=[{type:f.Component,args:[{selector:"lib-formdoc-upload",template:"\n <p>\n formdoc-upload works!\n </p>\n "}]}],b.ctorParameters=function(){return[]};var x=b;function b(){}var F=localStorage.getItem("languageCode")||"zh-CHS",F=(R.decorators=[{type:f.NgModule,args:[{declarations:[x],imports:[g.HttpClientModule],exports:[x],providers:[u.LanguageService,u.HttpService,u.CacheService,u.SessionService,{provide:f.LOCALE_ID,useValue:F}]}]}],R);function R(){}var I={Word:0,Excel:1,Powerpoint:2,Pdf:3,Txt:4,Image:5,Other:6,Zip:7},S=(I[I.Word]="Word",I[I.Excel]="Excel",I[I.Powerpoint]="Powerpoint",I[I.Pdf]="Pdf",I[I.Txt]="Txt",I[I.Image]="Image",I[I.Other]="Other",I[I.Zip]="Zip",{Formal:0,Temp:1}),_=(S[S.Formal]="Formal",S[S.Temp]="Temp",function(){}),w=function(){},q=function(){},j=function(){},L=(N.prototype.uploadList=function(e,t){return e.rootId=t,this.http.post("/api/runtime/dfs/v1.0/formdoc/list",e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.commit=function(e,t){var i=new w;return i.metadataIdList=e,i.rootId=t,this.http.post("/api/runtime/dfs/v1.0/formdoc/commit",i).pipe()},N.prototype.cancel=function(e,t){var i=new w;return i.metadataIdList=e,i.rootId=t,this.http.put("/api/runtime/dfs/v1.0/formdoc/cancel",i).pipe()},N.prototype.removeList=function(e,t){var i=new _;return i.metadataIdList=e,i.mode=S.Temp,i.rootId=t,this.http["delete"]("/api/runtime/dfs/v1.0/formdoc/list",i).pipe()},N.prototype.getFile=function(e,t){e=""==t?"/api/runtime/dfs/v1.0/formdoc/file/"+e:"/api/runtime/dfs/v1.0/formdoc/file/"+e+"/"+t;return this.http.get(e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.uploadFile=function(e){return this.http.post("/api/runtime/dfs/v1.0/formdoc",e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.uploadSliceFile=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/slice");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.getStorageExtensionInfo=function(){return this.http.get("/api/runtime/dfs/v1.0/storagestrategy/extension").pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.getSecurityInfoList=function(e){e="/api/runtime/dfs/v1.0/storagestrategy/security?id="+e.securityId+"&level="+e.securityLevel;return this.http.get(e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.changeStorageInstance=function(e,t){var i=new q;return i.fileInfoList=e,i.rootId=t,this.http.post("/api/runtime/dfs/v1.0/formdoc/changeinstance",i).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.copyFile=function(e,t,i){var l=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/copy"),o=new j;return o.metadataId=e,o.rootId=t,o.path=i,this.httpclient.post(l,o,{responseType:"text"}).pipe(n.tap(function(e){}))},N.prototype.saveSecurityInfo=function(e,t){var i=[];return e.forEach(function(e){e={id:e.metadataId,rootId:t,exProperty:JSON.stringify(e.securityInfo)};i.push(e)}),this.http.post("/api/runtime/dfs/v1.0/doc/exproperty",i).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.getUploadedFileInfoList=function(e,t){return this.http.get("/api/runtime/dfs/v1.0/formdoc/uploadedfile/infolist?formid="+e+"&rootid="+t).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.prototype.getUploadInfo=function(e){return this.http.get("/api/runtime/dfs/v1.0/rootsetting/info?id="+e).pipe(n.tap(function(e){}),n.catchError(function(e){return l.of(e)}))},N.decorators=[{type:f.Injectable}],N.ctorParameters=function(){return[{type:u.HttpService},{type:g.HttpClient}]},N);function N(e,t){this.http=e,this.httpclient=t}var G=function(){},H=function(){},C={New:0,Update:1},W=(C[C.New]="New",C[C.Update]="Update",{"zh-CHS":{uploadFile:"上传文件",uploading:"正在上传文件……",selectedCount:"已选择文件数量:",limitCount:"超出系统限制数量:",rechooseFile:",请重新选择上传文件。",save:"保存",cancel:"取消",haveSameName:"已上传过同名文件: ",rename:"重命名",replace:"替换",sizeZero:"文件大小为0",sizeMax:"文件大小超出限制",uploadFailure:"上传失败",uploadSucceed:"上传成功",wait:"等一下,文档正在上传。",saveTo:"正在将文件保存到","delete":"删除",selectAll:"全选",selectNull:"全不选",detail:"详情",fileName:"文件名",state:"状态",operation:"操作",size:"大小",close:"关闭",loading:"拼命加载中",mismatchChunkSize:"文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。",invalidCharacters:"文件名包含特殊字符",invalidExtNames:"文档类型不允许上传",whiteExtNames:"。允许上传的文件类型为:",blackExtNames:"。不允许上传的文件类型为:",UnrecognizedFileType:"无法确定文件类型",fileNameOverSize:"文件名超出长度限制,最长允许"},"en-US":{uploadFile:"Upload File",uploading:"File Uploading……",selectedCount:"Selected files count:",limitCount:"System limit count:",rechooseFile:",Reselect upload file.",save:"Save",cancel:"Cancel",haveSameName:"A file with the same name has been uploaded: ",rename:"Rename",replace:"Replace",sizeZero:"File size is 0",sizeMax:"File size beyond limit",uploadFailure:"Upload failed",uploadSucceed:"Upload successfully",wait:"Wait a minute, the file is uploading.",saveTo:"Saving file to","delete":"Delete",selectAll:"Select all",selectNull:"Not at all",detail:"Details",fileName:"Filename",state:"State",operation:"Operation",size:"Size",close:"Close",loading:"Loading",mismatchChunkSize:"The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.",invalidCharacters:"The file name contains special characters",invalidExtNames:"Document type does not allow uploading",whiteExtNames:".The file types allowed for uploading are:",blackExtNames:".The file types that are not allowed to be uploaded are:",UnrecognizedFileType:"Unrecognized file type",fileNameOverSize:"fileName oversize,the lengthest is"},en:{uploadFile:"Upload File",uploading:"File Uploading……",selectedCount:"Selected files count:",limitCount:"System limit count:",rechooseFile:",Reselect upload file.",save:"Save",cancel:"Cancel",haveSameName:"A file with the same name has been uploaded: ",rename:"Rename",replace:"Replace",sizeZero:"File size is 0",sizeMax:"File size beyond limit",uploadFailure:"Upload failed",uploadSucceed:"Upload successfully",wait:"Wait a minute, the file is uploading.",saveTo:"Saving file to","delete":"Delete",selectAll:"Select all",selectNull:"Not at all",detail:"Details",fileName:"Filename",state:"State",operation:"Operation",size:"Size",close:"Close",loading:"Loading",mismatchChunkSize:"The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.",invalidCharacters:"The file name contains special characters",invalidExtNames:"Document type does not allow uploading",whiteExtNames:".The file types allowed for uploading are:",blackExtNames:".The file types that are not allowed to be uploaded are:",UnrecognizedFileType:"Unrecognized file type",fileNameOverSize:"fileName oversize,the lengthest is"},"zh-CHT":{uploadFile:"上傳文件",uploading:"正在上傳文件……",selectedCount:"已選擇文件數量:",limitCount:"超出系統限制數量:",rechooseFile:",重新選擇上傳文件。",save:"保存",cancel:"取消",haveSameName:"已上傳過同名文件: ",rename:"重命名",replace:"替換",sizeZero:"文件大小為0",sizeMax:"文件大小超出限制",uploadFailure:"上傳失敗",uploadSucceed:"上傳成功",wait:"等一下,文件正在上傳。",saveTo:"正在將文件保存到","delete":"删除",selectAll:"全選",selectNull:"全不選",detail:"詳情",fileName:"文件名",state:"狀態",operation:"操作",size:"大小",close:"關閉",loading:"拼命加載中",mismatchChunkSize:"文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。",invalidCharacters:"文件名包含特殊字符",invalidExtNames:"文檔類型不允許上傳",whiteExtNames:"。允許上傳的文件類型為:",blackExtNames:"。不允許上傳的文件類型為:",UnrecognizedFileType:"無法確定文件類型",fileNameOverSize:"文件名超出长度限制,最长允许"}}),k=(U.prototype.transform=function(e){return this.lang[e]||e},U.decorators=[{type:f.Pipe,args:[{name:"locale"}]}],U.ctorParameters=function(){return[{type:String,decorators:[{type:f.Inject,args:[f.LOCALE_ID]}]}]},U);function U(e){this.defaultLang="zh-CHS",this.langCode=localStorage.getItem("languageCode")||e||this.defaultLang,this.lang=W[this.langCode]||W[this.defaultLang]}var J=function(){},Z=function(){},V=function(){},$=function(){},z=(E.prototype.ngOnInit=function(){var i=this;0<=navigator.userAgent.indexOf("Firefox")&&(this.checkboxPos.top="14px"),null!=this.securityInfo&&this.uploadService.getSecurityInfoList(this.securityInfo).subscribe(function(e){i.haveSecurityInfo=!0;var t=0;e.forEach(function(e){i.securityInfoList.push({id:t.toString(),securityId:e.securityId,securityLevel:e.securityLevel,name:e.name}),t++})}),this.uploadService.getStorageExtensionInfo().subscribe(function(e){var t;null!=e&&null==e.error&&(i.storageExtension=e,i.defaultPropertyName=i.storageExtension.defaultPropertyName,i.propertiesNames.push({id:"0",name:i.storageExtension.defaultPropertyName}),t=0,i.storageExtension.extensionPropertyNameList.forEach(function(e){i.propertiesNames.push({id:(++t).toString(),name:e})}),i.queueListStyle.width="380px",i.haveExtensionProperty=!0)}),this.uploadService.getUploadInfo(this.rootId).subscribe(function(e){null!=e.error?i.uploadInfoErrorMessage=e.error.Message:(i.uploadBtnDisabled=!1,i.sameNameAllowed=e.sameNameAllowed,i.maxFileSize=parseInt(JSON.parse(e.validateConfiguration).maxFileSize),i.isWhiteList=JSON.parse(e.validateConfiguration).whiteList,i.invalidCharacters=JSON.parse(e.validateConfiguration).invalidCharacters,i.invalidExtNames=JSON.parse(e.validateConfiguration).invalidExtNames.toLowerCase(),i.allowedMultiUpload=e.allowedMultiUpload,i.sameNameAllowed||i.uploadService.getUploadedFileInfoList(i.formId,i.rootId).subscribe(function(e){null!=e&&null==e.error&&(i.uploadedFileInfoList=e,i.oldUploadedFileList=JSON.parse(JSON.stringify(e)))}))}),null!=this.oldIdList&&this.oldIdList.length,this.radioButtonGroupValue="showByGroup"},E.prototype.showLoading=function(){this.hasSelectedFile=!0},E.prototype.getRightClass=function(){return this.uploadBtnDisabled?"btn btn-primary btn-lg disabled":"btn btn-primary btn-lg"},E.prototype.findInvalidCharacter=function(t){var i=[];return this.invalidCharacters.split("|").forEach(function(e){0<=t.indexOf(e)&&i.push(e)}),i},E.prototype.hasFileType=function(e){return e.name.includes(".")},E.prototype.fileSelected=function(e){var a=this;if(this.uploadInfoErrorMessage)this.msgService.error(this.uploadInfoErrorMessage),this.uploadBtnDisabled=!0;else{if(this.hasSelectedFile=!0,this.selectedFiles=document.querySelector("#file"),0<this.fileCount)if(this.selectedFiles.files.length+this.files.length>this.fileCount)return t=this.selectedFiles.files.length+this.files.length,void this.msgService.warning(this.localepipe.transform("selectedCount")+t+this.localepipe.transform("limitCount")+this.fileCount+this.localepipe.transform("rechooseFile"));for(var t,p=this,i=0;i<this.selectedFiles.files.length;i++){var l=function(e){var o=p.selectedFiles.files[e],n=(o.isAllowedUpload=!0,D.UUID.UUID());if(0==o.size)return p.nullFileList.push(o.name),"continue";if(0<p.fileNameLength&&o.name.length>p.fileNameLength)return p.fileNameOversizeList.push(o.name),"continue";if(null!=p.maxFileSize&&0<p.maxFileSize&&o.size>1e3*p.maxFileSize)return p.beyondFileList.push(o.name),"continue";var i=p.findInvalidCharacter(o.name).filter(function(e){return e&&e.trim()}),l="";if(0<i.length){if(i.forEach(function(e,t){l=(l=(l+='"')+e+'"')+(t===i.length-1?"":",")}),1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(p.localepipe.transform("invalidCharacters")+l+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidCharactersFileList.push(o.name),"continue"}if(!p.hasFileType(o)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("UnrecognizedFileType")+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.unrecognizedTypeFileList.push(o.name),"continue"}var s,e=o.name.substr(o.name.lastIndexOf(".")+1).toLowerCase(),t=p.listToString(p.invalidExtNames.split("|")),r=p.invalidExtNames.split("|");if(!p.isWhiteList&&r.includes(e)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("invalidExtNames")+p.localepipe.transform("blackExtNames")+t+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidExtNamesFileList.push(o.name),"continue"}if(p.isWhiteList&&!r.includes(e)){if(1===p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.msgService.warning(o.name+p.localepipe.transform("invalidExtNames")+p.localepipe.transform("whiteExtNames")+t+p.localepipe.transform("rechooseFile")),{value:void 0};if(1<p.selectedFiles.files.length)return o.isAllowedUpload=!1,p.invalidExtNamesFileList.push(o.name),"continue"}if(!p.sameNameAllowed&&null!=p.uploadedFileInfoList.find(function(e){return e.fileName==o.name}))return s=p.msgService.show("warning",p.localepipe.transform("haveSameName")+o.name,{initialState:{buttons:[{text:p.localepipe.transform("rename"),cls:"btn btn-secondary",handle:function(){for(var t,e=o.name,i=!0,l=1;i;)t=e.substring(0,e.lastIndexOf("."))+"("+l+")"+e.substring(e.lastIndexOf(".")),null!=a.uploadedFileInfoList.find(function(e){return e.fileName==t})?l++:i=!1;a.uploadFile(n,o,t),s.close()}},{text:p.localepipe.transform("replace"),cls:"btn btn-secondary",handle:function(){n=a.uploadedFileInfoList.find(function(e){return e.fileName==o.name}).metadataId,a.uploadFile(n,o,o.name,C.Update),a.uploadedFileTotal--,a.oldUploadedFileList.find(function(e){return e.fileName==o.name})&&(a.uploadedFileTotal++,a.uploadedFileInfoList.splice(a.uploadedFileInfoList.indexOf(a.uploadedFileInfoList.filter(function(e){return e.fileName==o.name})[0]),1)),s.close()}},{text:p.localepipe.transform("cancel"),cls:"btn btn-secondary",handle:function(){s.close()}}]}}),"continue";!0===o.isAllowedUpload&&p.uploadFile(n,o,o.name)}(i);if("object"==typeof l)return l.value}0<this.errFileList.length&&(t=this.listToString(this.errFileList),this.msgService.warning(this.localepipe.transform("haveSameName")+t+this.localepipe.transform("rechooseFile")),this.errFileList=[]),0<this.nullFileList.length&&(t=this.listToString(this.nullFileList),this.msgService.warning(t+this.localepipe.transform("sizeZero")+this.localepipe.transform("rechooseFile")),this.nullFileList=[]),0<this.fileNameOversizeList.length&&(t=this.listToString(this.fileNameOversizeList),this.msgService.warning(t+this.localepipe.transform("fileNameOverSize")+this.fileNameLength+this.localepipe.transform("rechooseFile")),this.fileNameOversizeList=[]),0<this.beyondFileList.length&&(t=this.listToString(this.beyondFileList),this.msgService.warning(t+this.localepipe.transform("sizeMax")+this.maxFileSize+"KB"+this.localepipe.transform("rechooseFile")),this.beyondFileList=[]),0<this.invalidCharactersFileList.length&&(t=this.listToString(this.invalidCharactersFileList),this.msgService.warning(t+this.localepipe.transform("invalidCharacters")+this.localepipe.transform("rechooseFile")),this.invalidCharactersFileList=[]),0<this.invalidExtNamesFileList.length&&(t=this.listToString(this.invalidExtNamesFileList),this.msgService.warning(t+this.localepipe.transform("invalidExtNames")+this.localepipe.transform("rechooseFile")),this.invalidExtNamesFileList=[]),0<this.unrecognizedTypeFileList.length&&(t=this.listToString(this.unrecognizedTypeFileList),this.msgService.warning(t+this.localepipe.transform("UnrecognizedFileType")+this.localepipe.transform("rechooseFile")),this.unrecognizedTypeFileList=[]),this.files=this.files.slice(),this.fileAllSelected=!1,e.target.value=""}},E.prototype.showErrorMessage=function(e){this.msgService.error(this.localepipe.transform("uploadFailure")+e.errorMessage)},E.prototype.handleFileInfo=function(e,t,i){e={id:e,name:i,type:t.type,source:"",size:this.getFileSize(t.size),fileSize:t.size,picListDisplayName:this.getPicListDisplayName(i),queueListDisplayName:this.getQueueDisplayName(i),hasUploaded:!1,mouseOn:!1,selectd:!1,isUploading:!0,uploadResult:!1,uploadProcess:0,errorMessage:"",extensionDropListId:0,extensionName:"",securityDropListId:0,securityInfo:this.securityInfoList[0],style:{}},null!=this.storageExtension&&(e.extensionName=this.defaultPropertyName),i=t.type;return i.includes("tiff")?this.addDocInfo(t,e,I.Other):i.includes("image")?this.addDocInfo(t,e,I.Image):i.includes("word")?this.addDocInfo(t,e,I.Word):i.includes("pdf")?this.addDocInfo(t,e,I.Pdf):i.includes("plain")?this.addDocInfo(t,e,I.Txt):i.includes("sheet")||i.includes("excel")?this.addDocInfo(t,e,I.Excel):i.includes("powerpoint")||i.includes("presentation")?this.addDocInfo(t,e,I.Powerpoint):i.includes("zip")||t.name.includes(".rar")?this.addDocInfo(t,e,I.Zip):this.addDocInfo(t,e,I.Other),e},E.prototype.uploadFile=function(a,p,e,t){var i,l,o,d=this,c=(void 0===t&&(t=C.New),this.handleFileInfo(a,p,e)),u=new G;u.metadataId=a,u.fileName=c.name,u.fileSize=c.size,u.originalSize=c.fileSize,u.state=t,u.securityInfo=this.securityInfoList[0],this.allowedMultiUpload?((t=new J).path=this.formId,t.metadataId=a,t.rootId=this.rootId,t.size=c.fileSize,t.fileName=e,this.initMultiUpload(t).subscribe(function(e){if(null!=e.error)d.files[d.files.indexOf(c)].uploadResult=!1,d.files[d.files.indexOf(c)].isUploading=!1,d.files[d.files.indexOf(c)].errorMessage=e.error.Message;else{var t=e.uploadId,i=Math.ceil(p.size/d.bufferSize),l=0,o=[];for(d.fileTotalChunk[a]=i,d.uploadedChunk[a]=0;l<i;){var n=Math.min((l+1)*d.bufferSize,p.size),n=p.slice(l*d.bufferSize,n),s=new $,r=(s.metadataId=a,s.rootId=d.rootId,s.uploadId=t,s.index=l,s.total=i,s.size=n.size,new FormData);r.append("multiRequest",JSON.stringify(s)),r.append("file",n),d.multiUpload(r).subscribe(function(e){null!=e.error?(d.files[d.files.indexOf(c)].uploadResult=!1,d.files[d.files.indexOf(c)].isUploading=!1,d.files[d.files.indexOf(c)].errorMessage=e.error.Message):(o.push(e.result),d.uploadedChunk[a]++,d.files[d.files.indexOf(c)].uploadProcess=Number.parseInt((d.uploadedChunk[a]/d.fileTotalChunk[a]*100).toFixed(0)),d.uploadedChunk[a]==d.fileTotalChunk[a]&&(o.length==d.fileTotalChunk[a]?((e=new Z).metadataId=a,e.partList=o,e.rootId=d.rootId,e.uploadId=t,e.size=c.fileSize,d.haveExtensionProperty&&(e.exPropertyName=d.defaultPropertyName),d.completeMultiUpload(e).subscribe(function(e){200!=e.status?(d.files[d.files.indexOf(c)].uploadResult=!1,d.files[d.files.indexOf(c)].isUploading=!1,d.files[d.files.indexOf(c)].errorMessage=e.error.Message):(d.files[d.files.indexOf(c)].uploadResult=!0,d.files[d.files.indexOf(c)].isUploading=!1,d.uploadFileInfoList=d.uploadFileInfoList.concat(u),d.uploadedFileInfoList=d.uploadedFileInfoList.concat(u),d.uploadedFileTotal++)})):(d.files[d.files.indexOf(c)].uploadResult=!1,d.files[d.files.indexOf(c)].isUploading=!1,d.files[d.files.indexOf(c)].errorMessage=d.localepipe.transform("mismatchChunkSize"))))}),l+=1}}})):((i=new V).formId=this.formId,i.metadataId=a,i.mode=S.Temp,i.rootId=this.rootId,i.size=p.size,i.fileName=e,this.haveExtensionProperty&&(i.exPropertyName=this.defaultPropertyName),(t=new FormData).append("uploadEntity",JSON.stringify(i)),t.append("file",p),this.uploadSingleFile(t).subscribe(function(e){null!=e?(d.files[d.files.indexOf(c)].uploadResult=!1,d.files[d.files.indexOf(c)].isUploading=!1,d.files[d.files.indexOf(c)].errorMessage=e.error.Message):(d.files[d.files.indexOf(c)].uploadResult=!0,d.files[d.files.indexOf(c)].isUploading=!1,d.uploadFileInfoList=d.uploadFileInfoList.concat(u),d.uploadedFileInfoList=d.uploadedFileInfoList.concat(u),d.uploadedFileTotal++),clearInterval(l)}),o=-1,this.files.forEach(function(e){e.name==c.name&&-1==o&&(o=d.files.indexOf(e))}),-1!=o&&o!=this.files.length-1&&(this.files.splice(o,1),this.uploadFileInfoList.splice(o,1),this.uploadedFileInfoList.splice(o,1),this.uploadedFileTotal--),l=setInterval(function(){d.getUploadProcess(i.metadataId).subscribe(function(e){null!=e.error?d.files[d.files.indexOf(c)].uploadProcess=10:(90<(e=e<10?10:e)&&(e=90),d.files[d.files.indexOf(c)].uploadProcess=e)})},200))},E.prototype.getUploadProcess=function(e){return this.httpclient.get("/api/runtime/dfs/v1.0/formdoc/upload/process?metadataid="+e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.uploadSingleFile=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/single");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.uploadSliceFile=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/slice");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.initMultiUpload=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/init");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.multiUpload=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/upload");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.completeMultiUpload=function(e){var t=c.BasePathService.convertPath("/api/runtime/dfs/v1.0/formdoc/multi/complete");return this.httpclient.post(t,e).pipe(n.tap(function(e){}),n.catchError(function(e){return m.of(e)}))},E.prototype.selectAllFile=function(){this.fileAllSelected?(this.files.forEach(function(e){e.selectd=!1}),this.fileAllSelected=!1,this.selectedFileCount=0):(this.files.forEach(function(e){e.selectd=!0}),this.fileAllSelected=!0,this.selectedFileCount=this.files.length)},E.prototype.checkoutSelectFile=function(e){e.selectd=!e.selectd,e.selectd?this.selectedFileCount++:this.selectedFileCount--,this.selectedFileCount==this.files.length?this.fileAllSelected=!0:this.fileAllSelected=!1},E.prototype.listDeleteFile=function(t){var e;t.selectd&&this.selectedFileCount--,this.files.splice(this.files.indexOf(t),1),t.uploadResult&&((e=[]).push(t.id),this.uploadService.cancel(e,this.rootId).subscribe(),this.uploadFileInfoList.splice(this.uploadFileInfoList.indexOf(this.uploadFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),this.uploadedFileInfoList.splice(this.uploadedFileInfoList.indexOf(this.uploadedFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),this.uploadedFileTotal--),0==this.selectedFileCount&&(this.fileAllSelected=!1)},E.prototype.listMultipleDeleteFile=function(){var e=this,t=[],i=(this.files.forEach(function(e){document.getElementById(e.name).checked&&t.push(e)}),[]),l=(t.forEach(function(t){i.push(t.id),e.files.splice(e.files.indexOf(t),1),t.uploadResult&&(e.uploadFileInfoList.splice(e.uploadFileInfoList.indexOf(e.uploadFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),e.uploadedFileInfoList.splice(e.uploadedFileInfoList.indexOf(e.uploadedFileInfoList.filter(function(e){return e.fileName==t.name})[0]),1),e.uploadedFileTotal--)}),this.uploadService.cancel(i,this.rootId).subscribe(),document.getElementById("allCheckBox"));null!=l&&(l.checked=!1),this.selectedFileCount=0,this.fileAllSelected=!1},E.prototype.getPicListDisplayName=function(e){return e.length<=10?e:e.substring(0,2)+"…"+e.substring(e.lastIndexOf(".")-2)},E.prototype.getQueueDisplayName=function(e){return e},E.prototype.addDocInfo=function(e,l,t){var o=this;switch(t){case I.Word:l.source=this.createBaseUrl("/platform/runtime/dfs/images/word.png"),this.files.push(l);break;case I.Pdf:l.source=this.createBaseUrl("/platform/runtime/dfs/images/pdf.png"),this.files.push(l);break;case I.Excel:l.source=this.createBaseUrl("/platform/runtime/dfs/images/excel.png"),this.files.push(l);break;case I.Txt:l.source=this.createBaseUrl("/platform/runtime/dfs/images/txt.png"),this.files.push(l);break;case I.Zip:l.source=this.createBaseUrl("/platform/runtime/dfs/images/zip.png"),this.files.push(l);break;case I.Powerpoint:l.source=this.createBaseUrl("/platform/runtime/dfs/images/ppt.png"),this.files.push(l);break;case I.Other:l.source=this.createBaseUrl("/platform/runtime/dfs/images/file.png"),this.files.push(l);break;case I.Image:var n=new FileReader;n.readAsDataURL(e),n.onload=function(e){var t=n.result,i=(null!=o.injector&&(t=o.injector.get(B.DomSanitizer).bypassSecurityTrustResourceUrl(t)),l.source=t,l.style={"max-width":"120px","max-height":"118px"},o.files.push(l),-1);o.files.forEach(function(e){e.name==l.name&&-1==i&&(i=o.files.indexOf(e))}),-1!=i&&i!=o.files.length-1&&(o.files.splice(i,1),o.uploadFileInfoList.splice(i,1),o.uploadedFileInfoList.splice(i,1))}}},E.prototype.listToString=function(e){for(var t=e.filter(function(e){return""!==e.trim()}),i="",l=0;l<t.length;l++)i+=t[l]+(l===t.length-1?"":",");return i},E.prototype.securityChange=function(e,t){t.securityInfo=e.data,this.uploadFileInfoList.filter(function(e){return e.metadataId=t.id})[0].securityInfo=e.data},E.prototype.typeChange=function(e,t){t.extensionName=e.data.name;e=new H;t.extensionName==this.storageExtension.defaultPropertyName?0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length&&this.exStorageFileList.splice(this.exStorageFileList.findIndex(function(e){return e.metadataId==t.id}),1):0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length?(e=this.exStorageFileList.filter(function(e){return e.metadataId==t.id})[0]).exPropertyName=t.extensionName:(e.metadataId=t.id,e.exPropertyName=t.extensionName,this.exStorageFileList.push(e))},E.prototype.upload=function(){var t,i=this;return this.uploadedFileTotal!=this.files.filter(function(e){return e.isUploading||e.uploadResult}).length?(this.msgService.warning(this.localepipe.transform("wait")),m.of(!1)):(this.haveSecurityInfo&&this.uploadService.saveSecurityInfo(this.uploadFileInfoList,this.rootId).subscribe(),null==this.storageExtension||0==this.exStorageFileList.length?m.of(this.uploadFileInfoList):(t=this.loadService.show({message:this.localepipe.transform("saveTo")+this.storageExtension.extensionName}),this.uploadService.changeStorageInstance(this.exStorageFileList,this.rootId).pipe(n.map(function(e){return t.close(),i.uploadFileInfoList}))))},E.prototype.cancel=function(){var t=this;0!=this.uploadFileInfoList.length&&(this.uploadFileInfoList.forEach(function(e){t.metadataIdList.push(e.metadataId)}),this.uploadService.cancel(this.metadataIdList,this.rootId).subscribe())},E.prototype.getUploadFileInfoList=function(){return this.uploadFileInfoList},E.prototype["delete"]=function(t){this.files.splice(this.files.indexOf(t),1),t.uploadResult&&this.uploadedFileTotal--,0<this.exStorageFileList.filter(function(e){return e.metadataId==t.id}).length&&this.exStorageFileList.splice(this.exStorageFileList.findIndex(function(e){return e.metadataId==t.id}),1)},E.prototype.getFileSize=function(e){return e<102400?(e/1024).toFixed(1)+"K":e<1048576?(e/1024).toFixed(0)+"K":e<104857600?(e/1024/1024).toFixed(1)+"M":e<1073741824?(e/1024/1024).toFixed(0)+"M":(e/1024/1024/1024).toFixed(1)+"G"},E.prototype.showByGroup=function(){this.showType=0},E.prototype.showByList=function(){this.showType=1,0!=this.selectedFileCount&&this.selectedFileCount==this.files.length&&(this.fileAllSelected=!0)},E.prototype.mouseOver=function(e){e.mouseOn=!0},E.prototype.mouseOut=function(e){e.mouseOn=!1},E.prototype.createBaseUrl=function(e){return c.BasePathService.convertPath(e)},E.decorators=[{type:f.Component,args:[{selector:"app-file-upload",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">文件个数:{{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 \x3c!-- <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> --\x3e\r\n\r\n\r\n </div>\r\n\r\n \x3c!-- <div class="progress" style="height: 12px;">\r\n <div class="progress-bar" role="progressbar" [ngStyle]="uploadProcess"></div>\r\n </div> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <input type="checkbox" [id]="file.name" (click)="checkoutSelectFile(file.name)"> --\x3e\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 \x3c!-- <span>{{file.picListDisplayName}}</span> --\x3e\r\n \x3c!-- <p class="filename">{{file.picListDisplayName}}</p> --\x3e\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 \x3c!-- <button *ngIf="file.hasUploaded" class="k-primary" kendoButton [icon]="\'check\'" [disabled]="true"></button> --\x3e\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 \x3c!-- <input type="checkbox" id="allCheckBox" (click)="selectAllFile()"> --\x3e\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 \x3c!-- <div style="width:100%; display: table-cell; vertical-align: middle; text-align: center; "> --\x3e\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 \x3c!-- <input type="checkbox" [id]="file.name" (click)="checkoutSelectFile(file.name)"> --\x3e\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 \x3c!-- <span *ngIf="!file.uploadResult"><span class="f-icon f-icon-error"></span> 上传失败 <button\r\n class="btn-link btn ng-star-inserted" (click)="showErrorMessage(file)">详情</button></span> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <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> --\x3e\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 \x3c!-- <button *ngIf="file.uploadResult" class="btn-link btn ng-star-inserted" (click)="retryUploadFile(file.name)">重试</button> --\x3e\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 \x3c!-- <input type="file" (focus)="showLoading()" (change)="fileSelected($event)" id="file" multiple="multiple" title="" [accept]="fileType"> --\x3e\r\n </div>\r\n</div>\r\n',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}"]}]}],E.ctorParameters=function(){return[{type:o.MessagerService},{type:L},{type:s.LoadingService},{type:f.Injector}]},E.propDecorators={formId:[{type:f.Input}],rootId:[{type:f.Input}],fileType:[{type:f.Input}],fileCount:[{type:f.Input}],oldIdList:[{type:f.Input}],securityInfo:[{type:f.Input}],fileNameLength:[{type:f.Input}],opCell:[{type:f.ViewChild,args:["opCell"]}]},E);function E(e,t,i,l){this.msgService=e,this.uploadService=t,this.loadService=i,this.injector=l,this.files=[],this.metadataIdList=[],this.uploadFileInfoList=[],this.errFileList=[],this.errTypeList=[],this.nullFileList=[],this.beyondFileList=[],this.fileNameOversizeList=[],this.invalidCharactersFileList=[],this.invalidExtNamesFileList=[],this.unrecognizedTypeFileList=[],this.invalidCharacters="",this.invalidExtNames="",this.showType=0,this.mouseOn=!1,this.isWhiteList=!1,this.bufferSize=5242880,this.selectedFileCount=0,this.uploadBtnDisabled=!1,this.uploadIconAddress=this.createBaseUrl("/platform/runtime/dfs/images/upload.svg"),this.uploadLittleIconAddress=this.createBaseUrl("/platform/runtime/dfs/images/uploadIcon.svg"),this.hasSelectedFile=!1,this.fileAllSelected=!1,this.uploadProcess={width:"0%"},this.fileTotalChunk={},this.requestArray=new Array,this.requestBodyArray=new Array,this.uploadedChunk={},this.uploadedProcess={},this.defaultPropertyName="",this.propertiesNames=[],this.securityInfoList=[],this.queueListStyle={width:"480px"},this.dropListValue="",this.uploadedFileTotal=0,this.haveExtensionProperty=!1,this.haveSecurityInfo=!1,this.uploadedFileInfoList=[],this.oldUploadedFileList=[],this.uploadInfoErrorMessage="",this.sameNameAllowed=!0,this.maxFileSize=0,this.checkboxPos={top:"0px"},this.fileType="*",this.fileCount=0,this.oldIdList=[],this.securityInfo=null,this.fileNameLength=0,this.totalLoad=null,this.exStorageFileList=[],this.injector&&(this.httpclient=this.injector.get(g.HttpClient),this.localeid=localStorage.getItem("languageCode")||this.injector.get(f.LOCALE_ID),this.localepipe=new k(this.localeid))}T.prototype.getDownloadUrl=function(e,t){e="/api/runtime/dfs/v1.0/doc/filecontent?metadataid="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(e,t));return c.BasePathService.convertPath(e)},T.prototype.getStreamDownloadUrl=function(e,t){e="/api/runtime/dfs/v1.0/formdoc/stream?metadataid="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(e,t));return c.BasePathService.convertPath(e)},T.prototype.getMultipleDownloadUrl=function(e,t){var i=JSON.parse(e),e="/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(i[0],t));return c.BasePathService.convertPath(e)},T.prototype.getMultipleDownloadUrlWithName=function(e,t,i){var l=JSON.parse(e),e=((i=null!=i&&""!=i?i:"unifile.zip").endsWith(".zip")||(i+=".zip"),"/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist="+e+"&rootid="+t+"&token="+this.getToken(this.mergeString(l[0],t))+"&zipName="+encodeURIComponent(i));return c.BasePathService.convertPath(e)},T.prototype.getHistoryDownloadUrl=function(e,t,i){i="/api/runtime/dfs/v1.0/doc/historycontent?metadataid="+e+"&rootid="+t+"&version="+i+"&token="+this.getToken(this.mergeString(e,t));return c.BasePathService.convertPath(i)},T.prototype.mergeString=function(e,t){for(var i=(e.length<t.length?e:t).length,l="",o=0,o=0;o<i;o++)l=(l+=e.substring(o,o+1))+t.substring(o,o+1);return l+=(e.length<t.length?t:e).substring(o)},T.prototype.getToken=function(e){var t=[1,2,3],i=(24<e.length&&(e=e.substring(0,24)),Math.floor(e.length/3)),l=e.substring(0,i),o=e.substring(i,2*i),i=e.substring(2*i,3*i),e=[],n=Math.ceil(3*Math.random()),n=(e.push(t[n-1]),t.splice(n-1,1),n=Math.ceil(2*Math.random()),e.push(t[n-1]),t.splice(n-1,1),e.push(t[0]),Math.round((new Date).getTime()/1e3)+"");return n.substring(0,5)+"times"+e[0]+e[1]+e[2]+this.switchStr(l,o,i,e[0])+this.switchStr(l,o,i,e[1])+this.switchStr(l,o,i,e[2])+"times"+n.substring(5)},T.prototype.switchStr=function(e,t,i,l){switch(l){case 1:return e;case 2:return t;case 3:return i}},T.decorators=[{type:f.Injectable}],T.ctorParameters=function(){return[]};var K=T;function T(){}var M=localStorage.getItem("languageCode")||"zh-CHS",r=(Q.decorators=[{type:f.NgModule,args:[{declarations:[z,k],imports:[i.CommonModule,c.FarrisRTFModule,v.NotifyModule,o.MessagerModule.forRoot(),s.LoadingModule.forRoot(),r.ProgressModule,a.FormsModule,d.FarrisFormsModule,p.ComboListModule,g.HttpClientModule],exports:[z],entryComponents:[z],providers:[L,K,u.LanguageService,u.HttpService,u.CacheService,u.SessionService,{provide:f.LOCALE_ID,useValue:M}]}]}],Q);function Q(){}a=r,P.prototype.ngOnInit=function(){},P.prototype.showDialog=function(){var e=this;this.dlg=this.modalService.show(z,{title:"选择文件",width:800,height:500,buttons:[{text:"上传",cls:"k-button k-button-icontext k-primary",iconCls:"k-icon k-i-check",handle:function(){e.fileUpload.upload(),e.dlg.close()}},{text:"关闭",cls:"k-button k-button-icontext",iconCls:"k-icon k-i-close",handle:function(){e.fileUpload.cancel(),e.dlg.close()}}],showButtons:!0}),this.dlg.content.formId=this.formId},P.decorators=[{type:f.Component,args:[{selector:"app-uploaddialog",template:"\n",styles:[""]}]}],P.ctorParameters=function(){return[{type:h.BsModalService}]},P.propDecorators={formId:[{type:f.Input}],fileUpload:[{type:f.ViewChild,args:[z]}]},d=P;function P(e){this.modalService=e,this.metadataIdList=[]}O.prototype.showDialog=function(i,l){var o=this,n=0;return new Promise(function(t){var e=o.componentFactoryResolver.resolveComponentFactory(z).create(o.injector);e.instance.rootId=l,e.instance.formId=i,o.dlg=o.modalService.show(e,{title:o.localpipe.transform("uploadFile"),width:950,height:570,buttons:[{text:o.localpipe.transform("save"),cls:"k-button k-button-icontext k-primary",handle:function(){o.dlg.content.upload().subscribe(function(e){e&&(t(e),n=1,o.dlg.close())})}},{text:o.localpipe.transform("close"),cls:"k-button k-button-icontext",handle:function(){o.dlg.close()}}],showButtons:!0,showMaxButton:!1,beforeClose:function(){return 0==n&&o.dlg.content.cancel(),m.of(!0)}})})},O.prototype.uploadFile=function(e,t,i){return this.uploadFileWithLimit(e,t,null,i=void 0===i?[]:i)},O.prototype.uploadFileWithLimit=function(i,l,o,n){var s=this,r=(void 0===n&&(n=[]),0);return new Promise(function(t){var e=s.componentFactoryResolver.resolveComponentFactory(z).create(s.injector);null!=o&&(e.instance.fileCount=o.fileCount,e.instance.securityInfo=o.securityInfo,e.instance.fileNameLength=o.fileNameLength,null!=o.fileType)&&""!=o.fileType&&(e.instance.fileType=o.fileType),e.instance.rootId=l,e.instance.formId=i,e.instance.oldIdList=n,s.dlg=s.modalService.show(e,{title:s.localpipe.transform("uploadFile"),width:950,height:570,buttons:[{text:s.localpipe.transform("save"),cls:"k-button k-button-icontext k-primary",handle:function(){s.dlg.content.upload().subscribe(function(e){e&&(t(e),r=1,s.dlg.close())})}},{text:s.localpipe.transform("close"),cls:"k-button k-button-icontext",handle:function(){s.dlg.close()}}],showButtons:!0,showMaxButton:!1,beforeClose:function(){return 0==r&&s.dlg.content.cancel(),m.of(!0)}})})},O.decorators=[{type:f.Injectable}],O.ctorParameters=function(){return[{type:h.BsModalService},{type:f.ComponentFactoryResolver},{type:f.Injector}]};p=O;function O(e,t,i){this.modalService=e,this.componentFactoryResolver=t,this.injector=i,this.fileInfoList=[],this.injector&&(this.modalService=this.injector.get(h.BsModalService),this.localeid=localStorage.getItem("languageCode")||this.injector.get(f.LOCALE_ID),this.localpipe=new k(this.localeid))}X.decorators=[{type:f.NgModule,args:[{declarations:[d],imports:[i.CommonModule,t.FarrisDialogModule,o.MessagerModule.forRoot(),r,v.NotifyModule.forRoot(),g.HttpClientModule],exports:[d,z],entryComponents:[d,z],providers:[h.BsModalService,u.HttpService,p,L]}]}];M=X;function X(){}var i=function(){this.fileType="*",this.fileCount=0,this.securityInfo=null,this.fileNameLength=0},t=function(){},v=function(){},Y=function(){},ee=function(){},te=function(){},ie=function(){},le=function(){};e.FormdocUploadService=A,e.FormdocUploadComponent=x,e.FormdocUploadModule=F,e.UploadDialogMoudle=M,e.UploadDialogComponent=d,e.UploadDialogService=p,e.UploadService=L,e.DownloadService=K,e.FileUploadComponent=z,e.UploadFileInfo=G,e.UploadModule=r,e.ɵa=a,e.UploadLimit=i,e.GspFormDocOperateEntity=w,e.GspFormRemoveListEntity=_,e.GspFormUploadListEntity=t,e.GspFormDocInfo=v,e.GspDocMetaProperty=Y,e.GspFormUploadEntity=ee,e.FileInfo=te,e.OperatingModes=S,e.FileState=C,e.GspDocSecurityBaseInfo=ie,e.SecurityEntity=le,e.ExStorageFileInfo=H,e.CopyFileRequest=j,e.ɵb=k,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=gsp-svc-formdoc-upload.umd.min.js.map
|