index.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import { useState } from 'react';
  2. import styles from './index.less';
  3. import { Button, Select, Table } from 'antd';
  4. import PageContent from '@/components/PageContent';
  5. const PSRManage = () => {
  6. const [searchData, setSearchData] = useState({
  7. project_name: '',
  8. project_code: '',
  9. });
  10. const columns = [
  11. {
  12. title: '项目编号',
  13. dataIndex: 'code',
  14. key: 'code',
  15. render: (text) => <a>{text}</a>,
  16. },
  17. {
  18. title: '项目名称',
  19. dataIndex: 'name',
  20. key: 'name',
  21. render: (text) => <a>{text}</a>,
  22. },
  23. {
  24. title: '操作',
  25. render: (text) => <a>{text}</a>,
  26. },
  27. ];
  28. const projectData = [];
  29. const handleSearch = () => {};
  30. return (
  31. <PageContent>
  32. <div className={styles.searchContent}>
  33. <div className={styles.itemFlex}>
  34. <div>项目编号:</div>
  35. <Select
  36. style={{ width: 200 }}
  37. placeholder="请选择"
  38. onChange={(e) => {
  39. setSearchData({
  40. ...searchData,
  41. project_code: e,
  42. });
  43. }}
  44. options={projectData?.list?.map((item) => {
  45. return {
  46. value: item.project_name,
  47. label: item.project_name,
  48. };
  49. })}
  50. />
  51. </div>
  52. <div className={styles.itemFlex}>
  53. <div>项目名称:</div>
  54. <Select
  55. style={{ width: 200 }}
  56. placeholder="请选择"
  57. onChange={(e) => {
  58. setSearchData({
  59. ...searchData,
  60. project_name: e,
  61. });
  62. }}
  63. options={projectData?.list?.map((item) => {
  64. return {
  65. value: item.project_name,
  66. label: item.project_name,
  67. };
  68. })}
  69. />
  70. </div>
  71. <Button
  72. type="primary"
  73. className={styles.searchBtnSty}
  74. onClick={handleSearch}
  75. >
  76. 查询
  77. </Button>
  78. </div>
  79. <Table columns={columns} dataSource={[]}></Table>
  80. </PageContent>
  81. );
  82. };
  83. export default PSRManage;