| | |
| | | }, |
| | | tenant: { |
| | | name: "name", |
| | | flag: "flag", |
| | | }, |
| | | role: { |
| | | name: "name", |
| | |
| | | }, |
| | | tenant: { |
| | | name: "租户名", |
| | | flag: "代码", |
| | | }, |
| | | role: { |
| | | name: "角色名称", |
| | |
| | | |
| | | useEffect(() => { |
| | | if (tenantList.length > 0 && !tenantId) { |
| | | setValue('tenantId', tenantList[0].id); |
| | | const rememberTenantId = localStorage.getItem('remember_tenantId'); |
| | | if (rememberTenantId && tenantList.some(t => t.id === Number(rememberTenantId))) { |
| | | setValue('tenantId', Number(rememberTenantId)); |
| | | } else { |
| | | setValue('tenantId', tenantList[0].id); |
| | | } |
| | | } |
| | | }, [tenantList, setValue]); |
| | | |
| | |
| | | getOptionLabel={(option) => option.name} |
| | | value={selectedTenant} |
| | | onChange={(_, newValue) => { |
| | | onChange(newValue ? newValue.id : ''); |
| | | const newTenantId = newValue ? newValue.id : ''; |
| | | onChange(newTenantId); |
| | | localStorage.setItem('remember_tenantId', newTenantId); |
| | | }} |
| | | renderInput={(params) => ( |
| | | <TextField |
| | |
| | | {tab === 1 && <Register tenantList={tenantList} />} |
| | | |
| | | <Box mt={1} mb={1} sx={{ textAlign: 'center' }}> |
| | | <Typography variant="caption" align="center">rsf - sever</Typography> |
| | | <Typography variant="caption" align="center">Footer Goes Here</Typography> |
| | | </Box> |
| | | </Card> |
| | | </Box > |
| | |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.tenant.flag" |
| | | source="flag" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <StatusSelectInput /> |
| | | </Grid> |
| | |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.tenant.flag" |
| | | source="flag" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | | <Typography variant="h6" gutterBottom> |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | <TextInput source="name" label="table.field.tenant.name" />, |
| | | |
| | | <TextInput source="flag" label="table.field.tenant.flag" />, |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="name" label="table.field.tenant.name" /> |
| | | |
| | | <TextField source="flag" label="table.field.tenant.flag" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.tenant.flag" |
| | | property={record.flag} |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | |
| | | private String name; |
| | | |
| | | /** |
| | | * 代码 |
| | | */ |
| | | @ApiModelProperty(value= "代码") |
| | | private String flag; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |