@kmkf-fe-packages/services-components 0.7.15-alpha.1 → 0.7.15-alpha.11
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/QueryLogisticsTrack/index.d.ts +1 -1
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +61 -31
- package/dist/esm/components/BS/BsExchange/index.d.ts +48 -0
- package/dist/esm/components/BS/BsExchange/index.js +258 -0
- package/dist/esm/components/BS/BsGoods/index.d.ts +31 -0
- package/dist/esm/components/BS/BsGoods/index.js +136 -0
- package/dist/esm/components/{BsLogistics → BS/BsLogistics}/index.d.ts +3 -3
- package/dist/esm/components/{BsLogistics → BS/BsLogistics}/index.js +3 -3
- package/dist/esm/components/BS/BsReissue/index.d.ts +43 -0
- package/dist/esm/components/BS/BsReissue/index.js +149 -0
- package/dist/esm/components/{BsSendGood/index.d.ts → BS/common/BsChildCode.d.ts} +9 -9
- package/dist/esm/components/BS/common/BsChildCode.js +71 -0
- package/dist/esm/components/BS/common/BsChildMoney.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildMoney.js +71 -0
- package/dist/esm/components/BS/common/BsChildName.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildName.js +71 -0
- package/dist/esm/components/BS/common/BsChildNumber.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildNumber.js +71 -0
- package/dist/esm/components/BS/common/BsChildPic.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildPic.js +72 -0
- package/dist/esm/components/BS/common/BsChildShare.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildShare.js +71 -0
- package/dist/esm/components/BS/common/BsChildSku.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildSku.js +71 -0
- package/dist/esm/components/BS/common/BsChildType.d.ts +25 -0
- package/dist/esm/components/BS/common/BsChildType.js +71 -0
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +31 -0
- package/dist/esm/components/BS/common/BsExchangeImage.js +126 -0
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +31 -0
- package/dist/esm/components/BS/common/BsGoodImage.js +88 -0
- package/dist/esm/components/BS/common/BsMemo.d.ts +25 -0
- package/dist/esm/components/BS/common/BsMemo.js +76 -0
- package/dist/esm/components/BS/common/BsType.d.ts +35 -0
- package/dist/esm/components/BS/common/BsType.js +89 -0
- package/dist/esm/components/BS/common/index.d.ts +10 -0
- package/dist/esm/components/BS/common/index.js +10 -0
- package/dist/esm/components/Common/index.d.ts +12 -6
- package/dist/esm/components/Common/index.js +115 -50
- package/dist/esm/components/Common/index.module.less +8 -0
- package/dist/esm/components/DataTime/ApaasDate.d.ts +2 -2
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
- package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
- package/dist/esm/components/ExpressCompany/index.d.ts +2 -2
- package/dist/esm/components/File/index.d.ts +7 -8
- package/dist/esm/components/File/index.js +20 -49
- package/dist/esm/components/Input/index.js +4 -1
- package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.d.ts +4 -4
- package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.js +19 -19
- package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.d.ts +4 -4
- package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.js +17 -17
- package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.d.ts +3 -3
- package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.js +46 -29
- package/dist/esm/components/{JstSupply → JST/JstSupply}/index.d.ts +3 -3
- package/dist/esm/components/{JstSupply → JST/JstSupply}/index.js +20 -20
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +53 -0
- package/dist/esm/components/LogisticsTrajectory/index.js +107 -0
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.d.ts +35 -0
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +103 -0
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +39 -0
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +91 -0
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +32 -0
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +80 -0
- package/dist/esm/components/Popover/index.d.ts +2 -2
- package/dist/esm/components/PostIng/index.d.ts +26 -3
- package/dist/esm/components/PostIng/index.js +94 -25
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +12 -3
- package/dist/esm/index.d.ts +9 -6
- package/dist/esm/index.js +9 -6
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
- package/dist/esm/components/BsSendGood/index.js +0 -116
|
@@ -11,9 +11,9 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
13
|
import { ExpressLogistics } from "@kmkf-fe-packages/basic-components";
|
|
14
|
-
import Express from "
|
|
15
|
-
import ExpressCode from "
|
|
16
|
-
import GetFormItem from "
|
|
14
|
+
import Express from "../../Express";
|
|
15
|
+
import ExpressCode from "../../ExpressCode";
|
|
16
|
+
import GetFormItem from "../../GetFormItem";
|
|
17
17
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
18
18
|
var _this = this,
|
|
19
19
|
_this$componentConfig3;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsReissue implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: () => null;
|
|
19
|
+
renderLog: (r: Record) => null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: () => null;
|
|
22
|
+
editRender: (p: any) => React.JSX.Element;
|
|
23
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
24
|
+
searchDefaultConditions: "eq";
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "Cascader";
|
|
29
|
+
props: {
|
|
30
|
+
options: any[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
33
|
+
} | {
|
|
34
|
+
searchDefaultConditions: "like";
|
|
35
|
+
type: string;
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
filterComponentType: "Input";
|
|
39
|
+
props?: undefined;
|
|
40
|
+
filterFn?: undefined;
|
|
41
|
+
})[];
|
|
42
|
+
}
|
|
43
|
+
export default BsReissue;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _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
|
+
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
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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 GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { GoodImage } from "../../Common";
|
|
14
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
17
|
+
import { SYMBOL } from "../../../constant";
|
|
18
|
+
import { BsType, BsMemo, BsChildPic, BsChildName, BsChildCode, BsChildSku, BsChildMoney, BsChildNumber, BsChildShare, BsChildType } from "../common/index";
|
|
19
|
+
var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
20
|
+
var _this = this,
|
|
21
|
+
_this$componentConfig2;
|
|
22
|
+
_classCallCheck(this, BsReissue);
|
|
23
|
+
_defineProperty(this, "name", void 0);
|
|
24
|
+
_defineProperty(this, "id", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "type", void 0);
|
|
27
|
+
_defineProperty(this, "rules", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "effects", void 0);
|
|
30
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
+
_defineProperty(this, "formField", void 0);
|
|
32
|
+
_defineProperty(this, "canSort", void 0);
|
|
33
|
+
_defineProperty(this, "children", void 0);
|
|
34
|
+
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
36
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
37
|
+
id: _this.id,
|
|
38
|
+
label: _this.name,
|
|
39
|
+
value: /*#__PURE__*/React.createElement(GoodImage, {
|
|
40
|
+
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
41
|
+
type: "itemId"
|
|
42
|
+
})
|
|
43
|
+
}) : null;
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderPc", function () {
|
|
46
|
+
return null;
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")];
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderExport", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "editRender", function (p) {
|
|
58
|
+
var _this$componentConfig, _this$effects, _this$effects2;
|
|
59
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
60
|
+
title: _this.name,
|
|
61
|
+
name: _this.id,
|
|
62
|
+
rules: _this.rules,
|
|
63
|
+
required: false,
|
|
64
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
65
|
+
component: /*#__PURE__*/React.createElement(Reissue, _extends({}, _this.componentConfig, {
|
|
66
|
+
maxLength: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.maxLength) || 20,
|
|
67
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
68
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
69
|
+
width: "90%"
|
|
70
|
+
}))
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
74
|
+
var _item$config;
|
|
75
|
+
return [{
|
|
76
|
+
searchDefaultConditions: SYMBOL.eq,
|
|
77
|
+
type: item.type,
|
|
78
|
+
id: "".concat(item.id, "_bsReissueType"),
|
|
79
|
+
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
80
|
+
filterComponentType: "Cascader",
|
|
81
|
+
props: {
|
|
82
|
+
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
83
|
+
},
|
|
84
|
+
filterFn: function filterFn(value) {
|
|
85
|
+
return function (i) {
|
|
86
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "bsReissueType"), value);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
searchDefaultConditions: SYMBOL.like,
|
|
91
|
+
type: item.type,
|
|
92
|
+
id: "".concat(item.id, "_bsReissueGoods"),
|
|
93
|
+
name: "".concat(_this.name),
|
|
94
|
+
filterComponentType: "Input"
|
|
95
|
+
}];
|
|
96
|
+
});
|
|
97
|
+
this.name = options.name;
|
|
98
|
+
this.id = options.id;
|
|
99
|
+
this.sortField = "".concat(options.id);
|
|
100
|
+
this.formField = "".concat(options.id);
|
|
101
|
+
this.type = options.type;
|
|
102
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
103
|
+
this.isCombinationComponent = false;
|
|
104
|
+
this.canSort = false;
|
|
105
|
+
this.children = [new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
106
|
+
id: "".concat(options.id, "_bsReissueType"),
|
|
107
|
+
name: "补发类型"
|
|
108
|
+
})), new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
109
|
+
id: "".concat(options.id, "_bsReissueType"),
|
|
110
|
+
name: "补发备注"
|
|
111
|
+
})), new BsChildPic(_objectSpread(_objectSpread({}, options), {}, {
|
|
112
|
+
name: "bs图片",
|
|
113
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
114
|
+
})), new BsChildName(_objectSpread(_objectSpread({}, options), {}, {
|
|
115
|
+
name: "名称",
|
|
116
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
117
|
+
})), new BsChildCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
118
|
+
name: "编码",
|
|
119
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
120
|
+
})), new BsChildSku(_objectSpread(_objectSpread({}, options), {}, {
|
|
121
|
+
name: "sku编码",
|
|
122
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
123
|
+
})), new BsChildMoney(_objectSpread(_objectSpread({}, options), {}, {
|
|
124
|
+
name: "实付金额",
|
|
125
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
126
|
+
})), new BsChildNumber(_objectSpread(_objectSpread({}, options), {}, {
|
|
127
|
+
name: "数量",
|
|
128
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
129
|
+
})), new BsChildShare(_objectSpread(_objectSpread({}, options), {}, {
|
|
130
|
+
name: "分摊价",
|
|
131
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
132
|
+
})), new BsChildType(_objectSpread(_objectSpread({}, options), {}, {
|
|
133
|
+
name: "赠品类型",
|
|
134
|
+
id: "".concat(options.id, "_bsReissueGoods")
|
|
135
|
+
}))];
|
|
136
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
137
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
138
|
+
required: true,
|
|
139
|
+
validator: function validator(_, value) {
|
|
140
|
+
var _value$bsReissueGoods;
|
|
141
|
+
if (!value || !(value !== null && value !== void 0 && (_value$bsReissueGoods = value.bsReissueGoods) !== null && _value$bsReissueGoods !== void 0 && _value$bsReissueGoods.length)) {
|
|
142
|
+
return Promise.reject(new Error("请选择bs补发商品"));
|
|
143
|
+
}
|
|
144
|
+
return Promise.resolve();
|
|
145
|
+
}
|
|
146
|
+
}] : [];
|
|
147
|
+
this.dataType = "object";
|
|
148
|
+
});
|
|
149
|
+
export default BsReissue;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption,
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare class
|
|
3
|
+
declare class BsChildCode implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
rules: any[];
|
|
9
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
10
9
|
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
-
renderClient: (record:
|
|
18
|
-
renderPc: (value:
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
19
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (value:
|
|
22
|
-
editRender: (
|
|
23
|
-
filterConfig: (
|
|
21
|
+
renderExport: (value: string, record: Record) => any;
|
|
22
|
+
editRender: () => null;
|
|
23
|
+
filterConfig: () => never[];
|
|
24
24
|
}
|
|
25
|
-
export default
|
|
25
|
+
export default BsChildCode;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, BsChildCode);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
19
|
+
_defineProperty(this, "align", void 0);
|
|
20
|
+
_defineProperty(this, "width", void 0);
|
|
21
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
22
|
+
_defineProperty(this, "formField", void 0);
|
|
23
|
+
_defineProperty(this, "canSort", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "dataType", void 0);
|
|
26
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
27
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
|
+
id: _this.id,
|
|
29
|
+
label: _this.name,
|
|
30
|
+
value: _this.getComponentValue(record)
|
|
31
|
+
}) : null;
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
+
var _this$getComponentVal;
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
39
|
+
return _this.renderPc(undefined, r);
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
+
var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
|
|
43
|
+
next["code"] && prv.push(next["code"]);
|
|
44
|
+
return prv;
|
|
45
|
+
}, []);
|
|
46
|
+
return list.join(",");
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _this$getComponentVal2;
|
|
50
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "filterConfig", function () {
|
|
56
|
+
return [];
|
|
57
|
+
});
|
|
58
|
+
this.name = options.name;
|
|
59
|
+
this.id = options.id;
|
|
60
|
+
this.sortField = options.id;
|
|
61
|
+
this.formField = options.id;
|
|
62
|
+
this.type = options.type;
|
|
63
|
+
this.componentConfig = options.componentConfig;
|
|
64
|
+
this.align = "left";
|
|
65
|
+
this.width = 200;
|
|
66
|
+
this.isCombinationComponent = false;
|
|
67
|
+
this.canSort = true;
|
|
68
|
+
this.dataType = "string";
|
|
69
|
+
this.children = [];
|
|
70
|
+
});
|
|
71
|
+
export default BsChildCode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsChildMoney implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: string, record: Record) => any;
|
|
22
|
+
editRender: () => null;
|
|
23
|
+
filterConfig: () => never[];
|
|
24
|
+
}
|
|
25
|
+
export default BsChildMoney;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, BsChildMoney);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
19
|
+
_defineProperty(this, "align", void 0);
|
|
20
|
+
_defineProperty(this, "width", void 0);
|
|
21
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
22
|
+
_defineProperty(this, "formField", void 0);
|
|
23
|
+
_defineProperty(this, "canSort", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "dataType", void 0);
|
|
26
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
27
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
|
+
id: _this.id,
|
|
29
|
+
label: _this.name,
|
|
30
|
+
value: _this.getComponentValue(record)
|
|
31
|
+
}) : null;
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
+
var _this$getComponentVal;
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
39
|
+
return _this.renderPc(undefined, r);
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
+
var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
|
|
43
|
+
next["money"] && prv.push(next["money"]);
|
|
44
|
+
return prv;
|
|
45
|
+
}, []);
|
|
46
|
+
return list.join(",");
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _this$getComponentVal2;
|
|
50
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "filterConfig", function () {
|
|
56
|
+
return [];
|
|
57
|
+
});
|
|
58
|
+
this.name = options.name;
|
|
59
|
+
this.id = options.id;
|
|
60
|
+
this.sortField = options.id;
|
|
61
|
+
this.formField = options.id;
|
|
62
|
+
this.type = options.type;
|
|
63
|
+
this.componentConfig = options.componentConfig;
|
|
64
|
+
this.align = "left";
|
|
65
|
+
this.width = 200;
|
|
66
|
+
this.isCombinationComponent = false;
|
|
67
|
+
this.canSort = true;
|
|
68
|
+
this.dataType = "string";
|
|
69
|
+
this.children = [];
|
|
70
|
+
});
|
|
71
|
+
export default BsChildMoney;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsChildName implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: string, record: Record) => any;
|
|
22
|
+
editRender: () => null;
|
|
23
|
+
filterConfig: () => never[];
|
|
24
|
+
}
|
|
25
|
+
export default BsChildName;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, BsChildName);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
19
|
+
_defineProperty(this, "align", void 0);
|
|
20
|
+
_defineProperty(this, "width", void 0);
|
|
21
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
22
|
+
_defineProperty(this, "formField", void 0);
|
|
23
|
+
_defineProperty(this, "canSort", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "dataType", void 0);
|
|
26
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
27
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
|
+
id: _this.id,
|
|
29
|
+
label: _this.name,
|
|
30
|
+
value: _this.getComponentValue(record)
|
|
31
|
+
}) : null;
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
+
var _this$getComponentVal;
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
39
|
+
return _this.renderPc(undefined, r);
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
+
var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
|
|
43
|
+
next["name"] && prv.push(next["name"]);
|
|
44
|
+
return prv;
|
|
45
|
+
}, []);
|
|
46
|
+
return list.join(",");
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _this$getComponentVal2;
|
|
50
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "filterConfig", function () {
|
|
56
|
+
return [];
|
|
57
|
+
});
|
|
58
|
+
this.name = options.name;
|
|
59
|
+
this.id = options.id;
|
|
60
|
+
this.sortField = options.id;
|
|
61
|
+
this.formField = options.id;
|
|
62
|
+
this.type = options.type;
|
|
63
|
+
this.componentConfig = options.componentConfig;
|
|
64
|
+
this.align = "left";
|
|
65
|
+
this.width = 200;
|
|
66
|
+
this.isCombinationComponent = false;
|
|
67
|
+
this.canSort = true;
|
|
68
|
+
this.dataType = "string";
|
|
69
|
+
this.children = [];
|
|
70
|
+
});
|
|
71
|
+
export default BsChildName;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsChildCode implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: string, record: Record) => any;
|
|
22
|
+
editRender: () => null;
|
|
23
|
+
filterConfig: () => never[];
|
|
24
|
+
}
|
|
25
|
+
export default BsChildCode;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, BsChildCode);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
19
|
+
_defineProperty(this, "align", void 0);
|
|
20
|
+
_defineProperty(this, "width", void 0);
|
|
21
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
22
|
+
_defineProperty(this, "formField", void 0);
|
|
23
|
+
_defineProperty(this, "canSort", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "dataType", void 0);
|
|
26
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
27
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
|
+
id: _this.id,
|
|
29
|
+
label: _this.name,
|
|
30
|
+
value: _this.getComponentValue(record)
|
|
31
|
+
}) : null;
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
+
var _this$getComponentVal;
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
39
|
+
return _this.renderPc(undefined, r);
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
+
var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
|
|
43
|
+
next["number"] && prv.push(next["number"]);
|
|
44
|
+
return prv;
|
|
45
|
+
}, []);
|
|
46
|
+
return list.join(",");
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _this$getComponentVal2;
|
|
50
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "filterConfig", function () {
|
|
56
|
+
return [];
|
|
57
|
+
});
|
|
58
|
+
this.name = options.name;
|
|
59
|
+
this.id = options.id;
|
|
60
|
+
this.sortField = options.id;
|
|
61
|
+
this.formField = options.id;
|
|
62
|
+
this.type = options.type;
|
|
63
|
+
this.componentConfig = options.componentConfig;
|
|
64
|
+
this.align = "left";
|
|
65
|
+
this.width = 200;
|
|
66
|
+
this.isCombinationComponent = false;
|
|
67
|
+
this.canSort = true;
|
|
68
|
+
this.dataType = "string";
|
|
69
|
+
this.children = [];
|
|
70
|
+
});
|
|
71
|
+
export default BsChildCode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsChildPic implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element[];
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element[] | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: string, record: Record) => any;
|
|
22
|
+
editRender: () => null;
|
|
23
|
+
filterConfig: () => never[];
|
|
24
|
+
}
|
|
25
|
+
export default BsChildPic;
|