xujing преди 5 години
родител
ревизия
8b901b20ad

+ 1
- 1
src/pages/house/house/edit/components/house.jsx Целия файл

@@ -233,7 +233,7 @@ function House(props) {
233 233
   const { getFieldDecorator } = props.form
234 234
   return (
235 235
     <>
236
-      <div align="right"><Button onClick={() => router.go(-1)}>返回</Button></div>
236
+      <div align="right" style={{ marginTop: '-52px', marginBottom: '20px' }}><Button onClick={() => router.go(-1)}>返回</Button></div>
237 237
       <Form layout="inline" onSubmit={e => handleSubmit(e)}>
238 238
         <Form.Item>
239 239
           {getFieldDecorator('termName')(

+ 1
- 1
src/pages/statistical/activity/sharePersonNum.jsx Целия файл

@@ -325,7 +325,7 @@ class SharePersonNum extends React.Component {
325 325
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
326 326
           </Form.Item>
327 327
           <AuthButton name="admin.statistical.activity.export" noRight={null}>
328
-            <Button type="primary" style={{ float: 'right', zIndex: 1, marginTop: '25px' }} onClick={this.exportActivityStats}>
328
+            <Button type="primary" style={{ float: 'right', zIndex: 1, marginTop: '24px' }} onClick={this.exportActivityStats}>
329 329
               导出
330 330
             </Button>
331 331
           </AuthButton>

+ 73
- 74
src/pages/statistical/activity/visitNum.jsx Целия файл

@@ -14,10 +14,10 @@ const { RangePicker } = DatePicker;
14 14
 const { Option } = Select
15 15
 
16 16
 const formItemLayout = {
17
-    labelCol: { span: 10},
18
-    wrapperCol: { span: 14 },
19
-  };
20
-  
17
+  labelCol: { span: 10 },
18
+  wrapperCol: { span: 14 },
19
+};
20
+
21 21
 let daterange = []
22 22
 let tableTitle = ['类型']
23 23
 let queryDate = ''
@@ -84,34 +84,34 @@ class SharePersonNum extends React.Component {
84 84
 
85 85
     let startDate;
86 86
     let endDate;
87
-    if (props.location.query.queryDate){
88
-      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
89
-      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
90
-    }else{
91
-      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
92
-      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
87
+    if (props.location.query.queryDate) {
88
+      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
89
+      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
90
+    } else {
91
+      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
92
+      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
93 93
     }
94 94
     console.log(startDate)
95 95
     this.state = {
96 96
       formData: {
97 97
         personFrom: '',
98
-        pageNum:'',
99
-        pageSize:'',
98
+        pageNum: '',
99
+        pageSize: '',
100 100
         startDate: startDate,
101 101
         endDate: endDate,
102
-        province:'',
103
-        realtyConsultant:'',
104
-        realtyConsultantPhone:'',
102
+        province: '',
103
+        realtyConsultant: '',
104
+        realtyConsultantPhone: '',
105 105
         activityId: props.location.query.activityId,
106
-        activityType:props.location.query.activityType,
106
+        activityType: props.location.query.activityType,
107 107
         personId: props.location.query.personId,
108 108
         buildingId: props.location.query.buildingId
109 109
       },
110
-      personData: [],  
110
+      personData: [],
111 111
       dataSoures: [],
112 112
       tableData: [],
113 113
       userType: 'all',
114
-      activityName:  props.location.query.activityName
114
+      activityName: props.location.query.activityName
115 115
     }
116 116
   }
117 117
 
@@ -119,12 +119,12 @@ class SharePersonNum extends React.Component {
119 119
     this.getTableList()
120 120
   }
121 121
 
122
-  getTableList () {
122
+  getTableList() {
123 123
     const { formData } = this.state
124 124
     console.log(formData)
125 125
     request({ ...apis.activityDataStatis.activityVisitNum, params: formData }).then(data => {
126 126
       console.log(data)
127
-      this.setState({ tableData: data.records, total: data.total})
127
+      this.setState({ tableData: data.records, total: data.total })
128 128
     }).catch()
129 129
   }
130 130
 
@@ -155,41 +155,41 @@ class SharePersonNum extends React.Component {
155 155
     this.props.form.resetFields()
156 156
     let startDate;
157 157
     let endDate;
158
-    if (this.props.location.query.queryDate){
159
-      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
160
-      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
161
-    }else{
162
-      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
163
-      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
158
+    if (this.props.location.query.queryDate) {
159
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
160
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
161
+    } else {
162
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
163
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
164 164
     }
165 165
     console.log(startDate)
166
-    this.setState( {
166
+    this.setState({
167 167
       formData: {
168 168
         personFrom: '',
169
-        pageNum:'',
170
-        pageSize:'',
169
+        pageNum: '',
170
+        pageSize: '',
171 171
         startDate: startDate,
172 172
         endDate: endDate,
173
-        province:'',
174
-        realtyConsultant:'',
175
-        realtyConsultantPhone:'',
173
+        province: '',
174
+        realtyConsultant: '',
175
+        realtyConsultantPhone: '',
176 176
         activityId: this.props.location.query.activityId,
177
-        activityType:this.props.location.query.activityType,
177
+        activityType: this.props.location.query.activityType,
178 178
         personId: this.props.location.query.personId,
179 179
         buildingId: this.props.location.query.buildingId
180 180
       },
181
-      personData: [],  
181
+      personData: [],
182 182
       dataSoures: [],
183 183
       tableData: [],
184 184
       userType: 'all',
185
-      activityName:  this.props.location.query.activityName
185
+      activityName: this.props.location.query.activityName
186 186
     }, this.getTableList)
187 187
   }
188 188
 
189 189
   goback = () => {
190 190
     router.go(-1);
191 191
   }
192
-  
192
+
193 193
   exportActivityStats = () => {
194 194
     const { formData } = this.state
195 195
     request({ ...apis.activityDataStatis.activityVisitNumExport, params: formData }).then(data => {
@@ -197,12 +197,12 @@ class SharePersonNum extends React.Component {
197 197
         return
198 198
       }
199 199
       const url = window.URL.createObjectURL(new Blob([data]))
200
-        const link = document.createElement('a')
201
-        link.style.display = 'none'
202
-        link.href = url
203
-        link.setAttribute('download', '访问统计.xlsx')
204
-        document.body.append(link)
205
-        link.click()
200
+      const link = document.createElement('a')
201
+      link.style.display = 'none'
202
+      link.href = url
203
+      link.setAttribute('download', '访问统计.xlsx')
204
+      document.body.append(link)
205
+      link.click()
206 206
     }).catch()
207 207
   }
208 208
 
@@ -225,50 +225,49 @@ class SharePersonNum extends React.Component {
225 225
     const { getFieldDecorator } = this.props.form;
226 226
 
227 227
     return (
228
-    <>
228
+      <>
229
+        <div align="right" style={{ marginBottom: '16px' }}><Button onClick={this.goback}>返回</Button></div>
229 230
         <div>
230
-          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
231
+          <span style={{ marginLeft: '20px' }}>分享内容:{this.state.activityName}</span>
231 232
         </div>
232 233
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
233
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
234
-          {getFieldDecorator('personFrom')(
235
-            <WxDictSelect />,
236
-          )}
237
-        </Form.Item>
238
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
239
-            {getFieldDecorator('province')(<Input placeholder="请输入归属地"/>)}
240
-        </Form.Item>
241
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
242
-            {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问"/>)}
243
-        </Form.Item>
244
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
245
-            {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话"/>)}
246
-        </Form.Item>
247
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
234
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
235
+            {getFieldDecorator('personFrom')(
236
+              <WxDictSelect />,
237
+            )}
238
+          </Form.Item>
239
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
240
+            {getFieldDecorator('province')(<Input placeholder="请输入归属地" />)}
241
+          </Form.Item>
242
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
243
+            {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问" />)}
244
+          </Form.Item>
245
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
246
+            {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话" />)}
247
+          </Form.Item>
248
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
248 249
             <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
249
-                搜索
250
+              搜索
250 251
             </Button>
251 252
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
252 253
           </Form.Item>
253
-          </Form>     
254
-        <div>
255
-            <Button type="primary" style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }} onClick={this.goback}>
256
-                返回
257
-            </Button>
258
-        <AuthButton name="admin.statistical.activity.export" noRight={null}>
254
+          <AuthButton name="admin.statistical.activity.export" noRight={null}>
259 255
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
260
-                导出
256
+              导出
261 257
             </Button>
262
-            </AuthButton>
263
-          <Table style={{marginTop:'20px'}} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total}} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
258
+          </AuthButton>
259
+        </Form>
260
+        <div>
261
+
262
+          <Table style={{ marginTop: '20px' }} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total }} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
264 263
         </div>
265 264
         <Prompt message={location =>
266
-        location.pathname.startsWith("/statistical/activity")
267
-          ? true
268
-          : localStorage.removeItem("tabState")} />
269
-    </>
265
+          location.pathname.startsWith("/statistical/activity")
266
+            ? true
267
+            : localStorage.removeItem("tabState")} />
268
+      </>
270 269
     )
271
-    
270
+
272 271
   }
273 272
 }
274 273
 const WrappedTypeForm = Form.create()(SharePersonNum);

+ 76
- 77
src/pages/statistical/activity/visitPersonNum.jsx Целия файл

@@ -14,10 +14,10 @@ const { RangePicker } = DatePicker;
14 14
 const { Option } = Select
15 15
 
16 16
 const formItemLayout = {
17
-    labelCol: { span: 10},
18
-    wrapperCol: { span: 14 },
19
-  };
20
-  
17
+  labelCol: { span: 10 },
18
+  wrapperCol: { span: 14 },
19
+};
20
+
21 21
 let daterange = []
22 22
 let tableTitle = ['类型']
23 23
 let queryDate = ''
@@ -78,35 +78,35 @@ class SharePersonNum extends React.Component {
78 78
 
79 79
     let startDate;
80 80
     let endDate;
81
-    
82
-    if (props.location.query.queryDate){
83
-      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
84
-      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
85
-    }else{
86
-      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
87
-      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
81
+
82
+    if (props.location.query.queryDate) {
83
+      startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
84
+      endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
85
+    } else {
86
+      startDate = moment(props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
87
+      endDate = moment(props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
88 88
     }
89 89
     console.log(startDate)
90 90
     this.state = {
91 91
       formData: {
92 92
         personFrom: '',
93
-        pageNum:'',
94
-        pageSize:'',
93
+        pageNum: '',
94
+        pageSize: '',
95 95
         startDate: startDate,
96 96
         endDate: endDate,
97
-        province:'',
98
-        realtyConsultant:'',
99
-        realtyConsultantPhone:'',
97
+        province: '',
98
+        realtyConsultant: '',
99
+        realtyConsultantPhone: '',
100 100
         activityId: props.location.query.activityId,
101
-        activityType:props.location.query.activityType ,
102
-        personId:  props.location.query.personId,
101
+        activityType: props.location.query.activityType,
102
+        personId: props.location.query.personId,
103 103
         buildingId: props.location.query.buildingId
104 104
       },
105
-      personData: [],  
105
+      personData: [],
106 106
       dataSoures: [],
107 107
       tableData: [],
108 108
       userType: 'all',
109
-      activityName:  props.location.query.activityName
109
+      activityName: props.location.query.activityName
110 110
     }
111 111
   }
112 112
 
@@ -114,12 +114,12 @@ class SharePersonNum extends React.Component {
114 114
     this.getTableList()
115 115
   }
116 116
 
117
-  getTableList () {
117
+  getTableList() {
118 118
     const { formData } = this.state
119 119
     console.log(formData)
120 120
     request({ ...apis.activityDataStatis.activityVisitPersonNum, params: formData }).then(data => {
121 121
       console.log(data)
122
-      this.setState({ tableData: data.records, total: data.total})
122
+      this.setState({ tableData: data.records, total: data.total })
123 123
     }).catch()
124 124
   }
125 125
 
@@ -150,41 +150,41 @@ class SharePersonNum extends React.Component {
150 150
     this.props.form.resetFields()
151 151
     let startDate;
152 152
     let endDate;
153
-    
154
-    if (this.props.location.query.queryDate){
155
-      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
156
-      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
157
-    }else{
158
-      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
159
-      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
153
+
154
+    if (this.props.location.query.queryDate) {
155
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
156
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
157
+    } else {
158
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
159
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
160 160
     }
161 161
     this.setState({
162 162
       formData: {
163 163
         personFrom: '',
164
-        pageNum:'',
165
-        pageSize:'',
164
+        pageNum: '',
165
+        pageSize: '',
166 166
         startDate: startDate,
167 167
         endDate: endDate,
168
-        province:'',
169
-        realtyConsultant:'',
170
-        realtyConsultantPhone:'',
168
+        province: '',
169
+        realtyConsultant: '',
170
+        realtyConsultantPhone: '',
171 171
         activityId: this.props.location.query.activityId,
172
-        activityType: this.props.location.query.activityType ,
173
-        personId:  this.props.location.query.personId,
172
+        activityType: this.props.location.query.activityType,
173
+        personId: this.props.location.query.personId,
174 174
         buildingId: this.props.location.query.buildingId
175 175
       },
176
-      personData: [],  
176
+      personData: [],
177 177
       dataSoures: [],
178 178
       tableData: [],
179 179
       userType: 'all',
180 180
       activityName: this.props.location.query.activityName
181
-    },this.getTableList)
181
+    }, this.getTableList)
182 182
   }
183 183
 
184 184
   goback = () => {
185 185
     router.go(-1);
186 186
   }
187
-  
187
+
188 188
   exportActivityStats = () => {
189 189
     const { formData } = this.state
190 190
     request({ ...apis.activityDataStatis.activityVisitPersonNumExport, params: formData }).then(data => {
@@ -192,12 +192,12 @@ class SharePersonNum extends React.Component {
192 192
         return
193 193
       }
194 194
       const url = window.URL.createObjectURL(new Blob([data]))
195
-        const link = document.createElement('a')
196
-        link.style.display = 'none'
197
-        link.href = url
198
-        link.setAttribute('download', '访问统计.xlsx')
199
-        document.body.append(link)
200
-        link.click()
195
+      const link = document.createElement('a')
196
+      link.style.display = 'none'
197
+      link.href = url
198
+      link.setAttribute('download', '访问统计.xlsx')
199
+      document.body.append(link)
200
+      link.click()
201 201
     }).catch()
202 202
   }
203 203
 
@@ -220,50 +220,49 @@ class SharePersonNum extends React.Component {
220 220
     const { getFieldDecorator } = this.props.form;
221 221
 
222 222
     return (
223
-    <>
223
+      <>
224
+        <div align="right" style={{ marginBottom: '16px' }}><Button onClick={this.goback}>返回</Button></div>
224 225
         <div>
225
-          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
226
+          <span style={{ marginLeft: '20px' }}>分享内容:{this.state.activityName}</span>
226 227
         </div>
227 228
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
228
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
229
-          {getFieldDecorator('personFrom')(
230
-            <WxDictSelect />,
231
-          )}
232
-        </Form.Item>
233
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
234
-            {getFieldDecorator('province')(<Input placeholder="请输入归属地"/>)}
235
-        </Form.Item>
236
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
237
-            {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问"/>)}
238
-        </Form.Item>
239
-        <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
240
-            {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话"/>)}
241
-        </Form.Item>
242
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
229
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
230
+            {getFieldDecorator('personFrom')(
231
+              <WxDictSelect />,
232
+            )}
233
+          </Form.Item>
234
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
235
+            {getFieldDecorator('province')(<Input placeholder="请输入归属地" />)}
236
+          </Form.Item>
237
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
238
+            {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问" />)}
239
+          </Form.Item>
240
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
241
+            {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话" />)}
242
+          </Form.Item>
243
+          <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
243 244
             <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
244
-                搜索
245
+              搜索
245 246
             </Button>
246 247
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
247 248
           </Form.Item>
248
-          </Form>     
249
-        <div>
250
-            <Button type="primary" style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }} onClick={this.goback}>
251
-                返回
252
-            </Button>
253
-        <AuthButton name="admin.statistical.activity.export" noRight={null}>
249
+          <AuthButton name="admin.statistical.activity.export" noRight={null}>
254 250
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
255
-                导出
251
+              导出
256 252
             </Button>
257
-            </AuthButton>
258
-          <Table style={{marginTop:'20px'}} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total}} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
253
+          </AuthButton>
254
+        </Form>
255
+        <div>
256
+
257
+          <Table style={{ marginTop: '20px' }} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total }} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
259 258
         </div>
260 259
         <Prompt message={location =>
261
-        location.pathname.startsWith("/statistical/activity")
262
-          ? true
263
-          : localStorage.removeItem("tabState")} />
264
-    </>
260
+          location.pathname.startsWith("/statistical/activity")
261
+            ? true
262
+            : localStorage.removeItem("tabState")} />
263
+      </>
265 264
     )
266
-    
265
+
267 266
   }
268 267
 }
269 268
 const WrappedTypeForm = Form.create()(SharePersonNum);

+ 85
- 85
src/pages/statistical/building/detail.jsx Целия файл

@@ -34,24 +34,24 @@ class buildingDetailStats extends React.Component {
34 34
   }
35 35
 
36 36
   componentDidMount() {
37
-    this.getTimeBarDate(moment().subtract(6, 'day').toDate(),new Date())
38
-    this.getTimeTableData(moment().subtract(6, 'day').toDate(),new Date())
39
-    this.setState({...this.state, endDate: new Date(), startDate: moment().subtract(7, 'day').toDate() })
40
-    
37
+    this.getTimeBarDate(moment().subtract(6, 'day').toDate(), new Date())
38
+    this.getTimeTableData(moment().subtract(6, 'day').toDate(), new Date())
39
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(7, 'day').toDate() })
40
+
41 41
   }
42 42
 
43 43
   // 获取图表数据
44 44
   getTimeBarDate = (startDate, endDate) => {
45 45
     request({ ...apis.stats.timeBarList, params: { startDate: moment(startDate).format('YYYY-MM-DDT00:00:00.000') + 'Z', endDate: moment(endDate).format('YYYY-MM-DDT23:59:59.999') + 'Z', buildingId: this.state.buildingId } }).then((data) => {
46
-        this.setState({...this.state, barData: data})
47
-      })
46
+      this.setState({ ...this.state, barData: data })
47
+    })
48 48
   }
