|
|
@@ -20,6 +20,7 @@ import RefreshLayout from "../../components/RefreshLayout";
|
|
|
import {saveListState} from "../../redux/actions/listState";
|
|
|
import {getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
|
|
|
import {Toast} from 'antd-mobile';
|
|
|
+import nodata_img from '../../style/imgs/no_data.png';
|
|
|
|
|
|
let LEAVE_LIST_URL = ''
|
|
|
let mPageIndex = 0
|
|
|
@@ -67,25 +68,29 @@ class LeaveListPage extends React.Component{
|
|
|
|
|
|
render(){
|
|
|
return <div style={{background: '#F2F2F2'}}>
|
|
|
-
|
|
|
- <RefreshLayout
|
|
|
+ {
|
|
|
+ this.state.data.length > 0 ?
|
|
|
+ <RefreshLayout
|
|
|
refreshing={this.state.isRefreshing}
|
|
|
- ref={el => {
|
|
|
- this.container = el
|
|
|
+ ref={el => {
|
|
|
+ this.container = el
|
|
|
}}
|
|
|
onRefresh={this.getListData}>
|
|
|
<Skeleton loading={this.state.isLoading} active paragraph={{rows: 3}}>
|
|
|
- {/*{this.state.selectContentArray.map((itemata,index) => <UserItem index ={index} itemata = {itemata} handelRItem={this.handelRItem} removeSItem={this.removeSItem}></UserItem>)}*/}
|
|
|
{this.state.data.map((itemdata,index) => <LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>
|
|
|
)}
|
|
|
- {/*<List dataSource={this.state.data}*/}
|
|
|
- {/*renderItem={(itemdata,index) =>(*/}
|
|
|
- {/*<List.Item >*/}
|
|
|
- {/*<LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>*/}
|
|
|
- {/*</List.Item>*/}
|
|
|
- {/*)}/>*/}
|
|
|
+ {/* <List dataSource={this.state.data}
|
|
|
+ renderItem={(itemdata,index) =>(
|
|
|
+ <List.Item >
|
|
|
+ <LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>
|
|
|
+ </List.Item>
|
|
|
+ )}/>*/}
|
|
|
</Skeleton>
|
|
|
</RefreshLayout>
|
|
|
+ :
|
|
|
+ <div className="no_data"><img src={nodata_img} alt="" style={{width:'100%',height:'auto'}}/></div>
|
|
|
+ }
|
|
|
+
|
|
|
{
|
|
|
this.state.role=="teacher"?(""):(<Icon type="plus-circle" theme='filled' className='common-add-icon'
|
|
|
onClick={this.onAddAction} />)
|