| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import Player from "../../map/player"; |
| | | |
| | | let player; |
| | | import { |
| | | Edit, |
| | | SimpleForm, |
| | | FormDataConsumer, |
| | | useTranslate, |
| | | TextInput, |
| | | NumberInput, |
| | | BooleanInput, |
| | | SaveButton, |
| | | SelectInput, |
| | | Toolbar, |
| | | Labeled, |
| | | NumberField, |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography, Card, CardContent } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import { } from '@/config/setting'; |
| | | |
| | | const Settings = () => { |
| | | const mapRef = React.useRef(); |
| | | |
| | | |
| | | useEffect(() => { |
| | | player = new Player(mapRef.current) |
| | | }, []) |
| | | |
| | | return ( |
| | | <> |
| | | <h1>Settings</h1> |
| | | <div ref={mapRef} ></div> |
| | | <Card> |
| | | <CardContent> |
| | | |
| | | </CardContent> |
| | | </Card> |
| | | </> |
| | | ) |
| | | } |
| | |
| | | useRecordContext, |
| | | DeleteButton, |
| | | PasswordInput, |
| | | email, |
| | | } from 'react-admin'; |
| | | import { useFormContext } from 'react-hook-form'; |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import UserListAside from "./UserListAside"; |
| | | import RolesField from './RolesField'; |
| | | import RolesField from './RolesField'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | '& .column-username': { |
| | | maxWidth: '10em', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | whiteSpace: 'nowrap', |
| | | }, |
| | | '& .column-nickname': { |
| | | maxWidth: '10em', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | whiteSpace: 'nowrap', |
| | | }, |
| | | '& .column-deptId': { |
| | | maxWidth: '10em', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | whiteSpace: 'nowrap', |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | '& .column-deptId': { |
| | | maxWidth: 80 |
| | | }, |
| | | '& .column-statusBool': { |
| | | maxWidth: 60 |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <UserPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'email', 'idCard', 'birthday', 'updateTime', 'createTime', 'memo']} |
| | | omit={['id', 'email', 'idCard', 'birthday', 'realName', 'updateTime', 'createTime', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="username" label="table.field.user.username" /> |