@kmkf-fe-packages/services-components 0.6.3 → 0.7.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.
Files changed (159) hide show
  1. package/README.md +2 -0
  2. package/dist/esm/commonComponents/ItemView/index.d.ts +3 -3
  3. package/dist/esm/commonComponents/OperationLog/index.d.ts +9 -0
  4. package/dist/esm/commonComponents/OperationLog/index.js +127 -0
  5. package/dist/esm/commonComponents/PlatBuyer/index.d.ts +2 -2
  6. package/dist/esm/commonComponents/PlatformAvatar/index.d.ts +7 -0
  7. package/dist/esm/commonComponents/PlatformAvatar/index.js +28 -0
  8. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +9 -0
  9. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +92 -0
  10. package/dist/esm/commonComponents/ShopList/index.d.ts +13 -0
  11. package/dist/esm/commonComponents/ShopList/index.js +34 -0
  12. package/dist/esm/commonComponents/Wangwang/index.d.ts +2 -2
  13. package/dist/esm/components/ActualPayment/index.d.ts +15 -16
  14. package/dist/esm/components/ActualPayment/index.js +28 -26
  15. package/dist/esm/components/Address/index.d.ts +12 -19
  16. package/dist/esm/components/Address/index.js +17 -26
  17. package/dist/esm/components/Alipay/index.d.ts +18 -22
  18. package/dist/esm/components/Alipay/index.js +15 -20
  19. package/dist/esm/components/AlipayAccount/index.d.ts +15 -17
  20. package/dist/esm/components/AlipayAccount/index.js +29 -28
  21. package/dist/esm/components/AlipayName/index.d.ts +15 -17
  22. package/dist/esm/components/AlipayName/index.js +29 -28
  23. package/dist/esm/components/BuyerNick/index.d.ts +18 -19
  24. package/dist/esm/components/BuyerNick/index.js +41 -28
  25. package/dist/esm/components/Cascader/index.d.ts +16 -28
  26. package/dist/esm/components/Cascader/index.js +38 -31
  27. package/dist/esm/components/Checkbox/index.d.ts +19 -15
  28. package/dist/esm/components/Checkbox/index.js +45 -26
  29. package/dist/esm/components/Common/index.d.ts +5 -5
  30. package/dist/esm/components/CommonDataTime/index.d.ts +14 -14
  31. package/dist/esm/components/CommonDataTime/index.js +27 -24
  32. package/dist/esm/components/CompletedUser/index.d.ts +30 -0
  33. package/dist/esm/components/CompletedUser/index.js +64 -0
  34. package/dist/esm/components/DataTime/ApaasDate.d.ts +2 -2
  35. package/dist/esm/components/DataTime/index.d.ts +17 -16
  36. package/dist/esm/components/DataTime/index.js +30 -26
  37. package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
  38. package/dist/esm/components/EItemEnCode/index.d.ts +15 -15
  39. package/dist/esm/components/EItemEnCode/index.js +34 -27
  40. package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
  41. package/dist/esm/components/EItemId/index.d.ts +15 -15
  42. package/dist/esm/components/EItemId/index.js +34 -27
  43. package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
  44. package/dist/esm/components/EItemSelect/index.d.ts +10 -16
  45. package/dist/esm/components/EItemSelect/index.js +16 -24
  46. package/dist/esm/components/ErpTradeId/index.d.ts +15 -16
  47. package/dist/esm/components/ErpTradeId/index.js +28 -26
  48. package/dist/esm/components/Express/index.d.ts +18 -20
  49. package/dist/esm/components/Express/index.js +30 -36
  50. package/dist/esm/components/ExpressCode/index.d.ts +16 -18
  51. package/dist/esm/components/ExpressCode/index.js +34 -32
  52. package/dist/esm/components/ExpressCompany/index.d.ts +2 -2
  53. package/dist/esm/components/FlowStatusSelect/index.d.ts +20 -38
  54. package/dist/esm/components/FlowStatusSelect/index.js +38 -25
  55. package/dist/esm/components/GetFormItem/index.d.ts +3 -3
  56. package/dist/esm/components/GetFormItem/index.js +3 -3
  57. package/dist/esm/components/Grade/index.d.ts +10 -16
  58. package/dist/esm/components/Grade/index.js +14 -23
  59. package/dist/esm/components/Handler/index.d.ts +32 -0
  60. package/dist/esm/components/Handler/index.js +74 -0
  61. package/dist/esm/components/Input/index.d.ts +15 -16
  62. package/dist/esm/components/Input/index.js +29 -28
  63. package/dist/esm/components/JstItemSelect/index.d.ts +17 -17
  64. package/dist/esm/components/JstItemSelect/index.js +48 -28
  65. package/dist/esm/components/JstLogistics/index.d.ts +25 -17
  66. package/dist/esm/components/JstLogistics/index.js +50 -29
  67. package/dist/esm/components/JstSendGood/index.d.ts +16 -16
  68. package/dist/esm/components/JstSendGood/index.js +54 -29
  69. package/dist/esm/components/JstSupply/index.d.ts +16 -16
  70. package/dist/esm/components/JstSupply/index.js +54 -29
  71. package/dist/esm/components/Logistics/index.d.ts +26 -30
  72. package/dist/esm/components/Logistics/index.js +19 -20
  73. package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +33 -0
  74. package/dist/esm/components/LogisticsInterception/InterceptAddress.js +134 -0
  75. package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +38 -0
  76. package/dist/esm/components/LogisticsInterception/InterceptStatus.js +102 -0
  77. package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +36 -0
  78. package/dist/esm/components/LogisticsInterception/InterceptType.js +84 -0
  79. package/dist/esm/components/LogisticsInterception/columnHeader.d.ts +5 -0
  80. package/dist/esm/components/LogisticsInterception/columnHeader.js +55 -0
  81. package/dist/esm/components/LogisticsInterception/index.d.ts +74 -0
  82. package/dist/esm/components/LogisticsInterception/index.js +133 -0
  83. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.d.ts +30 -0
  84. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +74 -0
  85. package/dist/esm/components/MultSelect/index.d.ts +16 -16
  86. package/dist/esm/components/MultSelect/index.js +31 -24
  87. package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +14 -25
  88. package/dist/esm/components/Ordinary/OrdinaryHeader.js +26 -32
  89. package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +14 -25
  90. package/dist/esm/components/Ordinary/OrdinaryMoney.js +25 -31
  91. package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +14 -20
  92. package/dist/esm/components/Ordinary/OrdinarySerial.js +26 -22
  93. package/dist/esm/components/Ordinary/index.d.ts +19 -26
  94. package/dist/esm/components/Ordinary/index.js +20 -12
  95. package/dist/esm/components/OrdinaryHeader/index.d.ts +2 -2
  96. package/dist/esm/components/Payment/AlipayNick.d.ts +14 -25
  97. package/dist/esm/components/Payment/AlipayNick.js +29 -34
  98. package/dist/esm/components/Payment/AlipayNo.d.ts +14 -24
  99. package/dist/esm/components/Payment/AlipayNo.js +29 -34
  100. package/dist/esm/components/Payment/AlipayTime.d.ts +14 -26
  101. package/dist/esm/components/Payment/AlipayTime.js +26 -35
  102. package/dist/esm/components/Payment/BuyerNick.d.ts +14 -25
  103. package/dist/esm/components/Payment/BuyerNick.js +26 -32
  104. package/dist/esm/components/Payment/PaymentAmount.d.ts +14 -25
  105. package/dist/esm/components/Payment/PaymentAmount.js +24 -30
  106. package/dist/esm/components/Payment/PaymentStatus.d.ts +19 -31
  107. package/dist/esm/components/Payment/PaymentStatus.js +48 -41
  108. package/dist/esm/components/Payment/PaymentTid.d.ts +14 -25
  109. package/dist/esm/components/Payment/PaymentTid.js +24 -30
  110. package/dist/esm/components/Payment/index.d.ts +39 -100
  111. package/dist/esm/components/Payment/index.js +22 -20
  112. package/dist/esm/components/Picture/index.d.ts +15 -15
  113. package/dist/esm/components/Picture/index.js +14 -19
  114. package/dist/esm/components/PlatForm/index.d.ts +31 -0
  115. package/dist/esm/components/PlatForm/index.js +67 -0
  116. package/dist/esm/components/Popover/index.d.ts +2 -2
  117. package/dist/esm/components/Radio/index.d.ts +20 -15
  118. package/dist/esm/components/Radio/index.js +34 -20
  119. package/dist/esm/components/Rate/index.d.ts +11 -16
  120. package/dist/esm/components/Rate/index.js +17 -30
  121. package/dist/esm/components/ReceiverAddress/index.d.ts +14 -17
  122. package/dist/esm/components/ReceiverAddress/index.js +22 -29
  123. package/dist/esm/components/ReceiverMobile/index.d.ts +15 -16
  124. package/dist/esm/components/ReceiverMobile/index.js +29 -27
  125. package/dist/esm/components/ReceiverName/index.d.ts +15 -16
  126. package/dist/esm/components/ReceiverName/index.js +29 -27
  127. package/dist/esm/components/Remark/index.d.ts +19 -16
  128. package/dist/esm/components/Remark/index.js +31 -23
  129. package/dist/esm/components/ReturnLogistics/index.d.ts +26 -25
  130. package/dist/esm/components/ReturnLogistics/index.js +19 -10
  131. package/dist/esm/components/Select/index.d.ts +16 -15
  132. package/dist/esm/components/Select/index.js +28 -23
  133. package/dist/esm/components/ShopInput/index.d.ts +28 -0
  134. package/dist/esm/components/ShopInput/index.js +76 -0
  135. package/dist/esm/components/ShopName/index.d.ts +15 -16
  136. package/dist/esm/components/ShopName/index.js +28 -25
  137. package/dist/esm/components/Submitter/index.d.ts +30 -0
  138. package/dist/esm/components/Submitter/index.js +64 -0
  139. package/dist/esm/components/SystemOrderNo/index.d.ts +15 -16
  140. package/dist/esm/components/SystemOrderNo/index.js +27 -25
  141. package/dist/esm/components/TemplateSelect/index.d.ts +15 -15
  142. package/dist/esm/components/TemplateSelect/index.js +29 -24
  143. package/dist/esm/components/TextArea/index.d.ts +15 -15
  144. package/dist/esm/components/TextArea/index.js +27 -24
  145. package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
  146. package/dist/esm/components/ThirdItemSelect/index.d.ts +15 -15
  147. package/dist/esm/components/ThirdItemSelect/index.js +36 -28
  148. package/dist/esm/components/TradeDateTime/index.d.ts +18 -10
  149. package/dist/esm/components/TradeDateTime/index.js +52 -17
  150. package/dist/esm/components/TradeId/index.d.ts +15 -10
  151. package/dist/esm/components/TradeId/index.js +27 -14
  152. package/dist/esm/components/WorkOrderId/index.d.ts +14 -15
  153. package/dist/esm/components/WorkOrderId/index.js +36 -29
  154. package/dist/esm/factory.d.ts +3 -0
  155. package/dist/esm/factory.js +105 -0
  156. package/dist/esm/index.d.ts +12 -0
  157. package/dist/esm/index.js +13 -1
  158. package/dist/esm/type.d.ts +53 -45
  159. package/package.json +10 -5
