@kmkf-fe-packages/services-components 0.7.15-alpha.7 → 0.7.15-alpha.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -21
  2. package/dist/esm/commonComponents/ShopList/index.d.ts +1 -1
  3. package/dist/esm/commonComponents/ShopList/index.js +4 -2
  4. package/dist/esm/components/ActualPayment/index.d.ts +5 -4
  5. package/dist/esm/components/ActualPayment/index.js +25 -21
  6. package/dist/esm/components/AlipayAccount/index.js +2 -1
  7. package/dist/esm/components/BS/BsExchange/index.d.ts +12 -6
  8. package/dist/esm/components/BS/BsExchange/index.js +233 -111
  9. package/dist/esm/components/BS/BsGoods/index.d.ts +11 -9
  10. package/dist/esm/components/BS/BsGoods/index.js +93 -60
  11. package/dist/esm/components/BS/BsReissue/index.d.ts +17 -6
  12. package/dist/esm/components/BS/BsReissue/index.js +110 -54
  13. package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderCode.d.ts} +5 -4
  14. package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderCode.js} +28 -11
  15. package/dist/esm/components/BS/common/BsHeaderGood.d.ts +27 -0
  16. package/dist/esm/components/BS/common/BsHeaderGood.js +156 -0
  17. package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
  18. package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +28 -11
  19. package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
  20. package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +29 -11
  21. package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderNumber.d.ts} +5 -4
  22. package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderNumber.js} +28 -11
  23. package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +7 -6
  24. package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +36 -10
  25. package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
  26. package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +28 -11
  27. package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
  28. package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +28 -11
  29. package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
  30. package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +28 -11
  31. package/dist/esm/components/BS/common/BsMemo.d.ts +8 -7
  32. package/dist/esm/components/BS/common/BsMemo.js +55 -21
  33. package/dist/esm/components/BS/common/BsType.d.ts +8 -6
  34. package/dist/esm/components/BS/common/BsType.js +53 -17
  35. package/dist/esm/components/BS/common/index.d.ts +9 -8
  36. package/dist/esm/components/BS/common/index.js +9 -8
  37. package/dist/esm/components/BuyerNick/index.js +5 -1
  38. package/dist/esm/components/Cascader/index.d.ts +1 -0
  39. package/dist/esm/components/Cascader/index.js +3 -1
  40. package/dist/esm/components/Common/index.d.ts +7 -2
  41. package/dist/esm/components/Common/index.js +176 -78
  42. package/dist/esm/components/EItemEnCode/index.js +6 -2
  43. package/dist/esm/components/EItemId/index.d.ts +3 -3
  44. package/dist/esm/components/EItemId/index.js +14 -10
  45. package/dist/esm/components/EItemSelect/index.js +6 -2
  46. package/dist/esm/components/ErpTradeId/index.d.ts +2 -1
  47. package/dist/esm/components/ErpTradeId/index.js +27 -4
  48. package/dist/esm/components/ExpressCode/index.d.ts +1 -1
  49. package/dist/esm/components/ExpressCode/index.js +2 -2
  50. package/dist/esm/components/File/index.d.ts +1 -1
  51. package/dist/esm/components/File/index.js +26 -5
  52. package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
  53. package/dist/esm/components/FlowStatusSelect/index.js +30 -24
  54. package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
  55. package/dist/esm/components/FlowWorkOrderId/index.js +112 -0
  56. package/dist/esm/components/JST/JstItemSelect/index.js +6 -2
  57. package/dist/esm/components/JST/JstLogistics/index.d.ts +19 -13
  58. package/dist/esm/components/JST/JstLogistics/index.js +71 -33
  59. package/dist/esm/components/JST/JstSendGood/index.d.ts +10 -4
  60. package/dist/esm/components/JST/JstSendGood/index.js +33 -19
  61. package/dist/esm/components/JST/JstSupply/index.js +6 -2
  62. package/dist/esm/components/LogisticsInterception/InterceptStatus.js +5 -1
  63. package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
  64. package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
  65. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +11 -6
  66. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
  67. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
  68. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
  69. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
  70. package/dist/esm/components/Payment/AlipayNick.js +2 -1
  71. package/dist/esm/components/Payment/AlipayNo.js +2 -1
  72. package/dist/esm/components/Payment/BuyerNick.js +6 -3
  73. package/dist/esm/components/Payment/index.d.ts +1 -0
  74. package/dist/esm/components/Payment/index.js +9 -6
  75. package/dist/esm/components/Picture/index.js +3 -0
  76. package/dist/esm/components/PostIng/index.d.ts +1 -24
  77. package/dist/esm/components/PostIng/index.js +53 -52
  78. package/dist/esm/components/Rate/index.js +5 -1
  79. package/dist/esm/components/ReceiverAddress/index.js +2 -1
  80. package/dist/esm/components/ReceiverMobile/index.js +2 -1
  81. package/dist/esm/components/ReceiverName/index.js +2 -1
  82. package/dist/esm/components/ThirdItemSelect/index.js +6 -2
  83. package/dist/esm/components/TradeDateTime/index.d.ts +6 -14
  84. package/dist/esm/components/TradeDateTime/index.js +30 -25
  85. package/dist/esm/components/TradeId/index.d.ts +1 -0
  86. package/dist/esm/components/TradeId/index.js +27 -4
  87. package/dist/esm/components/WorkOrderId/index.js +5 -3
  88. package/dist/esm/factory.d.ts +2 -2
  89. package/dist/esm/factory.js +6 -3
  90. package/dist/esm/index.d.ts +1 -1
  91. package/dist/esm/index.js +1 -1
  92. package/dist/esm/type.d.ts +10 -2
  93. package/package.json +4 -4
  94. package/dist/esm/components/BS/BsLogistics/index.d.ts +0 -50
  95. package/dist/esm/components/BS/BsLogistics/index.js +0 -115
  96. package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
  97. package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
  98. package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
  99. package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