49 49
 
50 50
   //获取表格数据
51
-  getTimeTableData = (startDate, endDate,pageNum,pageSize,sortField,sortOrder) => {
52
-    request({ ...apis.stats.timeTableList, params: { startDate: moment(startDate).format('YYYY-MM-DDT00:00:00.000') + 'Z', endDate: moment(endDate).format('YYYY-MM-DDT23:59:59.999') + 'Z', buildingId: this.state.buildingId,pageNum,pageSize,sortField,sortOrder } }).then((data) => {
53
-        this.setState({...this.state, tableData: data.records, total: data.total})
54
-      })
51
+  getTimeTableData = (startDate, endDate, pageNum, pageSize, sortField, sortOrder) => {
52
+    request({ ...apis.stats.timeTableList, params: { startDate: moment(startDate).format('YYYY-MM-DDT00:00:00.000') + 'Z', endDate: moment(endDate).format('YYYY-MM-DDT23:59:59.999') + 'Z', buildingId: this.state.buildingId, pageNum, pageSize, sortField, sortOrder } }).then((data) => {
53
+      this.setState({ ...this.state, tableData: data.records, total: data.total })
54
+    })
55 55
   }
56 56
 
57 57
   formatDate = (start, end) => {
@@ -67,28 +67,28 @@ class buildingDetailStats extends React.Component {
67 67
   }
68 68
 
69 69
   //切换三个标签页
70
-  getDataOf = (days,val) => {
71
-    this.getTimeBarDate(moment().subtract(days, 'day').toDate(),new Date())
72
-    this.getTimeTableData(moment().subtract(days, 'day').toDate(),new Date())
70
+  getDataOf = (days, val) => {
71
+    this.getTimeBarDate(moment().subtract(days, 'day').toDate(), new Date())
72
+    this.getTimeTableData(moment().subtract(days, 'day').toDate(), new Date())
73 73
     this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate(), radioValue: val })
74 74
   }
75 75
 
76 76
   //点击查询
77 77
   datalist = () => {
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])
80
-    this.setState({ 
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])
80
+    this.setState({
81 81
       ...this.state,
82 82
       endDate: daterange[1] === undefined ? new Date() : daterange[1],
83 83
       startDate: daterange[0] === undefined ? moment().subtract(6, 'day').toDate() : daterange[0],
84 84
     })
