Browse Source

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager

魏熙美 5 years ago
parent
commit
64d89a17a1

+ 2
- 2
src/global.less View File

108
   padding: 0;
108
   padding: 0;
109
 }
109
 }
110
 .antd-pro-pages-index-echarts-styles-pie,.antd-pro-pages-index-echarts-styles-bar{
110
 .antd-pro-pages-index-echarts-styles-pie,.antd-pro-pages-index-echarts-styles-bar{
111
-  padding: 26px;
112
-  margin-bottom: 25px;
111
+  padding: 40px;
112
+  margin-bottom: 40px;
113
 }
113
 }
114
 .ant-breadcrumb{
114
 .ant-breadcrumb{
115
   font-size: 0.1rem;
115
   font-size: 0.1rem;

+ 42
- 47
src/pages/Welcome.jsx View File

7
 import request from '../utils/request';
7
 import request from '../utils/request';
8
 import apis from '../services/apis';
8
 import apis from '../services/apis';
9
 
9
 
10
-const header = props => {
10
+const welcome = (props) => {
11
 
11
 
12
- const [data, setData] = useState([])
12
+  const [data, setData] = useState([])
13
 
13
 
14
-useEffect(() => {
15
-  getIndexEcharts()
16
-}, [])
17
-
18
-function getIndexEcharts (params) {
19
-  request({
20
-    ...apis.indexEcharts.list,
21
-    params
22
-  }).then((data) => {
23
-   setData(data)
24
-    console.log(data, '11111')
25
-  })
26
-}
27
-  
14
+  useEffect(() => {
15
+    getIndexEcharts()
16
+  }, [])
28
 
17
 
18
+  function getIndexEcharts(params) {
19
+    request({
20
+      ...apis.indexEcharts.list,
21
+      params
22
+    }).then((data) => {
23
+      setData(data)
24
+      console.log(data, '11111')
25
+    })
26
+  }
29
   return (
27
   return (
30
     <>
28
     <>
31
-       <div style={{ display: 'flex',marginBottom:'28px' }}>
32
-           <div style={{
33
-            textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(241,43,62,1) 0%,rgba(254,144,155,1) 100%)', height: '100px',
34
-            boxShadow: '0px  0.11rem 14px -15px rgba(241,43,62,1)',
35
-            borderRadius: '12px', width: '32%', marginRight: '2%'
36
-          }}>
37
-            <span style={{ fontSize: '24px', color: '#fff' }}>总用户 </span>
38
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectUserCount}</span>
39
-          </div>
40
-          <div style={{
41
-            textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
42
-            boxShadow: '0px  0.11rem 14px -15px rgba(255,126,74,1)',
43
-            borderRadius: '12px', width: '32%', marginRight: '2%'
44
-          }}>
45
-            <span style={{ fontSize: '24px', color: '#fff' }}>总注册用户 </span>
46
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount}</span>
47
-          </div>
48
-          <div onClick={()=>router.push('/indexEcharts/newUsers')} style={{
49
-            textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
50
-            boxShadow: '0px  0.11rem 14px -15px rgba(107,130,230,1)',
51
-            borderRadius: '12px', width: '32%',
52
-          }}>
53
-            <span style={{ fontSize: '24px', color: '#fff',borderBottom:'1px solid #fff',margin:'30px 0' }}>最近7天新增 </span>
54
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy', lineHeight: '100px' }}>{data.selectRecentlyCount}</span>
55
-          </div>
29
+      <div style={{ display: 'flex', marginBottom: '33px' }}>
30
+        <div style={{
31
+          textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(241,43,62,1) 0%,rgba(254,144,155,1) 100%)', height: '100px',
32
+          boxShadow: '0px  0.11rem 14px -15px rgba(241,43,62,1)',
33
+          borderRadius: '12px', width: '32%', marginRight: '2%'
34
+        }}>
35
+          <span style={{ fontSize: '24px', color: '#fff' }}>总用户 </span>
36
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectUserCount || '0'}</span>
37
+        </div>
38
+        <div style={{
39
+          textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
40
+          boxShadow: '0px  0.11rem 14px -15px rgba(255,126,74,1)',
41
+          borderRadius: '12px', width: '32%', marginRight: '2%'
42
+        }}>
43
+          <span style={{ fontSize: '24px', color: '#fff' }}>总注册用户 </span>
44
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount || '0'}</span>
45
+        </div>
46
+        <div onClick={() => router.push('/indexEcharts/newUsers')} style={{
47
+          textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
48
+          boxShadow: '0px  0.11rem 14px -15px rgba(107,130,230,1)',
49
+          borderRadius: '12px', width: '32%',
50
+        }}>
51
+          <span style={{ fontSize: '24px', color: '#fff', borderBottom: '1px solid #fff', margin: '30px 0' }}>最近7天新增 </span>
52
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy', lineHeight: '100px' }}>{data.selectRecentlyCount || '0'}</span>
56
         </div>
