广州市综治平台前端
xusd
17 hours ago d880dfb0f9a79c51834c9f8a7017d8fa59f14f36
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
import React, { useState, useEffect } from "react";
import { Row, Col, Space } from 'antd';
import * as $$ from '../../../utils/utility';
import { ApplyDialog, AgentDialog, Respondent, Company } from './component/previewTable'
import FileTable from "../matterDetail/FileTable";
import { majorStatus_1 } from '@/assets/images';
import PreviewImage from '@/components/PreviewImage';
import MyPDF from '@/components/MyPDF';
import WantUserTag from '@/components/WantUserTag/Handling';
 
const Preview = (props) => {
  const isOrganization = $$.getQueryString('isOrganization')
  const [data, setData] = useState({});
  const levelColorMap = {
    1: '#F53F3F',
    2: '#EF6C24',
    3: '#00B42A',
  }
 
  useEffect(() => {
    const applyData = props.data?.fakeData?.filter(item => item.perType === "15_020008-1" && item.perClassName === "自然人");
    const agentData = props.data?.fakeData?.filter(item => item.perType === "24_00006-1");
    const company = props.data?.fakeData?.filter(item => item.perType === "15_020008-1" && item.perClassName === "非法人组织");
    const respondentData = props.data?.fakeData?.filter(item => item.perType === "15_020008-1" && item.perClassName === "法人");
    const applyList = props.data?.fakeData?.filter(item => item.perType === "15_020008-1" || item.perType === "24_00006-1") || [];
 
    const applyData1 = props.data?.fakeData?.filter(item => item.perType === "15_020008-2" && item.perClassName === "自然人");
    const agentData1 = props.data?.fakeData?.filter(item => item.perType === "24_00006-2");
    const company1 = props.data?.fakeData?.filter(item => item.perType === "15_020008-2" && item.perClassName === "非法人组织");
    const respondentData1 = props.data?.fakeData?.filter(item => item.perType === "15_020008-2" && item.perClassName === "法人");
    const applyForList = props.data?.fakeData?.filter(item => item.perType === "15_020008-2" || item.perType === "24_00006-2") || [];
 
    setData({
      applyData,
      agentData,
      company,
      respondentData,
      applyData1,
      agentData1,
      company1,
      respondentData1,
      applyList,
      applyForList
    })
  }, [props.data])
 
  return (
    <div style={{ ...props.style }}>
      <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
        <Space size='small'>
          <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>当事人信息</h4>
        </Space>
      </Col>
      <div style={{ marginBottom: '8px' }}>申请方</div>
      <div className="line-container" style={{ marginBottom: '20px' }}>
        <div className="line-box">
          <div className="line-box-active" style={{ left: '13px' }}></div>
        </div>
      </div>
      {/* ApplyDialog 只有在 applyData 存在且不为空时才渲染 */}
      {data.applyData && data.applyData.length > 0 ? (
        <ApplyDialog applyDialog={data.applyData} />
      ) : null}
 
      {/* AgentDialog 只有在 agentData 存在且不为空时才渲染 */}
      {data.agentData && data.agentData.length > 0 ? (
        <AgentDialog agentDialog={data.agentData} />
      ) : null}
 
      {/* Respondent 只有在 respondentData 存在且不为空时才渲染 */}
      {data.respondentData && data.respondentData.length > 0 ? (
        <Respondent respondent={data.respondentData} />
      ) : null}
 
      {data.company && data.company.length > 0 ? (
        <Company company={data.company} />
      ) : null}
      {data.applyList?.length === 0 && <div style={{ padding: '100px 0' }}>{$$.MyNewEmpty()}</div>}
 
      <div style={{ marginBottom: '8px' }}>被申请方</div>
      <div className="line-container" style={{ marginBottom: '20px' }}>
        <div className="line-box">
          <div className="line-box-active"></div>
        </div>
      </div>
      {data.applyData1 && data.applyData1.length > 0 ? (
        <ApplyDialog applyDialog={data.applyData1} />
      ) : null}
 
      {data.agentData1 && data.agentData1.length > 0 ? (
        <AgentDialog agentDialog={data.agentData1} />
      ) : null}
 
      {data.respondentData1 && data.respondentData1.length > 0 ? (
        <Respondent respondent={data.respondentData1} />
      ) : null}
 
      {data.company1 && data.company1.length > 0 ? (
        <Company company={data.company1} />
      ) : null}
      {data.applyForList?.length === 0 && <div style={{ padding: '100px 0' }}>{$$.MyNewEmpty()}</div>}
 
      <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
        <Space size='small'>
          <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>纠纷基本情况</h4>
        </Space>
      </Col>
      <Row gutter={[16, 16]}>
        {props.isDoc &&
          <>
            <Col span={8}>
              <div><div className="title-text">事项状态</div></div>
              <div style={{ color: '#1A6FB8' }}>{props.data?.statusName || '-'}</div>
            </Col>
            <Col span={8}>
              <div><div className="title-text">事项编号</div></div>
              <div>{props.data?.caseRef || '-'}</div>
            </Col>
            <Col span={8}>
              <div><div className="title-text">市民编号</div></div>
              <div>{props.data?.cityCode || '-'}</div>
            </Col>
          </>
        }
        <Col span={8}>
          <div className="title">
            <div className="title-text">事项等级</div>
          </div>
          <div style={{ display: 'flex' }}><div style={{ backgroundColor: levelColorMap[props.data?.caseLevel], marginRight: '4px', borderRadius: '4px' }}><div style={{ color: '#FFFFFF', padding: '0px 6px' }}>{props.data?.caseLevel || '-'}</div></div>级</div>
        </Col>
        <Col span={8}>
          <div><div className="title-text">事项来源</div></div>
          <div>自行排查</div>
        </Col>
        {/* <Col span={8}>
          <div ><div className="title-text">来访形式</div></div>
          <div>排查</div>
        </Col> */}
        <Col span={8}>
          <div ><div className="title-text">纠纷类型</div></div>
          <div>
            {props.data?.caseTypeFirstName ?
              `${props.data.caseTypeFirstName}/${props.data.caseTypeName}`
              : '-'
            }
          </div>
        </Col>
        <Col span={8}>
          <div ><div className="title-text">纠纷发生时间</div></div>
          <div>{props.data?.occurTime || '-'}</div>
        </Col>
        <Col span={8}>
          <div ><div className="title-text">纠纷发生地点</div></div>
          <div>{props.data?.addr || '-'}</div>
        </Col>
        <Col span={8}>
          <div ><div className="title-text">问题属地</div></div>
          <div>
            {props.data?.queAreaName ? `${props.data.queAreaName}/${props.data.queRoadName}` : '-'
            }
          </div>
        </Col>
        <Col span={8}>
          <div ><div className="title-text">涉及人数(人)</div></div>
          <div>{props.data?.peopleNum || '-'}</div>
        </Col>
        <Col span={8}>
          <div ><div className="title-text">涉及金额(元)</div></div>
          <div>{$$.thousands(props.data?.amount) || '-'}</div>
        </Col>
        <Col span={24}>
          <div className="title"><div className="title-text">事项概况</div></div>
          <div>{props.data?.caseDes || '-'} </div>
        </Col>
        <Col span={24}>
          <div className="title"><div className="title-text">事项申请</div></div>
          <div>{props.data?.caseClaim || '-'}</div>
        </Col>
        <Col span={24}>
              <div className="title"><div className="title-text">事项备注</div></div>
              <div>{props.data?.caseRemark || '-'}</div>
            </Col>
        <Col span={8}>
          <div className="title title-gap">
            {props.data?.majorStatus === 1 && <img src={majorStatus_1} alt="" srcset="" />}
            <div style={{ color: props.data?.majorStatus === 1 ? '#F53F3F' : 'inherit' }} className="title-text">是否重大矛盾纠纷</div>
          </div>
          <div>{props.data?.majorStatus === 1 ? '是' : '否'}</div>
        </Col>
        <Col span={16}>
          <div className="title title-gap">
            {props.data?.isRisk === '1' && <img src={majorStatus_1} alt="" srcset="" />}
            <div style={{ color: props.data?.isRisk === '1' ? '#F53F3F' : 'inherit' }} className="title-text">是否扬言风险纠纷</div>
          </div>
          <div>{props.data?.isRisk === '1' ? '是' : '否'}</div>
        </Col>
      </Row>
      {props.transactResult && <>
        <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '16px', marginTop: '20px' }}>
          <Space size='small'>
            <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>办理结果</h4>
          </Space>
        </Col>
        <table border="1" align="center" cellpadding="8" className="table" >
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">化解结果</th>
            <td width='380'>{props.transactResult.mediResultName || '-'}</td>
            <th bgcolor="#F7F8FA" className="table-title" width="120">经办人</th>
            <td width='380'>{props.transactResult.mediator || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title">承办部门</th>
            <td>{props.transactResult.mediateUnitName || '-'}</td>
            <th bgcolor="#F7F8FA" className="table-title">配合部门</th>
            <td>{props.transactResult.applyAssistUnitName || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">受理时间</th>
            <td width='380'>{$$.minuteFormat(props.transactResult?.acceptTime) || '-'}</td>
            <th bgcolor="#F7F8FA" className="table-title" width="120">办结时间</th>
            <td width='380'>{$$.minuteFormat(props.transactResult?.closeTime) || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
            <td width='380' colspan='3'>{props.transactResult?.windupContent || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">协议要点</th>
            <td width='380' colspan='3'>{props.transactResult?.agreeContent || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">协议履行情况</th>
            <td width='380' colspan='3'>{props.transactResult?.windupContent || '-'}</td>
          </tr>
          <tr>
            <th bgcolor="#F7F8FA" className="table-title" width="120">协议文书</th>
            <td colspan='3'>
              {props.transactResult?.fileInfoBaseDTOList?.map((item, index) => {
                console.log(item);
                return <div style={{ display: 'inline-block' }}>
                  <MyPDF key={index} name={item.name} fileUrl={item.showUrl} fileType={item.suffix} />
                  {/* <PreviewImage name={item.name} src={item.showUrl} /> */}
                  {index !== props.transactResult?.fileInfoBaseDTOList.length - 1 && <>,</>}
                </div>
              })}
            </td>
          </tr>
        </table>
      </>}
      <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px', marginTop: '20px' }}>
        <Space size='small'>
          <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>事件材料</h4>
        </Space>
      </Col>
      <FileTable mainId={props.mainId} fileInfoList={props.data?.fileInfoList} isReview={true} />
      {isOrganization && <>
        <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px', marginTop: '20px' }}>
          <Space size='small'>
            <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>调解员</h4>
          </Space>
        </Col>
        <WantUserTag name={props.data?.mediator} />
      </>
      }
    </div>
  )
}
 
export default Preview