广州市综治平台前端
xusd
7 days ago 544148eddae96db824423cd059ebecb9d13c392e
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
import React, { useState, useEffect } from 'react';
import { Row, Col, Space, Typography } from 'antd';
import { Modal, Divider } from '@arco-design/web-react';
import * as $$ from '../../../utils/utility';
import PreviewImage from '@/components/PreviewImage';
import NameCard2 from '../../../components/NameCard2';
import { judicial_3 } from '@/assets/images';
import MyPDF from '../../../components/MyPDF';
import { judicial_7 } from '../../../assets/images';
 
// 司法确认详情接口
function getJudicInfoApi(submitData) {
    return $$.ax.request({ url: '/judicInfo/getJudicCaseInfo', type: 'get', data: submitData, service: 'mediate' });
}
 
function getVideoApi(caseId) {
    return $$.ax.request({ url: `meetJudic/getVideo?caseId=${caseId}`, type: 'get', service: 'mediate' });
}
 
//会议查询
function getMeetInfoApi(data) {
    return $$.ax.request({ url: `meetJudic/getMeetInfo`, type: 'get', service: 'mediate', data });
}
 
const { Paragraph, Link, Text } = Typography;
const Judicial = (props) => {
    const [data, setData] = useState({});
    const [videoList, setVideoList] = useState([]);
    // 预添加预约
    const [preBookData, setPreBookData] = useState({});
    const [radioVisible, setRadioVisible] = useState(false);
 
    function checkTimeRange(startTime, endTime, currentTime) {
        if (currentTime < new Date(startTime)) {
            return <div className="public-color">未开始</div>; // 当前时间在时间范围之前
        } else if (currentTime >= new Date(startTime) && currentTime <= new Date(endTime)) {
            return <div style={{ color: '#EF6C24' }}>进行中</div>; // 当前时间在时间范围内
        } else {
            return <div className="public-orange">已结束</div>; // 当前时间在时间范围之后
        }
    }
    // 初始化附件回显
    async function getJudicialApply(id) {
        global.setSpinning(true);
        const res = await getJudicInfoApi({ caseId: id });
        global.setSpinning(false);
        if (res.type) {
            setData(res.data);
        }
    }
 
    // 获取预约调解记录
    async function getMeetInfo(id) {
        global.setSpinning(true);
        const res = await getMeetInfoApi({ caseId: id });
        global.setSpinning(false);
        if (res.type) {
            let list = res.data || [];
            if (list?.length > 0) {
                setPreBookData(list[0]);
            }
        }
    }
 
    const getVideo = async (id) => {
        const res = await getVideoApi(id);
        if (res.type) {
            if (res.data) {
                setVideoList(res.data || []);
            } else {
                setVideoList(null);
            }
        }
    };
 
    useEffect(() => {
        getJudicialApply(props.caseId);
        getMeetInfo(props.caseId);
        getVideo(props.caseId);
    }, []);
 
    return (
        <div style={{ ...props.style, position: 'relative' }}>
            <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>
            <table border="1" align="center" cellpadding="8" className="table">
                <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">
                        司法确认结果
                    </th>
                    <td width="380" style={{ color: data?.judicResult == '22_00028-1' ? '#00b42a' : '#f53f3f' }}>
                        {data?.judicResult == '22_00028-1' ? '已达成' : data?.judicResult == '22_00028-2' ? '未达成' : '-'}
                    </td>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">
                        预约信息
                    </th>
                    <td width="380">
                        {preBookData?.orderStartTime ? (
                            <span
                                className="public-a public-color"
                                onClick={() => {
                                    setRadioVisible(true);
                                }}
                            >
                                点击查看
                            </span>
                        ) : (
                            '-'
                        )}
                    </td>
                </tr>
                <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">
                        司法确认部门
                    </th>
                    <td width="380">{data?.courtName || '-'}</td>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">
                        结案时间
                    </th>
                    <td width="380">{$$.minuteFormat(data?.judicEndTime)}</td>
                </tr>
                <tr>
                    <th bgcolor="#F7F8FA" className="table-title">
                        承办法官
                    </th>
                    <td width="380">
                        <div className="public-infoSubTitle">
                            <NameCard2 name={data.judgeName} userId={data.judgeNameId || ''} />
                        </div>
                    </td>
                    <th bgcolor="#F7F8FA" className="table-title">
                        助理/书记员
                    </th>
                    <td width="380">
                        <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap' }} className="public-infoSubTitle">
                            {data?.judicAssistList?.map((i) => (
                                <NameCard2 name={i.assUserName} userId={i.assUserId} />
                            ))}
                        </div>
                    </td>
                </tr>
                {data?.judicResult == '22_00028-1' && (
                    <tr>
                        <th bgcolor="#F7F8FA" className="table-title">
                            司法确认案号
                        </th>
                        <td width="380">{data?.judicNo || '-'}</td>
                        <th bgcolor="#F7F8FA" className="table-title">
                            诉前调确号
                        </th>
                        <td width="380">{data?.mediateJudicNo || '-'}</td>
                    </tr>
                )}
                <tr>
                    <th bgcolor="#F7F8FA" className="table-title">
                        申请时间
                    </th>
                    <td width="380">{$$.minuteFormat(data?.applyTime)}</td>
                    <th bgcolor="#F7F8FA" className="table-title">
                        申请部门
                    </th>
                    <td width="380">{data?.applyUnitName || '-'}</td>
                </tr>
                {data?.judicResult == '22_00028-1' && (
                    <>
                        <tr>
                            <th bgcolor="#F7F8FA" className="table-title">
                                裁定文书
                            </th>
                            <td width="380" colspan="3">
                                {data?.fileList?.find((i) => i.ownerType === '22_00018-405')?.fileList?.length ? (
                                    data?.fileList
                                        ?.find((i) => i.ownerType === '22_00018-405')
                                        ?.fileList?.map((item, index) => {
                                            return (
                                                <>
                                                    <MyPDF key={index} name={item.name} fileUrl={item.showUrl} fileType={item.suffix} />
                                                </>
                                            );
                                        })
                                ) : (
                                    <div className="public-infoSubTitle">-</div>
                                )}
                            </td>
                        </tr>
                        <tr>
                            <th bgcolor="#F7F8FA" className="table-title">
                                询问笔录
                            </th>
                            <td width="380" colspan="3">
                                {data?.fileList?.find((i) => i.ownerType === '22_00018-401')?.fileList?.length ? (
                                    data?.fileList
                                        ?.find((i) => i.ownerType === '22_00018-401')
                                        ?.fileList?.map((item, index) => {
                                            return (
                                                <>
                                                    <MyPDF key={index} name={item.name} fileUrl={item.showUrl} fileType={item.suffix} />
                                                </>
                                            );
                                        })
                                ) : (
                                    <div className="public-infoSubTitle">-</div>
                                )}
                            </td>
                        </tr>
                        <tr>
                            <th bgcolor="#F7F8FA" className="table-title">
                                送达地址确认书
                            </th>
                            <td width="380" colspan="3">
                                {data?.fileList?.find((i) => i.ownerType === '22_00018-108')?.fileList?.length ? (
                                    data?.fileList
                                        ?.find((i) => i.ownerType === '22_00018-108')
                                        ?.fileList?.map((item, index) => {
                                            return (
                                                <>
                                                    <MyPDF key={index} name={item.name} fileUrl={item.showUrl} fileType={item.suffix} />
                                                </>
                                            );
                                        })
                                ) : (
                                    <div className="public-infoSubTitle">-</div>
                                )}
                            </td>
                        </tr>
                        {videoList?.length > 0 && (
                            <tr>
                                <th bgcolor="#F7F8FA" className="table-title" width="120">
                                    司法确认视频
                                </th>
                                <td colspan="3">
                                    {videoList?.map((item, index) => {
                                        return (
                                            <div key={'video' + index} style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
                                                <img src={judicial_7} alt="" srcset="" />
                                                <Link
                                                    onClick={() => {
                                                        window.open(item.playUrl);
                                                    }}
                                                >
                                                    {item.videoName}
                                                </Link>
                                            </div>
                                        );
                                    })}
                                </td>
                            </tr>
                        )}
                        <tr>
                            <th bgcolor="#F7F8FA" className="table-title">
                                结案说明
                            </th>
                            <td width="380" colspan="3">
                                {data?.judicContent || '-'}
                            </td>
                        </tr>
                    </>
                )}
                {data?.judicResult == '22_00028-2' && (
                    <tr>
                        <th bgcolor="#F7F8FA" className="table-title">
                            未达成原因
                        </th>
                        <td width="380" colspan="3">
                            {data?.judicFalseCause || '-'}
                        </td>
                    </tr>
                )}
            </table>
            <Modal
                title="预约信息"
                style={{ width: '40%' }}
                className="judicial-handle-modal"
                onCancel={() => setRadioVisible(false)}
                visible={radioVisible}
                footer={null}
            >
                <div style={{ marginBottom: '0' }} className="judicial-item-content">
                    <div className="judicial-item-content-left">
                        {/* <div className='judicial-item-content-left-del public-a'><img src={judicial_3} alt="" srcset="" /></div> */}
                        <div className="judicial-item-content-left-t">
                            <div className="judicial-item-content-left-t-l">
                                <div className="judicial-item-content-left-bigTitle public-color">{$$.myTimeFormat(preBookData?.orderStartTime, 'HH:mm')}</div>
                                <div className="public-color">{$$.myTimeFormat(preBookData?.orderStartTime, 'YYYY年MM月DD日')}</div>
                            </div>
                            <div className="judicial-item-content-left-t-l">
                                <Space size="small">
                                    <div className="judicial-item-content-left-inline"></div>
                                    <div style={{ display: 'flex', flexDirection: 'column', gap: '4px', alignItems: 'center', justifyContent: 'center' }}>
                                        {checkTimeRange(preBookData?.orderStartTime, preBookData?.orderEndTime, new Date())}
                                        <div className="public-color judicial-item-content-left-time">
                                            {$$.calculateTimeDifference(preBookData?.orderStartTime, preBookData?.orderEndTime)}
                                        </div>
                                    </div>
                                    <div className="judicial-item-content-left-inline"></div>
                                </Space>
                            </div>
                            <div className="judicial-item-content-left-t-l">
                                <div className="judicial-item-content-left-bigTitle public-color">{$$.myTimeFormat(preBookData?.orderEndTime, 'HH:mm')}</div>
                                <div className="public-color">{$$.myTimeFormat(preBookData?.orderEndTime, 'YYYY年MM月DD日')}</div>
                            </div>
                        </div>
                        <Divider />
                        <div className="judicial-item-content-left-c-flex">
                            <div className="judicial-item-content-left-c">
                                <div className="judicial-item-content-left-c-title">司法确认方式</div>
                                <div className="judicial-item-content-left-c-content">{preBookData?.meetWayName || '-'}</div>
                            </div>
                            <div className="judicial-item-content-left-c">
                                <div className="judicial-item-content-left-c-title">远程视频司法确认号</div>
                                <div className="judicial-item-content-left-c-content">
                                    <span style={{ fontSize: '16px', lineHeight: '24px' }}>{preBookData?.roomNo || '-'}</span>&nbsp;&nbsp;
                                    {preBookData?.roomNo && (
                                        <span
                                            onClick={() => {
                                                navigator.clipboard
                                                    .writeText(preBookData?.roomNo)
                                                    .then(() => {
                                                        $$.infoSuccess({ content: '复制成功' });
                                                    })
                                                    .catch((err) => {
                                                        $$.catchApiError('复制失败', err);
                                                    });
                                            }}
                                            className="public-color public-a"
                                        >
                                            复制
                                        </span>
                                    )}
                                </div>
                            </div>
                            <div className="judicial-item-content-left-c">
                                <div className="judicial-item-content-left-c-title">司法确认地点</div>
                                <div className="judicial-item-content-left-c-content">{preBookData?.meetAddr || '-'}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </Modal>
        </div>
    );
};
 
export default Judicial;