@@ -0,0 +1,156 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
+ import React from 'react';
21
+ import ItemView from "../../../commonComponents/ItemView";
22
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
23
+ import { BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "./index";
24
+ var HeaderMap = {
25
+ pic: {
26
+ component: BsHeaderPic,
27
+ name: '图片',
28
+ key: 'pic'
29
+ },
30
+ name: {
31
+ component: BsHeaderName,
32
+ name: '名称',
33
+ key: 'name'
34
+ },
35
+ code: {
36
+ component: BsHeaderCode,
37
+ name: '编码',
38
+ key: 'code'
39
+ },
40
+ sku: {
41
+ component: BsHeaderSku,
42
+ name: 'sku编码',
43
+ key: 'sku'
44
+ },
45
+ money: {
46
+ component: BsHeaderMoney,
47
+ name: '实付金额',
48
+ key: 'money'
49
+ },
50
+ number: {
51
+ component: BsHeaderNumber,
52
+ name: '数量',
53
+ key: 'number'
54
+ },
55
+ share: {
56
+ component: BsHeaderShare,
57
+ name: '分摊价',
58
+ key: 'share'
59
+ },
60
+ type: {
61
+ component: BsHeaderType,
62
+ name: '赠品类型',
63
+ key: 'giftType'
64
+ }
65
+ };
66
+ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
67
+ var _this = this,
68
+ _options$componentCon;
69
+ _classCallCheck(this, BsHeaderGods);
70
+ _defineProperty(this, "name", void 0);
71
+ _defineProperty(this, "id", void 0);
72
+ _defineProperty(this, "sortField", void 0);
73
+ _defineProperty(this, "type", void 0);
74
+ _defineProperty(this, "componentConfig", void 0);
75
+ _defineProperty(this, "align", void 0);
76
+ _defineProperty(this, "width", void 0);
77
+ _defineProperty(this, "isCombinationComponent", void 0);
78
+ _defineProperty(this, "formField", void 0);
79
+ _defineProperty(this, "canSort", void 0);
80
+ _defineProperty(this, "children", void 0);
81
+ _defineProperty(this, "dataType", void 0);
82
+ _defineProperty(this, "itemKey", void 0);
83
+ _defineProperty(this, "getParentId", function () {
84
+ var _this$id$split = _this.id.split('_'),
85
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
86
+ key = _this$id$split2[0],
87
+ name = _this$id$split2[1],
88
+ code = _this$id$split2[2];
89
+ return "".concat(key, "_").concat(name);
90
+ });
91
+ _defineProperty(this, "renderClient", function (record) {
92
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
93
+ id: _this.id,
94
+ label: _this.name,
95
+ value: _this.getComponentValue(record)
96
+ }) : null;
97
+ });
98
+ _defineProperty(this, "renderPc", function (value, record) {
99
+ var _this$getComponentVal;
100
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
101
+ });
102
+ _defineProperty(this, "renderLog", function (r) {
103
+ var id = _this.getParentId();
104
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
105
+ return _this.renderPc(undefined, r);
106
+ });
107
+ _defineProperty(this, "getComponentValue", function (r) {
108
+ var id = _this.getParentId();
109
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
110
+ next['money'] && prv.push(next['money']);
111
+ return prv;
112
+ }, []);
113
+ return list.join(',');
114
+ });
115
+ _defineProperty(this, "renderExport", function (value, record) {
116
+ var _this$getComponentVal2;
117
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
118
+ });
119
+ _defineProperty(this, "editRender", function () {
120
+ return null;
121
+ });
122
+ _defineProperty(this, "filterConfig", function () {
123
+ return [];
124
+ });
125
+ this.name = options.name;
126
+ this.id = options.id;
127
+ this.sortField = options.id;
128
+ this.formField = options.id;
129
+ this.type = options.type;
130
+ this.componentConfig = options.componentConfig;
131
+ this.align = 'left';
132
+ this.width = 200;
133
+ this.isCombinationComponent = true;
134
+ this.canSort = false;
135
+ this.dataType = 'string';
136
+ this.itemKey = {
137
+ pic: '图片',
138
+ name: '名称',
139
+ code: '编码',
140
+ sku: 'sku编码',
141
+ money: '实付金额',
142
+ number: '数量',
143
+ share: '分摊价',
144
+ type: '赠品类型'
145
+ };
146
+ this.children = _toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
147
+ if (HeaderMap[next]) {
148
+ prv.push(new HeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
149
+ name: _this.itemKey[next],
150
+ id: "".concat(options.id, "_").concat(HeaderMap[next].key)
151
+ })));
152
+ }
153
+ return prv;
154
+ }, []));
155
+ });
156
+ export default BsHeaderGods;
@@ -1,19 +1,20 @@
1
- import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
3
  declare class BsChildMoney implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface["componentConfig"];