@@ -1,6 +1,4 @@
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 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
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
3
  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); } }
6
4
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -8,30 +6,25 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
6
  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; }
9
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
8
  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); }
11
- import React from "react";
12
- import { BuyerNick } from "@kmkf-fe-packages/basic-components";
9
+ import React from 'react';
10
+ import { BuyerNick } from '@kmkf-fe-packages/basic-components';
13
11
  import GetFormItem from "../GetFormItem";
14
12
  import ItemView from "../../commonComponents/ItemView";
15
13
  import PlatBuyer from "../../commonComponents/PlatBuyer";
16
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
15
  var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
18
16
  var _this = this,
19
- _this$componentConfig3;
17
+ _this$componentConfig3,
18
+ _this$componentConfig4;
20
19
  _classCallCheck(this, EBuyerNick);
21
20
  _defineProperty(this, "name", void 0);
22
21
  _defineProperty(this, "id", void 0);
23
22
  _defineProperty(this, "type", void 0);
24
23
  _defineProperty(this, "rules", void 0);
25
- _defineProperty(this, "canFilter", void 0);
26
- _defineProperty(this, "canGroup", void 0);
27
- _defineProperty(this, "canHidden", void 0);
28
- _defineProperty(this, "dataType", void 0);
29
- _defineProperty(this, "showContains", void 0);
30
24
  _defineProperty(this, "componentConfig", void 0);
