@bit-sun/business-component 3.1.0-alpha.8 → 3.1.0-alpha.9

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/dist/index.esm.js CHANGED
@@ -30,9 +30,88 @@ import { parse as parse$1 } from '@babel/parser';
30
30
  import { visit } from 'ast-types';
31
31
  import isArray$1 from 'lodash/isArray';
32
32
 
33
+ function _arrayLikeToArray(r, a) {
34
+ (null == a || a > r.length) && (a = r.length);
35
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
36
+ return n;
37
+ }
38
+ function _arrayWithHoles(r) {
39
+ if (Array.isArray(r)) return r;
40
+ }
41
+ function _arrayWithoutHoles(r) {
42
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
43
+ }
44
+ function _assertThisInitialized(e) {
45
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
46
+ return e;
47
+ }
48
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
49
+ try {
50
+ var i = n[a](c),
51
+ u = i.value;
52
+ } catch (n) {
53
+ return void e(n);
54
+ }
55
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
56
+ }
57
+ function _asyncToGenerator(n) {
58
+ return function () {
59
+ var t = this,
60
+ e = arguments;
61
+ return new Promise(function (r, o) {
62
+ var a = n.apply(t, e);
63
+ function _next(n) {
64
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
65
+ }
66
+ function _throw(n) {
67
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
68
+ }
69
+ _next(void 0);
70
+ });
71
+ };
72
+ }
33
73
  function _callSuper(t, o, e) {
34
74
  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
35
75
  }
76
+ function _classCallCheck(a, n) {
77
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
78
+ }
79
+ function _defineProperties(e, r) {
80
+ for (var t = 0; t < r.length; t++) {
81
+ var o = r[t];
82
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
83
+ }
84
+ }
85
+ function _createClass(e, r, t) {
86
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
87
+ writable: !1
88
+ }), e;
89
+ }
90
+ function _defineProperty(e, r, t) {
91
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
92
+ value: t,
93
+ enumerable: !0,
94
+ configurable: !0,
95
+ writable: !0
96
+ }) : e[r] = t, e;
97
+ }
98
+ function _getPrototypeOf(t) {
99
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
100
+ return t.__proto__ || Object.getPrototypeOf(t);
101
+ }, _getPrototypeOf(t);
102
+ }
103
+ function _inherits(t, e) {
104
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
105
+ t.prototype = Object.create(e && e.prototype, {
106
+ constructor: {
107
+ value: t,
108
+ writable: !0,
109
+ configurable: !0
110
+ }
111
+ }), Object.defineProperty(t, "prototype", {
112
+ writable: !1
113
+ }), e && _setPrototypeOf(t, e);
114
+ }
36
115
  function _isNativeReflectConstruct() {
37
116
  try {
38
117
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -41,6 +120,9 @@ function _isNativeReflectConstruct() {
41
120
  return !!t;
42
121
  })();
43
122
  }
123
+ function _iterableToArray(r) {
124
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
125
+ }
44
126
  function _iterableToArrayLimit(r, l) {
45
127
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
46
128
  if (null != t) {
@@ -68,6 +150,15 @@ function _iterableToArrayLimit(r, l) {
68
150
  return a;
69
151
  }
70
152
  }
153
+ function _nonIterableRest() {
154
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
155
+ }
156
+ function _nonIterableSpread() {
157
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
158
+ }
159
+ function _objectDestructuringEmpty(t) {
160
+ if (null == t) throw new TypeError("Cannot destructure " + t);
161
+ }
71
162
  function ownKeys(e, r) {
72
163
  var t = Object.keys(e);
73
164
  if (Object.getOwnPropertySymbols) {
@@ -89,6 +180,31 @@ function _objectSpread2(e) {
89
180
  }
90
181
  return e;
91
182
  }
183
+ function _objectWithoutProperties(e, t) {
184
+ if (null == e) return {};
185
+ var o,
186
+ r,
187
+ i = _objectWithoutPropertiesLoose(e, t);
188
+ if (Object.getOwnPropertySymbols) {
189
+ var n = Object.getOwnPropertySymbols(e);
190
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
191
+ }
192
+ return i;
193
+ }
194
+ function _objectWithoutPropertiesLoose(r, e) {
195
+ if (null == r) return {};
196
+ var t = {};
197
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
198
+ if (e.indexOf(n) >= 0) continue;
199
+ t[n] = r[n];
200
+ }
201
+ return t;
202
+ }
203
+ function _possibleConstructorReturn(t, e) {
204
+ if (e && ("object" == typeof e || "function" == typeof e)) return e;
205
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
206
+ return _assertThisInitialized(t);
207
+ }
92
208
  function _regeneratorRuntime() {
93
209
  _regeneratorRuntime = function () {
94
210
  return e;
@@ -390,6 +506,20 @@ function _regeneratorRuntime() {
390
506
  }
391
507
  }, e;
392
508
  }
509
+ function _setPrototypeOf(t, e) {
510
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
511
+ return t.__proto__ = e, t;
512
+ }, _setPrototypeOf(t, e);
513
+ }
514
+ function _slicedToArray(r, e) {
515
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
516
+ }
517
+ function _toArray(r) {
518
+ return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
519
+ }
520
+ function _toConsumableArray(r) {
521
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
522
+ }
393
523
  function _toPrimitive(t, r) {
394
524
  if ("object" != typeof t || !t) return t;
395
525
  var e = t[Symbol.toPrimitive];
@@ -413,181 +543,13 @@ function _typeof(o) {
413
543
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
414
544
  }, _typeof(o);
415
545
  }