8
+ componentConfig: ComponentInterface['componentConfig'];
9
9
  align: ALignType;
10
10
  width: number;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
+ getParentId: () => string;
17
18
  renderClient: (record: any) => React.JSX.Element | null;
18
19
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
20
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,13 +1,19 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from "react";
14
+ import React from 'react';
9
15
  import ItemView from "../../../commonComponents/ItemView";
10
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
17
  var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
12
18
  var _this = this;
13
19
  _classCallCheck(this, BsChildMoney);
@@ -23,6 +29,14 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
23
29
  _defineProperty(this, "canSort", void 0);
24
30
  _defineProperty(this, "children", void 0);
25
31
  _defineProperty(this, "dataType", void 0);
32
+ _defineProperty(this, "getParentId", function () {
33
+ var _this$id$split = _this.id.split('_'),
34
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
35
+ key = _this$id$split2[0],
36
+ name = _this$id$split2[1],
37
+ code = _this$id$split2[2];
38
+ return "".concat(key, "_").concat(name);
39
+ });
26
40
  _defineProperty(this, "renderClient", function (record) {
27
41
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
28
42
  id: _this.id,
@@ -32,22 +46,25 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
32
46
  });
33
47
  _defineProperty(this, "renderPc", function (value, record) {
34
48
  var _this$getComponentVal;
35
- return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
49
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
36
50
  });