31
25
  _defineProperty(this, "effects", void 0);
32
- _defineProperty(this, "render", function (value) {
33
- return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.buyerNick);
34
- });
26
+ _defineProperty(this, "isCombinationComponent", void 0);
27
+ _defineProperty(this, "children", void 0);
35
28
  _defineProperty(this, "renderClient", function (record) {
36
29
  var _record$_this$id;
37
30
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -54,6 +47,16 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
54
47
  shopList: (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopList) || []
55
48
  }));
56
49
  });
50
+ _defineProperty(this, "renderLog", function (r) {
51
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_buyerOpenUid")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_buyerNick")])) return null;
52
+ return _this.renderPc(undefined, r);
53
+ });
54
+ _defineProperty(this, "getComponentValue", function (r) {
55
+ return {
56
+ buyerNick: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_buyerNick")],
57
+ buyerOpenUid: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_buyerOpenUid")]
58
+ };
59
+ });
57
60
  _defineProperty(this, "renderExport", function (value, record) {
58
61
  return record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_buyerNick")];
59
62
  });
@@ -71,26 +74,36 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
71
74
  }))
72
75
  });
73
76
  });
74
- _defineProperty(this, "getColumns", function () {
75
- return _objectSpread(_objectSpread({}, _this), {}, {
76
- dataIndex: _this.id,
77
- title: _this.name,
78
- renderExport: _this.renderExport,
79
- customizeFilter: function customizeFilter(value) {
80
- return value === null || value === void 0 ? void 0 : value.buyerNick;
77
+ _defineProperty(this, "filterConfig", function (item) {
78
+ return {
79
+ type: item.type,
80
+ id: "".concat(item.id, "_buyerNick"),
81
+ // 过滤组件id
82
+ name: item.name,
83
+ // 过滤组件名称
84
+ filterComponentType: 'Input',
85
+ filterFn: function filterFn(value) {
86
+ return function (i) {
87
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'buyerNick')).includes(value);
88
+ };
81
89
  }
82
- });
90
+ };
83
91
  });
84
92
  this.name = options.name;
85
93
  this.id = options.id;
86
94
  this.type = options.type;
87
- this.canFilter = true;
88
- this.canGroup = false;
89
- this.canHidden = true;
90
- this.dataType = "string";
91
- this.showContains = false;
92
- this.componentConfig = options.componentConfig;
95
+ this.isCombinationComponent = false;
96
+ this.children = [];
93
97
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
98
+ validator: function validator(_, value) {
99
+ if (!(value !== null && value !== void 0 && value.buyerNick)) {
100
+ return Promise.reject(new Error('请输入买家昵称'));
101
+ }
102
+ return Promise.resolve();
103
+ }
104
+ }] : [];
105
+ this.componentConfig = options.componentConfig;
106
+ this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
94
107
  validator: function validator(_, value) {
95
108
  if (!(value !== null && value !== void 0 && value.buyerNick)) {
96
109
  return Promise.reject(new Error("请输入买家昵称"));
@@ -1,45 +1,33 @@
1
- /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, ALignType, Record } from '../../type';
3
- import { FormInstance } from 'antd';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
4
3
  declare class BasicCascader implements ComponentInterface {
5
4
  name: string;
6
5
  id: string;
7
6
  type: string;
8
7
  rules: any[];
9
- canFilter: boolean;
10
- canGroup: boolean;
11
- canHidden: boolean;
12
- dataType: DataType;
13
- showContains: boolean;
14
8
  componentConfig: ComponentInterface["componentConfig"];
9
+ isCombinationComponent: boolean;
10
+ children: ComponentInterface[];
15
11
  constructor(options: PickOption);
16
- width?: number | undefined;
17
- align?: ALignType | undefined;
18
- dataIndex?: string | undefined;
19
- editable?: boolean | undefined;
20
- formItemIndex?: number | undefined;
21
- effects?: {
22
- queryWorkOrderDetail: (r: any) => void;
23
- isEditing: boolean;
24
- form: FormInstance<any>;
25
- shopList?: any[] | undefined;
26
- shopId?: string | undefined;
27
- } | undefined;
28
12
  /**
29
13
  * 通过值计算展示内容
30
14
  * @param value
31
15
  * @returns
32
16
  */
33
17
  getValue: (value: any) => string;
34
- render: (value: any) => JSX.Element;
35
- renderClient: (record: any) => JSX.Element | null;
36
- renderPc: (value: any, record: Record) => JSX.Element;
18
+ renderClient: (record: any) => React.JSX.Element | null;
19
+ renderPc: (value: any, record: Record) => React.JSX.Element;
20
+ renderLog: (r: Record) => React.JSX.Element | null;
21
+ getComponentValue: (r: Record) => any;
37
22
  renderExport: (value: any, record: Record) => string;
38
- editRender: (value: any) => JSX.Element;
39
- getColumns: () => this & {
40
- dataIndex: string;
41
- title: string;
42
- renderExport: (value: any, record: Record) => string;
23
+ editRender: () => React.JSX.Element;
24
+ filterConfig: (item: ColumnConfig) => {
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "Cascader";
29
+ options: any;
30
+ filterFn: (value: string) => (i: Record) => boolean;
43
31
  };
44
32
  }
45
33
  export default BasicCascader;
@@ -1,6 +1,4 @@
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 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
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
3
  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); } }
