广州市综治平台前端
xusd
21 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
import React, { useState, useEffect } from 'react';
import { Row, Col, Typography, Tooltip } from 'antd';
import FilesTable from '../../components/FilesTable';
import PartyMsgTable from '../../components/PartyMsgTable';
import PartyCheck from '../../components/PartyCheck';
import MyDrawer from '../../components/MyDrawer';
import * as $$ from '../../utils/utility';
import CaseFolderCheck from '../../components/CaseFolderCheck';
 
const { Paragraph } = Typography;
 
// 根据调解案号获取纠纷登记信息
function getCaseDataApi(submitData) {
  return $$.ax.request({ url: `caseInfo/getCaseInfo?id=${submitData}`, type: 'get', service: 'mediate' });
}
 
// 案件信息
// isModal: 在modal内展示
const DisputeCheck = ({ data = {}, isModal }) => {
  // 当事人信息Drawer
  const [partyDrawer, setPartyDrawer] = useState({ type: '', visible: false, data: {} });
 
  // 查看当事人信息
  function handleCheckParty({ type, values }) {
    setPartyDrawer({ type, visible: true, data: values });
  }
 
  const msg = [
    { title: '调解案号', key: 'caseNo', span: 24 },
    { title: '纠纷发生时间', content: $$.dateFormat(data.occurTime) },
    { title: '申请调解时间', content: $$.dateFormat(data.createTime) },
    { title: '调解类型', key: 'mediTypeName' },
    { title: '登记人', key: 'inputUserName' },
    { title: '纠纷类型', key: 'caseTypeName' },
    {
      title: '纠纷来源',
      content: (
        <>
          <span>{data['sourceName'] || '-'}</span>
          <span className="public-rightBorder">{data['canalName'] || '-'}</span>
        </>
      ),
    },
    {
      title: '涉及人数',
      
      content: (
        <>
          <span>{data['peopleNum'] || '-'}</span>
          <span className="public-rightBorder">{data['crowdName'] || '-'}</span>
        </>
      ),
    },
    { title: '涉及金额', content: `${data.amount || 0}万元` },
    {
      title: '纠纷发生地',
      content: ['provName', 'cityName', 'areaName', 'roadName', 'villageName'].map((x) => {
        return `${data[x] || ''}`;
      }),
      tooltip: ['provName', 'cityName', 'areaName', 'roadName', 'villageName'].map((x) => {
        return `${data[x] || ''}`;
      }),
    },
    { title: '纠纷发生地详细地址', key: 'addr' },
    { title: '意向调解组织', key: 'wantUnitName' },
    { title: '意向调解员', key: 'wantUserName' },
    { title: '纠纷描述', key: 'caseDes', span: 24 },
    { title: '调解请求', key: 'caseClaim', span: 24 },
  ];
 
  return (
    <>
      <div className="disputeMsg">
        <Row gutter={[16, 12]}>
          <Col span={24}>
            <h5>案情描述</h5>
          </Col>
          {msg.map((x, t) => {
            return (
              <Col span={x.span || 6} key={t} style={{ display: 'flex' }}>
                <div>{x.title}:</div>
                <Paragraph
                  className="caseDetail-paragraph"
                  ellipsis={{
                    expandable: x.span === 24 ? true : null,
                    tooltip: x.span === 24 ? false : x.tooltip || data[x.key],
                    rows: x.span === 24 ? 2 : 1,
                  }}
                >
                  {x.content || data[x.key] || '-'}
                </Paragraph>
              </Col>
            );
          })}
          <Col span={24}>
            <div className="caseDetail-divider" />
          </Col>
          <Col span={24}>
            <h5>案件材料</h5>
          </Col>
          <Col span={24}>
            <FilesTable isCheck={true} data={data.fileInfoList || []} />
          </Col>
          <Col span={24}>
            <div className="caseDetail-divider" />
          </Col>
          <Col span={24}>
            <h5>申请人信息</h5>
          </Col>
          <Col span={24}>
            <PartyMsgTable partyType="applicant" data={data?.personList?.filter(i=>i.perType==='15_020008-1') || []} handleCheckParty={handleCheckParty} isCheck={true} />
          </Col>
          <Col span={24}>
            <div className="caseDetail-divider" />
          </Col>
          <Col span={24}>
            <h5>被申请人信息</h5>
          </Col>
          <Col span={24}>
            <PartyMsgTable partyType="respondent" data={data?.personList?.filter(i=>i.perType==='15_020008-2') || []} handleCheckParty={handleCheckParty} isCheck={true} />
          </Col>
        </Row>
      </div>
      {/* 当事人详情查看 */}
      <MyDrawer
        title={partyDrawer.type === 'applicant' ? '申请人' : '被申请人'}
        visible={partyDrawer.visible}
        style={{ position: 'absolute' }}
        onClose={() => setPartyDrawer({ visible: false })}
        container={isModal}
        zIndex={isModal ? 1001 : 1000}
      >
        <PartyCheck data={partyDrawer.data} />
      </MyDrawer>
    </>
  );
};
 
const DisputeMsg = ({ caseId, isModal }) => {
  const [data, setData] = useState({});
 
  useEffect(() => {
    // 获取已经提交过的案件
    async function getCaseData(caseId) {
      global.setSpinning(true);
      const res = await getCaseDataApi(caseId);
      global.setSpinning(false);
      if (res.type) {
        setData(res.data || {});
      }
    }
    getCaseData(caseId);
  }, [caseId]);
 
  return (
    <>
      {data.serieStatus === '2' ? (
        <CaseFolderCheck caseData={data.content || []} childrenDom={(x) => <DisputeCheck data={x} isModal={isModal} />} />
      ) : (
        <DisputeCheck data={data} isModal={isModal} />
      )}
    </>
  );
};
 
export default DisputeMsg;