37
51
  _defineProperty(this, "renderLog", function (r) {
38
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
52
+ var id = _this.getParentId();
53
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
39
54
  return _this.renderPc(undefined, r);
40
55
  });
41
56
  _defineProperty(this, "getComponentValue", function (r) {
42
- var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
43
- next["money"] && prv.push(next["money"]);
57
+ return r === null || r === void 0 ? void 0 : r[_this.id];
58
+ var id = _this.getParentId();
59
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
60
+ next['money'] && prv.push(next['money']);
44
61
  return prv;
45
62
  }, []);
46
- return list.join(",");
63
+ return list.join(',');
47
64
  });
48
65
  _defineProperty(this, "renderExport", function (value, record) {
49
66
  var _this$getComponentVal2;
50
- return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
67
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
51
68
  });
52
69
  _defineProperty(this, "editRender", function () {
53
70
  return null;
@@ -61,11 +78,11 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
61
78
  this.formField = options.id;
62
79
  this.type = options.type;
63
80
  this.componentConfig = options.componentConfig;
64
- this.align = "left";
81
+ this.align = 'left';
65
82
  this.width = 200;
66
83
  this.isCombinationComponent = false;
67
- this.canSort = true;
68
- this.dataType = "string";
84
+ this.canSort = false;
85
+ this.dataType = 'string';
69
86
  this.children = [];
70
87
  });
71
88
  export default BsChildMoney;
@@ -1,19 +1,20 @@
1
- import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
3
  declare class BsChildName implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface["componentConfig"];
8
+ componentConfig: ComponentInterface['componentConfig'];
9
9
  align: ALignType;
10
10
  width: number;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
+ getParentId: () => string;
17
18
  renderClient: (record: any) => React.JSX.Element | null;
18
19
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
20
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,13 +1,19 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from "react";
14
+ import React from 'react';
9
15
  import ItemView from "../../../commonComponents/ItemView";
10
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
17
  var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
12
18
  var _this = this;
13
19
  _classCallCheck(this, BsChildName);
@@ -23,6 +29,14 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
23
29
  _defineProperty(this, "canSort", void 0);
24
30
  _defineProperty(this, "children", void 0);
25
31
  _defineProperty(this, "dataType", void 0);
32
+ _defineProperty(this, "getParentId", function () {
33
+ var _this$id$split = _this.id.split('_'),
34
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
35
+ key = _this$id$split2[0],
36
+ name = _this$id$split2[1],
37
+ code = _this$id$split2[2];
38
+ return "".concat(key, "_").concat(name);
39
+ });
26
40
  _defineProperty(this, "renderClient", function (record) {
27
41
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
28
42
  id: _this.id,
@@ -32,22 +46,26 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
32
46
  });
33
47
  _defineProperty(this, "renderPc", function (value, record) {
34
48
  var _this$getComponentVal;
35
- return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
49
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
36
50
  });
37
51
  _defineProperty(this, "renderLog", function (r) {
38
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
52
+ var id = _this.getParentId();
53
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
39
54
  return _this.renderPc(undefined, r);
40
55
  });
41
56
  _defineProperty(this, "getComponentValue", function (r) {
42
- var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
43
- next["name"] && prv.push(next["name"]);
57
+ return r === null || r === void 0 ? void 0 : r[_this.id];
58
+ var id = _this.getParentId();
59
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
60
+ next['name'] && prv.push(next['name']);
44
61
  return prv;
45
62
  }, []);
46
- return list.join(",");
63
+ return list.join(',');
47
64
  });
