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 = {
setFileInfo: (params: UploadParam) => {
var inter = this.options.inter;
const inter = this.options.inter;
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() {
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'),{

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

Loading…
Cancel
Save