pyt
2025-03-17 956d1d6e32b3c7a8c40101a42a2855fb5c22bc63
management/src/pages/party/manage/components/index.jsx
@@ -1,6 +1,6 @@
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();
@@ -14,84 +14,84 @@
    {
      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={
        [
          <Button
            key="submit"
            type="primary"
            onClick={() => onCancel(false)}
          >
            确认
          </Button>,
        ]
      }
      footer={[
        <Button
          key="submit"
          type="primary"
          onClick={() => onCancel(false)}
        >
          确认
        </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'
        search={false}
        actionRef={actionRef}
        columns={columns}
        dataSource={tableListData}
        pagination={{
          showSizeChanger: true,
          showQuickJumper: true,
          defaultPageSize: 10,
        }}
        toolBarRender={false}
      />
          rowKey="id"
          search={false}
          actionRef={actionRef}
          columns={columns}
          dataSource={tableListData}
          pagination={{
            showSizeChanger: true,
            showQuickJumper: true,
            defaultPageSize: 10,
          }}
          toolBarRender={false}
        />
      </div>
    </Modal>
  );