48
65
  _defineProperty(this, "renderExport", function (value, record) {
49
66
  var _this$getComponentVal2;
50
- return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
67
+ console.log('renderExport', record, _this.id, _this.getComponentValue(record));
68
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
51
69
  });
52
70
  _defineProperty(this, "editRender", function () {
53
71
  return null;
@@ -61,11 +79,11 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
61
79
  this.formField = options.id;
62
80
  this.type = options.type;
63
81
  this.componentConfig = options.componentConfig;
64
- this.align = "left";
82
+ this.align = 'left';
65
83
  this.width = 200;
66
84
  this.isCombinationComponent = false;
67
- this.canSort = true;
68
- this.dataType = "string";
85
+ this.canSort = false;
86
+ this.dataType = 'string';
69
87
  this.children = [];
70
88
  });
71
89
  export default BsChildName;
@@ -1,19 +1,20 @@
1
- import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
3
  declare class BsChildCode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface["componentConfig"];
8
+ componentConfig: ComponentInterface['componentConfig'];
9
9
  align: ALignType;
10
10
  width: number;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
+ getParentId: () => string;
17
18
  renderClient: (record: any) => React.JSX.Element | null;
18
19
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
20
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,13 +1,19 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from "react";
14
+ import React from 'react';
9
15
  import ItemView from "../../../commonComponents/ItemView";
10
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
17
  var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
12
18
  var _this = this;
13
19
  _classCallCheck(this, BsChildCode);
@@ -23,6 +29,14 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
23
29
  _defineProperty(this, "canSort", void 0);
24
30
  _defineProperty(this, "children", void 0);
25
31
  _defineProperty(this, "dataType", void 0);
32
+ _defineProperty(this, "getParentId", function () {
33
+ var _this$id$split = _this.id.split('_'),
34
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
35
+ key = _this$id$split2[0],
36
+ name = _this$id$split2[1],
37
+ code = _this$id$split2[2];
38
+ return "".concat(key, "_").concat(name);
39
+ });
26
40
  _defineProperty(this, "renderClient", function (record) {
27
41
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
28
42
  id: _this.id,
@@ -32,22 +46,25 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
32
46
  });
33
47
  _defineProperty(this, "renderPc", function (value, record) {
34
48
  var _this$getComponentVal;
35
- return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
49
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
36
50
  });
37
51
  _defineProperty(this, "renderLog", function (r) {
38
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
52
+ var id = _this.getParentId();
53
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
39
54
  return _this.renderPc(undefined, r);
40
55
  });
41
56
  _defineProperty(this, "getComponentValue", function (r) {
42
- var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
43
- next["code"] && prv.push(next["code"]);
57
+ return r === null || r === void 0 ? void 0 : r[_this.id];
58
+ var id = _this.getParentId();
59
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
60
+ next['number'] && prv.push(next['number']);
44
61
  return prv;
45
62
  }, []);
46
- return list.join(",");
63
+ return list.join(',');
47
64
  });
48
65
  _defineProperty(this, "renderExport", function (value, record) {
49
66
  var _this$getComponentVal2;
50
- return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
67
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
51
68
  });
52
69
  _defineProperty(this, "editRender", function () {
53
70
  return null;
@@ -61,11 +78,11 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
61
78
  this.formField = options.id;
62
79
  this.type = options.type;
63
80
  this.componentConfig = options.componentConfig;
64
- this.align = "left";
81
+ this.align = 'left';
65
82
  this.width = 200;
66
83
  this.isCombinationComponent = false;
67
- this.canSort = true;
68
- this.dataType = "string";
84
+ this.canSort = false;
85
+ this.dataType = 'string';
69
86
  this.children = [];
70
87
  });
71
88
  export default BsChildCode;
@@ -1,22 +1,23 @@
1
- import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
3
  declare class BsChildPic implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface["componentConfig"];
8
+ componentConfig: ComponentInterface['componentConfig'];
9
9
  align: ALignType;
10
10
  width: number;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
+ getParentId: () => string;
17
18
  renderClient: (record: any) => React.JSX.Element | null;
