@bit-sun/business-component 3.2.3 → 3.2.4-alpha.0

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
@@ -31,88 +31,9 @@ import { parse as parse$1 } from '@babel/parser';
31
31
  import { visit } from 'ast-types';
32
32
  import isArray$1 from 'lodash/isArray';
33
33
 
34
- function _arrayLikeToArray(r, a) {
35
- (null == a || a > r.length) && (a = r.length);
36
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
37
- return n;
38
- }
39
- function _arrayWithHoles(r) {
40
- if (Array.isArray(r)) return r;
41
- }
42
- function _arrayWithoutHoles(r) {
43
- if (Array.isArray(r)) return _arrayLikeToArray(r);
44
- }
45
- function _assertThisInitialized(e) {
46
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
47
- return e;
48
- }
49
- function asyncGeneratorStep(n, t, e, r, o, a, c) {
50
- try {
51
- var i = n[a](c),
52
- u = i.value;
53
- } catch (n) {
54
- return void e(n);
55
- }
56
- i.done ? t(u) : Promise.resolve(u).then(r, o);
57
- }
58
- function _asyncToGenerator(n) {
59
- return function () {
60
- var t = this,
61
- e = arguments;
62
- return new Promise(function (r, o) {
63
- var a = n.apply(t, e);
64
- function _next(n) {
65
- asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
66
- }
67
- function _throw(n) {
68
- asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
69
- }
70
- _next(void 0);
71
- });
72
- };
73
- }
74
34
  function _callSuper(t, o, e) {
75
35
  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
76
36
  }
77
- function _classCallCheck(a, n) {
78
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
79
- }
80
- function _defineProperties(e, r) {
81
- for (var t = 0; t < r.length; t++) {
82
- var o = r[t];
83
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
84
- }
85
- }
86
- function _createClass(e, r, t) {
87
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
88
- writable: !1
89
- }), e;
90
- }
91
- function _defineProperty(e, r, t) {
92
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
93
- value: t,
94
- enumerable: !0,
95
- configurable: !0,
96
- writable: !0
97
- }) : e[r] = t, e;
98
- }
99
- function _getPrototypeOf(t) {
100
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
101
- return t.__proto__ || Object.getPrototypeOf(t);
102
- }, _getPrototypeOf(t);
103
- }
104
- function _inherits(t, e) {
105
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
106
- t.prototype = Object.create(e && e.prototype, {
107
- constructor: {
108
- value: t,
109
- writable: !0,
110
- configurable: !0
111
- }
112
- }), Object.defineProperty(t, "prototype", {
113
- writable: !1
114
- }), e && _setPrototypeOf(t, e);
115
- }
116
37
  function _isNativeReflectConstruct() {
117
38
  try {
118
39
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -121,9 +42,6 @@ function _isNativeReflectConstruct() {
121
42
  return !!t;
122
43
  })();
123
44
  }
124
- function _iterableToArray(r) {
125
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
126
- }
127
45
  function _iterableToArrayLimit(r, l) {
128
46
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
129
47
  if (null != t) {
@@ -151,15 +69,6 @@ function _iterableToArrayLimit(r, l) {
151
69
  return a;
152
70
  }
153
71
  }
154
- function _nonIterableRest() {
155
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
156
- }
157
- function _nonIterableSpread() {
158
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
159
- }
160
- function _objectDestructuringEmpty(t) {
161
- if (null == t) throw new TypeError("Cannot destructure " + t);
162
- }
163
72
  function ownKeys(e, r) {
164
73
  var t = Object.keys(e);
165
74
  if (Object.getOwnPropertySymbols) {
@@ -181,31 +90,6 @@ function _objectSpread2(e) {
181
90
  }
182
91
  return e;
183
92
  }
184
- function _objectWithoutProperties(e, t) {
185
- if (null == e) return {};
186
- var o,
187
- r,
188
- i = _objectWithoutPropertiesLoose(e, t);
189
- if (Object.getOwnPropertySymbols) {
190
- var s = Object.getOwnPropertySymbols(e);
191
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
192
- }
193
- return i;
194
- }
195
- function _objectWithoutPropertiesLoose(r, e) {
196
- if (null == r) return {};
197
- var t = {};
198
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
199
- if (e.includes(n)) continue;
200
- t[n] = r[n];
201
- }
202
- return t;
203
- }
204
- function _possibleConstructorReturn(t, e) {
205
- if (e && ("object" == typeof e || "function" == typeof e)) return e;
206
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
207
- return _assertThisInitialized(t);
208
- }
209
93
  function _regeneratorRuntime() {
210
94
  _regeneratorRuntime = function () {
211
95
  return e;
@@ -507,20 +391,6 @@ function _regeneratorRuntime() {
507
391
  }
508
392
  }, e;
509
393
  }
510
- function _setPrototypeOf(t, e) {
511
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
512
- return t.__proto__ = e, t;
513
- }, _setPrototypeOf(t, e);
514
- }
515
- function _slicedToArray(r, e) {
516
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
517
- }
518
- function _toArray(r) {
519
- return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
520
- }
521
- function _toConsumableArray(r) {
522
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
523
- }
524
394
  function _toPrimitive(t, r) {
525
395
  if ("object" != typeof t || !t) return t;
526
396
  var e = t[Symbol.toPrimitive];
@@ -544,13 +414,181 @@ function _typeof(o) {
544
414
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
545
415
  }, _typeof(o);
546
416
  }
