@fctc/interface-logic 2.9.2 → 2.9.3
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/hooks.d.mts +9 -1
- package/dist/hooks.d.ts +9 -1
- package/dist/hooks.js +76 -20
- package/dist/hooks.mjs +76 -20
- package/dist/provider.js +76 -20
- package/dist/provider.mjs +76 -20
- package/dist/services.d.mts +12 -4
- package/dist/services.d.ts +12 -4
- package/dist/services.js +48 -12
- package/dist/services.mjs +48 -12
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -57,6 +57,8 @@ declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
57
57
|
importCompat: any;
|
|
58
58
|
context: any;
|
|
59
59
|
groupby: any;
|
|
60
|
+
service?: string;
|
|
61
|
+
xNode?: string;
|
|
60
62
|
}, unknown>;
|
|
61
63
|
|
|
62
64
|
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -70,10 +72,14 @@ declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<a
|
|
|
70
72
|
name?: any;
|
|
71
73
|
context: any;
|
|
72
74
|
importCompat?: any;
|
|
75
|
+
service?: string;
|
|
76
|
+
xNode?: string;
|
|
73
77
|
}, unknown>;
|
|
74
78
|
|
|
75
|
-
declare const useGetFileExcel: ({ model }: {
|
|
79
|
+
declare const useGetFileExcel: ({ model, service, xNode, }: {
|
|
76
80
|
model: string;
|
|
81
|
+
service?: string;
|
|
82
|
+
xNode?: string;
|
|
77
83
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
78
84
|
|
|
79
85
|
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -93,6 +99,8 @@ declare const useUploadFileExcel: () => _tanstack_react_query.UseMutationResult<
|
|
|
93
99
|
|
|
94
100
|
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
95
101
|
formData: any;
|
|
102
|
+
service?: string;
|
|
103
|
+
xNode?: string;
|
|
96
104
|
}, unknown>;
|
|
97
105
|
|
|
98
106
|
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
57
57
|
importCompat: any;
|
|
58
58
|
context: any;
|
|
59
59
|
groupby: any;
|
|
60
|
+
service?: string;
|
|
61
|
+
xNode?: string;
|
|
60
62
|
}, unknown>;
|
|
61
63
|
|
|
62
64
|
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -70,10 +72,14 @@ declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<a
|
|
|
70
72
|
name?: any;
|
|
71
73
|
context: any;
|
|
72
74
|
importCompat?: any;
|
|
75
|
+
service?: string;
|
|
76
|
+
xNode?: string;
|
|
73
77
|
}, unknown>;
|
|
74
78
|
|
|
75
|
-
declare const useGetFileExcel: ({ model }: {
|
|
79
|
+
declare const useGetFileExcel: ({ model, service, xNode, }: {
|
|
76
80
|
model: string;
|
|
81
|
+
service?: string;
|
|
82
|
+
xNode?: string;
|
|
77
83
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
78
84
|
|
|
79
85
|
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -93,6 +99,8 @@ declare const useUploadFileExcel: () => _tanstack_react_query.UseMutationResult<
|
|
|
93
99
|
|
|
94
100
|
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
95
101
|
formData: any;
|
|
102
|
+
service?: string;
|
|
103
|
+
xNode?: string;
|
|
96
104
|
}, unknown>;
|
|
97
105
|
|
|
98
106
|
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.js
CHANGED
|
@@ -3446,12 +3446,19 @@ function useExcelService() {
|
|
|
3446
3446
|
[env]
|
|
3447
3447
|
);
|
|
3448
3448
|
const uploadIdFile = (0, import_react9.useCallback)(
|
|
3449
|
-
async ({
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3449
|
+
async ({
|
|
3450
|
+
formData,
|
|
3451
|
+
service,
|
|
3452
|
+
xNode
|
|
3453
|
+
}) => {
|
|
3454
|
+
return env.requests.post(
|
|
3455
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3456
|
+
formData,
|
|
3457
|
+
{
|
|
3458
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3459
|
+
},
|
|
3460
|
+
service
|
|
3461
|
+
);
|
|
3455
3462
|
},
|
|
3456
3463
|
[env]
|
|
3457
3464
|
);
|
|
@@ -3539,13 +3546,24 @@ function useExcelService() {
|
|
|
3539
3546
|
[env]
|
|
3540
3547
|
);
|
|
3541
3548
|
const getFileExcel = (0, import_react9.useCallback)(
|
|
3542
|
-
async ({
|
|
3549
|
+
async ({
|
|
3550
|
+
model,
|
|
3551
|
+
service,
|
|
3552
|
+
xNode
|
|
3553
|
+
}) => {
|
|
3543
3554
|
const jsonData = {
|
|
3544
3555
|
model,
|
|
3545
3556
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3546
3557
|
args: []
|
|
3547
3558
|
};
|
|
3548
|
-
return env.requests.post(
|
|
3559
|
+
return env.requests.post(
|
|
3560
|
+
"/call" /* CALL_PATH */,
|
|
3561
|
+
jsonData,
|
|
3562
|
+
{
|
|
3563
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3564
|
+
},
|
|
3565
|
+
service
|
|
3566
|
+
);
|
|
3549
3567
|
},
|
|
3550
3568
|
[env]
|
|
3551
3569
|
);
|
|
@@ -3560,7 +3578,9 @@ function useExcelService() {
|
|
|
3560
3578
|
prefix,
|
|
3561
3579
|
name,
|
|
3562
3580
|
context,
|
|
3563
|
-
importCompat
|
|
3581
|
+
importCompat,
|
|
3582
|
+
service,
|
|
3583
|
+
xNode
|
|
3564
3584
|
}) => {
|
|
3565
3585
|
const jsonData = {
|
|
3566
3586
|
model,
|
|
@@ -3576,7 +3596,14 @@ function useExcelService() {
|
|
|
3576
3596
|
jsonData.prefix = prefix;
|
|
3577
3597
|
jsonData.exclude = [null];
|
|
3578
3598
|
}
|
|
3579
|
-
return env.requests.post(
|
|
3599
|
+
return env.requests.post(
|
|
3600
|
+
"/export/get_fields",
|
|
3601
|
+
jsonData,
|
|
3602
|
+
{
|
|
3603
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3604
|
+
},
|
|
3605
|
+
service
|
|
3606
|
+
);
|
|
3580
3607
|
},
|
|
3581
3608
|
[env]
|
|
3582
3609
|
);
|
|
@@ -3589,7 +3616,9 @@ function useExcelService() {
|
|
|
3589
3616
|
type,
|
|
3590
3617
|
importCompat,
|
|
3591
3618
|
context,
|
|
3592
|
-
groupby
|
|
3619
|
+
groupby,
|
|
3620
|
+
service,
|
|
3621
|
+
xNode
|
|
3593
3622
|
}) => {
|
|
3594
3623
|
const jsonData = {
|
|
3595
3624
|
model,
|
|
@@ -3600,7 +3629,14 @@ function useExcelService() {
|
|
|
3600
3629
|
with_context: context,
|
|
3601
3630
|
groupby: groupby ?? []
|
|
3602
3631
|
};
|
|
3603
|
-
return env.requests.post_excel(
|
|
3632
|
+
return env.requests.post_excel(
|
|
3633
|
+
`/export/${type}`,
|
|
3634
|
+
jsonData,
|
|
3635
|
+
{
|
|
3636
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3637
|
+
},
|
|
3638
|
+
service
|
|
3639
|
+
);
|
|
3604
3640
|
},
|
|
3605
3641
|
[env]
|
|
3606
3642
|
);
|
|
@@ -5421,7 +5457,9 @@ var useExportExcel = () => {
|
|
|
5421
5457
|
type,
|
|
5422
5458
|
importCompat,
|
|
5423
5459
|
context,
|
|
5424
|
-
groupby
|
|
5460
|
+
groupby,
|
|
5461
|
+
service,
|
|
5462
|
+
xNode
|
|
5425
5463
|
}) => exportExcel({
|
|
5426
5464
|
model,
|
|
5427
5465
|
domain,
|
|
@@ -5430,7 +5468,9 @@ var useExportExcel = () => {
|
|
|
5430
5468
|
type,
|
|
5431
5469
|
importCompat,
|
|
5432
5470
|
context,
|
|
5433
|
-
groupby
|
|
5471
|
+
groupby,
|
|
5472
|
+
service,
|
|
5473
|
+
xNode
|
|
5434
5474
|
})
|
|
5435
5475
|
});
|
|
5436
5476
|
};
|
|
@@ -5451,7 +5491,9 @@ var useGetFieldExport = () => {
|
|
|
5451
5491
|
prefix,
|
|
5452
5492
|
name,
|
|
5453
5493
|
context,
|
|
5454
|
-
importCompat
|
|
5494
|
+
importCompat,
|
|
5495
|
+
service,
|
|
5496
|
+
xNode
|
|
5455
5497
|
}) => getFieldExport({
|
|
5456
5498
|
ids,
|
|
5457
5499
|
model,
|
|
@@ -5462,7 +5504,9 @@ var useGetFieldExport = () => {
|
|
|
5462
5504
|
prefix,
|
|
5463
5505
|
name,
|
|
5464
5506
|
context,
|
|
5465
|
-
importCompat
|
|
5507
|
+
importCompat,
|
|
5508
|
+
service,
|
|
5509
|
+
xNode
|
|
5466
5510
|
})
|
|
5467
5511
|
});
|
|
5468
5512
|
};
|
|
@@ -5470,12 +5514,18 @@ var use_get_field_export_default = useGetFieldExport;
|
|
|
5470
5514
|
|
|
5471
5515
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5472
5516
|
var import_react_query20 = require("@tanstack/react-query");
|
|
5473
|
-
var useGetFileExcel = ({
|
|
5517
|
+
var useGetFileExcel = ({
|
|
5518
|
+
model,
|
|
5519
|
+
service,
|
|
5520
|
+
xNode
|
|
5521
|
+
}) => {
|
|
5474
5522
|
const { getFileExcel } = useExcelService();
|
|
5475
5523
|
return (0, import_react_query20.useQuery)({
|
|
5476
5524
|
queryKey: [],
|
|
5477
5525
|
queryFn: () => getFileExcel({
|
|
5478
|
-
model
|
|
5526
|
+
model,
|
|
5527
|
+
service,
|
|
5528
|
+
xNode
|
|
5479
5529
|
}).then((res) => {
|
|
5480
5530
|
if (res) {
|
|
5481
5531
|
return res;
|
|
@@ -5534,8 +5584,14 @@ var import_react_query23 = require("@tanstack/react-query");
|
|
|
5534
5584
|
var useUploadIdFile = () => {
|
|
5535
5585
|
const { uploadIdFile } = useExcelService();
|
|
5536
5586
|
return (0, import_react_query23.useMutation)({
|
|
5537
|
-
mutationFn: ({
|
|
5538
|
-
formData
|
|
5587
|
+
mutationFn: ({
|
|
5588
|
+
formData,
|
|
5589
|
+
service,
|
|
5590
|
+
xNode
|
|
5591
|
+
}) => uploadIdFile({
|
|
5592
|
+
formData,
|
|
5593
|
+
service,
|
|
5594
|
+
xNode
|
|
5539
5595
|
})
|
|
5540
5596
|
});
|
|
5541
5597
|
};
|
package/dist/hooks.mjs
CHANGED
|
@@ -3325,12 +3325,19 @@ function useExcelService() {
|
|
|
3325
3325
|
[env]
|
|
3326
3326
|
);
|
|
3327
3327
|
const uploadIdFile = useCallback5(
|
|
3328
|
-
async ({
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3328
|
+
async ({
|
|
3329
|
+
formData,
|
|
3330
|
+
service,
|
|
3331
|
+
xNode
|
|
3332
|
+
}) => {
|
|
3333
|
+
return env.requests.post(
|
|
3334
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3335
|
+
formData,
|
|
3336
|
+
{
|
|
3337
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3338
|
+
},
|
|
3339
|
+
service
|
|
3340
|
+
);
|
|
3334
3341
|
},
|
|
3335
3342
|
[env]
|
|
3336
3343
|
);
|
|
@@ -3418,13 +3425,24 @@ function useExcelService() {
|
|
|
3418
3425
|
[env]
|
|
3419
3426
|
);
|
|
3420
3427
|
const getFileExcel = useCallback5(
|
|
3421
|
-
async ({
|
|
3428
|
+
async ({
|
|
3429
|
+
model,
|
|
3430
|
+
service,
|
|
3431
|
+
xNode
|
|
3432
|
+
}) => {
|
|
3422
3433
|
const jsonData = {
|
|
3423
3434
|
model,
|
|
3424
3435
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3425
3436
|
args: []
|
|
3426
3437
|
};
|
|
3427
|
-
return env.requests.post(
|
|
3438
|
+
return env.requests.post(
|
|
3439
|
+
"/call" /* CALL_PATH */,
|
|
3440
|
+
jsonData,
|
|
3441
|
+
{
|
|
3442
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3443
|
+
},
|
|
3444
|
+
service
|
|
3445
|
+
);
|
|
3428
3446
|
},
|
|
3429
3447
|
[env]
|
|
3430
3448
|
);
|
|
@@ -3439,7 +3457,9 @@ function useExcelService() {
|
|
|
3439
3457
|
prefix,
|
|
3440
3458
|
name,
|
|
3441
3459
|
context,
|
|
3442
|
-
importCompat
|
|
3460
|
+
importCompat,
|
|
3461
|
+
service,
|
|
3462
|
+
xNode
|
|
3443
3463
|
}) => {
|
|
3444
3464
|
const jsonData = {
|
|
3445
3465
|
model,
|
|
@@ -3455,7 +3475,14 @@ function useExcelService() {
|
|
|
3455
3475
|
jsonData.prefix = prefix;
|
|
3456
3476
|
jsonData.exclude = [null];
|
|
3457
3477
|
}
|
|
3458
|
-
return env.requests.post(
|
|
3478
|
+
return env.requests.post(
|
|
3479
|
+
"/export/get_fields",
|
|
3480
|
+
jsonData,
|
|
3481
|
+
{
|
|
3482
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3483
|
+
},
|
|
3484
|
+
service
|
|
3485
|
+
);
|
|
3459
3486
|
},
|
|
3460
3487
|
[env]
|
|
3461
3488
|
);
|
|
@@ -3468,7 +3495,9 @@ function useExcelService() {
|
|
|
3468
3495
|
type,
|
|
3469
3496
|
importCompat,
|
|
3470
3497
|
context,
|
|
3471
|
-
groupby
|
|
3498
|
+
groupby,
|
|
3499
|
+
service,
|
|
3500
|
+
xNode
|
|
3472
3501
|
}) => {
|
|
3473
3502
|
const jsonData = {
|
|
3474
3503
|
model,
|
|
@@ -3479,7 +3508,14 @@ function useExcelService() {
|
|
|
3479
3508
|
with_context: context,
|
|
3480
3509
|
groupby: groupby ?? []
|
|
3481
3510
|
};
|
|
3482
|
-
return env.requests.post_excel(
|
|
3511
|
+
return env.requests.post_excel(
|
|
3512
|
+
`/export/${type}`,
|
|
3513
|
+
jsonData,
|
|
3514
|
+
{
|
|
3515
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3516
|
+
},
|
|
3517
|
+
service
|
|
3518
|
+
);
|
|
3483
3519
|
},
|
|
3484
3520
|
[env]
|
|
3485
3521
|
);
|
|
@@ -5300,7 +5336,9 @@ var useExportExcel = () => {
|
|
|
5300
5336
|
type,
|
|
5301
5337
|
importCompat,
|
|
5302
5338
|
context,
|
|
5303
|
-
groupby
|
|
5339
|
+
groupby,
|
|
5340
|
+
service,
|
|
5341
|
+
xNode
|
|
5304
5342
|
}) => exportExcel({
|
|
5305
5343
|
model,
|
|
5306
5344
|
domain,
|
|
@@ -5309,7 +5347,9 @@ var useExportExcel = () => {
|
|
|
5309
5347
|
type,
|
|
5310
5348
|
importCompat,
|
|
5311
5349
|
context,
|
|
5312
|
-
groupby
|
|
5350
|
+
groupby,
|
|
5351
|
+
service,
|
|
5352
|
+
xNode
|
|
5313
5353
|
})
|
|
5314
5354
|
});
|
|
5315
5355
|
};
|
|
@@ -5330,7 +5370,9 @@ var useGetFieldExport = () => {
|
|
|
5330
5370
|
prefix,
|
|
5331
5371
|
name,
|
|
5332
5372
|
context,
|
|
5333
|
-
importCompat
|
|
5373
|
+
importCompat,
|
|
5374
|
+
service,
|
|
5375
|
+
xNode
|
|
5334
5376
|
}) => getFieldExport({
|
|
5335
5377
|
ids,
|
|
5336
5378
|
model,
|
|
@@ -5341,7 +5383,9 @@ var useGetFieldExport = () => {
|
|
|
5341
5383
|
prefix,
|
|
5342
5384
|
name,
|
|
5343
5385
|
context,
|
|
5344
|
-
importCompat
|
|
5386
|
+
importCompat,
|
|
5387
|
+
service,
|
|
5388
|
+
xNode
|
|
5345
5389
|
})
|
|
5346
5390
|
});
|
|
5347
5391
|
};
|
|
@@ -5349,12 +5393,18 @@ var use_get_field_export_default = useGetFieldExport;
|
|
|
5349
5393
|
|
|
5350
5394
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5351
5395
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
5352
|
-
var useGetFileExcel = ({
|
|
5396
|
+
var useGetFileExcel = ({
|
|
5397
|
+
model,
|
|
5398
|
+
service,
|
|
5399
|
+
xNode
|
|
5400
|
+
}) => {
|
|
5353
5401
|
const { getFileExcel } = useExcelService();
|
|
5354
5402
|
return useQuery2({
|
|
5355
5403
|
queryKey: [],
|
|
5356
5404
|
queryFn: () => getFileExcel({
|
|
5357
|
-
model
|
|
5405
|
+
model,
|
|
5406
|
+
service,
|
|
5407
|
+
xNode
|
|
5358
5408
|
}).then((res) => {
|
|
5359
5409
|
if (res) {
|
|
5360
5410
|
return res;
|
|
@@ -5413,8 +5463,14 @@ import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
|
5413
5463
|
var useUploadIdFile = () => {
|
|
5414
5464
|
const { uploadIdFile } = useExcelService();
|
|
5415
5465
|
return useMutation19({
|
|
5416
|
-
mutationFn: ({
|
|
5417
|
-
formData
|
|
5466
|
+
mutationFn: ({
|
|
5467
|
+
formData,
|
|
5468
|
+
service,
|
|
5469
|
+
xNode
|
|
5470
|
+
}) => uploadIdFile({
|
|
5471
|
+
formData,
|
|
5472
|
+
service,
|
|
5473
|
+
xNode
|
|
5418
5474
|
})
|
|
5419
5475
|
});
|
|
5420
5476
|
};
|
package/dist/provider.js
CHANGED
|
@@ -3377,12 +3377,19 @@ function useExcelService() {
|
|
|
3377
3377
|
[env]
|
|
3378
3378
|
);
|
|
3379
3379
|
const uploadIdFile = (0, import_react5.useCallback)(
|
|
3380
|
-
async ({
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3380
|
+
async ({
|
|
3381
|
+
formData,
|
|
3382
|
+
service,
|
|
3383
|
+
xNode
|
|
3384
|
+
}) => {
|
|
3385
|
+
return env.requests.post(
|
|
3386
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3387
|
+
formData,
|
|
3388
|
+
{
|
|
3389
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3390
|
+
},
|
|
3391
|
+
service
|
|
3392
|
+
);
|
|
3386
3393
|
},
|
|
3387
3394
|
[env]
|
|
3388
3395
|
);
|
|
@@ -3470,13 +3477,24 @@ function useExcelService() {
|
|
|
3470
3477
|
[env]
|
|
3471
3478
|
);
|
|
3472
3479
|
const getFileExcel = (0, import_react5.useCallback)(
|
|
3473
|
-
async ({
|
|
3480
|
+
async ({
|
|
3481
|
+
model,
|
|
3482
|
+
service,
|
|
3483
|
+
xNode
|
|
3484
|
+
}) => {
|
|
3474
3485
|
const jsonData = {
|
|
3475
3486
|
model,
|
|
3476
3487
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3477
3488
|
args: []
|
|
3478
3489
|
};
|
|
3479
|
-
return env.requests.post(
|
|
3490
|
+
return env.requests.post(
|
|
3491
|
+
"/call" /* CALL_PATH */,
|
|
3492
|
+
jsonData,
|
|
3493
|
+
{
|
|
3494
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3495
|
+
},
|
|
3496
|
+
service
|
|
3497
|
+
);
|
|
3480
3498
|
},
|
|
3481
3499
|
[env]
|
|
3482
3500
|
);
|
|
@@ -3491,7 +3509,9 @@ function useExcelService() {
|
|
|
3491
3509
|
prefix,
|
|
3492
3510
|
name,
|
|
3493
3511
|
context,
|
|
3494
|
-
importCompat
|
|
3512
|
+
importCompat,
|
|
3513
|
+
service,
|
|
3514
|
+
xNode
|
|
3495
3515
|
}) => {
|
|
3496
3516
|
const jsonData = {
|
|
3497
3517
|
model,
|
|
@@ -3507,7 +3527,14 @@ function useExcelService() {
|
|
|
3507
3527
|
jsonData.prefix = prefix;
|
|
3508
3528
|
jsonData.exclude = [null];
|
|
3509
3529
|
}
|
|
3510
|
-
return env.requests.post(
|
|
3530
|
+
return env.requests.post(
|
|
3531
|
+
"/export/get_fields",
|
|
3532
|
+
jsonData,
|
|
3533
|
+
{
|
|
3534
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3535
|
+
},
|
|
3536
|
+
service
|
|
3537
|
+
);
|
|
3511
3538
|
},
|
|
3512
3539
|
[env]
|
|
3513
3540
|
);
|
|
@@ -3520,7 +3547,9 @@ function useExcelService() {
|
|
|
3520
3547
|
type,
|
|
3521
3548
|
importCompat,
|
|
3522
3549
|
context,
|
|
3523
|
-
groupby
|
|
3550
|
+
groupby,
|
|
3551
|
+
service,
|
|
3552
|
+
xNode
|
|
3524
3553
|
}) => {
|
|
3525
3554
|
const jsonData = {
|
|
3526
3555
|
model,
|
|
@@ -3531,7 +3560,14 @@ function useExcelService() {
|
|
|
3531
3560
|
with_context: context,
|
|
3532
3561
|
groupby: groupby ?? []
|
|
3533
3562
|
};
|
|
3534
|
-
return env.requests.post_excel(
|
|
3563
|
+
return env.requests.post_excel(
|
|
3564
|
+
`/export/${type}`,
|
|
3565
|
+
jsonData,
|
|
3566
|
+
{
|
|
3567
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3568
|
+
},
|
|
3569
|
+
service
|
|
3570
|
+
);
|
|
3535
3571
|
},
|
|
3536
3572
|
[env]
|
|
3537
3573
|
);
|
|
@@ -5770,7 +5806,9 @@ var useExportExcel = () => {
|
|
|
5770
5806
|
type,
|
|
5771
5807
|
importCompat,
|
|
5772
5808
|
context,
|
|
5773
|
-
groupby
|
|
5809
|
+
groupby,
|
|
5810
|
+
service,
|
|
5811
|
+
xNode
|
|
5774
5812
|
}) => exportExcel({
|
|
5775
5813
|
model,
|
|
5776
5814
|
domain,
|
|
@@ -5779,7 +5817,9 @@ var useExportExcel = () => {
|
|
|
5779
5817
|
type,
|
|
5780
5818
|
importCompat,
|
|
5781
5819
|
context,
|
|
5782
|
-
groupby
|
|
5820
|
+
groupby,
|
|
5821
|
+
service,
|
|
5822
|
+
xNode
|
|
5783
5823
|
})
|
|
5784
5824
|
});
|
|
5785
5825
|
};
|
|
@@ -5800,7 +5840,9 @@ var useGetFieldExport = () => {
|
|
|
5800
5840
|
prefix,
|
|
5801
5841
|
name,
|
|
5802
5842
|
context,
|
|
5803
|
-
importCompat
|
|
5843
|
+
importCompat,
|
|
5844
|
+
service,
|
|
5845
|
+
xNode
|
|
5804
5846
|
}) => getFieldExport({
|
|
5805
5847
|
ids,
|
|
5806
5848
|
model,
|
|
@@ -5811,7 +5853,9 @@ var useGetFieldExport = () => {
|
|
|
5811
5853
|
prefix,
|
|
5812
5854
|
name,
|
|
5813
5855
|
context,
|
|
5814
|
-
importCompat
|
|
5856
|
+
importCompat,
|
|
5857
|
+
service,
|
|
5858
|
+
xNode
|
|
5815
5859
|
})
|
|
5816
5860
|
});
|
|
5817
5861
|
};
|
|
@@ -5819,12 +5863,18 @@ var use_get_field_export_default = useGetFieldExport;
|
|
|
5819
5863
|
|
|
5820
5864
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5821
5865
|
var import_react_query20 = require("@tanstack/react-query");
|
|
5822
|
-
var useGetFileExcel = ({
|
|
5866
|
+
var useGetFileExcel = ({
|
|
5867
|
+
model,
|
|
5868
|
+
service,
|
|
5869
|
+
xNode
|
|
5870
|
+
}) => {
|
|
5823
5871
|
const { getFileExcel } = useExcelService();
|
|
5824
5872
|
return (0, import_react_query20.useQuery)({
|
|
5825
5873
|
queryKey: [],
|
|
5826
5874
|
queryFn: () => getFileExcel({
|
|
5827
|
-
model
|
|
5875
|
+
model,
|
|
5876
|
+
service,
|
|
5877
|
+
xNode
|
|
5828
5878
|
}).then((res) => {
|
|
5829
5879
|
if (res) {
|
|
5830
5880
|
return res;
|
|
@@ -5883,8 +5933,14 @@ var import_react_query23 = require("@tanstack/react-query");
|
|
|
5883
5933
|
var useUploadIdFile = () => {
|
|
5884
5934
|
const { uploadIdFile } = useExcelService();
|
|
5885
5935
|
return (0, import_react_query23.useMutation)({
|
|
5886
|
-
mutationFn: ({
|
|
5887
|
-
formData
|
|
5936
|
+
mutationFn: ({
|
|
5937
|
+
formData,
|
|
5938
|
+
service,
|
|
5939
|
+
xNode
|
|
5940
|
+
}) => uploadIdFile({
|
|
5941
|
+
formData,
|
|
5942
|
+
service,
|
|
5943
|
+
xNode
|
|
5888
5944
|
})
|
|
5889
5945
|
});
|
|
5890
5946
|
};
|
package/dist/provider.mjs
CHANGED
|
@@ -3334,12 +3334,19 @@ function useExcelService() {
|
|
|
3334
3334
|
[env]
|
|
3335
3335
|
);
|
|
3336
3336
|
const uploadIdFile = useCallback4(
|
|
3337
|
-
async ({
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3337
|
+
async ({
|
|
3338
|
+
formData,
|
|
3339
|
+
service,
|
|
3340
|
+
xNode
|
|
3341
|
+
}) => {
|
|
3342
|
+
return env.requests.post(
|
|
3343
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3344
|
+
formData,
|
|
3345
|
+
{
|
|
3346
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3347
|
+
},
|
|
3348
|
+
service
|
|
3349
|
+
);
|
|
3343
3350
|
},
|
|
3344
3351
|
[env]
|
|
3345
3352
|
);
|
|
@@ -3427,13 +3434,24 @@ function useExcelService() {
|
|
|
3427
3434
|
[env]
|
|
3428
3435
|
);
|
|
3429
3436
|
const getFileExcel = useCallback4(
|
|
3430
|
-
async ({
|
|
3437
|
+
async ({
|
|
3438
|
+
model,
|
|
3439
|
+
service,
|
|
3440
|
+
xNode
|
|
3441
|
+
}) => {
|
|
3431
3442
|
const jsonData = {
|
|
3432
3443
|
model,
|
|
3433
3444
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3434
3445
|
args: []
|
|
3435
3446
|
};
|
|
3436
|
-
return env.requests.post(
|
|
3447
|
+
return env.requests.post(
|
|
3448
|
+
"/call" /* CALL_PATH */,
|
|
3449
|
+
jsonData,
|
|
3450
|
+
{
|
|
3451
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3452
|
+
},
|
|
3453
|
+
service
|
|
3454
|
+
);
|
|
3437
3455
|
},
|
|
3438
3456
|
[env]
|
|
3439
3457
|
);
|
|
@@ -3448,7 +3466,9 @@ function useExcelService() {
|
|
|
3448
3466
|
prefix,
|
|
3449
3467
|
name,
|
|
3450
3468
|
context,
|
|
3451
|
-
importCompat
|
|
3469
|
+
importCompat,
|
|
3470
|
+
service,
|
|
3471
|
+
xNode
|
|
3452
3472
|
}) => {
|
|
3453
3473
|
const jsonData = {
|
|
3454
3474
|
model,
|
|
@@ -3464,7 +3484,14 @@ function useExcelService() {
|
|
|
3464
3484
|
jsonData.prefix = prefix;
|
|
3465
3485
|
jsonData.exclude = [null];
|
|
3466
3486
|
}
|
|
3467
|
-
return env.requests.post(
|
|
3487
|
+
return env.requests.post(
|
|
3488
|
+
"/export/get_fields",
|
|
3489
|
+
jsonData,
|
|
3490
|
+
{
|
|
3491
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3492
|
+
},
|
|
3493
|
+
service
|
|
3494
|
+
);
|
|
3468
3495
|
},
|
|
3469
3496
|
[env]
|
|
3470
3497
|
);
|
|
@@ -3477,7 +3504,9 @@ function useExcelService() {
|
|
|
3477
3504
|
type,
|
|
3478
3505
|
importCompat,
|
|
3479
3506
|
context,
|
|
3480
|
-
groupby
|
|
3507
|
+
groupby,
|
|
3508
|
+
service,
|
|
3509
|
+
xNode
|
|
3481
3510
|
}) => {
|
|
3482
3511
|
const jsonData = {
|
|
3483
3512
|
model,
|
|
@@ -3488,7 +3517,14 @@ function useExcelService() {
|
|
|
3488
3517
|
with_context: context,
|
|
3489
3518
|
groupby: groupby ?? []
|
|
3490
3519
|
};
|
|
3491
|
-
return env.requests.post_excel(
|
|
3520
|
+
return env.requests.post_excel(
|
|
3521
|
+
`/export/${type}`,
|
|
3522
|
+
jsonData,
|
|
3523
|
+
{
|
|
3524
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3525
|
+
},
|
|
3526
|
+
service
|
|
3527
|
+
);
|
|
3492
3528
|
},
|
|
3493
3529
|
[env]
|
|
3494
3530
|
);
|
|
@@ -5727,7 +5763,9 @@ var useExportExcel = () => {
|
|
|
5727
5763
|
type,
|
|
5728
5764
|
importCompat,
|
|
5729
5765
|
context,
|
|
5730
|
-
groupby
|
|
5766
|
+
groupby,
|
|
5767
|
+
service,
|
|
5768
|
+
xNode
|
|
5731
5769
|
}) => exportExcel({
|
|
5732
5770
|
model,
|
|
5733
5771
|
domain,
|
|
@@ -5736,7 +5774,9 @@ var useExportExcel = () => {
|
|
|
5736
5774
|
type,
|
|
5737
5775
|
importCompat,
|
|
5738
5776
|
context,
|
|
5739
|
-
groupby
|
|
5777
|
+
groupby,
|
|
5778
|
+
service,
|
|
5779
|
+
xNode
|
|
5740
5780
|
})
|
|
5741
5781
|
});
|
|
5742
5782
|
};
|
|
@@ -5757,7 +5797,9 @@ var useGetFieldExport = () => {
|
|
|
5757
5797
|
prefix,
|
|
5758
5798
|
name,
|
|
5759
5799
|
context,
|
|
5760
|
-
importCompat
|
|
5800
|
+
importCompat,
|
|
5801
|
+
service,
|
|
5802
|
+
xNode
|
|
5761
5803
|
}) => getFieldExport({
|
|
5762
5804
|
ids,
|
|
5763
5805
|
model,
|
|
@@ -5768,7 +5810,9 @@ var useGetFieldExport = () => {
|
|
|
5768
5810
|
prefix,
|
|
5769
5811
|
name,
|
|
5770
5812
|
context,
|
|
5771
|
-
importCompat
|
|
5813
|
+
importCompat,
|
|
5814
|
+
service,
|
|
5815
|
+
xNode
|
|
5772
5816
|
})
|
|
5773
5817
|
});
|
|
5774
5818
|
};
|
|
@@ -5776,12 +5820,18 @@ var use_get_field_export_default = useGetFieldExport;
|
|
|
5776
5820
|
|
|
5777
5821
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5778
5822
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
5779
|
-
var useGetFileExcel = ({
|
|
5823
|
+
var useGetFileExcel = ({
|
|
5824
|
+
model,
|
|
5825
|
+
service,
|
|
5826
|
+
xNode
|
|
5827
|
+
}) => {
|
|
5780
5828
|
const { getFileExcel } = useExcelService();
|
|
5781
5829
|
return useQuery2({
|
|
5782
5830
|
queryKey: [],
|
|
5783
5831
|
queryFn: () => getFileExcel({
|
|
5784
|
-
model
|
|
5832
|
+
model,
|
|
5833
|
+
service,
|
|
5834
|
+
xNode
|
|
5785
5835
|
}).then((res) => {
|
|
5786
5836
|
if (res) {
|
|
5787
5837
|
return res;
|
|
@@ -5840,8 +5890,14 @@ import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
|
5840
5890
|
var useUploadIdFile = () => {
|
|
5841
5891
|
const { uploadIdFile } = useExcelService();
|
|
5842
5892
|
return useMutation19({
|
|
5843
|
-
mutationFn: ({
|
|
5844
|
-
formData
|
|
5893
|
+
mutationFn: ({
|
|
5894
|
+
formData,
|
|
5895
|
+
service,
|
|
5896
|
+
xNode
|
|
5897
|
+
}) => uploadIdFile({
|
|
5898
|
+
formData,
|
|
5899
|
+
service,
|
|
5900
|
+
xNode
|
|
5845
5901
|
})
|
|
5846
5902
|
});
|
|
5847
5903
|
};
|
package/dist/services.d.mts
CHANGED
|
@@ -89,8 +89,10 @@ declare function useExcelService(): {
|
|
|
89
89
|
service?: string;
|
|
90
90
|
xNode?: string;
|
|
91
91
|
}) => Promise<any>;
|
|
92
|
-
uploadIdFile: ({ formData }: {
|
|
92
|
+
uploadIdFile: ({ formData, service, xNode, }: {
|
|
93
93
|
formData: any;
|
|
94
|
+
service?: string;
|
|
95
|
+
xNode?: string;
|
|
94
96
|
}) => Promise<any>;
|
|
95
97
|
parsePreview: ({ id, selectedSheet, isHeader, context, service, xNode, }: {
|
|
96
98
|
id: any;
|
|
@@ -110,10 +112,12 @@ declare function useExcelService(): {
|
|
|
110
112
|
service?: string;
|
|
111
113
|
xNode?: string;
|
|
112
114
|
}) => Promise<any>;
|
|
113
|
-
getFileExcel: ({ model }: {
|
|
115
|
+
getFileExcel: ({ model, service, xNode, }: {
|
|
114
116
|
model: string;
|
|
117
|
+
service?: string;
|
|
118
|
+
xNode?: string;
|
|
115
119
|
}) => Promise<any>;
|
|
116
|
-
getFieldExport: ({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
|
|
120
|
+
getFieldExport: ({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, service, xNode, }: {
|
|
117
121
|
ids: any;
|
|
118
122
|
model: string;
|
|
119
123
|
isShow?: boolean;
|
|
@@ -124,8 +128,10 @@ declare function useExcelService(): {
|
|
|
124
128
|
name?: any;
|
|
125
129
|
context: any;
|
|
126
130
|
importCompat?: any;
|
|
131
|
+
service?: string;
|
|
132
|
+
xNode?: string;
|
|
127
133
|
}) => Promise<any>;
|
|
128
|
-
exportExcel: ({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
|
|
134
|
+
exportExcel: ({ model, domain, ids, fields, type, importCompat, context, groupby, service, xNode, }: {
|
|
129
135
|
model: string;
|
|
130
136
|
domain: any;
|
|
131
137
|
ids: any;
|
|
@@ -134,6 +140,8 @@ declare function useExcelService(): {
|
|
|
134
140
|
importCompat: any;
|
|
135
141
|
context: any;
|
|
136
142
|
groupby: any;
|
|
143
|
+
service?: string;
|
|
144
|
+
xNode?: string;
|
|
137
145
|
}) => Promise<any>;
|
|
138
146
|
};
|
|
139
147
|
|
package/dist/services.d.ts
CHANGED
|
@@ -89,8 +89,10 @@ declare function useExcelService(): {
|
|
|
89
89
|
service?: string;
|
|
90
90
|
xNode?: string;
|
|
91
91
|
}) => Promise<any>;
|
|
92
|
-
uploadIdFile: ({ formData }: {
|
|
92
|
+
uploadIdFile: ({ formData, service, xNode, }: {
|
|
93
93
|
formData: any;
|
|
94
|
+
service?: string;
|
|
95
|
+
xNode?: string;
|
|
94
96
|
}) => Promise<any>;
|
|
95
97
|
parsePreview: ({ id, selectedSheet, isHeader, context, service, xNode, }: {
|
|
96
98
|
id: any;
|
|
@@ -110,10 +112,12 @@ declare function useExcelService(): {
|
|
|
110
112
|
service?: string;
|
|
111
113
|
xNode?: string;
|
|
112
114
|
}) => Promise<any>;
|
|
113
|
-
getFileExcel: ({ model }: {
|
|
115
|
+
getFileExcel: ({ model, service, xNode, }: {
|
|
114
116
|
model: string;
|
|
117
|
+
service?: string;
|
|
118
|
+
xNode?: string;
|
|
115
119
|
}) => Promise<any>;
|
|
116
|
-
getFieldExport: ({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
|
|
120
|
+
getFieldExport: ({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, service, xNode, }: {
|
|
117
121
|
ids: any;
|
|
118
122
|
model: string;
|
|
119
123
|
isShow?: boolean;
|
|
@@ -124,8 +128,10 @@ declare function useExcelService(): {
|
|
|
124
128
|
name?: any;
|
|
125
129
|
context: any;
|
|
126
130
|
importCompat?: any;
|
|
131
|
+
service?: string;
|
|
132
|
+
xNode?: string;
|
|
127
133
|
}) => Promise<any>;
|
|
128
|
-
exportExcel: ({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
|
|
134
|
+
exportExcel: ({ model, domain, ids, fields, type, importCompat, context, groupby, service, xNode, }: {
|
|
129
135
|
model: string;
|
|
130
136
|
domain: any;
|
|
131
137
|
ids: any;
|
|
@@ -134,6 +140,8 @@ declare function useExcelService(): {
|
|
|
134
140
|
importCompat: any;
|
|
135
141
|
context: any;
|
|
136
142
|
groupby: any;
|
|
143
|
+
service?: string;
|
|
144
|
+
xNode?: string;
|
|
137
145
|
}) => Promise<any>;
|
|
138
146
|
};
|
|
139
147
|
|
package/dist/services.js
CHANGED
|
@@ -3598,12 +3598,19 @@ function useExcelService() {
|
|
|
3598
3598
|
[env]
|
|
3599
3599
|
);
|
|
3600
3600
|
const uploadIdFile = (0, import_react9.useCallback)(
|
|
3601
|
-
async ({
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3601
|
+
async ({
|
|
3602
|
+
formData,
|
|
3603
|
+
service,
|
|
3604
|
+
xNode
|
|
3605
|
+
}) => {
|
|
3606
|
+
return env.requests.post(
|
|
3607
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3608
|
+
formData,
|
|
3609
|
+
{
|
|
3610
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3611
|
+
},
|
|
3612
|
+
service
|
|
3613
|
+
);
|
|
3607
3614
|
},
|
|
3608
3615
|
[env]
|
|
3609
3616
|
);
|
|
@@ -3691,13 +3698,24 @@ function useExcelService() {
|
|
|
3691
3698
|
[env]
|
|
3692
3699
|
);
|
|
3693
3700
|
const getFileExcel = (0, import_react9.useCallback)(
|
|
3694
|
-
async ({
|
|
3701
|
+
async ({
|
|
3702
|
+
model,
|
|
3703
|
+
service,
|
|
3704
|
+
xNode
|
|
3705
|
+
}) => {
|
|
3695
3706
|
const jsonData = {
|
|
3696
3707
|
model,
|
|
3697
3708
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3698
3709
|
args: []
|
|
3699
3710
|
};
|
|
3700
|
-
return env.requests.post(
|
|
3711
|
+
return env.requests.post(
|
|
3712
|
+
"/call" /* CALL_PATH */,
|
|
3713
|
+
jsonData,
|
|
3714
|
+
{
|
|
3715
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3716
|
+
},
|
|
3717
|
+
service
|
|
3718
|
+
);
|
|
3701
3719
|
},
|
|
3702
3720
|
[env]
|
|
3703
3721
|
);
|
|
@@ -3712,7 +3730,9 @@ function useExcelService() {
|
|
|
3712
3730
|
prefix,
|
|
3713
3731
|
name,
|
|
3714
3732
|
context,
|
|
3715
|
-
importCompat
|
|
3733
|
+
importCompat,
|
|
3734
|
+
service,
|
|
3735
|
+
xNode
|
|
3716
3736
|
}) => {
|
|
3717
3737
|
const jsonData = {
|
|
3718
3738
|
model,
|
|
@@ -3728,7 +3748,14 @@ function useExcelService() {
|
|
|
3728
3748
|
jsonData.prefix = prefix;
|
|
3729
3749
|
jsonData.exclude = [null];
|
|
3730
3750
|
}
|
|
3731
|
-
return env.requests.post(
|
|
3751
|
+
return env.requests.post(
|
|
3752
|
+
"/export/get_fields",
|
|
3753
|
+
jsonData,
|
|
3754
|
+
{
|
|
3755
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3756
|
+
},
|
|
3757
|
+
service
|
|
3758
|
+
);
|
|
3732
3759
|
},
|
|
3733
3760
|
[env]
|
|
3734
3761
|
);
|
|
@@ -3741,7 +3768,9 @@ function useExcelService() {
|
|
|
3741
3768
|
type,
|
|
3742
3769
|
importCompat,
|
|
3743
3770
|
context,
|
|
3744
|
-
groupby
|
|
3771
|
+
groupby,
|
|
3772
|
+
service,
|
|
3773
|
+
xNode
|
|
3745
3774
|
}) => {
|
|
3746
3775
|
const jsonData = {
|
|
3747
3776
|
model,
|
|
@@ -3752,7 +3781,14 @@ function useExcelService() {
|
|
|
3752
3781
|
with_context: context,
|
|
3753
3782
|
groupby: groupby ?? []
|
|
3754
3783
|
};
|
|
3755
|
-
return env.requests.post_excel(
|
|
3784
|
+
return env.requests.post_excel(
|
|
3785
|
+
`/export/${type}`,
|
|
3786
|
+
jsonData,
|
|
3787
|
+
{
|
|
3788
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3789
|
+
},
|
|
3790
|
+
service
|
|
3791
|
+
);
|
|
3756
3792
|
},
|
|
3757
3793
|
[env]
|
|
3758
3794
|
);
|
package/dist/services.mjs
CHANGED
|
@@ -3554,12 +3554,19 @@ function useExcelService() {
|
|
|
3554
3554
|
[env]
|
|
3555
3555
|
);
|
|
3556
3556
|
const uploadIdFile = useCallback5(
|
|
3557
|
-
async ({
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3557
|
+
async ({
|
|
3558
|
+
formData,
|
|
3559
|
+
service,
|
|
3560
|
+
xNode
|
|
3561
|
+
}) => {
|
|
3562
|
+
return env.requests.post(
|
|
3563
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3564
|
+
formData,
|
|
3565
|
+
{
|
|
3566
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3567
|
+
},
|
|
3568
|
+
service
|
|
3569
|
+
);
|
|
3563
3570
|
},
|
|
3564
3571
|
[env]
|
|
3565
3572
|
);
|
|
@@ -3647,13 +3654,24 @@ function useExcelService() {
|
|
|
3647
3654
|
[env]
|
|
3648
3655
|
);
|
|
3649
3656
|
const getFileExcel = useCallback5(
|
|
3650
|
-
async ({
|
|
3657
|
+
async ({
|
|
3658
|
+
model,
|
|
3659
|
+
service,
|
|
3660
|
+
xNode
|
|
3661
|
+
}) => {
|
|
3651
3662
|
const jsonData = {
|
|
3652
3663
|
model,
|
|
3653
3664
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3654
3665
|
args: []
|
|
3655
3666
|
};
|
|
3656
|
-
return env.requests.post(
|
|
3667
|
+
return env.requests.post(
|
|
3668
|
+
"/call" /* CALL_PATH */,
|
|
3669
|
+
jsonData,
|
|
3670
|
+
{
|
|
3671
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3672
|
+
},
|
|
3673
|
+
service
|
|
3674
|
+
);
|
|
3657
3675
|
},
|
|
3658
3676
|
[env]
|
|
3659
3677
|
);
|
|
@@ -3668,7 +3686,9 @@ function useExcelService() {
|
|
|
3668
3686
|
prefix,
|
|
3669
3687
|
name,
|
|
3670
3688
|
context,
|
|
3671
|
-
importCompat
|
|
3689
|
+
importCompat,
|
|
3690
|
+
service,
|
|
3691
|
+
xNode
|
|
3672
3692
|
}) => {
|
|
3673
3693
|
const jsonData = {
|
|
3674
3694
|
model,
|
|
@@ -3684,7 +3704,14 @@ function useExcelService() {
|
|
|
3684
3704
|
jsonData.prefix = prefix;
|
|
3685
3705
|
jsonData.exclude = [null];
|
|
3686
3706
|
}
|
|
3687
|
-
return env.requests.post(
|
|
3707
|
+
return env.requests.post(
|
|
3708
|
+
"/export/get_fields",
|
|
3709
|
+
jsonData,
|
|
3710
|
+
{
|
|
3711
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3712
|
+
},
|
|
3713
|
+
service
|
|
3714
|
+
);
|
|
3688
3715
|
},
|
|
3689
3716
|
[env]
|
|
3690
3717
|
);
|
|
@@ -3697,7 +3724,9 @@ function useExcelService() {
|
|
|
3697
3724
|
type,
|
|
3698
3725
|
importCompat,
|
|
3699
3726
|
context,
|
|
3700
|
-
groupby
|
|
3727
|
+
groupby,
|
|
3728
|
+
service,
|
|
3729
|
+
xNode
|
|
3701
3730
|
}) => {
|
|
3702
3731
|
const jsonData = {
|
|
3703
3732
|
model,
|
|
@@ -3708,7 +3737,14 @@ function useExcelService() {
|
|
|
3708
3737
|
with_context: context,
|
|
3709
3738
|
groupby: groupby ?? []
|
|
3710
3739
|
};
|
|
3711
|
-
return env.requests.post_excel(
|
|
3740
|
+
return env.requests.post_excel(
|
|
3741
|
+
`/export/${type}`,
|
|
3742
|
+
jsonData,
|
|
3743
|
+
{
|
|
3744
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3745
|
+
},
|
|
3746
|
+
service
|
|
3747
|
+
);
|
|
3712
3748
|
},
|
|
3713
3749
|
[env]
|
|
3714
3750
|
);
|