ls-pro-common 3.0.39 → 3.0.41
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 +39 -0
- package/dist/common.js +1 -1
- package/dist/common.js.LICENSE.txt +10 -0
- package/dist/common.min.css +39 -0
- package/dist/common.min.js +1 -1
- package/dist/common.min.js.LICENSE.txt +10 -0
- package/es/components/antd-custom.less +37 -0
- package/es/http/index.d.ts +6 -6
- package/es/http/index.js +24 -12
- package/lib/components/antd-custom.less +37 -0
- package/lib/http/index.d.ts +6 -6
- package/lib/http/index.js +24 -12
- package/package.json +8 -3
|
@@ -30,6 +30,16 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
30
30
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-is.production.min.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/
|
|
42
|
+
|
|
33
43
|
/** @license React v16.13.1
|
|
34
44
|
* react-is.production.min.js
|
|
35
45
|
*
|
|
@@ -363,4 +363,41 @@
|
|
|
363
363
|
|
|
364
364
|
.ant-table-filter-dropdown .ant-dropdown-menu-item .ant-checkbox+span {
|
|
365
365
|
width: 230px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ant-picker-panel-container {
|
|
369
|
+
.ant-picker-panel-layout {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-wrap: nowrap;
|
|
372
|
+
align-items: stretch;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ant-picker-presets {
|
|
376
|
+
display: flex;
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
min-width: 120px;
|
|
379
|
+
max-width: 200px;
|
|
380
|
+
|
|
381
|
+
ul {
|
|
382
|
+
height: 0;
|
|
383
|
+
flex: auto;
|
|
384
|
+
list-style: none;
|
|
385
|
+
overflow: auto;
|
|
386
|
+
margin: 0;
|
|
387
|
+
padding: 8px;
|
|
388
|
+
border-inline-end: 1px solid rgba(5, 5, 5, 0.06);
|
|
389
|
+
|
|
390
|
+
li {
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
white-space: nowrap;
|
|
393
|
+
text-overflow: ellipsis;
|
|
394
|
+
border-radius: 4px;
|
|
395
|
+
padding-inline: 8px;
|
|
396
|
+
padding-block: 1px;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
transition: all 0.3s;
|
|
399
|
+
margin-top: 8px;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
366
403
|
}
|
package/es/http/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const request: import("umi-request").RequestMethod<false>;
|
|
|
6
6
|
* @param needGateWay 是否需要网关 默认为true
|
|
7
7
|
* @returns Promise<ApiResponse>
|
|
8
8
|
*/
|
|
9
|
-
export declare function httpGet(url: string, params?: Record<string, any>, needGateWay?: boolean): Promise<any>;
|
|
9
|
+
export declare function httpGet(url: string, params?: Record<string, any>, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
10
10
|
/**
|
|
11
11
|
* post请求
|
|
12
12
|
* @param url 接口
|
|
@@ -15,7 +15,7 @@ export declare function httpGet(url: string, params?: Record<string, any>, needG
|
|
|
15
15
|
* @param needGateWay 是否需要网关 默认为true
|
|
16
16
|
* @returns Promise<ApiResponse>
|
|
17
17
|
*/
|
|
18
|
-
export declare function httpPost(url: string, data?: Record<string, any>, isJson?: boolean, needGateWay?: boolean): Promise<any>;
|
|
18
|
+
export declare function httpPost(url: string, data?: Record<string, any>, isJson?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
19
19
|
/**
|
|
20
20
|
* put 请求
|
|
21
21
|
* @param url 接口
|
|
@@ -23,7 +23,7 @@ export declare function httpPost(url: string, data?: Record<string, any>, isJson
|
|
|
23
23
|
* @param needGateWay 是否需要网关 默认为true
|
|
24
24
|
* @returns Promise<ApiResponse>
|
|
25
25
|
*/
|
|
26
|
-
export declare function httpPut(url: string, data?: Record<string, any>, needGateWay?: boolean): Promise<any>;
|
|
26
|
+
export declare function httpPut(url: string, data?: Record<string, any>, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
27
27
|
/**
|
|
28
28
|
* delete 请求
|
|
29
29
|
* @param url 接口
|
|
@@ -31,14 +31,14 @@ export declare function httpPut(url: string, data?: Record<string, any>, needGat
|
|
|
31
31
|
* @param needGateWay 是否需要网关 默认为true
|
|
32
32
|
* @returns Promise<ApiResponse>
|
|
33
33
|
*/
|
|
34
|
-
export declare function httpDelete(url: string, data: any, needGateWay?: boolean): Promise<any>;
|
|
34
|
+
export declare function httpDelete(url: string, data: any, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
35
35
|
/**
|
|
36
36
|
* 读取数据字典
|
|
37
37
|
* @param dictCode 字典编码
|
|
38
38
|
* @param needGateWay 是否需要网关 默认为true
|
|
39
39
|
* @returns Promise<Record<string,string>>
|
|
40
40
|
*/
|
|
41
|
-
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean): Promise<any>;
|
|
41
|
+
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
42
42
|
/**
|
|
43
43
|
* 加载下拉框的数据源
|
|
44
44
|
* @param url 后端接口
|
|
@@ -49,5 +49,5 @@ export declare function getDict(dictCode: string, showValue?: boolean, needGateW
|
|
|
49
49
|
* @param needGateWay 是否需要网关 默认为true
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean): Promise<any>;
|
|
52
|
+
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
53
53
|
export default request;
|
package/es/http/index.js
CHANGED
|
@@ -155,6 +155,7 @@ function ajax(url) {
|
|
|
155
155
|
var type = arguments.length > 2 ? arguments[2] : undefined;
|
|
156
156
|
var needGateWay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
157
157
|
var isJson = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
158
|
+
var timeout = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 60000;
|
|
158
159
|
if (needGateWay) {
|
|
159
160
|
url = toGatewayUrl(url);
|
|
160
161
|
}
|
|
@@ -167,25 +168,29 @@ function ajax(url) {
|
|
|
167
168
|
}
|
|
168
169
|
if (type === 'get') {
|
|
169
170
|
return request.get(url, {
|
|
170
|
-
params: params
|
|
171
|
+
params: params,
|
|
172
|
+
timeout: timeout
|
|
171
173
|
}).finally(function () {
|
|
172
174
|
return exitLoading();
|
|
173
175
|
});
|
|
174
176
|
} else if (type === 'delete') {
|
|
175
177
|
return request.delete(url, {
|
|
176
|
-
data: params
|
|
178
|
+
data: params,
|
|
179
|
+
timeout: timeout
|
|
177
180
|
}).finally(function () {
|
|
178
181
|
return exitLoading();
|
|
179
182
|
});
|
|
180
183
|
} else if (type === 'put') {
|
|
181
184
|
return request.put(url, {
|
|
182
|
-
data: params
|
|
185
|
+
data: params,
|
|
186
|
+
timeout: timeout
|
|
183
187
|
}).finally(function () {
|
|
184
188
|
return exitLoading();
|
|
185
189
|
});
|
|
186
190
|
} else {
|
|
187
191
|
return request.post(url, {
|
|
188
192
|
data: params,
|
|
193
|
+
timeout: timeout,
|
|
189
194
|
requestType: isJson ? 'json' : 'form'
|
|
190
195
|
}).finally(function () {
|
|
191
196
|
return exitLoading();
|
|
@@ -202,7 +207,8 @@ function ajax(url) {
|
|
|
202
207
|
export function httpGet(url) {
|
|
203
208
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
204
209
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
205
|
-
|
|
210
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
211
|
+
return ajax(url, params, 'get', needGateWay, true, timeout);
|
|
206
212
|
}
|
|
207
213
|
/**
|
|
208
214
|
* post请求
|
|
@@ -216,7 +222,8 @@ export function httpPost(url) {
|
|
|
216
222
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
217
223
|
var isJson = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
218
224
|
var needGateWay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
219
|
-
|
|
225
|
+
var timeout = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 60000;
|
|
226
|
+
return ajax(url, data, 'post', needGateWay, isJson, timeout);
|
|
220
227
|
}
|
|
221
228
|
/**
|
|
222
229
|
* put 请求
|
|
@@ -228,7 +235,8 @@ export function httpPost(url) {
|
|
|
228
235
|
export function httpPut(url) {
|
|
229
236
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
230
237
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
231
|
-
|
|
238
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
239
|
+
return ajax(url, data, 'put', needGateWay, true, timeout);
|
|
232
240
|
}
|
|
233
241
|
/**
|
|
234
242
|
* delete 请求
|
|
@@ -239,7 +247,8 @@ export function httpPut(url) {
|
|
|
239
247
|
*/
|
|
240
248
|
export function httpDelete(url, data) {
|
|
241
249
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
242
|
-
|
|
250
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
251
|
+
return ajax(url, data, 'delete', needGateWay, true, timeout);
|
|
243
252
|
}
|
|
244
253
|
/**
|
|
245
254
|
* 读取数据字典
|
|
@@ -250,11 +259,12 @@ export function httpDelete(url, data) {
|
|
|
250
259
|
export function getDict(dictCode) {
|
|
251
260
|
var showValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
252
261
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
262
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
253
263
|
var api = '/lesoon-integration/sysDictDtl/listByProperties';
|
|
254
264
|
var param = {
|
|
255
265
|
dictCode: dictCode
|
|
256
266
|
};
|
|
257
|
-
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay);
|
|
267
|
+
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout);
|
|
258
268
|
}
|
|
259
269
|
/**
|
|
260
270
|
* 加载下拉框的数据源
|
|
@@ -273,6 +283,7 @@ function _fetchOptions() {
|
|
|
273
283
|
_fetchOptions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, param, valueField, labelField) {
|
|
274
284
|
var showValue,
|
|
275
285
|
needGateWay,
|
|
286
|
+
timeout,
|
|
276
287
|
_yield$httpGet,
|
|
277
288
|
_yield$httpGet$rows,
|
|
278
289
|
rows,
|
|
@@ -283,9 +294,10 @@ function _fetchOptions() {
|
|
|
283
294
|
case 0:
|
|
284
295
|
showValue = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : true;
|
|
285
296
|
needGateWay = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : true;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
297
|
+
timeout = _args2.length > 6 && _args2[6] !== undefined ? _args2[6] : 60000;
|
|
298
|
+
_context2.next = 5;
|
|
299
|
+
return httpGet(url, param, needGateWay, timeout);
|
|
300
|
+
case 5:
|
|
289
301
|
_yield$httpGet = _context2.sent;
|
|
290
302
|
_yield$httpGet$rows = _yield$httpGet.rows;
|
|
291
303
|
rows = _yield$httpGet$rows === void 0 ? [] : _yield$httpGet$rows;
|
|
@@ -298,7 +310,7 @@ function _fetchOptions() {
|
|
|
298
310
|
};
|
|
299
311
|
});
|
|
300
312
|
return _context2.abrupt("return", data);
|
|
301
|
-
case
|
|
313
|
+
case 10:
|
|
302
314
|
case "end":
|
|
303
315
|
return _context2.stop();
|
|
304
316
|
}
|
|
@@ -363,4 +363,41 @@
|
|
|
363
363
|
|
|
364
364
|
.ant-table-filter-dropdown .ant-dropdown-menu-item .ant-checkbox+span {
|
|
365
365
|
width: 230px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ant-picker-panel-container {
|
|
369
|
+
.ant-picker-panel-layout {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-wrap: nowrap;
|
|
372
|
+
align-items: stretch;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ant-picker-presets {
|
|
376
|
+
display: flex;
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
min-width: 120px;
|
|
379
|
+
max-width: 200px;
|
|
380
|
+
|
|
381
|
+
ul {
|
|
382
|
+
height: 0;
|
|
383
|
+
flex: auto;
|
|
384
|
+
list-style: none;
|
|
385
|
+
overflow: auto;
|
|
386
|
+
margin: 0;
|
|
387
|
+
padding: 8px;
|
|
388
|
+
border-inline-end: 1px solid rgba(5, 5, 5, 0.06);
|
|
389
|
+
|
|
390
|
+
li {
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
white-space: nowrap;
|
|
393
|
+
text-overflow: ellipsis;
|
|
394
|
+
border-radius: 4px;
|
|
395
|
+
padding-inline: 8px;
|
|
396
|
+
padding-block: 1px;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
transition: all 0.3s;
|
|
399
|
+
margin-top: 8px;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
366
403
|
}
|
package/lib/http/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const request: import("umi-request").RequestMethod<false>;
|
|
|
6
6
|
* @param needGateWay 是否需要网关 默认为true
|
|
7
7
|
* @returns Promise<ApiResponse>
|
|
8
8
|
*/
|
|
9
|
-
export declare function httpGet(url: string, params?: Record<string, any>, needGateWay?: boolean): Promise<any>;
|
|
9
|
+
export declare function httpGet(url: string, params?: Record<string, any>, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
10
10
|
/**
|
|
11
11
|
* post请求
|
|
12
12
|
* @param url 接口
|
|
@@ -15,7 +15,7 @@ export declare function httpGet(url: string, params?: Record<string, any>, needG
|
|
|
15
15
|
* @param needGateWay 是否需要网关 默认为true
|
|
16
16
|
* @returns Promise<ApiResponse>
|
|
17
17
|
*/
|
|
18
|
-
export declare function httpPost(url: string, data?: Record<string, any>, isJson?: boolean, needGateWay?: boolean): Promise<any>;
|
|
18
|
+
export declare function httpPost(url: string, data?: Record<string, any>, isJson?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
19
19
|
/**
|
|
20
20
|
* put 请求
|
|
21
21
|
* @param url 接口
|
|
@@ -23,7 +23,7 @@ export declare function httpPost(url: string, data?: Record<string, any>, isJson
|
|
|
23
23
|
* @param needGateWay 是否需要网关 默认为true
|
|
24
24
|
* @returns Promise<ApiResponse>
|
|
25
25
|
*/
|
|
26
|
-
export declare function httpPut(url: string, data?: Record<string, any>, needGateWay?: boolean): Promise<any>;
|
|
26
|
+
export declare function httpPut(url: string, data?: Record<string, any>, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
27
27
|
/**
|
|
28
28
|
* delete 请求
|
|
29
29
|
* @param url 接口
|
|
@@ -31,14 +31,14 @@ export declare function httpPut(url: string, data?: Record<string, any>, needGat
|
|
|
31
31
|
* @param needGateWay 是否需要网关 默认为true
|
|
32
32
|
* @returns Promise<ApiResponse>
|
|
33
33
|
*/
|
|
34
|
-
export declare function httpDelete(url: string, data: any, needGateWay?: boolean): Promise<any>;
|
|
34
|
+
export declare function httpDelete(url: string, data: any, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
35
35
|
/**
|
|
36
36
|
* 读取数据字典
|
|
37
37
|
* @param dictCode 字典编码
|
|
38
38
|
* @param needGateWay 是否需要网关 默认为true
|
|
39
39
|
* @returns Promise<Record<string,string>>
|
|
40
40
|
*/
|
|
41
|
-
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean): Promise<any>;
|
|
41
|
+
export declare function getDict(dictCode: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
42
42
|
/**
|
|
43
43
|
* 加载下拉框的数据源
|
|
44
44
|
* @param url 后端接口
|
|
@@ -49,5 +49,5 @@ export declare function getDict(dictCode: string, showValue?: boolean, needGateW
|
|
|
49
49
|
* @param needGateWay 是否需要网关 默认为true
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean): Promise<any>;
|
|
52
|
+
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number): Promise<any>;
|
|
53
53
|
export default request;
|
package/lib/http/index.js
CHANGED
|
@@ -155,6 +155,7 @@ function ajax(url) {
|
|
|
155
155
|
var type = arguments.length > 2 ? arguments[2] : undefined;
|
|
156
156
|
var needGateWay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
157
157
|
var isJson = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
158
|
+
var timeout = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 60000;
|
|
158
159
|
if (needGateWay) {
|
|
159
160
|
url = toGatewayUrl(url);
|
|
160
161
|
}
|
|
@@ -167,25 +168,29 @@ function ajax(url) {
|
|
|
167
168
|
}
|
|
168
169
|
if (type === 'get') {
|
|
169
170
|
return request.get(url, {
|
|
170
|
-
params: params
|
|
171
|
+
params: params,
|
|
172
|
+
timeout: timeout
|
|
171
173
|
}).finally(function () {
|
|
172
174
|
return exitLoading();
|
|
173
175
|
});
|
|
174
176
|
} else if (type === 'delete') {
|
|
175
177
|
return request.delete(url, {
|
|
176
|
-
data: params
|
|
178
|
+
data: params,
|
|
179
|
+
timeout: timeout
|
|
177
180
|
}).finally(function () {
|
|
178
181
|
return exitLoading();
|
|
179
182
|
});
|
|
180
183
|
} else if (type === 'put') {
|
|
181
184
|
return request.put(url, {
|
|
182
|
-
data: params
|
|
185
|
+
data: params,
|
|
186
|
+
timeout: timeout
|
|
183
187
|
}).finally(function () {
|
|
184
188
|
return exitLoading();
|
|
185
189
|
});
|
|
186
190
|
} else {
|
|
187
191
|
return request.post(url, {
|
|
188
192
|
data: params,
|
|
193
|
+
timeout: timeout,
|
|
189
194
|
requestType: isJson ? 'json' : 'form'
|
|
190
195
|
}).finally(function () {
|
|
191
196
|
return exitLoading();
|
|
@@ -202,7 +207,8 @@ function ajax(url) {
|
|
|
202
207
|
export function httpGet(url) {
|
|
203
208
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
204
209
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
205
|
-
|
|
210
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
211
|
+
return ajax(url, params, 'get', needGateWay, true, timeout);
|
|
206
212
|
}
|
|
207
213
|
/**
|
|
208
214
|
* post请求
|
|
@@ -216,7 +222,8 @@ export function httpPost(url) {
|
|
|
216
222
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
217
223
|
var isJson = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
218
224
|
var needGateWay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
219
|
-
|
|
225
|
+
var timeout = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 60000;
|
|
226
|
+
return ajax(url, data, 'post', needGateWay, isJson, timeout);
|
|
220
227
|
}
|
|
221
228
|
/**
|
|
222
229
|
* put 请求
|
|
@@ -228,7 +235,8 @@ export function httpPost(url) {
|
|
|
228
235
|
export function httpPut(url) {
|
|
229
236
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
230
237
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
231
|
-
|
|
238
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
239
|
+
return ajax(url, data, 'put', needGateWay, true, timeout);
|
|
232
240
|
}
|
|
233
241
|
/**
|
|
234
242
|
* delete 请求
|
|
@@ -239,7 +247,8 @@ export function httpPut(url) {
|
|
|
239
247
|
*/
|
|
240
248
|
export function httpDelete(url, data) {
|
|
241
249
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
242
|
-
|
|
250
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
251
|
+
return ajax(url, data, 'delete', needGateWay, true, timeout);
|
|
243
252
|
}
|
|
244
253
|
/**
|
|
245
254
|
* 读取数据字典
|
|
@@ -250,11 +259,12 @@ export function httpDelete(url, data) {
|
|
|
250
259
|
export function getDict(dictCode) {
|
|
251
260
|
var showValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
252
261
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
262
|
+
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
253
263
|
var api = '/lesoon-integration/sysDictDtl/listByProperties';
|
|
254
264
|
var param = {
|
|
255
265
|
dictCode: dictCode
|
|
256
266
|
};
|
|
257
|
-
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay);
|
|
267
|
+
return fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay, timeout);
|
|
258
268
|
}
|
|
259
269
|
/**
|
|
260
270
|
* 加载下拉框的数据源
|
|
@@ -273,6 +283,7 @@ function _fetchOptions() {
|
|
|
273
283
|
_fetchOptions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, param, valueField, labelField) {
|
|
274
284
|
var showValue,
|
|
275
285
|
needGateWay,
|
|
286
|
+
timeout,
|
|
276
287
|
_yield$httpGet,
|
|
277
288
|
_yield$httpGet$rows,
|
|
278
289
|
rows,
|
|
@@ -283,9 +294,10 @@ function _fetchOptions() {
|
|
|
283
294
|
case 0:
|
|
284
295
|
showValue = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : true;
|
|
285
296
|
needGateWay = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : true;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
297
|
+
timeout = _args2.length > 6 && _args2[6] !== undefined ? _args2[6] : 60000;
|
|
298
|
+
_context2.next = 5;
|
|
299
|
+
return httpGet(url, param, needGateWay, timeout);
|
|
300
|
+
case 5:
|
|
289
301
|
_yield$httpGet = _context2.sent;
|
|
290
302
|
_yield$httpGet$rows = _yield$httpGet.rows;
|
|
291
303
|
rows = _yield$httpGet$rows === void 0 ? [] : _yield$httpGet$rows;
|
|
@@ -298,7 +310,7 @@ function _fetchOptions() {
|
|
|
298
310
|
};
|
|
299
311
|
});
|
|
300
312
|
return _context2.abrupt("return", data);
|
|
301
|
-
case
|
|
313
|
+
case 10:
|
|
302
314
|
case "end":
|
|
303
315
|
return _context2.stop();
|
|
304
316
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.41",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@ant-design/icons": "^4.3.0",
|
|
24
|
-
"ls-pro-table": "^3.0.
|
|
24
|
+
"ls-pro-table": "^3.0.25",
|
|
25
25
|
"ls-pro-form": "^3.0.9",
|
|
26
|
+
"ls-pro-field": "^3.0.5",
|
|
26
27
|
"ls-pro-descriptions": "^3.0.1",
|
|
27
28
|
"ls-pro-card": "^3.0.3",
|
|
28
29
|
"ls-pro-utils": "^3.0.6",
|
|
@@ -36,6 +37,10 @@
|
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"antd": "4.x",
|
|
38
39
|
"react": ">=16.9.0",
|
|
39
|
-
"react-dom": ">=16.9.0"
|
|
40
|
+
"react-dom": ">=16.9.0",
|
|
41
|
+
"rc-picker": "^3.14.6"
|
|
42
|
+
},
|
|
43
|
+
"resolutions": {
|
|
44
|
+
"rc-picker": "^3.14.6"
|
|
40
45
|
}
|
|
41
46
|
}
|