@kmkf-fe-packages/services-components 0.7.15-alpha.49 → 0.7.15-alpha.50

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.
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare class BasicFile implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -7,11 +7,11 @@ declare class BasicFile implements ComponentInterface {
7
7
  formField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
11
  isCombinationComponent: boolean;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
14
+ dataType: ComponentInterface['dataType'];
15
15
  constructor(options: PickOption);
16
16
  renderPc: (value: any, record: Record) => any;
17
17
  renderLog: (r: Record) => any;
@@ -1,16 +1,22 @@
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
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); }
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ 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."); }
5
+ 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); }
6
+ 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; }
7
+ 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; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
3
9
  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); } }
4
10
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
12
  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; }
7
13
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
14
  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); }
9
- import React from "react";
10
- import { ApaasUploadFile } from "@kmkf-fe-packages/basic-components";
15
+ import React from 'react';
16
+ import { ApaasUploadFile } from '@kmkf-fe-packages/basic-components';
11
17
  import GetFormItem from "../GetFormItem";
12
18
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
19
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
20
  var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
15
21
  var _this = this;
16
22
  _classCallCheck(this, BasicFile);
@@ -26,13 +32,16 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
26
32
  _defineProperty(this, "children", void 0);
27
33
  _defineProperty(this, "dataType", void 0);
28
34
  _defineProperty(this, "renderPc", function (value, record) {
29
- var fileList = (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [];
35
+ var fileList = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) || [];
30
36
  if (!fileList.length) {
31
37
  return /*#__PURE__*/React.createElement("span", null, "--");
32
38
  }
33
39
  return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
34
40
  return /*#__PURE__*/React.createElement("a", {
35
- href: file.url
41
+ href: file.url,
42
+ style: {
43
+ display: 'block'
44
+ }
36
45
  }, file.name);
37
46
  });
38
47
  });
@@ -44,10 +53,21 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
44
53
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_file")];
45
54
  });
46
55
  _defineProperty(this, "renderClient", function (record) {
47
- return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) ? /*#__PURE__*/React.createElement(ItemView, {
56
+ var _record$id;
57
+ var _this$id$split = _this.id.split('_'),
58
+ _this$id$split2 = _slicedToArray(_this$id$split, 1),
59
+ id = _this$id$split2[0];
60
+ return !isNull(record === null || record === void 0 ? void 0 : record[id]) ? /*#__PURE__*/React.createElement(ItemView, {
48
61
  id: _this.id,
49
62
  label: _this.name,
50
- value: _this.renderPc(null, record)
63
+ value: record === null || record === void 0 ? void 0 : (_record$id = record[id]) === null || _record$id === void 0 ? void 0 : _record$id.map(function (file) {
64
+ return /*#__PURE__*/React.createElement("a", {
65
+ href: file.url,
66
+ style: {
67
+ display: 'block'
68
+ }
69
+ }, file.name);
70
+ })
51
71
  }) : null;
52
72
  });
53
73
  _defineProperty(this, "editRender", function () {
@@ -68,7 +88,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
68
88
  prv.push(next.url);
69
89
  return prv;
70
90
  }, []);
71
- return textArr === null || textArr === void 0 ? void 0 : textArr.join(",");
91
+ return textArr === null || textArr === void 0 ? void 0 : textArr.join(',');
72
92
  });
73
93
  _defineProperty(this, "filterConfig", function () {
74
94
  return [];
@@ -83,6 +103,6 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
83
103
  this.isCombinationComponent = false;
84
104
  this.canSort = false;
85
105
  this.children = [];
86
- this.dataType = "array";
106
+ this.dataType = 'array';
87
107
  });
88
108
  export default BasicFile;