416
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
417
- try {
418
- var info = gen[key](arg);
419
- var value = info.value;
420
- } catch (error) {
421
- reject(error);
422
- return;
423
- }
424
- if (info.done) {
425
- resolve(value);
426
- } else {
427
- Promise.resolve(value).then(_next, _throw);
546
+ function _unsupportedIterableToArray(r, a) {
547
+ if (r) {
548
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
549
+ var t = {}.toString.call(r).slice(8, -1);
550
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
428
551
  }
429
552
  }
430
- function _asyncToGenerator(fn) {
431
- return function () {
432
- var self = this,
433
- args = arguments;
434
- return new Promise(function (resolve, reject) {
435
- var gen = fn.apply(self, args);
436
- function _next(value) {
437
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
438
- }
439
- function _throw(err) {
440
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
441
- }
442
- _next(undefined);
443
- });
444
- };
445
- }
446
- function _classCallCheck(instance, Constructor) {
447
- if (!(instance instanceof Constructor)) {
448
- throw new TypeError("Cannot call a class as a function");
449
- }
450
- }
451
- function _defineProperties(target, props) {
452
- for (var i = 0; i < props.length; i++) {
453
- var descriptor = props[i];
454
- descriptor.enumerable = descriptor.enumerable || false;
455
- descriptor.configurable = true;
456
- if ("value" in descriptor) descriptor.writable = true;
457
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
458
- }
459
- }
460
- function _createClass(Constructor, protoProps, staticProps) {
461
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
462
- if (staticProps) _defineProperties(Constructor, staticProps);
463
- Object.defineProperty(Constructor, "prototype", {
464
- writable: false
465
- });
466
- return Constructor;
467
- }
468
- function _defineProperty(obj, key, value) {
469
- key = _toPropertyKey(key);
470
- if (key in obj) {
471
- Object.defineProperty(obj, key, {
472
- value: value,
473
- enumerable: true,
474
- configurable: true,
475
- writable: true
476
- });
477
- } else {
478
- obj[key] = value;
479
- }
480
- return obj;
481
- }
482
- function _inherits(subClass, superClass) {
483
- if (typeof superClass !== "function" && superClass !== null) {
484
- throw new TypeError("Super expression must either be null or a function");
485
- }
486
- subClass.prototype = Object.create(superClass && superClass.prototype, {
487
- constructor: {
488
- value: subClass,
489
- writable: true,
490
- configurable: true
491
- }
492
- });
493
- Object.defineProperty(subClass, "prototype", {
494
- writable: false
495
- });
496
- if (superClass) _setPrototypeOf(subClass, superClass);
497
- }
498
- function _getPrototypeOf(o) {
499
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
500
- return o.__proto__ || Object.getPrototypeOf(o);
501
- };
502
- return _getPrototypeOf(o);
503
- }
504
- function _setPrototypeOf(o, p) {
505
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
506
- o.__proto__ = p;
507
- return o;
508
- };
509
- return _setPrototypeOf(o, p);
510
- }
511
- function _objectDestructuringEmpty(obj) {
512
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
513
- }
514
- function _objectWithoutPropertiesLoose(source, excluded) {
515
- if (source == null) return {};
516
- var target = {};
517
- for (var key in source) {
518
- if (Object.prototype.hasOwnProperty.call(source, key)) {
519
- if (excluded.indexOf(key) >= 0) continue;
520
- target[key] = source[key];
521
- }
522
- }
523
- return target;
524
- }
525
- function _objectWithoutProperties(source, excluded) {
526
- if (source == null) return {};
527
- var target = _objectWithoutPropertiesLoose(source, excluded);
528
- var key, i;
529
- if (Object.getOwnPropertySymbols) {
530
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
531
- for (i = 0; i < sourceSymbolKeys.length; i++) {
532
- key = sourceSymbolKeys[i];
533
- if (excluded.indexOf(key) >= 0) continue;
534
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
535
- target[key] = source[key];
536
- }
537
- }
538
- return target;
539
- }
540
- function _assertThisInitialized(self) {
541
- if (self === void 0) {
542
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
543
- }
544
- return self;
545
- }
546
- function _possibleConstructorReturn(self, call) {
547
- if (call && (typeof call === "object" || typeof call === "function")) {
548
- return call;
549
- } else if (call !== void 0) {
550
- throw new TypeError("Derived constructors may only return object or undefined");
551
- }
552
- return _assertThisInitialized(self);
553
- }
554
- function _slicedToArray(arr, i) {
555
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
556
- }
557
- function _toArray(arr) {
558
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
559
- }
560
- function _toConsumableArray(arr) {
561
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
562
- }
563
- function _arrayWithoutHoles(arr) {
564
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
565
- }
566
- function _arrayWithHoles(arr) {
567
- if (Array.isArray(arr)) return arr;
568
- }
569
- function _iterableToArray(iter) {
570
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
571
- }
572
- function _unsupportedIterableToArray(o, minLen) {
573
- if (!o) return;
574
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
575
- var n = Object.prototype.toString.call(o).slice(8, -1);
576
- if (n === "Object" && o.constructor) n = o.constructor.name;
577
- if (n === "Map" || n === "Set") return Array.from(o);
578
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
579
- }
580
- function _arrayLikeToArray(arr, len) {
581
- if (len == null || len > arr.length) len = arr.length;
582
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
583
- return arr2;
584
- }
585
- function _nonIterableSpread() {
586
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
587
- }
588
- function _nonIterableRest() {
589
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
590
- }
591
553
 
592
554
  var ENUM = {
593
555
  // 浏览器缓存信息
@@ -2478,8 +2440,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2478
2440
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
2479
2441
  if (columnAbc.name) {
2480
2442
  var charCode = columnAbc.name.charCodeAt();
2481
- if (charCode - 65 <= items.length) {
2482
- columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : !notValid ? '校验结果' : '';
2443
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
2444
+ if (charCode - codeLen <= items.length) {
2445
+ columnAbc.name = itemsTemp[charCode - codeLen] ? itemsTemp[charCode - codeLen].content : '';
2446
+ if (charCode - 65 === itemsTemp.length) {
2447
+ columnAbc.name = '校验结果';
2448
+ }
2483
2449
  } else {
2484
2450
  columnAbc.name = '';
2485
2451
  }
@@ -2697,7 +2663,10 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2697
2663
  });
2698
2664
  return obj;
2699
2665
  });