85
-    
85
+
86 86
   }
87 87
 
88 88
   //排序
89 89
   handleTableChange = (pagination, filters, sorter) => {
90 90
     console.log(pagination, filters, sorter)
91
-    this.getTimeTableData(this.state.startDate,this.state.endDate,pagination.current,10,sorter.columnKey,sorter.order)
91
+    this.getTimeTableData(this.state.startDate, this.state.endDate, pagination.current, 10, sorter.columnKey, sorter.order)
92 92
   };
93 93
 
94 94
   //导出
@@ -110,93 +110,93 @@ class buildingDetailStats extends React.Component {
110 110
       })
111 111
   }
112 112
 
113
-   //重置搜索
113
+  //重置搜索
114 114
   handleReset = () => {
115 115
     daterange = []
116 116
     this.props.form.resetFields();
117 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())
118
+    this.getTimeBarDate(moment().subtract(6, 'day').toDate(), new Date())
119
+    this.getTimeTableData(moment().subtract(6, 'day').toDate(), new Date())
120 120
   }
121 121
 
122 122
   render() {
123 123
     const columns = [
124
-        {
125
-          title: '日期',
126
-          dataIndex: 'createDate',
127
-          key: 'createDate',
128
-        },
129
-        {
130
-          title: '新增客户',
131
-          dataIndex: 'khNum',
132
-          key: 'kh_num',
133
-          sorter: true,
134
-        },
135
-        {
136
-          title: '公客',
137
-          dataIndex: 'gkNum',
138
-          key: 'gk_num',
139
-          sorter: true,
140
-        },
141
-        {
142
-          title: '私客',
143
-          dataIndex: 'skNum',
144
-          key: 'sk_num',
145
-          sorter: true,
146
-        },
147
-        {
148
-            title: '访问人数',
149
-            dataIndex: 'uvNum',
150
-            key: 'uv_num',
151
-            sorter: true,
152
-        },
153
-      ];
124
+      {
125
+        title: '日期',
126
+        dataIndex: 'createDate',
127
+        key: 'createDate',
128
+      },
129
+      {
130
+        title: '新增客户',
131
+        dataIndex: 'khNum',
132
+        key: 'kh_num',
133
+        sorter: true,
134
+      },
135
+      {
136
+        title: '公客',
137
+        dataIndex: 'gkNum',
138
+        key: 'gk_num',
139
+        sorter: true,
140
+      },
141
+      {
142
+        title: '私客',
143
+        dataIndex: 'skNum',
144
+        key: 'sk_num',
145
+        sorter: true,
146
+      },
147
+      {
148
+        title: '访问人数',
149
+        dataIndex: 'uvNum',
150
+        key: 'uv_num',
151
+        sorter: true,
152
+      },
153
+    ];
154 154
 
