index.tsx 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. import { FC } from "react";
  2. import { Button, Form, Input, Select, Table } from "antd";
  3. import { useNavigate } from "react-router-dom";
  4. export interface IndexAssessmentProps {
  5. isReportDetail?: boolean;
  6. isEvalutionDetail?: boolean;
  7. }
  8. export const IndexAssessment: FC<IndexAssessmentProps> = ({
  9. isReportDetail,
  10. isEvalutionDetail,
  11. }) => {
  12. const navigate = useNavigate();
  13. return (
  14. <>
  15. <Form layout="inline">
  16. <Form.Item label="搜索">
  17. <Input className="w220" placeholder="请输入指标名称" />
  18. </Form.Item>
  19. <Form.Item label="上传状态">
  20. <div className="w160">
  21. <Select placeholder="请选择" />
  22. </div>
  23. </Form.Item>
  24. <Form.Item label="责任部门">
  25. <div className="w160">
  26. <Select placeholder="请选择" />
  27. </div>
  28. </Form.Item>
  29. <Form.Item>
  30. <Button type="primary">查询</Button>
  31. </Form.Item>
  32. </Form>
  33. <div style={{ margin: "20px -25px" }}>
  34. <Table
  35. className="cus-table"
  36. rowKey="id"
  37. scroll={{
  38. x: true,
  39. }}
  40. dataSource={[
  41. {
  42. id: 1,
  43. name: "综合管理与基础设施",
  44. description:
  45. "消息一出,瞬间引爆互联网,分分钟登顶Hacker News。假如这次发现为真,那么我们就能实现无损的能量传输,全球的能耗问题将从源头上解决,人类能利用电能获得巨大的力量。",
  46. },
  47. ]}
  48. columns={[
  49. {
  50. title: "序号",
  51. align: "center",
  52. minWidth: 80,
  53. render: (val, record, index) => index,
  54. },
  55. {
  56. title: "标题",
  57. dataIndex: "name",
  58. align: "center",
  59. minWidth: 200,
  60. },
  61. {
  62. title: "说明",
  63. minWidth: 300,
  64. align: "center",
  65. render: (val) => (
  66. <p className="limit-line line-2">{val.description}</p>
  67. ),
  68. },
  69. {
  70. title: "分值",
  71. align: "center",
  72. render: (val) => <p className="empty-text">(空)</p>,
  73. },
  74. {
  75. title: "资料上传 ",
  76. align: "center",
  77. render: () => (
  78. <Button
  79. type="link"
  80. onClick={() =>
  81. navigate(
  82. isReportDetail
  83. ? // 考核填报
  84. "/management/form/detail/1/index"
  85. : isEvalutionDetail
  86. ? // 考核评定
  87. "/management/evaluation/detail/1/index"
  88. : // 考核管理
  89. "/management/index/detail/1/index"
  90. )
  91. }
  92. >
  93. 查看
  94. </Button>
  95. ),
  96. },
  97. {
  98. title: "上传状态",
  99. align: "center",
  100. minWidth: 120,
  101. render: (val) => <p className="empty-text">(空)</p>,
  102. },
  103. {
  104. title: "打分点",
  105. align: "center",
  106. minWidth: 100,
  107. render: (val) => "是",
  108. },
  109. {
  110. title: "责任部门",
  111. align: "center",
  112. minWidth: 120,
  113. render: (val) => <p className="empty-text">(空)</p>,
  114. },
  115. {
  116. title: "自评得分",
  117. dataIndex: "rate",
  118. align: "center",
  119. minWidth: 120,
  120. },
  121. {
  122. title: "自评人",
  123. align: "center",
  124. minWidth: 100,
  125. render: (val) => <p className="empty-text">(空)</p>,
  126. },
  127. {
  128. title: "评定得分",
  129. dataIndex: "rates",
  130. align: "center",
  131. minWidth: 120,
  132. },
  133. {
  134. title: "评定人",
  135. align: "center",
  136. minWidth: 100,
  137. render: (val) => <p className="empty-text">(空)</p>,
  138. },
  139. {
  140. title: "评定意见",
  141. align: "center",
  142. minWidth: 120,
  143. render: (val) => <p className="empty-text">(空)</p>,
  144. },
  145. {
  146. title: "操作",
  147. align: "center",
  148. hidden: !isEvalutionDetail,
  149. render: () => (
  150. <Button
  151. type="link"
  152. onClick={() =>
  153. navigate("/management/evaluation/detail/submit")
  154. }
  155. >
  156. 评定
  157. </Button>
  158. ),
  159. },
  160. ]}
  161. />
  162. </div>
  163. </>
  164. );
  165. };