Ver código fonte

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

zhoulisen 5 anos atrás
pai
commit
024ef71639

+ 1
- 1
src/pages/activity/ActivityList.jsx Ver arquivo

@@ -126,7 +126,7 @@ const header = props => {
126 126
       render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>,
127 127
     },
128 128
     {
129
-      title: '已参人数',
129
+      title: '已参人数',
130 130
       dataIndex: 'count',
131 131
       key: 'count',
132 132
       align: 'center',

+ 1
- 1
src/pages/activity/helpActivity/list.jsx Ver arquivo

@@ -93,7 +93,7 @@ const header = props => {
93 93
       render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD HH:mm:ss')} —— ${moment(row.endDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
94 94
     },
95 95
     {
96
-      title: '已参人数',
96
+      title: '已参人数',
97 97
       dataIndex: 'enlistNum',
98 98
       key: 'enlistNum',
99 99
       align: 'center',

+ 1
- 1
src/pages/customer/customerlist/index.jsx Ver arquivo

@@ -585,7 +585,7 @@ function body(props) {
585 585
         <Form.Item>
586 586
           <AuthButton name="admin.customer.recommend.search" noRight={null}>
587 587
             <Button type="primary" htmlType="submit" >
588
-              查询
588
+              搜索
589 589
               </Button>
590 590
           </AuthButton>
591 591
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>

+ 2
- 2
src/pages/customer/drift/index.jsx Ver arquivo

@@ -96,7 +96,7 @@ function costomerDrift(props) {
96 96
         <Form.Item>
97 97
             {/* <AuthButton name="admin.customer.recommend.search" noRight={null}> */}
98 98
             <Button type="primary" htmlType="submit" >
99
-              查询
99
+              搜索
100 100
             </Button>
101 101
             {/* </AuthButton> */}
102 102
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
@@ -104,7 +104,7 @@ function costomerDrift(props) {
104 104
             </Button>
105 105
         </Form.Item>
106 106
       </Form>
107
-      <Table dataSource={dataSources.records} rowKey="drift" columns={columns} pagination={{ total: dataSources.total, onChange }} />
107
+      <Table style={{marginTop:'10px'}} dataSource={dataSources.records} rowKey="drift" columns={columns} pagination={{ total: dataSources.total, onChange }} />
108 108
     </>
109 109
     // eslint-disable-next-line max-len
110 110
     

+ 34
- 33
src/pages/integralMall/exchangeRecords.jsx Ver arquivo

@@ -20,17 +20,17 @@ function record(props) {
20 20
   const { getFieldDecorator } = props.form
21 21
 
22 22
   // 获取初始化数据
23
-  const [ data, setData ] = useState({})
23
+  const [data, setData] = useState({})
24 24
 
25 25
   useEffect(() => {
26 26
     getList({ pageNum: 1, pageSize: 10 });
27
-  },[])
27
+  }, [])
28 28
 
29 29
   // 查询列表
30 30
   const getList = (params) => {
31
-    request({ ...apis.integralMall.taPointsExchange, params: { ...params },}).then((data) => {
32
-        setData(data)
33
-        console.log("data:",data)
31
+    request({ ...apis.integralMall.taPointsExchange, params: { ...params }, }).then((data) => {
32
+      setData(data)
33
+      console.log("data:", data)
34 34
     })
35 35
   }
36 36
 
@@ -40,31 +40,31 @@ function record(props) {
40 40
   }
41 41
 
42 42
 
43
-  
43
+
44 44
   // 提交事件
45 45
   const handleSubmit = (e, props) => {
46 46
     e.preventDefault();
47 47
     props.form.validateFields((err, values) => {
48 48
       if (!err) {
49
-        let {exchangeTime,receiveTime, ...submitValue} = values
50
-        if(null != exchangeTime && exchangeTime.length > 0){
49
+        let { exchangeTime, receiveTime, ...submitValue } = values
50
+        if (null != exchangeTime && exchangeTime.length > 0) {
51 51
           const [startCreateDate, endCreateDate] = exchangeTime
52 52
           submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
53 53
           submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
54
-        }else{
54
+        } else {
55 55
           submitValue.startCreateDate = null
56 56
           submitValue.endCreateDate = null
57 57
         }
58
-        
59
-        if(null != receiveTime && receiveTime.length > 0){
58
+
59
+        if (null != receiveTime && receiveTime.length > 0) {
60 60
           const [startVerifyDate, endVerifyDate] = receiveTime
61 61
           submitValue.startVerifyDate = moment(startVerifyDate).format('YYYY-MM-DD');
62 62
           submitValue.endVerifyDate = moment(endVerifyDate).format('YYYY-MM-DD');
63
-        }else{
63
+        } else {
64 64
           submitValue.startVerifyDate = null
65 65
           submitValue.endVerifyDate = null
66 66
         }
67
-        
67
+
68 68
         console.log(submitValue)
69 69
         getList({ pageNum: 1, pageSize: 10, ...submitValue })
70 70
       }
@@ -92,7 +92,7 @@ function record(props) {
92 92
       dataIndex: 'personType',
93 93
       key: 'personType',
94 94
       align: 'center',
95
-      render: (personType)=> <><span>{personType === 'Realty Consultant' ? '置业顾问' : personType === 'Sales Executive' ? '销售主管' : personType === 'estate agent' ? '经纪人' : personType === 'customer' ? '客户' : ''}</span></>
95
+      render: (personType) => <><span>{personType === 'Realty Consultant' ? '置业顾问' : personType === 'Sales Executive' ? '销售主管' : personType === 'estate agent' ? '经纪人' : personType === 'customer' ? '客户' : ''}</span></>
96 96
     },
97 97
     {
98 98
       title: '手机号',
@@ -132,7 +132,7 @@ function record(props) {
132 132
       dataIndex: 'status',
133 133
       key: 'status',
134 134
       align: 'center',
135
-      render: (status)=> <><span>{status == 1 ? '已领取' : '未领取'}</span></>
135
+      render: (status) => <><span>{status == 1 ? '已领取' : '未领取'}</span></>
136 136
     },
137 137
   ];
138 138
 
@@ -182,8 +182,22 @@ function record(props) {
182 182
               </Select>,
183 183
             )}
184 184
           </Form.Item>
185
-          
186
-          <Form.Item style={{position:'absolute',right:'38px'}}>
185
+
186
+        </div>
187
+        <div style={{ margin: '10px 0' }}>
188
+          <Form.Item>
189
+            <span style={{ marginRight: '10px' }}>兑换时间:</span>
190
+            {getFieldDecorator('exchangeTime')(
191
+              <RangePicker placeholder={['开始时间', '结束时间']} />
192
+            )}
193
+          </Form.Item>
194
+          <Form.Item>
195
+            <span style={{ marginRight: '10px' }}>领取时间:</span>
196
+            {getFieldDecorator('receiveTime')(
197
+              <RangePicker placeholder={['开始时间', '结束时间']} />
198
+            )}
199
+          </Form.Item>
200
+          <Form.Item >
187 201
             <AuthButton name="admin.taGoods.exchange" noRight={null}>
188 202
               <Button type="primary" htmlType="submit">
189 203
                 搜索
@@ -194,24 +208,11 @@ function record(props) {
194 208
             </Button>
195 209
           </Form.Item>
196 210
         </div>
197
-        <div style={{margin:'10px 0'}}>
198
-        <Form.Item>
199
-          <span style={{marginRight:'10px'}}>兑换时间:</span>
200
-            {getFieldDecorator('exchangeTime')(
201
-              <RangePicker placeholder={['开始时间','结束时间']}/>
202
-            )}
203
-          </Form.Item>
204
-          <Form.Item>
205
-          <span style={{marginRight:'10px'}}>领取时间:</span>
206
-            {getFieldDecorator('receiveTime')(
207
-              <RangePicker placeholder={['开始时间','结束时间']}/>
208
-            )}
209
-          </Form.Item>
210
-        </div>
211
+
211 212
       </Form>
212
-      <Table rowKey="exchangeRecords" style={{marginTop:'40px'}} dataSource={data.records} columns={columns} pagination={false} />
213
+      <Table rowKey="exchangeRecords" style={{ marginTop: '40px' }} dataSource={data.records} columns={columns} pagination={false} />
213 214
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
214
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
215
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
215 216
       </div>
216 217
     </>
217 218
   )

+ 1
- 1
src/pages/news/type/NewsType.jsx Ver arquivo

@@ -136,7 +136,7 @@ function header(props) {
136 136
         <Form.Item>
137 137
             <AuthButton name="admin.taNewsType.search" noRight={null}>
138 138
               <Button type="primary" htmlType="submit" >
139
-                查询
139
+                搜索
140 140
               </Button>
141 141
             </AuthButton>
142 142
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>

+ 34
- 0
src/pages/statistical/activity/addRegistNum.jsx Ver arquivo

@@ -86,6 +86,7 @@ class SharePersonNum extends React.Component {
86 86
     this.state = {
87 87
       formData: {
88 88
         personFrom: '',
89
+        province: '',
89 90
         pageNum:'',
90 91
         pageSize:'',
91 92
         startDate: startDate,
@@ -119,11 +120,13 @@ class SharePersonNum extends React.Component {
119 120
     let startDate = null
120 121
     let endDate = null
121 122
     const personFrom = this.props.form.getFieldValue("personFrom");
123
+    const province = this.props.form.getFieldValue("province");
122 124
     const { formData } = this.state
123 125
     this.setState({
124 126
       formData: {
125 127
         ...formData,
126 128
         personFrom: personFrom,
129
+        province: province,
127 130
       }
128 131
     }, this.getTableList)
129 132
   }
@@ -131,6 +134,34 @@ class SharePersonNum extends React.Component {
131 134
   //重置搜索
132 135
   handleReset = e => {
133 136
     this.props.form.resetFields()
137
+    let startDate;
138
+    let endDate;
139
+    if (this.props.location.query.queryDate){
140
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
141
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
142
+    }else{
143
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
144
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
145
+    }
146
+    this.setState({
147
+      formData: {
148
+        personFrom: '',
149
+        province: '',
150
+        pageNum:'',
151
+        pageSize:'',
152
+        startDate: startDate,
153
+        endDate: endDate,
154
+        activityId: this.props.location.query.activityId,
155
+        activityType:this.props.location.query.activityType,
156
+        buildingId: this.props.location.query.buildingId,      
157
+      },
158
+      personData: [],  
159
+      dataSoures: [],
160
+      tableData: [],
161
+      userType: 'all',
162
+      activityName:  this.props.location.query.activityName
163
+    })
164
+    this.getTableList()
134 165
   }
135 166
 
136 167
   goback = () => {
@@ -177,6 +208,9 @@ class SharePersonNum extends React.Component {
177 208
           <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
178 209
         </div>
179 210
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
211
+        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
212
+            {getFieldDecorator('province')(<Input placeholder="请输入归属地"/>)}
213
+        </Form.Item>
180 214
         <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
181 215
           {getFieldDecorator('personFrom')(
182 216
             <WxDictSelect />,

+ 22
- 35
src/pages/statistical/activity/compenents/Content.jsx Ver arquivo

@@ -155,24 +155,6 @@ let columns = [
155 155
     dataIndex: 'activityName',
156 156
     key: 'activityName',
157 157
   },
158
-  {
159
-    title: '分享人数',
160
-    dataIndex: 'sharePersonNum',
161
-    key: 'sharePersonNum',
162
-    sorter: true,
163
-    render: (text, record) => (
164
-      <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
165
-    ),
166
-  },
167
-  {
168
-    title: '分享次数',
169
-    dataIndex: 'shareNum',
170
-    key: 'shareNum',
171
-    sorter: true,
172
-    render: (text, record) => (
173
-      <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
174
-    ),
175
-  },
176 158
   {
177 159
     title: '访问人数',
178 160
     dataIndex: 'visitPersonNum',
@@ -200,6 +182,24 @@ let columns = [
200 182
       <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
201 183
     ),
202 184
   },
185
+  {
186
+    title: '分享人数',
187
+    dataIndex: 'sharePersonNum',
188
+    key: 'sharePersonNum',
189
+    sorter: true,
190
+    render: (text, record) => (
191
+      <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
192
+    ),
193
+  },
194
+  {
195
+    title: '分享次数',
196
+    dataIndex: 'shareNum',
197
+    key: 'shareNum',
198
+    sorter: true,
199
+    render: (text, record) => (
200
+      <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
201
+    ),
202
+  },
203 203
   {
204 204
     title: '详情',
205 205
     align: 'center',
@@ -225,14 +225,14 @@ class OverView extends React.Component {
225 225
   constructor(props) {
226 226
     super(props)
227 227
 
228
-    const defaultDays = 7
228
+    const defaultDays = 6
229 229
     dateType = defaultDays
230 230
     console.log(dateType)
231 231
     this.state = {
232 232
       radioVal: defaultDays,
233 233
       formData: {
234 234
 
235
-        startDate: moment().subtract(7, 'day').toDate(),
235
+        startDate: moment().subtract(6, 'day').toDate(),
236 236
         endDate: new Date,
237 237
         buildingId: '',
238 238
         targetType: '',
@@ -295,7 +295,6 @@ class OverView extends React.Component {
295 295
         activityName: activityName
296 296
       }
297 297
     }, this.getTableList)
298
-    // this.setState({ startDate: startDate, endDate: endDate, buildingId: this.props.form.getFieldValue("buildingId"), targetType: this.props.form.getFieldValue("targetType") })
299 298
   }
300 299
 
301 300
   //重置搜索
@@ -319,18 +318,6 @@ class OverView extends React.Component {
319 318
     }).catch()
320 319
   }
321 320
 
322
-  getDataOf = (days) => {
323
-    this.setState({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
324
-    this.getList({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
325
-  }
326
-
327
-  datalist = () => {
328
-    this.setState({
329
-      endDate: daterange[1] === '' ? new Date() : daterange[1],
330
-      startDate: daterange[0] === '' ? moment().subtract(7, 'day').toDate() : daterange[0],
331
-    })
332
-  }
333
-
334 321
   //排序
335 322
   handleTableChange = (pagination, filters, sorter) => {
336 323
     console.log(pagination, filters, sorter)
@@ -377,7 +364,7 @@ class OverView extends React.Component {
377 364
       <div >
378 365
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
379 366
           <Radio.Button value={0}>今日</Radio.Button>
380
-          <Radio.Button value={7}>最近7天</Radio.Button>
367
+          <Radio.Button value={6}>最近7天</Radio.Button>
381 368
           <Radio.Button value={30}>最近1月</Radio.Button>
382 369
         </Radio.Group>
383 370
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
@@ -415,7 +402,7 @@ class OverView extends React.Component {
415 402
             </Form.Item>
416 403
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
417 404
               <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
418
-                查询
405
+                搜索
419 406
             </Button>
420 407
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
421 408
           </Form.Item>

+ 0
- 21
src/pages/statistical/activity/compenents/ContentDesc.jsx Ver arquivo

@@ -1,21 +0,0 @@
1
-import React, { PureComponent } from 'react'
2
-import { Modal, Row, Col } from 'antd'
3
-
4
-import Style from './style.less'
5
-
6
-
7
-export default function SaleBatchListHelpDoc(props) {
8
-  return (
9
-    <Modal footer={null} title="相关说明" visible={props.visible} onCancel={props.onCancel} width={800}>
10
-      <div className={Style.article}>
11
-        <div className={Style.section}>
12
-          <div>
13
-          1.楼盘多次开盘加推等销售行为,记录为多个“销售批次”,每个批次销售当前楼盘的一批不同房源。同一楼盘不同批次中房源不能重叠。<br/><br/>
14
-          2.发布状态为销售批次的发布状态,若为未发布,则小程序端无法查看房源、预选认筹。<br/><br/>
15
-          3.房源预选功能在预选管理中管理。房源认筹功能在认筹管理中管理。如果看不到左侧相关菜单或功能,请联系管理员配置。</div>
16
-        </div>
17
-        
18
-      </div>
19
-    </Modal>
20
-  );
21
-}

+ 17
- 17
src/pages/statistical/activity/compenents/NewUsers.jsx Ver arquivo

@@ -58,7 +58,7 @@ const NewUsers = (props) => {
58 58
       },
59 59
       icon: "rect",
60 60
       legend: {
61
-        data: ["分享次数", "分享人数", "访问次数", "访问人数", "新增注册用户"]
61
+        data: ["访问人数", "访问次数", "新增注册用户", "分享人数", "分享次数"]
62 62
       },
63 63
       toolbox: {},
64 64
       xAxis: {
@@ -68,7 +68,17 @@ const NewUsers = (props) => {
68 68
       dataZoom,
69 69
       series: [
70 70
         {
71
-          name: "分享次数",
71
+          name: "访问人数",
72
+          type: "line",
73
+          smooth:true, 
74
+        },
75
+        {
76
+          name: "访问次数",
77
+          type: "line",
78
+          smooth:true, 
79
+        },
80
+        {
81
+          name: "新增注册用户",
72 82
           type: "line",
73 83
           smooth:true, 
74 84
         },
@@ -78,23 +88,13 @@ const NewUsers = (props) => {
78 88
           smooth:true, 
79 89
         },
80 90
         {
81
-            name: "访问次数",
82
-            type: "line",
83
-            smooth:true, 
84
-          },
85
-          {
86
-            name: "访问人数",
87
-            type: "line",
88
-            smooth:true, 
89
-          },
90
-          {
91
-            name: "新增注册用户",
92
-            type: "line",
93
-            smooth:true, 
94
-          }
91
+          name: "分享次数",
92
+          type: "line",
93
+          smooth:true, 
94
+        },
95 95
       ],
96 96
       dataset: {
97
-        dimensions: ['date', 'shareCount', 'sharePersonCount', 'visitCount', 'visitPersonCount', 'addregistCount'],
97
+        dimensions: ['date', 'visitPersonCount', 'visitCount', 'addregistCount', 'sharePersonCount',  'shareCount'],
98 98
         source: dataset
99 99
       }
100 100
     

+ 105
- 51
src/pages/statistical/activity/compenents/OverView.jsx Ver arquivo

@@ -107,24 +107,6 @@ let columns = [
107 107
     dataIndex: 'date',
108 108
     key: 'date',
109 109
   },
110
-  {
111
-    title: '分享人数',
112
-    dataIndex: 'sharePersonNum',
113
-    key: 'sharePersonNum',
114
-    sorter: true,
115
-    render: (text, record) => (
116
-    <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
117
-    ),
118
-  },
119
-  {
120
-    title: '分享次数',
121
-    dataIndex: 'shareNum',
122
-    key: 'shareNum',
123
-    sorter: true,
124
-    render: (text, record) => (
125
-      <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
126
-      ),
127
-  },
128 110
   {
129 111
     title: '访问人数',
130 112
     dataIndex: 'visitPersonNum',
@@ -152,6 +134,24 @@ let columns = [
152 134
       <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
153 135
       ),
154 136
   },
137
+  {
138
+    title: '分享人数',
139
+    dataIndex: 'sharePersonNum',
140
+    key: 'sharePersonNum',
141
+    sorter: true,
142
+    render: (text, record) => (
143
+    <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
144
+    ),
145
+  },
146
+  {
147
+    title: '分享次数',
148
+    dataIndex: 'shareNum',
149
+    key: 'shareNum',
150
+    sorter: true,
151
+    render: (text, record) => (
152
+      <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
153
+      ),
154
+  },
155 155
 ]
156 156
 
157 157
 
@@ -170,12 +170,12 @@ class OverView extends React.Component {
170 170
   constructor(props) {
171 171
     super(props)
172 172
 
173
-    const defaultDays = 7
173
+    const defaultDays = 6
174 174
 
175 175
     this.state = {
176 176
       radioVal: defaultDays,
177 177
       formData: {
178
-        startDate: moment().subtract(7, 'day').toDate(),
178
+        startDate: moment().subtract(6, 'day').toDate(),
179 179
         endDate: new Date,
180 180
         buildingId: '',
181 181
         targetType: '',
@@ -193,6 +193,7 @@ class OverView extends React.Component {
193 193
       startDate: '',
194 194
       buildingId: [],
195 195
       targetType: [],
196
+      helpVisible: false,
196 197
     }
197 198
   }
198 199
 
@@ -244,7 +245,7 @@ class OverView extends React.Component {
244 245
     if (this.props.form.getFieldValue("startDate") != undefined){
245 246
       startDate = this.props.form.getFieldValue("startDate").toDate()
246 247
     }else{
247
-      startDate = moment().subtract(7, 'day').toDate()
248
+      startDate = moment().subtract(6, 'day').toDate()
248 249
     }
249 250
     if (this.props.form.getFieldValue("endDate") != undefined){
250 251
       endDate = this.props.form.getFieldValue("endDate").toDate()
@@ -267,6 +268,29 @@ class OverView extends React.Component {
267 268
   //重置搜索
268 269
   handleReset = e => {
269 270
     this.props.form.resetFields()
271
+    this.setState( {
272
+      radioVal: 6,
273
+      formData: {
274
+        startDate: moment().subtract(6, 'day').toDate(),
275
+        endDate: new Date,
276
+        buildingId: '',
277
+        targetType: '',
278
+        pageNum:'',
279
+        pageSize:'',
280
+        sort:null,
281
+        colKey:null
282
+      },
283
+      personData: [],  
284
+      dataSoures: [],
285
+      tableData: [],
286
+      barData: {},
287
+      userType: 'all',
288
+      endDate: '',
289
+      startDate: '',
290
+      buildingId: [],
291
+      targetType: [],
292
+      helpVisible: false,
293
+    })
270 294
     this.getAllList()
271 295
   }
272 296
 
@@ -286,18 +310,6 @@ class OverView extends React.Component {
286 310
     }).catch()
287 311
   }
288 312
 
289
-  getDataOf = (days) => {
290
-    this.setState({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
291
-    this.getList({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
292
-  }
293
-
294
-  datalist = () => {
295
-    this.setState({ 
296
-      endDate: daterange[1] === '' ? new Date() : daterange[1],
297
-      startDate: daterange[0] === '' ? moment().subtract(7, 'day').toDate() : daterange[0],
298
-    })
299
-  }
300
-
301 313
   //排序
302 314
   handleTableChange = (pagination, filters, sorter) => {
303 315
     console.log(pagination, filters, sorter)
@@ -335,6 +347,9 @@ class OverView extends React.Component {
335 347
     }, this.getAllList)
336 348
   }
337 349
 
350
+  setShowHelp = (e) => {
351
+    this.setState({ ...this.state, helpVisible: e })
352
+  }
338 353
 
339 354
   render() {
340 355
     const { radioVal } = this.state
@@ -347,17 +362,22 @@ class OverView extends React.Component {
347 362
       <div >
348 363
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
349 364
           <Radio.Button value={0}>今日</Radio.Button>
350
-          <Radio.Button value={7}>最近7天</Radio.Button>
365
+          <Radio.Button value={6}>最近7天</Radio.Button>
351 366
           <Radio.Button value={30}>最近1月</Radio.Button>
352 367
         </Radio.Group>
353 368
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
354 369
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
355
-            {getFieldDecorator('startDate')(
370
+            {getFieldDecorator('startDate', {initialValue: moment(startDate)
371
+              
372
+            })(
356 373
                 <DatePicker placeholder="开始日期"/>,
357 374
             )}
358 375
             </Form.Item>
359 376
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
360
-            {getFieldDecorator('endDate')(
377
+            {getFieldDecorator('endDate', {
378
+                initialValue: moment(endDate)
379
+
380
+              })(
361 381
                 <DatePicker placeholder="结束日期"/>,
362 382
             )}
363 383
             </Form.Item>
@@ -381,7 +401,7 @@ class OverView extends React.Component {
381 401
             </Button>
382 402
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
383 403
           </Form.Item>
384
-          <Icon type="question-circle" theme="filled" style={{ marginTop:'25px', fontSize: '25px', color: '#F00', marginLeft:'30px'}} onClick={() => setShowHelp(true)}/>
404
+          <Icon type="question-circle" theme="filled" style={{ marginTop:'25px', fontSize: '25px', color: '#F00', marginLeft:'30px'}} onClick={() => this.setShowHelp(true)}/>
385 405
           
386 406
           </Form>     
387 407
           
@@ -389,32 +409,32 @@ class OverView extends React.Component {
389 409
 
390 410
             <div style={{ display: 'flex', marginBottom: '33px' }}>
391 411
             <div style={{
392
-                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',
393
-                borderRadius: '12px', width: '32%', marginRight: '2%'
394
-            }}>
395
-                <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
396
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
397
-            </div>
398
-            <div style={{
399
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
412
+                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(150,83,215,1) 0%,rgba(208,160,255,1) 100%)', height: '100px',
400 413
                 borderRadius: '12px', width: '32%', marginRight: '2%'
401 414
             }}>
402
-                <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
403
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
404
-            </div>
415
+                <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
416
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
417
+            </div>  
405 418
             <div style={{
406 419
                 textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
407 420
                 borderRadius: '12px', width: '32%', marginRight: '2%'
408 421
             }}>
409 422
                 <span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
410 423
                 <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitNum || '0'}</span>
424
+            </div>  
425
+            <div style={{
426
+                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
427
+                borderRadius: '12px', width: '32%', marginRight: '2%'
428
+            }}>
429
+                <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
430
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
411 431
             </div>
412 432
             <div style={{
413
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(150,83,215,1) 0%,rgba(208,160,255,1) 100%)', height: '100px',
433
+                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',
414 434
                 borderRadius: '12px', width: '32%', marginRight: '2%'
415 435
             }}>
416
-                <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
417
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
436
+                <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
437
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
418 438
             </div>
419 439
             </div>
420 440
           
@@ -431,6 +451,40 @@ class OverView extends React.Component {
431 451
           <Table style={{marginTop:'20px'}} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total}} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
432 452
         </div>
433 453
       </div>
454
+
455
+      <Modal
456
+          title="指标说明"
457
+          visible={this.state.helpVisible}
458
+          onCancel={() => this.setShowHelp(false)}
459
+          footer={null}
460
+        >
461
+          <Row>
462
+          <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享人数:</p>
463
+          <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>分享小程序活动的总人数</p>
464
+            
465
+            
466
+          </Row>
467
+          <Row>
468
+          <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享次数:</p>
469
+          <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>触发小程序活动分享的总次数</p>
470
+          </Row>
471
+          
472
+          <Row>
473
+          <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>新增注册用户:</p>
474
+          <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>通过分享的活动授权手机号的总人数</p>
475
+          </Row>
476
+          
477
+          <Row>
478
+          <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>访问人数:</p>
479
+          <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问小程序活动的总人数</p>
480
+          </Row>
481
+          
482
+          <Row>
483
+          <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>访问次数:</p>
484
+          <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问小程序活动的总次数</p> 
485
+          </Row>
486
+          
487
+        </Modal>
434 488
     </>
435 489
     )
436 490
     

+ 50
- 32
src/pages/statistical/activity/detail.jsx Ver arquivo

@@ -37,7 +37,7 @@ function record(props) {
37 37
     // 查询列表
38 38
     const getList = (params) => {
39 39
         request({ ...apis.stats.activityDetail, params: { ...params }, }).then((data) => {
40
-            setData(data)
40
+            setData((data || []).slice().reverse())
41 41
             setChartsData(data)
42 42
             updataLoading(false)
43 43
         }).catch(err => {
@@ -47,7 +47,18 @@ function record(props) {
47 47
 
48 48
     //重置搜索
49 49
     function handleReset() {
50
+        updateRadioVal(6)
51
+        updateFormData({
52
+            ...formData,
53
+            startDate: moment().subtract(6, 'day').format('YYYYMMDD'),
54
+            endDate: moment().format('YYYYMMDD'),
55
+        })
50 56
         props.form.resetFields();
57
+        getList({
58
+            ...formData,
59
+            startDate: moment().subtract(6, 'day').format('YYYYMMDD'),
60
+            endDate: moment().format('YYYYMMDD'),
61
+        });
51 62
     }
52 63
 
53 64
     // 提交事件
@@ -63,17 +74,18 @@ function record(props) {
63 74
             }
64 75
         });
65 76
     }
77
+
66 78
     // 切换日期 与picker联动
67 79
     function setFormData(e) {
68 80
         updateRadioVal(e.target.value)
69 81
         updateFormData({
70 82
             ...formData,
71
-            startDate: moment().subtract(e.target.value, 'day').format('YYYY-MM-DD'),
72
-            endDate: moment().format('YYYY-MM-DD'),
83
+            startDate: moment().subtract(e.target.value, 'day').format('YYYYMMDD'),
84
+            endDate: moment().format('YYYYMMDD'),
73 85
         })
74 86
         getList({
75
-            ...formData, startDate: moment().subtract(e.target.value, 'day').format('YYYY-MM-DD'),
76
-            endDate: moment().format('YYYY-MM-DD'),
87
+            ...formData, startDate: moment().subtract(e.target.value, 'day').format('YYYYMMDD'),
88
+            endDate: moment().format('YYYYMMDD'),
77 89
         });
78 90
 
79 91
     }
@@ -187,29 +199,12 @@ function record(props) {
187 199
             key: 'statisDate',
188 200
             align: 'center',
189 201
         },
190
-        {
191
-            title: '分享人数',
192
-            dataIndex: 'sharePersons',
193
-            key: 'sharePersons',
194
-            sorter: true,
195
-            render: (text, record) => (
196
-                <a style={{ color: '#66B3FF' }} onClick={toSharePersons(record)}><span>{record.sharePersons}</span></a>
197
-            ),
198
-        },
199
-        {
200
-            title: '分享次数',
201
-            dataIndex: 'shareNum',
202
-            key: 'shareNum',
203
-            sorter: true,
204
-            render: (text, record) => (
205
-                <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
206
-            ),
207
-        },
208 202
         {
209 203
             title: '访问人数',
210 204
             dataIndex: 'visitPersons',
211 205
             key: 'visitPersons',
212 206
             sorter: true,
207
+            align: 'center',
213 208
             render: (text, record) => (
214 209
                 <a style={{ color: '#66B3FF' }} onClick={toAddVisitPersonNum(record)}><span>{record.visitPersons}</span></a>
215 210
             ),
@@ -219,6 +214,7 @@ function record(props) {
219 214
             dataIndex: 'visitNum',
220 215
             key: 'visitNum',
221 216
             sorter: true,
217
+            align: 'center',
222 218
             render: (text, record) => (
223 219
                 <a style={{ color: '#66B3FF' }} onClick={toAddVisitNum(record)}><span>{record.visitNum}</span></a>
224 220
             ),
@@ -228,10 +224,31 @@ function record(props) {
228 224
             dataIndex: 'newCustomers',
229 225
             key: 'newCustomers',
230 226
             sorter: true,
227
+            align: 'center',
231 228
             render: (text, record) => (
232 229
                 <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.newCustomers}</span></a>
233 230
             ),
234 231
         },
232
+        {
233
+            title: '分享人数',
234
+            dataIndex: 'sharePersons',
235
+            key: 'sharePersons',
236
+            sorter: true,
237
+            align: 'center',
238
+            render: (text, record) => (
239
+                <a style={{ color: '#66B3FF' }} onClick={toSharePersons(record)}><span>{record.sharePersons}</span></a>
240
+            ),
241
+        },
242
+        {
243
+            title: '分享次数',
244
+            dataIndex: 'shareNum',
245
+            key: 'shareNum',
246
+            sorter: true,
247
+            align: 'center',
248
+            render: (text, record) => (
249
+                <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
250
+            ),
251
+        },
235 252
     ];
236 253
     // 下载文档
237 254
     function download(data) {
@@ -284,7 +301,7 @@ function record(props) {
284 301
         },
285 302
         icon: "rect",
286 303
         legend: {
287
-            data: ["分享次数", "分享人数", "访问次数", "访问人数", "新增注册用户"]
304
+            data: ["访问人数", "访问次数", "新增注册用户", "分享人数", "分享次数"]
288 305
         },
289 306
         toolbox: {},
290 307
         xAxis: {
@@ -294,28 +311,29 @@ function record(props) {
294 311
         dataZoom,
295 312
         series: [
296 313
             {
297
-                name: "分享次数",
314
+                name: "访问人数",
298 315
                 type: "line",
299 316
             },
300 317
             {
301
-                name: "分享人数",
318
+                name: "访问次数",
302 319
                 type: "line",
303 320
             },
321
+
304 322
             {
305
-                name: "访问次数",
323
+                name: "新增注册用户",
306 324
                 type: "line",
307 325
             },
308 326
             {
309
-                name: "访问人数",
327
+                name: "分享人数",
310 328
                 type: "line",
311 329
             },
312 330
             {
313
-                name: "新增注册用户",
331
+                name: "分享次数",
314 332
                 type: "line",
315 333
             }
316 334
         ],
317 335
         dataset: {
318
-            dimensions: ['statisDate', 'shareNum', 'sharePersons', 'visitNum', 'visitPersons', 'newCustomers'],
336
+            dimensions: ['statisDate', 'visitPersons', 'visitNum', 'newCustomers', 'sharePersons', 'shareNum'],
319 337
             source: dataset
320 338
         }
321 339
     }
@@ -339,8 +357,8 @@ function record(props) {
339 357
                     <Form.Item>
340 358
                         <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
341 359
                     </Form.Item>
342
-                    <Form.Item style={{ position: 'absolute', right: '38px' }}>
343
-                        <Button type="primary" onClick={handleSubmit}>查询</Button>
360
+                    <Form.Item>
361
+                        <Button type="primary" onClick={handleSubmit}>搜索</Button>
344 362
                         <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
345 363
                     </Form.Item>
346 364
                 </div>

+ 0
- 1
src/pages/statistical/activity/index.jsx Ver arquivo

@@ -7,7 +7,6 @@ import { router } from 'umi';
7 7
 
8 8
 import OverView from './compenents/OverView'
9 9
 import Content from './compenents/Content'
10
-import ContentDesc from './compenents/ContentDesc'
11 10
 
12 11
 
13 12
 

+ 32
- 0
src/pages/statistical/activity/shareNum.jsx Ver arquivo

@@ -128,6 +128,38 @@ class SharePersonNum extends React.Component {
128 128
   //重置搜索
129 129
   handleReset = e => {
130 130
     this.props.form.resetFields()
131
+    let startDate;
132
+    let endDate;
133
+    if (this.props.location.query.queryDate){
134
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
135
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
136
+    }else{
137
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
138
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
139
+    }
140
+    this.setState({
141
+      formData: {
142
+        sharePhone: '',
143
+        sharePersonType: '',
144
+        pageNum:'',
145
+        pageSize:'',
146
+        shareName:'',
147
+        sort:null,
148
+        colKey:null,
149
+        startDate: startDate,
150
+        endDate: endDate,
151
+        activityId: this.props.location.query.activityId,
152
+        activityType:this.props.location.query.activityType,
153
+        personId: this.props.location.query.personId,
154
+        buildingId: this.props.location.query.buildingId   
155
+      },
156
+      personData: [],  
157
+      dataSoures: [],
158
+      tableData: [],
159
+      userType: 'all',
160
+      activityName:  this.props.location.query.activityName
161
+    })
162
+    this.getTableList()
131 163
   }
132 164
 
133 165
   goback = () => {

+ 38
- 0
src/pages/statistical/activity/sharePersonNum.jsx Ver arquivo

@@ -209,6 +209,44 @@ class SharePersonNum extends React.Component {
209 209
   //重置搜索
210 210
   handleReset = e => {
211 211
     this.props.form.resetFields()
212
+    let startDate;
213
+    let endDate;
214
+    queryDate = this.props.location.query.queryDate
215
+    activityName = this.props.location.query.activityName
216
+    staticStartDate = this.props.location.query.startDate;
217
+    staticEndDate = this.props.location.query.endDate;
218
+    activityId = this.props.location.query.activityId;
219
+    activityType = this.props.location.query.activityType;
220
+    
221
+    if (this.props.location.query.queryDate){
222
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
223
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
224
+    }else{
225
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
226
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
227
+    }
228
+    this.setState({
229
+      formData: {
230
+        sharePhone: '',
231
+        sharePersonType: '',
232
+        pageNum:'',
233
+        pageSize:'',
234
+        shareName:'',
235
+        sort:null,
236
+        colKey:null,
237
+        startDate: startDate,
238
+        endDate: endDate,
239
+        activityId: this.props.location.query.activityId,
240
+        activityType: this.props.location.query.activityType,
241
+        buildingId: this.props.location.query.buildingId,         
242
+      },
243
+      personData: [],  
244
+      dataSoures: [],
245
+      tableData: [],
246
+      userType: 'all',
247
+      activityName:  this.props.location.query.activityName
248
+    }) 
249
+    this.getTableList()
212 250
   }
213 251
 
214 252
   goback = () => {

+ 31
- 0
src/pages/statistical/activity/visitNum.jsx Ver arquivo

@@ -151,6 +151,37 @@ class SharePersonNum extends React.Component {
151 151
   //重置搜索
152 152
   handleReset = e => {
153 153
     this.props.form.resetFields()
154
+    let startDate;
155
+    let endDate;
156
+    if (this.props.location.query.queryDate){
157
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
158
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
159
+    }else{
160
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
161
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
162
+    }
163
+    this.setState({
164
+      formData: {
165
+        personFrom: '',
166
+        pageNum:'',
167
+        pageSize:'',
168
+        startDate: startDate,
169
+        endDate: endDate,
170
+        province:'',
171
+        realtyConsultant:'',
172
+        realtyConsultantPhone:'',
173
+        activityId: this.props.location.query.activityId,
174
+        activityType:this.props.location.query.activityType,
175
+        personId: this.props.location.query.personId,
176
+        buildingId: this.props.location.query.buildingId
177
+      },
178
+      personData: [],  
179
+      dataSoures: [],
180
+      tableData: [],
181
+      userType: 'all',
182
+      activityName:  this.props.location.query.activityName
183
+    })
184
+    this.getTableList()
154 185
   }
155 186
 
156 187
   goback = () => {

+ 32
- 0
src/pages/statistical/activity/visitPersonNum.jsx Ver arquivo

@@ -146,6 +146,38 @@ class SharePersonNum extends React.Component {
146 146
   //重置搜索
147 147
   handleReset = e => {
148 148
     this.props.form.resetFields()
149
+    let startDate;
150
+    let endDate;
151
+    
152
+    if (this.props.location.query.queryDate){
153
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
154
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
155
+    }else{
156
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
157
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
158
+    }
159
+    this.setState({
160
+      formData: {
161
+        personFrom: '',
162
+        pageNum:'',
163
+        pageSize:'',
164
+        startDate: startDate,
165
+        endDate: endDate,
166
+        province:'',
167
+        realtyConsultant:'',
168
+        realtyConsultantPhone:'',
169
+        activityId: this.props.location.query.activityId,
170
+        activityType: this.props.location.query.activityType ,
171
+        personId:  this.props.location.query.personId,
172
+        buildingId: this.props.location.query.buildingId
173
+      },
174
+      personData: [],  
175
+      dataSoures: [],
176
+      tableData: [],
177
+      userType: 'all',
178
+      activityName: this.props.location.query.activityName
179
+    })
180
+    this.getTableList()
149 181
   }
150 182
 
151 183
   goback = () => {

+ 17
- 14
src/pages/statistical/building/detail.jsx Ver arquivo

@@ -29,12 +29,13 @@ class buildingDetailStats extends React.Component {
29 29
       startDate: {},
30 30
       buildingId: props.location.query.buildingId,
31 31
       buildingName: props.location.query.buildingName,
32
+      radioValue: 'a'
32 33
     }
33 34
   }
34 35
 
35 36
   componentDidMount() {
36
-    this.getTimeBarDate(moment().subtract(7, 'day').toDate(),new Date())
37
-    this.getTimeTableData(moment().subtract(7, 'day').toDate(),new Date())
37
+    this.getTimeBarDate(moment().subtract(6, 'day').toDate(),new Date())
38
+    this.getTimeTableData(moment().subtract(6, 'day').toDate(),new Date())
38 39
     this.setState({...this.state, endDate: new Date(), startDate: moment().subtract(7, 'day').toDate() })
39 40
     
40 41
   }
@@ -66,20 +67,20 @@ class buildingDetailStats extends React.Component {
66 67
   }
67 68
 
68 69
   //切换三个标签页
69
-  getDataOf = (days) => {
70
+  getDataOf = (days,val) => {
70 71
     this.getTimeBarDate(moment().subtract(days, 'day').toDate(),new Date())
71 72
     this.getTimeTableData(moment().subtract(days, 'day').toDate(),new Date())
72
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
73
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate(), radioValue: val })
73 74
   }
74 75
 
75 76
   //点击查询
76 77
   datalist = () => {
77
-    this.getTimeBarDate(daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0],daterange[1] === undefined ? new Date() : daterange[1])
78
-    this.getTimeTableData(daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0],daterange[1] === undefined ? new Date() : daterange[1])
78
+    this.getTimeBarDate(daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0],daterange[1] === undefined ? new Date() : daterange[1])
79
+    this.getTimeTableData(daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0],daterange[1] === undefined ? new Date() : daterange[1])
79 80
     this.setState({ 
80 81
       ...this.state,
81 82
       endDate: daterange[1] === undefined ? new Date() : daterange[1],
82
-      startDate: daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0],
83
+      startDate: daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0],
83 84
     })
84 85
     
85 86
   }
@@ -113,6 +114,9 @@ class buildingDetailStats extends React.Component {
113 114
   handleReset = () => {
114 115
     daterange = []
115 116
     this.props.form.resetFields();
117
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate(), radioValue: "a" })
118
+    this.getTimeBarDate(moment().subtract(6, 'day').toDate(),new Date())
119
+    this.getTimeTableData(moment().subtract(6, 'day').toDate(),new Date())
116 120
   }
117 121
 
118 122
   render() {
@@ -152,15 +156,14 @@ class buildingDetailStats extends React.Component {
152 156
     return (
153 157
     <div>
154 158
       <Form layout="inline">
155
-      <Radio.Group buttonStyle="solid" defaultValue="a">
156
-          <Radio.Button value="c" onClick={() => this.getDataOf(0)}>今日</Radio.Button>
157
-          <Radio.Button value="a" onClick={() => this.getDataOf(7)}>最近7天</Radio.Button>
158
-          <Radio.Button value="b" onClick={() => this.getDataOf(30)}>最近1月</Radio.Button>
159
+      <Radio.Group buttonStyle="solid" value={this.state.radioValue}>
160
+          <Radio.Button value="c" onClick={() => this.getDataOf(0,"c")}>今日</Radio.Button>
161
+          <Radio.Button value="a" onClick={() => this.getDataOf(6,"a")}>最近7天</Radio.Button>
162
+          <Radio.Button value="b" onClick={() => this.getDataOf(30,"b")}>最近1月</Radio.Button>
159 163
         </Radio.Group>
160 164
         <Form.Item>
161 165
         {getFieldDecorator('time', {
162 166
             initialValue: [],
163
-            rules: [{ required: true, message: '请上传封面图1' }],
164 167
         })(
165 168
           <RangePicker
166 169
             style={{ paddingLeft: '30px' }}
@@ -173,9 +176,9 @@ class buildingDetailStats extends React.Component {
173 176
         )}
174 177
         </Form.Item>
175 178
         <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }} onClick={() => this.datalist()}>
176
-          查询
179
+          搜索
177 180
         </Button>
178
-        <Button type="danger" onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
181
+        <Button onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
179 182
         </Form>
180 183
         <StatsChartLine title={this.state.buildingName} data={this.state.barData} />
181 184
         <Row>

+ 19
- 16
src/pages/statistical/building/index.jsx Ver arquivo

@@ -27,14 +27,15 @@ class buildingStats extends React.Component {
27 27
       userType: 'all',
28 28
       endDate: {},
29 29
       startDate: {},
30
-      buildingId: ''
30
+      buildingId: '',
31
+      radioValue: 'a'
31 32
     }
32 33
   }
33 34
 
34 35
   componentDidMount() {
35
-    this.getBarData(moment().subtract(7, 'day').toDate(), new Date())
36
-    this.getTableData(moment().subtract(7, 'day').toDate(), new Date(), this.state.buildingId)
37
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(7, 'day').toDate() })
36
+    this.getBarData(moment().subtract(6, 'day').toDate(), new Date())
37
+    this.getTableData(moment().subtract(6, 'day').toDate(), new Date(), this.state.buildingId)
38
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate() })
38 39
 
39 40
   }
40 41
 
@@ -65,20 +66,20 @@ class buildingStats extends React.Component {
65 66
   }
66 67
 
67 68
   //切换三个标签页
68
-  getDataOf = (days) => {
69
+  getDataOf = (days,val) => {
69 70
     this.getBarData(moment().subtract(days, 'day').toDate(), new Date())
70 71
     this.getTableData(moment().subtract(days, 'day').toDate(), new Date(), this.state.buildingId)
71
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
72
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate(), radioValue: val })
72 73
   }
73 74
 
74 75
   //点击查询
75 76
   datalist = () => {
76
-    this.getBarData(daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0], daterange[1] === undefined ? new Date() : daterange[1])
77
-    this.getTableData(daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0], daterange[1] === undefined ? new Date() : daterange[1], this.state.buildingId)
77
+    this.getBarData(daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0], daterange[1] === undefined ? new Date() : daterange[1])
78
+    this.getTableData(daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0], daterange[1] === undefined ? new Date() : daterange[1], this.state.buildingId)
78 79
     this.setState({
79 80
       ...this.state,
80 81
       endDate: daterange[1] === undefined ? new Date() : daterange[1],
81
-      startDate: daterange[0] === undefined ? moment().subtract(7, 'day').toDate() : daterange[0],
82
+      startDate: daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0],
82 83
     })
83 84
 
84 85
   }
@@ -129,6 +130,9 @@ class buildingStats extends React.Component {
129 130
   handleReset = () => {
130 131
     daterange = []
131 132
     this.props.form.resetFields();
133
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate(), radioValue: "a" })
134
+    this.getBarData(moment().subtract(6, 'day').toDate(), new Date())
135
+    this.getTableData(moment().subtract(6, 'day').toDate(), new Date(), this.state.buildingId)
132 136
   }
133 137
 
134 138
   render() {
@@ -181,15 +185,14 @@ class buildingStats extends React.Component {
181 185
 
182 186
     <div>
183 187
       <Form layout="inline">
184
-      <Radio.Group buttonStyle="solid" defaultValue="a">
185
-          <Radio.Button value="c" onClick={() => this.getDataOf(0)}>今日</Radio.Button>
186
-          <Radio.Button value="a" onClick={() => this.getDataOf(7)}>最近7天</Radio.Button>
187
-          <Radio.Button value="b" onClick={() => this.getDataOf(30)}>最近1月</Radio.Button>
188
+      <Radio.Group buttonStyle="solid" value={this.state.radioValue}>
189
+          <Radio.Button value="c" onClick={() => this.getDataOf(0,"c")}>今日</Radio.Button>
190
+          <Radio.Button value="a" onClick={() => this.getDataOf(6,"a")}>最近7天</Radio.Button>
191
+          <Radio.Button value="b" onClick={() => this.getDataOf(30,"b")}>最近1月</Radio.Button>
188 192
         </Radio.Group>
189 193
         <Form.Item>
190 194
         {getFieldDecorator('time', {
191 195
             initialValue: [],
192
-            rules: [{ required: true, message: '请上传封面图1' }],
193 196
         })(
194 197
           <RangePicker
195 198
               style={{ paddingLeft: '30px' }}
@@ -202,9 +205,9 @@ class buildingStats extends React.Component {
202 205
         )}
203 206
         </Form.Item>
204 207
         <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }} onClick={() => this.datalist()}>
205
-          查询
208
+          搜索
206 209
         </Button>
207
-        <Button type="danger" onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
210
+        <Button onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
208 211
         </Form>
209 212
         <div style={{fontSize:'0.09rem',color:'#999',marginBottom:'0.16rem'}}>最多显示6个项目,其他项目请在下方详细数据中搜索</div>
210 213
         <Row>

+ 2
- 1
src/pages/statistical/consultant/homePagePersons.jsx Ver arquivo

@@ -115,7 +115,8 @@ function record(props) {
115 115
 
116 116
         <>
117 117
             <Button type="danger" style={{ marginLeft: '18px' }} onClick={() => router.go(-1)}>返回</Button>
118
-            <Table rowKey={record => (record.phone + record.buildingId || '')}
118
+            <Table rowKey={(index => { index })}
119
+                // <Table rowKey={record => (record.phone + record.buildingId || '')}
119 120
                 style={{ marginTop: '30px' }}
120 121
                 dataSource={data.records}
121 122
                 columns={columns}

+ 4
- 4
src/pages/statistical/consultant/index.jsx Ver arquivo

@@ -385,7 +385,7 @@ function record(props) {
385 385
     return (
386 386
 
387 387
         <>
388
-            <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00',marginBottom:'10px' }} onClick={() => setVisible(true)} />
388
+            <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginBottom: '10px' }} onClick={() => setVisible(true)} />
389 389
             <Modal
390 390
                 title="指标说明(数据会存在一定时间延迟)"
391 391
                 centered
@@ -425,8 +425,8 @@ function record(props) {
425 425
                     <Form.Item>
426 426
                         <BuildSelect value={formData.buildingId} onChange={handleBuildingChange} />
427 427
                     </Form.Item>
428
-                    <Form.Item style={{ position: 'absolute', right: '38px' }}>
429
-                        <Button type="primary" onClick={handleSubmit}>查询</Button>
428
+                    <Form.Item >
429
+                        <Button type="primary" onClick={handleSubmit}>搜索</Button>
430 430
                         <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
431 431
                     </Form.Item>
432 432
                 </div>
@@ -436,7 +436,7 @@ function record(props) {
436 436
                     导出
437 437
                 </Button>
438 438
             </AuthButton>
439
-            <Table rowKey={record => (record.userId + record.buildingId || '')}
439
+            <Table rowKey={(index => { index })}
440 440
                 style={{ marginTop: '30px' }}
441 441
                 dataSource={_list}
442 442
                 // dataSource={data.records}

+ 9
- 4
src/pages/statistical/consultant/sharetable.jsx Ver arquivo

@@ -64,6 +64,10 @@ const showTypeList = [
64 64
         label: '在线选房',
65 65
         value: 'houseApp',
66 66
     },
67
+    {
68
+        label: '个人主页',
69
+        value: 'consultant',
70
+    },
67 71
 ]
68 72
 
69 73
 /**
@@ -137,10 +141,10 @@ function record(props) {
137 141
         },
138 142
         {
139 143
             title: '分享时间',
140
-            dataIndex: 'createDate',
141
-            key: 'createDate',
144
+            dataIndex: 'visitTime',
145
+            key: 'visitTime',
142 146
             align: 'center',
143
-            render: (_, record) => <><span>{record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
147
+            render: (_, record) => <><span>{record.visitTime && moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
144 148
         },
145 149
 
146 150
     ];
@@ -175,7 +179,8 @@ function record(props) {
175 179
                     </Form.Item>
176 180
                 </div>
177 181
             </Form>
178
-            <Table rowKey={record => (record.personId + record.buildingId || '')}
182
+            <Table rowKey={(index => { index })}
183
+            // <Table rowKey={record => (record.personId + record.buildingId || '')}
179 184
                 style={{ marginTop: '30px' }}
180 185
                 dataSource={data.records}
181 186
                 columns={columns}

+ 3
- 3
src/pages/statistical/consultant/table.jsx Ver arquivo

@@ -135,10 +135,10 @@ function record(props) {
135 135
                 [
136 136
                     {
137 137
                         title: '报备时间',
138
-                        dataIndex: 'reportDate',
139
-                        key: 'reportDate',
138
+                        dataIndex: 'visitTime',
139
+                        key: 'visitTime',
140 140
                         align: 'center',
141
-                        render: (_, record) => <><span>{record.reportDate && moment(record.reportDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
141
+                        render: (_, record) => <><span>{record.visitTime && moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
142 142
                     },
143 143
                 ]
144 144
     const columns = basicColunms.concat(lastColum)

+ 5
- 4
src/pages/statistical/consultant/visitPersons.jsx Ver arquivo

@@ -95,10 +95,10 @@ function record(props) {
95 95
         },
96 96
         {
97 97
             title: '最后访问时间',
98
-            dataIndex: 'createDate',
99
-            key: 'createDate',
98
+            dataIndex: 'visitTime',
99
+            key: 'visitTime',
100 100
             align: 'center',
101
-            render: (_, record) => <><span>{record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
101
+            render: (_, record) => <><span>{record.visitTime && moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
102 102
         },
103 103
 
104 104
     ];
@@ -107,7 +107,8 @@ function record(props) {
107 107
 
108 108
         <>
109 109
             <Button type="danger" style={{ marginLeft: '18px' }} onClick={() => router.go(-1)}>返回</Button>
110
-            <Table rowKey={record => (record.personId + record.buildingId || '')}
110
+            <Table rowKey={(index => { index })}
111
+            // <Table rowKey={record => (record.personId + record.buildingId || '')}
111 112
                 style={{ marginTop: '30px' }}
112 113
                 dataSource={data.records}
113 114
                 columns={columns}

+ 1
- 1
src/pages/system/document/list.jsx Ver arquivo

@@ -139,7 +139,7 @@ function body(props) {
139 139
         <Form.Item>
140 140
         <AuthButton name="admin.documentVerify.search" noRight={null}>
141 141
           <Button type="primary" htmlType="submit">
142
-            查询
142
+            搜索
143 143
           </Button>
144 144
           </AuthButton>
145 145
           &nbsp;&nbsp;&nbsp;&nbsp;