瀏覽代碼

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

zhoulisen 5 年之前
父節點
當前提交
ea6ca808d0

+ 1
- 1
src/components/SelectButton/AreaSelect.jsx 查看文件

48
       showSearch
48
       showSearch
49
       value={props.value}
49
       value={props.value}
50
       style={{ width: '300px' }}
50
       style={{ width: '300px' }}
51
-      placeholder="请选择城市"
51
+      placeholder="请选择区域"
52
       onChange={props.onChange}
52
       onChange={props.onChange}
53
       filterOption={(input, option) =>
53
       filterOption={(input, option) =>
54
         option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
54
         option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 11
- 0
src/pages/Monitor.jsx 查看文件

31
 
31
 
32
   function getBuildingReports() {
32
   function getBuildingReports() {
33
     request({ ...apis.system.taBuildingReports, }).then((data) => {
33
     request({ ...apis.system.taBuildingReports, }).then((data) => {
34
+      console.log(data,"22222222222222222")
34
       setCheckData((data.records || []).map((x) => x.reportCode))
35
       setCheckData((data.records || []).map((x) => x.reportCode))
35
     })
36
     })
36
   }
37
   }
58
             <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount || '0'}</span>
59
             <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount || '0'}</span>
59
           </div>
60
           </div>
60
         }
61
         }
62
+        {checkData.includes('total_number_of_visit_users') &&
63
+          <div style={{
64
+            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',
65
+            boxShadow: '0px  0.106rem 14px -15px rgba(255,126,74,1)',
66
+            borderRadius: '12px', width: '32%', marginRight: '2%'
67
+          }}>
68
+            <span style={{ fontSize: '24px', color: '#fff' }}>今日访问次数 </span>
69
+            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectVisitCount || '0'}</span>
70
+          </div>
71
+        }
61
         {checkData.includes('number_of_new_users') &&
72
         {checkData.includes('number_of_new_users') &&
62
           <div onClick={() => router.push('/statistical/newUsers')} style={{
73
           <div onClick={() => router.push('/statistical/newUsers')} style={{
63
             textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
74
             textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',

+ 93
- 93
src/pages/activity/editActivity.jsx 查看文件

57
     })
57
     })
58
   }
58
   }
59
 
59
 
