|
|
|
|
@ -1,14 +1,19 @@
|
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Form, Input, Button, Table, DatePicker, Space } from 'antd';
|
|
|
|
|
import { SearchOutlined, RedoOutlined } from '@ant-design/icons';
|
|
|
|
|
import { Form, Input, Button, DatePicker, Space, Modal } from 'antd';
|
|
|
|
|
import { SearchOutlined, RedoOutlined, CloseOutlined, EyeOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
|
|
|
import StandardTable from '@/components/StandardTable';
|
|
|
|
|
import styles from './PermitManagement.less';
|
|
|
|
|
import licence1 from '@/assets/business_envinformation/licence1.svg';
|
|
|
|
|
import licence2 from '@/assets/business_envinformation/licence2.svg';
|
|
|
|
|
|
|
|
|
|
const PermitManagement = () => {
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
|
|
|
const [currentImage, setCurrentImage] = useState(null);
|
|
|
|
|
const [dataSource, setDataSource] = useState([
|
|
|
|
|
{
|
|
|
|
|
key: 1,
|
|
|
|
|
companyName: '北京某某环保科技有限公司',
|
|
|
|
|
companyName: '北京某某环保有限公司',
|
|
|
|
|
permitNumber: 'PWX-BJ-2023-001',
|
|
|
|
|
issueOrg: '北京市生态环境局',
|
|
|
|
|
expireDate: '2025-12-31',
|
|
|
|
|
@ -147,6 +152,8 @@ const PermitManagement = () => {
|
|
|
|
|
dataIndex: 'expireDate',
|
|
|
|
|
key: 'expireDate',
|
|
|
|
|
width: 120,
|
|
|
|
|
sorter: (a, b) => new Date(a.expireDate) - new Date(b.expireDate),
|
|
|
|
|
showSorterTooltip: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '正本',
|
|
|
|
|
@ -154,6 +161,7 @@ const PermitManagement = () => {
|
|
|
|
|
key: 'original',
|
|
|
|
|
width: 100,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: () => <a style={{ color: '#0080FF' }} onClick={() => { setCurrentImage(licence1); setIsModalVisible(true); }}>附件</a>
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '副本',
|
|
|
|
|
@ -161,6 +169,7 @@ const PermitManagement = () => {
|
|
|
|
|
key: 'duplicate',
|
|
|
|
|
width: 100,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: () => <a style={{ color: '#0080FF' }} onClick={() => { setCurrentImage(licence2); setIsModalVisible(true); }}>附件</a>
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
@ -168,10 +177,15 @@ const PermitManagement = () => {
|
|
|
|
|
width: 150,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (_, record) => (
|
|
|
|
|
<Space size="small">
|
|
|
|
|
<a onClick={() => handleView(record)}>查看</a>
|
|
|
|
|
<a onClick={() => handleEdit(record)}>编辑</a>
|
|
|
|
|
<a onClick={() => handleDelete(record)}>删除</a>
|
|
|
|
|
<Space size="middle">
|
|
|
|
|
<EyeOutlined
|
|
|
|
|
style={{ color: '#7ee370', fontSize: 16, cursor: 'pointer' }}
|
|
|
|
|
onClick={() => handleView(record)}
|
|
|
|
|
/>
|
|
|
|
|
<DeleteOutlined
|
|
|
|
|
style={{ color: '#ff7e72', fontSize: 16, cursor: 'pointer' }}
|
|
|
|
|
onClick={() => handleDelete(record)}
|
|
|
|
|
/>
|
|
|
|
|
</Space>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
@ -208,21 +222,25 @@ const PermitManagement = () => {
|
|
|
|
|
<div className={styles.searchSection}>
|
|
|
|
|
<Form form={form} layout="inline" onFinish={handleSearch}>
|
|
|
|
|
<Form.Item label="企业名称" name="companyName">
|
|
|
|
|
<Input placeholder="请输入企业名称" style={{ width: 140 }} />
|
|
|
|
|
<Input placeholder="请输入" style={{ width: 140, borderRadius: '2px' }} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="许可证号" name="permitNumber">
|
|
|
|
|
<Input placeholder="请输入许可证号" style={{ width: 140 }} />
|
|
|
|
|
<Input placeholder="请输入" style={{ width: 140, borderRadius: '2px' }} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="到期时间" name="expireDate">
|
|
|
|
|
<DatePicker placeholder="请选择到期时间" style={{ width: 140 }} />
|
|
|
|
|
<DatePicker placeholder="请选择" style={{ width: 140, borderRadius: '2px' }} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Button type="primary" htmlType="submit" icon={<SearchOutlined />}>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
htmlType="submit"
|
|
|
|
|
style={{ backgroundColor: '#00D48A', borderColor: '#00D48A', color: '#fff', borderRadius: '4px' }}
|
|
|
|
|
>
|
|
|
|
|
查询
|
|
|
|
|
</Button>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Button onClick={handleReset} icon={<RedoOutlined />}>
|
|
|
|
|
<Button onClick={handleReset} style={{ borderRadius: '4px' }}>
|
|
|
|
|
重置
|
|
|
|
|
</Button>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
@ -231,18 +249,35 @@ const PermitManagement = () => {
|
|
|
|
|
|
|
|
|
|
{/* 第二块:表格 */}
|
|
|
|
|
<div className={styles.tableSection}>
|
|
|
|
|
<Table
|
|
|
|
|
<StandardTable
|
|
|
|
|
columns={columns}
|
|
|
|
|
dataSource={dataSource}
|
|
|
|
|
pagination={{
|
|
|
|
|
data={{
|
|
|
|
|
list: dataSource,
|
|
|
|
|
pagination: {
|
|
|
|
|
total: dataSource.length,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
showSizeChanger: true,
|
|
|
|
|
showQuickJumper: true,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
showTotal: (total) => `共 ${total} 条`,
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
bordered
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* 图片弹窗 */}
|
|
|
|
|
<Modal
|
|
|
|
|
open={isModalVisible}
|
|
|
|
|
onCancel={() => setIsModalVisible(false)}
|
|
|
|
|
footer={null}
|
|
|
|
|
closeIcon={<CloseOutlined style={{ color: '#fff', fontSize: 20 }} />}
|
|
|
|
|
width="auto"
|
|
|
|
|
centered
|
|
|
|
|
styles={{
|
|
|
|
|
mask: { backgroundColor: '#10101080' },
|
|
|
|
|
content: { padding: 0, background: 'transparent', boxShadow: 'none' }
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{currentImage && <img src={currentImage} alt="许可证" style={{ width: '100%', display: 'block' }} />}
|
|
|
|
|
</Modal>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|