瀏覽代碼

bug 项目列表

傅行帆 5 年之前
父節點
當前提交
976a9c4a5a

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

@@ -32,7 +32,7 @@ const BuildingSelect = props => {
32 32
   }, [])
33 33
 
34 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 36
         setData(data.records)
37 37
         // 默认选中第一个
38 38
         if (props.checkFirst) {

+ 7
- 3
src/pages/carouselFigure/advertisingList.jsx 查看文件

@@ -183,8 +183,12 @@ const deleteCarouse = (contentId) => () =>{
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,7 +266,7 @@ const handleSubmit = (e, props) => {
262 266
       </AuthButton>
263 267
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="advertisingList"/>
264 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 270
       </div>
267 271
     </>
268 272
   )

+ 8
- 3
src/pages/carouselFigure/carouselFigureList.jsx 查看文件

@@ -183,8 +183,13 @@ const deleteCarouse = (contentId) => () =>{
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,7 +267,7 @@ const handleSubmit = (e, props) => {
262 267
       </AuthButton>
263 268
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
264 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 271
       </div>
267 272
     </>
268 273
   )