60
-    // eslint-disable-next-line react-hooks/rules-of-hooks
61
-    useEffect(() => {
62
-      props.form.setFieldsValue({ isEnlist })
63
-      if (dynamicId) {
64
-        getDynamicData(dynamicId);
65
-      }
66
-    }, [])
67
- 
60
+  // eslint-disable-next-line react-hooks/rules-of-hooks
61
+  useEffect(() => {
62
+    props.form.setFieldsValue({ isEnlist })
63
+    if (dynamicId) {
64
+      getDynamicData(dynamicId);
65
+    }
66
+  }, [])
67
+
68
   const handleSubmit = e => {
68
   const handleSubmit = e => {
69
     e.preventDefault();
69
     e.preventDefault();
70
     props.form.validateFields((err, values) => {
70
     props.form.validateFields((err, values) => {
79
           values.enlistStart = moment(enlistStart).format('YYYY-MM-DD HH:mm');
79
           values.enlistStart = moment(enlistStart).format('YYYY-MM-DD HH:mm');
80
           values.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD HH:mm');
80
           values.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD HH:mm');
81
         }
81
         }
82
-        
82
+
83
         console.log('submit data --->', values)
83
         console.log('submit data --->', values)
84
         if (dynamicId) {
84
         if (dynamicId) {
85
           values.dynamicId = dynamicId
85
           values.dynamicId = dynamicId
112
     <>
112
     <>
113
       <Form {...formItemLayout} onSubmit={handleSubmit}>
113
       <Form {...formItemLayout} onSubmit={handleSubmit}>
114
         <Form.Item label="所属项目">
114
         <Form.Item label="所属项目">
115
-        {getFieldDecorator('buildingId', {
116
-          rules: [
117
-            {
118
-              required: true,
119
-              message: '请选择所属项目',
120
-            },
121
-          ],
122
-        })(<BuildSelect disabled={disable}/>)}
115
+          {getFieldDecorator('buildingId', {
116
+            rules: [
117
+              {
118
+                required: true,
119
+                message: '请选择所属项目',
120
+              },
121
+            ],
122
+          })(<BuildSelect disabled={disable} />)}
123
         </Form.Item>
123
         </Form.Item>
124
         <Form.Item label="活动封面图1" help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表">
124
         <Form.Item label="活动封面图1" help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表">
125
           {getFieldDecorator('listImgUrl', {
125
           {getFieldDecorator('listImgUrl', {
126
-          rules: [
127
-            {
128
-              required: true,
129
-              message: '请选择活动封面图1',
130
-            },
131
-          ],
132
-        })(<ImageUploader />)}
126
+            rules: [
127
+              {
128
+                required: true,
129
+                message: '请选择活动封面图1',
130
+              },
131
+            ],
132
+          })(<ImageUploader />)}
133
         </Form.Item>
133
         </Form.Item>
134
         <Form.Item label="活动封面图2" help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页">
134
         <Form.Item label="活动封面图2" help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页">
135
           {getFieldDecorator('bannerListImg', {
135
           {getFieldDecorator('bannerListImg', {
136
-          rules: [
137
-            {
138
-              required: true,
139
-              message: '请选择活动封面图2',
140
-            },
141
-          ],
142
-        })(<ImageUploader />)}
136
+            rules: [
137
+              {
138
+                required: true,
139
+                message: '请选择活动封面图2',
140
+              },
141
+            ],
142
+          })(<ImageUploader />)}
143
         </Form.Item>
143
         </Form.Item>
144
         <Form.Item label="活动详情主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情">
144
         <Form.Item label="活动详情主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情">
145
           {getFieldDecorator('imgUrl', {
145
           {getFieldDecorator('imgUrl', {
146
-          rules: [
147
-            {
148
-              required: true,
149
-              message: '请选择活动详情主图',
150
-            },
151
-          ],
152
-        })(<ImageUploader />)}
146
+            rules: [
147
+              {
148
+                required: true,
149
+                message: '请选择活动详情主图',
150
+              },
151
+            ],
152
+          })(<ImageUploader />)}
153
         </Form.Item>
153
         </Form.Item>
154
         <Form.Item label="活动标题">
154
         <Form.Item label="活动标题">
155
-        {getFieldDecorator('title', {
156
-          rules: [
157
-            {
158
-              required: true,
159
-              message: '请输入活动标题',
160
-            },
161
-          ],
162
-        })(<Input/>)}
155
+          {getFieldDecorator('title', {
156
+            rules: [
157
+              {
158
+                required: true,
159
+                message: '请输入活动标题',
160
+              },
161
+            ],
162
+          })(<Input />)}
163
         </Form.Item>
163
         </Form.Item>
164
         <Form.Item label="活动时间">
164
         <Form.Item label="活动时间">
165
-        {getFieldDecorator('activityTime', {
166
-          rules: [
167
-            {
168
-              required: true,
169
-              message: '请选择活动时间',
170
-            },
171
-          ],
172
-        })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus===0 ? true : false}/>)}
165
+          {getFieldDecorator('activityTime', {
166
+            rules: [
167
+              {
168
+                required: true,
169
+                message: '请选择活动时间',
170
+              },
171
+            ],
172
+          })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus === 0 ? true : false} />)}
173
         </Form.Item>
173
         </Form.Item>
174
         <Form.Item label="活动地点">
174
         <Form.Item label="活动地点">
175
-        {getFieldDecorator('address', {
176
-          rules: [
177
-            {
178
-              required: true,
179
-              message: '请输入活动地点',
180
-            },
181
-          ],
182
-        })(<Input disabled={activityStatus===0 ? true : false}/>)}
175
+          {getFieldDecorator('address', {
176
+            rules: [
177
+              {
178
+                required: true,
179
+                message: '请输入活动地点',
180
+              },
181
+            ],
182
+          })(<Input disabled={activityStatus === 0 ? true : false} />)}
183
         </Form.Item>
183
         </Form.Item>
184
-        <Form.Item label="活动人数">
185
-        {getFieldDecorator('personNum', {
186
-          rules: [
187
-            {
188
-              required: true,
189
-              message: '请输入活动人数',
190
-            },
191
-          ],
192
-        })(<Input type="number" disabled={activityStatus===0 ? true : false}/>)}
184
+        <Form.Item label="活动人数" help="当前活动最多可报名人数">
185
+          {getFieldDecorator('personNum', {
186
+            rules: [
187
+              {
188
+                required: true,
189
+                message: '请输入活动人数',
190
+              },
191
+            ],
192
+          })(<Input type="number" disabled={activityStatus === 0 ? true : false} />)}
193
         </Form.Item>
193
         </Form.Item>
194
-        <Form.Item label="最大报名人数">
195
-        {getFieldDecorator('maxEnlistByPerson', {
196
-          rules: [
197
-            {
198
-              required: true,
199
-              message: '请输入最大报名人数',
200
-            },
201
-          ],
202
-        })(<Input type="number" min={1} disabled={activityStatus===0 ? true : false}/>)}
194
+        <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
195
+          {getFieldDecorator('maxEnlistByPerson', {
196
+            rules: [
197
+              {
198
+                required: true,
199
+                message: '请输入用户携带人数',
200
+              },
201
+            ],
202
+          })(<Input type="number" min={1} disabled={activityStatus === 0 ? true : false} />)}
203
         </Form.Item>
203
         </Form.Item>
204
         <Form.Item label="活动详情">
204
         <Form.Item label="活动详情">
205
-        {getFieldDecorator('desc')(<Wangedit />)}
205
+          {getFieldDecorator('desc')(<Wangedit />)}
206
         </Form.Item>
206
         </Form.Item>
207
         <Form.Item label="报名时间">
207
         <Form.Item label="报名时间">
208
           {getFieldDecorator('signupTime', {
208
           {getFieldDecorator('signupTime', {
212
                 message: '请选择报名时间',
212
                 message: '请选择报名时间',
213
               },
213
               },
214
             ],
214
             ],
215
-          })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus===0 ? true : false}/>)}
216
-        </Form.Item>  
215
+          })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus === 0 ? true : false} />)}
216
+        </Form.Item>
217
         <Form.Item label="权重">
