Browse Source

REPORT-72487 fix:var更改为let或const

feature/x
Aries.lsy 3 years ago
parent
commit
912407297d
  1. 2
      src/modules/components/file_upload/file_upload.model.ts
  2. 16
      src/modules/components/file_upload/file_upload.ts
  3. 4
      src/modules/pages/maintain/forms/components/form.jdbc.ts

2
src/modules/components/file_upload/file_upload.model.ts

@ -23,7 +23,7 @@ export class FileUploadModel extends Model {
actions = { actions = {
setFileInfo: (params: UploadParam) => { setFileInfo: (params: UploadParam) => {
var inter = this.options.inter; const inter = this.options.inter;
this.model.uploadUrl = Dec.Utils.getEncodeURL(Dec.fineServletURL + inter, "", params); this.model.uploadUrl = Dec.Utils.getEncodeURL(Dec.fineServletURL + inter, "", params);
}, },

16
src/modules/components/file_upload/file_upload.ts

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

4
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -404,7 +404,7 @@ export class FormJdbc extends BI.Widget {
{ {
eventName: FileUpload.EVENT_CHECK_SUCCESS, eventName: FileUpload.EVENT_CHECK_SUCCESS,
action: (value) => { action: (value) => {
var principalsItems = BI.map(value.principals, function(index, item) { const principalsItems = BI.map(value.principals, function(index, item) {
return { return {
text: item, text: item,
value: item value: item
@ -1336,7 +1336,7 @@ export class FormJdbc extends BI.Widget {
} }
public changePrincipal() { public changePrincipal() {
var self = this; let self = this;
const KerberosParams = BI.extend({},{ const KerberosParams = BI.extend({},{
keytabPath: this.form.keyPath.getValue(), keytabPath: this.form.keyPath.getValue(),
krb5ConfPath: this.form.krb5Path.getValue(), krb5ConfPath: this.form.krb5Path.getValue(),

Loading…
Cancel
Save