2700
- return data;
2666
+ // 解决 没有输入的行不要录入进去
2667
+ return data.filter(function (d) {
2668
+ return _.compact(Object.values(d)).length;
2669
+ });
2701
2670
  };
2702
2671
  _this.resetData = function () {
2703
2672
  var _customerColumnsMappi;
@@ -3072,8 +3041,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3072
3041
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
3073
3042
  if (columnAbc.name) {
3074
3043
  var charCode = columnAbc.name.charCodeAt();
3075
- if (charCode - 65 <= items.length) {
3076
- columnAbc.name = itemsTemp$1[charCode - 65] ? itemsTemp$1[charCode - 65].content : !notValid ? '校验结果' : '';
3044
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
3045
+ if (charCode - codeLen <= items.length) {
3046
+ columnAbc.name = itemsTemp$1[charCode - codeLen] ? itemsTemp$1[charCode - codeLen].content : !notValid ? '校验结果' : '';
3077
3047
  } else {
3078
3048
  columnAbc.name = '';
3079
3049
  }
@@ -3291,7 +3261,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3291
3261
  });
3292
3262
  return obj;
3293
3263
  });
3294
- return data;
3264
+ return data.filter(function (d) {
3265
+ return _.compact(Object.values(d)).length;
3266
+ });
3295
3267
  };
3296
3268
  _this.resetData = function () {
3297
3269
  var _customerColumnsMappi;
@@ -3480,6 +3452,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3480
3452
  fa: FORMAT_NAME_GENERAL$1,
3481
3453
  t: FORMAT_TYPE_STRING$1
3482
3454
  };
3455
+ debugger;
3483
3456
  if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
3484
3457
  var _props$customerColumn2;
3485
3458
  itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
@@ -3492,6 +3465,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3492
3465
  return createItem$1('item-0', index, mapping$1.get(item), item, format);
3493
3466
  })) || [];
3494
3467
  }
3468
+ console.log(itemsTemp$1, 'itemsTemp');
3495
3469
  luckysheet$1 = window.luckysheet || window.top.luckysheet;
3496
3470
  _this.state = {
3497
3471
  showErrorData: false,
@@ -4559,13 +4533,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
4559
4533
  if (noNeedSplit) {
4560
4534
  return item.text;
4561
4535
  } else {
4562
- return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
4536
+ return specialBracket ? "\u3010".concat(item.textShowKey || '', "\u3011").concat(showText) : "".concat(item.textShowKey || '', " ").concat(showText);
4563
4537
  }
4564
4538
  };
4565
4539
  var getShowLabelTextStr = function getShowLabelTextStr(kongValue) {
4566
4540
  if (selectMode) {
4567
4541
  var _value$map;
4568
- return (value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
4542
+ return Array.isArray(value) && (value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
4569
4543
  return item.label || item.text || '';
4570
4544
  })) === null || _value$map === void 0 ? void 0 : _value$map.join(',')) || kongValue;
4571
4545
  }
@@ -4580,7 +4554,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
4580
4554
  var getShowValueStr = function getShowValueStr(kongValue) {
4581
4555
  if (selectMode) {
4582
4556
  var _value$map2;
4583
- return (value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
4557
+ return Array.isArray(value) && (value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
4584
4558
  return getSelectValueText(item);
4585
4559
  })) === null || _value$map2 === void 0 ? void 0 : _value$map2.join(',')) || kongValue;
4586
4560
  }
@@ -9699,7 +9673,10 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps, hidde
9699
9673
  tableSearchForm: tableSearchForm,
9700
9674
  tableColumns: [{
9701
9675
  title: '账户名称',
9702
- dataIndex: 'username'
9676
+ dataIndex: 'username',
9677
+ render: function render(text) {
9678
+ return handleTextOverflow(text);
9679
+ }
9703
9680
  }, {
9704
9681
  title: '显示名称',
9705
9682
  dataIndex: 'name'
@@ -9723,16 +9700,19 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps, hidde
9723
9700
  dataIndex: 'employmentType',
9724
9701
  render: function render(text) {
9725
9702
  var _employeeType$find;
9726
- return (_employeeType$find = employeeType.find(function (i) {
9703
+ return ((_employeeType$find = employeeType.find(function (i) {
9727
9704
  return i.value === text;
9728
- })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text;
9705
+ })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text) || '- -';
9729
9706
  }
9730
9707
  }] : []), [{
9731
9708
  title: '邮箱',
9732
9709
  dataIndex: 'email'
9733
9710
  }, {
9734
9711
  title: '手机号',
9735
- dataIndex: 'officeTelephone'
9712
+ dataIndex: 'officeTelephone',
9713
+ render: function render(text, record) {
9714
+ return handleTextOverflow(text || (record === null || record === void 0 ? void 0 : record.phone));
9715
+ }
9736
9716
  }])
9737
9717
  }, modalTableBusProps);
9738
9718
  }
