@bit-sun/business-component 1.0.5 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.umirc.ts +1 -1
- package/dist/{DataValidation → components/DataValidation}/index.d.ts +0 -1
- package/dist/components/QueryMutipleInput/index.d.ts +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +168 -65
- package/dist/index.js +166 -62
- package/package.json +3 -4
- package/src/{DataValidation → components/DataValidation}/index.less +0 -0
- package/src/{DataValidation → components/DataValidation}/index.md +8 -3
- package/src/{DataValidation → components/DataValidation}/index.tsx +2 -2
- package/src/components/QueryMutipleInput/index.less +37 -0
- package/src/components/QueryMutipleInput/index.md +33 -0
- package/src/components/QueryMutipleInput/index.tsx +128 -0
- package/src/index.ts +3 -2
package/.umirc.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as DataValidation } from './DataValidation';
|
|
1
|
+
export { default as DataValidation } from './components/DataValidation';
|
|
2
|
+
export { default as QueryMutipleInput } from './components/QueryMutipleInput';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import React, { createContext, useContext, useEffect, forwardRef, createElement } from 'react';
|
|
3
|
-
import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox } from 'antd';
|
|
2
|
+
import React, { createContext, useContext, useEffect, forwardRef, createElement, useState } from 'react';
|
|
3
|
+
import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal } from 'antd';
|
|
4
4
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
5
|
-
import 'antd/dist/antd.css';
|
|
6
5
|
import classNames from 'classnames';
|
|
6
|
+
import { useDebounceFn } from 'ahooks';
|
|
7
7
|
|
|
8
8
|
function ownKeys(object, enumerableOnly) {
|
|
9
9
|
var keys = Object.keys(object);
|
|
10
10
|
|
|
11
11
|
if (Object.getOwnPropertySymbols) {
|
|
12
12
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
keys.push.apply(keys, symbols);
|
|
13
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
14
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
15
|
+
})), keys.push.apply(keys, symbols);
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
return keys;
|
|
@@ -25,19 +20,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
25
20
|
|
|
26
21
|
function _objectSpread2(target) {
|
|
27
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
-
var source = arguments[i]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
35
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
36
|
-
} else {
|
|
37
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
38
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
39
|
-
});
|
|
40
|
-
}
|
|
23
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
24
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
25
|
+
_defineProperty(target, key, source[key]);
|
|
26
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
27
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
28
|
+
});
|
|
41
29
|
}
|
|
42
30
|
|
|
43
31
|
return target;
|
|
@@ -62,6 +50,9 @@ function _defineProperties(target, props) {
|
|
|
62
50
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
63
51
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
64
52
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
53
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
54
|
+
writable: false
|
|
55
|
+
});
|
|
65
56
|
return Constructor;
|
|
66
57
|
}
|
|
67
58
|
|
|
@@ -85,12 +76,15 @@ function _inherits(subClass, superClass) {
|
|
|
85
76
|
throw new TypeError("Super expression must either be null or a function");
|
|
86
77
|
}
|
|
87
78
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
Object.defineProperty(subClass, "prototype", {
|
|
80
|
+
value: Object.create(superClass && superClass.prototype, {
|
|
81
|
+
constructor: {
|
|
82
|
+
value: subClass,
|
|
83
|
+
writable: true,
|
|
84
|
+
configurable: true
|
|
85
|
+
}
|
|
86
|
+
}),
|
|
87
|
+
writable: false
|
|
94
88
|
});
|
|
95
89
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
96
90
|
}
|
|
@@ -294,14 +288,9 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
294
288
|
|
|
295
289
|
if (Object.getOwnPropertySymbols) {
|
|
296
290
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
keys.push.apply(keys, symbols);
|
|
291
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
292
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
293
|
+
})), keys.push.apply(keys, symbols);
|
|
305
294
|
}
|
|
306
295
|
|
|
307
296
|
return keys;
|
|
@@ -309,19 +298,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
309
298
|
|
|
310
299
|
function _objectSpread2$1(target) {
|
|
311
300
|
for (var i = 1; i < arguments.length; i++) {
|
|
312
|
-
var source = arguments[i]
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
319
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
320
|
-
} else {
|
|
321
|
-
ownKeys$1(Object(source)).forEach(function (key) {
|
|
322
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
323
|
-
});
|
|
324
|
-
}
|
|
301
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
302
|
+
i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
303
|
+
_defineProperty$1(target, key, source[key]);
|
|
304
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
|
|
305
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
306
|
+
});
|
|
325
307
|
}
|
|
326
308
|
|
|
327
309
|
return target;
|
|
@@ -425,17 +407,11 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
425
407
|
function _typeof(obj) {
|
|
426
408
|
"@babel/helpers - typeof";
|
|
427
409
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
_typeof = function _typeof(obj) {
|
|
434
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
return _typeof(obj);
|
|
410
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
411
|
+
return typeof obj;
|
|
412
|
+
} : function (obj) {
|
|
413
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
414
|
+
}, _typeof(obj);
|
|
439
415
|
}
|
|
440
416
|
|
|
441
417
|
/**
|
|
@@ -1620,7 +1596,7 @@ var itemsTemp = []; // const mapping = [
|
|
|
1620
1596
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
1621
1597
|
// ]
|
|
1622
1598
|
|
|
1623
|
-
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量']]); // for dnd
|
|
1599
|
+
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例']]); // for dnd
|
|
1624
1600
|
|
|
1625
1601
|
|
|
1626
1602
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
@@ -2168,14 +2144,141 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2168
2144
|
return DataValidation;
|
|
2169
2145
|
}(React.Component);
|
|
2170
2146
|
|
|
2147
|
+
var css_248z$1 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
|
|
2148
|
+
styleInject(css_248z$1);
|
|
2149
|
+
|
|
2150
|
+
var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
2151
|
+
var onValueChange = _ref.onValueChange;
|
|
2152
|
+
|
|
2153
|
+
var _useState = useState(false),
|
|
2154
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2155
|
+
isModalVisible = _useState2[0],
|
|
2156
|
+
setIsModalVisible = _useState2[1];
|
|
2157
|
+
|
|
2158
|
+
var _useState3 = useState(''),
|
|
2159
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2160
|
+
value = _useState4[0],
|
|
2161
|
+
setValue = _useState4[1];
|
|
2162
|
+
|
|
2163
|
+
var _useState5 = useState(''),
|
|
2164
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2165
|
+
popvalue = _useState6[0],
|
|
2166
|
+
setPopValue = _useState6[1];
|
|
2167
|
+
|
|
2168
|
+
var _useDebounceFn = useDebounceFn(function () {
|
|
2169
|
+
formaData(value);
|
|
2170
|
+
}, {
|
|
2171
|
+
wait: 1000
|
|
2172
|
+
}),
|
|
2173
|
+
run = _useDebounceFn.run;
|
|
2174
|
+
|
|
2175
|
+
useEffect(function () {
|
|
2176
|
+
setPopValue(value);
|
|
2177
|
+
onValueChange(value);
|
|
2178
|
+
}, [value]);
|
|
2179
|
+
|
|
2180
|
+
var handleOk = function handleOk() {
|
|
2181
|
+
formaData(popvalue);
|
|
2182
|
+
setIsModalVisible(false);
|
|
2183
|
+
};
|
|
2184
|
+
|
|
2185
|
+
var formaData = function formaData(value) {
|
|
2186
|
+
var formatValue = ToCDB(value).split(/[/\n/\s,;]/).filter(function (item) {
|
|
2187
|
+
return item;
|
|
2188
|
+
}).join(',');
|
|
2189
|
+
setValue(formatValue);
|
|
2190
|
+
};
|
|
2191
|
+
|
|
2192
|
+
var handleCancel = function handleCancel() {
|
|
2193
|
+
setIsModalVisible(false);
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
var outerChange = function outerChange(e) {
|
|
2197
|
+
setValue(e.target.value);
|
|
2198
|
+
run();
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
var onChange = function onChange(e) {
|
|
2202
|
+
setPopValue(e.target.value);
|
|
2203
|
+
};
|
|
2204
|
+
|
|
2205
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2206
|
+
className: 'query_input'
|
|
2207
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2208
|
+
class: "query_input_show"
|
|
2209
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
2210
|
+
value: value,
|
|
2211
|
+
onChange: outerChange,
|
|
2212
|
+
onBlur: function onBlur(e) {
|
|
2213
|
+
formaData(e.target.value);
|
|
2214
|
+
},
|
|
2215
|
+
onPaste: function onPaste(e) {
|
|
2216
|
+
formaData(e.clipboardData.getData('text'));
|
|
2217
|
+
e.preventDefault();
|
|
2218
|
+
},
|
|
2219
|
+
style: {
|
|
2220
|
+
width: 'calc(100% - 30px)'
|
|
2221
|
+
},
|
|
2222
|
+
placeholder: "\u8BF7\u8F93\u5165\uFF08\u67E5\u8BE2\u591A\u4E2A\u503C\u8BF7\u7528 ; \u6216 , \u5206\u5272\uFF09"
|
|
2223
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
2224
|
+
style: {
|
|
2225
|
+
width: '30px',
|
|
2226
|
+
padding: '2px',
|
|
2227
|
+
height: 'auto'
|
|
2228
|
+
},
|
|
2229
|
+
type: "primary"
|
|
2230
|
+
}, "...")), /*#__PURE__*/React.createElement(Modal, {
|
|
2231
|
+
width: 600,
|
|
2232
|
+
title: "\u591A\u503C\u5F55\u5165",
|
|
2233
|
+
visible: isModalVisible,
|
|
2234
|
+
onOk: handleOk,
|
|
2235
|
+
onCancel: handleCancel,
|
|
2236
|
+
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
2237
|
+
key: "back",
|
|
2238
|
+
onClick: handleCancel
|
|
2239
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
2240
|
+
key: "submit",
|
|
2241
|
+
type: "primary",
|
|
2242
|
+
onClick: handleOk
|
|
2243
|
+
}, "\u5F55\u5165")]
|
|
2244
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2245
|
+
className: 'query_input_wrapper'
|
|
2246
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2247
|
+
className: 'query_input_wrapper_left'
|
|
2248
|
+
}, "\u5F55\u5165\u533A\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
2249
|
+
className: 'query_input_wrapper_right'
|
|
2250
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u5982\u9700\u540C\u65F6\u4F7F\u7528\u591A\u4E2A\u503C\u8FDB\u884C\u67E5\u8BE2\uFF0C\u8BF7\u4F7F\u7528\u9017\u53F7\u3001\u5206\u53F7\u3001\u7A7A\u683C\u6216\u6362\u884C\u8FDB\u884C\u503C\u7684\u5206\u9694\uFF0C\u4E2D\u82F1\u6587\u683C\u5F0F\u7684\u7B26\u53F7\u5747\u652F\u6301"), /*#__PURE__*/React.createElement("div", {
|
|
2251
|
+
className: 'query_input_textArea'
|
|
2252
|
+
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
2253
|
+
value: popvalue,
|
|
2254
|
+
onChange: onChange,
|
|
2255
|
+
rows: 6,
|
|
2256
|
+
showCount: true
|
|
2257
|
+
}))))));
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2260
|
+
function ToCDB(str) {
|
|
2261
|
+
var tmp = '';
|
|
2262
|
+
|
|
2263
|
+
for (var i = 0; i < str.length; i++) {
|
|
2264
|
+
if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
|
|
2265
|
+
tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
|
|
2266
|
+
} else {
|
|
2267
|
+
tmp += String.fromCharCode(str.charCodeAt(i));
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
return tmp;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2171
2274
|
/*
|
|
2172
2275
|
* @Description:
|
|
2173
2276
|
* @Author: rodchen
|
|
2174
2277
|
* @Date: 2021-11-30 22:59:39
|
|
2175
|
-
* @LastEditTime: 2021-12-
|
|
2278
|
+
* @LastEditTime: 2021-12-29 17:43:01
|
|
2176
2279
|
* @LastEditors: rodchen
|
|
2177
2280
|
*/
|
|
2178
2281
|
var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
|
|
2179
2282
|
axios.defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
2180
2283
|
|
|
2181
|
-
export { DataValidation };
|
|
2284
|
+
export { DataValidation, QueryMutipleInput };
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ var axios = require('axios');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var antd = require('antd');
|
|
8
8
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
9
|
-
require('antd/dist/antd.css');
|
|
10
9
|
var classNames = require('classnames');
|
|
10
|
+
var ahooks = require('ahooks');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
@@ -20,14 +20,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
20
20
|
|
|
21
21
|
if (Object.getOwnPropertySymbols) {
|
|
22
22
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
keys.push.apply(keys, symbols);
|
|
23
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
24
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
25
|
+
})), keys.push.apply(keys, symbols);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
return keys;
|
|
@@ -35,19 +30,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
35
30
|
|
|
36
31
|
function _objectSpread2(target) {
|
|
37
32
|
for (var i = 1; i < arguments.length; i++) {
|
|
38
|
-
var source = arguments[i]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
33
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
34
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
35
|
+
_defineProperty(target, key, source[key]);
|
|
36
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
37
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
38
|
+
});
|
|
51
39
|
}
|
|
52
40
|
|
|
53
41
|
return target;
|
|
@@ -72,6 +60,9 @@ function _defineProperties(target, props) {
|
|
|
72
60
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
73
61
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
74
62
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
63
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
64
|
+
writable: false
|
|
65
|
+
});
|
|
75
66
|
return Constructor;
|
|
76
67
|
}
|
|
77
68
|
|
|
@@ -95,12 +86,15 @@ function _inherits(subClass, superClass) {
|
|
|
95
86
|
throw new TypeError("Super expression must either be null or a function");
|
|
96
87
|
}
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
Object.defineProperty(subClass, "prototype", {
|
|
90
|
+
value: Object.create(superClass && superClass.prototype, {
|
|
91
|
+
constructor: {
|
|
92
|
+
value: subClass,
|
|
93
|
+
writable: true,
|
|
94
|
+
configurable: true
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
writable: false
|
|
104
98
|
});
|
|
105
99
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
106
100
|
}
|
|
@@ -304,14 +298,9 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
304
298
|
|
|
305
299
|
if (Object.getOwnPropertySymbols) {
|
|
306
300
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
keys.push.apply(keys, symbols);
|
|
301
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
302
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
303
|
+
})), keys.push.apply(keys, symbols);
|
|
315
304
|
}
|
|
316
305
|
|
|
317
306
|
return keys;
|
|
@@ -319,19 +308,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
319
308
|
|
|
320
309
|
function _objectSpread2$1(target) {
|
|
321
310
|
for (var i = 1; i < arguments.length; i++) {
|
|
322
|
-
var source = arguments[i]
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
329
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
330
|
-
} else {
|
|
331
|
-
ownKeys$1(Object(source)).forEach(function (key) {
|
|
332
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
333
|
-
});
|
|
334
|
-
}
|
|
311
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
312
|
+
i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
313
|
+
_defineProperty$1(target, key, source[key]);
|
|
314
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
|
|
315
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
316
|
+
});
|
|
335
317
|
}
|
|
336
318
|
|
|
337
319
|
return target;
|
|
@@ -435,17 +417,11 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
435
417
|
function _typeof(obj) {
|
|
436
418
|
"@babel/helpers - typeof";
|
|
437
419
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
_typeof = function _typeof(obj) {
|
|
444
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
return _typeof(obj);
|
|
420
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
421
|
+
return typeof obj;
|
|
422
|
+
} : function (obj) {
|
|
423
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
424
|
+
}, _typeof(obj);
|
|
449
425
|
}
|
|
450
426
|
|
|
451
427
|
/**
|
|
@@ -1630,7 +1606,7 @@ var itemsTemp = []; // const mapping = [
|
|
|
1630
1606
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
1631
1607
|
// ]
|
|
1632
1608
|
|
|
1633
|
-
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量']]); // for dnd
|
|
1609
|
+
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例']]); // for dnd
|
|
1634
1610
|
|
|
1635
1611
|
|
|
1636
1612
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
@@ -2178,14 +2154,142 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2178
2154
|
return DataValidation;
|
|
2179
2155
|
}(React__default['default'].Component);
|
|
2180
2156
|
|
|
2157
|
+
var css_248z$1 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
|
|
2158
|
+
styleInject(css_248z$1);
|
|
2159
|
+
|
|
2160
|
+
var QueryMutipleInput = function QueryMutipleInput(_ref) {
|
|
2161
|
+
var onValueChange = _ref.onValueChange;
|
|
2162
|
+
|
|
2163
|
+
var _useState = React.useState(false),
|
|
2164
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2165
|
+
isModalVisible = _useState2[0],
|
|
2166
|
+
setIsModalVisible = _useState2[1];
|
|
2167
|
+
|
|
2168
|
+
var _useState3 = React.useState(''),
|
|
2169
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2170
|
+
value = _useState4[0],
|
|
2171
|
+
setValue = _useState4[1];
|
|
2172
|
+
|
|
2173
|
+
var _useState5 = React.useState(''),
|
|
2174
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2175
|
+
popvalue = _useState6[0],
|
|
2176
|
+
setPopValue = _useState6[1];
|
|
2177
|
+
|
|
2178
|
+
var _useDebounceFn = ahooks.useDebounceFn(function () {
|
|
2179
|
+
formaData(value);
|
|
2180
|
+
}, {
|
|
2181
|
+
wait: 1000
|
|
2182
|
+
}),
|
|
2183
|
+
run = _useDebounceFn.run;
|
|
2184
|
+
|
|
2185
|
+
React.useEffect(function () {
|
|
2186
|
+
setPopValue(value);
|
|
2187
|
+
onValueChange(value);
|
|
2188
|
+
}, [value]);
|
|
2189
|
+
|
|
2190
|
+
var handleOk = function handleOk() {
|
|
2191
|
+
formaData(popvalue);
|
|
2192
|
+
setIsModalVisible(false);
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2195
|
+
var formaData = function formaData(value) {
|
|
2196
|
+
var formatValue = ToCDB(value).split(/[/\n/\s,;]/).filter(function (item) {
|
|
2197
|
+
return item;
|
|
2198
|
+
}).join(',');
|
|
2199
|
+
setValue(formatValue);
|
|
2200
|
+
};
|
|
2201
|
+
|
|
2202
|
+
var handleCancel = function handleCancel() {
|
|
2203
|
+
setIsModalVisible(false);
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2206
|
+
var outerChange = function outerChange(e) {
|
|
2207
|
+
setValue(e.target.value);
|
|
2208
|
+
run();
|
|
2209
|
+
};
|
|
2210
|
+
|
|
2211
|
+
var onChange = function onChange(e) {
|
|
2212
|
+
setPopValue(e.target.value);
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2216
|
+
className: 'query_input'
|
|
2217
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2218
|
+
class: "query_input_show"
|
|
2219
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
2220
|
+
value: value,
|
|
2221
|
+
onChange: outerChange,
|
|
2222
|
+
onBlur: function onBlur(e) {
|
|
2223
|
+
formaData(e.target.value);
|
|
2224
|
+
},
|
|
2225
|
+
onPaste: function onPaste(e) {
|
|
2226
|
+
formaData(e.clipboardData.getData('text'));
|
|
2227
|
+
e.preventDefault();
|
|
2228
|
+
},
|
|
2229
|
+
style: {
|
|
2230
|
+
width: 'calc(100% - 30px)'
|
|
2231
|
+
},
|
|
2232
|
+
placeholder: "\u8BF7\u8F93\u5165\uFF08\u67E5\u8BE2\u591A\u4E2A\u503C\u8BF7\u7528 ; \u6216 , \u5206\u5272\uFF09"
|
|
2233
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
2234
|
+
style: {
|
|
2235
|
+
width: '30px',
|
|
2236
|
+
padding: '2px',
|
|
2237
|
+
height: 'auto'
|
|
2238
|
+
},
|
|
2239
|
+
type: "primary"
|
|
2240
|
+
}, "...")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
2241
|
+
width: 600,
|
|
2242
|
+
title: "\u591A\u503C\u5F55\u5165",
|
|
2243
|
+
visible: isModalVisible,
|
|
2244
|
+
onOk: handleOk,
|
|
2245
|
+
onCancel: handleCancel,
|
|
2246
|
+
footer: [/*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
2247
|
+
key: "back",
|
|
2248
|
+
onClick: handleCancel
|
|
2249
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
2250
|
+
key: "submit",
|
|
2251
|
+
type: "primary",
|
|
2252
|
+
onClick: handleOk
|
|
2253
|
+
}, "\u5F55\u5165")]
|
|
2254
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2255
|
+
className: 'query_input_wrapper'
|
|
2256
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2257
|
+
className: 'query_input_wrapper_left'
|
|
2258
|
+
}, "\u5F55\u5165\u533A\uFF1A"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2259
|
+
className: 'query_input_wrapper_right'
|
|
2260
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, "\u5982\u9700\u540C\u65F6\u4F7F\u7528\u591A\u4E2A\u503C\u8FDB\u884C\u67E5\u8BE2\uFF0C\u8BF7\u4F7F\u7528\u9017\u53F7\u3001\u5206\u53F7\u3001\u7A7A\u683C\u6216\u6362\u884C\u8FDB\u884C\u503C\u7684\u5206\u9694\uFF0C\u4E2D\u82F1\u6587\u683C\u5F0F\u7684\u7B26\u53F7\u5747\u652F\u6301"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2261
|
+
className: 'query_input_textArea'
|
|
2262
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input.TextArea, {
|
|
2263
|
+
value: popvalue,
|
|
2264
|
+
onChange: onChange,
|
|
2265
|
+
rows: 6,
|
|
2266
|
+
showCount: true
|
|
2267
|
+
}))))));
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
function ToCDB(str) {
|
|
2271
|
+
var tmp = '';
|
|
2272
|
+
|
|
2273
|
+
for (var i = 0; i < str.length; i++) {
|
|
2274
|
+
if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
|
|
2275
|
+
tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
|
|
2276
|
+
} else {
|
|
2277
|
+
tmp += String.fromCharCode(str.charCodeAt(i));
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
return tmp;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2181
2284
|
/*
|
|
2182
2285
|
* @Description:
|
|
2183
2286
|
* @Author: rodchen
|
|
2184
2287
|
* @Date: 2021-11-30 22:59:39
|
|
2185
|
-
* @LastEditTime: 2021-12-
|
|
2288
|
+
* @LastEditTime: 2021-12-29 17:43:01
|
|
2186
2289
|
* @LastEditors: rodchen
|
|
2187
2290
|
*/
|
|
2188
2291
|
var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
|
|
2189
2292
|
axios__default['default'].defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
2190
2293
|
|
|
2191
2294
|
exports.DataValidation = DataValidation;
|
|
2295
|
+
exports.QueryMutipleInput = QueryMutipleInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bit-sun/business-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"ahooks": "^3.1.2",
|
|
30
31
|
"antd": "4.17.2",
|
|
31
32
|
"axios": "^0.24.0",
|
|
32
|
-
"bs-business-component": "^1.0.1",
|
|
33
33
|
"classnames": "^2.3.1",
|
|
34
34
|
"react": "^16.12.0",
|
|
35
35
|
"react-beautiful-dnd": "10.0.0"
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"father-build": "^1.17.2",
|
|
41
41
|
"gh-pages": "^3.0.0",
|
|
42
42
|
"lint-staged": "^10.0.7",
|
|
43
|
-
"prettier": "^2.2.1"
|
|
44
|
-
"yorkie": "^2.0.0"
|
|
43
|
+
"prettier": "^2.2.1"
|
|
45
44
|
},
|
|
46
45
|
"publishConfig": {
|
|
47
46
|
"access": "public"
|
|
File without changes
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
nav:
|
|
3
|
-
title:
|
|
4
|
-
|
|
3
|
+
title: '组件'
|
|
4
|
+
order: 1
|
|
5
|
+
group:
|
|
6
|
+
title: 组件
|
|
7
|
+
order: 0
|
|
8
|
+
title: 数据校验
|
|
9
|
+
order: 1
|
|
5
10
|
---
|
|
6
11
|
|
|
7
12
|
## DataValidation
|
|
@@ -10,7 +15,7 @@ Demo:
|
|
|
10
15
|
|
|
11
16
|
```tsx
|
|
12
17
|
import React, { useRef } from 'react';
|
|
13
|
-
import { DataValidation } from '
|
|
18
|
+
import { DataValidation } from '../../index';
|
|
14
19
|
|
|
15
20
|
export default () => {
|
|
16
21
|
let dataValidationRef: DataValidation = useRef();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Description:
|
|
3
3
|
* @Author: rodchen
|
|
4
4
|
* @Date: 2021-12-01 10:52:08
|
|
5
|
-
* @LastEditTime: 2021-12-
|
|
5
|
+
* @LastEditTime: 2021-12-29 17:11:56
|
|
6
6
|
* @LastEditors: rodchen
|
|
7
7
|
*/
|
|
8
8
|
// @ts-nocheck
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
message,
|
|
20
20
|
} from 'antd';
|
|
21
21
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
22
|
-
import 'antd/dist/antd.css';
|
|
23
22
|
import {
|
|
24
23
|
ExclamationCircleOutlined,
|
|
25
24
|
DownOutlined,
|
|
@@ -45,6 +44,7 @@ const mapping = new Map([
|
|
|
45
44
|
['price', '单价'],
|
|
46
45
|
['regionCode', '库区'],
|
|
47
46
|
['checkQuantity', '实盘数量'],
|
|
47
|
+
['shareRatio', '共享比例'],
|
|
48
48
|
]);
|
|
49
49
|
|
|
50
50
|
// for dnd
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.query_input {
|
|
2
|
+
&_show {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&_expand_button {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 30px;
|
|
9
|
+
color: #ffffff;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
|
|
12
|
+
span {
|
|
13
|
+
position: absolute;
|
|
14
|
+
height: 20px;
|
|
15
|
+
line-height: 14px;
|
|
16
|
+
left: 50%;
|
|
17
|
+
top: 50%;
|
|
18
|
+
transform: translate(-50%, -50%);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&_wrapper {
|
|
23
|
+
display: flex;
|
|
24
|
+
|
|
25
|
+
&_left {
|
|
26
|
+
width: 100px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&_right {
|
|
30
|
+
color: #9e9e9e;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&_textArea {
|
|
35
|
+
margin-top: 15px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: '组件'
|
|
4
|
+
order: 1
|
|
5
|
+
group:
|
|
6
|
+
title: 组件
|
|
7
|
+
order: 0
|
|
8
|
+
title: 批量查询组件
|
|
9
|
+
order: 1
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## QueryMutipleInput
|
|
13
|
+
|
|
14
|
+
Demo:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import React, { useRef } from 'react';
|
|
18
|
+
import { QueryMutipleInput } from '../../index';
|
|
19
|
+
|
|
20
|
+
export default () => {
|
|
21
|
+
const handleOnChange = (value) => {
|
|
22
|
+
console.log(value);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<QueryMutipleInput onValueChange={handleOnChange} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
More skills for writing demo: https://d.umijs.org/guide/demo-principle
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Description:
|
|
3
|
+
* @Author: rodchen
|
|
4
|
+
* @Date: 2021-12-01 10:52:08
|
|
5
|
+
* @LastEditTime: 2021-12-29 17:42:42
|
|
6
|
+
* @LastEditors: rodchen
|
|
7
|
+
*/
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
import React, { useState, useEffect } from 'react';
|
|
10
|
+
import { useDebounceFn } from 'ahooks';
|
|
11
|
+
import { Input, Button, Modal } from 'antd';
|
|
12
|
+
import './index.less';
|
|
13
|
+
|
|
14
|
+
const QueryMutipleInput = ({ onValueChange }) => {
|
|
15
|
+
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
16
|
+
const [value, setValue] = useState('');
|
|
17
|
+
const [popvalue, setPopValue] = useState('');
|
|
18
|
+
const { run } = useDebounceFn(
|
|
19
|
+
() => {
|
|
20
|
+
formaData(value);
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
wait: 1000,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setPopValue(value);
|
|
29
|
+
onValueChange(value);
|
|
30
|
+
}, [value]);
|
|
31
|
+
|
|
32
|
+
const showModal = () => {
|
|
33
|
+
setIsModalVisible(true);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleOk = () => {
|
|
37
|
+
formaData(popvalue);
|
|
38
|
+
setIsModalVisible(false);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const formaData = (value) => {
|
|
42
|
+
let formatValue = ToCDB(value)
|
|
43
|
+
.split(/[/\n/\s,;]/)
|
|
44
|
+
.filter((item) => item)
|
|
45
|
+
.join(',');
|
|
46
|
+
setValue(formatValue);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const handleCancel = () => {
|
|
50
|
+
setIsModalVisible(false);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const outerChange = (e) => {
|
|
54
|
+
setValue(e.target.value);
|
|
55
|
+
run();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const onChange = (e) => {
|
|
59
|
+
setPopValue(e.target.value);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div className={'query_input'}>
|
|
64
|
+
<div class="query_input_show">
|
|
65
|
+
<Input
|
|
66
|
+
value={value}
|
|
67
|
+
onChange={outerChange}
|
|
68
|
+
onBlur={(e) => {
|
|
69
|
+
formaData(e.target.value);
|
|
70
|
+
}}
|
|
71
|
+
onPaste={(e) => {
|
|
72
|
+
formaData(e.clipboardData.getData('text'));
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
}}
|
|
75
|
+
style={{ width: 'calc(100% - 30px)' }}
|
|
76
|
+
placeholder="请输入(查询多个值请用 ; 或 , 分割)"
|
|
77
|
+
/>
|
|
78
|
+
<Button style={{width: '30px', padding: '2px', height: 'auto'}} type="primary">...</Button>
|
|
79
|
+
</div>
|
|
80
|
+
<Modal
|
|
81
|
+
width={600}
|
|
82
|
+
title="多值录入"
|
|
83
|
+
visible={isModalVisible}
|
|
84
|
+
onOk={handleOk}
|
|
85
|
+
onCancel={handleCancel}
|
|
86
|
+
footer={[
|
|
87
|
+
<Button key="back" onClick={handleCancel}>
|
|
88
|
+
取消
|
|
89
|
+
</Button>,
|
|
90
|
+
<Button key="submit" type="primary" onClick={handleOk}>
|
|
91
|
+
录入
|
|
92
|
+
</Button>,
|
|
93
|
+
]}
|
|
94
|
+
>
|
|
95
|
+
<div className={'query_input_wrapper'}>
|
|
96
|
+
<div className={'query_input_wrapper_left'}>录入区:</div>
|
|
97
|
+
<div className={'query_input_wrapper_right'}>
|
|
98
|
+
<div>
|
|
99
|
+
如需同时使用多个值进行查询,请使用逗号、分号、空格或换行进行值的分隔,中英文格式的符号均支持
|
|
100
|
+
</div>
|
|
101
|
+
<div className={'query_input_textArea'}>
|
|
102
|
+
<Input.TextArea
|
|
103
|
+
value={popvalue}
|
|
104
|
+
onChange={onChange}
|
|
105
|
+
rows={6}
|
|
106
|
+
showCount
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</Modal>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
function ToCDB(str) {
|
|
117
|
+
var tmp = '';
|
|
118
|
+
for (var i = 0; i < str.length; i++) {
|
|
119
|
+
if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
|
|
120
|
+
tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
|
|
121
|
+
} else {
|
|
122
|
+
tmp += String.fromCharCode(str.charCodeAt(i));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return tmp;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export default QueryMutipleInput;
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Description:
|
|
3
3
|
* @Author: rodchen
|
|
4
4
|
* @Date: 2021-11-30 22:59:39
|
|
5
|
-
* @LastEditTime: 2021-12-
|
|
5
|
+
* @LastEditTime: 2021-12-29 17:43:01
|
|
6
6
|
* @LastEditors: rodchen
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -12,4 +12,5 @@ const resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
|
|
|
12
12
|
|
|
13
13
|
axios.defaults.headers.common['sso-sessionid'] = resposne?.sessionId || '';
|
|
14
14
|
|
|
15
|
-
export { default as DataValidation } from './DataValidation';
|
|
15
|
+
export { default as DataValidation } from './components/DataValidation';
|
|
16
|
+
export { default as QueryMutipleInput } from './components/QueryMutipleInput';
|