魏熙美 5 anni fa
parent
commit
d523f40466
4 ha cambiato i file con 148 aggiunte e 0 eliminazioni
  1. 11
    0
      config/routes.js
  2. 1
    0
      package.json
  3. 37
    0
      src/pages/system/document/audit.jsx
  4. 99
    0
      src/pages/system/document/list.jsx

+ 11
- 0
config/routes.js Vedi File

@@ -408,6 +408,17 @@ export default [
408 408
                 hideInMenu: true,
409 409
                 component: './system/editPolicy',
410 410
               },
411
+              {
412
+                path: '/system/document/list',
413
+                name: '客户资料',
414
+                component: './system/document/list',
415
+              },
416
+              {
417
+                path: '/system/document/audit',
418
+                name: '客户资料审核',
419
+                hideInMenu: true,
420
+                component: './system/document/audit',
421
+              },
411 422
             ],
412 423
           },
413 424
           {

+ 1
- 0
package.json Vedi File

@@ -60,6 +60,7 @@
60 60
     "react-copy-to-clipboard": "^5.0.1",
61 61
     "react-document-title": "^2.0.3",
62 62
     "react-dom": "^16.8.6",
63
+    "react-zmage": "^0.8.5",
63 64
     "redux": "^4.0.1",
64 65
     "umi": "^2.8.7",
65 66
     "umi-plugin-pro-block": "^1.3.2",

+ 37
- 0
src/pages/system/document/audit.jsx Vedi File

@@ -0,0 +1,37 @@
1
+import React from 'react'
2
+import { Button } from 'antd'
3
+import Zmage from 'react-zmage'
4
+
5
+function body(props) {
6
+  return (
7
+    <>
8
+      <Zmage
9
+        style={{ width: '300px', height: '400px' }}
10
+        src={props.src}
11
+        // alt="0"
12
+        backdrop="linear-gradient(90deg, rgba(86,81,81,0.7) 0%, rgba(86,81,81, 0.7) 100%)"
13
+        radius={5}
14
+        edge={20}
15
+        animate={{
16
+          flip: 'fade',
17
+        }}
18
+        controller={{
19
+          // 关闭按钮
20
+          close: false,
21
+          // 缩放按钮
22
+          zoom: false,
23
+          // 下载按钮
24
+          download: false,
25
+          // 旋转按钮
26
+          rotate: false,
27
+          // 翻页按钮
28
+          flip: true,
29
+          // 多页指示
30
+          pagination: true,
31
+        }}
32
+      />
33
+    </>
34
+  )
35
+}
36
+
37
+export default body

+ 99
- 0
src/pages/system/document/list.jsx Vedi File

@@ -0,0 +1,99 @@
1
+import React, { useState } from 'react'
2
+import { Table, Form, Icon, Input, Button  } from 'antd'
3
+
4
+function body(props) {
5
+  // eslint-disable-next-line react-hooks/rules-of-hooks
6
+  const [dataSource, setDataSource] = useState({ records: [] })
7
+
8
+  /**
9
+   * 提交
10
+   * @param e
11
+   */
12
+  function handleSubmit(e) {
13
+    e.preventDefault();
14
+    props.form.validateFields((err, values) => {
15
+      if (!err) {
16
+        console.log('Received values of form: ', values);
17
+      }
18
+    });
19
+  }
20
+
21
+  /**
22
+   * 翻页
23
+   * @param page
24
+   * @param pageSize
25
+   */
26
+  function onPageNum(page, pageSize) {
27
+    console.log(page, pageSize)
28
+  }
29
+
30
+  /**
31
+   * 重置
32
+   */
33
+  function handleReset(e) {
34
+    props.form.resetFields();
35
+  }
36
+
37
+  const columns = [
38
+    {
39
+      title: '姓名',
40
+      dataIndex: 'name',
41
+      key: 'name',
42
+    },
43
+    {
44
+      title: '手机号',
45
+      dataIndex: 'phone',
46
+      key: 'phone',
47
+    },
48
+    {
49
+      title: '提交时间',
50
+      dataIndex: 'createDate',
51
+      key: 'createDate',
52
+    },
53
+    {
54
+      title: '状态',
55
+      dataIndex: 'status',
56
+      key: 'status',
57
+    },
58
+    {
59
+      title: '操作',
60
+      dataIndex: 'documentVerifyId',
61
+      key: 'documentVerifyId',
62
+    },
63
+  ]
64
+
65
+  const { getFieldDecorator, getFieldsError, getFieldError, isFieldTouched } = props.form;
66
+  return (
67
+    <>
68
+      <Form layout="inline" onSubmit={handleSubmit}>
69
+        <Form.Item>
70
+          {getFieldDecorator('username')(
71
+            <Input
72
+              placeholder="用户名"
73
+            />,
74
+          )}
75
+        </Form.Item>
76
+        <Form.Item>
77
+          {getFieldDecorator('phone')(
78
+            <Input
79
+              placeholder="手机号"
80
+            />,
81
+          )}
82
+        </Form.Item>
83
+        <Form.Item>
84
+          <Button type="primary" htmlType="submit">
85
+            查询
86
+          </Button>
87
+          &nbsp;&nbsp;&nbsp;&nbsp;
88
+          <Button onClick={(e) => handleReset(e)}>
89
+            清空
90
+          </Button>
91
+        </Form.Item>
92
+      </Form>
93
+      <Table dataSource={dataSource.records} pagination={{ total: dataSource.total, pageSize: dataSource.pageSize, onChange: (page, pageSize) => onPageNum(page, pageSize), defaultCurrent: 1 }} columns={columns} />
94
+    </>
95
+  )
96
+}
97
+
98
+const WrappedbodyForm = Form.create({ name: 'body' })(body)
99
+export default WrappedbodyForm