53
         </div>
57
-        <IndexEcharts style={{ width: '100%'}} onReData={(e) => redata(e)} ></IndexEcharts>
58
-    
59
-        {/* <EchartsTest style={{ width: 500, height: 500 }}></EchartsTest> */}
60
-    
61
-      </>
54
+      </div>
55
+      <IndexEcharts style={{ width: '100%' }} onReData={(e) => redata(e)} ></IndexEcharts>
56
+    </>
62
   )
57
   )
63
 
58
 
64
 }
59
 }
60
+export default welcome
65
 
61
 
66
-export default  header

+ 9
- 0
src/pages/activity/ActivityList.jsx View File

202
     });
202
     });
203
   }
203
   }
204
 
204
 
205
+   //重置搜索
206
+   function handleReset() {
207
+    props.form.resetFields();
208
+  }
209
+
210
+
205
   const { getFieldDecorator } = props.form
211
   const { getFieldDecorator } = props.form
206
   return (
212
   return (
207
 
213
 
242
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
248
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
243
             搜索
249
             搜索
244
           </Button>
250
           </Button>
251
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
252
+              重置
253
+            </Button>
245
         </Form.Item>
254
         </Form.Item>
246
       </Form>
255
       </Form>
247
       <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
256
       <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>

+ 9
- 0
src/pages/carouselFigure/advertisingList.jsx View File

164
     });
164
     });
165
   }
165
   }
166
 
166
 
167
+   //重置搜索
168
+   function handleReset() {
169
+    props.form.resetFields();
170
+  }
171
+
172
+
167
   const { getFieldDecorator } = props.form
173
   const { getFieldDecorator } = props.form
168
   return (
174
   return (
169
 
175
 
204
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
210
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
205
             搜索
211
             搜索
206
           </Button>
212
           </Button>
213
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
214
+              重置
215
+            </Button>
207
         </Form.Item>
216
         </Form.Item>
208
       </Form>
217
       </Form>
209
       <AuthButton name="admin.extendContent.post" noRight={null}>
218
       <AuthButton name="admin.extendContent.post" noRight={null}>

+ 8
- 0
src/pages/carouselFigure/carouselFigureList.jsx View File

164
     });
164
     });
165
   }
165
   }
166
 
166
 
167
+   //重置搜索
168
+   function handleReset() {
169
+    props.form.resetFields();
170
+  }
171
+
167
   const { getFieldDecorator } = props.form
172
   const { getFieldDecorator } = props.form