@@ -1,16 +1,16 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
- import TrajectoryCompany from "./trajectoryCompany";
5
- import TrajectoryCode from "./trajectoryCode";
6
- import TrajectorySnapshot from "./trajectorySnapshot";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
+ import TrajectoryCompany from './trajectoryCompany';
5
+ import TrajectoryCode from './trajectoryCode';
6
+ import TrajectorySnapshot from './trajectorySnapshot';
7
7
  declare class LogisticsTrajectory implements ComponentInterface {
8
8
  name: string;
9
9
  id: string;
10
10
  sortField: string;
11
11
  type: string;
12
12
  rules: any[];
13
- componentConfig: ComponentInterface["componentConfig"];
13
+ componentConfig: ComponentInterface['componentConfig'];
14
14
  expressDateInstance: InstanceType<typeof ExpressData>;
15
15
  express: TrajectoryCompany;
16
16
  expressCode: TrajectoryCode;
@@ -19,7 +19,7 @@ declare class LogisticsTrajectory implements ComponentInterface {
19
19
  formField: string;
20
20
  canSort: boolean;
21
21
  children: ComponentInterface[];
22
- dataType: ComponentInterface["dataType"];
22
+ dataType: ComponentInterface['dataType'];
23
23
  constructor(options: PickOption);
24
24
  editRender: (p: any) => React.JSX.Element;
25
25
  renderClient: (record: Record) => React.JSX.Element;
@@ -40,6 +40,7 @@ declare class LogisticsTrajectory implements ComponentInterface {
40
40
  props: {
41
41
  options: any[];
42
42
  };
43
+ filterFn: (value: string) => (i: Record) => boolean;
43
44
  } | {
44
45
  searchDefaultConditions: "like";
45
46
  type: string;
@@ -8,9 +8,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
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
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
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 { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
13
- import { LogisticsTrajectory as Trajectory } from "@kmkf-fe-packages/basic-components";
11
+ import React from 'react';
12
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { LogisticsTrajectory as Trajectory } from '@kmkf-fe-packages/basic-components';
14
14
  import TrajectoryCompany from "./trajectoryCompany";
15
15
  import TrajectoryCode from "./trajectoryCode";
16
16
  import TrajectorySnapshot from "./trajectorySnapshot";
@@ -67,7 +67,9 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
67
67
  return null;
68
68
  });
69
69
  _defineProperty(this, "filterConfig", function (item) {
70
- return [_this.express.filterConfig(item), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
70
+ return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
71
+ subKey: 'trajectoryCompany'
72
+ })), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
71
73
  });
72
74
  this.name = options.name;
73
75
  this.id = options.id;
@@ -90,15 +92,15 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
90
92
  }));
91
93
  this.isCombinationComponent = true;
92
94
  this.canSort = false;
93
- this.dataType = "object";
95
+ this.dataType = 'object';
94
96
  this.children = [this.express, this.expressCode, this.expressSnapshot];
95
97
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
96
98
  validator: function validator(_, value) {
97
99
  if (!value.trajectoryCompany) {
98
- return Promise.reject(new Error("请选择物流公司"));
100
+ return Promise.reject(new Error('请选择物流公司'));
99
101
  }
100
102
  if (!value.trajectoryCode) {
101
- return Promise.reject(new Error("请输入物流单号"));
103
+ return Promise.reject(new Error('请输入物流单号'));
102
104
  }
103
105
  return Promise.resolve();
104
106
  }
@@ -1,13 +1,13 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
- import React from "react";
3
- import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
+ import React from 'react';
3
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  declare class TrajectoryCompany implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
11
  align: ALignType;
12
12
  expressDateInstance: InstanceType<typeof ExpressData>;
13
13
  width: number;
@@ -15,8 +15,8 @@ declare class TrajectoryCompany implements ComponentInterface {
15
15
  formField: string;
16
16
  canSort: boolean;
17
17
  children: ComponentInterface[];
18
- dataType: ComponentInterface["dataType"];
19
- options: ComponentInterface["options"];
18
+ dataType: ComponentInterface['dataType'];
19
+ options: ComponentInterface['options'];
20
20
  constructor(options: PickOption);
21
21
  renderClient: (record: any) => React.JSX.Element | null;
22
22
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -33,6 +33,7 @@ declare class TrajectoryCompany implements ComponentInterface {
33
33
  props: {
34
34
  options: any[];
35
35
  };
36
+ filterFn: (value: string) => (i: Record) => boolean;
36
37
  };
37
38
  }
38
39
  export default TrajectoryCompany;
