| | |
| | | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { useIntl, FormattedMessage } from '@umijs/max'; |
| | | import { Button, message, Modal, Table } from 'antd'; |
| | | import { ActionType, FooterToolbar, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components'; |
| | | import { PlusOutlined, DeleteOutlined, ExclamationCircleOutlined, ExportOutlined } from '@ant-design/icons'; |
| | | import { Button, message, Modal } from 'antd'; |
| | | import { FooterToolbar, PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { PlusOutlined, ExportOutlined } from '@ant-design/icons'; |
| | | import { getLogininforList, removeLogininfor, exportLogininfor } from '@/services/monitor/logininfor'; |
| | | import Http from '@/utils/http'; |
| | | import Edit from './components/edit' |
| | |
| | | if (!rows) return true; |
| | | const hide = message.loading('正在删除'); |
| | | try { |
| | | const resp = await removeLogininfor(rows.map((row) => row.infoId).join(',')); |
| | | const resp = await Http.doPost('api/role/remove/' + rows.map((row) => row.id).join(',')); |
| | | hide(); |
| | | if (resp.code === 200) { |
| | | message.success('删除成功,即将刷新'); |
| | | message.success('删除成功'); |
| | | return true; |
| | | } else { |
| | | message.error(resp.msg); |
| | | return false; |
| | | } |
| | | return true; |
| | | } catch (error) { |
| | | hide(); |
| | | message.error('删除失败,请重试'); |
| | |
| | | const handleExport = async () => { |
| | | const hide = message.loading('正在导出'); |
| | | try { |
| | | await exportLogininfor(); |
| | | await Http.doPost('api/role/export'); |
| | | hide(); |
| | | message.success('导出成功'); |
| | | return true; |