@zw-team/react-lib 1.0.1
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/README.md +207 -0
- package/dist/components/AccessReport/index.d.ts +29 -0
- package/dist/components/AccessReport/index.js +129 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.js +58 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Avatar/types.d.ts +9 -0
- package/dist/components/Avatar/types.js +0 -0
- package/dist/components/Block/Block.css +8 -0
- package/dist/components/Block/Block.d.ts +4 -0
- package/dist/components/Block/Block.js +11 -0
- package/dist/components/Block/index.d.ts +2 -0
- package/dist/components/Block/index.js +2 -0
- package/dist/components/Block/types.d.ts +3 -0
- package/dist/components/Block/types.js +0 -0
- package/dist/components/ConfigProvider/ConfigContext.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigContext.js +19 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigProvider.js +57 -0
- package/dist/components/ConfigProvider/index.d.ts +2 -0
- package/dist/components/ConfigProvider/index.js +2 -0
- package/dist/components/ConfigProvider/types.d.ts +19 -0
- package/dist/components/ConfigProvider/types.js +0 -0
- package/dist/components/CustomColumn/CustomColumn.d.ts +4 -0
- package/dist/components/CustomColumn/CustomColumn.js +388 -0
- package/dist/components/CustomColumn/CustomColumn.scss +135 -0
- package/dist/components/CustomColumn/index.d.ts +2 -0
- package/dist/components/CustomColumn/index.js +2 -0
- package/dist/components/CustomColumn/types.d.ts +19 -0
- package/dist/components/CustomColumn/types.js +0 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +89 -0
- package/dist/components/DatePicker/datePickerOption.d.ts +14 -0
- package/dist/components/DatePicker/datePickerOption.js +149 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/DatePicker/types.d.ts +12 -0
- package/dist/components/DatePicker/types.js +0 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.d.ts +6 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.js +397 -0
- package/dist/components/DatePickerPanel/datePickerPanel.scss +362 -0
- package/dist/components/DatePickerPanel/index.d.ts +2 -0
- package/dist/components/DatePickerPanel/index.js +2 -0
- package/dist/components/DatePickerPanel/type.d.ts +23 -0
- package/dist/components/DatePickerPanel/type.js +0 -0
- package/dist/components/DownloadCenter/DownloadCenter.d.ts +5 -0
- package/dist/components/DownloadCenter/DownloadCenter.js +367 -0
- package/dist/components/DownloadCenter/index.css +54 -0
- package/dist/components/DownloadCenter/index.d.ts +2 -0
- package/dist/components/DownloadCenter/index.js +2 -0
- package/dist/components/DownloadCenter/types.d.ts +27 -0
- package/dist/components/DownloadCenter/types.js +0 -0
- package/dist/components/Fireworks/Fireworks.d.ts +11 -0
- package/dist/components/Fireworks/Fireworks.js +415 -0
- package/dist/components/Fireworks/imgs/birthday-cake.svg +180 -0
- package/dist/components/Fireworks/imgs/hb.png +0 -0
- package/dist/components/Fireworks/imgs/sd.png +0 -0
- package/dist/components/Fireworks/imgs/xc.png +0 -0
- package/dist/components/Fireworks/imgs/yd.png +0 -0
- package/dist/components/Fireworks/index.d.ts +2 -0
- package/dist/components/Fireworks/index.js +2 -0
- package/dist/components/Fireworks/index.scss +9 -0
- package/dist/components/Fireworks/types.d.ts +6 -0
- package/dist/components/Fireworks/types.js +0 -0
- package/dist/components/Form/Form.css +4 -0
- package/dist/components/Form/Form.d.ts +9 -0
- package/dist/components/Form/Form.js +18 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/FormItem/FormItem.css +38 -0
- package/dist/components/FormItem/FormItem.d.ts +9 -0
- package/dist/components/FormItem/FormItem.js +25 -0
- package/dist/components/FormItem/index.d.ts +1 -0
- package/dist/components/FormItem/index.js +2 -0
- package/dist/components/HomeData/HomeData.d.ts +6 -0
- package/dist/components/HomeData/HomeData.js +364 -0
- package/dist/components/HomeData/HomeData.scss +161 -0
- package/dist/components/HomeData/index.d.ts +1 -0
- package/dist/components/HomeData/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.js +34 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Icon/types.d.ts +8 -0
- package/dist/components/Icon/types.js +0 -0
- package/dist/components/Log/index.d.ts +2 -0
- package/dist/components/Log/index.js +2 -0
- package/dist/components/Log/src/Detail.d.ts +7 -0
- package/dist/components/Log/src/Detail.js +71 -0
- package/dist/components/Log/src/Detail.scss +27 -0
- package/dist/components/Log/src/Log.d.ts +5 -0
- package/dist/components/Log/src/Log.js +335 -0
- package/dist/components/Log/src/Log.scss +50 -0
- package/dist/components/Log/src/useLogTableColumns.d.ts +2 -0
- package/dist/components/Log/src/useLogTableColumns.js +141 -0
- package/dist/components/Log/types.d.ts +5 -0
- package/dist/components/Log/types.js +0 -0
- package/dist/components/LogButton/LogButton.d.ts +4 -0
- package/dist/components/LogButton/LogButton.js +30 -0
- package/dist/components/LogButton/index.d.ts +2 -0
- package/dist/components/LogButton/index.js +2 -0
- package/dist/components/LogButton/logbutton.css +15 -0
- package/dist/components/LogButton/types.d.ts +10 -0
- package/dist/components/LogButton/types.js +0 -0
- package/dist/components/LogDialog/BiLogManager.d.ts +29 -0
- package/dist/components/LogDialog/BiLogManager.js +78 -0
- package/dist/components/LogDialog/LogDialog.d.ts +8 -0
- package/dist/components/LogDialog/LogDialog.js +106 -0
- package/dist/components/LogDialog/LogDialog.scss +29 -0
- package/dist/components/LogDialog/index.d.ts +3 -0
- package/dist/components/LogDialog/index.js +3 -0
- package/dist/components/LogDialog/types.d.ts +8 -0
- package/dist/components/LogDialog/types.js +0 -0
- package/dist/components/MediaPreview/MediaPreview.d.ts +5 -0
- package/dist/components/MediaPreview/MediaPreview.js +124 -0
- package/dist/components/MediaPreview/hook.d.ts +26 -0
- package/dist/components/MediaPreview/hook.js +174 -0
- package/dist/components/MediaPreview/index.css +202 -0
- package/dist/components/MediaPreview/index.d.ts +2 -0
- package/dist/components/MediaPreview/index.js +2 -0
- package/dist/components/MediaPreview/types.d.ts +24 -0
- package/dist/components/MediaPreview/types.js +0 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.js +31 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/Modal/types.d.ts +8 -0
- package/dist/components/Modal/types.js +0 -0
- package/dist/components/ModalStore/ModalProvider.d.ts +11 -0
- package/dist/components/ModalStore/ModalProvider.js +15 -0
- package/dist/components/ModalStore/ModalStore.d.ts +78 -0
- package/dist/components/ModalStore/ModalStore.js +188 -0
- package/dist/components/ModalStore/index.d.ts +3 -0
- package/dist/components/ModalStore/index.js +4 -0
- package/dist/components/ModalStore/types.d.ts +73 -0
- package/dist/components/ModalStore/types.js +0 -0
- package/dist/components/MoreButton/MoreButton.d.ts +3 -0
- package/dist/components/MoreButton/MoreButton.js +50 -0
- package/dist/components/MoreButton/index.d.ts +2 -0
- package/dist/components/MoreButton/index.js +2 -0
- package/dist/components/MoreButton/types.d.ts +15 -0
- package/dist/components/MoreButton/types.js +0 -0
- package/dist/components/NavbarTool/NavbarTool.d.ts +5 -0
- package/dist/components/NavbarTool/NavbarTool.js +143 -0
- package/dist/components/NavbarTool/components/index.css +49 -0
- package/dist/components/NavbarTool/components/index.d.ts +5 -0
- package/dist/components/NavbarTool/components/index.js +98 -0
- package/dist/components/NavbarTool/index.css +14 -0
- package/dist/components/NavbarTool/index.d.ts +2 -0
- package/dist/components/NavbarTool/index.js +2 -0
- package/dist/components/NavbarTool/types.d.ts +40 -0
- package/dist/components/NavbarTool/types.js +0 -0
- package/dist/components/NoticeCenter/NoticeCenter.d.ts +4 -0
- package/dist/components/NoticeCenter/NoticeCenter.js +334 -0
- package/dist/components/NoticeCenter/assets/notice.png +0 -0
- package/dist/components/NoticeCenter/assets/tongzhi.png +0 -0
- package/dist/components/NoticeCenter/index.d.ts +2 -0
- package/dist/components/NoticeCenter/index.js +2 -0
- package/dist/components/NoticeCenter/noticeCenter.scss +232 -0
- package/dist/components/NoticeCenter/types.d.ts +6 -0
- package/dist/components/NoticeCenter/types.js +0 -0
- package/dist/components/Pagination/BiPagination.css +152 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -0
- package/dist/components/Pagination/Pagination.js +67 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/types.d.ts +14 -0
- package/dist/components/Pagination/types.js +0 -0
- package/dist/components/ResponseInterceptor/index.d.ts +17 -0
- package/dist/components/ResponseInterceptor/index.js +43 -0
- package/dist/components/SuperDate/SuperDate.d.ts +6 -0
- package/dist/components/SuperDate/SuperDate.js +113 -0
- package/dist/components/SuperDate/SuperDate.scss +42 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.d.ts +5 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.js +87 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.scss +52 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.d.ts +6 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.js +129 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/dynamicTimeCom.scss +70 -0
- package/dist/components/SuperDate/constant.d.ts +35 -0
- package/dist/components/SuperDate/constant.js +27 -0
- package/dist/components/SuperDate/index.d.ts +2 -0
- package/dist/components/SuperDate/index.js +2 -0
- package/dist/components/SuperDate/store.d.ts +68 -0
- package/dist/components/SuperDate/store.js +254 -0
- package/dist/components/SuperDate/types.d.ts +34 -0
- package/dist/components/SuperDate/types.js +0 -0
- package/dist/components/SuperDate/utils.d.ts +18 -0
- package/dist/components/SuperDate/utils.js +14 -0
- package/dist/components/SystemLink/SystemLink.d.ts +4 -0
- package/dist/components/SystemLink/SystemLink.js +85 -0
- package/dist/components/SystemLink/index.d.ts +1 -0
- package/dist/components/SystemLink/index.js +2 -0
- package/dist/components/SystemLink/index.scss +142 -0
- package/dist/components/Table/ResizableTitle.d.ts +3 -0
- package/dist/components/Table/ResizableTitle.js +43 -0
- package/dist/components/Table/Table.d.ts +9 -0
- package/dist/components/Table/Table.js +189 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Table/index.scss +42 -0
- package/dist/components/Table/types.d.ts +24 -0
- package/dist/components/Table/types.js +0 -0
- package/dist/components/Table/useHeaderPopper.d.ts +8 -0
- package/dist/components/Table/useHeaderPopper.js +95 -0
- package/dist/components/TableHeaderPopper/EditBox.d.ts +6 -0
- package/dist/components/TableHeaderPopper/EditBox.js +208 -0
- package/dist/components/TableHeaderPopper/Popover.d.ts +6 -0
- package/dist/components/TableHeaderPopper/Popover.js +85 -0
- package/dist/components/TableHeaderPopper/index.d.ts +3 -0
- package/dist/components/TableHeaderPopper/index.js +3 -0
- package/dist/components/TableHeaderPopper/index.scss +96 -0
- package/dist/components/TaskCenter/TaskCenter.d.ts +4 -0
- package/dist/components/TaskCenter/TaskCenter.js +257 -0
- package/dist/components/TaskCenter/TaskCenter.scss +44 -0
- package/dist/components/TaskCenter/api.d.ts +13 -0
- package/dist/components/TaskCenter/api.js +13 -0
- package/dist/components/TaskCenter/index.d.ts +2 -0
- package/dist/components/TaskCenter/index.js +2 -0
- package/dist/components/TaskCenter/types.d.ts +29 -0
- package/dist/components/TaskCenter/types.js +0 -0
- package/dist/components/TooltipIcon/TooltipIcon.d.ts +3 -0
- package/dist/components/TooltipIcon/TooltipIcon.js +43 -0
- package/dist/components/TooltipIcon/index.d.ts +2 -0
- package/dist/components/TooltipIcon/index.js +2 -0
- package/dist/components/TooltipIcon/types.d.ts +14 -0
- package/dist/components/TooltipIcon/types.js +0 -0
- package/dist/components/Verification/content.d.ts +11 -0
- package/dist/components/Verification/content.js +223 -0
- package/dist/components/Verification/index.css +43 -0
- package/dist/components/Verification/index.d.ts +1 -0
- package/dist/components/Verification/index.js +37 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.js +29 -0
- package/dist/config/index.d.ts +83 -0
- package/dist/config/index.js +115 -0
- package/dist/config/theme/index.d.ts +368 -0
- package/dist/config/theme/index.js +369 -0
- package/dist/hooks/createAlive.d.ts +11 -0
- package/dist/hooks/createAlive.js +22 -0
- package/dist/hooks/createGlobalState.d.ts +7 -0
- package/dist/hooks/createGlobalState.js +28 -0
- package/dist/hooks/index.d.ts +26 -0
- package/dist/hooks/index.js +25 -0
- package/dist/hooks/useAsync.d.ts +27 -0
- package/dist/hooks/useAsync.js +76 -0
- package/dist/hooks/useClickOther.d.ts +10 -0
- package/dist/hooks/useClickOther.js +30 -0
- package/dist/hooks/useCopyToClipboard.d.ts +7 -0
- package/dist/hooks/useCopyToClipboard.js +32 -0
- package/dist/hooks/useCreate.d.ts +7 -0
- package/dist/hooks/useCreate.js +21 -0
- package/dist/hooks/useEventListener.d.ts +22 -0
- package/dist/hooks/useEventListener.js +33 -0
- package/dist/hooks/useHistoryStore.d.ts +16 -0
- package/dist/hooks/useHistoryStore.js +106 -0
- package/dist/hooks/useIntersectionObserver.d.ts +8 -0
- package/dist/hooks/useIntersectionObserver.js +23 -0
- package/dist/hooks/useInterval.d.ts +8 -0
- package/dist/hooks/useInterval.js +19 -0
- package/dist/hooks/useLatest.d.ts +2 -0
- package/dist/hooks/useLatest.js +12 -0
- package/dist/hooks/useLockAsyncFn.d.ts +7 -0
- package/dist/hooks/useLockAsyncFn.js +24 -0
- package/dist/hooks/useLockFn.d.ts +7 -0
- package/dist/hooks/useLockFn.js +17 -0
- package/dist/hooks/useMergedState.d.ts +10 -0
- package/dist/hooks/useMergedState.js +30 -0
- package/dist/hooks/useMountedState.d.ts +4 -0
- package/dist/hooks/useMountedState.js +13 -0
- package/dist/hooks/usePermission.d.ts +8 -0
- package/dist/hooks/usePermission.js +21 -0
- package/dist/hooks/usePersistFn.d.ts +8 -0
- package/dist/hooks/usePersistFn.js +13 -0
- package/dist/hooks/useReactive.d.ts +7 -0
- package/dist/hooks/useReactive.js +34 -0
- package/dist/hooks/useRefresh.d.ts +5 -0
- package/dist/hooks/useRefresh.js +8 -0
- package/dist/hooks/useToggle.d.ts +16 -0
- package/dist/hooks/useToggle.js +20 -0
- package/dist/hooks/useUnmount.d.ts +6 -0
- package/dist/hooks/useUnmount.js +10 -0
- package/dist/hooks/useUpdateEffect.d.ts +9 -0
- package/dist/hooks/useUpdateEffect.js +10 -0
- package/dist/hooks/useWindowSize.d.ts +6 -0
- package/dist/hooks/useWindowSize.js +15 -0
- package/dist/hooks/util.d.ts +9 -0
- package/dist/hooks/util.js +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -0
- package/dist/utils/array.d.ts +12 -0
- package/dist/utils/array.js +15 -0
- package/dist/utils/classNames.d.ts +4 -0
- package/dist/utils/classNames.js +19 -0
- package/dist/utils/date.d.ts +98 -0
- package/dist/utils/date.js +101 -0
- package/dist/utils/debounce.d.ts +8 -0
- package/dist/utils/debounce.js +38 -0
- package/dist/utils/deepClone.d.ts +6 -0
- package/dist/utils/deepClone.js +10 -0
- package/dist/utils/empty.d.ts +16 -0
- package/dist/utils/empty.js +24 -0
- package/dist/utils/formatPrice.d.ts +2 -0
- package/dist/utils/formatPrice.js +15 -0
- package/dist/utils/getUUID.d.ts +1 -0
- package/dist/utils/getUUID.js +17 -0
- package/dist/utils/getUrlParams.d.ts +11 -0
- package/dist/utils/getUrlParams.js +10 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/listToTree.d.ts +12 -0
- package/dist/utils/listToTree.js +14 -0
- package/dist/utils/object.d.ts +6 -0
- package/dist/utils/object.js +5 -0
- package/dist/utils/ossUpload.d.ts +45 -0
- package/dist/utils/ossUpload.js +88 -0
- package/dist/utils/parseTo.d.ts +6 -0
- package/dist/utils/parseTo.js +9 -0
- package/dist/utils/request/accessReport.d.ts +2 -0
- package/dist/utils/request/accessReport.js +27 -0
- package/dist/utils/request/defaultRequest.d.ts +9 -0
- package/dist/utils/request/defaultRequest.js +33 -0
- package/dist/utils/request/exportDownload.d.ts +2 -0
- package/dist/utils/request/exportDownload.js +28 -0
- package/dist/utils/request/index.d.ts +29 -0
- package/dist/utils/request/index.js +40 -0
- package/dist/utils/request/noticeCenter.d.ts +2 -0
- package/dist/utils/request/noticeCenter.js +28 -0
- package/dist/utils/svgIcon/index.d.ts +47 -0
- package/dist/utils/svgIcon/index.js +76 -0
- package/dist/utils/throttle.d.ts +10 -0
- package/dist/utils/throttle.js +21 -0
- package/dist/utils/time/index.d.ts +7 -0
- package/dist/utils/time/index.js +12 -0
- package/dist/utils/tools.d.ts +43 -0
- package/dist/utils/tools.js +57 -0
- package/package.json +116 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, DatePicker, Form, Input, Modal, Table, Tooltip } from "antd";
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { BiDatePicker } from "../index.js";
|
|
5
|
+
import request from "../../utils/request/index.js";
|
|
6
|
+
import { getEnv, getSystem } from "../../utils/tools.js";
|
|
7
|
+
import "./index.css";
|
|
8
|
+
const { RangePicker } = DatePicker;
|
|
9
|
+
const DownloadCenter_DownloadCenter = ()=>{
|
|
10
|
+
const [form] = Form.useForm();
|
|
11
|
+
const [tableLoading, setTableLoading] = useState(false);
|
|
12
|
+
const [tableData, setTableData] = useState([]);
|
|
13
|
+
const [pageInfo, setPageInfo] = useState({
|
|
14
|
+
page: 1,
|
|
15
|
+
page_size: 20,
|
|
16
|
+
total: 0
|
|
17
|
+
});
|
|
18
|
+
const [dialogVisible, setDialogVisible] = useState(false);
|
|
19
|
+
const [dialogContent, setDialogContent] = useState('');
|
|
20
|
+
const system = getSystem() ?? '';
|
|
21
|
+
const env = getEnv() ?? '';
|
|
22
|
+
const getQueryParams = (targetPage)=>{
|
|
23
|
+
const values = form.getFieldsValue();
|
|
24
|
+
const { task_code, task_name, status, time } = values;
|
|
25
|
+
let start_time = '';
|
|
26
|
+
let end_time = '';
|
|
27
|
+
if (time && 2 === time.length) {
|
|
28
|
+
start_time = time[0].format('YYYY-MM-DD HH:mm:ss');
|
|
29
|
+
end_time = time[1].format('YYYY-MM-DD HH:mm:ss');
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
page: targetPage ?? pageInfo.page,
|
|
33
|
+
page_size: pageInfo.page_size,
|
|
34
|
+
task_name: task_name ?? null,
|
|
35
|
+
task_code: task_code ?? '',
|
|
36
|
+
status: status ?? null,
|
|
37
|
+
...start_time ? {
|
|
38
|
+
start_time,
|
|
39
|
+
end_time
|
|
40
|
+
} : {}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const fetchList = useCallback(async (targetPage)=>{
|
|
44
|
+
setTableLoading(true);
|
|
45
|
+
try {
|
|
46
|
+
const params = getQueryParams(targetPage);
|
|
47
|
+
const res = await request({
|
|
48
|
+
env,
|
|
49
|
+
system: 'export',
|
|
50
|
+
api: '/task/index',
|
|
51
|
+
data: {
|
|
52
|
+
origin_system: system,
|
|
53
|
+
...params
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
if (res?.status_code === 1) {
|
|
57
|
+
setTableData(res.data?.data || []);
|
|
58
|
+
setPageInfo(res.data?.page_info || {
|
|
59
|
+
...pageInfo,
|
|
60
|
+
page: params.page
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
} catch (e) {
|
|
64
|
+
console.error('getList error:', e);
|
|
65
|
+
} finally{
|
|
66
|
+
setTableLoading(false);
|
|
67
|
+
}
|
|
68
|
+
}, [
|
|
69
|
+
pageInfo.page,
|
|
70
|
+
pageInfo.page_size,
|
|
71
|
+
form
|
|
72
|
+
]);
|
|
73
|
+
useEffect(()=>{
|
|
74
|
+
fetchList();
|
|
75
|
+
}, []);
|
|
76
|
+
const handlePageChange = (pagination)=>{
|
|
77
|
+
const { current = 1, pageSize = 20 } = pagination;
|
|
78
|
+
setPageInfo((prev)=>({
|
|
79
|
+
...prev,
|
|
80
|
+
page: current,
|
|
81
|
+
page_size: pageSize
|
|
82
|
+
}));
|
|
83
|
+
fetchList(current);
|
|
84
|
+
};
|
|
85
|
+
const handleSearch = ()=>{
|
|
86
|
+
setPageInfo((prev)=>({
|
|
87
|
+
...prev,
|
|
88
|
+
page: 1
|
|
89
|
+
}));
|
|
90
|
+
fetchList(1);
|
|
91
|
+
};
|
|
92
|
+
const handleReset = ()=>{
|
|
93
|
+
form.resetFields();
|
|
94
|
+
setPageInfo((prev)=>({
|
|
95
|
+
...prev,
|
|
96
|
+
page: 1
|
|
97
|
+
}));
|
|
98
|
+
fetchList(1);
|
|
99
|
+
};
|
|
100
|
+
const lookMore = (content)=>{
|
|
101
|
+
setDialogContent('');
|
|
102
|
+
setDialogVisible(true);
|
|
103
|
+
setTimeout(()=>{
|
|
104
|
+
setDialogContent(content);
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const columns = [
|
|
108
|
+
{
|
|
109
|
+
dataIndex: 'task_code',
|
|
110
|
+
title: '任务ID',
|
|
111
|
+
width: 190
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
dataIndex: 'status_text',
|
|
115
|
+
title: '任务状态',
|
|
116
|
+
width: 115,
|
|
117
|
+
render: (_, row)=>{
|
|
118
|
+
if (21 === row.status) return /*#__PURE__*/ jsxs("div", {
|
|
119
|
+
style: {
|
|
120
|
+
display: 'flex',
|
|
121
|
+
alignItems: 'center'
|
|
122
|
+
},
|
|
123
|
+
children: [
|
|
124
|
+
/*#__PURE__*/ jsx("span", {
|
|
125
|
+
style: {
|
|
126
|
+
width: 6,
|
|
127
|
+
height: 6,
|
|
128
|
+
borderRadius: 6,
|
|
129
|
+
display: 'inline-block',
|
|
130
|
+
background: '#0FC6C2',
|
|
131
|
+
marginRight: 5
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
/*#__PURE__*/ jsx("span", {
|
|
135
|
+
children: row.status_text
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
});
|
|
139
|
+
if (0 === row.status) return /*#__PURE__*/ jsxs("div", {
|
|
140
|
+
style: {
|
|
141
|
+
display: 'flex',
|
|
142
|
+
alignItems: 'center'
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
/*#__PURE__*/ jsx("span", {
|
|
146
|
+
style: {
|
|
147
|
+
width: 6,
|
|
148
|
+
height: 6,
|
|
149
|
+
borderRadius: 6,
|
|
150
|
+
display: 'inline-block',
|
|
151
|
+
background: '#C9CDD4',
|
|
152
|
+
marginRight: 5
|
|
153
|
+
}
|
|
154
|
+
}),
|
|
155
|
+
/*#__PURE__*/ jsx("span", {
|
|
156
|
+
children: "未开始"
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
if (11 === row.status) return /*#__PURE__*/ jsxs("div", {
|
|
161
|
+
style: {
|
|
162
|
+
display: 'flex',
|
|
163
|
+
alignItems: 'center'
|
|
164
|
+
},
|
|
165
|
+
children: [
|
|
166
|
+
/*#__PURE__*/ jsx("span", {
|
|
167
|
+
style: {
|
|
168
|
+
width: 6,
|
|
169
|
+
height: 6,
|
|
170
|
+
borderRadius: 6,
|
|
171
|
+
display: 'inline-block',
|
|
172
|
+
background: '#00B42A',
|
|
173
|
+
marginRight: 5
|
|
174
|
+
}
|
|
175
|
+
}),
|
|
176
|
+
/*#__PURE__*/ jsx("span", {
|
|
177
|
+
children: "执行中"
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
if (31 === row.status) return /*#__PURE__*/ jsx(Tooltip, {
|
|
182
|
+
title: row.message,
|
|
183
|
+
placement: "right",
|
|
184
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
185
|
+
style: {
|
|
186
|
+
display: 'flex',
|
|
187
|
+
alignItems: 'center'
|
|
188
|
+
},
|
|
189
|
+
children: [
|
|
190
|
+
/*#__PURE__*/ jsx("span", {
|
|
191
|
+
style: {
|
|
192
|
+
width: 6,
|
|
193
|
+
height: 6,
|
|
194
|
+
borderRadius: 6,
|
|
195
|
+
display: 'inline-block',
|
|
196
|
+
background: '#F53F3F',
|
|
197
|
+
marginRight: 5
|
|
198
|
+
}
|
|
199
|
+
}),
|
|
200
|
+
/*#__PURE__*/ jsx("span", {
|
|
201
|
+
children: "导出失败"
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
return row.status_text || '-';
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
dataIndex: 'task_name',
|
|
211
|
+
title: '任务类型',
|
|
212
|
+
width: 185
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
dataIndex: 'query_string',
|
|
216
|
+
title: '导出条件',
|
|
217
|
+
width: 342,
|
|
218
|
+
render: (_, row)=>{
|
|
219
|
+
if (row.query_translation) return /*#__PURE__*/ jsx("div", {
|
|
220
|
+
role: "img",
|
|
221
|
+
className: "tooltip-html-box",
|
|
222
|
+
onClick: ()=>lookMore(row.query_translation),
|
|
223
|
+
dangerouslySetInnerHTML: {
|
|
224
|
+
__html: row.query_translation
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
return /*#__PURE__*/ jsx("span", {
|
|
228
|
+
className: "query-translation",
|
|
229
|
+
children: "————"
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
dataIndex: 'create_time',
|
|
235
|
+
title: '创建时间',
|
|
236
|
+
width: 182
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
dataIndex: 'complete_time',
|
|
240
|
+
title: '完成时间',
|
|
241
|
+
width: 182
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
title: '操作',
|
|
245
|
+
dataIndex: 'operate',
|
|
246
|
+
width: 70,
|
|
247
|
+
fixed: 'right',
|
|
248
|
+
render: (_, row)=>{
|
|
249
|
+
if (21 === row.status && row.path) return /*#__PURE__*/ jsx("a", {
|
|
250
|
+
className: "link",
|
|
251
|
+
href: row.path,
|
|
252
|
+
target: "_blank",
|
|
253
|
+
rel: "noreferrer",
|
|
254
|
+
style: {
|
|
255
|
+
textDecoration: 'none'
|
|
256
|
+
},
|
|
257
|
+
children: "下载"
|
|
258
|
+
});
|
|
259
|
+
return /*#__PURE__*/ jsx("span", {});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
];
|
|
263
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
264
|
+
className: "download-center",
|
|
265
|
+
children: [
|
|
266
|
+
/*#__PURE__*/ jsxs("div", {
|
|
267
|
+
className: "content-box",
|
|
268
|
+
children: [
|
|
269
|
+
/*#__PURE__*/ jsxs(Form, {
|
|
270
|
+
form: form,
|
|
271
|
+
layout: "inline",
|
|
272
|
+
initialValues: {
|
|
273
|
+
task_code: '',
|
|
274
|
+
task_name: null,
|
|
275
|
+
status: null,
|
|
276
|
+
time: null
|
|
277
|
+
},
|
|
278
|
+
children: [
|
|
279
|
+
/*#__PURE__*/ jsx(Form.Item, {
|
|
280
|
+
label: "任务ID",
|
|
281
|
+
name: "task_code",
|
|
282
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
283
|
+
size: "small",
|
|
284
|
+
allowClear: true,
|
|
285
|
+
style: {
|
|
286
|
+
width: 180,
|
|
287
|
+
height: 32
|
|
288
|
+
},
|
|
289
|
+
placeholder: "请输入任务ID"
|
|
290
|
+
})
|
|
291
|
+
}),
|
|
292
|
+
/*#__PURE__*/ jsx(Form.Item, {
|
|
293
|
+
label: "任务时间",
|
|
294
|
+
name: "time",
|
|
295
|
+
children: /*#__PURE__*/ jsx(BiDatePicker, {
|
|
296
|
+
format: "YYYY-MM-DD HH:mm:ss",
|
|
297
|
+
isRange: true,
|
|
298
|
+
showTime: true,
|
|
299
|
+
placeholder: [
|
|
300
|
+
'开始日期',
|
|
301
|
+
'结束日期'
|
|
302
|
+
]
|
|
303
|
+
})
|
|
304
|
+
}),
|
|
305
|
+
/*#__PURE__*/ jsxs(Form.Item, {
|
|
306
|
+
children: [
|
|
307
|
+
/*#__PURE__*/ jsx(Button, {
|
|
308
|
+
type: "primary",
|
|
309
|
+
size: "small",
|
|
310
|
+
loading: tableLoading,
|
|
311
|
+
onClick: handleSearch,
|
|
312
|
+
children: "查询"
|
|
313
|
+
}),
|
|
314
|
+
/*#__PURE__*/ jsx(Button, {
|
|
315
|
+
size: "small",
|
|
316
|
+
style: {
|
|
317
|
+
marginLeft: 8
|
|
318
|
+
},
|
|
319
|
+
onClick: handleReset,
|
|
320
|
+
children: "重置"
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
}),
|
|
326
|
+
/*#__PURE__*/ jsx(Table, {
|
|
327
|
+
rowKey: (row)=>row.task_code || row.id || `${row.create_time}_${row.task_name}`,
|
|
328
|
+
loading: tableLoading,
|
|
329
|
+
columns: columns,
|
|
330
|
+
dataSource: tableData,
|
|
331
|
+
size: "middle",
|
|
332
|
+
scroll: {
|
|
333
|
+
y: 200,
|
|
334
|
+
x: 'max-content'
|
|
335
|
+
},
|
|
336
|
+
pagination: {
|
|
337
|
+
current: pageInfo.page,
|
|
338
|
+
pageSize: pageInfo.page_size,
|
|
339
|
+
total: pageInfo.total,
|
|
340
|
+
showTotal: (total)=>`共 ${total} 条`
|
|
341
|
+
},
|
|
342
|
+
onChange: handlePageChange
|
|
343
|
+
})
|
|
344
|
+
]
|
|
345
|
+
}),
|
|
346
|
+
/*#__PURE__*/ jsx(Modal, {
|
|
347
|
+
title: "导出条件详情",
|
|
348
|
+
open: dialogVisible,
|
|
349
|
+
onCancel: ()=>setDialogVisible(false),
|
|
350
|
+
footer: null,
|
|
351
|
+
width: "50%",
|
|
352
|
+
destroyOnClose: true,
|
|
353
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
354
|
+
className: "dialog-scroll",
|
|
355
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
356
|
+
className: "container",
|
|
357
|
+
dangerouslySetInnerHTML: {
|
|
358
|
+
__html: dialogContent
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
const DownloadCenter = DownloadCenter_DownloadCenter;
|
|
367
|
+
export { DownloadCenter as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.download-center .tooltip-html-box {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
line-clamp: 5;
|
|
5
|
+
-webkit-line-clamp: 5;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
display: -webkit-box;
|
|
8
|
+
/* autoprefixer: ignore next */
|
|
9
|
+
-webkit-box-orient: vertical;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.download-center .content-box {
|
|
13
|
+
background-color: #ffffff;
|
|
14
|
+
padding: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.download-center .content-box + .content-box {
|
|
18
|
+
margin-top: 10px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.download-center .ant-form-item {
|
|
22
|
+
margin-bottom: 20px;
|
|
23
|
+
margin-right: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.container {
|
|
27
|
+
padding: 20px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.query-translation {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
height: 23px;
|
|
33
|
+
line-height: 30px;
|
|
34
|
+
width: 80px;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow-x: hidden;
|
|
38
|
+
overflow-y: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dialog-scroll {
|
|
42
|
+
max-height: 60vh;
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* 下载链接样式可按需要调整 */
|
|
47
|
+
.link {
|
|
48
|
+
color: #1677ff;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.link:hover {
|
|
53
|
+
text-decoration: underline;
|
|
54
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
export interface DownloadTask {
|
|
3
|
+
task_code?: string;
|
|
4
|
+
status?: number;
|
|
5
|
+
status_text?: string;
|
|
6
|
+
task_name?: string;
|
|
7
|
+
query_translation?: string;
|
|
8
|
+
create_time?: string;
|
|
9
|
+
complete_time?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export interface PageInfo {
|
|
15
|
+
page: number;
|
|
16
|
+
page_size: number;
|
|
17
|
+
total: number;
|
|
18
|
+
}
|
|
19
|
+
export interface DownloadCenterBoxProps {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
export interface SearchForm {
|
|
23
|
+
task_code: string;
|
|
24
|
+
task_name: string | null;
|
|
25
|
+
status: number | null;
|
|
26
|
+
time: [Dayjs, Dayjs] | null;
|
|
27
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './index.scss';
|
|
2
|
+
import type { FireworksProps } from './types';
|
|
3
|
+
export declare enum TriggerFireworksKeys {
|
|
4
|
+
BIRTHDAY_CAKE = "birthdayCake",
|
|
5
|
+
SD = "sd",
|
|
6
|
+
YD = "yd",
|
|
7
|
+
BP = "bp",
|
|
8
|
+
XC = "xc"
|
|
9
|
+
}
|
|
10
|
+
declare const Fireworks: ({ extraImageList }: FireworksProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Fireworks;
|