@@ -5,10 +5,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
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 { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
8
+ import React from 'react';
9
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
10
10
  import ItemView from "../../commonComponents/ItemView";
11
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
12
12
  import { SYMBOL } from "../../constant";
13
13
  var TrajectoryCompany = /*#__PURE__*/_createClass(function TrajectoryCompany(options) {
14
14
  var _this = this;
@@ -55,14 +55,20 @@ var TrajectoryCompany = /*#__PURE__*/_createClass(function TrajectoryCompany(opt
55
55
  return null;
56
56
  });
57
57
  _defineProperty(this, "filterConfig", function (item) {
58
+ var subKey = item.subKey;
58
59
  return {
59
60
  searchDefaultConditions: SYMBOL.in,
60
61
  type: item.type,
61
- id: item.id,
62
+ id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
62
63
  name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
63
- filterComponentType: "MultipleSelect",
64
+ filterComponentType: 'MultipleSelect',
64
65
  props: {
65
66
  options: _this.expressDateInstance.getExpressData() || []
67
+ },
68
+ filterFn: function filterFn(value) {
69
+ return function (i) {
70
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)), value);
71
+ };
66
72
  }
67
73
  };
68
74
  });
@@ -73,13 +79,13 @@ var TrajectoryCompany = /*#__PURE__*/_createClass(function TrajectoryCompany(opt
73
79
  this.type = options.type;
74
80
  this.componentConfig = options.componentConfig;
75
81
  this.rules = [];
76
- this.align = "left";
82
+ this.align = 'left';
77
83
  this.expressDateInstance = ExpressData.getInstance();
78
84
  this.width = 200;
79
85
  this.isCombinationComponent = false;
80
86
  this.canSort = false;
81
87
  this.children = [];
82
- this.dataType = "string";
88
+ this.dataType = 'string';
83
89
  this.options = this.expressDateInstance.getExpressData() || [];
84
90
  });
85
91
  export default TrajectoryCompany;
@@ -1,18 +1,18 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  declare class BasicPosting implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  addressDateInstance: InstanceType<typeof AddressData>;
17
17
  constructor(options: PickOption);
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -28,29 +28,6 @@ declare class BasicPosting implements ComponentInterface {
28
28
  renderExport: (value: any, record: Record) => string | null;
29
29
  renderClient: (record: any) => React.JSX.Element | null;
30
30
  editRender: (p: any) => React.JSX.Element;
31
- filterConfig: (item: ColumnConfig) => ({
32
- searchDefaultConditions: "eq";
33
- type: string;
34
- id: string;
35
- name: string;
36
- filterComponentType: "Cascader";
37
- props: {
38
- options: any;
39
- fieldNames: {
40
- label: string;
41
- value: string;
42
- children: string;
43
- };
44
- };
45
- formatFilterValue: (val: Array<number>) => number | undefined;
46
- } | {
47
- searchDefaultConditions: "like";
48
- type: string;
49
- id: string;
50
- name: string;
51
- filterComponentType: "Input";
52
- props?: undefined;
53
- formatFilterValue?: undefined;
54
- })[];
31
+ filterConfig: (item: ColumnConfig) => never[];
55
32
  }
56
33
  export default BasicPosting;
@@ -6,29 +6,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
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); }
9
- import React from "react";
10
- import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
9
+ import React from 'react';
10
+ import { ApaasPosting } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
- import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
15
- import { SYMBOL } from "../../constant";
13
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { AddressData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
16
15
  var typeMap = {
17
16
  POSTING: {
18
- province: "postingProvince",
19
- city: "postingCity",
20
- district: "postingDistrict",
21
- detail: "postingDetail",
22
- name: "postingReceiverName",
23
- mobile: "postingReceiverMobile"
17
+ province: 'postingProvince',
18
+ city: 'postingCity',
19
+ district: 'postingDistrict',
20
+ detail: 'postingDetail',
21
+ name: 'postingReceiverName',
22
+ mobile: 'postingReceiverMobile'
24
23
  },
25
24
  BS_POSTING: {
26
- province: "bsPostingProvince",
27
- city: "bsPostingCity",
28
- district: "bsPostingDistrict",
29
- detail: "bsPostingDetail",
30
- name: "bsPostingReceiverName",
31
- mobile: "bsPostingReceiverMobile"
25
+ province: 'bsPostingProvince',
26
+ city: 'bsPostingCity',
27
+ district: 'bsPostingDistrict',
28
+ detail: 'bsPostingDetail',
29
+ name: 'bsPostingReceiverName',
30
+ mobile: 'bsPostingReceiverMobile'
32
31
  }
33
32
  };
34
33
  var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
@@ -60,7 +59,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
60
59
  }