217
         <Form.Item label="权重">
218
-        {getFieldDecorator('heavy', {
219
-          rules: [
220
-            {
221
-              required: true,
222
-              message: '请输入权重',
223
-            },
224
-          ],
225
-        })(<Input type="number" style={{ width: 80}}/>)}<span style={{ marginLeft: 30, color:'grey'}}>数字越大越靠前</span>
218
+          {getFieldDecorator('heavy', {
219
+            rules: [
220
+              {
221
+                required: true,
222
+                message: '请输入权重',
223
+              },
224
+            ],
225
+          })(<Input type="number" style={{ width: 80 }} />)}<span style={{ marginLeft: 30, color: 'grey' }}>数字越大越靠前</span>
226
         </Form.Item>
226
         </Form.Item>
227
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
227
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
228
           <Button type="primary" htmlType="submit">
228
           <Button type="primary" htmlType="submit">
273
         })
273
         })
274
         getMiniappName()
274
         getMiniappName()
275
       }, [])
275
       }, [])
276
-    }else{
276
+    } else {
277
       getMiniappName()
277
       getMiniappName()
278
     }
278
     }
279
     // 获取小程序名称
279
     // 获取小程序名称
358
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
358
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
359
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
359
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
360
           </div>
360
           </div>
361
-          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
361
+          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px' }}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
362
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
362
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
363
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
363
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
364
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
364
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />

+ 7
- 5
src/pages/building/list/add/components/base.jsx 查看文件

329
 
329
 
330
   function cityChange(e) {
330
   function cityChange(e) {
331
     setCityId(e)
331
     setCityId(e)
332
-    setTimeout(()=>{
333
-      props.form.setFieldsValue({
334
-          'buildingArea': buildingData.buildingArea
335
-      })
336
-  },0)
332
+    if(buildingData.cityId === e){
333
+      setTimeout(()=>{
334
+        props.form.setFieldsValue({
335
+            'buildingArea': buildingData.buildingArea
336
+        })
337
+    },0)
338
+    }
337
   }
339
   }
338
 
340
 
339
   function setFormMapScopeTagValue(keyType, item) {
341
   function setFormMapScopeTagValue(keyType, item) {

+ 1
- 0
src/pages/charts/CityNums.jsx 查看文件

6
   backgroundColor: '#fff',
6
   backgroundColor: '#fff',
7
   title: {
7
   title: {
8
     text: '城市分布',
8
     text: '城市分布',
9
+    subtext: '数据会存在一定时间延迟',
9
     left: 40,
10
     left: 40,
10
     top: 40
11
     top: 40
11
   },
12
   },

+ 7
- 6
src/pages/indexEcharts/newUsers.jsx 查看文件

24
   },
24
   },
25
 ]
25
 ]
26
 
26
 
27
+let daterange= []
28
+
27
 const header = props => {
29
 const header = props => {
28
 
30
 
29
   const [tableData, setTableData] = useState([])
31
   const [tableData, setTableData] = useState([])
31
   const [data, setDate] = useState({})
33
   const [data, setDate] = useState({})
32
   const [userType, setUserType] = useState({})
34
   const [userType, setUserType] = useState({})
33
   const [startDate, setStartDate] = useState({})
35
   const [startDate, setStartDate] = useState({})
34
-  let daterange= []
36
+  
35
 
37
 
36
   useEffect(() => {
38
   useEffect(() => {
37
 
39
 
45
 
47
 
46
   function onChangetime (dates, dateStrings) {
48
   function onChangetime (dates, dateStrings) {
47
 
49
 
48
-    daterange[1]=dateStrings[1]
49
-    daterange[0]=dateStrings[0]
50
+    daterange[1]=`${moment(dateStrings[1]).format('YYYY-MM-DDT00:00:00.000')}Z`
51
+    daterange[0]=`${moment(dateStrings[0]).format('YYYY-MM-DDT00:00:00.000')}Z`
50
 
52
 
51
   }
53
   }
52
 
54
 
70
   }
72
   }
71
 
73
 
72
   function datalist () {
74
   function datalist () {
73
-
74
     setEndDate(daterange[1])
75
     setEndDate(daterange[1])
75
     setStartDate(daterange[0])
76
     setStartDate(daterange[0])
76
-    userResource({startDate: daterange[0], endDate: daterange[1]})
77
+    userResource({startDate, endDate})
77
 
78
 
78
   }
79
   }
79
 
80
 
162
           Today: [moment(), moment()],
163
           Today: [moment(), moment()],
163
           'This Month': [moment().startOf('month'), moment().endOf('month')],
164
           'This Month': [moment().startOf('month'), moment().endOf('month')],
164
         }}
165
         }}
165
-        showTime
166
+        // showTime
166
         // format="YYYY/MM/DD HH:mm:ss"
167
         // format="YYYY/MM/DD HH:mm:ss"
167
         onChange={onChangetime}
168
         onChange={onChangetime}
168
       />
169
       />

+ 11
- 7
src/pages/statistical/activity/compenents/OverView.jsx 查看文件

192
       endDate: '',
192
       endDate: '',
193
       startDate: '',
