Quellcode durchsuchen

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

魏熙美 vor 5 Jahren
Ursprung
Commit
64d89a17a1

+ 2
- 2
src/global.less Datei anzeigen

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

+ 42
- 47
src/pages/Welcome.jsx Datei anzeigen

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

+ 9
- 0
src/pages/activity/ActivityList.jsx Datei anzeigen

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

+ 9
- 0
src/pages/carouselFigure/advertisingList.jsx Datei anzeigen

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

+ 8
- 0
src/pages/carouselFigure/carouselFigureList.jsx Datei anzeigen

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

+ 3
- 3
src/pages/charts/CityNums.jsx Datei anzeigen

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

+ 8
- 0
src/pages/customer/customerlist/index.jsx Datei anzeigen

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

+ 37
- 27
src/pages/customer/independentList/index.jsx Datei anzeigen

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

+ 11
- 0
src/pages/customer/recommendCustomer/index.jsx Datei anzeigen

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

+ 10
- 0
src/pages/customer/report/index.jsx Datei anzeigen

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

+ 1
- 1
src/pages/indexEcharts/components/UserSourcepie.jsx Datei anzeigen

@@ -54,7 +54,7 @@ const UserSource = (props) => {
54 54
     series: [
55 55
       {
56 56
         type: 'pie',
57
-        center: ['44%', '65%'],
57
+        center: ['40%', '65%'],
58 58
         radius: ['34%', '52%'],
59 59
       },
60 60
     ],

+ 3
- 3
src/pages/indexEcharts/styles.less Datei anzeigen

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

+ 1
- 7
src/pages/indexEcharts/userBehavior.jsx Datei anzeigen

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

+ 6
- 0
src/pages/integralMall/GoodsList.jsx Datei anzeigen

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

+ 10
- 0
src/pages/integralMall/exchangeRecords.jsx Datei anzeigen

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

+ 8
- 0
src/pages/news/list/NewsList.jsx Datei anzeigen

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

+ 9
- 0
src/pages/staff/list/StaffList.jsx Datei anzeigen

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

+ 43
- 38
src/pages/system/intention.jsx Datei anzeigen

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