@lingxiteam/ebe-utils 0.3.22 → 0.3.24
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/lib/h5public/src/components/common/BannerModal/index.tsx +1 -1
- package/lib/h5public/src/components/common/DocViewer/index.tsx +1 -0
- package/lib/h5public/src/components/common/PreviewFile/index.tsx +5 -5
- package/lib/h5public/src/components/factory/src/Animation/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Audio/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/Empty/empty.tsx +2 -0
- package/lib/h5public/src/components/factory/src/BasicComponents/Empty/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/FormItem/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BasicComponents/Spin/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/BasicComponents/SpinComp/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/BlockSelect/assets/index.tsx +2 -0
- package/lib/h5public/src/components/factory/src/BlockSelect/components/ActionView/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/BlockSelect/components/Icon/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Calendar/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/CardBody/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/CardFooter/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DAddressPicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DMultiplePicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DatePicker/InnerDatePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DatePicker/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformDate/DatePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformImagePicker/ImagePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformInput/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformInputNumber/FormInputNumber.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformList/Group/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformList/List/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformList/Title/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformPicker/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformRangePicker/RangePicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformSelect/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DformSwitch/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/DformTextArea/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Donut/Dount.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Donut/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicDataContainer/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicList/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicTable/assets/index.tsx +2 -0
- package/lib/h5public/src/components/factory/src/DynamicTable/hooks/useCreateColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/DynamicTable/hooks/useFormatCell.tsx +1 -0
- package/lib/h5public/src/components/factory/src/FilterItems/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Flex/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Grid/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/GroupColumn/GroupColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/GroupColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Icon/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Image/factoryImage.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Image/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXBarChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXLineChart/ChartLine.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXLineChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXPieChart/LXPieChart.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXPieChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LXRadarChart/LXRadarChat.tsx +1 -0
- package/lib/h5public/src/components/factory/src/LXRadarChart/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Line/Line.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Line/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LineColumn/LineColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LineColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/LoadMore/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/MultipleProgress/MultipleProgress.tsx +1 -1
- package/lib/h5public/src/components/factory/src/MultipleProgress/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/NoticeBarPlus/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Notification/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/Picker/InnerPicker.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Picker/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/ProgressBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/QRCode/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/RemoteComponent/assets/iconFailComp.tsx +2 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/FishRender.tsx +1 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/ReactRender.tsx +1 -1
- package/lib/h5public/src/components/factory/src/RemoteComponent/components/VueRender.tsx +1 -0
- package/lib/h5public/src/components/factory/src/RemoteComponent/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Selector/LxSelector.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SideBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SingleProgress/index.tsx +1 -0
- package/lib/h5public/src/components/factory/src/SmallColumnar/SmallColumnar.tsx +1 -1
- package/lib/h5public/src/components/factory/src/SmallColumnar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StackColumn/StackColumn.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StackColumn/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/StepBar/constant/checkcircle.tsx +2 -0
- package/lib/h5public/src/components/factory/src/StepBar/constant/vector.tsx +2 -0
- package/lib/h5public/src/components/factory/src/StepProcess/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/TabImage/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/TabPage/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/TabBar/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/Table/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VerificationCode/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VideoPlayer/ViewPlayer.tsx +1 -1
- package/lib/h5public/src/components/factory/src/VideoPlayer/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/View/index.tsx +1 -1
- package/lib/h5public/src/components/factory/src/utils/LoaderHelper.tsx +1 -0
- package/lib/h5public/src/components/factory/src/utils/hooks/useCompState.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Cascader/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ChartBar/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/CheckboxGroup/index.tsx +41 -29
- package/lib/pcpublic/src/components/pcfactory/src/CollapsePanel/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/DynamicDataContainer/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/DynamicTabs/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/FormGroup/TitleComp.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/FormGroup/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Gantt/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/GridView/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Icon/hooks/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Img/BasicImage/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Menu/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Progress/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/QRCode/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/QuillEditor/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RadarChart/RadarECharts.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RadarChart/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Rate/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ReactECharts/ReactECharts.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/ReactECharts/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/FishRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/ReactRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/components/VueRender.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/RemoteComponent/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Select/selectUtils.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/DownloadProgress/DownloadProgress.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/StdUpload/UploadItem.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Steps/constant/checkcircle.tsx +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/Steps/constant/vector.tsx +2 -0
- package/lib/pcpublic/src/components/pcfactory/src/Steps/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Switch/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +2 -2
- package/lib/pcpublic/src/components/pcfactory/src/TooltipView/hooks/index.tsx +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/Upload/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/VirtualGroup/index.tsx +1 -1
- package/lib/pcpublic/src/components/pcfactory/src/WebComponent/WebComponent.tsx +1 -0
- package/lib/pcpublic/src/utils/exportCustomData/index.tsx +121 -102
- package/lib/public/.eslintignore +55 -0
- package/lib/public/public/iconfont.js +1 -1
- package/lib/public/src/components/ExpSQLServiceModal/index.tsx +1 -1
- package/lib/public/src/components/ImportBusiObjModal/index.tsx +7 -8
- package/lib/public/src/components/LoaderHelper/index.tsx +1 -0
- package/lib/public/src/components/ProgressComp/ProgressComp.tsx +1 -1
- package/lib/public/src/components/ProgressComp/index.tsx +1 -0
- package/lib/public/src/components/WaterMark/index.tsx +1 -1
- package/lib/public/src/components/common/ExpBusiObjModal/index.tsx +1 -1
- package/lib/public/src/hooks/useExportCustomDataFile.ts +2 -3
- package/lib/public/src/pages/_preview/index.tsx +2 -1
- package/lib/public/src/utils/Context/Container.tsx +1 -1
- package/lib/public/src/utils/Context/context.tsx +2 -2
- package/lib/public/src/utils/Security/urlEncryption.ts +4 -4
- package/lib/public/src/utils/platform/utils/fileUtils.ts +1 -1
- package/lib/public/src/utils/preprocess.ts +3 -2
- package/lib/public/src/utils/service/defaultResponseInterceptor.ts +13 -13
- package/package.json +2 -2
|
@@ -193,7 +193,7 @@ const useRowEdit = (props: any) => {
|
|
|
193
193
|
|
|
194
194
|
// 当处于编辑状态时,需要过滤来自编辑控件内部触发的 click
|
|
195
195
|
while (target?.className !== curentTarget?.className) {
|
|
196
|
-
|
|
196
|
+
if (!target) break;
|
|
197
197
|
// 非当前行内元素,不再遍历
|
|
198
198
|
if (!curentTarget.contains(target)) {
|
|
199
199
|
return false;
|
|
@@ -223,7 +223,7 @@ const useRowEdit = (props: any) => {
|
|
|
223
223
|
// 当处于编辑状态时,需要过滤来自编辑控件内部触发的 doubleclick
|
|
224
224
|
let stopDoubleClick = false;
|
|
225
225
|
while (target?.className !== curentTarget?.className) {
|
|
226
|
-
|
|
226
|
+
if (!target) break;
|
|
227
227
|
// 非当前行内元素,不再遍历,不触发点击事件
|
|
228
228
|
if (!curentTarget.contains(target)) {
|
|
229
229
|
stopDoubleClick = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LingxiForwardRef } from '@lingxiteam/types';
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import { useCommonImperativeHandle } from '../utils';
|
|
4
4
|
import UploadLoader from './loader';
|
|
5
5
|
import type { MyUploadProps } from './Upload';
|
|
@@ -387,7 +387,27 @@ const getResponseAttr = (response: { code: string; attrType: string; children: a
|
|
|
387
387
|
};
|
|
388
388
|
// 根据配置态勾选的导出项,进行导出参数的组装
|
|
389
389
|
const getExportColumns = (item: ExportItem, resultList: any): Record<string, any> => {
|
|
390
|
-
const { source, objectFields, nameMap, parentCode, isCustom, isTemp, objectFieldsTemp, customGroup } = item;
|
|
390
|
+
const { source, objectFields, nameMap, parentCode, isCustom, isTemp, objectFieldsTemp, customGroup, objectFieldsCustom } = item;
|
|
391
|
+
if (isCustom && objectFields.length === 0) {
|
|
392
|
+
let parCode = parentCode;
|
|
393
|
+
const nameDescMap = {};
|
|
394
|
+
const { attrName = '', attrCode = '', fieldData = [], exportNode = '' } = objectFieldsCustom;
|
|
395
|
+
// 动态列导出数据的父节点,去除root前缀,保持跟选择字段的parentCode一致
|
|
396
|
+
parCode = exportNode.replace(/^root\./, '');
|
|
397
|
+
const recursive = (arr: any[], parent?: string) => {
|
|
398
|
+
if (Array.isArray(arr)) {
|
|
399
|
+
arr.forEach(k => {
|
|
400
|
+
const code = parent ? `${parent}.${k[attrCode]}` : k[attrCode];
|
|
401
|
+
objectFields.push(code);
|
|
402
|
+
nameDescMap[code] = k[attrName];
|
|
403
|
+
if (k?.children) {
|
|
404
|
+
recursive(k.children, code);
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
recursive(fieldData, parCode);
|
|
410
|
+
}
|
|
391
411
|
let columns: Record<string, any> = {};
|
|
392
412
|
// 记录最新的字段和名称映射,分组表头组装时需要
|
|
393
413
|
const colNameMap = { ...nameMap };
|
|
@@ -561,113 +581,112 @@ const getExportColumns = (item: ExportItem, resultList: any): Record<string, any
|
|
|
561
581
|
}
|
|
562
582
|
return columns;
|
|
563
583
|
};
|
|
564
|
-
type ExportPathMapType = Record<'sql' | 'object' | 'multiExport', string>;
|
|
565
|
-
const exportPathMap: ExportPathMapType = {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
};
|
|
584
|
+
// type ExportPathMapType = Record<'sql' | 'object' | 'multiExport', string>;
|
|
585
|
+
// const exportPathMap: ExportPathMapType = {
|
|
586
|
+
// sql: engineServices.exportSqlDatasApiPath(),
|
|
587
|
+
// object: engineServices.exportInstsApiPath(),
|
|
588
|
+
// multiExport: engineServices.exportMultiServiceResultPath(),
|
|
589
|
+
// };
|
|
570
590
|
const exportCustomData = (exportSheet: any = [], custFileName: any, selectedKeyMap: { [x: string]: any }, async: string) => {
|
|
571
|
-
|
|
572
|
-
// 获取到的服务出参列表
|
|
573
|
-
const selectedRowMap: any = {};
|
|
574
|
-
messageApi.loading('正在导出中,请稍候...', 0);
|
|
575
|
-
try {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
591
|
+
return new Promise((resolve, reject) => {
|
|
592
|
+
// 获取到的服务出参列表
|
|
593
|
+
const selectedRowMap: any = {};
|
|
594
|
+
messageApi.loading('正在导出中,请稍候...', 0);
|
|
595
|
+
try {
|
|
596
|
+
const columnsReq = Object.keys(selectedKeyMap).map(type => {
|
|
597
|
+
if (!selectedKeyMap[type] || !selectedKeyMap[type]?.length) {
|
|
598
|
+
return undefined;
|
|
599
|
+
}
|
|
600
|
+
// 获取不同类型服务的出参列表
|
|
601
|
+
let req;
|
|
602
|
+
if (type === SERVICE_SOURCE.QUERY) {
|
|
603
|
+
// SQL类型
|
|
604
|
+
req = engineServices
|
|
605
|
+
.getSqlQueryColumnsList({
|
|
606
|
+
serviceCodes: selectedKeyMap[type].join(','),
|
|
607
|
+
appId: APPID,
|
|
608
|
+
})
|
|
609
|
+
.then((res: any) => {
|
|
610
|
+
const m: any = {};
|
|
611
|
+
(res || []).forEach((c: any) => (m[c.serviceCode] = c.rowColumns));
|
|
612
|
+
return m;
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
if (type === SERVICE_SOURCE.OBJECT) {
|
|
616
|
+
// 对象类型
|
|
617
|
+
req = engineServices
|
|
618
|
+
.queryBusiObjectRowColumnsList({
|
|
619
|
+
busiObjectIds: selectedKeyMap[type].join(','),
|
|
620
|
+
})
|
|
621
|
+
.then((res: any) => {
|
|
622
|
+
const m: any = {};
|
|
623
|
+
(res || []).forEach((c: any) => (m[c.busiObjectId] = c.rowColumns));
|
|
624
|
+
return m;
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
if (type === SERVICE_SOURCE.STD) {
|
|
628
|
+
// 编排类服务
|
|
629
|
+
// @ts-ignore
|
|
630
|
+
req = engineServices
|
|
631
|
+
.queryServiceResponseColumnsList({
|
|
632
|
+
serviceVersionIds: (selectedKeyMap[type] || []).join(','),
|
|
633
|
+
})
|
|
634
|
+
.then((res: any) => {
|
|
635
|
+
const m: any = {};
|
|
636
|
+
(res || []).forEach((c: any) => (m[c.serviceVersionId] = getResponseAttr(c.response)));
|
|
637
|
+
return m;
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
if (req) {
|
|
641
|
+
req?.then((r: any) => {
|
|
642
|
+
selectedRowMap[type] = r;
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
return req;
|
|
646
|
+
});
|
|
647
|
+
Promise.all(columnsReq).then(async () => {
|
|
648
|
+
const sheetItemList = exportSheet;
|
|
649
|
+
const serviceExecuteParams = sheetItemList.map((sheet: ExportItem) => {
|
|
650
|
+
const { parameters, objValue, objType, custSheetName, source } = sheet;
|
|
651
|
+
const resultList = (selectedRowMap[source] || {})[objValue] || [];
|
|
652
|
+
const columns = getExportColumns(sheet, resultList);
|
|
653
|
+
return {
|
|
654
|
+
objValue,
|
|
655
|
+
objType,
|
|
656
|
+
parameters,
|
|
657
|
+
sheetName: custSheetName,
|
|
658
|
+
...columns,
|
|
659
|
+
};
|
|
605
660
|
});
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
661
|
+
const exportFileName = custFileName;
|
|
662
|
+
const fileName = `${exportFileName}.xlsx`;
|
|
663
|
+
const downloadIndex = `${fileName}_${Math.random()}`;
|
|
664
|
+
await exportFileShowProgress?.({
|
|
665
|
+
downloadIndex,
|
|
666
|
+
fileName,
|
|
667
|
+
methodType: 'POST',
|
|
668
|
+
fileOrigin: 'multiExport',
|
|
669
|
+
async,
|
|
670
|
+
params: {
|
|
671
|
+
serviceExecuteParams,
|
|
672
|
+
fileName,
|
|
673
|
+
},
|
|
674
|
+
onSuccess: () => {
|
|
675
|
+
messageApi.destroy();
|
|
676
|
+
},
|
|
677
|
+
onFail: () => {
|
|
678
|
+
messageApi.destroy();
|
|
679
|
+
messageApi.error('导出失败');
|
|
680
|
+
},
|
|
618
681
|
});
|
|
619
|
-
}
|
|
620
|
-
if (req) {
|
|
621
|
-
req?.then((r: any) => {
|
|
622
|
-
selectedRowMap[type] = r;
|
|
623
682
|
});
|
|
683
|
+
resolve(true);
|
|
684
|
+
} catch {
|
|
685
|
+
messageApi.destroy();
|
|
686
|
+
messageApi.error('导出失败');
|
|
687
|
+
reject();
|
|
624
688
|
}
|
|
625
|
-
return req;
|
|
626
|
-
});
|
|
627
|
-
Promise.all(columnsReq).then(async () => {
|
|
628
|
-
const sheetItemList = exportSheet;
|
|
629
|
-
const serviceExecuteParams = sheetItemList.map((sheet: ExportItem) => {
|
|
630
|
-
const { parameters, objValue, objType, custSheetName, source } = sheet;
|
|
631
|
-
const resultList = (selectedRowMap[source] || {})[objValue] || [];
|
|
632
|
-
const columns = getExportColumns(sheet, resultList);
|
|
633
|
-
return {
|
|
634
|
-
objValue,
|
|
635
|
-
objType,
|
|
636
|
-
parameters,
|
|
637
|
-
sheetName: custSheetName,
|
|
638
|
-
...columns,
|
|
639
|
-
};
|
|
640
|
-
});
|
|
641
|
-
const exportFileName = custFileName;
|
|
642
|
-
const fileName = `${exportFileName}.xlsx`;
|
|
643
|
-
const downloadIndex = `${fileName}_${Math.random()}`;
|
|
644
|
-
await exportFileShowProgress?.({
|
|
645
|
-
downloadIndex,
|
|
646
|
-
fileName,
|
|
647
|
-
methodType: 'POST',
|
|
648
|
-
fileOrigin: 'multiExport',
|
|
649
|
-
async,
|
|
650
|
-
params: {
|
|
651
|
-
serviceExecuteParams,
|
|
652
|
-
fileName,
|
|
653
|
-
},
|
|
654
|
-
onSuccess: () => {
|
|
655
|
-
messageApi.destroy();
|
|
656
|
-
},
|
|
657
|
-
onFail: () => {
|
|
658
|
-
messageApi.destroy();
|
|
659
|
-
messageApi.error('导出失败');
|
|
660
|
-
},
|
|
661
|
-
});
|
|
662
689
|
});
|
|
663
|
-
resolve(true);
|
|
664
|
-
} catch {
|
|
665
|
-
messageApi.destroy();
|
|
666
|
-
messageApi.error('导出失败');
|
|
667
|
-
reject()
|
|
668
|
-
}
|
|
669
|
-
})
|
|
670
|
-
|
|
671
690
|
};
|
|
672
691
|
|
|
673
692
|
export default exportCustomData;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
**/node_modules
|
|
5
|
+
|
|
6
|
+
# 代码生成的组件库部分文件不进行校验处理
|
|
7
|
+
src/utils/cmd.ts
|
|
8
|
+
src/utils/array.ts
|
|
9
|
+
src/hooks/useTransSuperObjectParams.ts
|
|
10
|
+
src/hooks/useBaseDataSource.ts
|
|
11
|
+
src/components/common/ExpBusiObjModal/index.tsx
|
|
12
|
+
src/components/ExpSQLServiceModal/index.tsx
|
|
13
|
+
src/components/ImportBusiObjModal/index.tsx
|
|
14
|
+
src/components/factory/src/utils/index.ts
|
|
15
|
+
src/components/factory/src/PictureVerifyCode/index.tsx
|
|
16
|
+
src/utils/formUtils.ts
|
|
17
|
+
src/hooks/usePageForm.ts
|
|
18
|
+
src/components/factory/src/TabBar/TabImage/index.tsx
|
|
19
|
+
# misc
|
|
20
|
+
.DS_Store
|
|
21
|
+
npm-debug.log*
|
|
22
|
+
yarn-error.log
|
|
23
|
+
|
|
24
|
+
/coverage
|
|
25
|
+
.idea
|
|
26
|
+
package-lock.json
|
|
27
|
+
pnpm-lock.yaml
|
|
28
|
+
*bak
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# visual studio code
|
|
32
|
+
*.log
|
|
33
|
+
functions/*
|
|
34
|
+
.temp/**
|
|
35
|
+
|
|
36
|
+
# umi
|
|
37
|
+
.umi
|
|
38
|
+
.umi-production
|
|
39
|
+
/.env.local
|
|
40
|
+
/.umirc.local.ts
|
|
41
|
+
/.umirc.local.js
|
|
42
|
+
/config/config.local.ts
|
|
43
|
+
/config/config.local.js
|
|
44
|
+
|
|
45
|
+
# screenshot
|
|
46
|
+
.firebase
|
|
47
|
+
.eslintcache
|
|
48
|
+
|
|
49
|
+
/types
|
|
50
|
+
cache.json
|
|
51
|
+
req.json
|
|
52
|
+
demo/public
|
|
53
|
+
service/public
|
|
54
|
+
.cache
|
|
55
|
+
dsl-testing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window._iconfont_svg_string_4763695='<svg><symbol id="lcdp-icon-shanchu" viewBox="0 0 1024 1024"><path d="M796.16 352c19.84 0 35.84 16 35.84 35.84v476.16a96 96 0 0 1-96 96h-448A96 96 0 0 1 192 864V387.84a35.84 35.84 0 1 1 71.68 0v476.16c0 11.776 8.32 21.568 19.392 23.808l4.928 0.512h448a24.32 24.32 0 0 0 23.808-19.392l0.512-4.928V387.84c0-19.84 16-35.84 35.84-35.84z m-380.16 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m192 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m96-192a32 32 0 0 0-26.24-31.488L672 128h-320a32 32 0 0 0-31.488 26.24L320 160v64H256v-64A96 96 0 0 1 352 64h320A96 96 0 0 1 768 160v64h156.16a35.84 35.84 0 1 1 0 71.68H99.84a35.84 35.84 0 1 1 0-71.68H704v-64z" ></path></symbol><symbol id="lcdp-icon-tianjia-da" viewBox="0 0 1024 1024"><path d="M512 85.333333c27.349333 0 49.92 17.664 53.333333 45.696v327.637334h327.637334c25.216 0 45.696 23.893333 45.696 53.333333 0 27.349333-17.664 49.92-45.696 53.333333H565.333333v327.637334C565.333333 918.186667 541.44 938.666667 512 938.666667c-27.349333 0-49.92-17.664-53.333333-45.696v-327.68l-327.637334 0.042666C105.813333 565.333333 85.333333 541.44 85.333333 512c0-27.349333 17.664-49.92 45.696-53.333333l327.637334-0.042667V131.029333C458.666667 105.813333 482.56 85.333333 512 85.333333z" ></path></symbol><symbol id="lcdp-icon-zidingyi" viewBox="0 0 1024 1024"><path d="M331.690667 121.92L901.013333 691.2a64 64 0 0 1 0 90.517333l-129.152 129.152a64 64 0 0 1-90.496 0L112.042667 341.546667a64 64 0 0 1 0-90.517334l129.130666-129.130666a64 64 0 0 1 90.517334 0z m476.288 546.56a32 32 0 0 0-45.269334 0l-108.245333 108.245333a32 32 0 0 0 45.226667 45.248l108.288-108.245333a32 32 0 0 0 0-45.269333zM295.082667 200.810667l-108.266667 108.266666a32 32 0 1 0 45.269333 45.226667l108.245334-108.245333a32 32 0 1 0-45.248-45.248z" ></path><path d="M683.754667 121.664a93.184 93.184 0 0 1 131.797333 0l87.850667 87.872a93.184 93.184 0 0 1 0 131.776l-36.992 37.013333L646.762667 158.677333l36.992-37.013333zM601.514667 203.946667l219.648 219.648L423.829333 820.906667 204.181333 601.258667 601.514667 203.925333zM158.933333 646.506667l-25.429333 25.408C109.589333 744.533333 108.245333 867.626667 108.181333 881.130667c0 0.853333-0.064 1.664-0.149333 2.496a31.061333 31.061333 0 0 0 35.264 33.258666c11.52-0.746667 190.506667-12.544 209.877333-25.322666l25.386667-25.408L158.933333 646.506667z" ></path></symbol><symbol id="lcdp-icon-flow-single-record" viewBox="0 0 1024 1024"><path d="M187.306667 187.306667a348.16 348.16 0 0 1 521.301333 459.690666l217.301333 217.386667A43.52 43.52 0 0 1 864.426667 925.866667l-217.344-217.344A348.245333 348.245333 0 0 1 187.306667 187.306667z m61.568 61.568a261.12 261.12 0 1 0 369.28 369.28 261.12 261.12 0 0 0-369.28-369.28z" ></path></symbol><symbol id="lcdp-icon-Error" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64zM421.504 376.256a32 32 0 1 0-45.248 45.248L466.752 512 376.256 602.496a32 32 0 1 0 45.248 45.248L512 557.248l90.496 90.496a32 32 0 1 0 45.248-45.248L557.248 512l90.496-90.496a32 32 0 1 0-45.248-45.248L512 466.752z" fill="#FF7474" ></path></symbol><symbol id="lcdp-icon-Warning" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 224a32 32 0 0 1 32 32v224a32 32 0 0 1-64 0V320a32 32 0 0 1 32-32z m0 448A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF9D49" ></path></symbol><symbol id="lcdp-icon-News" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 384a32 32 0 0 1 32 32V704a32 32 0 1 1-64 0V480A32 32 0 0 1 512 448z m0-64a48 48 0 1 1 0-96A48 48 0 0 1 512 384z" fill="#4477EE" ></path></symbol><symbol id="lcdp-icon-Success" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m183.168 327.296a32 32 0 0 0-44.992 4.352l-176 213.696L375.04 506.048l-4.352-3.84a32 32 0 0 0-41.856 48.128l124.032 129.28 4.736 4.096a32 32 0 0 0 43.072-5.888l198.848-241.472 3.2-4.8a32 32 0 0 0-7.616-40.256z" fill="#41E19B" ></path></symbol><symbol id="lcdp-icon-cloud-upload" viewBox="0 0 1024 1024"><path d="M570.368 170.6496c145.8176 0 264.0384 119.552 264.0384 267.0592l-0.4608 9.0112a207.2064 207.2064 0 0 1 147.4048 199.0656c0 114.6368-91.904 207.5648-205.2608 207.5648H247.9616c-113.408 0-205.312-92.928-205.312-207.5648 0-57.088 22.784-108.7488 59.6992-146.2784a171.4176 171.4176 0 0 1-0.9216-16.9984c0-90.112 72.192-163.2768 161.28-163.2768 22.9888 0 44.8512 4.9664 64.6144 13.824 40.2944-95.4368 133.888-162.4064 243.0464-162.4064z m-58.7264 256c-5.12 0-9.6256 1.8944-13.7216 4.5056a23.1936 23.1936 0 0 0-3.9424 2.7648c-0.4608 0.4096-1.024 0.6656-1.3824 1.0752-0.256 0.256-0.512 0.4096-0.8192 0.6144l-78.336 81.1008a29.3888 29.3888 0 0 0 0 40.4992 27.136 27.136 0 0 0 39.168 0l32.256-33.3824v152.4224c0 15.36 11.9808 27.7504 26.7776 27.7504a27.2384 27.2384 0 0 0 26.6752-27.7504v-153.7536l33.28 34.6624c10.752 11.264 28.2624 11.264 39.0144 0a29.696 29.696 0 0 0 0-40.6528L532.5824 435.2a26.624 26.624 0 0 0-18.688-8.0896l-2.2528-0.512z" ></path></symbol><symbol id="lcdp-icon-tuozhuai" viewBox="0 0 1024 1024"><path d="M438.848 219.456c0-36.608-36.544-73.152-73.152-73.152-36.544 0-73.152 36.544-73.152 73.152 0 36.544 36.608 73.088 73.152 73.088 36.608 0 73.152-36.544 73.152-73.088z m146.304 585.088c0 36.608 36.544 73.152 73.152 73.152 36.544 0 73.152-36.544 73.152-73.152 0-36.544-36.608-73.088-73.152-73.088-36.608 0-73.152 36.544-73.152 73.088z m146.304-585.088c0-36.608-36.608-73.152-73.152-73.152-36.608 0-73.152 36.544-73.152 73.152 0 36.544 36.544 73.088 73.152 73.088 36.544 0 73.152-36.544 73.152-73.088zM438.848 804.48c0-36.544-36.544-73.088-73.152-73.088-36.544 0-73.152 36.544-73.152 73.088 0 36.608 36.608 73.152 73.152 73.152 36.608 0 73.152-36.544 73.152-73.152zM731.52 512c0-36.544-36.608-73.152-73.152-73.152-36.608 0-73.152 36.608-73.152 73.152 0 36.544 36.544 73.152 73.152 73.152 36.544 0 73.152-36.608 73.152-73.152zM438.848 512c0-36.544-36.544-73.152-73.152-73.152-36.544 0-73.152 36.608-73.152 73.152 0 36.544 36.608 73.152 73.152 73.152 36.608 0 73.152-36.608 73.152-73.152z" ></path></symbol></svg>',(a=>{
|
|
1
|
+
window._iconfont_svg_string_4763695 = '<svg><symbol id="lcdp-icon-shanchu" viewBox="0 0 1024 1024"><path d="M796.16 352c19.84 0 35.84 16 35.84 35.84v476.16a96 96 0 0 1-96 96h-448A96 96 0 0 1 192 864V387.84a35.84 35.84 0 1 1 71.68 0v476.16c0 11.776 8.32 21.568 19.392 23.808l4.928 0.512h448a24.32 24.32 0 0 0 23.808-19.392l0.512-4.928V387.84c0-19.84 16-35.84 35.84-35.84z m-380.16 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m192 0c19.84 0 35.84 16 35.84 35.84v376.32a35.84 35.84 0 1 1-71.68 0V387.84c0-19.84 16-35.84 35.84-35.84z m96-192a32 32 0 0 0-26.24-31.488L672 128h-320a32 32 0 0 0-31.488 26.24L320 160v64H256v-64A96 96 0 0 1 352 64h320A96 96 0 0 1 768 160v64h156.16a35.84 35.84 0 1 1 0 71.68H99.84a35.84 35.84 0 1 1 0-71.68H704v-64z" ></path></symbol><symbol id="lcdp-icon-tianjia-da" viewBox="0 0 1024 1024"><path d="M512 85.333333c27.349333 0 49.92 17.664 53.333333 45.696v327.637334h327.637334c25.216 0 45.696 23.893333 45.696 53.333333 0 27.349333-17.664 49.92-45.696 53.333333H565.333333v327.637334C565.333333 918.186667 541.44 938.666667 512 938.666667c-27.349333 0-49.92-17.664-53.333333-45.696v-327.68l-327.637334 0.042666C105.813333 565.333333 85.333333 541.44 85.333333 512c0-27.349333 17.664-49.92 45.696-53.333333l327.637334-0.042667V131.029333C458.666667 105.813333 482.56 85.333333 512 85.333333z" ></path></symbol><symbol id="lcdp-icon-zidingyi" viewBox="0 0 1024 1024"><path d="M331.690667 121.92L901.013333 691.2a64 64 0 0 1 0 90.517333l-129.152 129.152a64 64 0 0 1-90.496 0L112.042667 341.546667a64 64 0 0 1 0-90.517334l129.130666-129.130666a64 64 0 0 1 90.517334 0z m476.288 546.56a32 32 0 0 0-45.269334 0l-108.245333 108.245333a32 32 0 0 0 45.226667 45.248l108.288-108.245333a32 32 0 0 0 0-45.269333zM295.082667 200.810667l-108.266667 108.266666a32 32 0 1 0 45.269333 45.226667l108.245334-108.245333a32 32 0 1 0-45.248-45.248z" ></path><path d="M683.754667 121.664a93.184 93.184 0 0 1 131.797333 0l87.850667 87.872a93.184 93.184 0 0 1 0 131.776l-36.992 37.013333L646.762667 158.677333l36.992-37.013333zM601.514667 203.946667l219.648 219.648L423.829333 820.906667 204.181333 601.258667 601.514667 203.925333zM158.933333 646.506667l-25.429333 25.408C109.589333 744.533333 108.245333 867.626667 108.181333 881.130667c0 0.853333-0.064 1.664-0.149333 2.496a31.061333 31.061333 0 0 0 35.264 33.258666c11.52-0.746667 190.506667-12.544 209.877333-25.322666l25.386667-25.408L158.933333 646.506667z" ></path></symbol><symbol id="lcdp-icon-flow-single-record" viewBox="0 0 1024 1024"><path d="M187.306667 187.306667a348.16 348.16 0 0 1 521.301333 459.690666l217.301333 217.386667A43.52 43.52 0 0 1 864.426667 925.866667l-217.344-217.344A348.245333 348.245333 0 0 1 187.306667 187.306667z m61.568 61.568a261.12 261.12 0 1 0 369.28 369.28 261.12 261.12 0 0 0-369.28-369.28z" ></path></symbol><symbol id="lcdp-icon-Error" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64zM421.504 376.256a32 32 0 1 0-45.248 45.248L466.752 512 376.256 602.496a32 32 0 1 0 45.248 45.248L512 557.248l90.496 90.496a32 32 0 1 0 45.248-45.248L557.248 512l90.496-90.496a32 32 0 1 0-45.248-45.248L512 466.752z" fill="#FF7474" ></path></symbol><symbol id="lcdp-icon-Warning" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 224a32 32 0 0 1 32 32v224a32 32 0 0 1-64 0V320a32 32 0 0 1 32-32z m0 448A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF9D49" ></path></symbol><symbol id="lcdp-icon-News" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m0 384a32 32 0 0 1 32 32V704a32 32 0 1 1-64 0V480A32 32 0 0 1 512 448z m0-64a48 48 0 1 1 0-96A48 48 0 0 1 512 384z" fill="#4477EE" ></path></symbol><symbol id="lcdp-icon-Success" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m183.168 327.296a32 32 0 0 0-44.992 4.352l-176 213.696L375.04 506.048l-4.352-3.84a32 32 0 0 0-41.856 48.128l124.032 129.28 4.736 4.096a32 32 0 0 0 43.072-5.888l198.848-241.472 3.2-4.8a32 32 0 0 0-7.616-40.256z" fill="#41E19B" ></path></symbol><symbol id="lcdp-icon-cloud-upload" viewBox="0 0 1024 1024"><path d="M570.368 170.6496c145.8176 0 264.0384 119.552 264.0384 267.0592l-0.4608 9.0112a207.2064 207.2064 0 0 1 147.4048 199.0656c0 114.6368-91.904 207.5648-205.2608 207.5648H247.9616c-113.408 0-205.312-92.928-205.312-207.5648 0-57.088 22.784-108.7488 59.6992-146.2784a171.4176 171.4176 0 0 1-0.9216-16.9984c0-90.112 72.192-163.2768 161.28-163.2768 22.9888 0 44.8512 4.9664 64.6144 13.824 40.2944-95.4368 133.888-162.4064 243.0464-162.4064z m-58.7264 256c-5.12 0-9.6256 1.8944-13.7216 4.5056a23.1936 23.1936 0 0 0-3.9424 2.7648c-0.4608 0.4096-1.024 0.6656-1.3824 1.0752-0.256 0.256-0.512 0.4096-0.8192 0.6144l-78.336 81.1008a29.3888 29.3888 0 0 0 0 40.4992 27.136 27.136 0 0 0 39.168 0l32.256-33.3824v152.4224c0 15.36 11.9808 27.7504 26.7776 27.7504a27.2384 27.2384 0 0 0 26.6752-27.7504v-153.7536l33.28 34.6624c10.752 11.264 28.2624 11.264 39.0144 0a29.696 29.696 0 0 0 0-40.6528L532.5824 435.2a26.624 26.624 0 0 0-18.688-8.0896l-2.2528-0.512z" ></path></symbol><symbol id="lcdp-icon-tuozhuai" viewBox="0 0 1024 1024"><path d="M438.848 219.456c0-36.608-36.544-73.152-73.152-73.152-36.544 0-73.152 36.544-73.152 73.152 0 36.544 36.608 73.088 73.152 73.088 36.608 0 73.152-36.544 73.152-73.088z m146.304 585.088c0 36.608 36.544 73.152 73.152 73.152 36.544 0 73.152-36.544 73.152-73.152 0-36.544-36.608-73.088-73.152-73.088-36.608 0-73.152 36.544-73.152 73.088z m146.304-585.088c0-36.608-36.608-73.152-73.152-73.152-36.608 0-73.152 36.544-73.152 73.152 0 36.544 36.544 73.088 73.152 73.088 36.544 0 73.152-36.544 73.152-73.088zM438.848 804.48c0-36.544-36.544-73.088-73.152-73.088-36.544 0-73.152 36.544-73.152 73.088 0 36.608 36.608 73.152 73.152 73.152 36.608 0 73.152-36.544 73.152-73.152zM731.52 512c0-36.544-36.608-73.152-73.152-73.152-36.608 0-73.152 36.608-73.152 73.152 0 36.544 36.544 73.152 73.152 73.152 36.544 0 73.152-36.608 73.152-73.152zM438.848 512c0-36.544-36.544-73.152-73.152-73.152-36.544 0-73.152 36.608-73.152 73.152 0 36.544 36.608 73.152 73.152 73.152 36.608 0 73.152-36.608 73.152-73.152z" ></path></symbol></svg>', (a => { const t = (e = (e = document.getElementsByTagName('script'))[e.length - 1]).getAttribute('data-injectcss'); var e = e.getAttribute('data-disable-injectsvg');if (!e) { let l; let o; var i; var c; var n; const d = function(t, e) { e.parentNode.insertBefore(t, e); };if (t && !a.__iconfont__svg__cssinject__) { a.__iconfont__svg__cssinject__ = !0;try { document.write('<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>'); } catch (t) { console && console.log(t); } }l = function() { let t; let e = document.createElement('div');e.innerHTML = a._iconfont_svg_string_4763695, (e = e.getElementsByTagName('svg')[0]) && (e.setAttribute('aria-hidden', 'true'), e.style.position = 'absolute', e.style.width = 0, e.style.height = 0, e.style.overflow = 'hidden', e = e, (t = document.body).firstChild ? d(e, t.firstChild) : t.appendChild(e)); }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(l, 0) : (o = function() { document.removeEventListener('DOMContentLoaded', o, !1), l(); }, document.addEventListener('DOMContentLoaded', o, !1)) : document.attachEvent && (i = l, c = a.document, n = !1, m(), c.onreadystatechange = function() { c.readyState == 'complete' && (c.onreadystatechange = null, s()); }); } function s() { n || (n = !0, i()); } function m() { try { c.documentElement.doScroll('left'); } catch (t) { return void setTimeout(m, 50); }s(); } })(window);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useMemo, useState } from 'react';
|
|
1
2
|
import { api } from '@/services/api';
|
|
2
3
|
import { BaseModalProps, ExpSQLServiceModalHooks, ExpSQLServiceModalOptions } from '@/types';
|
|
3
4
|
import { exportFileShowProgress } from '@/utils/platform/utils/fileUtils';
|
|
4
5
|
import { LocaleFunction } from '@lingxiteam/types';
|
|
5
6
|
import { Checkbox, Divider, message, Modal, Spin } from 'antd';
|
|
6
|
-
import { forwardRef, useImperativeHandle, useMemo, useState } from 'react';
|
|
7
7
|
import { prefix } from '../../styles';
|
|
8
8
|
import { closeProgressMsg, closeProgressNotification, openProgressMsg, showProgressNotification } from '../ProgressComp';
|
|
9
9
|
import './index.less';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
1
2
|
import engineApi from '@/services/api/engine';
|
|
2
|
-
import { getAppFileUrlByFileCode } from '@/services/api/getAppFileUrlByFileCode';
|
|
3
3
|
import { ImportBusiObjModalHooks, ImportBusiObjModalProps } from '@/types';
|
|
4
4
|
import { handleParseGroups as parseGroupFunction } from '@/utils/engine-utils/exportCustomUtils';
|
|
5
5
|
import { batchDownloadFileByIds, saveBlobFile } from '@/utils/platform/utils/fileUtils';
|
|
@@ -7,7 +7,6 @@ import security from '@/utils/Security';
|
|
|
7
7
|
import resolveApiPath from '@/utils/service/resolveApiPath';
|
|
8
8
|
import { Button, Card, Checkbox, message, Modal, Progress, Spin, Upload } from 'antd';
|
|
9
9
|
import { UploadProps } from 'antd/es/upload/interface';
|
|
10
|
-
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
11
10
|
import pageIcon from '../../assets/pageicon';
|
|
12
11
|
import { prefix } from '../../styles';
|
|
13
12
|
import { IconFont } from '../IconFont';
|
|
@@ -213,7 +212,7 @@ const ImportBusiObjModal = forwardRef<ImportBusiObjModalHooks, ImportBusiObjModa
|
|
|
213
212
|
return;
|
|
214
213
|
}
|
|
215
214
|
try {
|
|
216
|
-
const { busiObjectId, fileName, customGroup,
|
|
215
|
+
const { busiObjectId, fileName, customGroup, templateData = { type: 'default' } } = params || {};
|
|
217
216
|
const obj: any = {
|
|
218
217
|
pickRows: selectedRows,
|
|
219
218
|
busiObjectId,
|
|
@@ -497,9 +496,9 @@ const ImportBusiObjModal = forwardRef<ImportBusiObjModalHooks, ImportBusiObjModa
|
|
|
497
496
|
resolve(
|
|
498
497
|
isAsyncImport
|
|
499
498
|
? {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
499
|
+
...result,
|
|
500
|
+
isAsyncImport,
|
|
501
|
+
}
|
|
503
502
|
: { success: fail ? [] : result, fail: fail ? result : [] }
|
|
504
503
|
);
|
|
505
504
|
} else {
|
|
@@ -939,8 +938,8 @@ const ImportBusiObjModal = forwardRef<ImportBusiObjModalHooks, ImportBusiObjModa
|
|
|
939
938
|
link.click();
|
|
940
939
|
link.remove();
|
|
941
940
|
window.URL?.revokeObjectURL(link.href);
|
|
942
|
-
}else{
|
|
943
|
-
console.log('文件不存在',fileCode)
|
|
941
|
+
} else {
|
|
942
|
+
console.log('文件不存在', fileCode);
|
|
944
943
|
}
|
|
945
944
|
};
|
|
946
945
|
xhr.send();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
1
2
|
import engineApi from '@/services/api/engine';
|
|
2
3
|
import { Checkbox, Divider, message, Modal, Spin } from 'antd';
|
|
3
|
-
import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { closeProgressMsg, closeProgressNotification, openProgressMsg, showProgressNotification } from '../../ProgressComp';
|
|
5
5
|
// import getApis from '../../services';
|
|
6
6
|
import { BaseModalProps, ExpBusiObjModalCustomOptions, ExpBusiObjModalHooks, ExpBusiObjModalOptions } from '@/types';
|
|
@@ -452,9 +452,8 @@ const useExportCustomDataFile = ({ getLocale }: ExportCustomDataFileOptions) =>
|
|
|
452
452
|
}
|
|
453
453
|
return req;
|
|
454
454
|
});
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
hide = messageApi('loading', '正在导出中,请稍候...', 0);
|
|
455
|
+
|
|
456
|
+
messageApi('loading', '正在导出中,请稍候...', 0);
|
|
458
457
|
await Promise.all(columnsReq);
|
|
459
458
|
const sheetItemList = await Promise.all(exportSheetList);
|
|
460
459
|
const serviceExecuteParams = sheetItemList.map((sheet: ExportItem) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ImperativeHandleReturn } from '@lingxiteam/types';
|
|
1
|
+
// import { type ImperativeHandleReturn } from '@lingxiteam/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
export const Context = React.createContext<{
|
|
@@ -42,7 +42,7 @@ export function mergeGetter<T extends objectType, S1 extends objectType, S2 exte
|
|
|
42
42
|
|
|
43
43
|
return target as any;
|
|
44
44
|
}
|
|
45
|
-
interface componentRef extends ImperativeHandleReturn {}
|
|
45
|
+
// interface componentRef extends ImperativeHandleReturn {}
|
|
46
46
|
|
|
47
47
|
export class RefsManager {
|
|
48
48
|
constructor() {}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import config from './config';
|
|
2
2
|
import { securityHeaderKey, signHeaderKey } from './const';
|
|
3
3
|
import { createHttpSignStr } from './encipher/sign';
|
|
4
|
-
import { MODE, modeType
|
|
4
|
+
import { MODE, modeType } from './types';
|
|
5
5
|
import { checkIsEncryption, checkIsSignMode } from './utils/check';
|
|
6
6
|
import { decryptedStrForSearchParams, encryptedStrForSearchParams } from './utils/encrypted';
|
|
7
7
|
import message from './utils/message';
|
|
8
8
|
import { getSearchObj, removeURLParameters } from './utils/url';
|
|
9
9
|
|
|
10
|
-
export const createHttpSignWithUrl
|
|
10
|
+
export const createHttpSignWithUrl = (url: any, options = {}, version: any) => {
|
|
11
11
|
if (!url) {
|
|
12
12
|
return '';
|
|
13
13
|
}
|
|
@@ -31,7 +31,7 @@ export const createHttpSignWithUrl: typeof securityType.createHttpSignWithUrl =
|
|
|
31
31
|
* @param version 加密模式
|
|
32
32
|
* @returns 加密处理后的url地址(带加密模式标记)
|
|
33
33
|
*/
|
|
34
|
-
export const createEncryptedWithUrl
|
|
34
|
+
export const createEncryptedWithUrl = (url: any, version: any) => {
|
|
35
35
|
if (!url) {
|
|
36
36
|
return '';
|
|
37
37
|
}
|
|
@@ -45,7 +45,7 @@ export const createEncryptedWithUrl: typeof securityType.createEncryptedWithUrl
|
|
|
45
45
|
return url;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
export const autoSecurityWithUrl
|
|
48
|
+
export const autoSecurityWithUrl = (url: any, options: any) => {
|
|
49
49
|
let originUrl: string = url;
|
|
50
50
|
const securityHeaderKey = config.securityHeaderKey as string;
|
|
51
51
|
const confiMode = config.mode as modeType;
|
|
@@ -446,7 +446,7 @@ const exportFileShowProgress: OmitAppIdAndPageId<ExportFileShowProgressParamsTyp
|
|
|
446
446
|
|
|
447
447
|
// 根据fileCode下载文件
|
|
448
448
|
const downloadByFileCode: DownloadByFileCodeType = params => {
|
|
449
|
-
const {
|
|
449
|
+
const { fileCode } = params;
|
|
450
450
|
|
|
451
451
|
downloadByXMLHttpRequest({
|
|
452
452
|
methodPath: getAppFileUrlByFileCode(fileCode),
|
|
@@ -56,9 +56,10 @@ const runFunc = (funcs: PreprocessFunctionType[], originProps: Record<string, an
|
|
|
56
56
|
funcs.forEach(func => {
|
|
57
57
|
try {
|
|
58
58
|
props = func(props, context) ?? props;
|
|
59
|
-
} catch (err) {
|
|
59
|
+
} catch (err) {
|
|
60
|
+
console.error('预处理函数执行失败', err);
|
|
61
|
+
}
|
|
60
62
|
});
|
|
61
|
-
|
|
62
63
|
return props;
|
|
63
64
|
};
|
|
64
65
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestOptionsInit, ResponseInterceptor } from 'alita';
|
|
2
|
-
import { AppCtxType } from './baseRequest';
|
|
2
|
+
// import { AppCtxType } from './baseRequest';
|
|
3
3
|
|
|
4
4
|
export const isErrorStatus = (status: number) => {
|
|
5
5
|
switch (status) {
|
|
@@ -17,18 +17,18 @@ export const isErrorStatus = (status: number) => {
|
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
type InterceptorResponseTypeCtx = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
// type InterceptorResponseTypeCtx = {
|
|
21
|
+
// options: RequestOptionsInit;
|
|
22
|
+
// data: any;
|
|
23
|
+
// response: Response;
|
|
24
|
+
// appCtx: AppCtxType;
|
|
25
|
+
// hookCtx: Record<string, any>;
|
|
26
|
+
// };
|
|
27
27
|
|
|
28
|
-
type InterceptorResponseType = (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
) => any;
|
|
28
|
+
// type InterceptorResponseType = (
|
|
29
|
+
// url: string,
|
|
30
|
+
// ctx: InterceptorResponseTypeCtx,
|
|
31
|
+
// ) => any;
|
|
32
32
|
|
|
33
33
|
export const defaultResponense: ResponseInterceptor = async (
|
|
34
34
|
response:Response,
|
|
@@ -37,7 +37,7 @@ export const defaultResponense: ResponseInterceptor = async (
|
|
|
37
37
|
const { url } = response;
|
|
38
38
|
const contentType: string = response.headers.get('content-type') || 'text/plain';
|
|
39
39
|
let data;
|
|
40
|
-
if(contentType === 'application/json'){
|
|
40
|
+
if (contentType === 'application/json') {
|
|
41
41
|
data = await response.clone().json();
|
|
42
42
|
}
|
|
43
43
|
if (url.indexOf('/static') !== -1) {
|