ls-pro-common 3.1.6 → 3.1.7
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/common.css +2642 -3852
- package/dist/common.js +1 -1
- package/dist/common.js.LICENSE.txt +0 -31
- package/dist/common.min.css +2642 -3852
- package/dist/common.min.js +1 -1
- package/dist/common.min.js.LICENSE.txt +0 -31
- package/es/hooks/useBaseDict.js +1 -1
- package/es/http/index.d.ts +5 -2
- package/es/http/index.js +12 -6
- package/lib/hooks/useBaseDict.js +1 -1
- package/lib/http/index.d.ts +5 -2
- package/lib/http/index.js +12 -6
- package/package.json +1 -1
|
@@ -4,28 +4,6 @@
|
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/*!
|
|
8
|
-
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
9
|
-
Code licensed under the BSD License:
|
|
10
|
-
http://developer.yahoo.com/yui/license.html
|
|
11
|
-
version: 2.9.0
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*! *****************************************************************************
|
|
15
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
16
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
17
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
18
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
-
|
|
20
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
22
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
23
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
24
|
-
|
|
25
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
26
|
-
and limitations under the License.
|
|
27
|
-
***************************************************************************** */
|
|
28
|
-
|
|
29
7
|
/*! *****************************************************************************
|
|
30
8
|
Copyright (c) Microsoft Corporation.
|
|
31
9
|
|
|
@@ -43,15 +21,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
43
21
|
|
|
44
22
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
45
23
|
|
|
46
|
-
/**
|
|
47
|
-
* @fileOverview
|
|
48
|
-
* @name asn1-1.0.js
|
|
49
|
-
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
50
|
-
* @version asn1 1.0.13 (2017-Jun-02)
|
|
51
|
-
* @since jsrsasign 2.1
|
|
52
|
-
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
24
|
/**
|
|
56
25
|
* @license
|
|
57
26
|
* Lodash <https://lodash.com/>
|
package/es/hooks/useBaseDict.js
CHANGED
|
@@ -13,7 +13,7 @@ import { showWarn } from '../utils';
|
|
|
13
13
|
*/
|
|
14
14
|
export var useBaseDict = function useBaseDict(props) {
|
|
15
15
|
var _props$url = props.url,
|
|
16
|
-
url = _props$url === void 0 ? '/lesoon-integration/sysDictDtl
|
|
16
|
+
url = _props$url === void 0 ? '/lesoon-petrel-integration-api/sysDictDtl/page' : _props$url,
|
|
17
17
|
_props$method = props.method,
|
|
18
18
|
method = _props$method === void 0 ? 'GET' : _props$method,
|
|
19
19
|
_props$dictValue = props.dictValue,
|
package/es/http/index.d.ts
CHANGED
|
@@ -49,9 +49,11 @@ export declare function httpDelete(url: string, data: any, needGateWay?: boolean
|
|
|
49
49
|
* @param dictCode 字典编码
|
|
50
50
|
* @param showValue 是否显示值
|
|
51
51
|
* @param needGateWay 是否需要网关 默认为true
|
|
52
|
+
* @param timeout 超时时间,默认60000毫秒
|
|
53
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
52
54
|
* @returns Promise<Record<string,string>[]>
|
|
53
55
|
*/
|
|
54
|
-
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
56
|
+
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number, valueIsNumber?: boolean): Promise<any>;
|
|
55
57
|
/**
|
|
56
58
|
* 加载下拉框的数据源
|
|
57
59
|
*
|
|
@@ -61,7 +63,8 @@ export declare function getDict(dictCode: string, showValue?: boolean, needGateW
|
|
|
61
63
|
* @param labelField 显示字段
|
|
62
64
|
* @param showValue 显示值
|
|
63
65
|
* @param needGateWay 是否需要网关 默认为true
|
|
66
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
64
67
|
* @returns
|
|
65
68
|
*/
|
|
66
|
-
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
69
|
+
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number, valueIsNumber?: boolean): Promise<any>;
|
|
67
70
|
export default request;
|
package/es/http/index.js
CHANGED
|
@@ -324,17 +324,20 @@ export function httpDelete(url, data) {
|
|
|
324
324
|
* @param dictCode 字典编码
|
|
325
325
|
* @param showValue 是否显示值
|
|
326
326
|
* @param needGateWay 是否需要网关 默认为true
|
|
327
|
+
* @param timeout 超时时间,默认60000毫秒
|
|
328
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
327
329
|
* @returns Promise<Record<string,string>[]>
|
|
328
330
|
*/
|
|
329
331
|
export function getDict(dictCode) {
|
|
330
332
|
var showValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
331
333
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
332
334
|
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
333
|
-
var
|
|
335
|
+
var valueIsNumber = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
336
|
+
var api = '/lesoon-petrel-integration-api/sysDictDtl/listByProperties';
|
|
334
337
|
var param = {
|
|
335
338
|
dictCode: dictCode
|
|
336
339
|
};
|
|
337
|
-
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout);
|
|
340
|
+
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout, valueIsNumber);
|
|
338
341
|
}
|
|
339
342
|
/**
|
|
340
343
|
* 加载下拉框的数据源
|
|
@@ -345,6 +348,7 @@ export function getDict(dictCode) {
|
|
|
345
348
|
* @param labelField 显示字段
|
|
346
349
|
* @param showValue 显示值
|
|
347
350
|
* @param needGateWay 是否需要网关 默认为true
|
|
351
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
348
352
|
* @returns
|
|
349
353
|
*/
|
|
350
354
|
export function fetchOptions(_x3, _x4, _x5, _x6) {
|
|
@@ -355,6 +359,7 @@ function _fetchOptions() {
|
|
|
355
359
|
var showValue,
|
|
356
360
|
needGateWay,
|
|
357
361
|
timeout,
|
|
362
|
+
valueIsNumber,
|
|
358
363
|
_yield$httpGet,
|
|
359
364
|
_yield$httpGet$rows,
|
|
360
365
|
rows,
|
|
@@ -366,21 +371,22 @@ function _fetchOptions() {
|
|
|
366
371
|
showValue = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : true;
|
|
367
372
|
needGateWay = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : true;
|
|
368
373
|
timeout = _args2.length > 6 && _args2[6] !== undefined ? _args2[6] : 60000;
|
|
369
|
-
|
|
374
|
+
valueIsNumber = _args2.length > 7 && _args2[7] !== undefined ? _args2[7] : false;
|
|
375
|
+
_context2.next = 6;
|
|
370
376
|
return httpGet(url, param, needGateWay, timeout);
|
|
371
|
-
case
|
|
377
|
+
case 6:
|
|
372
378
|
_yield$httpGet = _context2.sent;
|
|
373
379
|
_yield$httpGet$rows = _yield$httpGet.rows;
|
|
374
380
|
rows = _yield$httpGet$rows === void 0 ? [] : _yield$httpGet$rows;
|
|
375
381
|
data = (rows || []).map(function (o) {
|
|
376
382
|
return _objectSpread(_objectSpread({}, o), {}, {
|
|
377
|
-
value: o[valueField],
|
|
383
|
+
value: valueIsNumber && !isNaN(o[valueField]) ? Number(o[valueField]) : o[valueField],
|
|
378
384
|
text: o[labelField],
|
|
379
385
|
label: (showValue ? o[valueField] + '→' : '') + o[labelField]
|
|
380
386
|
});
|
|
381
387
|
});
|
|
382
388
|
return _context2.abrupt("return", data);
|
|
383
|
-
case
|
|
389
|
+
case 11:
|
|
384
390
|
case "end":
|
|
385
391
|
return _context2.stop();
|
|
386
392
|
}
|
package/lib/hooks/useBaseDict.js
CHANGED
|
@@ -13,7 +13,7 @@ import { showWarn } from '../utils';
|
|
|
13
13
|
*/
|
|
14
14
|
export var useBaseDict = function useBaseDict(props) {
|
|
15
15
|
var _props$url = props.url,
|
|
16
|
-
url = _props$url === void 0 ? '/lesoon-integration/sysDictDtl
|
|
16
|
+
url = _props$url === void 0 ? '/lesoon-petrel-integration-api/sysDictDtl/page' : _props$url,
|
|
17
17
|
_props$method = props.method,
|
|
18
18
|
method = _props$method === void 0 ? 'GET' : _props$method,
|
|
19
19
|
_props$dictValue = props.dictValue,
|
package/lib/http/index.d.ts
CHANGED
|
@@ -49,9 +49,11 @@ export declare function httpDelete(url: string, data: any, needGateWay?: boolean
|
|
|
49
49
|
* @param dictCode 字典编码
|
|
50
50
|
* @param showValue 是否显示值
|
|
51
51
|
* @param needGateWay 是否需要网关 默认为true
|
|
52
|
+
* @param timeout 超时时间,默认60000毫秒
|
|
53
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
52
54
|
* @returns Promise<Record<string,string>[]>
|
|
53
55
|
*/
|
|
54
|
-
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
56
|
+
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number, valueIsNumber?: boolean): Promise<any>;
|
|
55
57
|
/**
|
|
56
58
|
* 加载下拉框的数据源
|
|
57
59
|
*
|
|
@@ -61,7 +63,8 @@ export declare function getDict(dictCode: string, showValue?: boolean, needGateW
|
|
|
61
63
|
* @param labelField 显示字段
|
|
62
64
|
* @param showValue 显示值
|
|
63
65
|
* @param needGateWay 是否需要网关 默认为true
|
|
66
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
64
67
|
* @returns
|
|
65
68
|
*/
|
|
66
|
-
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
69
|
+
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number, valueIsNumber?: boolean): Promise<any>;
|
|
67
70
|
export default request;
|
package/lib/http/index.js
CHANGED
|
@@ -324,17 +324,20 @@ export function httpDelete(url, data) {
|
|
|
324
324
|
* @param dictCode 字典编码
|
|
325
325
|
* @param showValue 是否显示值
|
|
326
326
|
* @param needGateWay 是否需要网关 默认为true
|
|
327
|
+
* @param timeout 超时时间,默认60000毫秒
|
|
328
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
327
329
|
* @returns Promise<Record<string,string>[]>
|
|
328
330
|
*/
|
|
329
331
|
export function getDict(dictCode) {
|
|
330
332
|
var showValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
331
333
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
332
334
|
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
333
|
-
var
|
|
335
|
+
var valueIsNumber = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
336
|
+
var api = '/lesoon-petrel-integration-api/sysDictDtl/listByProperties';
|
|
334
337
|
var param = {
|
|
335
338
|
dictCode: dictCode
|
|
336
339
|
};
|
|
337
|
-
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout);
|
|
340
|
+
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout, valueIsNumber);
|
|
338
341
|
}
|
|
339
342
|
/**
|
|
340
343
|
* 加载下拉框的数据源
|
|
@@ -345,6 +348,7 @@ export function getDict(dictCode) {
|
|
|
345
348
|
* @param labelField 显示字段
|
|
346
349
|
* @param showValue 显示值
|
|
347
350
|
* @param needGateWay 是否需要网关 默认为true
|
|
351
|
+
* @param valueIsNumber 返回值是否为数字,默认false
|
|
348
352
|
* @returns
|
|
349
353
|
*/
|
|
350
354
|
export function fetchOptions(_x3, _x4, _x5, _x6) {
|
|
@@ -355,6 +359,7 @@ function _fetchOptions() {
|
|
|
355
359
|
var showValue,
|
|
356
360
|
needGateWay,
|
|
357
361
|
timeout,
|
|
362
|
+
valueIsNumber,
|
|
358
363
|
_yield$httpGet,
|
|
359
364
|
_yield$httpGet$rows,
|
|
360
365
|
rows,
|
|
@@ -366,21 +371,22 @@ function _fetchOptions() {
|
|
|
366
371
|
showValue = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : true;
|
|
367
372
|
needGateWay = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : true;
|
|
368
373
|
timeout = _args2.length > 6 && _args2[6] !== undefined ? _args2[6] : 60000;
|
|
369
|
-
|
|
374
|
+
valueIsNumber = _args2.length > 7 && _args2[7] !== undefined ? _args2[7] : false;
|
|
375
|
+
_context2.next = 6;
|
|
370
376
|
return httpGet(url, param, needGateWay, timeout);
|
|
371
|
-
case
|
|
377
|
+
case 6:
|
|
372
378
|
_yield$httpGet = _context2.sent;
|
|
373
379
|
_yield$httpGet$rows = _yield$httpGet.rows;
|
|
374
380
|
rows = _yield$httpGet$rows === void 0 ? [] : _yield$httpGet$rows;
|
|
375
381
|
data = (rows || []).map(function (o) {
|
|
376
382
|
return _objectSpread(_objectSpread({}, o), {}, {
|
|
377
|
-
value: o[valueField],
|
|
383
|
+
value: valueIsNumber && !isNaN(o[valueField]) ? Number(o[valueField]) : o[valueField],
|
|
378
384
|
text: o[labelField],
|
|
379
385
|
label: (showValue ? o[valueField] + '→' : '') + o[labelField]
|
|
380
386
|
});
|
|
381
387
|
});
|
|
382
388
|
return _context2.abrupt("return", data);
|
|
383
|
-
case
|
|
389
|
+
case 11:
|
|
384
390
|
case "end":
|
|
385
391
|
return _context2.stop();
|
|
386
392
|
}
|