import { observer } from "mobx-react"; import React from 'react'; import { toJS } from 'mobx'; import {WeaAlertPage} from 'ecCom'; import {WeaLocaleProvider} from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; import {Spin} from 'antd'; import '../../style/resource.less'; @observer export default class resourcePage extends React.Component { constructor(props) { super(props); } render() { const {contentStore} = this.props; let {resourceInfo} = contentStore; let resource = toJS(resourceInfo); if (!resource.success) { return (
); } let Document, Workflow, Customer, Project, Task, Accessory, Capital; //相关文档 resource.docList && ( Document = resource.docList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关流程 resource.wfList && ( Workflow = resource.wfList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关客戶 resource.cusList && ( Customer = resource.cusList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关項目 resource.prjList && ( Project = resource.prjList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关任务 resource.taskList && ( Task = resource.taskList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关附件 resource.accList && ( Accessory = resource.accList.map((item, index) => { return (
  • {item.name}
  • ) })) //相关资产 resource.cptList && ( Capital = resource.cptList.map((item, index) => { return (
  • {item.name}
  • ) })) return (
    {((resource.docList && resource.docList.length !== 0) || (resource.wfList && resource.wfList.length !== 0) || (resource.cusList && resource.cusList.length !== 0) || (resource.prjList && resource.prjList.length !== 0) || (resource.taskList && resource.taskList.length !== 0) || (resource.accList && resource.accList.length !== 0)) ? (
    { (resource.docList && resource.docList.length !== 0) && (
    {getLabel(857, '相关文档')}
    ) } {(resource.wfList && resource.wfList.length !== 0) && (
    {getLabel(1044, '相关流程')}
      {Workflow}
    )} {(resource.accList && resource.accList.length !== 0) && (
    {getLabel(22194, '相关附件')}
    )} {(resource.prjList && resource.prjList.length !== 0) && (
    {getLabel(782, '相关项目')}
      {Project}
    )} {(resource.taskList && resource.taskList.length !== 0) && (
    {getLabel(33414, '相关任务')}
      {Task}
    )} {(resource.cusList && resource.cusList.length !== 0) && (
    {getLabel(783, '相关客户')}
      {Customer}
    )} {(resource.cptList && resource.cptList.length !== 0) && (
    {getLabel(858, '相关资产')}
      {Capital}
    )}
    ) : (
    {getLabel(83553, '暂无数据')}
    )}
    ) } }