6
4
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -10,10 +8,11 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
10
8
  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); }
11
9
  import React from 'react';
12
10
  import { Cascader } from 'antd';
11
+ import intersection from 'lodash/intersection';
13
12
  import GetFormItem from "../GetFormItem";
14
13
  import { findLabelBySelectValue, transMultSelectOptions } from '@kmkf-fe-packages/kmkf-utils';
15
14
  import ItemView from "../../commonComponents/ItemView";
16
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
16
  var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
18
17
  var _this = this;
19
18
  _classCallCheck(this, BasicCascader);
@@ -21,27 +20,15 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
21
20
  _defineProperty(this, "id", void 0);
22
21
  _defineProperty(this, "type", void 0);
23
22
  _defineProperty(this, "rules", void 0);
24
- _defineProperty(this, "canFilter", void 0);
25
- _defineProperty(this, "canGroup", void 0);
26
- _defineProperty(this, "canHidden", void 0);
27
- _defineProperty(this, "dataType", void 0);
28
- _defineProperty(this, "showContains", void 0);
29
23
  _defineProperty(this, "componentConfig", void 0);
30
- _defineProperty(this, "width", void 0);
31
- _defineProperty(this, "align", void 0);
32
- _defineProperty(this, "dataIndex", void 0);
33
- _defineProperty(this, "editable", void 0);
34
- _defineProperty(this, "formItemIndex", void 0);
35
- _defineProperty(this, "effects", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "children", void 0);
36
26
  _defineProperty(this, "getValue", function (value) {
37
27
  var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
38
28
  return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
39
29
  return i.label;
40
30
  })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(',');