547
- function _unsupportedIterableToArray(r, a) {
548
- if (r) {
549
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
550
- var t = {}.toString.call(r).slice(8, -1);
551
- 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;
417
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
418
+ try {
419
+ var info = gen[key](arg);
420
+ var value = info.value;
421
+ } catch (error) {
422
+ reject(error);
423
+ return;
424
+ }
425
+ if (info.done) {
426
+ resolve(value);
427
+ } else {
428
+ Promise.resolve(value).then(_next, _throw);
429
+ }
430
+ }
431
+ function _asyncToGenerator(fn) {
432
+ return function () {
433
+ var self = this,
434
+ args = arguments;
435
+ return new Promise(function (resolve, reject) {
436
+ var gen = fn.apply(self, args);
437
+ function _next(value) {
438
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
439
+ }
440
+ function _throw(err) {
441
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
442
+ }
443
+ _next(undefined);
444
+ });
445
+ };
446
+ }
447
+ function _classCallCheck(instance, Constructor) {
448
+ if (!(instance instanceof Constructor)) {
449
+ throw new TypeError("Cannot call a class as a function");
450
+ }
451
+ }
452
+ function _defineProperties(target, props) {
453
+ for (var i = 0; i < props.length; i++) {
454
+ var descriptor = props[i];
455
+ descriptor.enumerable = descriptor.enumerable || false;
456
+ descriptor.configurable = true;
457
+ if ("value" in descriptor) descriptor.writable = true;
458
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
552
459
  }
553
460
  }
461
+ function _createClass(Constructor, protoProps, staticProps) {
462
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
463
+ if (staticProps) _defineProperties(Constructor, staticProps);
464
+ Object.defineProperty(Constructor, "prototype", {
465
+ writable: false
466
+ });
467
+ return Constructor;
468
+ }
469
+ function _defineProperty(obj, key, value) {
470
+ key = _toPropertyKey(key);
471
+ if (key in obj) {
472
+ Object.defineProperty(obj, key, {
473
+ value: value,
474
+ enumerable: true,
475
+ configurable: true,
476
+ writable: true
477
+ });
478
+ } else {
479
+ obj[key] = value;
480
+ }
481
+ return obj;
482
+ }
483
+ function _inherits(subClass, superClass) {
484
+ if (typeof superClass !== "function" && superClass !== null) {
485
+ throw new TypeError("Super expression must either be null or a function");
486
+ }
487
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
488
+ constructor: {
489
+ value: subClass,
490
+ writable: true,
491
+ configurable: true
492
+ }
493
+ });
494
+ Object.defineProperty(subClass, "prototype", {
495
+ writable: false
496
+ });
497
+ if (superClass) _setPrototypeOf(subClass, superClass);
498
+ }
499
+ function _getPrototypeOf(o) {
500
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
501
+ return o.__proto__ || Object.getPrototypeOf(o);
502
+ };
503
+ return _getPrototypeOf(o);
504
+ }
505
+ function _setPrototypeOf(o, p) {
506
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
507
+ o.__proto__ = p;
508
+ return o;
509
+ };
510
+ return _setPrototypeOf(o, p);
511
+ }
512
+ function _objectDestructuringEmpty(obj) {
513
+ if (obj == null) throw new TypeError("Cannot destructure " + obj);
514
+ }
515
+ function _objectWithoutPropertiesLoose(source, excluded) {
516
+ if (source == null) return {};
517
+ var target = {};
518
+ for (var key in source) {
519
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
520
+ if (excluded.indexOf(key) >= 0) continue;
521
+ target[key] = source[key];
522
+ }
523
+ }
524
+ return target;
525
+ }
526
+ function _objectWithoutProperties(source, excluded) {
527
+ if (source == null) return {};
528
+ var target = _objectWithoutPropertiesLoose(source, excluded);
529
+ var key, i;
530
+ if (Object.getOwnPropertySymbols) {
531
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
532
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
533
+ key = sourceSymbolKeys[i];
534
+ if (excluded.indexOf(key) >= 0) continue;
535
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
536
+ target[key] = source[key];
537
+ }
538
+ }
539
+ return target;
540
+ }
541
+ function _assertThisInitialized(self) {
542
+ if (self === void 0) {
543
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
544
+ }
545
+ return self;
546
+ }
547
+ function _possibleConstructorReturn(self, call) {
548
+ if (call && (typeof call === "object" || typeof call === "function")) {
549
+ return call;
550
+ } else if (call !== void 0) {
551
+ throw new TypeError("Derived constructors may only return object or undefined");
552
+ }
553
+ return _assertThisInitialized(self);
554
+ }
555
+ function _slicedToArray(arr, i) {
556
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
557
+ }
558
+ function _toArray(arr) {
559
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
560
+ }
561
+ function _toConsumableArray(arr) {
562
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
563
+ }
564
+ function _arrayWithoutHoles(arr) {
565
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
566
+ }
567
+ function _arrayWithHoles(arr) {
568
+ if (Array.isArray(arr)) return arr;
569
+ }
570
+ function _iterableToArray(iter) {
571
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
572
+ }
573
+ function _unsupportedIterableToArray(o, minLen) {
574
+ if (!o) return;
575
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
576
+ var n = Object.prototype.toString.call(o).slice(8, -1);
577
+ if (n === "Object" && o.constructor) n = o.constructor.name;
578
+ if (n === "Map" || n === "Set") return Array.from(o);
579
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
580
+ }
581
+ function _arrayLikeToArray(arr, len) {
582
+ if (len == null || len > arr.length) len = arr.length;
583
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
584
+ return arr2;
585
+ }
586
+ function _nonIterableSpread() {
587
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
588
+ }
589
+ function _nonIterableRest() {
590
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
591
+ }
554
592
 
