import React, { useState, useRef } from 'react';
|
import { Form, Input, Tabs, Typography, Button, Modal, Select } from '@arco-design/web-react';
|
import { Col, Space, Row, Tooltip } from 'antd';
|
import ArcoUpload from '@/components/ArcoUpload';
|
import * as $$ from '@/utils/utility';
|
import { question1, } from '@/assets/images';
|
|
const FormItem = Form.Item;
|
const Option = Select.Option;
|
const appUrl = $$.appUrl;
|
|
function delFile(id) {
|
return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
|
}
|
|
|
const UniteHandle = ({ id, visible, handleOnCancel }) => {
|
const formRef = useRef();
|
const [supervising, setSupervising] = useState(false);
|
const [fileVisible, setFileVisible] = useState(false);
|
|
const options = [
|
{ value: '1', label: '一' }, { value: '2', label: '二' }, { value: '3', label: '三' }
|
];
|
|
|
|
|
//删除文件
|
const handleDelFile = async (id) => {
|
const res = await delFile(id)
|
if (res.type) {
|
$$.infoSuccess({ content: '删除成功!' });
|
}
|
}
|
|
const handleSupervising = () => {
|
setSupervising(!supervising)
|
}
|
|
|
return (
|
<>
|
<Modal visible={visible} onCancel={handleOnCancel} title='联合处置申请' centered footer={null}>
|
<Form
|
ref={formRef}
|
layout='vertical'
|
requiredSymbol={false}
|
scrollToFirstError={true}
|
initialValues={{
|
suggestion: ''
|
}}//默认值
|
>
|
<Row>
|
<Col span={24}>
|
<FormItem
|
label={<div style={{ display: 'flex' }}><div>添加配合部门</div><div style={{ color: '#86909C' }}>(可多选)</div></div>}
|
field=''
|
>
|
<Select
|
mode='multiple'
|
placeholder='请选择督办部门'
|
style={{}}
|
allowClear
|
>
|
{options.map((option) => (
|
<Option key={option.value} value={option.value} onChange={(v) => console.log(v, 'vvvvvv')}>
|
{option.label}
|
</Option>
|
))}
|
</Select>
|
</FormItem>
|
</Col>
|
<Col span={24}>
|
<FormItem
|
field='suggestion'
|
label={(<div style={{ display: 'flex' }}>添加理由<div className="must">必填</div></div>)}
|
>
|
<Input.TextArea
|
rows={5}
|
wrapperStyle={{ width: '700px' }}
|
value='在事项办理过程中:因[......业务]涉及白云区新市街司法所因[......业务]涉及白云区新市街劳监大队特申请将上述部门列为配合部门,请审批'
|
/>
|
</FormItem>
|
</Col>
|
<Col span={24}>
|
<FormItem
|
label={
|
<div>
|
附件材料
|
<Tooltip onClick={() => setFileVisible(true)}>
|
<img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '-3px 4px 0px 4px' }} />
|
</Tooltip>
|
</div>
|
}
|
field='caseDes'
|
rules={[{ message: '请填写事项概况', required: true }]}
|
>
|
<ArcoUpload
|
params={{
|
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId='24083010062110001'&&ownerId=${id}&ownerType=22_00018-508`,
|
}}
|
field='file1'
|
// handleChangeFile={handleChangeFile}
|
label=''
|
// editData={props.editData}
|
handleDelFile={handleDelFile}
|
/>
|
</FormItem>
|
</Col>
|
<Button type='primary' style={{ marginTop: '-16px' }} onClick={() => handleSupervising()}>提交申请</Button>
|
</Row>
|
</Form>
|
</Modal>
|
</>
|
)
|
}
|
|
export default UniteHandle;
|