|
|
@ -1,6 +1,6 @@ |
|
|
|
import React, { useEffect,useState} from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { Button,Table,Popconfirm } from '@douyinfe/semi-ui'; |
|
|
|
import { Button,Table,Popconfirm,Pagination } from '@douyinfe/semi-ui'; |
|
|
|
import Addmodal from '../components/cycAddmodal' |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
@ -38,27 +38,27 @@ const Server = (props) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
//配置分页 |
|
|
|
const pagination={ |
|
|
|
total:total, |
|
|
|
defaultCurrent: 1, |
|
|
|
pageSize:pageSize, |
|
|
|
showSizeChanger: true, |
|
|
|
currentPage:pageIndex, |
|
|
|
showQuickJumper: true, |
|
|
|
pageSizeOpts: ["5", "10", "15"], |
|
|
|
showTotal: function () { |
|
|
|
return `共有${total}条` |
|
|
|
}, |
|
|
|
onChange:(pageIndex,pageSize)=>{ |
|
|
|
console.log('pageIndex1',pageIndex,pageSize) |
|
|
|
setPageIndex(pageIndex) |
|
|
|
setPageSize(pageSize) |
|
|
|
const query={ |
|
|
|
pageIndex,pageSize,type:'temp',msg:'获取周期性计划' |
|
|
|
} |
|
|
|
getCycPlan(query) |
|
|
|
} |
|
|
|
} |
|
|
|
// const pagination={ |
|
|
|
// total:total, |
|
|
|
// defaultCurrent: 1, |
|
|
|
// pageSize:pageSize, |
|
|
|
// showSizeChanger: true, |
|
|
|
// currentPage:pageIndex, |
|
|
|
// showQuickJumper: true, |
|
|
|
// pageSizeOpts: ["5", "10", "15"], |
|
|
|
// showTotal: function () { |
|
|
|
// return `共有${total}条` |
|
|
|
// }, |
|
|
|
// onChange:(pageIndex,pageSize)=>{ |
|
|
|
// console.log('pageIndex1',pageIndex,pageSize) |
|
|
|
// setPageIndex(pageIndex) |
|
|
|
// setPageSize(pageSize) |
|
|
|
// const query={ |
|
|
|
// pageIndex,pageSize,type:'temp',msg:'获取周期性计划' |
|
|
|
// } |
|
|
|
// getCycPlan(query) |
|
|
|
// } |
|
|
|
// } |
|
|
|
//console.log('cycPlan',cycPlan) |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
@ -119,7 +119,26 @@ const Server = (props) => { |
|
|
|
<Button theme='solid' type='secondary' style={{marginLeft:50}}>导入</Button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<Table columns={columns} dataSource={cycPlan} pagination={pagination}></Table> |
|
|
|
<Table columns={columns} dataSource={cycPlan} pagination={false}></Table> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex',justifyContent:'flex-end' ,margin:'10px 0 0 0'}}> |
|
|
|
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}> |
|
|
|
共{total}条信息 |
|
|
|
</span> |
|
|
|
<Pagination total={total} |
|
|
|
showSizeChanger |
|
|
|
pageSize={pageSize} |
|
|
|
currentPage={pageIndex} |
|
|
|
pageSizeOpts={[10, 20, 30]} |
|
|
|
onChange={(pageIndex,pageSize)=>{ |
|
|
|
console.log('pageIndex1',pageIndex,pageSize) |
|
|
|
setPageIndex(pageIndex) |
|
|
|
setPageSize(pageSize) |
|
|
|
const query={ |
|
|
|
pageIndex,pageSize,type:'temp',msg:'获取周期性计划' |
|
|
|
} |
|
|
|
getCycPlan(query) |
|
|
|
}}></Pagination> |
|
|
|
</div> |
|
|
|
<Addmodal visible={addVis} onClose={()=>{setAddVis(false);setRecordRow(null);getCycPlan()}} recordRow={recordRow} pepList={pepList}></Addmodal> |
|
|
|
</div> |
|
|
|