Przeglądaj źródła

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

傅行帆 5 lat temu
rodzic
commit
bbff744f0c

+ 5
- 0
config/routes.js Wyświetl plik

@@ -285,6 +285,11 @@ export default [
285 285
                 name: 'H5活动',
286 286
                 component: './activity/drainage/DrainageList',
287 287
               },
288
+              {
289
+                path: '/activity/drainage/DrainageVisitRecordList',
290
+                name: 'H5访问记录',
291
+                component: './activity/drainage/DrainageVisitRecordList',
292
+              },
288 293
               {
289 294
                 path: '/activity/drainage/Detail',
290 295
                 name: '查看详情',

+ 2
- 2
src/pages/activity/detailActivity.jsx Wyświetl plik

@@ -398,11 +398,11 @@ const Edit = props => {
398 398
       </div>
399 399
       <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
400 400
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
401
-        <span>{inputValue}</span>
401
+        {inputValue === '' ? '无' : <span>{inputValue}</span>}
402 402
       </div>
403 403
       <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
404 404
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动分享图</p>
405
-        <img src={imgValue} height="120px" height="150px" />
405
+        {imgValue === '' ? '无':<img src={imgValue} height="120px" height="150px" />}
406 406
       </div>
407 407
       {/* <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
408 408
       <Button onClick={() => cancelPage()}>

+ 158
- 0
src/pages/activity/drainage/DrainageVisitRecordList.jsx Wyświetl plik

@@ -0,0 +1,158 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../../style/GoodsList.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+import SelectCity from '../../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
+import apis from '../../../services/apis';
10
+import request from '../../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
12
+
13
+const { Option } = Select;
14
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
+
16
+const header = props => {
17
+  const [data, setData] = useState({})
18
+  //   const [page, changePage] = useState({})
19
+
20
+  useEffect(() => {
21
+    getList({ pageNum: 1, pageSize: 10 });
22
+  }, [])
23
+
24
+  // 查询列表
25
+  const getList = (params) => {
26
+    console.log(params);
27
+    request({ ...apis.activity.taDrainageVisitRecord, params: { ...params } }).then((data) => {
28
+      console.log(data)
29
+      setData(data)
30
+    })
31
+  }
32
+
33
+  /**
34
+   *
35
+   *
36
+   * @param {*} props
37
+   * @returns
38
+   */
39
+
40
+  const columns = [
41
+    {
42
+      title: '活动名称',
43
+      dataIndex: 'activityName',
44
+      key: 'activityName',
45
+      align: 'center',
46
+    },
47
+    {
48
+      title: '用户名',
49
+      dataIndex: 'userName',
50
+      key: 'userName',
51
+      align: 'center',
52
+    },
53
+    {
54
+      title: '手机号',
55
+      dataIndex: 'userTel',
56
+      key: 'userTel',
57
+      align: 'center',
58
+    },
59
+    {
60
+      title: '访问时间',
61
+      dataIndex: 'visitTime',
62
+      key: 'visitTime',
63
+      align: 'center',
64
+      render: (x, row) => <><span>{`${moment(row.visitTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
65
+    },
66
+    {
67
+      title: '分享者',
68
+      dataIndex: 'shareName',
69
+      key: 'shareName',
70
+      align: 'center',
71
+    },
72
+    {
73
+      title: '分享者手机号',
74
+      dataIndex: 'shareTel',
75
+      key: 'shareTel',
76
+      align: 'center',
77
+    },
78
+  ];
79
+  
80
+
81
+  const changePageNum = pageNumber => {
82
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
83
+  }
84
+
85
+  // 提交事件
86
+  const handleSubmit = (e, props) => {
87
+    e.preventDefault();
88
+    props.form.validateFields((err, values) => {
89
+      if (!err) {
90
+        console.log('提交数据: ', values)
91
+        getList({ pageNum: 1, pageSize: 10, ...values })
92
+      }
93
+    });
94
+  }
95
+
96
+  //重置搜索
97
+  function handleReset () {
98
+    props.form.resetFields();
99
+    getList({ pageNum: 1, pageSize: 10 })
100
+  }
101
+
102
+
103
+  const { getFieldDecorator } = props.form
104
+  return (
105
+
106
+    <>
107
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
108
+      <Form.Item>
109
+          {getFieldDecorator('drainageId')(
110
+            <Input
111
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
112
+              placeholder="H5活动编号"
113
+            />,
114
+          )}
115
+        </Form.Item>
116
+        <Form.Item>
117
+          {getFieldDecorator('activityName')(
118
+            <Input
119
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
120
+              placeholder="H5活动名称"
121
+            />,
122
+          )}
123
+        </Form.Item>
124
+        <Form.Item>
125
+          {getFieldDecorator('shareName')(
126
+            <Input
127
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
128
+              placeholder="分享者名称"
129
+            />,
130
+          )}
131
+        </Form.Item>
132
+        <Form.Item>
133
+          {getFieldDecorator('shareTel')(
134
+            <Input
135
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
136
+              placeholder="分享者手机"
137
+            />,
138
+          )}
139
+        </Form.Item>
140
+        <Form.Item>
141
+          <Button type="primary" htmlType="submit" className={styles.searchBtn}> 
142
+            搜索
143
+          </Button>
144
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
145
+            重置
146
+            </Button>
147
+        </Form.Item>
148
+      </Form>
149
+      <Table style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
150
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
151
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
152
+      </div>
153
+    </>
154
+  )
155
+}
156
+const WrappedHeader = Form.create({ name: 'header' })(header);
157
+
158
+export default WrappedHeader

+ 2
- 2
src/pages/activity/groupActivity/detailActivity.jsx Wyświetl plik

@@ -373,11 +373,11 @@ const Edit = props => {
373 373
       </div>
374 374
       <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
375 375
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
376
-        <span>{inputValue}</span>
376
+        {inputValue === '' ? '无' : <span>{inputValue}</span>}
377 377
       </div>
378 378
       <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
379 379
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动分享图</p>
380
-        <img src={imgValue} height="120px" height="150px" />
380
+        {imgValue === '' ? '无':<img src={imgValue} height="120px" height="150px" />}
381 381
       </div>
382 382
       {/* <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
383 383
       <Button onClick={() => cancelPage()}>

+ 2
- 2
src/pages/activity/helpActivity/detailActivity.jsx Wyświetl plik

@@ -383,11 +383,11 @@ const Edit = props => {
383 383
       </div>
384 384
       <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
385 385
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
386
-        <span>{inputValue}</span>
386
+        {inputValue === '' ? '无' : <span>{inputValue}</span>}
387 387
       </div>
388 388
       <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
389 389
         <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动分享图</p>
390
-        <img src={imgValue} height="120px" height="150px" />
390
+        {imgValue === '' ? '无':<img src={imgValue} height="120px" height="150px" />}
391 391
       </div>
392 392
       {/* <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
393 393
       <Button onClick={() => cancelPage()}>

+ 4
- 4
src/pages/staff/list/StaffList.jsx Wyświetl plik

@@ -102,14 +102,14 @@ const CartBody = props => {
102 102
           编辑
103 103
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
104 104
         </Button>
105
-        <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={() => departure(data)}>
105
+        {/* <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={() => departure(data)}>
106 106
           离职
107 107
                 <Icon type="exclamation-circle" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
108
-        </Button>
109
-        {/* <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={confirm(data)}>
108
+        </Button> */}
109
+        <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={confirm(data)}>
110 110
           {data.status === 1 ? '停用' : '启用'}
111 111
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
112
-        </Button> */}
112
+        </Button>
113 113
 
114 114
       </div>
115 115
       <div>

+ 5
- 0
src/services/apis.js Wyświetl plik

@@ -513,6 +513,11 @@ export default {
513 513
         method: 'GET',
514 514
         action: 'admin.taDrainageRecord.export.get',
515 515
       },
516
+      taDrainageVisitRecord: {
517
+        url: `${prefix}/taDrainageVisitRecord`,
518
+        method: 'GET',
519
+        action: 'admin.taDrainageVisitRecord.get',
520
+      },
516 521
   },
517 522
   integralMall: {
518 523
     tdPointsRules: {