61
60
  var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
62
61
  return _this.addressDateInstance.getNameByCode(suffix);
63
- }).join("");
62
+ }).join('');
64
63
  return /*#__PURE__*/React.createElement("span", null, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile));
65
64
  });
66
65
  _defineProperty(this, "renderLog", function (r) {
@@ -77,7 +76,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
77
76
  })) return null;
78
77
  var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
79
78
  return _this.addressDateInstance.getNameByCode(suffix);
80
- }).join("");
79
+ }).join('');
81
80
  return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
82
81
  });
83
82
  _defineProperty(this, "getComponentValue", function (r) {
@@ -86,9 +85,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
86
85
  province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.province)],
87
86
  city: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.city)],
88
87
  district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.district)],
89
- detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) || "",
90
- name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) || "",
91
- mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) || ""
88
+ detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) || '',
89
+ name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) || '',
90
+ mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) || ''
92
91
  };
93
92
  });
94
93
  _defineProperty(this, "renderExport", function (value, record) {
@@ -105,7 +104,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
105
104
  })) return null;
106
105
  var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
107
106
  return _this.addressDateInstance.getNameByCode(suffix);
108
- }).join("");
107
+ }).join('');
109
108
  return "".concat(addressText).concat(detail, " ").concat(name).concat(mobile);
110
109
  });
111
110
  _defineProperty(this, "renderClient", function (record) {
@@ -118,9 +117,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
118
117
  var mobile = record["".concat(_this.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.mobile)];
119
118
  var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
120
119
  return _this.addressDateInstance.getNameByCode(suffix);
121
- }).join("");
120
+ }).join('');
122
121
  var hasValue = addressText || detail || name || mobile;
123
- var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
122
+ var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join('/'), /*#__PURE__*/React.createElement("br", null), [name, mobile].join('/')) : null;
124
123
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
125
124
  id: _this.id,
126
125
  label: _this.name,
@@ -136,58 +135,55 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
136
135
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
137
136
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
138
137
  component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
139
- type: _this.type === "POSTING" ? "workOrder" : "bs"
138
+ type: _this.type === 'POSTING' ? 'workOrder' : 'bs'
140
139
  }))
141
140
  });
142
141
  });