155 155
     const { getFieldDecorator } = this.props.form;
156 156
     return (
157
-    <div>
158
-      <Form layout="inline">
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>
163
-        </Radio.Group>
164
-        <Form.Item>
165
-        {getFieldDecorator('time', {
166
-            initialValue: [],
167
-        })(
168
-          <RangePicker
169
-            style={{ paddingLeft: '30px' }}
170
-            ranges={{
171
-              Today: [moment(), moment()],
172
-              'This Month': [moment().startOf('month'), moment().endOf('month')],
173
-            }}
174
-            onChange={(_dates, dateStrings) => this.onChangetime(_dates, dateStrings)}
175
-          />
176
-        )}
177
-        </Form.Item>
178
-        <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }} onClick={() => this.datalist()}>
179
-          搜索
157
+      <div>
158
+        <Form layout="inline">
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>
163
+          </Radio.Group>
164
+          <Form.Item>
165
+            {getFieldDecorator('time', {
166
+              initialValue: [],
167
+            })(
168
+              <RangePicker
169
+                style={{ paddingLeft: '30px' }}
170
+                ranges={{
171
+                  Today: [moment(), moment()],
172
+                  'This Month': [moment().startOf('month'), moment().endOf('month')],
173
+                }}
174
+                onChange={(_dates, dateStrings) => this.onChangetime(_dates, dateStrings)}
175
+              />
176
+            )}
177
+          </Form.Item>
178
+          <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }} onClick={() => this.datalist()}>
179
+            搜索
180 180
         </Button>
