| | |
| | | rowClassName, |
| | | offsetHeight = 0,//高度偏移量 |
| | | tableHeight,//自定义表格高度 |
| | | isScroll = false,//表格是否竖向滚动,兼容以前的,当需要表格竖向滚动,请设置这个 |
| | | ...other |
| | | }) => { |
| | | // 80 ['类型','登记人','调解员','承办法官','调解员','签收人','退回人','处理时限','调解进度/司法确认进度','其他调解员','申请渠道','司法确认结果','助理/书记员','调解类型'] |
| | |
| | | }); |
| | | |
| | | const scrollRef = useRef(null) |
| | | const [height, setHeight] = useState(500);//表格高度 |
| | | const [height, setHeight] = useState();//表格高度 |
| | | |
| | | useEffect(() => { |
| | | onWindowResize() |
| | |
| | | }, []) |
| | | |
| | | const onWindowResize = () => { |
| | | if (tableHeight) { |
| | | setHeight(tableHeight) |
| | | } else { |
| | | let offsetTop = 0; |
| | | if (scrollRef && scrollRef.current) { |
| | | offsetTop = getOffset(scrollRef.current).top; |
| | | } |
| | | setHeight(getSize().windowH - offsetTop - 46 - offsetHeight) |
| | | } |
| | | }; |
| | | |
| | | return ( |
| | |
| | | bordered={bordered} |
| | | rowSelection={rowSelection} |
| | | scroll={{ |
| | | y: height - 80, |
| | | y: isScroll ? height - 80 : null, |
| | | ...scroll |
| | | }} |
| | | expandable={expandable} |
| | |
| | | return $$.ax.request({ url: `caseTask/pageMyTaskDb`, type: 'get', service: 'mediate', data }); |
| | | } |
| | | |
| | | |
| | | //签收 |
| | | function signApi(data) { |
| | | return $$.ax.request({ url: `caseTask/sign`, type: 'post', service: 'mediate', data }); |
| | |
| | | sortColmn: 1, |
| | | }) |
| | | const [total, setTotal] = useState(0);//表格数据总数量 |
| | | const [loading, setLoading] = useState(false);//表格loading |
| | | |
| | | useEffect(() => { |
| | | getCountData(); |
| | |
| | | getTableData(tabActivekey) |
| | | }, [searchData, pageData]) |
| | | |
| | | const sign = async (caseId, ownerId) => { |
| | | //签收 |
| | | const handleSign = async (caseId, ownerId) => { |
| | | const res = await signApi({ caseId: caseId, caseTaskId: ownerId }) |
| | | if (res.type) { |
| | | $$.infoSuccess({ content: '签收成功' }); |
| | | getCountData(); |
| | | getTableData(tabActivekey) |
| | | } |
| | | } |
| | | |
| | | const handleSign = (caseId, ownerId) => { |
| | | sign(caseId, ownerId) |
| | | } |
| | | |
| | | //获取表格数据汇总 |
| | | const getTableData = async (type) => { |
| | | setLoading(true) |
| | | let res |
| | | switch (type) { |
| | | case '1'://待分派 |
| | |
| | | break; |
| | | } |
| | | if (res.type) { |
| | | setLoading(false) |
| | | const { data } = res |
| | | setTableData(data?.content) |
| | | setTotal(data.totalElements) |
| | |
| | | size="small" |
| | | rowKey="caseId" |
| | | bordered={true} |
| | | isScroll={true}//兼容以前的,当需要表格竖向滚动,请设置这个 |
| | | scroll={{ |
| | | x: 1300 |
| | | }} |
| | | offsetHeight={153} |
| | | loading={loading} |
| | | pagination={{ |
| | | current: pageData.page, |
| | | pageSize: pageData.size, |
| | |
| | | rowKey="ownerType" |
| | | bordered={true} |
| | | scroll={{ x: 1300 }} |
| | | tableHeight={126} |
| | | /> |
| | | <Modal |
| | | style={{ width: '512px' }} |