41
31
  });
42
- _defineProperty(this, "render", function (value) {
43
- return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
44
- });
45
32
  _defineProperty(this, "renderClient", function (record) {
46
33
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
47
34
  id: _this.id,
@@ -60,6 +47,13 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
60
47
  return i.label;
61
48
  })) === null || _findLabelBySelectVal4 === void 0 ? void 0 : _findLabelBySelectVal4.join(','));
62
49
  });
50
+ _defineProperty(this, "renderLog", function (r) {
51
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_multSelect")])) return null;
52
+ return _this.renderPc(undefined, r);
53
+ });
54
+ _defineProperty(this, "getComponentValue", function (r) {
55
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_multSelect")];
56
+ });
63
57
  _defineProperty(this, "renderExport", function (value, record) {
64
58
  var _findLabelBySelectVal5, _findLabelBySelectVal6, _ref2, _this$componentConfig3;
65
59
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
@@ -71,7 +65,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
71
65
  return i.label;
72
66
  })) === null || _findLabelBySelectVal6 === void 0 ? void 0 : _findLabelBySelectVal6.join(',');
73
67
  });
74
- _defineProperty(this, "editRender", function (value) {
68
+ _defineProperty(this, "editRender", function () {
75
69
  var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6;
76
70
  return /*#__PURE__*/React.createElement(GetFormItem, {
77
71
  title: _this.name,
@@ -90,23 +84,36 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
90
84
  }))
91
85
  });
92
86
  });
