@kmkf-fe-packages/services-components 0.13.0-alpha.9 → 0.13.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/esm/components/Cascader/index.d.ts +3 -5
  2. package/dist/esm/components/Cascader/index.js +12 -16
  3. package/dist/esm/components/CommonMultiStatus/index.d.ts +9 -2
  4. package/dist/esm/components/CommonMultiStatus/index.js +16 -9
  5. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  6. package/dist/esm/components/GetFormItem/index.js +2 -4
  7. package/dist/esm/components/Input/index.d.ts +4 -5
  8. package/dist/esm/components/Input/index.js +9 -63
  9. package/dist/esm/factory.d.ts +3 -3
  10. package/dist/esm/factory.js +98 -98
  11. package/dist/esm/index.d.ts +0 -2
  12. package/dist/esm/index.js +0 -2
  13. package/dist/esm/type.d.ts +1 -2
  14. package/package.json +4 -4
  15. package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +0 -29
  16. package/dist/esm/components/BS/BsPosting/components/City/index.js +0 -72
  17. package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +0 -27
  18. package/dist/esm/components/BS/BsPosting/components/Detail/index.js +0 -70
  19. package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +0 -29
  20. package/dist/esm/components/BS/BsPosting/components/District/index.js +0 -72
  21. package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +0 -29
  22. package/dist/esm/components/BS/BsPosting/components/Province/index.js +0 -72
  23. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +0 -27
  24. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +0 -70
  25. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +0 -27
  26. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +0 -70
  27. package/dist/esm/components/BS/BsPosting/index.d.ts +0 -43
  28. package/dist/esm/components/BS/BsPosting/index.js +0 -106
  29. package/dist/esm/components/FlowTag/index.d.ts +0 -38
  30. package/dist/esm/components/FlowTag/index.js +0 -126
  31. package/dist/esm/service/api.d.ts +0 -1
  32. package/dist/esm/service/api.js +0 -9
  33. package/dist/esm/service/request.d.ts +0 -17
  34. package/dist/esm/service/request.js +0 -56