181
-        <Button onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
182
-        <Button type="primary" style={{ marginLeft: '30px' }} onClick={() => router.go(-1)}>
183
-                返回
181
+          <Button onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
182
+          <Button style={{ float: 'right' }} onClick={() => router.go(-1)}>
183
+            返回
184 184
             </Button>
185 185
         </Form>
186 186
         <StatsChartLine title={this.state.buildingName} data={this.state.barData} />
187 187
         <Row>
188
-            <Col span={22}>
189
-              <span>详细数据</span>
190
-            </Col>
191
-            <Col span={2}>
188
+          <Col span={22}>
189
+            <span>详细数据</span>
190
+          </Col>
191
+          <Col span={2}>
192 192
             <AuthButton name="admin.statistical.building.content.export" noRight={null}>
193 193
               <Button type="primary" onClick={this.exportBuildingStats}>导出</Button>
194 194
             </AuthButton>
195
-            </Col>
195
+          </Col>
196 196
         </Row>
197
-        
198
-        <Table style={{marginTop:'20px'}} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total}} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
199
-    </div>
197
+
198
+        <Table style={{ marginTop: '20px' }} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total }} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
199
+      </div>
200 200
     )
201 201
   }
202 202
 }

+ 1
- 1
src/pages/statistical/consultant/homePagePersons.jsx Целия файл

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