93
- _defineProperty(this, "getColumns", function () {
94
- return _objectSpread(_objectSpread({}, _this), {}, {
95
- dataIndex: _this.id,
96
- title: _this.name,
97
- renderExport: _this.renderExport
98
- });
99
- ;
87
+ _defineProperty(this, "filterConfig", function (item) {
88
+ var _item$config;
89
+ return {
90
+ type: item.type,
91
+ id: item.id,
92
+ // 过滤组件id
93
+ name: item.name,
94
+ // 过滤组件名称
95
+ filterComponentType: 'Cascader',
96
+ options: transMultSelectOptions((item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []),
97
+ filterFn: function filterFn(value) {
98
+ return function (i) {
99
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
100
+ };
101
+ }
102
+ };
100
103
  });
101
104
  this.name = options.name;
102
105
  this.id = options.id;
103
106
  this.type = options.type;
104
- this.canFilter = true;
105
- this.canGroup = false;
106
- this.canHidden = true;
107
- this.dataType = 'array';
108
- this.showContains = false;
109
107
  this.componentConfig = options.componentConfig;
110
108
  this.rules = [];
111
- });
109
+ this.children = [];
110
+ this.isCombinationComponent = false;
111
+ }
112
+
113
+ /**
114
+ * 通过值计算展示内容
115
+ * @param value
116
+ * @returns
117
+ */);
118
+
112
119
  export default BasicCascader;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare type Value = {
4
4
  value?: string[];
5
5
  other?: string;
@@ -9,23 +9,27 @@ declare class BasicCheckbox implements ComponentInterface {
9
9
  id: string;
10
10
  type: string;
11
11
  rules: any[];
12
- canFilter: boolean;
13
- canGroup: boolean;
14
- canHidden: boolean;
15
- dataType: DataType;
16
- showContains: boolean;
17
12
  componentConfig: ComponentInterface["componentConfig"];
13
+ isCombinationComponent: boolean;
14
+ children: ComponentInterface[];
18
15
  constructor(options: PickOption);
19
16
  getValue: (value: Value) => string | null | undefined;
20
- render: (value: Value) => JSX.Element;
21
- renderPc: (value: any, record: Record) => JSX.Element;
17
+ renderPc: (value: any, record: Record) => React.JSX.Element;
18
+ renderLog: (r: Record) => any;
19
+ getComponentValue: (r: Record) => {
20
+ value: any;
21
+ other: any;
22
+ };
22
23
  renderExport: (value: any, record: Record) => string;
23
- renderClient: (record: any) => JSX.Element | null;
24
- editRender: () => JSX.Element;
25
- getColumns: () => this & {
26
- dataIndex: string;
27
- title: string;
28
- renderExport: (value: any, record: Record) => string;
24
+ renderClient: (record: any) => React.JSX.Element | null;
25
+ editRender: () => React.JSX.Element;
26
+ filterConfig: (item: ColumnConfig) => {
27
+ type: string;
28
+ id: string;
29
+ name: string;
30
+ filterComponentType: "MultipleSelect";
31
+ options: any[] | undefined;
32
+ filterFn: (value: string) => (i: Record) => boolean;
29
33
  };
30
34
  }
31
35
  export default BasicCheckbox;
@@ -1,6 +1,4 @@
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 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
2
  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); } }
5
3
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
4
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -8,10 +6,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
8
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
7
  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); }
10
8
  import React from 'react';
9
+ import intersection from 'lodash/intersection';
11
10
  import { ApaasCheckbox } from '@kmkf-fe-packages/basic-components';
12
11
  import GetFormItem from "../GetFormItem";
13
12
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
14
  var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
16
15
  var _this = this,
17
16
  _options$componentCon;
@@ -20,27 +19,21 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
20
19
  _defineProperty(this, "id", void 0);
21
20
  _defineProperty(this, "type", void 0);
22
21
  _defineProperty(this, "rules", void 0);
23
- _defineProperty(this, "canFilter", void 0);
24
- _defineProperty(this, "canGroup", void 0);
25
- _defineProperty(this, "canHidden", void 0);
26
- _defineProperty(this, "dataType", void 0);
27
- _defineProperty(this, "showContains", void 0);
28
22
  _defineProperty(this, "componentConfig", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "children", void 0);
29
25
  _defineProperty(this, "getValue", function (value) {
30
26
  var _value$value, _value$value2, _value$value3;
31
- if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && !(value !== null && value !== void 0 && value.other)) return null;
32
- var findIndex = (value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.findIndex(function (item) {
27
+ if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
28
+ var findIndex = value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.findIndex(function (item) {
33
29
  return item === '其他';
34
- })) || -1;
30
+ });
35
31
  if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
36
32
  // @ts-ignore
37
33
  value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
38
34
  }
39
35
  return value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.join('/');
