import React from 'react' import * as mobx from 'mobx' import { inject, observer } from 'mobx-react' import { WeaTop, WeaTab, WeaFormItem, WeaRightMenu, WeaAlertPage, WeaNewScrollPagination } from 'ecCom' import { Row, Col, Spin, Modal, Button, message, Switch, Menu, Dropdown,Icon } from 'antd' import { WeaSwitch, WeaTableNew } from 'comsMobx' import { i18n } from '../../public/i18n'; import '../../style/card.less'; import FormItem from './FormItem'; import IframeItem from './IframeItem'; import { renderNoright } from '../../util'; // 从util文件引入公共的方法 const toJS = mobx.toJS; const confirm = Modal.confirm; @inject('resourceCard') @observer export default class ResourceCard extends React.Component { constructor(props) { super(props); } componentWillMount() { } componentDidMount() { this.init(); } componentWillUnmount() { } componentWillReceiveProps(nextProps) { if (this.props.location.key !== nextProps.location.key) { this.init(); } } init() { const { resourceCard } = this.props; resourceCard.init(); } onScrollEnd = () => { const { resourceCard } = this.props; resourceCard.scrollLoading = true; resourceCard.iframeList.push({ id:"job", title:"岗位管理", url:'/spa/organization/static/index.html#/main/organization/companyExtend/7' }) setTimeout(() => { resourceCard.scrollLoading = false; }, 2000); }; scrollToAnchor = (anchorName) => { if (anchorName) { // 找到锚点 let anchorElement = document.getElementById(anchorName); // 如果对应id的锚点存在,就跳转到锚点 if (anchorElement) { anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' }); } } } handleMenuClick = (e) => { console.log('click', e); } render() { const { resourceCard } = this.props, { height, scrollLoading, offset, overtime, intervalTime, data, iframeList } = resourceCard; const menu = (
); return (
流程总数
{data.statistical.workflowCount}
文档总数
{data.statistical.docCount}
我的客户
{data.statistical.cusCount}
我的协作
{data.statistical.collaborationCount}
微博总数
{data.statistical.weiboCount}