@kmkf-fe-packages/services-components 0.6.2 → 0.6.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/PlatformAvatar/index.d.ts +7 -0
- package/dist/esm/commonComponents/PlatformAvatar/index.js +28 -0
- package/dist/esm/commonComponents/ShopList/index.d.ts +13 -0
- package/dist/esm/commonComponents/ShopList/index.js +34 -0
- package/dist/esm/components/ActualPayment/index.d.ts +8 -11
- package/dist/esm/components/ActualPayment/index.js +19 -22
- package/dist/esm/components/Address/index.d.ts +6 -14
- package/dist/esm/components/Address/index.js +9 -22
- package/dist/esm/components/Alipay/index.d.ts +9 -18
- package/dist/esm/components/Alipay/index.js +6 -17
- package/dist/esm/components/AlipayAccount/index.d.ts +9 -13
- package/dist/esm/components/AlipayAccount/index.js +19 -24
- package/dist/esm/components/AlipayName/index.d.ts +8 -12
- package/dist/esm/components/AlipayName/index.js +18 -23
- package/dist/esm/components/BuyerNick/index.d.ts +8 -11
- package/dist/esm/components/BuyerNick/index.js +30 -25
- package/dist/esm/components/Cascader/index.d.ts +9 -23
- package/dist/esm/components/Cascader/index.js +29 -27
- package/dist/esm/components/Checkbox/index.d.ts +9 -10
- package/dist/esm/components/Checkbox/index.js +24 -20
- package/dist/esm/components/CommonDataTime/index.d.ts +8 -10
- package/dist/esm/components/CommonDataTime/index.js +19 -20
- package/dist/esm/components/CompletedUser/index.d.ts +28 -0
- package/dist/esm/components/CompletedUser/index.js +60 -0
- package/dist/esm/components/DataTime/index.d.ts +9 -10
- package/dist/esm/components/DataTime/index.js +22 -23
- package/dist/esm/components/EItemEnCode/index.d.ts +8 -10
- package/dist/esm/components/EItemEnCode/index.js +22 -20
- package/dist/esm/components/EItemId/index.d.ts +8 -10
- package/dist/esm/components/EItemId/index.js +22 -20
- package/dist/esm/components/EItemSelect/index.d.ts +4 -11
- package/dist/esm/components/EItemSelect/index.js +6 -18
- package/dist/esm/components/ErpTradeId/index.d.ts +8 -11
- package/dist/esm/components/ErpTradeId/index.js +18 -21
- package/dist/esm/components/Express/index.d.ts +9 -13
- package/dist/esm/components/Express/index.js +18 -29
- package/dist/esm/components/ExpressCode/index.d.ts +8 -12
- package/dist/esm/components/ExpressCode/index.js +17 -22
- package/dist/esm/components/FlowStatusSelect/index.d.ts +13 -33
- package/dist/esm/components/FlowStatusSelect/index.js +27 -22
- package/dist/esm/components/Grade/index.d.ts +4 -11
- package/dist/esm/components/Grade/index.js +6 -19
- package/dist/esm/components/Handler/index.d.ts +32 -0
- package/dist/esm/components/Handler/index.js +64 -0
- package/dist/esm/components/Input/index.d.ts +8 -11
- package/dist/esm/components/Input/index.js +20 -24
- package/dist/esm/components/JstItemSelect/index.d.ts +9 -11
- package/dist/esm/components/JstItemSelect/index.js +35 -20
- package/dist/esm/components/JstLogistics/index.d.ts +16 -11
- package/dist/esm/components/JstLogistics/index.js +31 -20
- package/dist/esm/components/JstSendGood/index.d.ts +9 -11
- package/dist/esm/components/JstSendGood/index.js +35 -20
- package/dist/esm/components/JstSupply/index.d.ts +9 -11
- package/dist/esm/components/JstSupply/index.js +35 -20
- package/dist/esm/components/Logistics/index.d.ts +15 -25
- package/dist/esm/components/Logistics/index.js +10 -17
- package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +25 -0
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +89 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +24 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.js +62 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +27 -0
- package/dist/esm/components/LogisticsInterception/index.js +90 -0
- package/dist/esm/components/MultSelect/index.d.ts +9 -10
- package/dist/esm/components/MultSelect/index.js +21 -20
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +8 -21
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +14 -26
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +8 -21
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +14 -26
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +8 -16
- package/dist/esm/components/Ordinary/OrdinarySerial.js +14 -16
- package/dist/esm/components/Ordinary/index.d.ts +9 -22
- package/dist/esm/components/Ordinary/index.js +8 -7
- package/dist/esm/components/Payment/AlipayNick.d.ts +9 -22
- package/dist/esm/components/Payment/AlipayNick.js +16 -28
- package/dist/esm/components/Payment/AlipayNo.d.ts +8 -20
- package/dist/esm/components/Payment/AlipayNo.js +16 -27
- package/dist/esm/components/Payment/AlipayTime.d.ts +8 -22
- package/dist/esm/components/Payment/AlipayTime.js +15 -27
- package/dist/esm/components/Payment/BuyerNick.d.ts +8 -21
- package/dist/esm/components/Payment/BuyerNick.js +14 -26
- package/dist/esm/components/Payment/PaymentAmount.d.ts +8 -21
- package/dist/esm/components/Payment/PaymentAmount.js +14 -26
- package/dist/esm/components/Payment/PaymentStatus.d.ts +13 -27
- package/dist/esm/components/Payment/PaymentStatus.js +37 -36
- package/dist/esm/components/Payment/PaymentTid.d.ts +8 -21
- package/dist/esm/components/Payment/PaymentTid.js +14 -26
- package/dist/esm/components/Payment/index.d.ts +23 -96
- package/dist/esm/components/Payment/index.js +8 -17
- package/dist/esm/components/Picture/index.d.ts +8 -10
- package/dist/esm/components/Picture/index.js +6 -18
- package/dist/esm/components/PlatForm/index.d.ts +29 -0
- package/dist/esm/components/PlatForm/index.js +62 -0
- package/dist/esm/components/Radio/index.d.ts +9 -10
- package/dist/esm/components/Radio/index.js +23 -20
- package/dist/esm/components/Rate/index.d.ts +4 -11
- package/dist/esm/components/Rate/index.js +6 -19
- package/dist/esm/components/ReceiverAddress/index.d.ts +4 -12
- package/dist/esm/components/ReceiverAddress/index.js +9 -26
- package/dist/esm/components/ReceiverMobile/index.d.ts +9 -12
- package/dist/esm/components/ReceiverMobile/index.js +20 -23
- package/dist/esm/components/ReceiverName/index.d.ts +8 -11
- package/dist/esm/components/ReceiverName/index.js +20 -23
- package/dist/esm/components/Remark/index.d.ts +8 -11
- package/dist/esm/components/Remark/index.js +18 -21
- package/dist/esm/components/ReturnLogistics/index.d.ts +15 -20
- package/dist/esm/components/ReturnLogistics/index.js +10 -7
- package/dist/esm/components/Select/index.d.ts +9 -10
- package/dist/esm/components/Select/index.js +20 -20
- package/dist/esm/components/ShopInput/index.d.ts +26 -0
- package/dist/esm/components/ShopInput/index.js +71 -0
- package/dist/esm/components/ShopName/index.d.ts +8 -11
- package/dist/esm/components/ShopName/index.js +18 -20
- package/dist/esm/components/Submitter/index.d.ts +28 -0
- package/dist/esm/components/Submitter/index.js +60 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +8 -11
- package/dist/esm/components/SystemOrderNo/index.js +18 -21
- package/dist/esm/components/TemplateSelect/index.d.ts +9 -11
- package/dist/esm/components/TemplateSelect/index.js +20 -20
- package/dist/esm/components/TextArea/index.d.ts +8 -10
- package/dist/esm/components/TextArea/index.js +18 -20
- package/dist/esm/components/ThirdItemSelect/index.d.ts +8 -10
- package/dist/esm/components/ThirdItemSelect/index.js +24 -20
- package/dist/esm/components/TradeDateTime/index.d.ts +9 -5
- package/dist/esm/components/TradeDateTime/index.js +34 -10
- package/dist/esm/components/TradeId/index.d.ts +8 -5
- package/dist/esm/components/TradeId/index.js +18 -10
- package/dist/esm/components/WorkOrderId/index.d.ts +8 -11
- package/dist/esm/components/WorkOrderId/index.js +20 -22
- package/dist/esm/factory.d.ts +3 -0
- package/dist/esm/factory.js +105 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +10 -1
- package/dist/esm/type.d.ts +38 -36
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare type Value = {
|
|
4
4
|
buyerNick?: string;
|
|
5
5
|
};
|
|
@@ -8,24 +8,21 @@ declare class EBuyerNick 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"];
|
|
17
12
|
effects: ComponentInterface["effects"];
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
18
15
|
constructor(options: PickOption);
|
|
19
16
|
render: (value: Value) => JSX.Element;
|
|
20
17
|
renderClient: (record: any) => JSX.Element | null;
|
|
21
18
|
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
22
19
|
renderExport: (value: any, record: any) => any;
|
|
23
20
|
editRender: (value: any) => JSX.Element;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
filterConfig: (item: ColumnConfig) => {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
filterComponentType: "Input";
|
|
25
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
29
26
|
};
|
|
30
27
|
}
|
|
31
28
|
export default EBuyerNick;
|
|
@@ -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,27 +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
|
|
12
|
-
import { BuyerNick } from
|
|
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
|
|
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);
|
|
26
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
32
28
|
_defineProperty(this, "render", function (value) {
|
|
33
29
|
return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.buyerNick);
|
|
34
30
|
});
|
|
@@ -71,26 +67,35 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
71
67
|
}))
|
|
72
68
|
});
|
|
73
69
|
});
|
|
74
|
-
_defineProperty(this, "
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
71
|
+
return {
|
|
72
|
+
id: "".concat(item.id, "_buyerNick"),
|
|
73
|
+
// 过滤组件id
|
|
74
|
+
name: item.name,
|
|
75
|
+
// 过滤组件名称
|
|
76
|
+
filterComponentType: 'Input',
|
|
77
|
+
filterFn: function filterFn(value) {
|
|
78
|
+
return function (i) {
|
|
79
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'buyerNick')).includes(value);
|
|
80
|
+
};
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
};
|
|
83
83
|
});
|
|
84
84
|
this.name = options.name;
|
|
85
85
|
this.id = options.id;
|
|
86
86
|
this.type = options.type;
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.canHidden = true;
|
|
90
|
-
this.dataType = "string";
|
|
91
|
-
this.showContains = false;
|
|
92
|
-
this.componentConfig = options.componentConfig;
|
|
87
|
+
this.isCombinationComponent = false;
|
|
88
|
+
this.children = [];
|
|
93
89
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
90
|
+
validator: function validator(_, value) {
|
|
91
|
+
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
92
|
+
return Promise.reject(new Error('请输入买家昵称'));
|
|
93
|
+
}
|
|
94
|
+
return Promise.resolve();
|
|
95
|
+
}
|
|
96
|
+
}] : [];
|
|
97
|
+
this.componentConfig = options.componentConfig;
|
|
98
|
+
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
94
99
|
validator: function validator(_, value) {
|
|
95
100
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
96
101
|
return Promise.reject(new Error("请输入买家昵称"));
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
3
|
-
import { FormInstance } from 'antd';
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
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
|
|
@@ -36,10 +20,12 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
36
20
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
37
21
|
renderExport: (value: any, record: Record) => string;
|
|
38
22
|
editRender: (value: any) => JSX.Element;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "Cascader";
|
|
27
|
+
options: any;
|
|
28
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
43
29
|
};
|
|
44
30
|
}
|
|
45
31
|
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,18 +20,9 @@ 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, "
|
|
31
|
-
_defineProperty(this, "
|
|
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) {
|
|
@@ -90,23 +80,35 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
|
|
|
90
80
|
}))
|
|
91
81
|
});
|
|
92
82
|
});
|
|
93
|
-
_defineProperty(this, "
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
83
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
84
|
+
var _item$config;
|
|
85
|
+
return {
|
|
86
|
+
id: item.id,
|
|
87
|
+
// 过滤组件id
|
|
88
|
+
name: item.name,
|
|
89
|
+
// 过滤组件名称
|
|
90
|
+
filterComponentType: 'Cascader',
|
|
91
|
+
options: transMultSelectOptions((item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []),
|
|
92
|
+
filterFn: function filterFn(value) {
|
|
93
|
+
return function (i) {
|
|
94
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
};
|
|
100
98
|
});
|
|
101
99
|
this.name = options.name;
|
|
102
100
|
this.id = options.id;
|
|
103
101
|
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
102
|
this.componentConfig = options.componentConfig;
|
|
110
103
|
this.rules = [];
|
|
111
|
-
|
|
104
|
+
this.children = [];
|
|
105
|
+
this.isCombinationComponent = false;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 通过值计算展示内容
|
|
110
|
+
* @param value
|
|
111
|
+
* @returns
|
|
112
|
+
*/);
|
|
113
|
+
|
|
112
114
|
export default BasicCascader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare type Value = {
|
|
4
4
|
value?: string[];
|
|
5
5
|
other?: string;
|
|
@@ -9,12 +9,9 @@ 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
17
|
render: (value: Value) => JSX.Element;
|
|
@@ -22,10 +19,12 @@ declare class BasicCheckbox implements ComponentInterface {
|
|
|
22
19
|
renderExport: (value: any, record: Record) => string;
|
|
23
20
|
renderClient: (record: any) => JSX.Element | null;
|
|
24
21
|
editRender: () => JSX.Element;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
filterComponentType: "MultipleSelect";
|
|
26
|
+
options: any[] | undefined;
|
|
27
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
30
|
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,12 +19,9 @@ 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
27
|
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;
|
|
@@ -72,22 +68,30 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
72
68
|
component: /*#__PURE__*/React.createElement(ApaasCheckbox, _this.componentConfig)
|
|
73
69
|
});
|
|
74
70
|
});
|
|
75
|
-
_defineProperty(this, "
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
72
|
+
var _item$config, _item$config2, _item$config2$options, _item$config3;
|
|
73
|
+
return {
|
|
74
|
+
id: item.id,
|
|
75
|
+
// 过滤组件id
|
|
76
|
+
name: item.name,
|
|
77
|
+
// 过滤组件名称
|
|
78
|
+
filterComponentType: 'MultipleSelect',
|
|
79
|
+
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({
|
|
80
|
+
label: '其他',
|
|
81
|
+
value: '其他'
|
|
82
|
+
}) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || [],
|
|
83
|
+
filterFn: function filterFn(value) {
|
|
84
|
+
return function (i) {
|
|
85
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'checkbox')).length > 0;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
82
89
|
});
|
|
83
90
|
this.name = options.name;
|
|
84
91
|
this.id = options.id;
|
|
85
92
|
this.type = options.type;
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.canHidden = true;
|
|
89
|
-
this.showContains = false;
|
|
90
|
-
this.dataType = 'array';
|
|
93
|
+
this.isCombinationComponent = false;
|
|
94
|
+
this.children = [];
|
|
91
95
|
this.componentConfig = options.componentConfig;
|
|
92
96
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
93
97
|
validator: function validator(_, value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
/**
|
|
4
4
|
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
5
5
|
*/
|
|
@@ -8,12 +8,9 @@ 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
16
|
render: (value: string) => JSX.Element | null;
|
|
@@ -21,10 +18,11 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
21
18
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
22
19
|
renderExport: (value: any, record: Record) => string;
|
|
23
20
|
editRender: () => null;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
filterConfig: (item: ColumnConfig) => {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
filterComponentType: "Date";
|
|
25
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
28
|
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,12 +20,9 @@ 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
|
});
|
|
@@ -57,23 +52,27 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
57
52
|
_defineProperty(this, "editRender", function () {
|
|
58
53
|
return null;
|
|
59
54
|
});
|
|
60
|
-
_defineProperty(this, "
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
56
|
+
return {
|
|
57
|
+
id: item.id,
|
|
58
|
+
// 过滤组件id
|
|
59
|
+
name: item.name,
|
|
60
|
+
// 过滤组件名称
|
|
61
|
+
filterComponentType: 'Date',
|
|
62
|
+
filterFn: function filterFn(value) {
|
|
63
|
+
return function (i) {
|
|
64
|
+
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
|
|
65
|
+
return _filterFn.filterDateFn(value, recordDateTime);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
67
69
|
});
|
|
68
70
|
this.name = options.name;
|
|
69
71
|
this.id = options.id;
|
|
70
72
|
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
73
|
this.componentConfig = options.componentConfig;
|
|
77
74
|
this.rules = [];
|
|
75
|
+
this.isCombinationComponent = false;
|
|
76
|
+
this.children = [];
|
|
78
77
|
});
|
|
79
78
|
export default CommonDataTime;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
|
|
3
|
+
declare class CompletedUser implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
8
|
+
effects: ComponentInterface["effects"];
|
|
9
|
+
isCombinationComponent: boolean;
|
|
10
|
+
children: ComponentInterface[];
|
|
11
|
+
constructor(options: PickOption);
|
|
12
|
+
renderPc: (value: string, record: Record) => JSX.Element;
|
|
13
|
+
renderExport: (value: any, record: Record) => any;
|
|
14
|
+
render: () => null;
|
|
15
|
+
renderClient: () => null;
|
|
16
|
+
editRender: () => null;
|
|
17
|
+
filterConfig: (item: ColumnConfig) => {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
filterComponentType: "MultipleSelect";
|
|
21
|
+
options: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export default CompletedUser;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 _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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
10
|
+
var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
|
|
11
|
+
var _this = this;
|
|
12
|
+
_classCallCheck(this, CompletedUser);
|
|
13
|
+
_defineProperty(this, "name", void 0);
|
|
14
|
+
_defineProperty(this, "id", void 0);
|
|
15
|
+
_defineProperty(this, "type", void 0);
|
|
16
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
17
|
+
_defineProperty(this, "effects", void 0);
|
|
18
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
19
|
+
_defineProperty(this, "children", void 0);
|
|
20
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
21
|
+
var _record;
|
|
22
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--');
|
|
23
|
+
});
|
|
24
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
25
|
+
var _record2;
|
|
26
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "render", function () {
|
|
29
|
+
return null;
|
|
30
|
+
});
|
|
31
|
+
_defineProperty(this, "renderClient", function () {
|
|
32
|
+
return null;
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "editRender", function () {
|
|
35
|
+
return null;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
38
|
+
var _this$effects;
|
|
39
|
+
return {
|
|
40
|
+
id: item.id,
|
|
41
|
+
// 过滤组件id
|
|
42
|
+
name: item.name,
|
|
43
|
+
// 过滤组件名称
|
|
44
|
+
filterComponentType: 'MultipleSelect',
|
|
45
|
+
options: ((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.userList) || [],
|
|
46
|
+
filterFn: function filterFn(value) {
|
|
47
|
+
return function (i) {
|
|
48
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
this.name = "完成人";
|
|
54
|
+
this.id = "completedUserName";
|
|
55
|
+
this.type = "COMPLETED_USER_INPUT";
|
|
56
|
+
this.effects = options.effects;
|
|
57
|
+
this.isCombinationComponent = false;
|
|
58
|
+
this.children = [];
|
|
59
|
+
});
|
|
60
|
+
export default CompletedUser;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare type Value = string | string[] | undefined;
|
|
4
4
|
export declare const DateTime: ({ value, onChange, ...otherProps }: any) => JSX.Element;
|
|
5
5
|
declare class BasicDataTime implements ComponentInterface {
|
|
@@ -7,12 +7,9 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
7
7
|
id: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
canFilter: boolean;
|
|
11
|
-
canGroup: boolean;
|
|
12
|
-
canHidden: boolean;
|
|
13
|
-
dataType: DataType;
|
|
14
|
-
showContains: boolean;
|
|
15
10
|
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
children: ComponentInterface[];
|
|
16
13
|
constructor(options: PickOption);
|
|
17
14
|
getValue: (value: Value) => string | undefined;
|
|
18
15
|
render: (value: Value) => JSX.Element;
|
|
@@ -20,10 +17,12 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
20
17
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
21
18
|
renderExport: (value: any, record: Record) => any;
|
|
22
19
|
editRender: () => JSX.Element;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
filterConfig: (item: ColumnConfig) => {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
filterComponentType: "Date";
|
|
24
|
+
options: any[];
|
|
25
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
28
|
export default BasicDataTime;
|