forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-10 f6939b0ec6680da8416a3161b524e7b73a7a3db8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import React, { useRef, useState } from 'react';
import { Row, Col, Space, Tooltip } from 'antd';
import { Form, Input, Radio, Button } from '@arco-design/web-react';
import { register } from '@/assets/images'
import { question1, } from '@/assets/images';
import ArcoUpload from '@/components/ArcoUpload';
import * as $$ from '@/utils/utility';
 
const FormItem = Form.Item;
const appUrl = $$.appUrl;
const RadioGroup = Radio.Group;
 
 
function delFile(id) {
  return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
}
 
 
 
const AuditView = () => {
  const formRef = useRef();
  const [value, setValue] = useState(1);
  const id = 1;
 
  const onChange = (e) => {
    console.log('radio checked', e.target.value);
    setValue(e.target.value);
  };
 
  //删除文件
  const handleDelFile = async (id) => {
    const res = await delFile(id)
    if (res.type) {
      $$.infoSuccess({ content: '删除成功!' });
    }
  }
 
  return (
    <>
      <div className="auditView">
        <Col span={24} className='title'>
          <Space size='small'>
            <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>联合处置申请</h5>
          </Space>
        </Col>
        <Row gutter={[16, 16]}>
          <Col span={24}>
            <div><div className="title-text">添加配合部门</div></div>
            <div>白云区新市街司法所、白云区新市街劳监大队</div>
          </Col>
          <Col span={24}>
            <div><div className="title-text">添加理由</div></div>
            <div>在调解过程中,我们发现需要白云区新市街司法所的专业司法能力支持事项办理,以促进调解工作的顺利进行。</div>
          </Col>
          {/*事项等级分为三级,颜色需要做判断*/}
          <Col span={24}>
            <div className="title"><div className="title-text">申请时间</div></div>
            <div >2024-7-21 12:00</div>
          </Col>
          <Col span={24}>
            <div><div className="title-text">申请人</div></div>
            <div>广州市白云区新市街汇桥北社区委员会 张三丰<img src={register} alt='' style={{ width: '14px', height: '14px', marginLeft: '8px', marginTop: '-1px' }}/></div>
          </Col>
        </Row>
 
      </div>
      <div className="auditView">
        <Col span={24} className='title'>
          <Space size='small'>
            <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>审核</h5>
          </Space>
        </Col>
        <Form
          ref={formRef}
          layout='vertical'
          requiredSymbol={false}
          scrollToFirstError={true}
        >
          <Row style={{ marginBottom: '-16px' }}>
            <Col span={24}>
              <FormItem
                label='审核结果'
                field='majorStatus'
              >
                <RadioGroup options={[{ value: 0, label: '否' }, { value: 1, label: '是' }]} direction='vertical' />
              </FormItem>
            </Col>
            <Col span={24}>
              <FormItem
                label={(<div style={{ display: 'flex' }}>理由说明<div className="must">必填</div></div>)}
                field='handleContent'
                rules={[{ message: '请填写不同意联合处置申请的理由', required: true }]}
              >
                <Input.TextArea
                  maxLength={200}
                  showWordLimit
                  rows={5}
                  placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
                  wrapperStyle={{ width: '100%' }}
                />
              </FormItem>
            </Col>
            <Col span={24}>
              <FormItem
                label={<div style={{ display: 'flex' }}>
                  <span style={{ color: '#86909C' }}>附件材料</span>
                  <Tooltip>
                    <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 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-102`,
                  }}
                  field='file1'
                  // handleChangeFile={handleChangeFile}
                  label=''
                  // editData={props.editData}
                  handleDelFile={handleDelFile}
                />
              </FormItem>
            </Col>
          </Row>
        </Form>
        <Space style={{}}>
          <Button type='primary' >提交</Button>
          <Button type='secondary'>返回上级页面</Button>
        </Space>
      </div>
 
    </>
  )
}
 
export default AuditView;