@@ -15490,7 +15470,7 @@ var BsSulaQueryTable = (function (props) {
15490
15470
  expandable: props.expandable,
15491
15471
  scroll: {
15492
15472
  x: props.overScrollX || 'max-content',
15493
- y: height
15473
+ y: (props === null || props === void 0 ? void 0 : props.overScrollY) || height
15494
15474
  },
15495
15475
  bordered: value.bordered || false,
15496
15476
  sticky: true,
@@ -15534,7 +15514,7 @@ var BsSulaQueryTable = (function (props) {
15534
15514
  }
15535
15515
  };
15536
15516
  var handleTimeValue = function handleTimeValue() {
15537
- var _value$actionsRender, _value$exportConfig, _sortTableRef$current, _value$exportConfig6, _exportTableRef$curre;
15517
+ var _value$actionsRender, _value$exportConfig, _sortTableRef$current, _value$searchConfig, _value$exportConfig6, _exportTableRef$curre;
15538
15518
  var actionsRender = ((_value$actionsRender = value.actionsRender) !== null && _value$actionsRender !== void 0 ? _value$actionsRender : []).map(function (x) {
15539
15519
  var _x$position;
15540
15520
  return _objectSpread2(_objectSpread2({}, x), {}, {
@@ -15593,13 +15573,13 @@ var BsSulaQueryTable = (function (props) {
15593
15573
  fontSize: 14,
15594
15574
  textAlign: 'center'
15595
15575
  }
15596
- }, "\u5217\u8BBE\u7F6E")), /*#__PURE__*/React$1.createElement(Menu.Item, null, /*#__PURE__*/React$1.createElement(SearchItemTable, {
15576
+ }, "\u5217\u8BBE\u7F6E")), !(value === null || value === void 0 ? void 0 : (_value$searchConfig = value.searchConfig) === null || _value$searchConfig === void 0 ? void 0 : _value$searchConfig.isHidden) && ( /*#__PURE__*/React$1.createElement(Menu.Item, null, /*#__PURE__*/React$1.createElement(SearchItemTable, {
15597
15577
  ref: searchTableRef,
15598
15578
  setShowSearchFields: setShowSearchFields,
15599
15579
  showSearchFields: showSearchFields,
15600
15580
  datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
15601
15581
  bsTableCode: bsTableCode
15602
- })), (value === null || value === void 0 ? void 0 : (_value$exportConfig6 = value.exportConfig) === null || _value$exportConfig6 === void 0 ? void 0 : _value$exportConfig6.settingColumns) && ( /*#__PURE__*/React$1.createElement(Menu.Item, null, /*#__PURE__*/React$1.createElement("div", {
15582
+ }))), (value === null || value === void 0 ? void 0 : (_value$exportConfig6 = value.exportConfig) === null || _value$exportConfig6 === void 0 ? void 0 : _value$exportConfig6.settingColumns) && ( /*#__PURE__*/React$1.createElement(Menu.Item, null, /*#__PURE__*/React$1.createElement("div", {
15603
15583
  onClick: exportTableRef === null || exportTableRef === void 0 ? void 0 : (_exportTableRef$curre = exportTableRef.current) === null || _exportTableRef$curre === void 0 ? void 0 : _exportTableRef$curre.showModal,
15604
15584
  style: {
15605
15585
  fontSize: 14,
package/dist/index.js CHANGED
@@ -53,9 +53,88 @@ var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize);
53
53
  var castArray__default = /*#__PURE__*/_interopDefaultLegacy(castArray);
54
54
  var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray$1);
55
55
 
56
+ function _arrayLikeToArray(r, a) {
57
+ (null == a || a > r.length) && (a = r.length);
58
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
59
+ return n;
60
+ }
61
+ function _arrayWithHoles(r) {
62
+ if (Array.isArray(r)) return r;
63
+ }
64
+ function _arrayWithoutHoles(r) {
65
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
66
+ }
67
+ function _assertThisInitialized(e) {
68
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
69
+ return e;
70
+ }
71
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
72
+ try {
73
+ var i = n[a](c),
74
+ u = i.value;
75
+ } catch (n) {
76
+ return void e(n);
77
+ }
78
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
79
+ }
80
+ function _asyncToGenerator(n) {
81
+ return function () {
82
+ var t = this,
83
+ e = arguments;
84
+ return new Promise(function (r, o) {
85
+ var a = n.apply(t, e);
86
+ function _next(n) {
87
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
88
+ }
89
+ function _throw(n) {
90
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
91
+ }
92
+ _next(void 0);
93
+ });
94
+ };
95
+ }
56
96
  function _callSuper(t, o, e) {
57
97
  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
58
98
  }
99
+ function _classCallCheck(a, n) {
100
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
101
+ }
102
+ function _defineProperties(e, r) {
103
+ for (var t = 0; t < r.length; t++) {
104
+ var o = r[t];
105
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
106
+ }
107
+ }
108
+ function _createClass(e, r, t) {
109
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
110
+ writable: !1
111
+ }), e;
112
+ }
113
+ function _defineProperty(e, r, t) {
114
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
115
+ value: t,
116
+ enumerable: !0,
117
+ configurable: !0,
118
+ writable: !0
119
+ }) : e[r] = t, e;
120
+ }
121
+ function _getPrototypeOf(t) {
122
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
123
+ return t.__proto__ || Object.getPrototypeOf(t);
124
+ }, _getPrototypeOf(t);
125
+ }
126
+ function _inherits(t, e) {
127
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
128
+ t.prototype = Object.create(e && e.prototype, {
129
+ constructor: {
130
+ value: t,
131
+ writable: !0,
132
+ configurable: !0
133
+ }
134
+ }), Object.defineProperty(t, "prototype", {
135
+ writable: !1
136
+ }), e && _setPrototypeOf(t, e);
137
+ }
59
138
  function _isNativeReflectConstruct() {
60
139
  try {
61
140
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -64,6 +143,9 @@ function _isNativeReflectConstruct() {
64
143
  return !!t;
65
144
  })();
66
145
  }
146
+ function _iterableToArray(r) {
147
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
148
+ }
67
149
  function _iterableToArrayLimit(r, l) {
68
150
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
69
151
  if (null != t) {
@@ -91,6 +173,15 @@ function _iterableToArrayLimit(r, l) {
91
173
  return a;
92
174
  }
93
175
  }
176
+ function _nonIterableRest() {
177
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
178
+ }
179
+ function _nonIterableSpread() {
180
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
181
+ }
182
+ function _objectDestructuringEmpty(t) {
183
+ if (null == t) throw new TypeError("Cannot destructure " + t);
184
+ }
94
185
  function ownKeys(e, r) {
95
186
  var t = Object.keys(e);
96
187
  if (Object.getOwnPropertySymbols) {
@@ -112,6 +203,31 @@ function _objectSpread2(e) {
112
203
  }
113
204
  return e;
114
205
  }
206
+ function _objectWithoutProperties(e, t) {
207
+ if (null == e) return {};
208
+ var o,
209
+ r,
210
+ i = _objectWithoutPropertiesLoose(e, t);
211
+ if (Object.getOwnPropertySymbols) {
212
+ var n = Object.getOwnPropertySymbols(e);
213
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
214
+ }
215
+ return i;
216
+ }
217
+ function _objectWithoutPropertiesLoose(r, e) {
218
+ if (null == r) return {};
219
+ var t = {};
220
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
221
+ if (e.indexOf(n) >= 0) continue;
222
+ t[n] = r[n];
223
+ }
224
+ return t;
225
+ }
226
+ function _possibleConstructorReturn(t, e) {
227
+ if (e && ("object" == typeof e || "function" == typeof e)) return e;
228
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
229
+ return _assertThisInitialized(t);
230
+ }
115
231
  function _regeneratorRuntime() {
116
232
  _regeneratorRuntime = function () {
117
233
  return e;
@@ -413,6 +529,20 @@ function _regeneratorRuntime() {
413
529
  }
414
530
  }, e;
415
531
  }
532
+ function _setPrototypeOf(t, e) {
533
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
534
+ return t.__proto__ = e, t;
535
+ }, _setPrototypeOf(t, e);
536
+ }
537
+ function _slicedToArray(r, e) {
538
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
539
+ }
540
+ function _toArray(r) {
541
+ return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
542
+ }
543
+ function _toConsumableArray(r) {
544
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
545
+ }
416
546
  function _toPrimitive(t, r) {
417
547
  if ("object" != typeof t || !t) return t;
418
548
  var e = t[Symbol.toPrimitive];
@@ -436,181 +566,13 @@ function _typeof(o) {
436
566
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
437
567
  }, _typeof(o);
438
568
  }
439
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
440
- try {
441
- var info = gen[key](arg);
442
- var value = info.value;
443
- } catch (error) {
444
- reject(error);
445
- return;
446
- }
447
- if (info.done) {
448
- resolve(value);
449
- } else {
450
- Promise.resolve(value).then(_next, _throw);
569
+ function _unsupportedIterableToArray(r, a) {
570
+ if (r) {
571
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
572
+ var t = {}.toString.call(r).slice(8, -1);
573
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
451
574
  }
452
575
  }
453
- function _asyncToGenerator(fn) {
454
- return function () {
455
- var self = this,
456
- args = arguments;
457
- return new Promise(function (resolve, reject) {
458
- var gen = fn.apply(self, args);
459
- function _next(value) {
460
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
461
- }
462
- function _throw(err) {
463
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
464
- }
465
- _next(undefined);
466
- });
467
- };
468
- }
469
- function _classCallCheck(instance, Constructor) {
470
- if (!(instance instanceof Constructor)) {
471
- throw new TypeError("Cannot call a class as a function");
472
- }
473
- }
474
- function _defineProperties(target, props) {
475
- for (var i = 0; i < props.length; i++) {
476
- var descriptor = props[i];
477
- descriptor.enumerable = descriptor.enumerable || false;
478
- descriptor.configurable = true;
479
- if ("value" in descriptor) descriptor.writable = true;
480
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
481
- }
482
- }
483
- function _createClass(Constructor, protoProps, staticProps) {
484
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
485
- if (staticProps) _defineProperties(Constructor, staticProps);
486
- Object.defineProperty(Constructor, "prototype", {
487
- writable: false
488
- });
489
- return Constructor;
490
- }
491
- function _defineProperty(obj, key, value) {
492
- key = _toPropertyKey(key);
493
- if (key in obj) {
494
- Object.defineProperty(obj, key, {
495
- value: value,
496
- enumerable: true,
497
- configurable: true,
498
- writable: true
499
- });
500
- } else {
501
- obj[key] = value;
502
- }
503
- return obj;
504
- }
505
- function _inherits(subClass, superClass) {
506
- if (typeof superClass !== "function" && superClass !== null) {
507
- throw new TypeError("Super expression must either be null or a function");
508
- }
509
- subClass.prototype = Object.create(superClass && superClass.prototype, {
510
- constructor: {
511
- value: subClass,
512
- writable: true,
513
- configurable: true
514
- }
515
- });
516
- Object.defineProperty(subClass, "prototype", {
517
- writable: false
518
- });
519
- if (superClass) _setPrototypeOf(subClass, superClass);
520
- }
521
- function _getPrototypeOf(o) {
522
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
523
- return o.__proto__ || Object.getPrototypeOf(o);
524
- };
525
- return _getPrototypeOf(o);
526
- }
527
- function _setPrototypeOf(o, p) {
528
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
529
- o.__proto__ = p;
530
- return o;
531
- };
532
- return _setPrototypeOf(o, p);
533
- }
534
- function _objectDestructuringEmpty(obj) {
535
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
536
- }
537
- function _objectWithoutPropertiesLoose(source, excluded) {
538
- if (source == null) return {};
539
- var target = {};
540
- for (var key in source) {
541
- if (Object.prototype.hasOwnProperty.call(source, key)) {
542
- if (excluded.indexOf(key) >= 0) continue;
543
- target[key] = source[key];
544
- }
545
- }
546
- return target;
547
- }
548
- function _objectWithoutProperties(source, excluded) {
549
- if (source == null) return {};
550
- var target = _objectWithoutPropertiesLoose(source, excluded);
551
- var key, i;
552
- if (Object.getOwnPropertySymbols) {
553
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
554
- for (i = 0; i < sourceSymbolKeys.length; i++) {
555
- key = sourceSymbolKeys[i];
556
- if (excluded.indexOf(key) >= 0) continue;
557
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
558
- target[key] = source[key];
559
- }
560
- }
561
- return target;
562
- }
563
- function _assertThisInitialized(self) {
564
- if (self === void 0) {
565
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
566
- }
567
- return self;
568
- }
569
- function _possibleConstructorReturn(self, call) {
570
- if (call && (typeof call === "object" || typeof call === "function")) {
571
- return call;
572
- } else if (call !== void 0) {
573
- throw new TypeError("Derived constructors may only return object or undefined");
574
- }
575
- return _assertThisInitialized(self);
576
- }
577
- function _slicedToArray(arr, i) {
578
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
579
- }
580
- function _toArray(arr) {
581
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
582
- }
583
- function _toConsumableArray(arr) {
584
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
585
- }
586
- function _arrayWithoutHoles(arr) {
587
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
588
- }
589
- function _arrayWithHoles(arr) {
590
- if (Array.isArray(arr)) return arr;
591
- }
592
- function _iterableToArray(iter) {
593
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
594
- }
595
- function _unsupportedIterableToArray(o, minLen) {
596
- if (!o) return;
597
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
598
- var n = Object.prototype.toString.call(o).slice(8, -1);
599
- if (n === "Object" && o.constructor) n = o.constructor.name;
600
- if (n === "Map" || n === "Set") return Array.from(o);
601
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
602
- }
603
- function _arrayLikeToArray(arr, len) {
604
- if (len == null || len > arr.length) len = arr.length;
605
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
606
- return arr2;
607
- }
608
- function _nonIterableSpread() {
609
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
610
- }
611
- function _nonIterableRest() {
612
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
613
- }
614
576
 
615
577
  var ENUM = {
616
578
  // 浏览器缓存信息
@@ -2501,8 +2463,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2501
2463
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
2502
2464
  if (columnAbc.name) {
2503
2465
  var charCode = columnAbc.name.charCodeAt();
2504
- if (charCode - 65 <= items.length) {
2505
- columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : !notValid ? '校验结果' : '';
2466
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
2467
+ if (charCode - codeLen <= items.length) {
2468
+ columnAbc.name = itemsTemp[charCode - codeLen] ? itemsTemp[charCode - codeLen].content : '';
2469
+ if (charCode - 65 === itemsTemp.length) {
2470
+ columnAbc.name = '校验结果';
2471
+ }
2506
2472
  } else {
2507
2473
  columnAbc.name = '';
2508
2474
  }
@@ -2720,7 +2686,10 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2720
2686
  });
2721
2687
  return obj;
2722
2688
  });
2723
- return data;
2689
+ // 解决 没有输入的行不要录入进去
2690
+ return data.filter(function (d) {
2691
+ return ___default['default'].compact(Object.values(d)).length;
2692
+ });
2724
2693
  };
