您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

96 行
3.7 KiB

  1. // import { useState } from 'react';
  2. // material-ui
  3. import {
  4. Grid,
  5. Typography,
  6. Stack,
  7. Button,
  8. Box
  9. } from '@mui/material';
  10. import { isORGLoggedIn, } from "utils/Utils";
  11. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  12. import {FormattedMessage} from "react-intl";
  13. import AdsClickRoundedIcon from '@mui/icons-material/AdsClickRounded';
  14. import * as React from "react";
  15. import Loadable from 'components/Loadable';
  16. const Message = Loadable(React.lazy(() => import('./Message')));
  17. const Notice = Loadable(React.lazy(() => import('./Notice')));
  18. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  19. const DashboardDefault = () => {
  20. const userData = JSON.parse(localStorage.getItem("userData"));
  21. const BackgroundHead = {
  22. // backgroundColor: '#0d47a1',
  23. backgroundImage: `url(${titleBackgroundImg})`,
  24. width: '100%',
  25. height: '100%',
  26. backgroundSize: 'contain',
  27. backgroundRepeat: 'no-repeat',
  28. backgroundColor: '#0C489E',
  29. backgroundPosition: 'right'
  30. }
  31. return (
  32. <Grid container sx={{ minHeight: '90vh' }} direction="column">
  33. <Grid item xs={12} >
  34. <div style={BackgroundHead}>
  35. <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
  36. {/* <Typography variant="h5">我的公共啟事</Typography> */}
  37. <Typography color='#FFF' variant="h5" sx={{ ml:10, display:{ xs: 'none', sm:'none', md:'block'}}}>
  38. {isORGLoggedIn() ?userData.fullenName:userData.fullchName}, <FormattedMessage id="welcomeMsg"/>
  39. </Typography>
  40. </Stack>
  41. </div>
  42. </Grid>
  43. <Grid item xs={12} md={12} sx={{ textAlign: "center" }}>
  44. <Grid container justifyContent="center" spacing={2} sx={{ pt: 2 }} alignitems="stretch" >
  45. <Grid item xs={12} lg={5} sx={{ pt: 2 }} style={{ height: '100%' }}>
  46. <Box xs={12} md={12} sx={{ p: 4, border: '3px solid #e1edfc', borderRadius: '10px', backgroundColor: "#e1edfc" }} >
  47. <Stack direction="row" spacing={2}>
  48. <AdsClickRoundedIcon />
  49. <Stack direction="column" alignItems="start">
  50. <Typography variant="h4" >
  51. <FormattedMessage id="submitApplication" />
  52. </Typography>
  53. <Typography >
  54. <FormattedMessage id="applicationSubheading" />
  55. </Typography>
  56. </Stack>
  57. </Stack>
  58. </Box>
  59. <Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} >
  60. <Typography variant="h4">
  61. <FormattedMessage id="announcement" />
  62. </Typography>
  63. <Button color="gray"><u>
  64. <FormattedMessage id="viewAllAnnouncement" />
  65. </u></Button>
  66. </Stack>
  67. <Box xs={12} md={12} sx={{ p: 1, border: '3px solid #eee', borderRadius: '10px' }} >
  68. <Notice
  69. />
  70. </Box>
  71. </Grid>
  72. <Grid item xs={12} lg={5} sx={{ pt: 2 }} style={{ height: '100%' }}>
  73. <Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} >
  74. <Typography variant="h4">
  75. <FormattedMessage id="systemMessage" />
  76. </Typography>
  77. <Button color="gray"><u>
  78. <FormattedMessage id="viewAllSystemMessage" />
  79. </u></Button>
  80. </Stack>
  81. <Box xs={12} md={12} sx={{ p: 1, border: '3px solid #eee', borderRadius: '10px' }} >
  82. <Message
  83. />
  84. </Box>
  85. </Grid>
  86. </Grid>
  87. </Grid>
  88. </Grid>
  89. );
  90. };
  91. export default DashboardDefault;