forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-09 47e16d0a56559916c5fb9c4de08838e7a1d457d8
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
import React, { useState } from 'react';
import TableView from '@/components/TableView';
import { Modal } from '@arco-design/web-react';
 
 
const ModeSelect = ({ mode, onCancel }) => {
  const [modeDetail, setModeDetail] = useState(false);
 
  const fakeColumns = [
    {
      title: '序号',
      dataIndex: 'caseNo',
      key: 'caseNo',
      width: 51,
      render: (text, record, index) => <span>{index + 1}</span>,
    },
    {
      title: '类型',
      dataIndex: 'judicNo',
      key: 'judicNo',
      width: 85,
 
    },
    {
      title: '模板名称',
      dataIndex: 'inputUserName',
      key: 'perClassName',
      width: 160,
      render: (text) => (
        <>
          {text}
          {/* {sourceType === '1' ? matterNumber : sourceType === '2' ? evidenceNumber : 0}份 */}
        </>
      )
 
 
    },
    {
      title: '模板内容',
      dataIndex: 'perClassName',
      key: 'perClassName',
      width: 400,
      render: (text) => (
        <div style={{}}>
          <div style={{ width: '300px', height: '110px', overflow: 'hidden', display: 'flex', whiteSpace: 'pre-line' }}>{text}</div>
          <div style={{ color: '#1A6FB8', marginTop: '4px' }} onClick={() => setModeDetail(true)}>...查看更多</div>
        </div>
      )
 
    },
    {
      title: '操作',
      dataIndex: 'perClassName',
      key: 'perClassName',
      width: 53,
      render: (text) => (
        <div style={{ color: '#1A6FB8' }}>使用</div>
      )
    },
    // 更多列配置...
  ];
 
  const fakeData1 = [
    {
      id: 1,
      caseNo: 'A20230101',
      judicNo: '公共模板',
      perClassName: '鉴于本事项的重要性及紧迫性,现要求你尽快启动调解程序[事项1......][事项2......]',
      inputUserName: '尽快启动调解程序督办',
      mediateUserName: '2024-7-12 12:00',
      judgeName: '王五',
      mediator: '赵六',
      handlerUserName: '钱七',
      returnUserName: '孙八',
      expireTime: '2023-08-10T08:00:00.000Z',
      processName: '进行中',
      otherMediator: '周九',
      canalName: '网络',
      judicResult: '通过',
      assistName: '吴十',
      mediTypeName: '民事调解',
      serieStatus: '1', // 1 表示非系列案,2 表示系列案
      // 更多字段...
    },
    {
      id: 2,
      caseNo: 'A20230101',
      judicNo: '个人模板',
      perClassName: '鉴于本事项的重要性及紧迫性,现要求你尽快启动调解程序[事项1......][事项2......]',
      inputUserName: '尽快启动调解程序督办',
      mediateUserName: '2024-7-12 12:00',
      judgeName: '王五',
      mediator: '赵六',
      handlerUserName: '钱七',
      returnUserName: '孙八',
      expireTime: '2023-08-10T08:00:00.000Z',
      processName: '进行中',
      otherMediator: '周九',
      canalName: '网络',
      judicResult: '通过',
      assistName: '吴十',
      mediTypeName: '民事调解',
      serieStatus: '1', // 1 表示非系列案,2 表示系列案
      // 更多字段...
    },
 
    // 更多数据...
  ];
 
  const handleUse = () => {
    setModeDetail(!modeDetail)
  }
 
  return (
    <>
      <Modal visible={mode} onCancel={onCancel} title='选择模板' centered footer={null}>
        <TableView
          columns={fakeColumns}
          dataSource={fakeData1}
          size="small"
          rowKey="id"
          bordered={true}
          style={{}}
        />
      </Modal>
      <Modal simple={true} visible={modeDetail} cancelText='关闭' okText='使用' onOk={() => handleUse()} onCancel={() => setModeDetail(!modeDetail)} style={{ width: '400px', borderRadius: ' 4px' }}>
        <div className='modal'>
          <div className='modal-mark'>模板</div>
          <div className='modal-title'>尽快启动调解程序督办</div>
        </div>
        <div style={{ marginBottom: '-16px' }}>
          鉴于本事项的重要性及紧迫性,现要求你尽快启动调解程序,并确保案件能够得到及时有效的处理。请您务必于本周内完成以下
          事项:<br />
          [事项1......]<br />
          [事项2......]<br />
          [事项3......]<br />
          请确保在事项办理的过程中,遵循公平、公正的原则,并积极促进双方达成共识。
        </div>
      </Modal>
 
    </>
  )
}
 
export default ModeSelect;