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

100 行
3.1 KiB

  1. // material-ui
  2. import {
  3. Grid, Typography, Stack
  4. } from '@mui/material';
  5. import MainCard from "../../../components/MainCard";
  6. import { useEffect, useState } from "react";
  7. //import axios from "axios";
  8. //import {apiPath} from "../../auth/utils";
  9. import * as UrlUtils from "../../../utils/ApiPathConst";
  10. import * as React from "react";
  11. import * as HttpUtils from "../../../utils/HttpUtils";
  12. //import LoadingComponent from "../extra-pages/LoadingComponent";
  13. //import SearchForm from "./UserSearchForm_Organization";
  14. //import EventTable from "./UserTable_Organization";
  15. import Loadable from 'components/Loadable';
  16. import { lazy } from 'react';
  17. const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent')));
  18. const SearchForm = Loadable(lazy(() => import('./UserSearchForm_Organization')));
  19. const EventTable = Loadable(lazy(() => import('./UserTable_Organization')));
  20. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  21. const BackgroundHead = {
  22. backgroundImage: `url(${titleBackgroundImg})`,
  23. width: '100%',
  24. height: '100%',
  25. backgroundSize: 'contain',
  26. backgroundRepeat: 'no-repeat',
  27. backgroundColor: '#0C489E',
  28. backgroundPosition: 'right'
  29. }
  30. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  31. const UserSearchPage_Organization = () => {
  32. const [record, setRecord] = useState([]);
  33. const [searchCriteria, setSearchCriteria] = useState({});
  34. const [onReady, setOnReady] = useState(false);
  35. useEffect(() => {
  36. getUserList();
  37. }, []);
  38. useEffect(() => {
  39. setOnReady(true);
  40. }, [record]);
  41. useEffect(() => {
  42. getUserList();
  43. }, [searchCriteria]);
  44. function getUserList() {
  45. HttpUtils.get({
  46. url: UrlUtils.GET_ORG_USER_PATH,
  47. params: searchCriteria,
  48. onSuccess: function (responseData) {
  49. setRecord(responseData);
  50. }
  51. });
  52. }
  53. function applySearch(input) {
  54. setSearchCriteria(input);
  55. }
  56. return (
  57. !onReady ?
  58. <LoadingComponent />
  59. :
  60. <Grid container sx={{backgroundColor:"backgroundColor.default"}}>
  61. <Grid item xs={12}>
  62. <div style={BackgroundHead}>
  63. <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
  64. <Typography ml={15} color='#FFF' variant="h4">View Organization User</Typography>
  65. </Stack>
  66. </div>
  67. </Grid>
  68. {/*row 1*/}
  69. <Grid item xs={12} md={12} lg={12}>
  70. <SearchForm applySearch={applySearch} />
  71. </Grid>
  72. {/*row 2*/}
  73. <Grid item xs={12} md={12} lg={12}>
  74. <MainCard elevation={0}
  75. border={false}
  76. content={false}
  77. >
  78. <EventTable
  79. recordList={record}
  80. />
  81. </MainCard>
  82. </Grid>
  83. </Grid>
  84. );
  85. };
  86. export default UserSearchPage_Organization;