168
   return (
173
   return (
169
 
174
 
204
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
209
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
205
             搜索
210
             搜索
206
           </Button>
211
           </Button>
212
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
213
+              重置
214
+            </Button>
207
         </Form.Item>
215
         </Form.Item>
208
       </Form>
216
       </Form>
209
       <AuthButton name="admin.extendContent.post" noRight={null}>
217
       <AuthButton name="admin.extendContent.post" noRight={null}>

+ 3
- 3
src/pages/charts/CityNums.jsx View File

6
   backgroundColor: '#fff',
6
   backgroundColor: '#fff',
7
   title: {
7
   title: {
8
     text: '城市分布',
8
     text: '城市分布',
9
-    left: 20,
10
-    top: 20
9
+    left: 40,
10
+    top: 40
11
   },
11
   },
12
   tooltip : {
12
   tooltip : {
13
       trigger: 'item',
13
       trigger: 'item',
128
   }
128
   }
129
 
129
 
130
   return (
130
   return (
131
-    <div style={{ margin: ' 0 0 20px  0', width: '100%', borderRadius: '12px', boxShadow: '0px 0px 9px 1px rgba(0,0,0,0.12)', overflow: 'hidden' }}>
131
+    <div style={{ marginBottom:'40px', width: '100%', borderRadius: '12px', boxShadow: '0px 0px 9px 1px rgba(0,0,0,0.12)', overflow: 'hidden' }}>
132
       <Echart options={options} style={{ width: '100%', height: '600px' }} ></Echart>
132
       <Echart options={options} style={{ width: '100%', height: '600px' }} ></Echart>
133
     </div>
133
     </div>
134
   )
134
   )

+ 8
- 0
src/pages/customer/customerlist/index.jsx View File

110
     getList({ pageNumber: 1, pageSize: 10, customerType: value })
110
     getList({ pageNumber: 1, pageSize: 10, customerType: value })
111
   }
111
   }
112
 
112
 
113
+  function handleReset() {
114
+    props.form.resetFields();
115
+  }
116
+
117
+
113
   // 这里有个 Bug, 就是 Modal 弹框,会联动出现, 比如 我点击 调整归属的Model弹框, 那么 积分记录的Model弹框莫名其妙的也显示了
118
   // 这里有个 Bug, 就是 Modal 弹框,会联动出现, 比如 我点击 调整归属的Model弹框, 那么 积分记录的Model弹框莫名其妙的也显示了
114
   // 所有这里临时解决方法是,弹出一个Modal对话框的时候,把其他的对话框给隐藏
119
   // 所有这里临时解决方法是,弹出一个Modal对话框的时候,把其他的对话框给隐藏
115
 
120
 
257
             <Button type="primary" htmlType="submit" >
262
             <Button type="primary" htmlType="submit" >
258
               查询
263
               查询
259
             </Button>
264
             </Button>
265
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
266
+              重置
267
+            </Button>
260
         </Form.Item>
268
         </Form.Item>
261
       </Form>
269
       </Form>
262
 
270
 

+ 37
- 27
src/pages/customer/independentList/index.jsx View File

24
   }
24
   }
25
 
25
 
26
   // 挂载之后
26
   // 挂载之后
27
-  componentDidMount() {
27
+  componentDidMount () {
28
     this.getList({ pageNumber: 1, pageSize: 5 })
28
     this.getList({ pageNumber: 1, pageSize: 5 })
29
   }
29
   }
30
 
30
 
