skyouc
2025-04-08 7b95cabfa7e2fda784269e712081d916013fda87
任务列表优化显示
5个文件已修改
56 ■■■■■ 已修改文件
rsf-admin/src/App.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/login/Login.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/task/TaskList.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/task/TaskPanel.jsx 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/App.jsx
@@ -60,9 +60,6 @@
    getSystemInfo().then((data) => {
      localStorage.setItem("system", JSON.stringify(data));
    })
    getSystemDicts().then(data => {
      localStorage.setItem('sys_dicts', JSON.stringify(data));
    })
  }, []);
  return (
rsf-admin/src/page/login/Login.jsx
@@ -14,8 +14,10 @@
import {
    useTranslate,
    useLogin,
    localStorageStore,
    useNotify,
} from 'react-admin';
import { getSystemDicts } from "@/api/auth";
import { useForm, Controller, useWatch, FormProvider, useFormContext } from "react-hook-form";
import ProviderChoices from "./ProviderChoices";
import Visibility from '@mui/icons-material/Visibility';
@@ -49,6 +51,9 @@
    }, [tenantList, setValue]);
    const onSubmit = (data) => {
        getSystemDicts().then(data => {
            localStorage.setItem('sys_dicts', JSON.stringify(data));
        })
        setLoading(true);
        login(
            data,
rsf-admin/src/page/task/TaskList.jsx
@@ -18,6 +18,7 @@
    useTranslate,
    useNotify,
    useRefresh,
    useDataProvider,
    useListContext,
    FunctionField,
    TextField,
@@ -101,7 +102,7 @@
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
    const [data, setData] = useState([]);
    return (
        <Box display="flex">
            <List
rsf-admin/src/page/task/TaskPanel.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, useMemo } from "react";
import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
import { Box, Card, CardContent, Grid, Typography, Tooltip, Pagination } from '@mui/material';
import {
    List,
    DatagridConfigurable,
@@ -11,7 +11,9 @@
    CreateButton,
    ExportButton,
    BulkDeleteButton,
    useDataProvider,
    WrapperField,
    useGetList,
    useRecordContext,
    useTranslate,
    useNotify,
@@ -31,6 +33,8 @@
    ReferenceArrayInput,
    AutocompleteInput,
    DeleteButton,
    useList,
    ReferenceManyField,
} from 'react-admin';
import { styled } from '@mui/material/styles';
import PageDrawer from "../components/PageDrawer";
@@ -83,30 +87,17 @@
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
    // const { data, isPending, error } = useGetList('taskItem', { pagination: { page: 1, perPage: 10 } });
    // const listContext = useList({
    //     data,
    //     isPending,
    //     perPage: 10,
    //     sort: {field: 'create_time', order: 'DESC'}
    // })
    return (
        <>
            <Box display="flex">
                <List
                    sx={{
                        flexGrow: 1,
                        transition: (theme) =>
                            theme.transitions.create(['all'], {
                                duration: theme.transitions.duration.enteringScreen,
                            }),
                        marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                    }}
                    title={"menu.taskItem"}
                    empty={false}
                    filters={filters}
                    sort={{ field: "create_time", order: "desc" }}
                    actions={(
                        <TopToolbar>
                            <FilterButton />
                        </TopToolbar>
                    )}
                    perPage={DEFAULT_PAGE_SIZE}
                >
                <ReferenceManyField pagination={<Pagination />} reference="taskItem" target="task_id">
                    <StyledDatagrid
                        preferenceKey='taskItem'
                        bulkActionButtons={false}
@@ -138,13 +129,7 @@
                        <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                        <TextField source="memo" label="common.field.memo" sortable={false} />
                    </StyledDatagrid>
                </List>
                <PageDrawer
                    title='TaskItem Detail'
                    drawerVal={drawerVal}
                    setDrawerVal={setDrawerVal}
                >
                </PageDrawer>
                </ReferenceManyField>
            </Box>
        </>
    );
rsf-server/src/main/resources/application-dev.yml
@@ -14,7 +14,7 @@
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    username: root
#    url: jdbc:mysql://localhost:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    url: jdbc:mysql://192.168.4.24:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    username: rsf
    password: 34821015
    type: com.alibaba.druid.pool.DruidDataSource