@@ -1,126 +0,0 @@
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 ItemView from "../../commonComponents/ItemView";
13
- import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
14
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import GetFormItem from "../GetFormItem";
16
- import { SYMBOL } from "../../constant";
17
- var TAG_MAP = {
18
- REMINDER: "催单",
19
- REJECT: "驳回"
20
- };
21
- var TAG_ICON_MAP = {
22
- REMINDER: "催单",
23
- REJECT: "驳回"
24
- };
25
- var FlowTag = /*#__PURE__*/_createClass(function FlowTag(options) {
26
- var _this = this;
27
- _classCallCheck(this, FlowTag);
28
- _defineProperty(this, "name", void 0);
29
- _defineProperty(this, "id", void 0);
30
- _defineProperty(this, "sortField", void 0);
31
- _defineProperty(this, "type", void 0);
32
- _defineProperty(this, "rules", void 0);
33
- _defineProperty(this, "componentConfig", void 0);
34
- _defineProperty(this, "effects", void 0);
35
- _defineProperty(this, "isCombinationComponent", void 0);
36
- _defineProperty(this, "formField", void 0);
37
- _defineProperty(this, "canSort", void 0);
38
- _defineProperty(this, "children", void 0);
39
- _defineProperty(this, "dataType", void 0);
40
- _defineProperty(this, "renderPc", function (value, record) {
41
- var tag = record === null || record === void 0 ? void 0 : record["".concat(_this.id)];
42
- if (!tag) return null;
43
- return tag.map(function (t) {
44
- return TAG_ICON_MAP[t];
45
- });
46
- });
47
- _defineProperty(this, "renderLog", function (r) {
48
- var tag = r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
49
- if (!tag) return null;
50
- return tag.map(function (t) {
51
- return TAG_ICON_MAP[t];
52
- });
53
- });
54
- _defineProperty(this, "getComponentValue", function (r) {
55
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
56
- });
57
- _defineProperty(this, "renderExport", function (value, record) {
58
- var tag = record === null || record === void 0 ? void 0 : record["".concat(_this.id)];
59
- return tag ? tag.map(function (t) {
60
- return TAG_MAP[t];
61
- }).join(",") : "--";
62
- });
63
- _defineProperty(this, "renderClient", function (record) {
64
- var _record;
65
- if (!isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
66
- var tagValue = record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.map(function (t) {
67
- return TAG_ICON_MAP[t];
68
- });
69
- return /*#__PURE__*/React.createElement(ItemView, {
70
- id: _this.id,
71
- label: _this.name,
72
- value: tagValue
73
- });
74
- });
75
- _defineProperty(this, "editRender", function (p) {
76
- var _this$componentConfig, _this$componentConfig2;
77
- return /*#__PURE__*/React.createElement(GetFormItem, {
78
- title: _this.name,
79
- name: _this.id,
80
- rules: _this.rules,
81
- hidden: p === null || p === void 0 ? void 0 : p.hidden,
82
- 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,
83
- component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
84
- placeholder: "\u8BF7\u9009\u62E9".concat(_this.name)
85
- }))
86
- });
87
- });
88
- _defineProperty(this, "filterConfig", function (item) {
89
- return {
90
- searchDefaultConditions: SYMBOL.in,
91
- type: item.type,
92
- id: item.id,
93
- // 过滤组件id
94
- name: item.name,
95
- // 过滤组件名称
96
- filterComponentType: "MultipleSelect",
97
- props: {
98
- options: [{
99
- label: "催单",
100
- value: "REMINDER"
101
- }, {
102
- label: "暂存",
103
- value: "REJECT"
104
- }]
105
- },
106
- filterFn: function filterFn(value) {
107
- return function (i) {
108
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
109
- };
110
- }
111
- };
112
- });
113
- this.name = "标签";
114
- this.id = (options === null || options === void 0 ? void 0 : options.id) || "markFlag";
115
- this.sortField = "markFlag";
116
- this.formField = "markFlag";
117
- this.type = "FLOW_TAG";
118
- this.effects = options.effects;
119
- this.rules = [];
120
- this.isCombinationComponent = false;
121
- this.canSort = false;
122
- this.children = [];
123
- this.componentConfig = _objectSpread({}, options.componentConfig);
124
- this.dataType = "string";
125
- });
126
- export default FlowTag;
@@ -1 +0,0 @@
1
- export declare const replaceCheck: (data: any) => Promise<any>;
@@ -1,9 +0,0 @@
1
- import request from "./request";
2
- // 重复校验
3
- export var replaceCheck = function replaceCheck(data) {
4
- return request({
5
- url: '/qy/gdfw/workOrder/repeatCheck',
6
- method: 'post',
7
- data: data
8
- });
9
- };
@@ -1,17 +0,0 @@
1
- interface RequestProps {
2
- url: string;
3
- method: string;
4
- data: any;
5
- headers?: any;
6
- infoLevel?: 'error' | 'warning' | 'quiet';
7
- options?: any;
8
- }
9
- export interface serverProps<T = any> {
10
- data?: T;
11
- result: number;
12
- success: boolean;
13
- traceId: string;
14
- [key: string]: any;
15
- }
16
- declare const requestApi: ({ url, method, data, headers, infoLevel, options }: RequestProps) => Promise<serverProps>;
17
- export default requestApi;
@@ -1,56 +0,0 @@
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 _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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- 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); }
7
- /*
8
- * @Description:
9
- * @Author: litian
10
- * @Date: 2022-09-06 09:29:34
11
- * @LastEditors: litian
12
- * @LastEditTime: 2022-11-24 09:11:45
13
- */
14
- import { extend } from 'umi-request';
15
- import { message } from 'antd';
16
- var request = extend({});
17
- var requestApi = function requestApi(_ref) {
18
- var url = _ref.url,
19
- method = _ref.method,
20
- data = _ref.data,
21
- _ref$headers = _ref.headers,
22
- headers = _ref$headers === void 0 ? {} : _ref$headers,
23
- _ref$infoLevel = _ref.infoLevel,
24
- infoLevel = _ref$infoLevel === void 0 ? 'error' : _ref$infoLevel,
25
- _ref$options = _ref.options,
26
- options = _ref$options === void 0 ? {} : _ref$options;
27
- return new Promise(function (resolve, reject) {
28
- var params = _objectSpread({
29
- method: method,
30
- headers: headers
31
- }, options);
32
- if (method.toLocaleLowerCase() === 'get') {
33
- params.params = data;
34
- } else {
35
- params.data = data;
36
- }
37
- request(url, params).then(function (res) {
38
- if (res.result === 100 || res.success) {
39
- resolve(res);
40
- } else {
41
- if (infoLevel === 'warning') {
42
- message.warn(res.message);
43
- } else if (infoLevel === 'error') {
44
- message.error(res.message);
45
- } else {
46
- console.log(res.message);
47
- }
48
- reject(res);
49
- }
50
- }).catch(function (e) {
51
- console.error('请求错误', e);
52
- reject(e);
53
- });
54
- });
55
- };
56
- export default requestApi;