40
36
  });
41
- _defineProperty(this, "render", function (value) {
42
- return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
43
- });
44
37
  _defineProperty(this, "renderPc", function (value, record) {
45
38
  var _record;
46
39
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) === undefined) {
@@ -48,6 +41,23 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
48
41
  }
49
42
  return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_checkbox")]) === null || _record === void 0 ? void 0 : _record.join('/'), (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) && /*#__PURE__*/React.createElement("br", null), (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || '');
50
43
  });
44
+ _defineProperty(this, "renderLog", function (r) {
45
+ var _r;
46
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkbox")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) return null;
47
+ var restOtherOptions = (r === null || r === void 0 ? void 0 : (_r = r["".concat(_this.id, "_checkbox")]) === null || _r === void 0 ? void 0 : _r.filter(function (i) {
48
+ return i !== '其他';
49
+ })) || [];
50
+ if (!isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) {
51
+ return (restOtherOptions === null || restOtherOptions === void 0 ? void 0 : restOtherOptions.length) > 0 ? restOtherOptions.join('/').concat("/\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")")) : "\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")");
52
+ }
53
+ return restOtherOptions.join('/');
54
+ });
55
+ _defineProperty(this, "getComponentValue", function (r) {
56
+ return {
57
+ value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkbox")],
58
+ other: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")]
59
+ };
60
+ });
51
61
  _defineProperty(this, "renderExport", function (value, record) {
52
62
  var _record2;
53
63
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined) {
@@ -72,22 +82,31 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
72
82
  component: /*#__PURE__*/React.createElement(ApaasCheckbox, _this.componentConfig)
73
83
  });
74
84
  });
75
- _defineProperty(this, "getColumns", function () {
76
- return _objectSpread(_objectSpread({}, _this), {}, {
77
- dataIndex: _this.id,
78
- title: _this.name,
79
- renderExport: _this.renderExport
80
- });
81
- ;
85
+ _defineProperty(this, "filterConfig", function (item) {
86
+ var _item$config, _item$config2, _item$config2$options, _item$config3;
87
+ return {
88
+ type: item.type,
89
+ id: item.id,
90
+ // 过滤组件id
91
+ name: item.name,
92
+ // 过滤组件名称
93
+ filterComponentType: 'MultipleSelect',
94
+ options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
95
+ label: '其他',
96
+ value: '其他'
97
+ }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || [],
98
+ filterFn: function filterFn(value) {
99
+ return function (i) {
100
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'checkbox')).length > 0;
101
+ };
102
+ }
103
+ };
82
104
  });
83
105
  this.name = options.name;
84
106
  this.id = options.id;
85
107
  this.type = options.type;
86
- this.canFilter = false;
87
- this.canGroup = false;
88
- this.canHidden = true;
89
- this.showContains = false;
90
- this.dataType = 'array';
108
+ this.isCombinationComponent = false;
109
+ this.children = [];
91
110
  this.componentConfig = options.componentConfig;
92
111
  this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
93
112
  validator: function validator(_, value) {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  declare type getFormItemProps = {
3
3
  name: string;
4
4
  title: string;
@@ -6,13 +6,13 @@ declare type getFormItemProps = {
6
6
  required: boolean;
7
7
  component: JSX.Element | string | null;
8
8
  };
9
- export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
9
+ export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => React.JSX.Element;
10
10
  export declare const showImage: ({ item, type, index }: {
11
11
  item: any;
12
12
  type: string;
13
13
  index: number;
14
- }) => JSX.Element;
15
- export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
16
- export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
14
+ }) => React.JSX.Element;
15
+ export declare const ShowTotalImage: ({ total, allImage, type }: any) => React.JSX.Element;
16
+ export declare const GoodImage: ({ list, type }: any) => React.JSX.Element | null;
17
17
  export declare const JstGoodImage: ({ list, type }: any) => any;
18
18
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
3
  /**
4
4
  * 针对完成时间、创建时间、修改时间定义了3中类型
5
5
  */
