tsg-web/src/views/sz/szzf/ajdj/lsyx.js

69 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined,VerticalAlignBottomOutlined } from '@ant-design/icons'
import { useForm } from 'antd/lib/form/Form';
import { useState } from 'react';
const { Dragger } = Upload;
const list = [
{
type:'整改前'
},
{
type:'整改后'
}
]
const Page = () => {
const [form] = Form.useForm();
const [fileList ,setFileList] =useState()
const props = {
name: 'file',
multiple: true,
fileList: fileList,
showUploadList: false,
beforeUpload: (file, fileList) => {
// if (fileType == "pic" &&
// (file.type != "image/jpeg" || file.type != "image/png" || file.type != "image/jpg")) {
// message.error('仅支持上传jpg/png/jpeg格式的图片');
// return false;
// } else {
// return true;
// }
},
onChange(e) {
// httpPostFile(apiUrl.service.uploadFile.uploadUrl + "?group=" + typeUpload, e).then(res => {
// setFileList([...fileList, res.data])
// })
}
};
const onFinish = () =>{
}
return (
<Form form={form} onFinish={onFinish} >
{list.map(item=>(
<Row>
<Col span={2}>
<div style={{display:'flex',alignItems:'center'}}>
<div style={{width:3,height:12,background:'#259def',marginRight:5}}></div>
{item.type}</div>
</Col>
<Col span={22}>
<Form.Item
label='附件'
name='name'
>
<Dragger {...props}>
<p className="ant-upload-drag-icon">
<InboxOutlined />
</p>
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p>
</Dragger>
</Form.Item>
</Col>
</Row>))}
</Form >
)
}
export default Page