2725
2694
  _this.resetData = function () {
2726
2695
  var _customerColumnsMappi;
@@ -3095,8 +3064,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3095
3064
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
3096
3065
  if (columnAbc.name) {
3097
3066
  var charCode = columnAbc.name.charCodeAt();
3098
- if (charCode - 65 <= items.length) {
3099
- columnAbc.name = itemsTemp$1[charCode - 65] ? itemsTemp$1[charCode - 65].content : !notValid ? '校验结果' : '';
3067
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
3068
+ if (charCode - codeLen <= items.length) {
3069
+ columnAbc.name = itemsTemp$1[charCode - codeLen] ? itemsTemp$1[charCode - codeLen].content : !notValid ? '校验结果' : '';
3100
3070
  } else {
3101
3071
  columnAbc.name = '';
3102
3072
  }
@@ -3314,7 +3284,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3314
3284
  });
3315
3285
  return obj;
3316
3286
  });
3317
- return data;
3287
+ return data.filter(function (d) {
3288
+ return ___default['default'].compact(Object.values(d)).length;
3289
+ });
3318
3290
  };
3319
3291
  _this.resetData = function () {
3320
3292
  var _customerColumnsMappi;
@@ -3503,6 +3475,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3503
3475
  fa: FORMAT_NAME_GENERAL$1,
3504
3476
  t: FORMAT_TYPE_STRING$1
3505
3477
  };
