张延森 4 年 前
コミット
0cfd9aba12
共有3 個のファイルを変更した139 個の追加9 個の削除を含む
  1. 4
    9
      src/pages/property/building/BatchImport.jsx
  2. 3
    0
      src/pages/property/proprietor/Audit.jsx
  3. 132
    0
      src/pages/property/proprietor/Notice.jsx

+ 4
- 9
src/pages/property/building/BatchImport.jsx ファイルの表示

@@ -18,15 +18,10 @@ export default props => {
18 18
   const excelRef = useRef()
19 19
 
20 20
   const downloadExcel = () => {
21
-    buildingDownloadExcel().then(res => {
22
-      const url = window.URL.createObjectURL(new Blob([res]))
23
-      const link = document.createElement('a')
24
-      link.href = url
25
-      link.setAttribute('download', '业主资料库.xlsx')
26
-      link.click()
27
-    }).catch(err => {
28
-      console.error(err)
29
-    })
21
+    const link = document.createElement('a')
22
+    link.href = "http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/%E6%A5%BC%E6%A0%8B%E5%BA%93%E6%A8%A1%E6%9D%BF.xlsx"
23
+    link.setAttribute('download', '业主资料库.xlsx')
24
+    link.click()
30 25
   }
31 26
 
32 27
   const importExcel = () => {

+ 3
- 0
src/pages/property/proprietor/Audit.jsx ファイルの表示

@@ -3,6 +3,7 @@ import { Spin, Button, Form, Input, Popconfirm,  } from 'antd'
3 3
 import { fetch, fetchList, apis } from '@/utils/request'
4 4
 import Search from '../components/Search'
5 5
 import List from '../components/List'
6
+import AuditNot from './components/AuditNot'
6 7
 
7 8
 const Condition = props => {
8 9
   return (
@@ -47,6 +48,7 @@ const userVerifyAudit = fetch(apis.propUser.userVerifyAudit)
47 48
 
48 49
 export default props => {
49 50
   const [loading, setLoading] = useState(false)
51
+  const [noPassShow, setNoPassShow] = useState(false)
50 52
   const [listData, setListData] = useState([])
51 53
 
52 54
   const handleSearch = vals => {}
@@ -96,6 +98,7 @@ export default props => {
96 98
           />
97 99
         </List>
98 100
       </Spin>
101
+      <AuditNot visible={noPassShow} onSubmit={handleSubmit} onCancel={() => setNoPassShow(false)} />
99 102
     </div>
100 103
   )
101 104
 }

+ 132
- 0
src/pages/property/proprietor/Notice.jsx ファイルの表示

@@ -0,0 +1,132 @@
1
+import React, { useState, useEffect } from 'react'
2
+import { Select, Spin, Table, Button, Form, Input } from 'antd'
3
+import NavLink from 'umi/navlink'
4
+import { fetchList, apis } from '@/utils/request'
5
+import Search from '../components/Search'
6
+import List from '../components/List'
7
+
8
+
9
+const Condition = props => {
10
+  return (
11
+    <Search
12
+      onSearch={props.onSearch}
13
+      onReset={props.onReset}
14
+      render={form => {
15
+        const { getFieldDecorator, setFieldsValue } = form
16
+        
17
+        return (
18
+          <>
19
+            <Form.Item label="公告编号">
20
+            {
21
+              getFieldDecorator('announcementNumber')(<Input placeholder="公告编号" />)
22
+            }
23
+            </Form.Item>
24
+            <Form.Item label="公告标题">
25
+            {
26
+              getFieldDecorator('announcementTitle')(<Input placeholder="公告标题" />)
27
+            }
28
+            </Form.Item>
29
+          </>
30
+        )
31
+      }}
32
+    />
33
+  )
34
+}
35
+
36
+const StatusDict = {
37
+  '0': '已作废',
38
+  '1': '已发布',
39
+  '2': '草稿'
40
+}
41
+
42
+export default props => {
43
+  const [loading, setLoading] = useState(false)
44
+  const [listData, setListData] = useState([])
45
+
46
+  const handleSearch = () => {
47
+
48
+  }
49
+
50
+  const handleDeleteRow = row => {
51
+
52
+  }
53
+
54
+  const handlePageChange = (pageNum, pageSize) => {
55
+
56
+  }
57
+
58
+  return (
59
+    <div>
60
+      <Condition onSearch={handleSearch} onReset={handleSearch} />
61
+      <div style={{ margin: '24px 0' }}>
62
+        <NavLink to={`/xxx`}>
63
+          <Button type="primary">添加</Button>
64
+        </NavLink>
65
+        <Button style={{ marginLeft: '24px' }}>修改</Button>
66
+        <Button type="danger" style={{ marginLeft: '24px' }}>修改</Button>
67
+      </div>
68
+      <Spin spinning={loading}>
69
+        <List dataSource={listData} onPageChange={handlePageChange} rowKey="id">
70
+          <Table.Column title="编号" dataIndex="id" key="id" />
71
+          <Table.Column
72
+            title="标题"
73
+            dataIndex="announcementTitle"
74
+            key="announcementTitle"
75
+            render={(_, row) => {
76
+              return (
77
+                <NavLink to={`/xxx?id=${row.id}`}>
78
+                  <Button type="link">{row.announcementTitle}</Button>
79
+                </NavLink>
80
+              )
81
+            }}
82
+          />
83
+          <Table.Column title="查看数量" dataIndex="viewCount" key="viewCount" />
84
+          <Table.Column
85
+            title="状态"
86
+            dataIndex="status"
87
+            key="status"
88
+            render={(_, row) => {
89
+              if (row.status === '1' && (row.updateDate > row.createDate)) {
90
+                return '已修改'
91
+              }
92
+
93
+              return StatusDict[row.status]
94
+            }}
95
+          />
96
+          <Table.Column title="身份" dataIndex="roleName" key="roleName" />
97
+          <Table.Column
98
+            title="审核状态"
99
+            dataIndex="verifyStatus"
100
+            key="verifyStatus"
101
+            render={(_, row) => {
102
+              return (
103
+                <span>
104
+                  {verifyStatusDict[row.verifyStatus] || ''}
105
+                </span>
106
+              )
107
+            }}
108
+          />
109
+          <Table.Column title="编辑人" dataIndex="updateName" key="updateName" />
110
+          <Table.Column title="编辑时间" dataIndex="createDate" key="createDate" />
111
+          <Table.Column
112
+            title="操作"
113
+            key="action"
114
+            render={(_, row) => {
115
+              return (
116
+                <Popconfirm
117
+                  title="确认进行删除操作?"
118
+                  onConfirm={() => handleDeleteRow(row)}
119
+                  okText="删除"
120
+                  cancelText="取消"
121
+                >
122
+                  <Button type="link">删除</Button>
123
+                </Popconfirm>
124
+              )
125
+            }}
126
+          />
127
+        </List>
128
+      </Spin>
129
+
130
+    </div>
131
+  )
132
+}