555
593
  var ENUM = {
556
594
  // 浏览器缓存信息
@@ -16193,7 +16231,8 @@ var BsSulaQueryTable = (function (props) {
16193
16231
  return _objectSpread2(_objectSpread2({}, config), {}, {
16194
16232
  summary: props.summary,
16195
16233
  summaryList: props.summaryList ? getTableSummaryInfo : undefined,
16196
- statusMapping: props.statusMapping
16234
+ statusMapping: props.statusMapping,
16235
+ isBsSulaQueryTable: true
16197
16236
  });
16198
16237
  }, [
16199
16238
  // value,
@@ -29191,352 +29230,6 @@ var AuthButton = function AuthButton(props) {
29191
29230
  }, children);
29192
29231
  };
29193
29232
 
29194
- var EllipsisTooltip = /*#__PURE__*/function (_React$Component) {
29195
- function EllipsisTooltip() {
29196
- var _this;
29197
- _classCallCheck(this, EllipsisTooltip);
29198
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29199
- args[_key] = arguments[_key];
29200
- }
29201
- _this = _callSuper(this, EllipsisTooltip, [].concat(args));
29202
- _this.state = {
29203
- visible: false
29204
- };
29205
- _this.handleVisibleChange = function (visible) {
29206
- if (_this.props.title.length > _this.props.maxLength) {
29207
- _this.setState({
29208
- visible: visible
29209
- });
29210
- }
29211
- };
29212
- return _this;
29213
- }
29214
- _inherits(EllipsisTooltip, _React$Component);
29215
- return _createClass(EllipsisTooltip, [{
29216
- key: "render",
29217
- value: function render() {
29218
- var style = _objectSpread2({}, this.props.style);
29219
- return /*#__PURE__*/React$1.createElement(Tooltip, {
29220
- visible: this.state.visible,
29221
- onVisibleChange: this.handleVisibleChange,
29222
- title: this.props.title
29223
- }, /*#__PURE__*/React$1.createElement("div", {
29224
- className: "customEllipse",
29225
- style: style
29226
- }, this.props.showInfo && this.props.showInfo || (this.props.title.length > this.props.maxLength ? "".concat(this.props.title.substring(0, this.props.maxLength), "...") : this.props.title)));
29227
- }
29228
- }]);
29229
- }(React$1.Component);
29230
-
29231
- var BsCascader = function BsCascader(_ref) {
29232
- var source = _ref.source,
29233
- onChange = _ref.onChange,
29234
- value = _ref.value,
29235
- disabled = _ref.disabled,
29236
- needNameAndCode = _ref.needNameAndCode,
29237
- onlyCode = _ref.onlyCode,
29238
- requiredLength = _ref.requiredLength,
29239
- isAll = _ref.isAll,
29240
- notChangeOnSelect = _ref.notChangeOnSelect,
29241
- isFirstOnly = _ref.isFirstOnly,
29242
- initRequestSource = _ref.initRequestSource,
29243
- style = _ref.style;
29244
- if (!source && !initRequestSource) return null;
29245
- var _useState = useState((source === null || source === void 0 ? void 0 : source.map(function (item) {
29246
- return _objectSpread2(_objectSpread2({}, item), {}, {
29247
- label: item.text,
29248
- isLeaf: false
29249
- });
29250
- })) || []),
29251
- _useState2 = _slicedToArray(_useState, 2),
29252
- handSource = _useState2[0],
29253
- setHandSource = _useState2[1];
29254
- useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
29255
- var resData, data;
29256
- return _regeneratorRuntime().wrap(function _callee$(_context) {
29257
- while (1) switch (_context.prev = _context.next) {
29258
- case 0:
29259
- if (!(!source && initRequestSource)) {
29260
- _context.next = 6;
29261
- break;
29262
- }
29263
- _context.next = 3;
29264
- return initRequestSource();
29265
- case 3:
29266
- resData = _context.sent;
29267
- data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
29268
- return _objectSpread2(_objectSpread2({}, item), {}, {
29269
- label: item.text,
29270
- isLeaf: false
29271
- });
29272
- })) || [];
29273
- setHandSource(data);
29274
- case 6:
29275
- case "end":
29276
- return _context.stop();
29277
- }
29278
- }, _callee);
29279
- })), []);
29280
- useEffect(function () {
29281
- setHandSource((source === null || source === void 0 ? void 0 : source.map(function (item) {
29282
- return _objectSpread2(_objectSpread2({}, item), {}, {
29283
- label: item.text,
29284
- isLeaf: false
29285
- });
29286
- })) || []);
29287
- }, [source]);
29288
- var _useState3 = useState([]),
29289
- _useState4 = _slicedToArray(_useState3, 2),
29290
- valueSource = _useState4[0],
29291
- setValueSource = _useState4[1];
29292
- var _React$useState = React$1.useState(handSource),
29293
- _React$useState2 = _slicedToArray(_React$useState, 2),
29294
- options = _React$useState2[0],
29295
- setOptions = _React$useState2[1];
29296
- if (options && handSource && options.length != handSource.length) {
29297
- setOptions(handSource);
29298
- }
29299
- useEffect(function () {
29300
- if (value && onlyCode) {
29301
- if (value === null || value === void 0 ? void 0 : value.length) {
29302
- request$2({
29303
- url: "/basic/bscArea/getBscAreaList?qp-code-in=".concat(value),
29304
- method: 'get'
29305
- }).then(function (res) {
29306
- res = res.sort(function (a, b) {
29307
- return a.level - b.level;
29308
- });
29309
- setValueSource(res);
29310
- });
29311
- } else {
29312
- setValueSource([]);
29313
- }
29314
- }
29315
- }, [value]);
29316
- var onChangeInner = function onChangeInner(value, selectedOptions) {
29317
- if (requiredLength && value.length !== requiredLength) return;
29318
- if (needNameAndCode) {
29319
- onChange({
29320
- PCDName: selectedOptions ? selectedOptions.map(function (item) {
29321
- return item.text;
29322
- }) : [],
29323
- PCDCode: selectedOptions ? selectedOptions.map(function (item) {
29324
- return item.value;
29325
- }) : []
29326
- });
29327
- } else if (onlyCode) {
29328
- onChange(selectedOptions ? selectedOptions.map(function (item) {
29329
- return item.value;
29330
- }) : []);
29331
- } else {
29332
- onChange(selectedOptions ? selectedOptions.map(function (item) {
29333
- return item.text;
29334
- }) : []);
29335
- }
29336
- };
29337
- var loadData = function loadData(selectedOptions) {
29338
- var targetOption = selectedOptions[selectedOptions.length - 1];
29339
- targetOption.loading = true;
29340
- request$2({
29341
- url: "/basic/bscArea/getBscAreaList?qp-pid-eq=".concat(targetOption.id),
29342
- method: 'get',
29343
- converter: function converter(_ref3) {
29344
- var data = _ref3.data;
29345
- var initialVal = data ? data.map(function (item) {
29346
- return {
29347
- text: item.name,
29348
- value: item.id,
29349
- label: item.name,
29350
- level: item.level,
29351
- isLeaf: item.level > (isAll ? 2 : 1),
29352
- id: item.id
29353
- };
29354
- }) : [];
29355
- return initialVal;
29356
- }
29357
- }).then(function (res) {
29358
- targetOption.loading = false;
29359
- if (res.length) {
29360
- targetOption.children = res;
29361
- } else {
29362
- targetOption.children = undefined;
29363
- }
29364
- setOptions(_toConsumableArray(options));
29365
- }).catch(function (err) {
29366
- message$1.error('网络错误');
29367
- });
29368
- };
29369
- var filter = function filter(inputValue, path) {
29370
- return path.some(function (option) {
29371
- return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
29372
- });
29373
- };
29374
- var CascaderVal = value;
29375
- if (needNameAndCode) {
29376
- CascaderVal = value ? value.PCDName : value;
29377
- } else if (onlyCode) {
29378
- var _valueSource$map;
29379
- CascaderVal = (valueSource === null || valueSource === void 0 ? void 0 : (_valueSource$map = valueSource.map(function (item) {
29380
- return item.name;
29381
- })) === null || _valueSource$map === void 0 ? void 0 : _valueSource$map.join()) || [];
29382
- }
29383
- var showSearch = !!(options.length && options.length > 5);
29384
- if (disabled) return CascaderVal;
29385
- return /*#__PURE__*/React$1.createElement(Cascader, {
29386
- key: 1,
29387
- style: style,
29388
- disabled: disabled,
29389
- value: CascaderVal,
29390
- options: options,
29391
- loadData: loadData,
29392
- onChange: onChangeInner,
29393
- showSearch: showSearch ? filter : false,
29394
- changeOnSelect: !notChangeOnSelect
29395
- });
29396
- };
29397
-
29398
- var css_248z$t = ".base_rule p {\n margin: 0;\n}\n.base_rule .base_rule_content {\n min-height: 80px;\n margin-bottom: 20px;\n}\n.base_rule .base_rule_line_title {\n position: relative;\n height: 40px;\n}\n.base_rule .base_rule_line_title .rule_title {\n height: 35px;\n padding: 0 10px;\n font-weight: bold;\n font-size: 16px;\n line-height: 35px;\n}\n.base_rule .base_rule_line_title .base_rule_btn_style {\n position: absolute;\n right: 0px;\n}\n.base_rule .base_rule_line_title :global .ant-btn-link {\n color: #008fe0;\n font-weight: bold;\n border: 0px !important;\n}\n.base_rule .base_rule_line_title :global .ant-btn-link:hover,\n.base_rule .base_rule_line_title :global .ant-btn-link:focus {\n color: #008fe0;\n background-color: transparent;\n border: 0px;\n border-color: #008fe0;\n}\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):hover,\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):active,\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):focus {\n color: #008fe0;\n}\n.base_rule .base_rule_line_content {\n display: flex;\n padding: 15px;\n overflow-x: auto;\n}\n.base_rule .base_rule_line_content .base_rule_icon_btn {\n margin-right: 10px;\n color: #89b9cf;\n font-size: 20px;\n}\n.base_rule .base_rule_line_content .base_rule_icon_btn:hover {\n cursor: pointer;\n}\n.base_rule .base_rule_line_content .base_rule_item_desc_content {\n height: 45px;\n line-height: 45px;\n}\n.base_rule .base_rule_line_content .base_rule_item_desc {\n margin-right: 15px;\n}\n.base_rule .base_rule_line_content .base_rule_item1 {\n align-items: center;\n width: 120px;\n color: #f8ab3c;\n font-size: 16px;\n}\n.base_rule .base_rule_line_content .base_rule_item2 {\n width: 75%;\n}\n.base_rule .base_rule_line_content .base_rule_item3 {\n display: flex;\n justify-content: space-around;\n margin-top: -20px;\n padding-left: 20px;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border {\n margin-bottom: 10px;\n padding: 0px 10px 0px 10px;\n border: 1px dashed #d9d9d9;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border .rule_border_title {\n position: relative;\n top: -10px;\n left: 20px;\n width: 90px;\n text-align: center;\n background: #fff;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border .rule_action_item {\n display: flex;\n justify-content: space-between;\n}\n.base_rule .base_rule_line_content .line_color_red {\n color: #ed869b;\n}\n.base_rule .base_rule_line_content .base_rule_item4 {\n width: 80px;\n}\n.base_rule .footer_line > span {\n color: #008fe0;\n font-weight: bold;\n font-size: 16px;\n}\n.rule_name_title {\n display: inline-block;\n height: 30px;\n margin-right: 10px;\n margin-bottom: 10px;\n padding-left: 10px;\n color: #f8ab3c;\n font-size: 16px;\n line-height: 30px;\n}\n.logical_operate_content {\n position: relative;\n}\n.logical_operate_content .top_line {\n position: absolute;\n top: 0;\n left: 50%;\n z-index: 999;\n width: 15px;\n height: 2px;\n background-color: #d6efe8;\n}\n.logical_operate_content .bottom_line {\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 999;\n width: 15px;\n height: 2px;\n background-color: #d6efe8;\n}\n.logical_operate_content::before {\n position: absolute;\n top: 0;\n left: 50%;\n z-index: 998;\n width: 2px;\n height: 100%;\n overflow: hidden;\n background: #d6efe8;\n content: ' ';\n}\n.logical_item_btn {\n position: absolute !important;\n top: 50%;\n left: 50%;\n z-index: 999;\n display: flex !important;\n align-items: center;\n width: 50px;\n height: 30px !important;\n margin-top: -15px;\n margin-left: -25px;\n padding: 0px !important;\n color: #008fe0 !important;\n line-height: 30px !important;\n text-align: center !important;\n background-color: #ffffff !important;\n cursor: pointer !important;\n}\n.logical_item_btn1 {\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 999;\n display: inline-block;\n width: 30px;\n height: 30px;\n margin-left: -15px;\n color: #008fe0;\n line-height: 30px;\n text-align: center;\n background-color: #ffffff;\n cursor: pointer;\n}\n.rule_field_style {\n display: inline-block;\n}\n.icon_btn_style {\n margin-right: 10px;\n font-size: 20px;\n}\n.choose_logical_type {\n height: 25px;\n margin: 0px;\n padding: 0 10px;\n line-height: 25px;\n cursor: pointer;\n}\n.choose_logical_type:first-child {\n border-bottom: 1px solid #d9d9d9;\n}\n.choose_logical_type:hover {\n color: white;\n background-color: #008fe0;\n}\n.action_list_item {\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n padding: 10px;\n border: 1px solid #e1e1f0;\n border-radius: 2px;\n cursor: pointer;\n}\n:global .ant-popover-inner-content {\n padding: 0px;\n}\n";
29399
- styleInject(css_248z$t);
29400
-
29401
- // 查询规则对象属性thresholdList
29402
- function getRegularThresholdRange(_x) {
29403
- return _getRegularThresholdRange.apply(this, arguments);
29404
- }
29405
- function _getRegularThresholdRange() {
29406
- _getRegularThresholdRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
29407
- return _regeneratorRuntime().wrap(function _callee$(_context) {
29408
- while (1) switch (_context.prev = _context.next) {
29409
- case 0:
29410
- return _context.abrupt("return", requestUtil({
29411
- url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
29412
- method: 'POST',
29413
- data: _objectSpread2(_objectSpread2({}, params), {}, {
29414
- queryIdentify: undefined
29415
- })
29416
- }));
29417
- case 1:
29418
- case "end":
29419
- return _context.stop();
29420
- }
29421
- }, _callee);
29422
- }));
29423
- return _getRegularThresholdRange.apply(this, arguments);
29424
- }
29425
-
29426
- //规则对象(属性code)及对应枚举值查询参数 查询URL关系映射
29427
- var queryIdentityInfo = [{
29428
- // identity: 'MO005.member.memberLevelCode', //订单明细-会员-会员等级
29429
- identity: 'memberLevelCode',
29430
- //会员等级
29431
- queryParam: [{
29432
- mapKey: 'memberCardCode',
29433
- isRequired: true,
29434
- queryKey: 'qp-entityCode-eq'
29435
- }]
29436
- }, {
29437
- // identity: 'MO005.member.memberLevelCode', //订单明细-会员-会员等级
29438
- identity: 'member_level_code',
29439
- //会员等级
29440
- queryParam: [{
29441
- mapKey: 'memberCardCode',
29442
- isRequired: true,
29443
- queryKey: 'qp-entityCode-eq'
29444
- }]
29445
- }, {
29446
- identity: 'maintain_store_code',
29447
- //维护店铺
29448
- requestUrl: '/crowdCondition/store',
29449
- //定义需特殊请求枚举值(枚举的请求规则直接和后端开发约定不在规则对象里配置)的请求url
29450
- queryParam: [{
29451
- mapKey: 'memberCardCode',
29452
- isRequired: true,
29453
- queryKey: 'memberCardCode'
29454
- }, {
29455
- mapKey: 'maintain_area_code',
29456
- isRequired: false,
29457
- queryKey: 'areaCodes'
29458
- }]
29459
- }, {
29460
- identity: 'maintain_area_code',
29461
- //维护区域
29462
- requestUrl: '/crowdCondition/area/',
29463
- queryParam: [{
29464
- mapKey: 'memberCardCode',
29465
- isRequired: true,
29466
- queryKey: 'memberCardCode'
29467
- }]
29468
- }];
29469
- var setParams = function setParams(queryIdentify, thresholdQuery) {
29470
- var querParams = {};
29471
- var mapList = queryIdentityInfo.find(function (item) {
29472
- return item.identity == queryIdentify;
29473
- }) ? queryIdentityInfo.find(function (item) {
29474
- return item.identity == queryIdentify;
29475
- }).queryParam : [];
29476
- mapList.length && mapList.forEach(function (item) {
29477
- if (thresholdQuery[item.mapKey]) {
29478
- if (Array.isArray(thresholdQuery[item.mapKey])) {
29479
- var validItems = thresholdQuery[item.mapKey].filter(function (item) {
29480
- return item;
29481
- });
29482
- if (validItems.length) {
29483
- querParams[item.queryKey] = validItems.join(',');
29484
- }
29485
- } else {
29486
- querParams[item.queryKey] = thresholdQuery[item.mapKey];
29487
- }
29488
- }
29489
- });
29490
- return querParams;
29491
- };
29492
-
29493
- //定义规则条件中会影响其他条件项的条件属性code
29494
- var relateItems = [{
29495
- propertyCode: 'memberCardCode'
29496
- }, {
29497
- propertyCode: 'maintain_area_code'
29498
- }];
29499
- var getSpecialPropertyCode = function getSpecialPropertyCode(propertyCode) {
29500
- var SPECIAL_OBJECT_PROPERTY_CODE = [
29501
- //约定属性,需特殊处理查询枚举
29502
- 'maintain_store_code', 'maintain_area_code'];
29503
- if (SPECIAL_OBJECT_PROPERTY_CODE.indexOf(propertyCode) > -1) {
29504
- return propertyCode;
29505
- }
29506
- return '';
29507
- };
29508
- var getPropertyCode = function getPropertyCode(code) {
29509
- //获取规则对象属性code
29510
- if (!code) return '';
29511
- return code.split('.').pop();
29512
- };
29513
- var findChangedThresholdQuery = function findChangedThresholdQuery(oldVal, newVal) {
29514
- var oldKeys = Object.keys(oldVal);
29515
- var newKeys = Object.keys(newVal);
29516
- var compireKeys = _.uniq([].concat(oldKeys, [newKeys]));
29517
- var changedKeys = []; //新 旧参数对象属性值比较,获取值发生改变的属性集合
29518
- compireKeys.forEach(function (key) {
29519
- if (!_.isEqual(oldVal[key], newVal[key])) {
29520
- changedKeys.push(key);
29521
- }
29522
- });
29523
- var shouldUpdateIdentiy = []; //根据发生改变的属性值过滤出需要重新请求枚举的规则属性
29524
- queryIdentityInfo.forEach(function (item) {
29525
- if (item.queryParam.some(function (query) {
29526
- if (changedKeys.indexOf(query.mapKey) > -1) return true;
29527
- return false;
29528
- })) {
29529
- shouldUpdateIdentiy.push(item.identity);
29530
- }
29531
- });
29532
- return shouldUpdateIdentiy;
29533
- };
29534
- var isObj = function isObj(object) {
29535
- return object && _typeof(object) == 'object' && Object.prototype.toString.call(object).toLowerCase() == '[object object]';
29536
- };
29537
- var dateFormat = 'YYYY-MM-DD';
29538
- var fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
29539
-
29540
29233
  // 处理表头
