|
|
|
@ -43,9 +43,9 @@ export class FileUpload extends BI.Widget {
|
|
|
|
|
|
|
|
|
|
public render() { |
|
|
|
|
const { width, watermark, value, processId, inter } = this.options; |
|
|
|
|
var self = this; |
|
|
|
|
var processName = BI.concat("process-", processId); |
|
|
|
|
var processClass = BI.concat(".process-", processId); |
|
|
|
|
let self = this; |
|
|
|
|
const processName = BI.concat("process-", processId); |
|
|
|
|
const processClass = BI.concat(".process-", processId); |
|
|
|
|
this.setFileInfo({ |
|
|
|
|
keytabPath: '', |
|
|
|
|
principal:'', |
|
|
|
@ -234,7 +234,7 @@ export class FileUpload extends BI.Widget {
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_CHANGE, |
|
|
|
|
action: function (files) { |
|
|
|
|
self.options.attachId = ''; |
|
|
|
|
var fileInfo = files.files[0]; |
|
|
|
|
const fileInfo = files.files[0]; |
|
|
|
|
self.setInfo(fileInfo); |
|
|
|
|
self.store.setFileName(fileInfo.fileName); |
|
|
|
|
this.upload(); |
|
|
|
@ -245,7 +245,7 @@ export class FileUpload extends BI.Widget {
|
|
|
|
|
// 上传进度刷新
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_PROGRESS, |
|
|
|
|
action: function (progress) { |
|
|
|
|
var rate = progress.loaded/progress.total; |
|
|
|
|
let rate = progress.loaded/progress.total; |
|
|
|
|
NProgress.set(rate); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
@ -260,8 +260,8 @@ export class FileUpload extends BI.Widget {
|
|
|
|
|
// 上传文件完毕
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_UPLOADED, |
|
|
|
|
action: function () { |
|
|
|
|
var uploadedInfo = this.getValue(); |
|
|
|
|
var failed = BI.some(uploadedInfo, function (index, file) { |
|
|
|
|
const uploadedInfo = this.getValue(); |
|
|
|
|
const failed = BI.some(uploadedInfo, function (index, file) { |
|
|
|
|
if (file.data.errorCode) { |
|
|
|
|
BI.Msg.toast(uploadedInfo[0].filename + BI.i18nText('Dec-Dcm_Connection_File_Upload_Error'), { |
|
|
|
|
level: "error", |
|
|
|
@ -270,7 +270,7 @@ export class FileUpload extends BI.Widget {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
var key = self.options.processId +'Path'; |
|
|
|
|
const key = self.options.processId +'Path'; |
|
|
|
|
!failed && self.setValue(uploadedInfo[0].data.kerberosInfo[key]); |
|
|
|
|
!failed && self.fireEvent(FileUpload.EVENT_CHECK_SUCCESS, uploadedInfo[0].data); |
|
|
|
|
!failed && BI.Msg.toast(uploadedInfo[0].filename + BI.i18nText('Dec-Dcm_Connection_File_Upload_Success'),{ |
|
|
|
|