3478
+ debugger;
3506
3479
  if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
3507
3480
  var _props$customerColumn2;
3508
3481
  itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
@@ -3515,6 +3488,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3515
3488
  return createItem$1('item-0', index, mapping$1.get(item), item, format);
3516
3489
  })) || [];
3517
3490
  }
3491
+ console.log(itemsTemp$1, 'itemsTemp');
3518
3492
  luckysheet$1 = window.luckysheet || window.top.luckysheet;
3519
3493
  _this.state = {
3520
3494
  showErrorData: false,
@@ -4582,13 +4556,13 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
4582
4556
  if (noNeedSplit) {
4583
4557
  return item.text;
4584
4558
  } else {
4585
- return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
4559
+ return specialBracket ? "\u3010".concat(item.textShowKey || '', "\u3011").concat(showText) : "".concat(item.textShowKey || '', " ").concat(showText);
4586
4560
  }
4587
4561
  };
4588
4562
  var getShowLabelTextStr = function getShowLabelTextStr(kongValue) {
4589
4563
  if (selectMode) {
4590
4564
  var _value$map;
4591
- return (value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
4565
+ return Array.isArray(value) && (value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
4592
4566
  return item.label || item.text || '';
4593
4567
  })) === null || _value$map === void 0 ? void 0 : _value$map.join(',')) || kongValue;
4594
4568
  }
@@ -4603,7 +4577,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
4603
4577
  var getShowValueStr = function getShowValueStr(kongValue) {
4604
4578
  if (selectMode) {
4605
4579
  var _value$map2;
4606
- return (value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
4580
+ return Array.isArray(value) && (value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
4607
4581
  return getSelectValueText(item);
4608
4582
  })) === null || _value$map2 === void 0 ? void 0 : _value$map2.join(',')) || kongValue;
4609
4583
  }
@@ -9722,7 +9696,10 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps, hidde
9722
9696
  tableSearchForm: tableSearchForm,
