@kmkf-fe-packages/services-components 0.7.15-alpha.5 → 0.7.15-alpha.51
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.js +23 -21
- package/dist/esm/components/BS/BsExchange/index.d.ts +6 -8
- package/dist/esm/components/BS/BsExchange/index.js +207 -116
- package/dist/esm/components/BS/BsGoods/index.d.ts +9 -9
- package/dist/esm/components/BS/BsGoods/index.js +82 -60
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
- package/dist/esm/components/BS/BsLogistics/index.js +14 -14
- package/dist/esm/components/BS/BsReissue/index.d.ts +8 -5
- package/dist/esm/components/BS/BsReissue/index.js +89 -50
- package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderCode.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderCode.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +28 -11
- package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderNumber.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderNumber.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +26 -10
- package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +27 -11
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -3
- package/dist/esm/components/BS/common/BsMemo.js +43 -13
- package/dist/esm/components/BS/common/BsType.d.ts +1 -0
- package/dist/esm/components/BS/common/BsType.js +34 -8
- package/dist/esm/components/BS/common/index.d.ts +10 -10
- package/dist/esm/components/BS/common/index.js +8 -8
- package/dist/esm/components/Cascader/index.d.ts +1 -0
- package/dist/esm/components/Cascader/index.js +3 -1
- package/dist/esm/components/Common/index.d.ts +5 -0
- package/dist/esm/components/Common/index.js +102 -2
- package/dist/esm/components/File/index.d.ts +4 -4
- package/dist/esm/components/File/index.js +29 -9
- package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
- package/dist/esm/components/FlowStatusSelect/index.js +30 -24
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
- package/dist/esm/components/FlowWorkOrderId/index.js +107 -0
- package/dist/esm/components/JST/JstLogistics/index.js +25 -8
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
- package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +6 -5
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
- package/dist/esm/components/Payment/BuyerNick.js +1 -2
- package/dist/esm/components/Payment/index.d.ts +1 -0
- package/dist/esm/components/Payment/index.js +9 -6
- package/dist/esm/components/PostIng/index.d.ts +6 -29
- package/dist/esm/components/PostIng/index.js +73 -77
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +6 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +15 -14
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildCode);
|
|
@@ -23,6 +29,14 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['code'] && prv.push(next['code']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildCode;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildMoney implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildMoney);
|
|
@@ -23,6 +29,14 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['money'] && prv.push(next['money']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildMoney;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildName implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildName);
|
|
@@ -23,6 +29,14 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,25 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['name'] && prv.push(next['name']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
|
|
66
|
+
console.log('renderExport', record, _this.id, _this.getComponentValue(record));
|
|
67
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
68
|
});
|
|
52
69
|
_defineProperty(this, "editRender", function () {
|
|
53
70
|
return null;
|
|
@@ -61,11 +78,11 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
61
78
|
this.formField = options.id;
|
|
62
79
|
this.type = options.type;
|
|
63
80
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
81
|
+
this.align = 'left';
|
|
65
82
|
this.width = 200;
|
|
66
83
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
84
|
+
this.canSort = false;
|
|
85
|
+
this.dataType = 'string';
|
|
69
86
|
this.children = [];
|
|
70
87
|
});
|
|
71
88
|
export default BsChildName;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildCode implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildCode);
|
|
@@ -23,6 +29,14 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['number'] && prv.push(next['number']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildCode;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildPic implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element[];
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element[] | null;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
16
|
import { BsGoodPic } from "../../Common";
|
|
11
|
-
import { isNull } from
|
|
17
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
18
|
var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
13
19
|
var _this = this;
|
|
14
20
|
_classCallCheck(this, BsChildPic);
|
|
@@ -24,6 +30,14 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
|
24
30
|
_defineProperty(this, "canSort", void 0);
|
|
25
31
|
_defineProperty(this, "children", void 0);
|
|
26
32
|
_defineProperty(this, "dataType", void 0);
|
|
33
|
+
_defineProperty(this, "getParentId", function () {
|
|
34
|
+
var _this$id$split = _this.id.split('_'),
|
|
35
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
36
|
+
key = _this$id$split2[0],
|
|
37
|
+
name = _this$id$split2[1],
|
|
38
|
+
code = _this$id$split2[2];
|
|
39
|
+
return "".concat(key, "_").concat(name);
|
|
40
|
+
});
|
|
27
41
|
_defineProperty(this, "renderClient", function (record) {
|
|
28
42
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
29
43
|
id: _this.id,
|
|
@@ -33,22 +47,24 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
|
33
47
|
});
|
|
34
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
35
49
|
var _BsGoodPic;
|
|
36
|
-
return (_BsGoodPic = BsGoodPic(_this.getComponentValue(record))) !== null && _BsGoodPic !== void 0 ? _BsGoodPic :
|
|
50
|
+
return (_BsGoodPic = BsGoodPic(_this.getComponentValue(record))) !== null && _BsGoodPic !== void 0 ? _BsGoodPic : '--';
|
|
37
51
|
});
|
|
38
52
|
_defineProperty(this, "renderLog", function (r) {
|
|
39
|
-
|
|
53
|
+
var id = _this.getParentId();
|
|
54
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
40
55
|
return _this.renderPc(undefined, r);
|
|
41
56
|
});
|
|
42
57
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
43
|
-
var
|
|
44
|
-
|
|
58
|
+
var id = _this.getParentId();
|
|
59
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
60
|
+
next['pic'] && prv.push(next['pic']);
|
|
45
61
|
return prv;
|
|
46
62
|
}, []);
|
|
47
63
|
return list;
|
|
48
64
|
});
|
|
49
65
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
50
66
|
var _this$getComponentVal;
|
|
51
|
-
return (_this$getComponentVal = _this.getComponentValue(record).join(
|
|
67
|
+
return (_this$getComponentVal = _this.getComponentValue(record).join(',')) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
|
|
52
68
|
});
|
|
53
69
|
_defineProperty(this, "editRender", function () {
|
|
54
70
|
return null;
|
|
@@ -62,11 +78,11 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
|
62
78
|
this.formField = options.id;
|
|
63
79
|
this.type = options.type;
|
|
64
80
|
this.componentConfig = options.componentConfig;
|
|
65
|
-
this.align =
|
|
81
|
+
this.align = 'left';
|
|
66
82
|
this.width = 200;
|
|
67
83
|
this.isCombinationComponent = false;
|
|
68
|
-
this.canSort =
|
|
69
|
-
this.dataType =
|
|
84
|
+
this.canSort = false;
|
|
85
|
+
this.dataType = 'string';
|
|
70
86
|
this.children = [];
|
|
71
87
|
});
|
|
72
88
|
export default BsChildPic;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildShare implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|