forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-08 2127fb90182bf9f8b767369678f5b7e2c46b2228
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
import React, { useState, useRef } from 'react'
import TableSearch from '@/components/TableSearch';
import TableView from '@/components/TableView';
import { Row, Col } from 'antd';
import { Form, Input, Button, Divider } from '@arco-design/web-react';
 
const FormItem = Form.Item;
const formItemLayout = {
  labelCol: {
    span: 4,
  },
  wrapperCol: {
    span: 17,
  },
};
 
export default function SelectUnitDialog(props) {
  const formRef = useRef();
  const [search, setSearch] = useState({ page: 1, size: 10, status: '1' });// 搜索
  // 数据
  const [data, setData] = useState({});
 
  const fakeData1 = [
    {
      id: 1,
      caseNo: 'A20230101',
      judicNo: 'J20230101',
      perClassName: '自然人',
      inputUserName: '张三',
      mediateUserName: '李四',
      judgeName: '王五',
      mediator: '赵六',
      handlerUserName: '钱七',
      returnUserName: '孙八',
      expireTime: '2023-08-10T08:00:00.000Z',
      processName: '进行中',
      otherMediator: '周九',
      canalName: '网络',
      judicResult: '通过',
      assistName: '吴十',
      mediTypeName: '民事调解',
      serieStatus: '1', // 1 表示非系列案,2 表示系列案
      // 更多字段...
    },
    // 更多数据...
  ];
 
  // 列配置
  const fakeColumns = [
    {
      title: '序号',
      dataIndex: 'caseNo',
      key: 'caseNo',
      render: (text, record, index) => <span>{index + 1}</span>,
    },
    {
      title: '材料类型',
      dataIndex: 'judicNo',
      key: 'judicNo',
    },
    {
      title: '材料数量',
      dataIndex: 'perClassName',
      key: 'perClassName',
    },
    {
      title: '材料名称',
      dataIndex: 'perClassName',
      key: 'perClassName',
    },
    {
      title: '上传时间',
      dataIndex: 'perClassName',
      key: 'perClassName',
    },
    {
      title: '操作',
      dataIndex: 'perClassName',
      key: 'perClassName',
      width: 120,
      render: (text) => (
        <div style={{ display: 'flex', color: '#1A6FB8', gap: '16px' }}>
          <div>选择</div>
        </div>
      )
    },
    // 更多列配置...
  ];
 
  // 搜索 or 重置
  function handleSearch(type, data) {
    if (type === 'changePage') {
      let obj = type === 'changeTabs' ? { page: 1, status: data } : { page: data[0], size: data[1] };
      // getSignForListData({ ...search, ...obj });
    }
  }
 
  return (
    <div>
      <Form
        ref={formRef}
        requiredSymbol={false}
        layout='inline'
        {...formItemLayout}
      >
        <FormItem
          label='单位名称:'
          field='name'
        >
          <Input placeholder='请填写' style={{width: '500px'}}/>
        </FormItem>
        <Button style={{marginRight: '20px'}}>
          重置
        </Button>
        <Button
          type="primary"
          // onClick={handleSave}
        >
          查询
        </Button>
      </Form>
      <Divider />
      <div className='unitDialogResult'>
        查询结果
      </div>
      <TableView
        columns={fakeColumns}
        dataSource={fakeData1}
        size="small"
        rowKey="id"
        bordered={true}
        style={{ marginBottom: '60px' }}
        pagination={{
          current: search.page,
          pageSize: search.size,
          total: data.total,
          onChange: (page, pageSize) => handleSearch('changePage', [page, pageSize]),
        }}
      />
    </div>
  )
}