content.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. import React from 'react';
  2. import { Spin, Button, Tabs, Table, message, Modal, Tooltip } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js'
  4. import $ from 'jquery/src/ajax';
  5. import '../content.less';
  6. import './content.less';
  7. import LeftTab from './leftTab.jsx';
  8. import FollowDetail from "../customer/NEW/intentionCustomer/followDetail";
  9. const TabPane = Tabs.TabPane;
  10. const MessageModal = React.createClass({
  11. getInitialState() {
  12. return {
  13. unreadData: [],
  14. unreadDataType: '0',
  15. dataSourceType: '1',
  16. unreadDataIndex: 0,
  17. newVisible: false,
  18. loading: false,
  19. categoryArr: [],
  20. pagination: {
  21. defaultCurrent: 1,
  22. defaultPageSize: 10,
  23. showQuickJumper: true,
  24. pageSize: 10,
  25. onChange: function (page) {
  26. this.loadReaded(page);
  27. }.bind(this),
  28. showTotal: function (total) {
  29. return '共' + total + '条数据';
  30. }
  31. },
  32. UnreadPagination: {
  33. defaultCurrent: 1,
  34. defaultPageSize: 10,
  35. showQuickJumper: true,
  36. pageSize: 9999999,
  37. onChange: function (page) {
  38. this.loadUnread(page);
  39. }.bind(this),
  40. showTotal: function (total) {
  41. return '共' + total + '条数据';
  42. }
  43. },
  44. columns: [
  45. {
  46. title: '类型',
  47. dataIndex: 'noticeTypeName',
  48. key: 'noticeTypeName',
  49. width: 120,
  50. render: (text, record) => {
  51. return <span style={{ color: record.noticeType == 59 && "red" }}>{text}</span>;
  52. },
  53. }, {
  54. title: '时间',
  55. dataIndex: 'createTimeFormattedDate',
  56. key: 'createTimeFormattedDate',
  57. width: 120
  58. }, {
  59. title: '内容',
  60. dataIndex: 'content',
  61. key: 'content',
  62. width: 1189,
  63. render: (text, record) => {
  64. return (
  65. <Tooltip placement="topLeft" title={text}>
  66. <div style={{
  67. color: record.noticeType == 59 && "red",
  68. width: 1189,
  69. textOverflow: "ellipsis",
  70. whiteSpace: "nowrap",
  71. overflow: 'hidden',
  72. }}>
  73. {text}
  74. </div>
  75. </Tooltip>
  76. )
  77. }
  78. },
  79. {
  80. title: "操作",
  81. dataIndex: "abc",
  82. key: "abc",
  83. width: 150,
  84. render: (text, record) => {
  85. let contractNo = '';
  86. if ((record.noticeType === 14 || record.noticeType === 40) && record.content.indexOf('合同编号-') !== -1) {
  87. let arr = record.content.split('合同编号-');
  88. contractNo = arr[1].match(/(\S*), 订单编号/)[1];
  89. }
  90. return (
  91. record.noticeType === 48 || record.noticeType === 49 ?
  92. <Button type="primary" onClick={() => {
  93. this.category();
  94. record.id = record.uid;
  95. this.setState({
  96. followData: record,
  97. visitModul: true,
  98. });
  99. }}>立即跟进</Button> :
  100. record.noticeType === 14 || record.noticeType === 40 ?
  101. <Button disabled={!contractNo} type="primary" onClick={(e) => {
  102. e.stopPropagation();
  103. let input = document.getElementById("copyText1");
  104. input.value = contractNo;
  105. input.select();
  106. document.execCommand("copy");
  107. message.success('复制成功')
  108. }}>
  109. 复制合同号
  110. </Button> : null
  111. )
  112. }
  113. }
  114. // {
  115. // title: '公司',
  116. // dataIndex: 'unitName',
  117. // key: 'unitName',
  118. // }, {
  119. // title: '业务员',
  120. // dataIndex: 'principle',
  121. // key: 'principle',
  122. // }
  123. ],
  124. columns1: [
  125. {
  126. title: '类型',
  127. dataIndex: 'noticeTypeName',
  128. key: 'noticeTypeName',
  129. width: 120,
  130. render: (text, record) => {
  131. return (
  132. <div style={{ color: record.noticeType == 59 && "red" }}>{text}</div>
  133. )
  134. }
  135. }, {
  136. title: '时间',
  137. dataIndex: 'createTimeFormattedDate',
  138. key: 'createTimeFormattedDate',
  139. width: 120
  140. }, {
  141. title: '内容',
  142. dataIndex: 'content',
  143. key: 'content',
  144. width: 610,
  145. render: (text, record) => {
  146. return (
  147. <Tooltip placement="topLeft" title={text}>
  148. <div
  149. style={{
  150. color: record.noticeType == 59 && "red",
  151. width: 610,
  152. textOverflow: "ellipsis",
  153. whiteSpace: "nowrap",
  154. overflow: 'hidden',
  155. }}>
  156. {text}
  157. </div>
  158. </Tooltip>
  159. )
  160. }
  161. },
  162. {
  163. title: "操作",
  164. dataIndex: "abc",
  165. key: "abc",
  166. width: 150,
  167. render: (text, record) => {
  168. let contractNo = '';
  169. if ((record.noticeType === 14 || record.noticeType === 40) && record.content.indexOf('合同编号-') !== -1) {
  170. let arr = record.content.split('合同编号-');
  171. contractNo = arr[1].match(/(\S*), 订单编号/)[1];
  172. }
  173. return (
  174. record.noticeType === 48 || record.noticeType === 49 ?
  175. <Button type="primary" onClick={() => {
  176. this.category();
  177. record.id = record.uid;
  178. this.setState({
  179. followData: record,
  180. visitModul: true,
  181. });
  182. }}>立即跟进</Button> :
  183. record.noticeType === 14 || record.noticeType === 40 ?
  184. <Button disabled={!contractNo} type="primary" onClick={(e) => {
  185. e.stopPropagation();
  186. let input = document.getElementById("copyText1");
  187. input.value = contractNo;
  188. input.select();
  189. document.execCommand("copy");
  190. message.success('复制成功')
  191. }}>
  192. 复制合同号
  193. </Button> : null
  194. )
  195. }
  196. }
  197. // {
  198. // title: '公司',
  199. // dataIndex: 'unitName',
  200. // key: 'unitName',
  201. // }, {
  202. // title: '业务员',
  203. // dataIndex: 'principle',
  204. // key: 'principle',
  205. // }
  206. ],
  207. data: []
  208. };
  209. },
  210. closeDesc() {
  211. this.setState({
  212. categoryArr: [],
  213. followData: '',
  214. visitModul: false
  215. }, () => {
  216. this.loadReaded(this.state.pagination.current);
  217. })
  218. },
  219. category() {
  220. $.ajax({
  221. method: "get",
  222. dataType: "json",
  223. crossDomain: false,
  224. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  225. data: {},
  226. success: function (data) {
  227. let thedata = data.data;
  228. let theArr = [];
  229. if (!thedata) {
  230. if (data.error && data.error.length) {
  231. message.warning(data.error[0].message);
  232. }
  233. thedata = {};
  234. } else {
  235. thedata.map(function (item, index) {
  236. theArr.push({
  237. value: item.id,
  238. key: item.cname,
  239. });
  240. });
  241. }
  242. this.setState({
  243. categoryArr: theArr,
  244. });
  245. }.bind(this),
  246. });
  247. },
  248. // 获取部门数据
  249. selectSuperId() {
  250. $.ajax({
  251. method: "get",
  252. dataType: "json",
  253. url: globalConfig.context + "/api/admin/organization/getAllDep",
  254. data: {},
  255. success: function (data) {
  256. if (data.error && data.error.length === 0) {
  257. localStorage.setItem("departmentData", JSON.stringify(data.data))
  258. } else {
  259. // message.warning(data.error[0].message);
  260. }
  261. }.bind(this),
  262. }).always(
  263. );
  264. },
  265. //主菜单请求
  266. mainMenu() {
  267. this.setState({
  268. loading: true
  269. });
  270. $.ajax({
  271. method: "get",
  272. dataType: "json",
  273. crossDomain: false,
  274. url: globalConfig.context + "/api/admin/selectNavList",
  275. data: {
  276. },
  277. success: function (data) {
  278. if (!data.data) {
  279. if (data.error && data.error.length) {
  280. message.warning(data.error[0].message);
  281. return;
  282. };
  283. };
  284. this.setState({
  285. menu: data.data
  286. });
  287. }.bind(this),
  288. }).always(function (data) {
  289. this.setState({
  290. loading: false
  291. })
  292. }.bind(this))
  293. },
  294. finId(text) {
  295. var data = this.state.menu || [];
  296. var rid = '';
  297. switch (text) {
  298. case 1:
  299. data.map(function (nub, index) {
  300. if (nub.url.indexOf('demand') != -1) {
  301. rid = nub.id;
  302. }
  303. });
  304. break;
  305. case 2:
  306. data.map(function (nub, index) {
  307. if (nub.url.indexOf('demand') != -1) {
  308. rid = nub.id;
  309. }
  310. });
  311. break;
  312. case 3:
  313. data.map(function (nub, index) {
  314. if (nub.url.indexOf('achievement') != -1) {
  315. rid = nub.id;
  316. }
  317. });
  318. break;
  319. case 4:
  320. data.map(function (nub, index) {
  321. if (nub.url.indexOf('achievement') != -1) {
  322. rid = nub.id;
  323. }
  324. });
  325. break;
  326. case 5:
  327. data.map(function (nub, index) {
  328. if (nub.url.indexOf('order') != -1) {
  329. rid = nub.id;
  330. }
  331. });
  332. break;
  333. case 6:
  334. data.map(function (nub, index) {
  335. if (nub.url.indexOf('order') != -1) {
  336. rid = nub.id;
  337. }
  338. });
  339. break;
  340. case 7:
  341. data.map(function (nub, index) {
  342. if (nub.url.indexOf('servicesManage') != -1) {
  343. rid = nub.id;
  344. }
  345. });
  346. break;
  347. default:
  348. rid = '';
  349. }
  350. return rid;
  351. },
  352. //跳转详情
  353. setStore(record) {
  354. localStorage.setItem('newData', {});
  355. let ids = record.noticeType;
  356. let rid = this.finId(ids) || "";
  357. var urls = '',
  358. dataJson = {};
  359. switch (ids) {
  360. case 1:
  361. urls = "/admin/demand.html?rid=" + rid + "#techDemandAudit";
  362. dataJson = {
  363. "id": record.uid,
  364. //"id":"3f93588b-332e-4353-bbfd-f1451b4b390c",
  365. "dataCategory": "0"
  366. };
  367. break;
  368. case 2:
  369. urls = "/admin/demand.html?rid=" + rid + "#techDemandPublish";
  370. dataJson = {
  371. "id": record.uid,
  372. //"id":"40f77e32-29fa-4a85-a6f0-7c4986bdc5e3",
  373. "dataCategory": '1'
  374. };
  375. break;
  376. case 3:
  377. urls = "/admin/achievement.html?rid=" + rid + "#techAchievementAudit";
  378. dataJson = {
  379. "id": record.uid,
  380. //"id":"f09d5c08-4a8b-48a6-9753-86006f1a53cb",
  381. "ownerType": '1'
  382. };
  383. break;
  384. case 4:
  385. urls = "/admin/achievement.html?rid=" + rid + "#techAchievementPublish";
  386. dataJson = {
  387. "id": record.uid,
  388. //"id":"953c9ef7-6cf6-4ab7-af89-c01521998fed",
  389. "ownerType": '1'
  390. };
  391. break;
  392. case 5:
  393. urls = "/admin/order.html?rid=" + rid + "#myService";
  394. dataJson = {
  395. "orderNo": record.orderNo
  396. //"orderNo":"175557414077480960"
  397. };
  398. break;
  399. case 6:
  400. urls = "/admin/order.html?rid=" + rid + "#mySettlement";
  401. dataJson = {
  402. "orderNo": record.orderNo
  403. //"orderNo":"180714111314051072"
  404. };
  405. break;
  406. case 7:
  407. urls = "/admin/servicesManage/projectOrder.html?rid=" + rid + "#projectManage";
  408. dataJson = {
  409. //"id":record.id,
  410. "id": "69e2d8ca984240a4b9c90daac69fe5e3",
  411. "buyerType": "1"
  412. };
  413. break;
  414. default:
  415. urls: '#';
  416. dataJson = {};
  417. };
  418. // console.log(rid);
  419. if (rid) {
  420. var data = dataJson;
  421. var newData = JSON.stringify(data);
  422. localStorage.setItem('newData', newData);
  423. window.location.href = globalConfig.context + urls;
  424. }
  425. },
  426. loadReaded(pageNo) {
  427. this.state.data = [];
  428. this.setState({
  429. loading: true
  430. });
  431. $.ajax({
  432. method: "get",
  433. dataType: "json",
  434. crossDomain: false,
  435. url: globalConfig.context + "/api/admin/notice/readed",
  436. data: {
  437. pageNo: pageNo || 1,
  438. pageSize: this.state.pagination.pageSize,
  439. type: this.state.unreadDataType,
  440. }
  441. }).done((data) => {
  442. if (!data.data) {
  443. if (data.error && data.error.length) {
  444. message.warning(data.error[0].message);
  445. return;
  446. };
  447. };
  448. this.state.data = [];
  449. for (let i = 0; i < data.data.list.length; i++) {
  450. let thisdata = data.data.list[i];
  451. this.state.data.push({
  452. key: i + 1,
  453. id: thisdata.id,
  454. rid: thisdata.rid,
  455. uid: thisdata.uid,
  456. aid: thisdata.aid,
  457. noticeType: thisdata.noticeType,
  458. year: thisdata.year,
  459. noticeTypeName: thisdata.noticeTypeName,
  460. content: thisdata.content,
  461. createTime: thisdata.createTime,
  462. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  463. principle: thisdata.principle,
  464. unitName: thisdata.unitName
  465. });
  466. };
  467. this.state.pagination.current = data.data.pageNo;
  468. this.state.pagination.total = data.data.totalCount;
  469. this.setState({
  470. dataSource: this.state.data,
  471. pagination: this.state.pagination,
  472. });
  473. }).always(function () {
  474. this.setState({
  475. loading: false
  476. });
  477. }.bind(this));
  478. },
  479. loadUnread(pageNo) {
  480. this.state.data = [];
  481. this.setState({
  482. loading: true
  483. });
  484. $.ajax({
  485. method: "get",
  486. dataType: "json",
  487. crossDomain: false,
  488. url: globalConfig.context + "/api/admin/notice/unread",
  489. data: {
  490. }
  491. }).done((data) => {
  492. if (data.error && data.error.length) {
  493. message.warning(data.error[0].message);
  494. return;
  495. } else {
  496. let arr = data.data.filter(v => v.list.length > 0)
  497. if (arr.length) {
  498. this.setState({
  499. newVisible: true
  500. });
  501. }
  502. let index = data.data.findIndex(v => v.list.length > 0);
  503. if (index >= 0) {
  504. data.data[index].isRead = true;
  505. this.setState({
  506. unreadDataType: data.data[index]['id'] + '',
  507. unreadDataIndex: index,
  508. });
  509. } else {
  510. this.setState({
  511. unreadDataType: data.data[0]['id'] + '',
  512. unreadDataIndex: '0',
  513. });
  514. }
  515. this.setState({
  516. unreadData: data.data,
  517. });
  518. }
  519. }).always(function () {
  520. this.setState({
  521. loading: false,
  522. });
  523. }.bind(this));
  524. },
  525. componentWillMount() {
  526. // this.loadReaded();
  527. this.selectSuperId();
  528. this.loadUnread();
  529. this.mainMenu();
  530. },
  531. handleOk() {
  532. let arr = this.state.unreadData.filter(v => v.list.length > 0 && !v.isRead);
  533. if (arr.length > 0) {
  534. message.warning('还存在未读消息,请查看后再关闭当前页面!');
  535. return;
  536. } else {
  537. this.loadUnread();
  538. this.setState({
  539. newVisible: false
  540. });
  541. }
  542. },
  543. render() {
  544. return (
  545. <div className="set-content">
  546. <textarea id="copyText" style={{ opacity: 0 }} />
  547. <div className="set-title" style={{ marginBottom: 10 }}>
  548. <span style={{ fontWeight: 900, fontSize: 16 }}>信息中心</span>
  549. </div>
  550. <Spin spinning={this.state.loading} className="spin-box">
  551. <Tabs defaultActiveKey={this.state.unreadDataType} activeKey={this.state.unreadDataType} onChange={v => {
  552. let index = this.state.unreadData.findIndex(d => d.id == v);
  553. this.state.unreadData[index].isRead = true;
  554. this.setState({
  555. unreadDataIndex: index,
  556. unreadData: this.state.unreadData,
  557. unreadDataType: v
  558. }, () => {
  559. if (this.state.dataSourceType === '2') {
  560. this.loadReaded()
  561. }
  562. })
  563. }}>
  564. {
  565. this.state.unreadData.map((v) => (
  566. <Tabs.TabPane
  567. key={v.id + ''}
  568. tab={
  569. <div
  570. style={{ color: v.id == 7 && "red" }}
  571. >
  572. {v.list.length === 0 || v.isRead ? null :
  573. <div
  574. style={{
  575. width: '8px',
  576. height: "8px",
  577. borderRadius: '8px',
  578. background: '#f00',
  579. position: 'absolute',
  580. right: '5px',
  581. top: '2px',
  582. }} />
  583. }
  584. {v.name}
  585. </div>
  586. } />
  587. ))
  588. }
  589. </Tabs>
  590. <Tabs defaultActiveKey="1" type="card" tabPosition='left' value={this.state.dataSourceType} onChange={(v) => {
  591. this.setState({
  592. dataSourceType: v
  593. })
  594. if (v === '2') {
  595. this.loadReaded()
  596. }
  597. }}>
  598. <Tabs.TabPane tab={'未读'} key="1">
  599. <Table
  600. bordered
  601. columns={this.state.columns}
  602. dataSource={this.state.unreadData[this.state.unreadDataIndex] ? this.state.unreadData[this.state.unreadDataIndex].list : []}
  603. pagination={false}
  604. />
  605. </Tabs.TabPane>
  606. <Tabs.TabPane tab="已读" key="2">
  607. <Table
  608. bordered
  609. columns={this.state.columns}
  610. dataSource={this.state.dataSource}
  611. pagination={this.state.pagination}
  612. />
  613. </Tabs.TabPane>
  614. </Tabs>
  615. </Spin>
  616. <Modal
  617. maskClosable={false}
  618. style={{ position: "relative" }}
  619. title="消息提醒"
  620. visible={this.state.newVisible}
  621. width={1400}
  622. closable={false}
  623. footer={null}
  624. >
  625. <Spin spinning={this.state.loading} className="spin-box">
  626. <Tabs
  627. defaultActiveKey={this.state.unreadDataType}
  628. activeKey={this.state.unreadDataType}
  629. onChange={v => {
  630. let index = this.state.unreadData.findIndex(d => d.id == v);
  631. this.state.unreadData[index].isRead = true;
  632. this.setState({
  633. unreadDataIndex: index,
  634. unreadData: this.state.unreadData,
  635. unreadDataType: v
  636. })
  637. }}>
  638. {
  639. this.state.unreadData.map((v) => (
  640. <Tabs.TabPane
  641. key={v.id + ''}
  642. tab={<div style={{ color: v.id == 7 && "red" }}>
  643. {v.list.length === 0 || v.isRead ? null : <div style={{ width: '8px', height: "8px", borderRadius: '8px', background: '#f00', position: 'absolute', right: '5px', top: '2px' }} />}
  644. {v.name}
  645. </div>
  646. } />
  647. ))
  648. }
  649. </Tabs>
  650. <Table
  651. columns={this.state.columns1}
  652. dataSource={this.state.unreadData[this.state.unreadDataIndex] ? this.state.unreadData[this.state.unreadDataIndex].list : []}
  653. pagination={false}
  654. scroll={{ y: 600, x: 1000 }}
  655. />
  656. </Spin>
  657. <Button
  658. onClick={this.handleOk}
  659. type={"primary"}
  660. style={{
  661. position: "relative",
  662. left: "50%",
  663. transform: "translateX(-50%)",
  664. bottom: -10
  665. }}
  666. >
  667. 我已阅读以上信息
  668. </Button>
  669. </Modal>
  670. <FollowDetail
  671. categoryArr={this.state.categoryArr}
  672. followData={this.state.followData}
  673. visitModul={this.state.visitModul}
  674. closeDesc={this.closeDesc}
  675. />
  676. <textarea id='copyText1' style={{ opacity: 0 }} />
  677. </div>
  678. );
  679. }
  680. });
  681. const Content = React.createClass({
  682. getInitialState() {
  683. return {
  684. loading: false,
  685. component: '<div></div>'
  686. };
  687. },
  688. getKey(key) {
  689. switch (key) {
  690. // 营销员统计
  691. case "statisticsYxy":
  692. let StatisticsYxy = require('./statistics/yxy').default;
  693. require.ensure([], () => {
  694. this.setState({
  695. component: <StatisticsYxy handlekey={this.getKey} />,
  696. });
  697. });
  698. break;
  699. // 咨询师统计
  700. case "statisticsZxs":
  701. let StatisticsZxs = require('./statistics/zxs').default;
  702. require.ensure([], () => {
  703. this.setState({
  704. component: <StatisticsZxs handlekey={this.getKey} />,
  705. });
  706. });
  707. break;
  708. // 财务统计
  709. case "statisticsCw":
  710. let StatisticsCw = require('./statistics/cw').default;
  711. require.ensure([], () => {
  712. this.setState({
  713. component: <StatisticsCw handlekey={this.getKey} />,
  714. });
  715. });
  716. break;
  717. case 'normal':
  718. require.ensure([], () => {
  719. this.setState({
  720. component: <MessageModal />,
  721. });
  722. });
  723. break;
  724. case "contacts":
  725. let Module = require('./contacts/index').default;
  726. require.ensure([], () => {
  727. this.setState({
  728. component: <Module />,
  729. });
  730. });
  731. break;
  732. default:
  733. require.ensure([], () => {
  734. let Module = require('../module').default;
  735. this.setState({
  736. component: <Module />
  737. });
  738. });
  739. }
  740. window.location.hash = key;
  741. },
  742. componentWillMount() {
  743. let array = window.adminData.shiroList.split(",");
  744. let key = array.includes("1") // 营销员
  745. ? "statisticsYxy" : array.includes("2") // 营销经理
  746. ? "statisticsYxy" : array.includes("8") // 咨询师
  747. ? "statisticsZxs" : array.includes("9") // 咨询师经理
  748. ? "statisticsZxs" : array.includes("5") // 财务专员
  749. ? "statisticsCw" : array.includes("6") // 财务经理
  750. ? "statisticsZxs" : "normal"
  751. if (window.location.hash) {
  752. this.getKey((window.location.hash).slice(1));
  753. } else {
  754. this.getKey(key);
  755. };
  756. },
  757. render() {
  758. return (
  759. <div className="manage-content">
  760. <LeftTab handlekey={this.getKey} />
  761. <div className="content-right">
  762. <Spin spinning={this.state.loading} className='spin-box'>
  763. <div className="index-content">
  764. {this.state.component}
  765. </div>
  766. </Spin>
  767. </div>
  768. </div>
  769. )
  770. }
  771. });
  772. export default Content;
  773. // <div className="index-content">
  774. // <div className="index-userdata clearfix">
  775. // <p className="acc-title">{this.state.number}</p>
  776. // <div className="userdata-img">
  777. // <img src={globalConfig.staticHost + "/upload" + this.state.personPortraitUrl} alt="" />
  778. // </div>
  779. // <div className="userdata-content">
  780. // {(() => {
  781. // switch (userData.lvl || this.state.userlvl) {
  782. // case '0':
  783. // return <p className="userdata-lvl">等级:<span>LV1</span> 普通用户</p>;
  784. // case '1':
  785. // return <p className="userdata-lvl">等级:<span>LV2</span> 已认证用户</p>;
  786. // };
  787. // })()}
  788. // <p>完善资料 {this.state.per}% ,<a href="./set.html">继续完善</a>,有助于提高您的资信</p>
  789. // <p className="userdata-relate" style={{ 'display': 'none' }}>
  790. // <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
  791. // <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>
  792. // <Button className="relateweixin"><img src={weixin} alt="" />微信账号登录</Button>
  793. // </p>
  794. // <div className="userdata-follow">已有<a href="">{this.state.follow}</a>人关注你</div>
  795. // </div>
  796. // </div>
  797. // <div className="index-record">
  798. // <p className="acc-title">我的轨迹</p>
  799. // <ul className="record-list clearfix">
  800. // <li>技术成果:<a href="">{this.state.chengguo}</a>项</li>
  801. // <li>技术开发:<a href="">{this.state.kaifa}</a>项</li>
  802. // <li>科技服务:<a href="">{this.state.fuwu}</a>项</li>
  803. // <li>发布需求:<a href="">{this.state.xuqiu}</a>项</li>
  804. // </ul>
  805. // </div>
  806. // <div className="index-activity">
  807. // <Tabs defaultActiveKey="1" onChange={this.tabChange}>
  808. // <TabPane tab="活动" key="1">
  809. // <p className="acc-title">即将举办的活动</p>
  810. // <ul className="activity-list">
  811. // {
  812. // this.state.activityArr.map(function (item, i) {
  813. // return <li key={i}>
  814. // <span className="list-type">[{item.type}]</span>
  815. // <span className="list-title">{item.title}</span>
  816. // <a href={item.link}>报名</a>
  817. // <span className="list-time">{item.time}</span>
  818. // </li>;
  819. // })
  820. // }
  821. // </ul>
  822. // </TabPane>
  823. // <TabPane tab="其他" key="2">Content of Tab Pane 2</TabPane>
  824. // </Tabs>
  825. // </div>
  826. // </div>