| | |
| | | import { Form, Input, Modal, Select, Upload, Space, Button, message } from 'antd'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState,useRef } from 'react'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState, useRef, useMemo } from 'react'; |
| | | |
| | | const AddEditView = ({ visible, onSave, onUpdate, onCancel, }, ref) => { |
| | | const actionRef = useRef(); |
| | |
| | | { |
| | | title: '联系电话', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'phone' |
| | | }, |
| | | { |
| | | title: '身份证号', |
| | | dataIndex: 'name' |
| | | dataIndex: 'idNumber' |
| | | }, |
| | | { |
| | | title: '所在社区', |
| | | dataIndex: 'name', |
| | | dataIndex: 'community', |
| | | }, |
| | | { |
| | | title: '服务对象', |
| | | dataIndex: 'name' |
| | | dataIndex: 'serviceTarget' |
| | | }, |
| | | { |
| | | title: '所在党组织', |
| | | dataIndex: 'name' |
| | | dataIndex: 'partyOrganization' |
| | | }, |
| | | { |
| | | title: '失败原因', |
| | | dataIndex: 'status', |
| | | dataIndex: 'failReason', |
| | | }, |
| | | ] |
| | | |
| | | useImperativeHandle(ref, () => { |
| | | return { |
| | | refreshData: (data) => { |
| | | |
| | | |
| | | setTableListData(()=>data) |
| | | }, |
| | | clean: () => { |
| | | |
| | | setTableListData(()=>[]) |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | |
| | | } |
| | | |
| | | return ( |
| | | <Modal |
| | | getContainer={false} |
| | | width="65%" |
| | | destroyOnClose |
| | | title={'数据导入失败提示'} |
| | | title="数据导入失败提示" |
| | | open={visible} |
| | | onCancel={() => onCancel(false)} |
| | | footer={ |
| | | [ |
| | | footer={[ |
| | | <Button |
| | | key="submit" |
| | | type="primary" |
| | |
| | | > |
| | | 确认 |
| | | </Button>, |
| | | ] |
| | | } |
| | | ]} |
| | | > |
| | | <div> |
| | | <div style={{width:'100%',textAlign:'center',marginBottom:'20px',fontWeight:'bold'}}>以下信息导入失败</div> |
| | | <div |
| | | style={{ |
| | | width: '100%', |
| | | textAlign: 'center', |
| | | marginBottom: '20px', |
| | | fontWeight: 'bold' |
| | | }} |
| | | > |
| | | 以下信息导入失败 |
| | | </div> |
| | | <ProTable |
| | | rowKey='id' |
| | | rowKey="id" |
| | | search={false} |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | |
| | | }} |
| | | toolBarRender={false} |
| | | /> |
| | | |
| | | </div> |
| | | </Modal> |
| | | ); |