+ 1
- 1
src/pages/statistical/consultant/sharetable.jsx Целия файл

@@ -154,7 +154,7 @@ function record(props) {
154 154
     return (
155 155
 
156 156
         <>
157
-            <Button type="danger" style={{ margin: '0 0 18px 8px' }} onClick={() => router.go(-1)}>返回</Button>
157
+            <div align="right"><Button onClick={() => router.go(-1)}>返回</Button></div>
158 158
             <Form layout="inline">
159 159
                 <div style={{ display: 'flex', alignItems: 'center' }}>
160 160
                     <Form.Item>

+ 1
- 1
src/pages/statistical/consultant/table.jsx Целия файл

@@ -149,7 +149,7 @@ function record(props) {
149 149
     return (
150 150
 
151 151
         <>
152
-            <Button type="danger" style={{ marginLeft: '18px' }} onClick={() => router.go(-1)}>返回</Button>
152
+            <div align="right"><Button onClick={() => router.go(-1)}>返回</Button></div>
153 153
             <Table rowKey={record => data.current * data.size + (row++)}
154 154
                 // <Table rowKey={record => (record.personId + record.buildingId || '')}
155 155
                 style={{ marginTop: '30px' }}

+ 1
- 1
src/pages/statistical/consultant/visitNum.jsx Целия файл

@@ -158,7 +158,7 @@ function record(props) {
158 158
     return (
159 159
 
160 160
         <>
161
-            <Button type="danger" style={{ margin: '0 0 18px 8px' }} onClick={() => router.go(-1)}>返回</Button>
161
+            <div align="right"><Button onClick={() => router.go(-1)}>返回</Button></div>
162 162
             <Form layout="inline">
163 163
                 <div style={{ display: 'flex', alignItems: 'center' }}>
164 164
                     <Form.Item>

+ 1
- 1
src/pages/statistical/consultant/visitPersons.jsx Целия файл

@@ -109,7 +109,7 @@ function record(props) {
109 109
     return (
110 110
 
111 111
         <>
112
-            <Button type="danger" style={{ marginLeft: '18px' }} onClick={() => router.go(-1)}>返回</Button>
112
+            <div align="right"><Button onClick={() => router.go(-1)}>返回</Button></div>
113 113
             <Table rowKey={(index => { index })}
114 114
             // <Table rowKey={record => (record.personId + record.buildingId || '')}
115 115
                 style={{ marginTop: '30px' }}