@@ -8,23 +8,23 @@ declare class CommonDataTime implements ComponentInterface {
8
8
  id: string;
9
9
  type: string;
10
10
  rules: any[];
11
- canFilter: boolean;
12
- canGroup: boolean;
13
- canHidden: boolean;
14
- dataType: DataType;
15
- showContains: boolean;
16
11
  componentConfig: ComponentInterface["componentConfig"];
12
+ isCombinationComponent: boolean;
13
+ children: ComponentInterface[];
17
14
  constructor(options: PickOption);
18
15
  getValue: (value: string) => string;
19
- render: (value: string) => JSX.Element | null;
20
- renderClient: (record: any) => JSX.Element | null;
21
- renderPc: (value: any, record: Record) => JSX.Element;
16
+ renderClient: (record: any) => React.JSX.Element | null;
17
+ renderPc: (value: any, record: Record) => React.JSX.Element;
18
+ renderLog: (r: Record) => React.JSX.Element | null;
19
+ getComponentValue: (r: Record) => any;
22
20
  renderExport: (value: any, record: Record) => string;
23
21
  editRender: () => null;
24
- getColumns: () => this & {
25
- dataIndex: string;
26
- title: string;
27
- renderExport: (value: any, record: Record) => string;
22
+ filterConfig: (item: ColumnConfig) => {
23
+ type: string;
24
+ id: string;
25
+ name: string;
26
+ filterComponentType: "Date";
27
+ filterFn: (value: string[]) => (i: Record) => boolean;
28
28
  };
29
29
  }
30
30
  export default CommonDataTime;
@@ -1,6 +1,4 @@
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 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
2
  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); } }
5
3
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
4
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -10,7 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
10
8
  import React from 'react';
11
9
  import moment from 'moment';
12
10
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
12
 
15
13
  /**
16
14
  * 针对完成时间、创建时间、修改时间定义了3中类型
@@ -22,19 +20,12 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
22
20
  _defineProperty(this, "id", void 0);
23
21
  _defineProperty(this, "type", void 0);
24
22
  _defineProperty(this, "rules", void 0);
25
- _defineProperty(this, "canFilter", void 0);
26
- _defineProperty(this, "canGroup", void 0);
27
- _defineProperty(this, "canHidden", void 0);
28
- _defineProperty(this, "dataType", void 0);
29
- _defineProperty(this, "showContains", void 0);
30
23
  _defineProperty(this, "componentConfig", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "children", void 0);
31
26
  _defineProperty(this, "getValue", function (value) {
32
27
  return moment(value).format('YYYY-MM-DD HH:mm:ss');
33
28
  });
34
- _defineProperty(this, "render", function (value) {
35
- if (!value) return null;
36
- return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
37
- });
38
29
  _defineProperty(this, "renderClient", function (record) {
39
30
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
40
31
  id: _this.id,
@@ -48,6 +39,13 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
48
39
  }
49
40
  return /*#__PURE__*/React.createElement("span", null, moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss'));
50
41
  });
42
+ _defineProperty(this, "renderLog", function (r) {
43
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
44
+ return _this.renderPc(undefined, r);
45
+ });
46
+ _defineProperty(this, "getComponentValue", function (r) {
47
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
48
+ });
51
49
  _defineProperty(this, "renderExport", function (value, record) {
52
50
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
53
51
  return '--';
@@ -57,23 +55,28 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
57
55
  _defineProperty(this, "editRender", function () {
58
56
  return null;
59
57
  });
60
- _defineProperty(this, "getColumns", function () {
61
- return _objectSpread(_objectSpread({}, _this), {}, {
62
- dataIndex: _this.id,
63
- title: _this.name,
64
- renderExport: _this.renderExport
65
- });
66
- ;
58
+ _defineProperty(this, "filterConfig", function (item) {
59
+ return {
60
+ type: item.type,
61
+ id: item.id,
62
+ // 过滤组件id
63
+ name: item.name,
64
+ // 过滤组件名称
65
+ filterComponentType: 'Date',
66
+ filterFn: function filterFn(value) {
67
+ return function (i) {
68
+ var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
69
+ return _filterFn.filterDateFn(value, recordDateTime);
70
+ };
71
+ }
72
+ };
67
73
  });
68
74
  this.name = options.name;
69
75
  this.id = options.id;
70
76
  this.type = options.type;
71
- this.canFilter = true;
72
- this.canGroup = true;
73
- this.canHidden = true;
74
- this.showContains = false;
75
- this.dataType = 'string';
76
77
  this.componentConfig = options.componentConfig;
77
78
  this.rules = [];
79
+ this.isCombinationComponent = false;
80
+ this.children = [];
78
81
  });
79
82
  export default CommonDataTime;