29541
29234
  var getColumnItem = function getColumnItem(_ref) {
29542
29235
  var item = _ref.item;
@@ -30338,6 +30031,352 @@ var CustomSelector = (function (props) {
30338
30031
  })));
30339
30032
  });
30340
30033
 
30034
+ var EllipsisTooltip = /*#__PURE__*/function (_React$Component) {
30035
+ function EllipsisTooltip() {
30036
+ var _this;
30037
+ _classCallCheck(this, EllipsisTooltip);
30038
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30039
+ args[_key] = arguments[_key];
30040
+ }
30041
+ _this = _callSuper(this, EllipsisTooltip, [].concat(args));
30042
+ _this.state = {
30043
+ visible: false
30044
+ };
30045
+ _this.handleVisibleChange = function (visible) {
30046
+ if (_this.props.title.length > _this.props.maxLength) {
30047
+ _this.setState({
30048
+ visible: visible
30049
+ });
30050
+ }
30051
+ };
30052
+ return _this;
30053
+ }
30054
+ _inherits(EllipsisTooltip, _React$Component);
30055
+ return _createClass(EllipsisTooltip, [{
30056
+ key: "render",
30057
+ value: function render() {
30058
+ var style = _objectSpread2({}, this.props.style);
30059
+ return /*#__PURE__*/React$1.createElement(Tooltip, {
30060
+ visible: this.state.visible,
30061
+ onVisibleChange: this.handleVisibleChange,
30062
+ title: this.props.title
30063
+ }, /*#__PURE__*/React$1.createElement("div", {
30064
+ className: "customEllipse",
30065
+ style: style
30066
+ }, this.props.showInfo && this.props.showInfo || (this.props.title.length > this.props.maxLength ? "".concat(this.props.title.substring(0, this.props.maxLength), "...") : this.props.title)));
30067
+ }
30068
+ }]);
30069
+ }(React$1.Component);
30070
+
30071
+ var BsCascader = function BsCascader(_ref) {
30072
+ var source = _ref.source,
30073
+ onChange = _ref.onChange,
30074
+ value = _ref.value,
30075
+ disabled = _ref.disabled,
30076
+ needNameAndCode = _ref.needNameAndCode,
30077
+ onlyCode = _ref.onlyCode,
30078
+ requiredLength = _ref.requiredLength,
30079
+ isAll = _ref.isAll,
30080
+ notChangeOnSelect = _ref.notChangeOnSelect,
30081
+ isFirstOnly = _ref.isFirstOnly,
30082
+ initRequestSource = _ref.initRequestSource,
30083
+ style = _ref.style;
30084
+ if (!source && !initRequestSource) return null;
30085
+ var _useState = useState((source === null || source === void 0 ? void 0 : source.map(function (item) {
30086
+ return _objectSpread2(_objectSpread2({}, item), {}, {
30087
+ label: item.text,
30088
+ isLeaf: false
30089
+ });
30090
+ })) || []),
30091
+ _useState2 = _slicedToArray(_useState, 2),
30092
+ handSource = _useState2[0],
30093
+ setHandSource = _useState2[1];
30094
+ useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
30095
+ var resData, data;
30096
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
30097
+ while (1) switch (_context.prev = _context.next) {
30098
+ case 0:
30099
+ if (!(!source && initRequestSource)) {
30100
+ _context.next = 6;
30101
+ break;
30102
+ }
30103
+ _context.next = 3;
30104
+ return initRequestSource();
30105
+ case 3:
30106
+ resData = _context.sent;
30107
+ data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
30108
+ return _objectSpread2(_objectSpread2({}, item), {}, {
30109
+ label: item.text,
30110
+ isLeaf: false
30111
+ });
30112
+ })) || [];
30113
+ setHandSource(data);
30114
+ case 6:
30115
+ case "end":
30116
+ return _context.stop();
30117
+ }
30118
+ }, _callee);
30119
+ })), []);
30120
+ useEffect(function () {
30121
+ setHandSource((source === null || source === void 0 ? void 0 : source.map(function (item) {
30122
+ return _objectSpread2(_objectSpread2({}, item), {}, {
30123
+ label: item.text,
30124
+ isLeaf: false
30125
+ });
30126
+ })) || []);
30127
+ }, [source]);
30128
+ var _useState3 = useState([]),
30129
+ _useState4 = _slicedToArray(_useState3, 2),
30130
+ valueSource = _useState4[0],
30131
+ setValueSource = _useState4[1];
30132
+ var _React$useState = React$1.useState(handSource),
30133
+ _React$useState2 = _slicedToArray(_React$useState, 2),
30134
+ options = _React$useState2[0],
30135
+ setOptions = _React$useState2[1];
30136
+ if (options && handSource && options.length != handSource.length) {
30137
+ setOptions(handSource);
30138
+ }
30139
+ useEffect(function () {
30140
+ if (value && onlyCode) {
30141
+ if (value === null || value === void 0 ? void 0 : value.length) {
30142
+ request$2({
30143
+ url: "/basic/bscArea/getBscAreaList?qp-code-in=".concat(value),
30144
+ method: 'get'
30145
+ }).then(function (res) {
30146
+ res = res.sort(function (a, b) {
30147
+ return a.level - b.level;
30148
+ });
30149
+ setValueSource(res);
30150
+ });
30151
+ } else {
30152
+ setValueSource([]);
30153
+ }
30154
+ }
30155
+ }, [value]);
30156
+ var onChangeInner = function onChangeInner(value, selectedOptions) {
30157
+ if (requiredLength && value.length !== requiredLength) return;
30158
+ if (needNameAndCode) {
30159
+ onChange({
30160
+ PCDName: selectedOptions ? selectedOptions.map(function (item) {
30161
+ return item.text;
30162
+ }) : [],
30163
+ PCDCode: selectedOptions ? selectedOptions.map(function (item) {
30164
+ return item.value;
30165
+ }) : []
30166
+ });
30167
+ } else if (onlyCode) {
30168
+ onChange(selectedOptions ? selectedOptions.map(function (item) {
30169
+ return item.value;
30170
+ }) : []);
30171
+ } else {
30172
+ onChange(selectedOptions ? selectedOptions.map(function (item) {
30173
+ return item.text;
30174
+ }) : []);
30175
+ }
30176
+ };
30177
+ var loadData = function loadData(selectedOptions) {
30178
+ var targetOption = selectedOptions[selectedOptions.length - 1];
30179
+ targetOption.loading = true;
30180
+ request$2({
30181
+ url: "/basic/bscArea/getBscAreaList?qp-pid-eq=".concat(targetOption.id),
30182
+ method: 'get',
30183
+ converter: function converter(_ref3) {
30184
+ var data = _ref3.data;
30185
+ var initialVal = data ? data.map(function (item) {
30186
+ return {
30187
+ text: item.name,
30188
+ value: item.id,
30189
+ label: item.name,
30190
+ level: item.level,
30191
+ isLeaf: item.level > (isAll ? 2 : 1),
30192
+ id: item.id
30193
+ };
30194
+ }) : [];
30195
+ return initialVal;
30196
+ }
30197
+ }).then(function (res) {
30198
+ targetOption.loading = false;
30199
+ if (res.length) {
30200
+ targetOption.children = res;
30201
+ } else {
30202
+ targetOption.children = undefined;
30203
+ }
30204
+ setOptions(_toConsumableArray(options));
30205
+ }).catch(function (err) {
30206
+ message$1.error('网络错误');
30207
+ });
30208
+ };
30209
+ var filter = function filter(inputValue, path) {
30210
+ return path.some(function (option) {
30211
+ return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
30212
+ });
30213
+ };
30214
+ var CascaderVal = value;
30215
+ if (needNameAndCode) {
30216
+ CascaderVal = value ? value.PCDName : value;
30217
+ } else if (onlyCode) {
30218
+ var _valueSource$map;
30219
+ CascaderVal = (valueSource === null || valueSource === void 0 ? void 0 : (_valueSource$map = valueSource.map(function (item) {
30220
+ return item.name;
30221
+ })) === null || _valueSource$map === void 0 ? void 0 : _valueSource$map.join()) || [];
30222
+ }
30223
+ var showSearch = !!(options.length && options.length > 5);
30224
+ if (disabled) return CascaderVal;
30225
+ return /*#__PURE__*/React$1.createElement(Cascader, {
30226
+ key: 1,
30227
+ style: style,
30228
+ disabled: disabled,
30229
+ value: CascaderVal,
30230
+ options: options,
30231
+ loadData: loadData,
30232
+ onChange: onChangeInner,
30233
+ showSearch: showSearch ? filter : false,
30234
+ changeOnSelect: !notChangeOnSelect
30235
+ });
30236
+ };
30237
+
30238
+ var css_248z$t = ".base_rule p {\n margin: 0;\n}\n.base_rule .base_rule_content {\n min-height: 80px;\n margin-bottom: 20px;\n}\n.base_rule .base_rule_line_title {\n position: relative;\n height: 40px;\n}\n.base_rule .base_rule_line_title .rule_title {\n height: 35px;\n padding: 0 10px;\n font-weight: bold;\n font-size: 16px;\n line-height: 35px;\n}\n.base_rule .base_rule_line_title .base_rule_btn_style {\n position: absolute;\n right: 0px;\n}\n.base_rule .base_rule_line_title :global .ant-btn-link {\n color: #008fe0;\n font-weight: bold;\n border: 0px !important;\n}\n.base_rule .base_rule_line_title :global .ant-btn-link:hover,\n.base_rule .base_rule_line_title :global .ant-btn-link:focus {\n color: #008fe0;\n background-color: transparent;\n border: 0px;\n border-color: #008fe0;\n}\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):hover,\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):active,\n.base_rule .base_rule_line_title :global .ant-btn:not(.ant-btn-primary .ant-btn-danger):focus {\n color: #008fe0;\n}\n.base_rule .base_rule_line_content {\n display: flex;\n padding: 15px;\n overflow-x: auto;\n}\n.base_rule .base_rule_line_content .base_rule_icon_btn {\n margin-right: 10px;\n color: #89b9cf;\n font-size: 20px;\n}\n.base_rule .base_rule_line_content .base_rule_icon_btn:hover {\n cursor: pointer;\n}\n.base_rule .base_rule_line_content .base_rule_item_desc_content {\n height: 45px;\n line-height: 45px;\n}\n.base_rule .base_rule_line_content .base_rule_item_desc {\n margin-right: 15px;\n}\n.base_rule .base_rule_line_content .base_rule_item1 {\n align-items: center;\n width: 120px;\n color: #f8ab3c;\n font-size: 16px;\n}\n.base_rule .base_rule_line_content .base_rule_item2 {\n width: 75%;\n}\n.base_rule .base_rule_line_content .base_rule_item3 {\n display: flex;\n justify-content: space-around;\n margin-top: -20px;\n padding-left: 20px;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border {\n margin-bottom: 10px;\n padding: 0px 10px 0px 10px;\n border: 1px dashed #d9d9d9;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border .rule_border_title {\n position: relative;\n top: -10px;\n left: 20px;\n width: 90px;\n text-align: center;\n background: #fff;\n}\n.base_rule .base_rule_line_content .base_rule_item3 .rule_action_return_border .rule_action_item {\n display: flex;\n justify-content: space-between;\n}\n.base_rule .base_rule_line_content .line_color_red {\n color: #ed869b;\n}\n.base_rule .base_rule_line_content .base_rule_item4 {\n width: 80px;\n}\n.base_rule .footer_line > span {\n color: #008fe0;\n font-weight: bold;\n font-size: 16px;\n}\n.rule_name_title {\n display: inline-block;\n height: 30px;\n margin-right: 10px;\n margin-bottom: 10px;\n padding-left: 10px;\n color: #f8ab3c;\n font-size: 16px;\n line-height: 30px;\n}\n.logical_operate_content {\n position: relative;\n}\n.logical_operate_content .top_line {\n position: absolute;\n top: 0;\n left: 50%;\n z-index: 999;\n width: 15px;\n height: 2px;\n background-color: #d6efe8;\n}\n.logical_operate_content .bottom_line {\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 999;\n width: 15px;\n height: 2px;\n background-color: #d6efe8;\n}\n.logical_operate_content::before {\n position: absolute;\n top: 0;\n left: 50%;\n z-index: 998;\n width: 2px;\n height: 100%;\n overflow: hidden;\n background: #d6efe8;\n content: ' ';\n}\n.logical_item_btn {\n position: absolute !important;\n top: 50%;\n left: 50%;\n z-index: 999;\n display: flex !important;\n align-items: center;\n width: 50px;\n height: 30px !important;\n margin-top: -15px;\n margin-left: -25px;\n padding: 0px !important;\n color: #008fe0 !important;\n line-height: 30px !important;\n text-align: center !important;\n background-color: #ffffff !important;\n cursor: pointer !important;\n}\n.logical_item_btn1 {\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 999;\n display: inline-block;\n width: 30px;\n height: 30px;\n margin-left: -15px;\n color: #008fe0;\n line-height: 30px;\n text-align: center;\n background-color: #ffffff;\n cursor: pointer;\n}\n.rule_field_style {\n display: inline-block;\n}\n.icon_btn_style {\n margin-right: 10px;\n font-size: 20px;\n}\n.choose_logical_type {\n height: 25px;\n margin: 0px;\n padding: 0 10px;\n line-height: 25px;\n cursor: pointer;\n}\n.choose_logical_type:first-child {\n border-bottom: 1px solid #d9d9d9;\n}\n.choose_logical_type:hover {\n color: white;\n background-color: #008fe0;\n}\n.action_list_item {\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n padding: 10px;\n border: 1px solid #e1e1f0;\n border-radius: 2px;\n cursor: pointer;\n}\n:global .ant-popover-inner-content {\n padding: 0px;\n}\n";
30239
+ styleInject(css_248z$t);
30240
+
30241
+ // 查询规则对象属性thresholdList
30242
+ function getRegularThresholdRange(_x) {
30243
+ return _getRegularThresholdRange.apply(this, arguments);
30244
+ }
30245
+ function _getRegularThresholdRange() {
30246
+ _getRegularThresholdRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
30247
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
30248
+ while (1) switch (_context.prev = _context.next) {
30249
+ case 0:
30250
+ return _context.abrupt("return", requestUtil({
30251
+ url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
30252
+ method: 'POST',
30253
+ data: _objectSpread2(_objectSpread2({}, params), {}, {
30254
+ queryIdentify: undefined
30255
+ })
30256
+ }));
30257
+ case 1:
30258
+ case "end":
30259
+ return _context.stop();
30260
+ }
30261
+ }, _callee);
30262
+ }));
30263
+ return _getRegularThresholdRange.apply(this, arguments);
30264
+ }
30265
+
30266
+ //规则对象(属性code)及对应枚举值查询参数 查询URL关系映射
30267
+ var queryIdentityInfo = [{
30268
+ // identity: 'MO005.member.memberLevelCode', //订单明细-会员-会员等级
30269
+ identity: 'memberLevelCode',
30270
+ //会员等级
30271
+ queryParam: [{
30272
+ mapKey: 'memberCardCode',
30273
+ isRequired: true,
30274
+ queryKey: 'qp-entityCode-eq'
30275
+ }]
30276
+ }, {
30277
+ // identity: 'MO005.member.memberLevelCode', //订单明细-会员-会员等级
30278
+ identity: 'member_level_code',
30279
+ //会员等级
30280
+ queryParam: [{
30281
+ mapKey: 'memberCardCode',
30282
+ isRequired: true,
30283
+ queryKey: 'qp-entityCode-eq'
30284
+ }]
30285
+ }, {
30286
+ identity: 'maintain_store_code',
30287
+ //维护店铺
30288
+ requestUrl: '/crowdCondition/store',
30289
+ //定义需特殊请求枚举值(枚举的请求规则直接和后端开发约定不在规则对象里配置)的请求url
30290
+ queryParam: [{
30291
+ mapKey: 'memberCardCode',
30292
+ isRequired: true,
30293
+ queryKey: 'memberCardCode'
30294
+ }, {
30295
+ mapKey: 'maintain_area_code',
30296
+ isRequired: false,
30297
+ queryKey: 'areaCodes'
30298
+ }]
30299
+ }, {
30300
+ identity: 'maintain_area_code',
30301
+ //维护区域
30302
+ requestUrl: '/crowdCondition/area/',
30303
+ queryParam: [{
30304
+ mapKey: 'memberCardCode',
30305
+ isRequired: true,
30306
+ queryKey: 'memberCardCode'
30307
+ }]
30308
+ }];
30309
+ var setParams = function setParams(queryIdentify, thresholdQuery) {
30310
+ var querParams = {};
30311
+ var mapList = queryIdentityInfo.find(function (item) {
30312
+ return item.identity == queryIdentify;
30313
+ }) ? queryIdentityInfo.find(function (item) {
30314
+ return item.identity == queryIdentify;
30315
+ }).queryParam : [];
30316
+ mapList.length && mapList.forEach(function (item) {
30317
+ if (thresholdQuery[item.mapKey]) {
30318
+ if (Array.isArray(thresholdQuery[item.mapKey])) {
30319
+ var validItems = thresholdQuery[item.mapKey].filter(function (item) {
30320
+ return item;
30321
+ });
30322
+ if (validItems.length) {
30323
+ querParams[item.queryKey] = validItems.join(',');
30324
+ }
30325
+ } else {
30326
+ querParams[item.queryKey] = thresholdQuery[item.mapKey];
30327
+ }
30328
+ }
30329
+ });
30330
+ return querParams;
30331
+ };
30332
+
30333
+ //定义规则条件中会影响其他条件项的条件属性code
30334
+ var relateItems = [{
30335
+ propertyCode: 'memberCardCode'
30336
+ }, {
30337
+ propertyCode: 'maintain_area_code'
30338
+ }];
30339
+ var getSpecialPropertyCode = function getSpecialPropertyCode(propertyCode) {
30340
+ var SPECIAL_OBJECT_PROPERTY_CODE = [
30341
+ //约定属性,需特殊处理查询枚举
30342
+ 'maintain_store_code', 'maintain_area_code'];
30343
+ if (SPECIAL_OBJECT_PROPERTY_CODE.indexOf(propertyCode) > -1) {
30344
+ return propertyCode;
30345
+ }
30346
+ return '';
30347
+ };
30348
+ var getPropertyCode = function getPropertyCode(code) {
30349
+ //获取规则对象属性code
30350
+ if (!code) return '';
30351
+ return code.split('.').pop();
30352
+ };
30353
+ var findChangedThresholdQuery = function findChangedThresholdQuery(oldVal, newVal) {
30354
+ var oldKeys = Object.keys(oldVal);
30355
+ var newKeys = Object.keys(newVal);
30356
+ var compireKeys = _.uniq([].concat(oldKeys, [newKeys]));
30357
+ var changedKeys = []; //新 旧参数对象属性值比较,获取值发生改变的属性集合
30358
+ compireKeys.forEach(function (key) {
30359
+ if (!_.isEqual(oldVal[key], newVal[key])) {
30360
+ changedKeys.push(key);
30361
+ }
30362
+ });
30363
+ var shouldUpdateIdentiy = []; //根据发生改变的属性值过滤出需要重新请求枚举的规则属性
30364
+ queryIdentityInfo.forEach(function (item) {
30365
+ if (item.queryParam.some(function (query) {
30366
+ if (changedKeys.indexOf(query.mapKey) > -1) return true;
30367
+ return false;
30368
+ })) {
30369
+ shouldUpdateIdentiy.push(item.identity);
30370
+ }
30371
+ });
30372
+ return shouldUpdateIdentiy;
30373
+ };
30374
+ var isObj = function isObj(object) {
30375
+ return object && _typeof(object) == 'object' && Object.prototype.toString.call(object).toLowerCase() == '[object object]';
30376
+ };
30377
+ var dateFormat = 'YYYY-MM-DD';
30378
+ var fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
30379
+
30341
30380
  var RangePicker = DatePicker.RangePicker;
30342
30381
  var RuleField = /*#__PURE__*/function (_Component) {
30343
30382
  function RuleField(props) {
@@ -36430,4 +36469,4 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
36430
36469
  })));
36431
36470
  });
36432
36471
 
36433
- export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect, authFunc, calculateValidPeriod, checkQuantityAccuracy, createUniqID, downloadExcel, ergodicMenuRoutes, formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleConvertResponse, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, noEmptyArray, paramsControl, parseWidth, precisionQuantity, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };
36472
+ export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, CustomSelector, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect, authFunc, calculateValidPeriod, checkQuantityAccuracy, createUniqID, downloadExcel, ergodicMenuRoutes, formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleConvertResponse, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, noEmptyArray, paramsControl, parseWidth, precisionQuantity, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };