cloud-web-corejs 1.0.218 → 1.0.220

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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/baseAlert/index.vue +1 -1
  3. package/src/components/excelExport/button.vue +55 -46
  4. package/src/components/excelExport/exportFieldDialog.vue +3 -3
  5. package/src/components/excelExport/index.vue +62 -34
  6. package/src/components/excelExport/mixins.js +969 -2
  7. package/src/components/table/config.js +74 -1
  8. package/src/components/table/index.js +203 -89
  9. package/src/components/table/tableFormMixin.js +285 -1
  10. package/src/components/table/util/index.js +5 -1
  11. package/src/components/table/vxeFilter/index.js +3 -3
  12. package/src/components/table/vxeFilter/mixin.js +4 -4
  13. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +104 -101
  14. package/src/components/xform/form-designer/setting-panel/form-setting.vue +4 -4
  15. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +3 -3
  16. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +1 -1
  17. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
  18. package/src/components/xform/form-render/container-item/data-table-mixin.js +321 -103
  19. package/src/components/xform/mixins/defaultHandle.js +75 -48
  20. package/src/layout/components/Sidebar/default.vue +11 -6
  21. package/src/layout/components/langTool.vue +32 -29
  22. package/src/store/getters.js +2 -1
  23. package/src/store/modules/user.js +27 -3
  24. package/src/utils/vab.js +83 -73
  25. package/src/views/user/user/edit.vue +45 -0
@@ -4,7 +4,7 @@ import axios from "axios";
4
4
  import SparkMD5 from "spark-md5";
5
5
 
6
6
  let tmixins = {};
7
- var XLSX = window.XLSX || { read, utils };
7
+ let XLSX = window.XLSX || { read, utils };
8
8
  import { getToken } from "../../../../../utils/auth";
9
9
  import XEUtils from "xe-utils";
10
10
  import { getErrorMsg } from "@base/utils/index.js";
@@ -73,7 +73,7 @@ tmixins = {
73
73
  },
74
74
  methods: {
75
75
  initResGird() {
76
- var that = this;
76
+ let that = this;
77
77
  let tableRef = "resGrid";
78
78
  let columns = [
79
79
  {
@@ -109,7 +109,7 @@ tmixins = {
109
109
  width: 150,
110
110
  ...oriCol.otherConfig,
111
111
  };
112
- if (index == 0) {
112
+ if (index === 0) {
113
113
  col.fixed = "left";
114
114
  }
115
115
  return col;
@@ -379,15 +379,15 @@ tmixins = {
379
379
 
380
380
  const fileReader = new FileReader();
381
381
  fileReader.onload = async (ev) => {
382
- var resultData;
382
+ let resultData;
383
383
  try {
384
384
  const data = ev.target.result;
385
385
  const workbook = configUtil.XLSX.read(data, {
386
386
  type: "binary",
387
387
  });
388
388
 
389
- var sheet = workbook.Sheets[workbook.SheetNames[0]];
390
- if (sheet["!ref"] == undefined) {
389
+ let sheet = workbook.Sheets[workbook.SheetNames[0]];
390
+ if (sheet["!ref"] === undefined || sheet["!ref"] === null) {
391
391
  /*that.showImportDialog2 = false;
392
392
  that.showContent = false;
393
393
  that.clearImportTimer();*/
@@ -400,25 +400,25 @@ tmixins = {
400
400
  that.handleClose2();
401
401
  return false;
402
402
  }
403
- var range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
404
- var dataSize = range.e.r + 1; //行数
403
+ let range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
404
+ let dataSize = range.e.r + 1; //行数
405
405
  that.dataSize = dataSize - 3 >= 0 ? dataSize - 3 : 0;
406
- var titles = [];
407
- var fields = [];
406
+ let titles = [];
407
+ let fields = [];
408
408
 
409
409
  const ws = workbook.Sheets[sheet];
410
410
 
411
411
  let prefix = option.prefix;
412
412
  let excelUrl = option.excel;
413
413
 
414
- var excelRows = [];
415
- var row;
416
- var rowNum;
417
- var colNum;
414
+ let excelRows = [];
415
+ let row;
416
+ let rowNum;
417
+ let colNum;
418
418
  for (rowNum = range.s.r; rowNum <= range.e.r; rowNum++) {
419
419
  row = [];
420
420
  for (colNum = range.s.c; colNum <= range.e.c; colNum++) {
421
- var nextCell =
421
+ let nextCell =
422
422
  sheet[
423
423
  configUtil.XLSX.utils.encode_cell({
424
424
  r: rowNum,
@@ -431,15 +431,15 @@ tmixins = {
431
431
  row.push(nextCell.w.trim());
432
432
  }
433
433
  }
434
- if (rowNum == 1) {
434
+ if (rowNum === 1) {
435
435
  titles = row;
436
436
  }
437
- if (rowNum == 2) {
437
+ if (rowNum === 2) {
438
438
  fields = row;
439
439
  let checkResult = true;
440
440
  /*await that.checkExcelForImport(titles, fields, excelUrl, prefix).then(
441
441
  res => {
442
- if (res.type != "success") {
442
+ if (res.type !== "success") {
443
443
  checkResult = false;
444
444
  }
445
445
  });
@@ -463,7 +463,7 @@ tmixins = {
463
463
  if (
464
464
  !titles.length ||
465
465
  !fields.length ||
466
- titles.length != fields.length
466
+ titles.length !== fields.length
467
467
  ) {
468
468
  // that.showContent = false;
469
469
  // that.clearImportTimer();
@@ -477,14 +477,14 @@ tmixins = {
477
477
  return false;
478
478
  }
479
479
 
480
- var columns = [];
481
- var cols = [];
480
+ let columns = [];
481
+ let cols = [];
482
482
  let uniqueFields = [];
483
483
  for (let i = 0; i < titles.length; i++) {
484
484
  let title = titles[i];
485
485
  if (title) {
486
486
  let field = fields[i];
487
- if (field == null) {
487
+ if (field === null || field === undefined) {
488
488
  // that.showContent = false;
489
489
  // that.clearImportTimer();
490
490
  that.$baseAlert(
@@ -533,7 +533,7 @@ tmixins = {
533
533
  }
534
534
  }
535
535
 
536
- var oriCols = JSON.parse(JSON.stringify(cols)); //列信息
536
+ let oriCols = JSON.parse(JSON.stringify(cols)); //列信息
537
537
  if (uniqueFields.length) {
538
538
  //分组唯一字段为空时,全部不发包。
539
539
  for (let i = 0; i < oriCols.length; i++) {
@@ -542,7 +542,7 @@ tmixins = {
542
542
  for (let j = 0; j < excelRows.length; j++) {
543
543
  let data = excelRows[j];
544
544
  let value = data[oriCol.field];
545
- if (value == null || value == "") {
545
+ if (value === null || value === undefined || value === "") {
546
546
  that.clearImportTimer();
547
547
  that.$baseAlert(
548
548
  this.$t2(
@@ -584,12 +584,12 @@ tmixins = {
584
584
  async checkExcelForImport(titles, fields, turl, prefix) {
585
585
  if (!this.showImportDialog2) return;
586
586
  let that = this;
587
- var data = {
587
+ let data = {
588
588
  filed_name: fields,
589
589
  field_note: titles,
590
590
  url: turl,
591
591
  };
592
- var param = JSON.stringify(data);
592
+ let param = JSON.stringify(data);
593
593
  return this.$http({
594
594
  url: prefix + "/sf_common/compareExcelFields",
595
595
  method: "post",
@@ -601,7 +601,7 @@ tmixins = {
601
601
  });
602
602
  },
603
603
  saveImportHandle(data, opt) {
604
- var multi = this.option.multi;
604
+ let multi = this.option.multi;
605
605
  let importOption = this.option.importOption;
606
606
 
607
607
  let entity = importOption.importEntity;
@@ -647,28 +647,28 @@ tmixins = {
647
647
  },
648
648
  syncDataForImport(opts) {
649
649
  let that = this;
650
- var multi = this.option.multi;
651
- var resultData = this.resultData;
652
- var datas = resultData.data;
653
- var titles = resultData.titles;
654
- var fields = resultData.fields;
650
+ let multi = this.option.multi;
651
+ let resultData = this.resultData;
652
+ let datas = resultData.data;
653
+ let titles = resultData.titles;
654
+ let fields = resultData.fields;
655
655
  let uniqueFields = resultData.uniqueFields;
656
- var saveUrl = opts.saveUrl;
657
- var size = datas.length;
658
- var index = 0;
659
- var successNum = 0;
660
- var failNum = 0;
661
- var dialogObj = this.$refs.importDialog.$el;
662
- var successNumObj = dialogObj.querySelector(".successNum");
663
- var failNumObj = dialogObj.querySelector(".failNum");
664
- var percentageObj = dialogObj.querySelector(".percentage");
665
- var doneNumObj = dialogObj.querySelector(".doneNum");
656
+ let saveUrl = opts.saveUrl;
657
+ let size = datas.length;
658
+ let index = 0;
659
+ let successNum = 0;
660
+ let failNum = 0;
661
+ let dialogObj = this.$refs.importDialog.$el;
662
+ let successNumObj = dialogObj.querySelector(".successNum");
663
+ let failNumObj = dialogObj.querySelector(".failNum");
664
+ let percentageObj = dialogObj.querySelector(".percentage");
665
+ let doneNumObj = dialogObj.querySelector(".doneNum");
666
666
  dialogObj.querySelector(".dataSize").innerText = size;
667
667
 
668
668
  that.successRows = [];
669
669
  that.failRows = [];
670
670
 
671
- var multiSize = this.option.multiSize || 2;
671
+ let multiSize = this.option.multiSize || 2;
672
672
 
673
673
  let groupIndex = 0;
674
674
  let groupDatas = [];
@@ -689,15 +689,15 @@ tmixins = {
689
689
  });
690
690
  }
691
691
 
692
- var compareV = function (property) {
692
+ let compareV = function (property) {
693
693
  return function (a, b) {
694
- var value1 = a[property];
695
- var value2 = b[property];
694
+ let value1 = a[property];
695
+ let value2 = b[property];
696
696
  return value1 - value2;
697
697
  };
698
698
  };
699
699
 
700
- var prevHandleData = function (percentageStr, excNum) {
700
+ let prevHandleData = function (percentageStr, excNum) {
701
701
  successNumObj.innerText = successNum;
702
702
  failNumObj.innerText = failNum;
703
703
  doneNumObj.innerText = successNum + failNum;
@@ -725,7 +725,7 @@ tmixins = {
725
725
  let value = null;
726
726
  let defaultValue = this.option.defaultValue;
727
727
  if (defaultValue) {
728
- if (typeof defaultValue == "function") {
728
+ if (typeof defaultValue === "function") {
729
729
  value = defaultValue(row) || {};
730
730
  } else {
731
731
  value = defaultValue || {};
@@ -736,8 +736,8 @@ tmixins = {
736
736
 
737
737
  let handleData = () => {
738
738
  if (!that.isEnd && index < size) {
739
- var param;
740
- var excNum;
739
+ let param;
740
+ let excNum;
741
741
  if (multi) {
742
742
  if (!uniqueFields.length) {
743
743
  if (index + multiSize < size) {
@@ -748,7 +748,7 @@ tmixins = {
748
748
 
749
749
  let dataList = [];
750
750
  for (let i = 0; i < excNum; i++) {
751
- var mIndex = index + i;
751
+ let mIndex = index + i;
752
752
  let mData = datas[mIndex];
753
753
  mData.impSeq = mIndex;
754
754
  mData.impNumber = mIndex + 4;
@@ -777,7 +777,7 @@ tmixins = {
777
777
  param = groupDatas[groupIndex];
778
778
  }
779
779
  } else {
780
- var data = that.resultData.data[index];
780
+ let data = that.resultData.data[index];
781
781
  data.impSeq = index;
782
782
  data.impNumber = index + 4;
783
783
  excNum = 1;
@@ -798,8 +798,8 @@ tmixins = {
798
798
  }
799
799
  }
800
800
 
801
- var percentageStr = parseInt(((index + excNum) * 100) / size);
802
- if (param == null || param.length == 0) {
801
+ let percentageStr = parseInt(((index + excNum) * 100) / size);
802
+ if (param === null || param === undefined || param.length === 0) {
803
803
  if (that.showContent) {
804
804
  prevHandleData(percentageStr, excNum);
805
805
  }
@@ -810,20 +810,20 @@ tmixins = {
810
810
  failMsg: false,
811
811
  callback: (resultMsg) => {
812
812
  if (multi) {
813
- if (resultMsg.type == "success") {
814
- var multiRows = resultMsg.objx;
813
+ if (resultMsg.type === "success") {
814
+ let multiRows = resultMsg.objx;
815
815
  for (let i = 0; i < multiRows.length; i++) {
816
- var multiRow = multiRows[i];
817
- var data = datas[multiRow.impSeq];
816
+ let multiRow = multiRows[i];
817
+ let data = datas[multiRow.impSeq];
818
818
  data._resultType = multiRow.impReturnType;
819
819
  data._resultContent =
820
- multiRow.impReturnType == "success"
820
+ multiRow.impReturnType === "success"
821
821
  ? this.$t2(
822
822
  "导入成功",
823
823
  "components.excelImport.importSucess"
824
824
  )
825
825
  : multiRow.impReturnMsg;
826
- if (multiRow.impReturnType == "success") {
826
+ if (multiRow.impReturnType === "success") {
827
827
  successNum++;
828
828
  that.successRows.push(data);
829
829
  } else {
@@ -855,17 +855,17 @@ tmixins = {
855
855
  return; */
856
856
  }
857
857
  } else {
858
- var data = that.resultData.data[index];
858
+ let data = that.resultData.data[index];
859
859
  data._resultType = resultMsg.type;
860
860
  data._resultContent =
861
- resultMsg.type == "success"
861
+ resultMsg.type === "success"
862
862
  ? this.$t2(
863
863
  "导入成功",
864
864
  "components.excelImport.importSucess"
865
865
  )
866
866
  : resultMsg.content;
867
867
 
868
- if (resultMsg.type == "success") {
868
+ if (resultMsg.type === "success") {
869
869
  successNum++;
870
870
  that.successRows.push(data);
871
871
  } else {
@@ -907,13 +907,13 @@ tmixins = {
907
907
  });
908
908
  },
909
909
  vailData(data, opts) {
910
- var oriCols = opts.data.oriCols;
911
- var errorInfo = [];
910
+ let oriCols = opts.data.oriCols;
911
+ let errorInfo = [];
912
912
  for (let i = 0; i < oriCols.length; i++) {
913
913
  let oriCol = oriCols[i];
914
914
  if (oriCol.isNeed) {
915
915
  let value = data[oriCol.field];
916
- if (value == null || value == "") {
916
+ if (value === null || value === undefined || value === "") {
917
917
  errorInfo.push(
918
918
  this.$t2(
919
919
  "[" + oriCol.title + "]不能为空;",
@@ -927,14 +927,14 @@ tmixins = {
927
927
  return errorInfo.join("");
928
928
  },
929
929
  handleRes(val) {
930
- /* var content = val;
931
- var text = content;
930
+ /* let content = val;
931
+ let text = content;
932
932
  if (content && content.indexOf("Exception") >= 0) {
933
- var index0 = content.lastIndexOf("*]");
933
+ let index0 = content.lastIndexOf("*]");
934
934
  if (index0 >= 0) {
935
935
  text = content.substr(index0);
936
936
  if (text) {
937
- var index1 = text.indexOf("Exception:");
937
+ let index1 = text.indexOf("Exception:");
938
938
  if (index1 >= 0) {
939
939
  text = text.substr(index1 + 10);
940
940
  }
@@ -1019,6 +1019,9 @@ tmixins = {
1019
1019
  [resultData, file]
1020
1020
  );
1021
1021
  };
1022
+ const close = () => {
1023
+ that.dialogClose1();
1024
+ }
1022
1025
  try {
1023
1026
  if (importOption.onConfirmImportEnabled) {
1024
1027
  if (
@@ -1026,8 +1029,8 @@ tmixins = {
1026
1029
  .getFieldTarget()
1027
1030
  .handleCustomEvent(
1028
1031
  importOption.onConfirmImport,
1029
- ["resultData", "file", "done"],
1030
- [resultData, file, done]
1032
+ ["resultData", "file", "done", 'close'],
1033
+ [resultData, file, done, close]
1031
1034
  ) !== false
1032
1035
  ) {
1033
1036
  done();
@@ -1128,7 +1131,7 @@ tmixins = {
1128
1131
  progressEvent.total
1129
1132
  );
1130
1133
  let percent = Math.floor((uploadedSize * 100) / fullFile.size);
1131
- if (percent == 100) {
1134
+ if (percent === 100) {
1132
1135
  percent = 99;
1133
1136
  }
1134
1137
  that.loadingPercent = percent;
@@ -1139,7 +1142,7 @@ tmixins = {
1139
1142
  // failMsg: false,
1140
1143
  modal: false,
1141
1144
  callback: (res1) => {
1142
- if (res1.type == "success") {
1145
+ if (res1.type === "success") {
1143
1146
  let uuid = res1.objx.uuid;
1144
1147
  chunkParam.uuid = uuid;
1145
1148
  if (preFormData.chunk + 1 >= preFormData.chunks) {
@@ -1175,7 +1178,7 @@ tmixins = {
1175
1178
 
1176
1179
  let chunkIndex = chunkParam.chunkIndex;
1177
1180
  let chunkSize = chunkParam.chunkSize;
1178
- var start = chunkIndex * chunkSize,
1181
+ let start = chunkIndex * chunkSize,
1179
1182
  end =
1180
1183
  start + chunkSize >= fullFile.size
1181
1184
  ? fullFile.size
@@ -1221,7 +1224,7 @@ tmixins = {
1221
1224
  if (fullFile) fullFile.abort = c;
1222
1225
  }),
1223
1226
  callback: (res) => {
1224
- if (res.type == "success") {
1227
+ if (res.type === "success") {
1225
1228
  that.loadingPercent = 100;
1226
1229
  // that.loadingTitle = this.getUploadText(100);
1227
1230
  this.changeUploadPercent(100);
@@ -1271,7 +1274,7 @@ tmixins = {
1271
1274
  let percent = Math.floor(
1272
1275
  (progressEvent.loaded * 100) / progressEvent.total
1273
1276
  );
1274
- if (percent == 100) {
1277
+ if (percent === 100) {
1275
1278
  percent = 99;
1276
1279
  }
1277
1280
  that.loadingPercent = percent;
@@ -1279,7 +1282,7 @@ tmixins = {
1279
1282
  that.changeCheckTextPercent(percent);
1280
1283
  },
1281
1284
  callback: (res) => {
1282
- if (res.type == "success") {
1285
+ if (res.type === "success") {
1283
1286
  that.loadingPercent = 100;
1284
1287
  // that.loadingTitle = this.getCheckText(100);
1285
1288
  that.changeCheckTextPercent(100);
@@ -1337,7 +1340,7 @@ tmixins = {
1337
1340
  if (fullFile) fullFile.abort = c;
1338
1341
  }),
1339
1342
  callback: (res) => {
1340
- if (res.type == "success") {
1343
+ if (res.type === "success") {
1341
1344
  let rows = res?.objx?.datas || [];
1342
1345
  let fileCellFields = this.fileCellFields;
1343
1346
  rows.forEach((row) => {
@@ -1453,7 +1456,7 @@ tmixins = {
1453
1456
 
1454
1457
  const fileReader = new FileReader();
1455
1458
  fileReader.onload = async (ev) => {
1456
- var resultData;
1459
+ let resultData;
1457
1460
  try {
1458
1461
  const data = ev.target.result;
1459
1462
  const workbook = configUtil.XLSX.read(data, {
@@ -1465,7 +1468,7 @@ tmixins = {
1465
1468
  let sheetName = workbook.SheetNames[pi];
1466
1469
  let sheet = workbook.Sheets[sheetName];
1467
1470
 
1468
- if (sheet["!ref"] == undefined) {
1471
+ if (sheet["!ref"] === undefined || sheet["!ref"] === null) {
1469
1472
  that.$baseAlert(
1470
1473
  this.$t2(
1471
1474
  "请使用正确的导入模版!",
@@ -1475,25 +1478,25 @@ tmixins = {
1475
1478
  that.handleClose2();
1476
1479
  return false;
1477
1480
  }
1478
- var range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
1479
- var dataSize = range.e.r + 1; //行数
1481
+ let range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
1482
+ let dataSize = range.e.r + 1; //行数
1480
1483
  that.dataSize = dataSize - 3 >= 0 ? dataSize - 3 : 0;
1481
- var titles = [];
1482
- var fields = [];
1484
+ let titles = [];
1485
+ let fields = [];
1483
1486
 
1484
1487
  const ws = workbook.Sheets[sheet];
1485
1488
 
1486
1489
  let prefix = option.prefix;
1487
1490
  let excelUrl = option.excel;
1488
1491
 
1489
- var excelRows = [];
1490
- var row;
1491
- var rowNum;
1492
- var colNum;
1492
+ let excelRows = [];
1493
+ let row;
1494
+ let rowNum;
1495
+ let colNum;
1493
1496
  for (rowNum = range.s.r; rowNum <= range.e.r; rowNum++) {
1494
1497
  row = [];
1495
1498
  for (colNum = range.s.c; colNum <= range.e.c; colNum++) {
1496
- var nextCell =
1499
+ let nextCell =
1497
1500
  sheet[
1498
1501
  configUtil.XLSX.utils.encode_cell({
1499
1502
  r: rowNum,
@@ -1506,10 +1509,10 @@ tmixins = {
1506
1509
  row.push(nextCell.w.trim());
1507
1510
  }
1508
1511
  }
1509
- if (rowNum == 1) {
1512
+ if (rowNum === 1) {
1510
1513
  titles = row;
1511
1514
  }
1512
- if (rowNum == 2) {
1515
+ if (rowNum === 2) {
1513
1516
  fields = row;
1514
1517
  let checkResult = true;
1515
1518
  }
@@ -1527,7 +1530,7 @@ tmixins = {
1527
1530
  if (
1528
1531
  !titles.length ||
1529
1532
  !fields.length ||
1530
- titles.length != fields.length
1533
+ titles.length !== fields.length
1531
1534
  ) {
1532
1535
  that.$baseAlert(
1533
1536
  this.$t2(
@@ -1539,15 +1542,15 @@ tmixins = {
1539
1542
  return false;
1540
1543
  }
1541
1544
 
1542
- var columns = [];
1543
- var cols = [];
1545
+ let columns = [];
1546
+ let cols = [];
1544
1547
  let uniqueFields = [];
1545
1548
  let uniqueKeys = [];
1546
1549
  for (let i = 0; i < titles.length; i++) {
1547
1550
  let title = titles[i];
1548
1551
  if (title) {
1549
1552
  let field = fields[i];
1550
- if (field == null) {
1553
+ if (field === null || field === undefined) {
1551
1554
  that.$baseAlert(
1552
1555
  this.$t2(
1553
1556
  "请使用正确的导入模版!",
@@ -1609,7 +1612,7 @@ tmixins = {
1609
1612
  }
1610
1613
  }
1611
1614
 
1612
- var oriCols = JSON.parse(JSON.stringify(cols)); //列信息
1615
+ let oriCols = JSON.parse(JSON.stringify(cols)); //列信息
1613
1616
  /* if (uniqueKeys.length) {
1614
1617
  //分组唯一字段为空时,全部不发包。
1615
1618
  for (let i = 0; i < oriCols.length; i++) {
@@ -1618,7 +1621,7 @@ tmixins = {
1618
1621
  for (let j = 0; j < excelRows.length; j++) {
1619
1622
  let data = excelRows[j];
1620
1623
  let value = data[oriCol.field];
1621
- if (value == null || value == "") {
1624
+ if (value === null || value === undefined || value === "") {
1622
1625
  that.errorHandle(`[${sheetName}]`+
1623
1626
  that.$t2(
1624
1627
  "第" + (j + 4) + "行[" + oriCol.title + "]不能为空;",
@@ -1675,7 +1678,7 @@ tmixins = {
1675
1678
  that.handleCellNotNull(k, sheetData);
1676
1679
  return;
1677
1680
  }
1678
- if (sheetItem[uniqueKey] == uniqueValue) {
1681
+ if (sheetItem[uniqueKey] === uniqueValue) {
1679
1682
  fDatas.push(sheetItem);
1680
1683
  }
1681
1684
  }
@@ -1703,7 +1706,7 @@ tmixins = {
1703
1706
  fileReader.readAsBinaryString(file);
1704
1707
  },
1705
1708
  isNull(val) {
1706
- if (val == null || val == "" || val == undefined) {
1709
+ if (val === null || val === undefined || val === "" || val === undefined || val === null) {
1707
1710
  return true;
1708
1711
  }
1709
1712
  },
@@ -1745,7 +1748,7 @@ tmixins = {
1745
1748
  handleCellNotNull(i, sheetData) {
1746
1749
  let that = this;
1747
1750
  let uniqueKey = sheetData.uniqueKeys[0];
1748
- let oriCol = sheetData.oriCols.find((item) => item.field == uniqueKey);
1751
+ let oriCol = sheetData.oriCols.find((item) => item.field === uniqueKey);
1749
1752
  that.errorHandle(
1750
1753
  `[${sheetData.sheetName}]` +
1751
1754
  that.$t2(
@@ -106,7 +106,7 @@
106
106
  v-model="formConfig.addFormCode"
107
107
  @clear="
108
108
  formConfig.addFormCode = null;
109
- formConfig.addFormName = null
109
+ formConfig.addFormName = null;
110
110
  $forceUpdate();
111
111
  "
112
112
  v-el-readonly
@@ -998,7 +998,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
998
998
  created() {
999
999
  //导入表单JSON后需要重新加载自定义CSS样式!!!
1000
1000
  this.designer.handleEvent("form-json-imported", () => {
1001
- this.formCssCode = this.formConfig.cssCode;
1001
+ this.formCssCode = this.formConfig.cssCode || "";
1002
1002
  insertCustomCssToHead(this.formCssCcssCodeode);
1003
1003
  this.extractCssClass();
1004
1004
  this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
@@ -1008,7 +1008,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1008
1008
  /* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
1009
1009
  此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
1010
1010
  setTimeout(() => {
1011
- this.formCssCode = this.formConfig.cssCode;
1011
+ this.formCssCode = this.formConfig.cssCode || "";
1012
1012
  insertCustomCssToHead(this.formCssCode);
1013
1013
  this.extractCssClass();
1014
1014
  this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
@@ -1031,7 +1031,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1031
1031
 
1032
1032
  extractCssClass() {
1033
1033
  let regExp = /\..*{/g;
1034
- let result = this.formCssCode.match(regExp);
1034
+ let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
1035
1035
  let cssNameArray = [];
1036
1036
 
1037
1037
  if (!!result && result.length > 0) {
@@ -1413,15 +1413,15 @@ export default {
1413
1413
  findColumnByColumnId(columnList, columnId) {
1414
1414
  let result = null;
1415
1415
  if (columnList) {
1416
- let column = columnList.find((item) => item.columnId == columnId);
1416
+ /* let column = columnList.find((item) => item.columnId == columnId);
1417
1417
  if (!column) {
1418
- }
1418
+ } */
1419
1419
  for (let column of columnList) {
1420
1420
  if (column.columnId == columnId) {
1421
1421
  result = column;
1422
1422
  break;
1423
1423
  } else if (column.children && column.children.length) {
1424
- let subColumn = this.findColumnByColumnId(column.children, children);
1424
+ let subColumn = this.findColumnByColumnId(column.children, columnId);
1425
1425
  if (subColumn) {
1426
1426
  result = subColumn;
1427
1427
  break;
@@ -114,7 +114,7 @@ export default {
114
114
  eventParams: ["dataId", "formCode", "done"],
115
115
  showBdAttachSettingDialog: false,
116
116
  onBeforeImportParams: ["dataId", "formCode", "file", "resultData", "done"],
117
- onConfirmImportParams: ["dataId", "formCode", "resultData", "file", "done"],
117
+ onConfirmImportParams: ["dataId", "formCode", "resultData", "file", "done", "close"],
118
118
  onSuccessImportParams: ["dataId", "formCode", "resultData", "file"],
119
119
  };
120
120
  },
@@ -77,7 +77,7 @@ export default {
77
77
  eventParams: ["dataId", "formCode", "done"],
78
78
  showBdAttachSettingDialog: false,
79
79
  onBeforeImportParams: ["dataId", "formCode", 'file', 'resultData', 'done'],
80
- onConfirmImportParams: ["dataId", "formCode", 'resultData', 'file', 'done'],
80
+ onConfirmImportParams: ["dataId", "formCode", 'resultData', 'file', 'done', "close"],
81
81
  onSuccessImportParams: ["dataId", "formCode", 'resultData', 'file']
82
82
  };
83
83
  },