|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
ProTable, TableDropdown |
|
|
ProTable, TableDropdown |
|
|
} from '@ant-design/pro-components'; |
|
|
} from '@ant-design/pro-components'; |
|
|
import { Button, Image, ConfigProvider, message } from 'antd'; |
|
|
|
|
|
import { GetActivityaddressList,PostActivityExportUsers} from '@/apis/api'; |
|
|
|
|
|
|
|
|
import { Button, Image, ConfigProvider, message, Popconfirm } from 'antd'; |
|
|
|
|
|
import { GetActivityaddressList, PostActivityExportUsers, PostActivityaddressDel } from '@/apis/api'; |
|
|
import { Imageprefix } from '@/constants'; |
|
|
import { Imageprefix } from '@/constants'; |
|
|
|
|
|
|
|
|
const PagesMainActivityListTable: React.FC = ({ dispatch, openModel, getId }: any) => { |
|
|
const PagesMainActivityListTable: React.FC = ({ dispatch, openModel, getId }: any) => { |
|
|
|
|
|
|
|
|
bordered={true} |
|
|
bordered={true} |
|
|
actionRef={actionRef} |
|
|
actionRef={actionRef} |
|
|
dataSource={list} |
|
|
dataSource={list} |
|
|
columns={[ { |
|
|
|
|
|
|
|
|
columns={[{ |
|
|
title: 'ID', |
|
|
title: 'ID', |
|
|
dataIndex: 'id', |
|
|
dataIndex: 'id', |
|
|
width: 100, |
|
|
width: 100, |
|
|
search: false, |
|
|
search: false, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
title: '地址', |
|
|
|
|
|
dataIndex: 'address', |
|
|
|
|
|
width: 240, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '地址分类', |
|
|
|
|
|
dataIndex: 'cate', |
|
|
|
|
|
valueType: 'select', |
|
|
|
|
|
width: 100, |
|
|
|
|
|
valueEnum: { |
|
|
|
|
|
'菊城人才': { |
|
|
|
|
|
text: '菊城人才', |
|
|
|
|
|
}, |
|
|
|
|
|
'移动': { |
|
|
|
|
|
text: '移动', |
|
|
|
|
|
}, |
|
|
|
|
|
'村镇银行': { |
|
|
|
|
|
text: '村镇银行', |
|
|
|
|
|
}, |
|
|
|
|
|
'电信': { |
|
|
|
|
|
text: '电信', |
|
|
|
|
|
}, |
|
|
|
|
|
'联通': { |
|
|
|
|
|
text: '联通', |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
title: '地址', |
|
|
|
|
|
dataIndex: 'address', |
|
|
|
|
|
width: 240, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '地址分类', |
|
|
|
|
|
dataIndex: 'cate', |
|
|
|
|
|
valueType: 'select', |
|
|
|
|
|
width: 100, |
|
|
|
|
|
valueEnum: { |
|
|
|
|
|
'菊城人才': { |
|
|
|
|
|
text: '菊城人才', |
|
|
|
|
|
}, |
|
|
|
|
|
'移动': { |
|
|
|
|
|
text: '移动', |
|
|
|
|
|
}, |
|
|
|
|
|
'村镇银行': { |
|
|
|
|
|
text: '村镇银行', |
|
|
|
|
|
}, |
|
|
|
|
|
'电信': { |
|
|
|
|
|
text: '电信', |
|
|
|
|
|
}, |
|
|
|
|
|
'联通': { |
|
|
|
|
|
text: '联通', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
title: '审核账号', |
|
|
|
|
|
dataIndex: 'audit_mobile', |
|
|
|
|
|
ellipsis: true, |
|
|
|
|
|
width: 120, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '审核人', |
|
|
|
|
|
dataIndex: 'contact_person', |
|
|
|
|
|
width: 120, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '操作', |
|
|
|
|
|
width: 100, |
|
|
|
|
|
key: 'option', |
|
|
|
|
|
valueType: 'option', |
|
|
|
|
|
fixed: 'right', |
|
|
|
|
|
render: (_, record, action) => [ |
|
|
|
|
|
<Button key='1' type='link' onClick={() => { |
|
|
|
|
|
setId(record.id) |
|
|
|
|
|
dispatch({ type: 'openModel/getOpenModal', payload: true }) |
|
|
|
|
|
}}>编辑</Button>, |
|
|
|
|
|
<Button key='2' type='link' onClick={() => { |
|
|
|
|
|
|
|
|
|
|
|
}}>删除</Button> |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '审核账号', |
|
|
|
|
|
dataIndex: 'audit_mobile', |
|
|
|
|
|
ellipsis: true, |
|
|
|
|
|
width: 120, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '审核人', |
|
|
|
|
|
dataIndex: 'contact_person', |
|
|
|
|
|
width: 120, |
|
|
|
|
|
search: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '操作', |
|
|
|
|
|
width: 100, |
|
|
|
|
|
key: 'option', |
|
|
|
|
|
valueType: 'option', |
|
|
|
|
|
fixed: 'right', |
|
|
|
|
|
render: (_, record, action) => [ |
|
|
|
|
|
<Button key='1' type='link' onClick={() => { |
|
|
|
|
|
setId(record.id) |
|
|
|
|
|
dispatch({ type: 'openModel/getOpenModal', payload: true }) |
|
|
|
|
|
}}>编辑</Button>, |
|
|
|
|
|
<Popconfirm |
|
|
|
|
|
title="是否删除" |
|
|
|
|
|
onConfirm={(e) => { |
|
|
|
|
|
PostActivityaddressDel({ id: record.id }).then(res => { |
|
|
|
|
|
message.success('删除成功') |
|
|
|
|
|
actionRef.current.reload(); |
|
|
|
|
|
}) |
|
|
|
|
|
}} |
|
|
|
|
|
okText="删除" |
|
|
|
|
|
cancelText="取消" |
|
|
|
|
|
> |
|
|
|
|
|
<a |
|
|
|
|
|
key="delete" |
|
|
|
|
|
> |
|
|
|
|
|
删除 |
|
|
|
|
|
</a> |
|
|
|
|
|
</Popconfirm> |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
]} |
|
|
]} |
|
|
rowKey="id" |
|
|
rowKey="id" |
|
|
pagination={{ |
|
|
pagination={{ |
|
|
|
|
|
|
|
|
sortby: 'desc', |
|
|
sortby: 'desc', |
|
|
keyword: params.name, |
|
|
keyword: params.name, |
|
|
cate: params.cate |
|
|
cate: params.cate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
setList(res.data.addresss) |
|
|
setList(res.data.addresss) |
|
|
setTotal(res.data.total) |
|
|
setTotal(res.data.total) |