143
142
  _defineProperty(this, "filterConfig", function (item) {
144
- var _typeMap$_this$type19, _typeMap$_this$type20, _typeMap$_this$type21, _typeMap$_this$type22;
145
- return [{
146
- searchDefaultConditions: SYMBOL.eq,
147
- type: item.type,
148
- id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.district),
149
- // 过滤组件id
150
- name: "".concat(item.name, "-\u7701\u5E02\u533A"),
151
- // 过滤组件名称
152
- filterComponentType: "Cascader",
153
- props: {
154
- options: _this.addressDateInstance.addressOptions || [],
155
- fieldNames: {
156
- label: "label",
157
- value: "value",
158
- children: "children"
159
- }
160
- },
161
- formatFilterValue: function formatFilterValue(val) {
162
- if ((val === null || val === void 0 ? void 0 : val.length) > 2) {
163
- return val === null || val === void 0 ? void 0 : val[2];
164
- }
165
- }
166
- }, {
167
- searchDefaultConditions: SYMBOL.like,
168
- type: item.type,
169
- id: "".concat(item.id, "_").concat((_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.detail),
170
- // 过滤组件id
171
- name: "".concat(item.name, "-\u8BE6\u7EC6\u5730\u5740"),
172
- // 过滤组件名称
173
- filterComponentType: "Input"
174
- }, {
175
- searchDefaultConditions: SYMBOL.like,
176
- type: item.type,
177
- id: "".concat(item.id, "_").concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name),
178
- // 过滤组件id
179
- name: "".concat(item.name, "-\u59D3\u540D"),
180
- // 过滤组件名称
181
- filterComponentType: "Input"
182
- }, {
183
- searchDefaultConditions: SYMBOL.like,
184
- type: item.type,
185
- id: "".concat(item.id, "_").concat((_typeMap$_this$type22 = typeMap[_this.type]) === null || _typeMap$_this$type22 === void 0 ? void 0 : _typeMap$_this$type22.mobile),
186
- // 过滤组件id
187
- name: "".concat(item.name, "-\u7535\u8BDD"),
188
- // 过滤组件名称
189
- filterComponentType: "Input"
190
- }];
143
+ return [];
144
+ // return [
145
+ // {
146
+ // searchDefaultConditions: SYMBOL.eq as "eq",
147
+ // type: item.type,
148
+ // id: `${item.id}_${typeMap[this.type]?.district}`, // 过滤组件id
149
+ // name: `${item.name}-省市区`, // 过滤组件名称
150
+ // filterComponentType: "Cascader" as const,
151
+ // props: {
152
+ // options: (this.addressDateInstance.addressOptions as any) || [],
153
+ // fieldNames: {
154
+ // label: "label",
155
+ // value: "value",
156
+ // children: "children",
157
+ // },
158
+ // },
159
+ // formatFilterValue: (val: Array<number>) => {
160
+ // if (val?.length > 2) {
161
+ // return val?.[2];
162
+ // }
163
+ // },
164
+ // },
165
+ // {
166
+ // searchDefaultConditions: SYMBOL.like as "like",
167
+ // type: item.type,
168
+ // id: `${item.id}_${typeMap[this.type]?.detail}`, // 过滤组件id
169
+ // name: `${item.name}-详细地址`, // 过滤组件名称
170
+ // filterComponentType: "Input" as const,
171
+ // },
172
+ // {
173
+ // searchDefaultConditions: SYMBOL.like as "like",
174
+ // type: item.type,
175
+ // id: `${item.id}_${typeMap[this.type]?.name}`, // 过滤组件id
176
+ // name: `${item.name}-姓名`, // 过滤组件名称
177
+ // filterComponentType: "Input" as const,
178
+ // },
179
+ // {
180
+ // searchDefaultConditions: SYMBOL.like as "like",
181
+ // type: item.type,
182
+ // id: `${item.id}_${typeMap[this.type]?.mobile}`, // 过滤组件id
183
+ // name: `${item.name}-电话`, // 过滤组件名称
184
+ // filterComponentType: "Input" as const,
185
+ // },
186
+ // ];
191
187
  });
192
188
  this.name = options.name;
193
189
  this.id = options.id;
@@ -196,15 +192,15 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
196
192
  this.type = options.type;
197
193
  this.componentConfig = options.componentConfig;
198
194
  this.isCombinationComponent = false;
199
- this.canSort = true;
195
+ this.canSort = false;
200
196
  this.children = [];
201
- this.dataType = "string";
202
- this.addressDateInstance = options.type === "BS_POSTING" ? BsAddressData.getInstance() : AddressData.getInstance();
197
+ this.dataType = 'string';
198
+ this.addressDateInstance = options.type === 'BS_POSTING' ? BsAddressData.getInstance() : AddressData.getInstance();
203
199
  this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
204
200
  validator: function validator(_, value) {
205
201
  var _value$postingAddress;
206
202
  if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
207
- return Promise.reject(new Error("请填写地址"));
203
+ return Promise.reject(new Error('请填写地址'));
208
204
  }
209
205
  return Promise.resolve();
210
206
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.49",
3
+ "version": "0.7.15-alpha.50",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.49",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.49"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.50",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.50"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "83a1112fe9ef93e93431e2c4ae163b9b4e5bc0c8"
43
+ "gitHead": "e2bde9f9f75f470cdeeebb9731976a09360fbeef"
44
44
  }