Browse Source

bug 项目列表

傅行帆 5 years ago
parent
commit
976a9c4a5a

+ 1
- 1
src/components/SelectButton/BuildSelect.jsx View File

32
   }, [])
32
   }, [])
33
 
33
 
34
   const getCityList = e => {
34
   const getCityList = e => {
35
-    request({ ...apis.building.getList, params: { pageNum: 1, pageSize: 999 } }).then(data => {
35
+    request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
36
         setData(data.records)
36
         setData(data.records)
37
         // 默认选中第一个
37
         // 默认选中第一个
38
         if (props.checkFirst) {
38
         if (props.checkFirst) {

+ 7
- 3
src/pages/carouselFigure/advertisingList.jsx View File

183
 
183
 
184
   }
184
   }
185
   
185
   
186
-  const changePageNum = (pageNumber) => {
187
-      getList({ pageNum: pageNumber, pageSize: 10, showType: 'screen' })
186
+  const changePageNum = (pageNumber, props) => {
187
+    props.form.validateFields((err, values) => {
188
+      if (!err) {
189
+        getList({ pageNum: pageNumber, pageSize: 10, ...values, showType: 'screen' })
190
+      }
191
+    });
188
   }
192
   }
189
 
193
 
190
   // 提交事件
194
   // 提交事件
262
       </AuthButton>
266
       </AuthButton>
263
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="advertisingList"/>
267
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="advertisingList"/>
264
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
268
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
265
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
269
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e,props)} current={data.current}/>
266
       </div>
270
       </div>
267
     </>
271
     </>
268
   )
272
   )

+ 8
- 3
src/pages/carouselFigure/carouselFigureList.jsx View File

183
 
183
 
184
   }
184
   }
185
   
185
   
186
-  const changePageNum = (pageNumber) => {
187
-      getList({ pageNum: pageNumber, pageSize: 10, showType: 'banner' })
186
+  const changePageNum = (pageNumber, props) => {
187
+      props.form.validateFields((err, values) => {
188
+        if (!err) {
189
+          console.log('提交数据: ', values)
190
+          getList({ pageNum: pageNumber, pageSize: 10, ...values, showType: 'banner' })
191
+        }
192
+      });
188
   }
193
   }
189
 
194
 
190
   // 提交事件
195
   // 提交事件
262
       </AuthButton>
267
       </AuthButton>
263
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
268
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
264
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
269
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
265
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
270
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e,props)} current={data.current}/>
266
       </div>
271
       </div>
267
     </>
272
     </>
268
   )
273
   )