weaver_trunk_cli/pc4mobx/hrm/components/financeV2/TableData.js

23 lines
792 B
JavaScript

import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {WeaTab, WeaTable} from 'ecCom';
@observer
export default class TableData extends Component{
render(){
const {store} = this.props;
const {edit, tabProps, tableProps} = store;
let needShow = (tabProps.datas && tabProps.datas.length > 0) ;
if(needShow){
needShow = !edit ;
}
return (
<div className='table_container' style={{display: (!needShow) ? 'none' : 'block'}}>
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@qsg8zk`} {...tabProps} />
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@64ul9f`} {...tableProps}/>
</div>
)
}
}