18
- renderPc: (value: unknown, record: Record) => React.JSX.Element[];
19
- renderLog: (r: Record) => React.JSX.Element[] | null;
19
+ renderPc: (value: unknown, record: Record) => React.JSX.Element | React.JSX.Element[];
20
+ renderLog: (r: Record) => React.JSX.Element | React.JSX.Element[] | null;
20
21
  getComponentValue: (r: Record) => any;
21
22
  renderExport: (value: string, record: Record) => any;
22
23
  editRender: () => null;
@@ -1,14 +1,21 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from "react";
14
+ import React from 'react';
15
+ import { Image } from 'antd';
9
16
  import ItemView from "../../../commonComponents/ItemView";
10
17
  import { BsGoodPic } from "../../Common";
11
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
18
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
12
19
  var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
13
20
  var _this = this;
14
21
  _classCallCheck(this, BsChildPic);
@@ -24,6 +31,14 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
24
31
  _defineProperty(this, "canSort", void 0);
25
32
  _defineProperty(this, "children", void 0);
26
33
  _defineProperty(this, "dataType", void 0);
34
+ _defineProperty(this, "getParentId", function () {
35
+ var _this$id$split = _this.id.split('_'),
36
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
37
+ key = _this$id$split2[0],
38
+ name = _this$id$split2[1],
39
+ code = _this$id$split2[2];
40
+ return "".concat(key, "_").concat(name);
41
+ });
27
42
  _defineProperty(this, "renderClient", function (record) {
28
43
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
29
44
  id: _this.id,
@@ -33,22 +48,33 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
33
48
  });
34
49
  _defineProperty(this, "renderPc", function (value, record) {
35
50
  var _BsGoodPic;
36
- return (_BsGoodPic = BsGoodPic(_this.getComponentValue(record))) !== null && _BsGoodPic !== void 0 ? _BsGoodPic : "--";
51
+ return /*#__PURE__*/React.createElement("span", {
52
+ onClick: function onClick(e) {
53
+ return e.stopPropagation();
54
+ }
55
+ }, /*#__PURE__*/React.createElement(Image, {
56
+ width: 60,
57
+ src: _this.getComponentValue(record)
58
+ }));
59
+ return (_BsGoodPic = BsGoodPic(_this.getComponentValue(record))) !== null && _BsGoodPic !== void 0 ? _BsGoodPic : '--';
37
60
  });
38
61
  _defineProperty(this, "renderLog", function (r) {
39
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
62
+ var id = _this.getParentId();
63
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
40
64
  return _this.renderPc(undefined, r);
41
65
  });
42
66
  _defineProperty(this, "getComponentValue", function (r) {
43
- var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
44
- next["pic"] && prv.push(next["pic"]);
67
+ return r === null || r === void 0 ? void 0 : r[_this.id];
68
+ var id = _this.getParentId();
69
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
70
+ next['pic'] && prv.push(next['pic']);
45
71
  return prv;
46
72
  }, []);
47
73
  return list;
48
74
  });
49
75
  _defineProperty(this, "renderExport", function (value, record) {
50
76
  var _this$getComponentVal;
51
- return (_this$getComponentVal = _this.getComponentValue(record).join(",")) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
77
+ return (_this$getComponentVal = _this.getComponentValue(record).join(',')) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
52
78
  });
53
79
  _defineProperty(this, "editRender", function () {
54
80
  return null;
@@ -62,11 +88,11 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
62
88
  this.formField = options.id;
63
89
  this.type = options.type;
64
90
  this.componentConfig = options.componentConfig;
65
- this.align = "left";
91
+ this.align = 'left';
66
92
  this.width = 200;
67
93
  this.isCombinationComponent = false;
68
- this.canSort = true;
69
- this.dataType = "string";
94
+ this.canSort = false;
95
+ this.dataType = 'string';
70
96
  this.children = [];
71
97
  });
72
98
  export default BsChildPic;