31
-  componentDidUpdate(preProps, preState) {
31
+  componentDidUpdate (preProps, preState) {
32
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
32
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
33
       this.getList({ pageNumber: 1, pageSize: 5 })
33
       this.getList({ pageNumber: 1, pageSize: 5 })
34
       this.setState({ visibleData: this.props.visibleData });
34
       this.setState({ visibleData: this.props.visibleData });
37
 
37
 
38
   // 弹框确定按钮
38
   // 弹框确定按钮
39
   // eslint-disable-next-line react/sort-comp
39
   // eslint-disable-next-line react/sort-comp
40
-  handleOk() {
40
+  handleOk () {
41
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
41
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
42
   }
42
   }
43
 
43
 
44
   // 弹框取消按钮
44
   // 弹框取消按钮
45
-  handleCancel() {
45
+  handleCancel () {
46
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
46
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
47
   }
47
   }
48
 
48
 
49
-  getList(params) {
49
+  getList (params) {
50
     console.log('this.state.visibleData', this.state.visibleData)
50
     console.log('this.state.visibleData', this.state.visibleData)
51
     const { customerId } = this.state.visibleData
51
     const { customerId } = this.state.visibleData
52
     if (customerId === '' || customerId === undefined) {
52
     if (customerId === '' || customerId === undefined) {
70
   }
70
   }
71
 
71
 
72
   // 分页
72
   // 分页
73
-  onChange(pageNum) {
73
+  onChange (pageNum) {
74
     this.getList({ pageNumber: pageNum, pageSize: 5 })
74
     this.getList({ pageNumber: pageNum, pageSize: 5 })
75
   }
75
   }
76
 
76
 
77
-  render() {
77
+  render () {
78
     const columns = [
78
     const columns = [
79
       {
79
       {
80
         title: '头像',
80
         title: '头像',
153
   }
153
   }
154
 
154
 
155
   // 挂载之后
155
   // 挂载之后
156
-  componentDidMount() {
156
+  componentDidMount () {
157
     const { customerId } = this.state.visibleData
157
     const { customerId } = this.state.visibleData
158
     this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
158
     this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
159
   }
159
   }
160
 
160
 
161
-  componentDidUpdate(preProps, preState) {
161
+  componentDidUpdate (preProps, preState) {
162
     const { customerId } = this.state.visibleData
162
     const { customerId } = this.state.visibleData
163
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
163
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
164
       this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
164
       this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
168
 
168
 
169
   // 弹框确定按钮
169
   // 弹框确定按钮
170
   // eslint-disable-next-line react/sort-comp
170
   // eslint-disable-next-line react/sort-comp
171
-  handleOk() {
171
+  handleOk () {
172
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
172
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
173
   }
173
   }
174
 
174
 
175
   // 弹框取消按钮
175
   // 弹框取消按钮
176
-  handleCancel() {
176
+  handleCancel () {
177
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
177
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
178
   }
178
   }
179
 
179
 
180
-  getList(params) {
180
+  getList (params) {
181
     const { customerId } = this.props.visibleData
181
     const { customerId } = this.props.visibleData
182
     if (customerId === '' || customerId === undefined) {
182
     if (customerId === '' || customerId === undefined) {
183
       return
183
       return
198
   }
198
   }
199
 
199
 
200
   // 分页
200
   // 分页
201
-  onChange(pageNum) {
201
+  onChange (pageNum) {
202
     this.getList({ pageNumber: pageNum, pageSize: 5 })
202
     this.getList({ pageNumber: pageNum, pageSize: 5 })
203
   }
203
   }
204
 
204
 
205
-  render() {
205
+  render () {
206
     const columns = [
206
     const columns = [
207
       {
207
       {
208
         title: '头像',
208
         title: '头像',
256
  * @param {*} props
256
  * @param {*} props
257
  * @returns
257
  * @returns
258
  */
258
  */
259
-function body(props) {
259
+function body (props) {
260
   const { getFieldDecorator } = props.form
260
   const { getFieldDecorator } = props.form
261
 
261
 
262
   // eslint-disable-next-line react-hooks/rules-of-hooks
262
   // eslint-disable-next-line react-hooks/rules-of-hooks
268
   }, [])
268
   }, [])
269
 
269
 
270
 
270
 
271
-  function openNotificationWithIcon(type, message) {
271
+  function openNotificationWithIcon (type, message) {
272
     notification[type]({
272
     notification[type]({
273
       message,
273
       message,
274
       description:
274
       description:
276
     });
276
     });
277
   }
277
   }
278
 
278
 
279
-  function getList(params) {
279
+  function getList (params) {
280
     // 网路请求
280
     // 网路请求
281
     request({ ...apis.customer.agents, params: { ...params } }).then(res => {
281
     request({ ...apis.customer.agents, params: { ...params } }).then(res => {
282
       setDataSource(res)
282
       setDataSource(res)
286
   }
286
   }
287
 
287
 
288
   // 提交事件
288
   // 提交事件
289
-  function handleSubmit(e) {
289
+  function handleSubmit (e) {
290
     e.preventDefault();
290
     e.preventDefault();
291
     props.form.validateFields((err, values) => {
291
     props.form.validateFields((err, values) => {
292
       if (!err) {
292
       if (!err) {
299
   // eslint-disable-next-line react-hooks/rules-of-hooks
299
   // eslint-disable-next-line react-hooks/rules-of-hooks
300
   const [gInviteData, setGInviteData] = useState({ visible: false, customerId: '', realtyConsultant: '' })
300
   const [gInviteData, setGInviteData] = useState({ visible: false, customerId: '', realtyConsultant: '' })
301
   // Change 事件
301
   // Change 事件
302
-  function handleSelectChange(e) {
302
+  function handleSelectChange (e) {
303
     // eslint-disable-next-line no-console
303
     // eslint-disable-next-line no-console
304
     console.log(e)
304
     console.log(e)
305
   }
305
   }
306
-  function gM(row) {
306
+  function gM (row) {
307
     setGVisibleData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
307
     setGVisibleData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
308
 
308
 
309
     setGInviteData({ visible: false })
309
     setGInviteData({ visible: false })
310
   }
310
   }
311
 
311
 
312
-  function Invite(row) {
312
+  function Invite (row) {
313
     setGInviteData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
313
     setGInviteData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
314
 
314
 
315
     setGVisibleData({ visible: false })
315
     setGVisibleData({ visible: false })
316
   }
316
   }
317
 
317
 
318
   // 分页
318
   // 分页
319
-  function onChange(pageNum) {
319
+  function onChange (pageNum) {
320
     // eslint-disable-next-line react-hooks/rules-of-hooks
320
     // eslint-disable-next-line react-hooks/rules-of-hooks
321
     getList({ pageNumber: pageNum, pageSize: 10 })
321
     getList({ pageNumber: pageNum, pageSize: 10 })
322
   }
322
   }
323
 
323
 
324
-  function toAudit(cuurentId) {
324
+  /**
325
+    * 重置搜索
326
+    */
327
+  function handleReset () {
328
+    props.form.resetFields();
329
+  }
330
+
331
+  function toAudit (cuurentId) {
325
     router.push({
332
     router.push({
326
       pathname: '/customer/recommendCustomer/audit',
333
       pathname: '/customer/recommendCustomer/audit',
327
       query: {
334
       query: {
330
     })
337
     })
331
   }
338
   }
332
 
339
 
333
-  function exportIndependen() {
340
+  function exportIndependen () {
334
     request({ ...apis.customer.customerRecommendAgentsExport, responseType: 'blob' })
341
     request({ ...apis.customer.customerRecommendAgentsExport, responseType: 'blob' })
335
       .then(response => {
342
       .then(response => {
336
         download(response)
343
         download(response)
339
       })
346
       })
340
   }
347
   }
341
 
348
 
342
-  function download(data) {
349
+  function download (data) {
343
     if (!data) {
350
     if (!data) {
344
       return
351
       return
345
     }
352
     }
429
             />,
436
             />,
430
           )}
437
           )}
431
         </Form.Item>
438
         </Form.Item>
432
-        <Form.Item style={{ position:'absolute',right:'38px' }} >
439
+        <Form.Item style={{ position: 'absolute', right: '38px' }} >
433
           <Button type="primary" htmlType="submit" >
440
           <Button type="primary" htmlType="submit" >
434
             搜索
441
             搜索
435
           </Button>
442
           </Button>
443
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
444
+            重置
445
+            </Button>
436
         </Form.Item>
446
         </Form.Item>
437
       </Form>
447
       </Form>
438
-      <Button type="primary" onClick={() => exportIndependen()}  style={{ float: 'right', margin: '20px 0' }}>
448
+      <Button type="primary" onClick={() => exportIndependen()} style={{ float: 'right', margin: '20px 0' }}>
439
         导出
449
         导出
440
       </Button>
450
       </Button>
441
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
451
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 11
- 0
src/pages/customer/recommendCustomer/index.jsx View File

77
     })
77
     })
78
   }
78
   }
79
 
79
 
80
+  
81
+ /**
82
+   * 重置搜索
83
+   */
84
+  function handleReset() {
85
+    props.form.resetFields();
86
+  }
87
+  
80
   /**
88
   /**
81
    *导出数据(推荐用户)
89
    *导出数据(推荐用户)
82
    *
90
    *
211
             <Button type="primary" htmlType="submit" >
219
             <Button type="primary" htmlType="submit" >
212
               搜索
220
               搜索
213
             </Button>
221
             </Button>
222
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
223
+              重置
224
+            </Button>
214
         </Form.Item>
225
         </Form.Item>
215
       </Form>
226
       </Form>
216
       <Button type="primary" onClick={() => exportRecommendCustomer()} style={{float:'right',margin:'20px 0'}}>
227
       <Button type="primary" onClick={() => exportRecommendCustomer()} style={{float:'right',margin:'20px 0'}}>

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

70
       getList({ pageNumber: pageNum, pageSize: 9 })
70
       getList({ pageNumber: pageNum, pageSize: 9 })
71
   }
71
   }
72
 
72
 
73
+ /**
74
+   * 重置搜索
75
+   */
76
+  function handleReset() {
77
+    props.form.resetFields();
78
+  }
79
+
73
   function exportReport() {
80
   function exportReport() {
74
     request({ ...apis.customer.customerRecommendReportExport, responseType: 'blob' })
81
     request({ ...apis.customer.customerRecommendReportExport, responseType: 'blob' })
75
     .then(response => {
82
     .then(response => {
177
             <Button type="primary" htmlType="submit">
184
             <Button type="primary" htmlType="submit">
178
               搜索
185
               搜索
179
             </Button>
186
             </Button>
187
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
188
+              重置
189
+            </Button>
180
         </Form.Item>
190
         </Form.Item>
181
       </Form>
191
       </Form>
182
       <Button type="primary" onClick={() => exportReport()} style={{ float:'right',margin:'20px 0' }}>
192
       <Button type="primary" onClick={() => exportReport()} style={{ float:'right',margin:'20px 0' }}>

+ 1
- 1
src/pages/indexEcharts/components/UserSourcepie.jsx View File

54
     series: [
54
     series: [
55
       {
55
       {
56
         type: 'pie',
56
         type: 'pie',
57
-        center: ['44%', '65%'],
57
+        center: ['40%', '65%'],
58
         radius: ['34%', '52%'],
58
         radius: ['34%', '52%'],
59
       },
59
       },
60
     ],
60
     ],

+ 3
- 3
src/pages/indexEcharts/styles.less View File

23
   background: rgba(255, 255, 255, 1);
23
   background: rgba(255, 255, 255, 1);
24
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
24
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
25
   border-radius: 12px;
25
   border-radius: 12px;
26
-  margin-bottom: 25px;
27
-  padding: 26px;
26
+  margin-bottom: 40px;
27
+  padding: 40px;
28
 }
28
 }
29
 
29
 
30
 .customers {
30
 .customers {
33
   background: rgba(255, 255, 255, 1);
33
   background: rgba(255, 255, 255, 1);
34
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
34
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
35
   border-radius: 12px 12px 0px 0px;
35
   border-radius: 12px 12px 0px 0px;
36
-  padding: 26px;
36
+  padding: 40px;
37
 }
37
 }

+ 1
- 7
src/pages/indexEcharts/userBehavior.jsx View File

157
   const dataSource = []
157
   const dataSource = []
158
 
158
 
159
   return (<>
159
   return (<>
160
-    <div style={{
161
-      backgroundColor: '#fff',
162
-      padding: '32PX 28px',
163
-      boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)',
164
-      borderRadius: '12px',
165
-      minHeight: '60vh'
166
-    }}>
160
+    <div>
167
       <div>
161
       <div>
168
         <Radio.Group buttonStyle="solid" defaultValue="a">
162
         <Radio.Group buttonStyle="solid" defaultValue="a">
169
           <Radio.Button value="a" onClick={getDataOf(7)}>最近7天</Radio.Button>
163
           <Radio.Button value="a" onClick={getDataOf(7)}>最近7天</Radio.Button>

+ 6
- 0
src/pages/integralMall/GoodsList.jsx View File

41
     getList({ pageNum: pageNumber, pageSize: 10 })
41
     getList({ pageNum: pageNumber, pageSize: 10 })
42
   }
42
   }
43
 
43
 
44
+  function handleReset() {
45
+    props.form.resetFields();
46
+  }
44
 
47
 
45
   // 跳转到编辑商品
48
   // 跳转到编辑商品
46
   const toEditGoods = (goodsId) => () => {
49
   const toEditGoods = (goodsId) => () => {
188
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
191
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
189
               搜索
192
               搜索
190
             </Button>
193
             </Button>
194
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
195
+              重置
196
+            </Button>
191
         </Form.Item>
197
         </Form.Item>
192
       </Form>
198
       </Form>
193
       <AuthButton name="admin.taGoods.add.post" noRight={null}>
199
       <AuthButton name="admin.taGoods.add.post" noRight={null}>

+ 10
- 0
src/pages/integralMall/exchangeRecords.jsx View File

32
         setData(data)
32
         setData(data)
33
     })
33
     })
34
   }
34
   }
35
+
36
+  //重置搜索
37
+  function handleReset() {
38
+    props.form.resetFields();
39
+  }
40
+
41
+
35
   
42
   
36
   // 提交事件
43
   // 提交事件
37
   const handleSubmit = (e, props) => {
44
   const handleSubmit = (e, props) => {
175
             <Button type="primary" htmlType="submit">
182
             <Button type="primary" htmlType="submit">
176
               搜索
183
               搜索
177
             </Button>
184
             </Button>
185
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
186
+              重置
187
+            </Button>
178
           </Form.Item>
188
           </Form.Item>
179
         </div>
189
         </div>
180
         <div style={{margin:'10px 0'}}>
190
         <div style={{margin:'10px 0'}}>

+ 8
- 0
src/pages/news/list/NewsList.jsx View File

229
     getList({ pageNum: pageNumber, pageSize: 6 })
229
     getList({ pageNum: pageNumber, pageSize: 6 })
230
   }
230
   }
231
 
231
 
232
+   //重置搜索
233
+   function handleReset() {
234
+    props.form.resetFields();
235
+  }
236
+  
232
   function getDate(value, dateString) {
237
   function getDate(value, dateString) {
233
     // moment(value).format('YYYY-MM-DD HH:mm:ss')
238
     // moment(value).format('YYYY-MM-DD HH:mm:ss')
234
     console.log(value, dateString)
239
     console.log(value, dateString)
273
           <Button type="primary" htmlType="submit" >
278
           <Button type="primary" htmlType="submit" >
274
             搜索
279
             搜索
275
           </Button>
280
           </Button>
281
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
282
+              重置
283
+            </Button>
276
         </Form.Item>
284
         </Form.Item>
277
       </Form>
285
       </Form>
278
       <AuthButton name="admin.taNews.post" noRight={null}>
286
       <AuthButton name="admin.taNews.post" noRight={null}>

+ 9
- 0
src/pages/staff/list/StaffList.jsx View File

132
     });
132
     });
133
   }
133
   }
134
 
134
 
135
+   //重置搜索
136
+   function handleReset() {
137
+    props.form.resetFields();
138
+  }
139
+
135
   const { getFieldDecorator } = props.form
140
   const { getFieldDecorator } = props.form
136
   return (
141
   return (
137
 
142
 
168
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
173
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
169
             搜索
174
             搜索
170
           </Button>
175
           </Button>
176
+          
177
+   <Button style={{ marginLeft: 8 }} onClick={handleReset}>
178
+              重置
179
+            </Button>
171
         </Form.Item>
180
         </Form.Item>
172
       </Form>
181
       </Form>
173
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
182
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>

+ 43
- 38
src/pages/system/intention.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message,Checkbox,Row, Col } from 'antd';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Checkbox, Row, Col } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import moment from 'moment';
5
 import moment from 'moment';
19
  * @param {*} props
19
  * @param {*} props
20
  * @returns
20
  * @returns
21
  */
21
  */
22
- const Edit = (props) => {
23
-  const [ data, setData ] = useState([])
24
-  const [ buildingIdValue, setBuildingIdData ] = useState('')
22
+const Edit = (props) => {
23
+  const [data, setData] = useState([])
24
+  const [buildingIdValue, setBuildingIdData] = useState('')
25
 
25
 
26
   const changBuilding = (buildingId) => {
26
   const changBuilding = (buildingId) => {
27
     setBuildingIdData(buildingId)
27
     setBuildingIdData(buildingId)
28
-    request({ ...apis.system.tdBizEventIntention, params: {pageNum: 1, pageSize: 999,buildingId}}).then((data) => {
28
+    request({ ...apis.system.tdBizEventIntention, params: { pageNum: 1, pageSize: 999, buildingId } }).then((data) => {
29
       console.log(data)
29
       console.log(data)
30
       setData(data.records)
30
       setData(data.records)
31
     })
31
     })
33
 
33
 
34
   const changeBox = (x) => (e) => {
34
   const changeBox = (x) => (e) => {
35
     setData(data.map((item) => {
35
     setData(data.map((item) => {
36
-      return x.eventId === item.eventId ? {...item, checkbox: e.target.checked} : item
36
+      return x.eventId === item.eventId ? { ...item, checkbox: e.target.checked } : item
37
     }))
37
     }))
38
   }
38
   }
39
 
39
 
40
   const changeInput = (x) => (e) => {
40
   const changeInput = (x) => (e) => {
41
     setData(data.map((item) => {
41
     setData(data.map((item) => {
42
-      return x.eventId === item.eventId ? {...item, intention: e.target.value} : item
42
+      return x.eventId === item.eventId ? { ...item, intention: e.target.value } : item
43
     }))
43
     }))
44
   }
44
   }
45
 
45
 
46
   const submitValue = () => {
46
   const submitValue = () => {
47
     console.log(buildingIdValue)
47
     console.log(buildingIdValue)
48
-    if(buildingIdValue === ''){
48
+    if (buildingIdValue === '') {
49
       return
49
       return
50
     }
50
     }
51
-    request({ ...apis.system.taBuildingIntentionAddOrUpdate, urlData: {id: buildingIdValue}, data,}).then((data) => {
51
+    request({ ...apis.system.taBuildingIntentionAddOrUpdate, urlData: { id: buildingIdValue }, data, }).then((data) => {
52
       message.info("保存成功")
52
       message.info("保存成功")
53
     })
53
     })
54
   }
54
   }
55
 
55
 
56
   return (
56
   return (
57
     <>
57
     <>
58
-    <Row>
59
-      <Col span={12}>
60
-        <BuildSelect onChange={changBuilding}/>
61
-      </Col>
62
-    </Row>
63
-    <Row style={{margin:'10px 0'}}>
64
-      <Col span={5} offset={2}>
65
-        用户操作
66
-      </Col>
67
-      <Col span={3} offset={3}>
68
-        意向值
69
-      </Col>
70
-    </Row>
71
-    {data.map((x) => {
72
-      return <Row>
73
-                <Col span={5} offset={2}>
74
-                  <Checkbox checked={x.checkbox} onChange={changeBox(x)}>{x.eventName}</Checkbox>
75
-                </Col>
76
-                <Col span={3} offset={3}>
77
-                  <Input value={x.intention} onChange={changeInput(x)}/>
78
-                </Col>
79
-              </Row>
80
-    })}
81
-    <Row>
82
-      <AuthButton name="admin.taBuildingIntentionAddOrUpdate.buildingId.post" noRight={null}>
83
-        <Button type="primary" className={styles.searchBtn} onClick={submitValue}>确定</Button>
84
-      </AuthButton>
85
-    </Row>
58
+      <Row>
59
+        <Col span={6}>
60
+          <BuildSelect onChange={changBuilding} />
61
+        </Col>
62
+        <Col span={5} style={{ lineHeight: '30px' }}>
63
+          用户操作
64
+        </Col>
65
+        <Col span={5} offset={2} style={{ lineHeight: '30px' }}>
66
+          意向值
67
+        </Col>
68
+        <Col span={2} offset={4}>
69
+          <AuthButton name="admin.taBuildingIntentionAddOrUpdate.buildingId.post" noRight={null}>
70
+            <Button type="primary" className={styles.searchBtn} onClick={submitValue}>确定</Button>
71
+          </AuthButton>
72
+        </Col>
73
+      </Row>
74
+      {data.map((x) => {
75
+        return <Row style={{margin:'5px 0'}}>
76
+          <Col span={6}>
77
+
78
+          </Col>
79
+          <Col span={5} >
80
+            <Checkbox checked={x.checkbox} onChange={changeBox(x)}>{x.eventName}</Checkbox>
81
+          </Col>
82
+          <Col span={5} offset={2}>
83
+            <Input value={x.intention} onChange={changeInput(x)} />
84
+          </Col>
85
+          <Col span={2} offset={4}>
86
+
87
+          </Col>
88
+
89
+        </Row>
90
+      })}
86
     </>
91
     </>
87
   );
92
   );
88
- }
93
+}
89
 
94
 
90
 
95
 
91
 
96