Browse Source

修复bug

魏熙美 5 years ago
parent
commit
695547497d

+ 1
- 1
src/pages/building/list/add/components/base.jsx View File

188
               <TagGroup />,
188
               <TagGroup />,
189
             )}
189
             )}
190
           </Form.Item>
190
           </Form.Item>
191
-          <Form.Item label="周边交通" hasFeedback>
191
+          <Form.Item label="周边商业" hasFeedback>
192
             {getFieldDecorator('buildingMall')(
192
             {getFieldDecorator('buildingMall')(
193
               <TagGroup />,
193
               <TagGroup />,
194
             )}
194
             )}

+ 11
- 0
src/pages/building/list/index.jsx View File

228
     router.push({ pathname: '/building/list/add' })
228
     router.push({ pathname: '/building/list/add' })
229
   }
229
   }
230
 
230
 
231
+  /**
232
+   * 重置搜索
233
+   */
234
+  function handleReset() {
235
+    props.form.resetFields();
236
+  }
237
+
238
+
231
   return (
239
   return (
232
     <>
240
     <>
233
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
241
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
285
             <Button type="primary" htmlType="submit">
293
             <Button type="primary" htmlType="submit">
286
               搜索
294
               搜索
287
             </Button>
295
             </Button>
296
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
297
+              重置
298
+            </Button>
288
         </Form.Item>
299
         </Form.Item>
289
       </Form>
300
       </Form>
290
 
301
 

+ 11
- 17
src/pages/building/type/index.jsx View File

6
 import request from '../../../utils/request';
6
 import request from '../../../utils/request';
7
 import apis from '../../../services/apis';
7
 import apis from '../../../services/apis';
8
 import AuthButton from '@/components/AuthButton';
8
 import AuthButton from '@/components/AuthButton';
9
+import { debuglog } from 'util';
9
 
10
 
10
 function body() {
11
 function body() {
11
   // eslint-disable-next-line react-hooks/rules-of-hooks
12
   // eslint-disable-next-line react-hooks/rules-of-hooks
51
     getList({ pageNum: 1, pageSize: 10 })
52
     getList({ pageNum: 1, pageSize: 10 })
52
   }, [])
53
   }, [])
53
 
54
 
54
-  function getList(params) {
55
-    request({ ...apis.buildingType.getList, params: { ...params } }).then(res => {
56
-      setData(res)
57
-    }).catch(err => {
58
-      // eslint-disable-next-line no-unused-expressions
59
-      <Alert
60
-        style={{
61
-          marginBottom: 24,
62
-        }}
63
-        message={err}
64
-        type="error"
65
-        showIcon
66
-      />
67
-    })
68
-  }
69
-
70
   const openNotificationWithIcon = (type, message) => {
55
   const openNotificationWithIcon = (type, message) => {
71
     notification[type]({
56
     notification[type]({
72
       message,
57
       message,
75
     });
60
     });
76
   }
61
   }
77
 
62
 
63
+  function getList(params) {
64
+    request({ ...apis.buildingType.getList, params: { ...params } }).then(res => {
65
+      setData(res)
66
+    }).catch(err => {
67
+      // eslint-disable-next-line no-unused-expressions
68
+      openNotificationWithIcon('error', err)
69
+    })
70
+  }
71
+
78
   // 分页
72
   // 分页
79
   function onChange(pageNumber) {
73
   function onChange(pageNumber) {
80
     // eslint-disable-next-line no-console
74
     // eslint-disable-next-line no-console
90
     }).then(() => {
84
     }).then(() => {
91
       openNotificationWithIcon('success', '操作成功')
85
       openNotificationWithIcon('success', '操作成功')
92
     }).catch(err => {
86
     }).catch(err => {
93
-      openNotificationWithIcon('error', err)
87
+      //openNotificationWithIcon('error', err.message)
94
     })
88
     })
95
   }
89
   }
96
 
90
 

+ 2
- 2
src/pages/customer/report/index.jsx View File

152
         </Form.Item>
152
         </Form.Item>
153
         <Form.Item>
153
         <Form.Item>
154
           {getFieldDecorator('consultName')(
154
           {getFieldDecorator('consultName')(
155
-            <Input placeholder="推荐人" />,
155
+            <Input placeholder="置业顾问" />,
156
           )}
156
           )}
157
         </Form.Item>
157
         </Form.Item>
158
         <Form.Item>
158
         <Form.Item>
159
           {getFieldDecorator('consultTel')(
159
           {getFieldDecorator('consultTel')(
160
-            <Input placeholder="推荐电话" />,
160
+            <Input placeholder="置业顾问电话" />,
161
           )}
161
           )}
162
         </Form.Item>
162
         </Form.Item>
163
         <Form.Item>
163
         <Form.Item>