9723
9697
  tableColumns: [{
9724
9698
  title: '账户名称',
9725
- dataIndex: 'username'
9699
+ dataIndex: 'username',
9700
+ render: function render(text) {
9701
+ return handleTextOverflow(text);
9702
+ }
9726
9703
  }, {
9727
9704
  title: '显示名称',
9728
9705
  dataIndex: 'name'
@@ -9746,16 +9723,19 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps, hidde
9746
9723
  dataIndex: 'employmentType',
9747
9724
  render: function render(text) {
9748
9725
  var _employeeType$find;
9749
- return (_employeeType$find = employeeType.find(function (i) {
9726
+ return ((_employeeType$find = employeeType.find(function (i) {
9750
9727
  return i.value === text;
9751
- })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text;
9728
+ })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text) || '- -';
9752
9729
  }
9753
9730
  }] : []), [{
9754
9731
  title: '邮箱',
9755
9732
  dataIndex: 'email'
9756
9733
  }, {
9757
9734
  title: '手机号',
9758
- dataIndex: 'officeTelephone'
9735
+ dataIndex: 'officeTelephone',
9736
+ render: function render(text, record) {
9737
+ return handleTextOverflow(text || (record === null || record === void 0 ? void 0 : record.phone));
9738
+ }
9759
9739
  }])
9760
9740
  }, modalTableBusProps);
9761
9741
  }
