|  |  | @ -1,17 +1,13 @@ | 
			
		
	
		
			
				
					|  |  |  | import React, { useEffect, useState, useRef, useMemo } from 'react'; | 
			
		
	
		
			
				
					|  |  |  | import { connect } from 'react-redux'; | 
			
		
	
		
			
				
					|  |  |  | import moment from 'moment' | 
			
		
	
		
			
				
					|  |  |  | import { Table, Button, Pagination, Skeleton, Form, Tooltip } from '@douyinfe/semi-ui'; | 
			
		
	
		
			
				
					|  |  |  | import { IconSearch } from '@douyinfe/semi-icons'; | 
			
		
	
		
			
				
					|  |  |  | import { Table, Button, Pagination, Skeleton, Popconfirm, Tooltip } from '@douyinfe/semi-ui'; | 
			
		
	
		
			
				
					|  |  |  | import { SkeletonScreen, Setup } from "$components"; | 
			
		
	
		
			
				
					|  |  |  | import { UserAttribute } from '$utils'; | 
			
		
	
		
			
				
					|  |  |  | import ImportPositionRatingModal from '../components/importPositionRating'; | 
			
		
	
		
			
				
					|  |  |  | import '../style.less'; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | const PositionRating = (props) => { | 
			
		
	
		
			
				
					|  |  |  |     const { dispatch, actions, memberList, history, user, loading, socket, xqMembers } = props | 
			
		
	
		
			
				
					|  |  |  |     const { humanAffairs } = actions; | 
			
		
	
		
			
				
					|  |  |  |     const { getMemberList, getPositionRating } = actions.humanAffairs; | 
			
		
	
		
			
				
					|  |  |  |     const { dispatch, actions, memberList } = props | 
			
		
	
		
			
				
					|  |  |  |     const { getMemberList, getPositionRating, postPositionRating, delPositionRating } = actions.humanAffairs; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     const form = useRef();//表单 | 
			
		
	
		
			
				
					|  |  |  |     let [archivesList, setArchivesList] = useState([]);//人员列表 | 
			
		
	
	
		
			
				
					|  |  | @ -25,8 +21,8 @@ const PositionRating = (props) => { | 
			
		
	
		
			
				
					|  |  |  |         getMainList() | 
			
		
	
		
			
				
					|  |  |  |     }, [query]) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     function getMainList() { | 
			
		
	
		
			
				
					|  |  |  |         dispatch(getPositionRating(query)).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |     function getMainList(queryObj) { | 
			
		
	
		
			
				
					|  |  |  |         dispatch(getPositionRating(queryObj || query)).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |             if (res.success) { | 
			
		
	
		
			
				
					|  |  |  |                 setArchivesList(res.payload?.data?.rows) | 
			
		
	
		
			
				
					|  |  |  |                 setLimits(res.payload?.data?.count) | 
			
		
	
	
		
			
				
					|  |  | @ -103,45 +99,50 @@ const PositionRating = (props) => { | 
			
		
	
		
			
				
					|  |  |  |         width: 120, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "userPost", | 
			
		
	
		
			
				
					|  |  |  |         key: "userPost", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => { | 
			
		
	
		
			
				
					|  |  |  |             return r.userPost || '-'; | 
			
		
	
		
			
				
					|  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '评级时间', | 
			
		
	
		
			
				
					|  |  |  |         width: 100, | 
			
		
	
		
			
				
					|  |  |  |         width: 120, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "ratingTime", | 
			
		
	
		
			
				
					|  |  |  |         key: "ratingTime", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '理论基础测评成绩', | 
			
		
	
		
			
				
					|  |  |  |         width: 150, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "theoryBasicScore", | 
			
		
	
		
			
				
					|  |  |  |         key: "theoryBasicScore", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '理论基础测评是否通过(≥60)', | 
			
		
	
		
			
				
					|  |  |  |         width: 150, | 
			
		
	
		
			
				
					|  |  |  |         width: 130, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "theoryPassed", | 
			
		
	
		
			
				
					|  |  |  |         key: "theoryPassed", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '评级总成绩', | 
			
		
	
		
			
				
					|  |  |  |         width: 150, | 
			
		
	
		
			
				
					|  |  |  |         width: 100, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "totalScore", | 
			
		
	
		
			
				
					|  |  |  |         key: "totalScore", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '评级总成绩是否通过(K≥60)', | 
			
		
	
		
			
				
					|  |  |  |         width: 150, | 
			
		
	
		
			
				
					|  |  |  |         width: 130, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "totalRatingPassed", | 
			
		
	
		
			
				
					|  |  |  |         key: "totalRatingPassed", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '技术职级等级', | 
			
		
	
		
			
				
					|  |  |  |         width: 150, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "technicalGrade", | 
			
		
	
		
			
				
					|  |  |  |         key: "technicalGrade", | 
			
		
	
		
			
				
					|  |  |  |         render: (_, r, index) => <span>-</span>, | 
			
		
	
		
			
				
					|  |  |  |     }, { | 
			
		
	
		
			
				
					|  |  |  |         title: '操作', | 
			
		
	
		
			
				
					|  |  |  |         width: 100, | 
			
		
	
		
			
				
					|  |  |  |         dataIndex: "action", | 
			
		
	
		
			
				
					|  |  |  |         key: "action", | 
			
		
	
		
			
				
					|  |  |  |         render: (text, record) => <div style={{ color: "#1890FF" }}><Popconfirm | 
			
		
	
		
			
				
					|  |  |  |             style={{ minWidth: "max-content" }} | 
			
		
	
		
			
				
					|  |  |  |             title="提示" | 
			
		
	
		
			
				
					|  |  |  |             content="确认删除条信息?" | 
			
		
	
		
			
				
					|  |  |  |             onConfirm={() => { handleDel(record.id) }} | 
			
		
	
		
			
				
					|  |  |  |             position={"leftBottom"} | 
			
		
	
		
			
				
					|  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |             <a style={{ cursor: 'pointer' }}>删除</a> | 
			
		
	
		
			
				
					|  |  |  |         </Popconfirm></div> | 
			
		
	
		
			
				
					|  |  |  |     }]; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     function handleRow(record, index) {//斑马条纹 | 
			
		
	
	
		
			
				
					|  |  | @ -162,6 +163,20 @@ const PositionRating = (props) => { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         setImportModal(true); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     const handleImportOk = (dataToSave) => { | 
			
		
	
		
			
				
					|  |  |  |         dispatch(postPositionRating(dataToSave)).then(res => { | 
			
		
	
		
			
				
					|  |  |  |             setImportModal(false); | 
			
		
	
		
			
				
					|  |  |  |             setQuery({ limit: 10, page: 0 }); | 
			
		
	
		
			
				
					|  |  |  |             getMainList({ limit: 10, page: 0 }); | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |     const handleDel = (id) => { | 
			
		
	
		
			
				
					|  |  |  |         dispatch(delPositionRating(id)).then(res => { | 
			
		
	
		
			
				
					|  |  |  |             setQuery({ limit: 10, page: 0 }); | 
			
		
	
		
			
				
					|  |  |  |             getMainList({ limit: 10, page: 0 }); | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |     const scroll = useMemo(() => ({}), []); | 
			
		
	
		
			
				
					|  |  |  |     return ( | 
			
		
	
		
			
				
					|  |  |  |         <> | 
			
		
	
	
		
			
				
					|  |  | @ -266,6 +281,7 @@ const PositionRating = (props) => { | 
			
		
	
		
			
				
					|  |  |  |                     {importModal ? | 
			
		
	
		
			
				
					|  |  |  |                         <ImportPositionRatingModal | 
			
		
	
		
			
				
					|  |  |  |                             memberList={memberList} | 
			
		
	
		
			
				
					|  |  |  |                             onOk={handleImportOk} | 
			
		
	
		
			
				
					|  |  |  |                             onCancel={() => { setImportModal(false) }} | 
			
		
	
		
			
				
					|  |  |  |                         /> : ''} | 
			
		
	
		
			
				
					|  |  |  |                 </div> | 
			
		
	
	
		
			
				
					|  |  | 
 |