import React, { Component } from 'react'; import '../content.less'; import LeftTab from '../leftTab'; import {getMenu} from '../publicMenu.js' import {default as SignatureStatistics} from "./operationalData/signatureStatistics"; import {default as PublicStatistics} from "./publicStatistics/index"; import {default as FollowUpSummary} from "./managementFollow/followUpSummary/index"; class Content extends Component { constructor() { super(); this.state = { loading: false, component:
, }; } componentWillMount() { var ids=window.location.href.indexOf('rid='); var idk=window.location.href.substr(ids+4); var rid=idk.split('#'); let menu=getMenu(rid); let curry; if(menu[0].subMenus.length>0){ curry=menu[0].subMenus[0].url.split('#'); }else{ curry=menu[0].url.split('#'); }; if (window.location.hash) { this.getKey(window.location.hash.substr(1)); } else { this.getKey(curry[1]); }; } getKey(key) { switch (key) { // //我的单位客户 // case 'myOrganization': // require.ensure([], () => { // const MyClient = require('./customerData/myClient').default; // this.setState({ // component: // }); // }); // break; // // 单位客户查询 // case 'organizationQuery': // require.ensure([], () => { // const CompanyCustomer = require('./customerData/companyCustomer').default; // this.setState({ // component:, // }); // }); // break; //我的个人客户 // case 'myPersonal': // require.ensure([], () => { // const IndividualCustomer = require('./individualCustomer/individualCustomer').default; // this.setState({ // component: // // }); // }); // break; //我的被拒绝客户 case 'myReject': require.ensure([], () => { const MyReject = require('./individualCustomer/myReject').default; this.setState({ component: }); }); break; // //个人客户查询 // case 'personalQuery': // require.ensure([], () => { // const QueryCustomer = require('./individualCustomer/queryCustomer').default; // this.setState({ // component:, // }); // }); // break; //专家查询 case 'expertQuery': require.ensure([], () => { const ExpertQuery = require('./individualCustomer/expertQuery').default; this.setState({ component:, }); }); break; //公共客户查询 case 'publicQuery': require.ensure([], () => { const Qublicquery = require('./individualCustomer/publicQuery').default; this.setState({ component:, }); }); break; //个人客户管理 case 'personalManage': require.ensure([], () => { const PersonalManage = require('./customerManagement/personalManages').default; this.setState({ component:, }); }); break; //专家管理 case 'expertManage': require.ensure([], () => { const ExpertManage = require('./customerManagement/expertManage').default; this.setState({ component:, }); }); break; //专家审核 case 'expertAudit': require.ensure([], () => { const ExpertReview = require('./reviewed/expertReview').default; this.setState({ component:, }); }); break; //实名认证审核 case 'identityAudit': require.ensure([], () => { const IdentityAudits = require('./reviewed/identityAudits').default; this.setState({ component:, }); }); break; //客户录入审核 case 'enteringAudit': require.ensure([], () => { const EnteringAudit = require('./reviewed/enteringAudit').default; this.setState({ component:, }); }); break; //专家发布 case 'expertPublish': require.ensure([], () => { const ExpertRelease = require('./release/expertRelease').default; this.setState({ component:, }); }); break; //专家发布新 case 'releaseExpert': require.ensure([], () => { const ReleaseExpert = require('./release/releaseExpert').default; this.setState({ component:, }); }); break; //公共客户管理 case 'publicManage': require.ensure([], () => { const PublicManages = require('./customerManagement/publicManages').default; this.setState({ component:, }); }); break; //部门客户管理 case 'adminCustomerStatistics': require.ensure([], () => { const AdminCustomerStatistics = require('./customerManagement/adminCustomerStatistics').default; this.setState({ component:, }); }); break; //部门客户管理3 // case 'adminCustomerStatistics3': // require.ensure([], () => { // const AdminCustomerStatistics3 = require('./customerManagement/adminCustomerStatistics3').default; // this.setState({ // component:, // }); // }); // break; //单位客户管理 case 'organizationManage': require.ensure([], () => { const OrganizationManage = require('./customerManagement/organizationManages').default; this.setState({ component:, }); }); break; //我的业务 case 'myBusiness': require.ensure([], () => { const MyBusiness = require('./customerService/myBusiness').default; this.setState({ component:, }); }); break; //业务管理 case 'businessMange': require.ensure([], () => { const BusinessMange = require('./customerService/businessManges').default; this.setState({ component:, }); }); break; //业务查询 case 'businessQuery': require.ensure([], () => { const ServiceQuery = require('./customerService/serviceQuery').default; this.setState({ component:, }); }); break; //客户拜访统计 case 'visitStatistics': require.ensure([], () => { const VisitStatistics = require('./statistics/visitStatistics').default; this.setState({ component:, }); }); break; //状态统计 case 'statusStatistics': require.ensure([], () => { const StatusStatistics = require('./statistics/statusStatistics').default; this.setState({ component:, }); }); break; //进度统计 case 'followStatistics': require.ensure([], () => { const FollowStatistics = require('./statistics/followStatistics').default; this.setState({ component:, }); }); break; /* *报表开发 */ case 'personalReport': require.ensure([], () => { const Jurisdiction = require('./report/personalReport').default; this.setState({ component: }); }); break; case 'departmentReport': require.ensure([], () => { const DepartmentReport = require('./report/departmentReport').default; this.setState({ component: }); }); break; /*拜访记录统计*/ //客户营销日统计 case 'diurnalStatistics': require.ensure([], () => { const DiurnalStatistics = require('./customerMarketing/diurnalStatistics').default; this.setState({ component: }); }); break; //客户营销时段统计 case 'timeStatistics': require.ensure([], () => { const TimeStatistics = require('./customerMarketing/timeStatistics').default; this.setState({ component: }); }); break; /*意向客户*/ //个人意向客户 case 'personalIntention': require.ensure([], () => { const PersonalIntention = require('./NEW/intentionCustomer/intentionCustomer').default; this.setState({ component: }); }); break; //渠道-(营销总监) case 'channel': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/channel').default; this.setState({ component: }); }); break; //渠道-(营销经理) case 'channelManage': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/channel').default; this.setState({ component: }); }); break; //渠道-(营销员) case 'channelMarketing': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/channel').default; this.setState({ component: }); }); break; //渠道-(渠道专员) case 'channelCommissioner': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/channel').default; this.setState({ component: }); }); break; //渠道统计-(渠道总监) case 'channelStatistics': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/channelStatistics').default; this.setState({ component: }); }); break; //单位意向客户 case 'companyIntention': require.ensure([], () => { const CompanyIntention = require('./NEW/intentionCustomer/intentionCustomer').default; this.setState({ component: }); }); break; //客户跟进汇总(看所有人的) case 'followUpSummaryAdmin': require.ensure([], () => { const FollowUpSummary = require('./managementFollow/followUpSummary/index').default; this.setState({ component: }); }); break; //客户跟进汇总(只能看自己的) case 'followUpSummaryOrdinary': require.ensure([], () => { const FollowUpSummary = require('./managementFollow/followUpSummary/index').default; this.setState({ component: }); }); break; //客户跟进汇总(既能看自己的也能看自己下级的) case 'followUpSummaryManager': require.ensure([], () => { const FollowUpSummary = require('./managementFollow/followUpSummary/index').default; this.setState({ component: }); }); break; //跟进管理 营销经理 case 'customerFollow': require.ensure([], () => { const CustomerFollow = require('./managementFollow/customerFollow/index').default; this.setState({ component: }); }); break; //跟进管理 营销总监 和 总裁 case 'readOnlyCustomerFollow': require.ensure([], () => { const CustomerFollow = require('./managementFollow/customerFollow/index').default; this.setState({ component: }); }); break; //部门统计 总裁账户可见 case 'departmentStatistics': require.ensure([], () => { const DepartmentStatistics = require('./statistics/departmentStatistics/index').default; this.setState({ component: }); }); break; //客户资料 case 'crm': require.ensure([], () => { const Crm = require('./NEW/crm/crm').default; this.setState({ component: }); }); break; //客户资料维护(营销员) case 'crmMaintain': require.ensure([], () => { const Crm = require('./NEW/crm/crm').default; this.setState({ component: }); }); break; //客户资料维护(咨询师) case 'crmMaintainZXS': require.ensure([], () => { const Crm = require('./NEW/crm/crm').default; this.setState({ component: }); }); break; //客户资料维护(超级管理员以及客服查看) case 'crmMaintainAdmin': require.ensure([], () => { const Crm = require('./NEW/crm/crm').default; this.setState({ component: }); }); break; //客户资料 case 'crmCount': require.ensure([], () => { const CrmCount = require('./NEW/crm/crmCount').default; this.setState({ component: }); }); break; //客户资料 case 'crmAll': require.ensure([], () => { const CrmAll = require('./NEW/crm/crmAll').default; this.setState({ component: }); }); break; //客户资料 case 'patentPayment': require.ensure([], () => { const PatentPayment = require('./NEW/crm/patentPayment').default; this.setState({ component: }); }); break; //客户资料-仅读 case 'patentPaymentOnlyRead': require.ensure([], () => { const PatentPayment = require('./NEW/crm/patentPayment').default; this.setState({ component: }); }); break; /*签单客户*/ //个人签单客户 case 'personalSign': require.ensure([], () => { const PersonalSign = require('./NEW/signCustomer/signCustomer').default; this.setState({ component: }); }); break; //单位签单客户 case 'companySign': require.ensure([], () => { const CompanySign = require('./NEW/signCustomer/signCustomer').default; this.setState({ component: }); }); break; //个人客户查询 case 'personalQuery': require.ensure([], () => { const PersonalQuery = require('./NEW/query/queryCutomer').default; this.setState({ component: }); }); break; //单位客户查询 case 'organizationQuery': require.ensure([], () => { const CompanyQuery = require('./NEW/query/queryCutomer').default; this.setState({ component: }); }); break; //个人公共客户 case 'personalPublicCustomer': require.ensure([], () => { const PersonalPublicCustomer = require('./NEW/publicCustomer/publicCustomer').default; this.setState({ component: }); }); break; //高新复审总数 case 'reexamine': require.ensure([], () => { const Reexamine = require('./operationalData/reexamine').default; this.setState({ component: }); }); break; //签单统计表 case 'signatureStatistics': require.ensure([], () => { const SignatureStatistics = require('./operationalData/signatureStatistics').default; this.setState({ component: }); }); break; //面谈统计表 case 'interviewStatistics': require.ensure([], () => { const InterviewStatistics = require('./operationalData/interviewStatistics').default; this.setState({ component: }); }); break; //全国应收款统计表 case 'receivablesStatistics': require.ensure([], () => { const ReceivablesStatistics = require('./operationalData/receivablesStatistics').default; this.setState({ component: }); }); break; //公出统计 case 'publicStatistics': require.ensure([], () => { const PublicStatistics = require('./publicStatistics/index').default; this.setState({ component: }); }); break; //公出汇总 case 'publicSummary': require.ensure([], () => { const PublicSummary = require('./publicSummary/index').default; this.setState({ component: }); }); break; //单位公共客户 case 'organizationPublicCustomer': require.ensure([], () => { const OrganizationPublicCustomer = require('./NEW/publicCustomer/publicCustomer').default; this.setState({ component: }); }); break; default: require.ensure([], () => { const Module = require('../module').default; this.setState({ component: }); }); }; window.location.hash = key; } render() { return (
{this.state.component}
) } } export default Content;