| | |
| | | getSystemInfo().then((data) => { |
| | | localStorage.setItem("system", JSON.stringify(data)); |
| | | }) |
| | | getSystemDicts().then(data => { |
| | | localStorage.setItem('sys_dicts', JSON.stringify(data)); |
| | | }) |
| | | }, []); |
| | | |
| | | return ( |
| | |
| | | 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'; |
| | |
| | | const username = watch('username'); |
| | | const password = watch('password'); |
| | | const tenantId = watch('tenantId'); |
| | | |
| | | |
| | | useEffect(() => { |
| | | if (tenantList.length > 0 && !tenantId) { |
| | | const rememberTenantId = localStorage.getItem('remember_tenantId'); |
| | |
| | | }, [tenantList, setValue]); |
| | | |
| | | const onSubmit = (data) => { |
| | | getSystemDicts().then(data => { |
| | | localStorage.setItem('sys_dicts', JSON.stringify(data)); |
| | | }) |
| | | setLoading(true); |
| | | login( |
| | | data, |
| | |
| | | useTranslate, |
| | | useNotify, |
| | | useRefresh, |
| | | useDataProvider, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const [data, setData] = useState([]); |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | |
| | | </> |
| | | } |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <TaskPanel />} |
| | | expand={() => <TaskPanel/>} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'sort']} |
| | | > |
| | |
| | | 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, |
| | |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | useDataProvider, |
| | | WrapperField, |
| | | useGetList, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useList, |
| | | ReferenceManyField, |
| | | } from 'react-admin'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | |
| | | 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} |
| | |
| | | <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> |
| | | </> |
| | | ); |
| | |
| | | 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 |