@@ -15513,7 +15493,7 @@ var BsSulaQueryTable = (function (props) {
15513
15493
  expandable: props.expandable,
15514
15494
  scroll: {
15515
15495
  x: props.overScrollX || 'max-content',
15516
- y: height
15496
+ y: (props === null || props === void 0 ? void 0 : props.overScrollY) || height
15517
15497
  },
15518
15498
  bordered: value.bordered || false,
15519
15499
  sticky: true,
@@ -15557,7 +15537,7 @@ var BsSulaQueryTable = (function (props) {
15557
15537
  }
15558
15538
  };
15559
15539
  var handleTimeValue = function handleTimeValue() {
15560
- var _value$actionsRender, _value$exportConfig, _sortTableRef$current, _value$exportConfig6, _exportTableRef$curre;
15540
+ var _value$actionsRender, _value$exportConfig, _sortTableRef$current, _value$searchConfig, _value$exportConfig6, _exportTableRef$curre;
15561
15541
  var actionsRender = ((_value$actionsRender = value.actionsRender) !== null && _value$actionsRender !== void 0 ? _value$actionsRender : []).map(function (x) {
15562
15542
  var _x$position;
15563
15543
  return _objectSpread2(_objectSpread2({}, x), {}, {
@@ -15616,13 +15596,13 @@ var BsSulaQueryTable = (function (props) {
15616
15596
  fontSize: 14,
15617
15597
  textAlign: 'center'
15618
15598
  }
15619
- }, "\u5217\u8BBE\u7F6E")), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SearchItemTable, {
15599
+ }, "\u5217\u8BBE\u7F6E")), !(value === null || value === void 0 ? void 0 : (_value$searchConfig = value.searchConfig) === null || _value$searchConfig === void 0 ? void 0 : _value$searchConfig.isHidden) && ( /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SearchItemTable, {
15620
15600
  ref: searchTableRef,
15621
15601
  setShowSearchFields: setShowSearchFields,
15622
15602
  showSearchFields: showSearchFields,
15623
15603
  datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
15624
15604
  bsTableCode: bsTableCode
15625
- })), (value === null || value === void 0 ? void 0 : (_value$exportConfig6 = value.exportConfig) === null || _value$exportConfig6 === void 0 ? void 0 : _value$exportConfig6.settingColumns) && ( /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
15605
+ }))), (value === null || value === void 0 ? void 0 : (_value$exportConfig6 = value.exportConfig) === null || _value$exportConfig6 === void 0 ? void 0 : _value$exportConfig6.settingColumns) && ( /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
15626
15606
  onClick: exportTableRef === null || exportTableRef === void 0 ? void 0 : (_exportTableRef$curre = exportTableRef.current) === null || _exportTableRef$curre === void 0 ? void 0 : _exportTableRef$curre.showModal,
15627
15607
  style: {
15628
15608
  fontSize: 14,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.1.0-alpha.8",
3
+ "version": "3.1.0-alpha.9",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -409,7 +409,7 @@ const getSettingFieldOrColumn = (savedConfig, originConfig, type: string) => {
409
409
  },
410
410
  initialSelectedRowKeys: value.initialSelectedRowKeys || [],
411
411
  expandable: props.expandable,
412
- scroll: { x: props.overScrollX || 'max-content', y: height },
412
+ scroll: { x: props.overScrollX || 'max-content', y: props?.overScrollY || height },
413
413
  bordered: value.bordered || false,
414
414
  sticky: true,
415
415
  rowClassName: (record: object | null | undefined, index: number) =>
@@ -542,15 +542,17 @@ const getSettingFieldOrColumn = (savedConfig, originConfig, type: string) => {
542
542
  列设置
543
543
  </div>
544
544
  </Menu.Item>
545
- <Menu.Item>
546
- <SearchItemTable
547
- ref={searchTableRef}
548
- setShowSearchFields={setShowSearchFields}
549
- showSearchFields={showSearchFields}
550
- datasource={value?.fields || []}
551
- bsTableCode={bsTableCode}
552
- />
545
+ {!value?.searchConfig?.isHidden && (
546
+ <Menu.Item>
547
+ <SearchItemTable
548
+ ref={searchTableRef}
549
+ setShowSearchFields={setShowSearchFields}
550
+ showSearchFields={showSearchFields}
551
+ datasource={value?.fields || []}
552
+ bsTableCode={bsTableCode}
553
+ />
553
554
  </Menu.Item>
555
+ )}
554
556
  {value?.exportConfig?.settingColumns && (
555
557
  <Menu.Item>
556
558
  <div
@@ -1605,6 +1605,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1605
1605
  {
1606
1606
  title: '账户名称',
1607
1607
  dataIndex: 'username',
1608
+ render: (text: any) => handleTextOverflow(text),
1608
1609
  },
1609
1610
  {
1610
1611
  title: '显示名称',
@@ -1626,7 +1627,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1626
1627
  ...(modalTableBusProps?.needTypeSearch?[{
1627
1628
  title: '员工类型',
1628
1629
  dataIndex: 'employmentType',
1629
- render: (text: number) => employeeType.find((i: any) => i.value === text)?.text,
1630
+ render: (text: number) => employeeType.find((i: any) => i.value === text)?.text || '- -',
1630
1631
  }]:[]),
1631
1632
  {
1632
1633
  title: '邮箱',
@@ -1635,6 +1636,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1635
1636
  {
1636
1637
  title: '手机号',
1637
1638
  dataIndex: 'officeTelephone',
1639
+ render: (text: any, record: any) => handleTextOverflow(text||record?.phone),
1638
1640
  },
1639
1641
  ],
1640
1642
  ...modalTableBusProps
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: rodchen
4
4
  * @Date: 2021-12-01 10:52:08
5
- * @LastEditTime: 2021-12-29 17:11:56
6
- * @LastEditors: rodchen
5
+ * @LastEditTime: 2024-07-11 19:20:39
6
+ * @LastEditors: rodchen rodchen_king@outlook.com
7
7
  */
8
8
  // @ts-nocheck
9
9
  import React from 'react';
@@ -132,6 +132,7 @@ class DataImport extends React.Component {
132
132
  this.props.onRef(this);
133
133
 
134
134
  const format = { fa: FORMAT_NAME_GENERAL, t: FORMAT_TYPE_STRING };
135
+ debugger
135
136
  if (props?.customerColumnsMapping?.length) {
136
137
  itemsTemp = props?.customerColumnsMapping?.map((item, index) => {
137
138
  return createItem('item-0', index, item.title, item.name, format);
@@ -145,6 +146,7 @@ class DataImport extends React.Component {
145
146
  return createItem('item-0', index, mapping.get(item), item, format);
146
147
  })||[];
147
148
  }
149
+ console.log(itemsTemp, 'itemsTemp')
148
150
  luckysheet = window.luckysheet || window.top.luckysheet;
149
151
  this.state = {
150
152
  showErrorData: false,
@@ -194,9 +196,10 @@ class DataImport extends React.Component {
194
196
  columnTitleCellRenderBefore: function (columnAbc, postion, ctx) {
195
197
  if (columnAbc.name) {
196
198
  let charCode = columnAbc.name.charCodeAt();
197
- if (charCode - 65 <= items.length) {
198
- columnAbc.name = itemsTemp[charCode - 65]
199
- ? itemsTemp[charCode - 65].content
199
+ let codeLen = (65+23 * (columnAbc.name.length-1))
200
+ if (charCode - codeLen <= items.length) {
201
+ columnAbc.name = itemsTemp[charCode - codeLen]
202
+ ? itemsTemp[charCode - codeLen].content
200
203
  : (!notValid ? '校验结果' : '');
201
204
  } else {
202
205
  columnAbc.name = '';
@@ -417,7 +420,7 @@ class DataImport extends React.Component {
417
420
  return obj;
418
421
  });
419
422
 
420
- return data;
423
+ return data.filter(d => _.compact(Object.values(d)).length);
421
424
  };
422
425
 
423
426
  resetData = () => {
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: rodchen
4
4
  * @Date: 2021-12-01 10:52:08
5
- * @LastEditTime: 2021-12-29 17:11:56
6
- * @LastEditors: rodchen
5
+ * @LastEditTime: 2024-07-11 19:28:43
6
+ * @LastEditors: rodchen rodchen_king@outlook.com
7
7
  */
8
8
  // @ts-nocheck
9
9
  import React from 'react';
@@ -194,10 +194,15 @@ class DataValidation extends React.Component {
194
194
  columnTitleCellRenderBefore: function (columnAbc, postion, ctx) {
195
195
  if (columnAbc.name) {
196
196
  let charCode = columnAbc.name.charCodeAt();
197
- if (charCode - 65 <= items.length) {
198
- columnAbc.name = itemsTemp[charCode - 65]
199
- ? itemsTemp[charCode - 65].content
200
- : (!notValid ? '校验结果' : '');
197
+ let codeLen = (65+23 * (columnAbc.name.length-1))
198
+ if (charCode - codeLen <= items.length) {
199
+ columnAbc.name = itemsTemp[charCode - codeLen]
200
+ ? itemsTemp[charCode - codeLen].content
201
+ : '';
202
+
203
+ if(charCode - 65 === itemsTemp.length) {
204
+ columnAbc.name = '校验结果'
205
+ }
201
206
  } else {
202
207
  columnAbc.name = '';
203
208
  }
@@ -417,7 +422,8 @@ class DataValidation extends React.Component {
417
422
  return obj;
418
423
  });
419
424
 
420
- return data;
425
+ // 解决 没有输入的行不要录入进去
426
+ return data.filter(d => _.compact(Object.values(d)).length);
421
427
  };
422
428
 
423
429
  resetData = () => {
@@ -771,14 +771,14 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
771
771
  return item.text;
772
772
  } else {
773
773
  return specialBracket
774
- ? `【${item.textShowKey}】${showText}`
775
- : `${item.textShowKey} ${showText}`
774
+ ? `【${item.textShowKey || ''}】${showText}`
775
+ : `${item.textShowKey || ''} ${showText}`
776
776
  }
777
777
  };
778
778
 
779
779
  const getShowLabelTextStr = (kongValue): string => {
780
780
  if (selectMode) {
781
- return value?.map(item => item.label || item.text || '')?.join(',') || kongValue;
781
+ return Array.isArray(value) && value?.map(item => item.label || item.text || '')?.join(',') || kongValue;
782
782
  }
783
783
  return (value?.label || value?.text || kongValue) as string;
784
784
  };
@@ -787,7 +787,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
787
787
  }
788
788
  const getShowValueStr = (kongValue): string => {
789
789
  if (selectMode) {
790
- return value?.map(item => getSelectValueText(item))?.join(',') || kongValue;
790
+ return Array.isArray(value) && value?.map(item => getSelectValueText(item))?.join(',') || kongValue;
791
791
  }
792
792
  return (getSelectValueText(value) || kongValue) as string;
793
793
  }