193
       startDate: '',
194
       buildingId: [],
194
       buildingId: [],
195
-      targetType: []
195
+      targetType: [],
196
     }
196
     }
197
   }
197
   }
198
 
198
 
243
     const targetType = this.props.form.getFieldValue("targetType");
243
     const targetType = this.props.form.getFieldValue("targetType");
244
     if (this.props.form.getFieldValue("startDate") != undefined){
244
     if (this.props.form.getFieldValue("startDate") != undefined){
245
       startDate = this.props.form.getFieldValue("startDate").toDate()
245
       startDate = this.props.form.getFieldValue("startDate").toDate()
246
+    }else{
247
+      startDate = moment().subtract(7, 'day').toDate()
246
     }
248
     }
247
     if (this.props.form.getFieldValue("endDate") != undefined){
249
     if (this.props.form.getFieldValue("endDate") != undefined){
248
       endDate = this.props.form.getFieldValue("endDate").toDate()
250
       endDate = this.props.form.getFieldValue("endDate").toDate()
251
+    }else{
252
+      endDate = new Date
249
     }
253
     }
250
     const { formData } = this.state
254
     const { formData } = this.state
251
     this.setState({
255
     this.setState({
263
   //重置搜索
267
   //重置搜索
264
   handleReset = e => {
268
   handleReset = e => {
265
     this.props.form.resetFields()
269
     this.props.form.resetFields()
270
+    this.getAllList()
266
   }
271
   }
267
 
272
 
268
   exportActivityStats = () => {
273
   exportActivityStats = () => {
347
         </Radio.Group>
352
         </Radio.Group>
348
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
353
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
349
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
354
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
350
-            {getFieldDecorator('startDate', {initialValue: moment(startDate)
351
-              
352
-            })(
355
+            {getFieldDecorator('startDate')(
353
                 <DatePicker placeholder="开始日期"/>,
356
                 <DatePicker placeholder="开始日期"/>,
354
             )}
357
             )}
355
             </Form.Item>
358
             </Form.Item>
356
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
359
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
357
-            {getFieldDecorator('endDate', {initialValue: moment(endDate)
358
-              
359
-            })(
360
+            {getFieldDecorator('endDate')(
360
                 <DatePicker placeholder="结束日期"/>,
361
                 <DatePicker placeholder="结束日期"/>,
361
             )}
362
             )}
362
             </Form.Item>
363
             </Form.Item>
380
             </Button>
381
             </Button>
381
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
382
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
382
           </Form.Item>
383
           </Form.Item>
384
+          <Icon type="question-circle" theme="filled" style={{ marginTop:'25px', fontSize: '25px', color: '#F00', marginLeft:'30px'}} onClick={() => setShowHelp(true)}/>
385
+          
383
           </Form>     
386
           </Form>     
387
+          
384
         <div>
388
         <div>
385
 
389
 
386
             <div style={{ display: 'flex', marginBottom: '33px' }}>
390
             <div style={{ display: 'flex', marginBottom: '33px' }}>

+ 5
- 4
src/pages/statistical/activity/detail.jsx 查看文件

17
 const { Text } = Typography;
17
 const { Text } = Typography;
18
 
18
 
19
 function record(props) {
19
 function record(props) {
20
-    const [radioVal, updateRadioVal] = useState(7)
20
+    const [radioVal, updateRadioVal] = useState(6)
21
     const [formData, updateFormData] = useState({
21
     const [formData, updateFormData] = useState({
22
         pageNum: 1,
22
         pageNum: 1,
23
         pageSize: 10,
23
         pageSize: 10,
332
             <Form layout="inline">
332
             <Form layout="inline">
333
                 <div style={{ display: 'flex', alignItems: 'center' }}>
333
                 <div style={{ display: 'flex', alignItems: 'center' }}>
334
                     <Radio.Group buttonStyle="solid" value={radioVal} onChange={setFormData} style={{ marginRight: '16px', }}>
334
                     <Radio.Group buttonStyle="solid" value={radioVal} onChange={setFormData} style={{ marginRight: '16px', }}>
335
-                        <Radio.Button value={7}>最近7天</Radio.Button>
336
-                        <Radio.Button value={30}>最近1月</Radio.Button>
335
+                        <Radio.Button value={0}>今日</Radio.Button>
336
+                        <Radio.Button value={6}>最近7天</Radio.Button>
337
+                        <Radio.Button value={29}>最近1月</Radio.Button>
337
                     </Radio.Group>
338
                     </Radio.Group>
338
                     <Form.Item>
339
                     <Form.Item>
339
                         <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
340
                         <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
351
 
352
 
352
             <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
353
             <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
353
                 <h4 style={{ fontSize: '0.12rem', fontWeight: '600' }}>详细数据</h4>
354
                 <h4 style={{ fontSize: '0.12rem', fontWeight: '600' }}>详细数据</h4>
354
-                <AuthButton name="admin.statistical.consultant.export" noRight={null}>
355
+                <AuthButton name="admin.statistical.activity.content.export" noRight={null}>
355
                     <Button type="primary" onClick={exportRecord} loading={btnloading} style={{ zIndex: 1 }}>
356
                     <Button type="primary" onClick={exportRecord} loading={btnloading} style={{ zIndex: 1 }}>
356
                         导出
357
                         导出
357
                 </Button>
358
                 </Button>

+ 3
- 1
src/pages/statistical/activity/index.jsx 查看文件

48
 
48
 
49
   return (
49
   return (
50
     <>
50
     <>
51
+    
51
       <Tabs type="card" value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
52
       <Tabs type="card" value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
52
         <TabPane tab="统计总况" key="overView" ></TabPane>
53
         <TabPane tab="统计总况" key="overView" ></TabPane>
53
         <TabPane tab="统计内容" key="content" ></TabPane>
54
         <TabPane tab="统计内容" key="content" ></TabPane>
54
-        {/* <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft:'30px'}} /> */}
55
       </Tabs>
55
       </Tabs>
56
       <div style={{ marginTop: '20px' }}>
56
       <div style={{ marginTop: '20px' }}>
57
         { (tab === 'overView' && <OverView />)}
57
         { (tab === 'overView' && <OverView />)}
58
         { (tab === 'content' && <Content />)}
58
         { (tab === 'content' && <Content />)}
59
+        { (tab === 'desc' && <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft:'30px'}} />)}
60
+        
59
       </div>
61
       </div>
60
     </>
62
     </>
61
   )
63
   )

+ 1
- 1
src/pages/statistical/activity/shareNum.jsx 查看文件

33
     key: 'shareType',
33
     key: 'shareType',
34
     render: (text, records) => {
34
     render: (text, records) => {
35
       if (records.sharePersonType === 'drift') { return '游客' }
35
       if (records.sharePersonType === 'drift') { return '游客' }
36
-      if (records.sharePersonType === 'customer') { return '客户' }
36
+      if (records.sharePersonType === 'customer') { return '普通客户' }
37
       if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
37
       if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
38
     },
38
     },
39
   },
39
   },

+ 1
- 1
src/pages/statistical/activity/sharePersonNum.jsx 查看文件

85
     key: 'sharePersonType',
85
     key: 'sharePersonType',
86
     render: (text, records) => {
86
     render: (text, records) => {
87
       if (records.sharePersonType === 'drift') { return '游客' }
87
       if (records.sharePersonType === 'drift') { return '游客' }
88
-      if (records.sharePersonType === 'customer') { return '客户' }
88
+      if (records.sharePersonType === 'customer') { return '普通客户' }
89
       if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
89
       if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
90
     },
90
     },
91
   },
91
   },

+ 1
- 6
src/pages/statistical/activity/visitPersonNum.jsx 查看文件

59
     key: 'realtyConsultantPhone',
59
     key: 'realtyConsultantPhone',
60
   },
60
   },
61
   {
61
   {
62
-    title: '分享者',
62
+    title: '推广人',
63
     dataIndex: 'sharePersonName',
63
     dataIndex: 'sharePersonName',
64
     key: 'sharePersonName',
64
     key: 'sharePersonName',
65
   },
65
   },
66
-  {
67
-    title: '分享者电话',
68
-    dataIndex: 'sharePersonPhone',
69
-    key: 'sharePersonPhone',
70
-  },
71
   {
66
   {
72
     title: '访问次数',
67
     title: '访问次数',
73
     dataIndex: 'visitNum',
68
     dataIndex: 'visitNum',

+ 3
- 0
src/pages/statistical/building/component/StatsChart.jsx 查看文件

24
         axisLabel: {rotate: 45},
24
         axisLabel: {rotate: 45},
25
         data: data.buildingNameList || []
25
         data: data.buildingNameList || []
26
     },
26
     },
27
+    grid: {
28
+      bottom:'30%'
29
+    },  
27
     tooltip: {},
30
     tooltip: {},
28
     yAxis: {
31
     yAxis: {
29
         type: 'value'
32
         type: 'value'

+ 3
- 0
src/pages/statistical/building/detail.jsx 查看文件

7
 import StatsChartLine from './component/StatsChartLine';
7
 import StatsChartLine from './component/StatsChartLine';
8
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
 import router from 'umi/router';
9
 import router from 'umi/router';
10
+import AuthButton from '@/components/AuthButton';
10
 
11
 
11
 
12
 
12
 const { RangePicker } = DatePicker;
13
 const { RangePicker } = DatePicker;
167
               <span>详细数据</span>
168
               <span>详细数据</span>
168
             </Col>
169
             </Col>
169
             <Col span={2}>
170
             <Col span={2}>
171
+            <AuthButton name="admin.statistical.building.content.export" noRight={null}>
170
               <Button type="primary" onClick={this.exportBuildingStats}>导出</Button>
172
               <Button type="primary" onClick={this.exportBuildingStats}>导出</Button>
173
+            </AuthButton>
171
             </Col>
174
             </Col>
172
         </Row>
175
         </Row>
173
         
176
         

+ 3
- 0
src/pages/statistical/building/index.jsx 查看文件

7
 import StatsChart from './component/StatsChart';
7
 import StatsChart from './component/StatsChart';
8
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
 import router from 'umi/router';
9
 import router from 'umi/router';
10
+import AuthButton from '@/components/AuthButton';
10
 
11
 
11
 
12
 
12
 const { RangePicker } = DatePicker;
13
 const { RangePicker } = DatePicker;
211
               <BuildSelect slot='action' onChange={(e => this.handleBuildingChange(e))} value={this.state.buildingId}></BuildSelect>
212
               <BuildSelect slot='action' onChange={(e => this.handleBuildingChange(e))} value={this.state.buildingId}></BuildSelect>
212
             </Col>
213
             </Col>
213
             <Col span={2}>
214
             <Col span={2}>
215
+            <AuthButton name="admin.statistical.building.export" noRight={null}>
214
               <Button type="primary" onClick={this.exportBuildingStats}>导出</Button>
216
               <Button type="primary" onClick={this.exportBuildingStats}>导出</Button>
217
+            </AuthButton>
215
             </Col>
218
             </Col>
216
         </Row>
219
         </Row>
217
         
220
         

+ 74
- 19
src/pages/statistical/consultant/index.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Button, DatePicker, Table, Pagination, Radio, Typography } from 'antd';
2
+import { Form, Button, DatePicker, Modal, Table, Pagination, Radio, Typography } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
5
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
15
 const { Text } = Typography;
15
 const { Text } = Typography;
16
 
16
 
17
 function record(props) {
17
 function record(props) {
18
-    const [radioVal, updateRadioVal] = useState(7)
18
+    const [radioVal, updateRadioVal] = useState(6)
19
     const [formData, updateFormData] = useState({
19
     const [formData, updateFormData] = useState({
20
         pageNum: 1,
20
         pageNum: 1,
21
         pageSize: 10,
21
         pageSize: 10,
31
     const [totalRow, setTotalRow] = useState({})
31
     const [totalRow, setTotalRow] = useState({})
32
     const [loading, updataLoading] = useState(true)
32
     const [loading, updataLoading] = useState(true)
33
     const [btnloading, updataBtnloading] = useState(false)
33
     const [btnloading, updataBtnloading] = useState(false)
34
+    const [visible, setVisible] = useState(false)
34
 
35
 
35
     useEffect(() => {
36
     useEffect(() => {
36
         getList(formData);
37
         getList(formData);
38
 
39
 
39
     // 查询列表
40
     // 查询列表
40
     const getList = (params) => {
41
     const getList = (params) => {
42
+        updataLoading(true)
41
         request({ ...apis.stats.consultantKPI, params: { ...params }, }).then((data) => {
43
         request({ ...apis.stats.consultantKPI, params: { ...params }, }).then((data) => {
42
             setData(data.paged)
44
             setData(data.paged)
43
             setTotalRow(data.total)
45
             setTotalRow(data.total)
50
     //重置搜索
52
     //重置搜索
51
     function handleReset() {
53
     function handleReset() {
52
         props.form.resetFields();
54
         props.form.resetFields();
55
+        updateFormData({
56
+            pageNum: 1,
57
+            pageSize: 10,
58
+            startDate: moment().subtract(radioVal, 'day').format('YYYYMMDD'),
59
+            endDate: moment().format('YYYYMMDD'),
60
+            buildingId: '',
61
+        })
62
+        updateRadioVal(6)
63
+        getList({
64
+            pageNum: 1,
65
+            pageSize: 10,
66
+            startDate: moment().subtract(radioVal, 'day').format('YYYYMMDD'),
67
+            endDate: moment().format('YYYYMMDD'),
68
+            buildingId: '',
69
+        });
53
     }
70
     }
54
 
71
 
55
     // 提交事件
72
     // 提交事件
227
             dataIndex: 'buildingName',
244
             dataIndex: 'buildingName',
228
             key: 'buildingName',
245
             key: 'buildingName',
229
             align: 'center',
246
             align: 'center',
230
-            // render: (txt, _, index) => index ? txt : <span>总计</span>,
247
+            render: (txt, _, index) => index ? txt : <span>总计</span>,
231
         },
248
         },
232
 
249
 
233
         {
250
         {
248
             key: 'totalPersons',
265
             key: 'totalPersons',
249
             align: 'center',
266
             align: 'center',
250
             sorter: true,
267
             sorter: true,
251
-            render: (txt, record, index) => clickCon(txt, record, 'totalPersons'),
252
-            // render: (txt, record, index) => index ? clickCon(txt, record, 'totalPersons') : <strong>{txt}</strong>,
268
+            // render: (txt, record, index) => clickCon(txt, record, 'totalPersons'),
269
+            render: (txt, record, index) => index ? clickCon(txt, record, 'totalPersons') : <strong>{txt}</strong>,
253
         },
270
         },
254
         {
271
         {
255
             title: '新增客户',
272
             title: '新增客户',
257
             key: 'newPersons',
274
             key: 'newPersons',
258
             align: 'center',
275
             align: 'center',
259
             sorter: true,
276
             sorter: true,
260
-            render: (txt, record, index) => clickCon(txt, record, 'newPersons'),
277
+            // render: (txt, record, index) => clickCon(txt, record, 'newPersons'),
278
+            render: (txt, record, index) => index ? clickCon(txt, record, 'newPersons') : <strong>{txt}</strong>,
261
         },
279
         },
262
         {
280
         {
263
             title: '分享次数',
281
             title: '分享次数',
265
             key: 'shareNum',
283
             key: 'shareNum',
266
             align: 'center',
284
             align: 'center',
267
             sorter: true,
285
             sorter: true,
268
-            render: (txt, record, index) => clickCon(txt, record, 'shareNum'),
286
+            // render: (txt, record, index) => clickCon(txt, record, 'shareNum'),
287
+            render: (txt, record, index) => index ? clickCon(txt, record, 'shareNum') : <strong>{txt}</strong>,
269
         },
288
         },
270
         {
289
         {
271
             title: '分享访问人数',
290
             title: '分享访问人数',
273
             key: 'visitPersons',
292
             key: 'visitPersons',
274
             align: 'center',
293
             align: 'center',
275
             sorter: true,
294
             sorter: true,
276
-            render: (txt, record, index) => clickCon(txt, record, 'visitPersons'),
295
+            // render: (txt, record, index) => clickCon(txt, record, 'visitPersons'),
296
+            render: (txt, record, index) => index ? clickCon(txt, record, 'visitPersons') : <strong>{txt}</strong>,
277
         },
297
         },
278
         {
298
         {
279
             title: '分享访问次数',
299
             title: '分享访问次数',
281
             key: 'visitNum',
301
             key: 'visitNum',
282
             align: 'center',
302
             align: 'center',
283
             sorter: true,
303
             sorter: true,
284
-            render: (txt, record, index) => clickCon(txt, record, 'visitNum'),
304
+            // render: (txt, record, index) => clickCon(txt, record, 'visitNum'),
305
+            render: (txt, record, index) => index ? clickCon(txt, record, 'visitNum') : <strong>{txt}</strong>,
285
         },
306
         },
286
 
307
 
287
         {
308
         {
290
             key: 'sharePersons',
311
             key: 'sharePersons',
291
             align: 'center',
312
             align: 'center',
292
             sorter: true,
313
             sorter: true,
293
-            render: (txt, record, index) => clickCon(txt, record, 'sharePersons'),
314
+            // render: (txt, record, index) => clickCon(txt, record, 'sharePersons'),
315
+            render: (txt, record, index) => index ? clickCon(txt, record, 'sharePersons') : <strong>{txt}</strong>,
294
         },
316
         },
295
         {
317
         {
296
             title: '主页访问人数',
318
             title: '主页访问人数',
298
             key: 'homePagePersons',
320
             key: 'homePagePersons',
299
             align: 'center',
321
             align: 'center',
300
             sorter: true,
322
             sorter: true,
301
-            render: (txt, record, index) => clickCon(txt, record, 'homePagePersons'),
323
+            // render: (txt, record, index) => clickCon(txt, record, 'homePagePersons'),
324
+            render: (txt, record, index) => index ? clickCon(txt, record, 'homePagePersons') : <strong>{txt}</strong>,
302
         },
325
         },
303
         {
326
         {
304
             title: '主页访问次数',
327
             title: '主页访问次数',
306
             key: 'homePageNums',
329
             key: 'homePageNums',
307
             align: 'center',
330
             align: 'center',
308
             sorter: true,
331
             sorter: true,
309
-            render: (txt, record, index) => clickCon(txt, record, 'homePageNums'),
332
+            // render: (txt, record, index) => clickCon(txt, record, 'homePageNums'),
333
+            render: (txt, record, index) => index ? clickCon(txt, record, 'homePageNums') : <strong>{txt}</strong>,
310
         },
334
         },
311
         {
335
         {
312
             title: '咨询数',
336
             title: '咨询数',
314
             key: 'chatPersons',
338
             key: 'chatPersons',
315
             align: 'center',
339
             align: 'center',
316
             sorter: true,
340
             sorter: true,
317
-            render: (txt, record, index) => clickCon(txt, record, 'chatPersons'),
341
+            // render: (txt, record, index) => clickCon(txt, record, 'chatPersons'),
342
+            render: (txt, record, index) => index ? clickCon(txt, record, 'chatPersons') : <strong>{txt}</strong>,
318
         },
343
         },
319
         {
344
         {
320
             title: '点赞数',
345
             title: '点赞数',
322
             key: 'favorNum',
347
             key: 'favorNum',
323
             align: 'center',
348
             align: 'center',
324
             sorter: true,
349
             sorter: true,
325
-            render: (txt, record, index) => clickCon(txt, record, 'favorNum'),
350
+            // render: (txt, record, index) => clickCon(txt, record, 'favorNum'),
351
+            render: (txt, record, index) => index ? clickCon(txt, record, 'favorNum') : <strong>{txt}</strong>,
326
         },
352
         },
327
     ];
353
     ];
328
     // 下载文档
354
     // 下载文档
354
         moment(formData.startDate),
380
         moment(formData.startDate),
355
         moment(formData.endDate),
381
         moment(formData.endDate),
356
     ]
382
     ]
357
-    // const list = data.records
358
-    // const _list = list && list.length > 0 ? [totalRow, ...list] : [];
383
+    const list = data.records
384
+    const _list = list && list.length > 0 ? [totalRow, ...list] : [];
359
     return (
385
     return (
360
 
386
 
361
         <>
387
         <>
388
+            <p style={{ fontSize: '0.09rem', color: '#999' }} onClick={() => setVisible(true)}>指标说明</p>
389
+            <Modal
390
+                title="指标说明(数据会存在一定时间延迟)"
391
+                centered
392
+                visible={visible}
393
+                footer={null}
394
+                onCancel={() => setVisible(false)}
395
+            >
396
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>主页访问人数:</p>
397
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问置业顾问名片的用户数</p>
398
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>主页访问次数:</p>
399
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问置业顾问名片的用户数</p>
400
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>客户总计:</p>
401
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>当前置业顾问的所有客户数(与列表时间筛选无关)</p>
402
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>新增客户:</p>
403
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>当前时间段内置业顾问新增的客户数</p>
404
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享次数:</p>
405
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>置业顾问分享小程序内容的次数</p>
406
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享访问人数:</p>
407
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>通过置业顾问分享访问小程序内容的用户数</p>
408
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享拓客:</p>
409
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>通过置业顾问分享内容进行手机授权的用户数</p>
410
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>咨询数:</p>
411
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>在线微聊,咨询置业顾问的用户数</p>
412
+                <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>点赞数:</p>
413
+                <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>置业顾问获得的点赞数</p>
414
+            </Modal>
362
             <Form layout="inline">
415
             <Form layout="inline">
363
                 <div style={{ display: 'flex', alignItems: 'center' }}>
416
                 <div style={{ display: 'flex', alignItems: 'center' }}>
364
                     <Radio.Group buttonStyle="solid" value={radioVal} onChange={setFormData} style={{ marginRight: '16px', }}>
417
                     <Radio.Group buttonStyle="solid" value={radioVal} onChange={setFormData} style={{ marginRight: '16px', }}>
365
-                        <Radio.Button value={7}>最近7天</Radio.Button>
366
-                        <Radio.Button value={30}>最近1月</Radio.Button>
418
+                        <Radio.Button value={0}>今日</Radio.Button>
419
+                        <Radio.Button value={6}>最近7天</Radio.Button>
420
+                        <Radio.Button value={29}>最近1月</Radio.Button>
367
                     </Radio.Group>
421
                     </Radio.Group>
368
                     <Form.Item>
422
                     <Form.Item>
369
                         <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
423
                         <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
384
             </AuthButton>
438
             </AuthButton>
385
             <Table rowKey={record => (record.userId + record.buildingId || '')}
439
             <Table rowKey={record => (record.userId + record.buildingId || '')}
386
                 style={{ marginTop: '30px' }}
440
                 style={{ marginTop: '30px' }}
387
-                dataSource={data.records}
441
+                dataSource={_list}
442
+                // dataSource={data.records}
388
                 columns={columns}
443
                 columns={columns}
389
                 pagination={false}
444
                 pagination={false}
390
                 onChange={handleChange}
445
                 onChange={handleChange}

+ 2
- 2
src/pages/statistical/consultant/sharetable.jsx 查看文件

40
     },
40
     },
41
     {
41
     {
42
         label: '首页',
42
         label: '首页',
43
-        value: 'mian'
43
+        value: 'main'
44
     },
44
     },
45
 ]
45
 ]
46
 const showTypeList = [
46
 const showTypeList = [
128
             dataIndex: 'targetType',
128
             dataIndex: 'targetType',
129
             key: 'targetType',
129
             key: 'targetType',
130
             align: 'center',
130
             align: 'center',
131
-            render: (_, record) => <><span>{getType(record.targetType)} {'【' + record.targetName + '】'}</span></>
131
+            render: (_, record) => <><span>{getType(record.targetType)} {record.targetName ? '【' + record.targetName + '】' : ''}</span></>
132
         },
132
         },
133
         {
133
         {
134
             title: '分享时间',
134
             title: '分享时间',

+ 1
- 1
src/pages/statistical/consultant/table.jsx 查看文件

138
                         dataIndex: 'reportDate',
138
                         dataIndex: 'reportDate',
139
                         key: 'reportDate',
139
                         key: 'reportDate',
140
                         align: 'center',
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.reportDate && moment(record.reportDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
142
                     },
142
                     },
143
                 ]
143
                 ]
144
     const columns = basicColunms.concat(lastColum)
144
     const columns = basicColunms.concat(lastColum)

+ 2
- 2
src/pages/statistical/consultant/visitNum.jsx 查看文件

113
             dataIndex: 'targetType',
113
             dataIndex: 'targetType',
114
             key: 'targetType',
114
             key: 'targetType',
115
             align: 'center',
115
             align: 'center',
116
-            render: (_, record) => <><span>{getType(record.targetType)} {'【' + record.targetName + '】'}</span></>
116
+            render: (_, record) => <><span>{getType(record.targetType)} {record.targetName ? '【' + record.targetName + '】' : ''}</span></>
117
         },
117
         },
118
         {
118
         {
119
             title: '姓名',
119
             title: '姓名',
146
     ];
146
     ];
147
 
147
 
148
     const { getFieldDecorator } = props.form
148
     const { getFieldDecorator } = props.form
149
-    
149
+
150
     let row = 0
150
     let row = 0
151
 
151
 
152
     return (
152
     return (