在线监督、事后监督开发基本完成
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { isNotEmpty } from '@/utils/CommonUtils';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
||||
import { Button, Spin, message } from 'antd';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { useHistory } from 'umi';
|
||||
@ -13,19 +13,18 @@ import { getPage } from '../service';
|
||||
const PostSupervision: React.FC<{}> = () => {
|
||||
const [spin, spinSet] = useState<boolean>(false);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const [record, setRecord] = useState<any[]>([]);
|
||||
//查询分页数据
|
||||
const [pageData, pageDataSet] = useState<any>({
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
const history = useHistory();
|
||||
const ref = useRef<ActionType>();
|
||||
const viewModalRef = useRef(null);
|
||||
|
||||
//查看详情
|
||||
const viewDetails = (record: any) => {
|
||||
setVisible(true);
|
||||
setRecord(record);
|
||||
viewModalRef.current?.InitData(record.id);
|
||||
}
|
||||
|
||||
//关闭
|
||||
@ -150,7 +149,6 @@ const PostSupervision: React.FC<{}> = () => {
|
||||
options={false}
|
||||
bordered={false}
|
||||
size='small'
|
||||
actionRef={ref}
|
||||
search={{ labelWidth: 'auto', span: 6 }}
|
||||
loading={false}
|
||||
request={async (params) => {
|
||||
@ -188,7 +186,7 @@ const PostSupervision: React.FC<{}> = () => {
|
||||
rowKey={"id"}
|
||||
/>
|
||||
</div>
|
||||
<ViewModal modalVisible = {visible} onCancel = {()=> closeViewDetails()} data = {record}/>
|
||||
<ViewModal modalVisible = {visible} onCancel = {()=> closeViewDetails()} ref = {viewModalRef}/>
|
||||
</Spin>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user