import React from 'react'; import {inject, observer} from 'mobx-react'; import {toJS} from 'mobx'; import {Spin, Pagination} from 'antd'; import {WeaNewScroll, WeaDialog, WeaTools, WeaAvatar, WeaInput, WeaCustomNew } from 'ecCom'; const { sendMsg } = WeaTools; const Base64 = ecCom.WeaTools.Base64; import {WeaLocaleProvider} from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; // import Apps from 'weaSmallApp'; // const AppCom = Apps.com; // const SendSms = AppCom.SendSms; // // import Workplan from 'weaWorkplan'; // const WorkPlanCreate = Workplan.com.WorkPlanCreate; const store = [ 'weesoSeachSetStore', 'weesoStore', 'routing' ]; @inject(...store) @observer export default class CommonContent extends React.Component { constructor(props) { super(props); this.state = { smsVisible: false, workPlanVisible: false, id: '', } } componentDidMount() { const { getAdConditions } = this.props.weesoSeachSetStore; let pageuuid = this.props.routing&&this.props.routing.location&&this.props.routing.location.query&&this.props.routing.location.query.page_uuid; const { getBaseData, setUrlParams } = this.props.weesoStore; let urlParms = this.props.routing && this.props.routing.location && this.props.routing.location.query; urlParms = toJS(urlParms); if(pageuuid) { setUrlParams(urlParms,() => { getBaseData(undefined, undefined, undefined, pageuuid, () => { if(pageuuid !== 'FULLSEARCH') { let p = { page_uuid: pageuuid, }; getAdConditions(p); } }); }); } else { setUrlParams(urlParms,() => { getBaseData(); }); } if (!window.weaWorkplan) { eventRegister.loadModule('f_workplan', ()=>{ this.props.weesoStore.setWPLoaded(true) }, ()=>{}) } else { this.props.weesoStore.setWPLoaded(true) } if (!window.weaSmallApp) { eventRegister.loadModule('f_smallApp', ()=>{ this.props.weesoStore.setSMLoaded(true) }, ()=>{}) } else { this.props.weesoStore.setSMLoaded(true) } } render() { const {weesoStore, topTabHeight} = this.props; let {searchResult, emptyResult, page, searchDatas, supportSkipSearch, addSubdomainUrl, defalutMoreKey} = weesoStore; searchDatas = toJS(searchDatas); let maxPerPage = searchDatas.maxPerPage || '', recordCount = searchDatas.recordCount || ''; let paginationProps = supportSkipSearch ? { showQuickJumper: true, showTotal: total => getLabel('514163','共${num}页').replace('${num}', Math.ceil(total/maxPerPage)), } : { className: "esearch-pagination-customize", }; const hidesearch = this.props.hidesearch || '0'; let topStyle = {}; if (hidesearch === '1') { topStyle = { paddingTop: '10px', paddingLeft:'10px'}; } if(topTabHeight === 'h-85') { topStyle = { ...topStyle, paddingTop: 88, // 85+3 } } return (
{this.getHrmNameContent(item,weesoStore,index)}
{item.head.gender}
{i.key}:
{
i.value
&& (i.value.indexOf('desensitization__') > -1 || i.value.indexOf('encryption__') > -1)
? (
{this.userHabitCollect(item.head.titlelink, index)}} /> { other && (other.attachFile === true) && }
{ item.foot && item.foot.info && item.foot.info.length != 0 && item.foot.info.map(i => { return ({i.key?i.key+":":""}
) } ) }