topTab.jsx 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  1. import React from "react";
  2. import {
  3. Row,
  4. Col,
  5. Icon,
  6. Modal,
  7. Button,
  8. Spin,
  9. Input,
  10. message,
  11. Badge,
  12. Table,
  13. Tabs,
  14. Tag,
  15. } from "antd";
  16. import { getProvince } from "../NewDicProvinceList.js";
  17. import { getActives } from "../tools.js";
  18. import "./topTab.less";
  19. import $ from "jquery/src/ajax";
  20. import logo from "../../../image/acc-logo.png";
  21. import FollowDetail from "./customer/NEW/intentionCustomer/followDetail";
  22. const TabPane = Tabs.TabPane;
  23. const MessageModal = React.createClass({
  24. getInitialState() {
  25. return {
  26. unreadData: [],
  27. unreadDataType: "0",
  28. dataSourceType: "1",
  29. unreadDataIndex: 0,
  30. visible: false,
  31. loading: false,
  32. pagination: {
  33. defaultCurrent: 1,
  34. defaultPageSize: 10,
  35. showQuickJumper: true,
  36. pageSize: 10,
  37. onChange: function (page) {
  38. this.loadReaded(page);
  39. }.bind(this),
  40. showTotal: function (total) {
  41. return "共" + total + "条数据";
  42. },
  43. },
  44. UnreadPagination: {
  45. defaultCurrent: 1,
  46. defaultPageSize: 10,
  47. showQuickJumper: true,
  48. pageSize: 10,
  49. onChange: function (page) {
  50. this.loadUnread(page);
  51. }.bind(this),
  52. showTotal: function (total) {
  53. return "共" + total + "条数据";
  54. },
  55. },
  56. categoryArr: [],
  57. columns: [
  58. {
  59. title: "类型",
  60. dataIndex: "noticeType",
  61. key: "noticeType",
  62. render: (text, record) => {
  63. return <span>{record.noticeTypeName}</span>;
  64. },
  65. },
  66. {
  67. title: "时间",
  68. dataIndex: "createTimeFormattedDate",
  69. key: "createTimeFormattedDate",
  70. },
  71. {
  72. title: "内容",
  73. dataIndex: "content",
  74. key: "content",
  75. },
  76. {
  77. title: "操作",
  78. dataIndex: "abc",
  79. key: "abc",
  80. render: (text, record) => {
  81. let contractNo = "";
  82. if (
  83. (record.noticeType === 14 || record.noticeType === 40) &&
  84. record.content.indexOf("合同编号-") !== -1
  85. ) {
  86. let arr = record.content.split("合同编号-");
  87. contractNo = arr[1].match(/(\S*), 订单编号/)[1];
  88. }
  89. return record.noticeType === 48 || record.noticeType === 49 ? (
  90. <Button
  91. type="primary"
  92. onClick={() => {
  93. this.category();
  94. record.id = record.uid;
  95. this.setState({
  96. followData: record,
  97. visitModul: true,
  98. });
  99. }}
  100. >
  101. 立即跟进
  102. </Button>
  103. ) : record.noticeType === 14 || record.noticeType === 40 ? (
  104. <Button
  105. disabled={!contractNo}
  106. type="primary"
  107. onClick={(e) => {
  108. e.stopPropagation();
  109. let input = document.getElementById("copyText");
  110. input.value = contractNo;
  111. input.select();
  112. document.execCommand("copy");
  113. message.success("复制成功");
  114. }}
  115. >
  116. 复制合同号
  117. </Button>
  118. ) : null;
  119. },
  120. },
  121. ],
  122. data: [],
  123. };
  124. },
  125. category() {
  126. $.ajax({
  127. method: "get",
  128. dataType: "json",
  129. crossDomain: false,
  130. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  131. data: {},
  132. success: function (data) {
  133. let thedata = data.data;
  134. let theArr = [];
  135. if (!thedata) {
  136. if (data.error && data.error.length) {
  137. message.warning(data.error[0].message);
  138. }
  139. thedata = {};
  140. } else {
  141. thedata.map(function (item, index) {
  142. theArr.push({
  143. value: item.id,
  144. key: item.cname,
  145. });
  146. });
  147. }
  148. this.setState({
  149. categoryArr: theArr,
  150. });
  151. }.bind(this),
  152. });
  153. },
  154. loadReaded(pageNo) {
  155. this.state.data = [];
  156. this.setState({
  157. loading: true,
  158. });
  159. $.ajax({
  160. method: "get",
  161. dataType: "json",
  162. crossDomain: false,
  163. url: globalConfig.context + "/api/admin/notice/readed",
  164. data: {
  165. pageNo: pageNo || 1,
  166. pageSize: this.state.pagination.pageSize,
  167. type: this.state.unreadDataType,
  168. },
  169. })
  170. .done((data) => {
  171. if (!data.data) {
  172. if (data.error && data.error.length) {
  173. message.warning(data.error[0].message);
  174. return;
  175. }
  176. }
  177. this.state.data = [];
  178. for (let i = 0; i < data.data.list.length; i++) {
  179. let thisdata = data.data.list[i];
  180. this.state.data.push({
  181. key: i + 1,
  182. id: thisdata.id,
  183. rid: thisdata.rid,
  184. uid: thisdata.uid,
  185. aid: thisdata.aid,
  186. noticeType: thisdata.noticeType,
  187. year: thisdata.year,
  188. noticeTypeName: thisdata.noticeTypeName,
  189. content: thisdata.content,
  190. createTime: thisdata.createTime,
  191. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  192. principle: thisdata.principle,
  193. unitName: thisdata.unitName,
  194. });
  195. }
  196. this.state.pagination.current = data.data.pageNo;
  197. this.state.pagination.total = data.data.totalCount;
  198. this.setState({
  199. dataSource: this.state.data,
  200. pagination: this.state.pagination,
  201. });
  202. })
  203. .always(
  204. function () {
  205. this.setState({
  206. loading: false,
  207. });
  208. }.bind(this)
  209. );
  210. },
  211. loadUnread(pageNo) {
  212. this.state.data = [];
  213. this.setState({
  214. loading: true,
  215. });
  216. $.ajax({
  217. method: "get",
  218. dataType: "json",
  219. crossDomain: false,
  220. url: globalConfig.context + "/api/admin/notice/unread",
  221. data: {},
  222. })
  223. .done((data) => {
  224. if (data.error && data.error.length) {
  225. message.warning(data.error[0].message);
  226. return;
  227. } else {
  228. let arr = data.data.filter((v) => v.list.length > 0);
  229. if (arr.length) {
  230. this.setState({
  231. newVisible: true,
  232. });
  233. }
  234. let index = data.data.findIndex((v) => v.list.length > 0);
  235. if (index >= 0) {
  236. data.data[index].isRead = true;
  237. this.setState({
  238. unreadDataType: data.data[index]["id"] + "",
  239. unreadDataIndex: index,
  240. });
  241. } else {
  242. this.setState({
  243. unreadDataType: data.data[0]["id"] + "",
  244. unreadDataIndex: "0",
  245. });
  246. }
  247. this.setState({
  248. unreadData: data.data,
  249. });
  250. }
  251. })
  252. .always(
  253. function () {
  254. this.setState({
  255. loading: false,
  256. });
  257. }.bind(this)
  258. );
  259. },
  260. componentWillReceiveProps(nextProps) {
  261. if (!this.state.visible && nextProps.showDesc) {
  262. this.loadReaded();
  263. this.loadUnread();
  264. }
  265. this.state.visible = nextProps.showDesc;
  266. },
  267. handleOk() {
  268. let arr = this.state.unreadData.filter(
  269. (v) => v.list.length > 0 && !v.isRead
  270. );
  271. if (arr.length > 0) {
  272. message.warning("还存在未读消息,请查看后再关闭当前页面!");
  273. return;
  274. } else {
  275. this.setState({
  276. visible: false,
  277. });
  278. }
  279. this.props.closeDesc(false, true);
  280. },
  281. handleCancel(e) {
  282. let arr = this.state.unreadData.filter(
  283. (v) => v.list.length > 0 && !v.isRead
  284. );
  285. if (arr.length > 0) {
  286. message.warning("还存在未读消息,请查看后再关闭当前页面!");
  287. return;
  288. } else {
  289. this.setState({
  290. visible: false,
  291. });
  292. }
  293. this.props.closeDesc(false, true);
  294. },
  295. closeDesc() {
  296. this.setState(
  297. {
  298. categoryArr: [],
  299. followData: "",
  300. visitModul: false,
  301. },
  302. () => {
  303. this.loadReaded(this.state.pagination.current);
  304. }
  305. );
  306. },
  307. render() {
  308. return (
  309. <div className="topTab-modal">
  310. <Spin spinning={this.state.loading} className="spin-box">
  311. <Modal
  312. maskClosable={false}
  313. title="信息中心"
  314. visible={this.state.visible}
  315. onOk={this.handleOk}
  316. onCancel={this.handleCancel}
  317. width="1200px"
  318. footer=""
  319. >
  320. <Spin spinning={this.state.loading} className="spin-box">
  321. <Tabs
  322. defaultActiveKey={this.state.unreadDataType}
  323. activeKey={this.state.unreadDataType}
  324. onChange={(v) => {
  325. let index = this.state.unreadData.findIndex((d) => d.id == v);
  326. this.state.unreadData[index].isRead = true;
  327. this.setState(
  328. {
  329. unreadDataIndex: index,
  330. unreadData: this.state.unreadData,
  331. unreadDataType: v,
  332. },
  333. () => {
  334. if (this.state.dataSourceType === "2") {
  335. this.loadReaded();
  336. }
  337. }
  338. );
  339. }}
  340. >
  341. {this.state.unreadData.map((v) => (
  342. <Tabs.TabPane
  343. key={v.id + ""}
  344. tab={
  345. <div>
  346. {v.list.length === 0 || v.isRead ? null : (
  347. <div
  348. style={{
  349. width: "8px",
  350. height: "8px",
  351. borderRadius: "8px",
  352. background: "#f00",
  353. position: "absolute",
  354. right: "5px",
  355. top: "2px",
  356. }}
  357. />
  358. )}
  359. {v.name}
  360. </div>
  361. }
  362. />
  363. ))}
  364. </Tabs>
  365. <Tabs
  366. defaultActiveKey="1"
  367. type="card"
  368. tabPosition="left"
  369. value={this.state.dataSourceType}
  370. onChange={(v) => {
  371. this.setState({
  372. dataSourceType: v,
  373. });
  374. if (v === "2") {
  375. this.loadReaded();
  376. }
  377. }}
  378. >
  379. <Tabs.TabPane tab={"未读"} key="1">
  380. <Table
  381. bordered
  382. columns={this.state.columns}
  383. dataSource={
  384. this.state.unreadData[this.state.unreadDataIndex]
  385. ? this.state.unreadData[this.state.unreadDataIndex].list
  386. : []
  387. }
  388. pagination={false}
  389. />
  390. </Tabs.TabPane>
  391. <Tabs.TabPane tab="已读" key="2">
  392. <Table
  393. bordered
  394. columns={this.state.columns}
  395. dataSource={this.state.dataSource}
  396. pagination={this.state.pagination}
  397. />
  398. </Tabs.TabPane>
  399. </Tabs>
  400. </Spin>
  401. <textarea id="copyText" style={{ opacity: 0 }} />
  402. </Modal>
  403. </Spin>
  404. <FollowDetail
  405. categoryArr={this.state.categoryArr}
  406. followData={this.state.followData}
  407. visitModul={this.state.visitModul}
  408. closeDesc={this.closeDesc}
  409. />
  410. </div>
  411. );
  412. },
  413. });
  414. const UserModal = React.createClass({
  415. getInitialState() {
  416. return {
  417. visible: false,
  418. loading: false,
  419. locations: [],
  420. };
  421. },
  422. loadData() {
  423. this.setState({
  424. loading: true,
  425. });
  426. $.ajax({
  427. method: "get",
  428. dataType: "json",
  429. crossDomain: false,
  430. url: globalConfig.context + "/api/admin/adminInfo",
  431. success: function (data) {
  432. if (!data.data) {
  433. if (data.error[0] && data.error[0]) {
  434. message.warning(data.error[0].message);
  435. }
  436. return;
  437. }
  438. this.setState({
  439. id: data.data.id,
  440. mobile: data.data.mobile,
  441. contactMobile: data.data.contactMobile,
  442. name: data.data.name,
  443. position: data.data.position,
  444. email: data.data.email,
  445. createTime: data.data.createTime,
  446. number: data.data.number,
  447. createTimeFormattedDate: data.data.createTimeFormattedDate,
  448. pwd: "",
  449. password: "",
  450. });
  451. this.loadLocations(data.data.id);
  452. }.bind(this),
  453. }).always(
  454. function (data) {
  455. this.setState({
  456. loading: false,
  457. });
  458. }.bind(this)
  459. );
  460. },
  461. loadLocations(id) {
  462. this.setState({
  463. loading: true,
  464. });
  465. $.ajax({
  466. url: globalConfig.context + "/api/admin/supervise/adminDetailLocation",
  467. cache: false,
  468. data: {
  469. id: id,
  470. },
  471. }).done((data) => {
  472. if (!data.data) {
  473. if (data.error && data.error.length) {
  474. message.warning(data.error[0].message);
  475. return;
  476. }
  477. }
  478. data.data.map((item) => {
  479. if (item.city) {
  480. item.city = item.city.split(",");
  481. }
  482. });
  483. this.setState({
  484. locations: data.data,
  485. loading: false,
  486. });
  487. });
  488. },
  489. componentWillReceiveProps(nextProps) {
  490. if (!this.state.visible && nextProps.showDesc) {
  491. this.loadData();
  492. }
  493. this.state.visible = nextProps.showDesc;
  494. },
  495. handleOk() {
  496. this.setState({
  497. loading: true,
  498. });
  499. if (this.state.contactMobile) {
  500. if (!/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile)) {
  501. message.warning("不是完整的11位手机号或者正确的手机号前七位");
  502. this.setState({
  503. loading: false,
  504. });
  505. return false;
  506. }
  507. }
  508. // if(this.state.mobile.length>11){
  509. // message.warning("登录账号不能超过11位");
  510. // return false;
  511. // }
  512. $.ajax({
  513. method: "post",
  514. dataType: "json",
  515. crossDomain: false,
  516. url: globalConfig.context + "/api/admin/updateAdminInfo",
  517. data: {
  518. id: this.state.id,
  519. mobile: this.state.mobile,
  520. contactMobile: this.state.contactMobile,
  521. name: this.state.name,
  522. email: this.state.email,
  523. province: this.state.province,
  524. password: this.state.password,
  525. pwd: this.state.pwd,
  526. },
  527. }).always(
  528. function (data) {
  529. if (data.error && data.error.length) {
  530. message.warning(data.error[0].message);
  531. } else {
  532. this.setState({
  533. loading: false,
  534. });
  535. message.success("保存成功!");
  536. this.props.closeDesc(false, true);
  537. }
  538. }.bind(this)
  539. );
  540. },
  541. handleCancel(e) {
  542. this.setState({
  543. visible: false,
  544. });
  545. this.props.closeDesc(false);
  546. },
  547. render() {
  548. return (
  549. <div className="topTab-modal">
  550. <Spin spinning={this.state.loading} className="spin-box">
  551. <Modal
  552. maskClosable={false}
  553. title="用户设置"
  554. visible={this.state.visible}
  555. onOk={this.handleOk}
  556. onCancel={this.handleCancel}
  557. width="380px"
  558. >
  559. <ul className="modal-content">
  560. <li>
  561. <span className="modal-text">名字</span>
  562. <Input
  563. value={this.state.name}
  564. onChange={(e) => {
  565. this.state.name = e.target.value;
  566. this.setState({ name: this.state.name });
  567. }}
  568. />
  569. </li>
  570. <li>
  571. <span className="modal-text">职位</span>
  572. <span>{this.state.position}</span>
  573. </li>
  574. <li>
  575. <span className="modal-text">登录账号</span>
  576. <span>{this.state.mobile}</span>
  577. </li>
  578. <li>
  579. <span className="modal-text">联系方式</span>
  580. <Input
  581. value={this.state.contactMobile}
  582. onChange={(e) => {
  583. this.state.contactMobile = e.target.value;
  584. this.setState({ contactMobile: this.state.contactMobile });
  585. }}
  586. />
  587. </li>
  588. <li>
  589. <span className="modal-text">省份</span>
  590. <div style={{ display: "inline-block", width: "78%" }}>
  591. {this.state.locations.map((item, i) => {
  592. return (
  593. <Tag key={i}>
  594. {getProvince(item.province) +
  595. " " +
  596. (item.city
  597. ? item.city.map((c) => {
  598. return getProvince(c) + " ";
  599. })
  600. : "")}
  601. </Tag>
  602. );
  603. })}
  604. </div>
  605. </li>
  606. <li>
  607. <span className="modal-text">邮箱</span>
  608. <Input
  609. value={this.state.email}
  610. onChange={(e) => {
  611. this.state.email = e.target.value;
  612. this.setState({ email: this.state.email });
  613. }}
  614. />
  615. </li>
  616. <li>
  617. <span className="modal-text">原密码</span>
  618. <Input
  619. value={this.state.pwd}
  620. type="password"
  621. onChange={(e) => {
  622. this.state.pwd = e.target.value;
  623. this.setState({ pwd: this.state.pwd });
  624. }}
  625. />
  626. </li>
  627. <li>
  628. <span className="modal-text">密码</span>
  629. <Input
  630. value={this.state.password}
  631. type="password"
  632. onChange={(e) => {
  633. this.state.password = e.target.value;
  634. this.setState({ password: this.state.password });
  635. }}
  636. />
  637. </li>
  638. </ul>
  639. </Modal>
  640. </Spin>
  641. </div>
  642. );
  643. },
  644. });
  645. const TopTab = React.createClass({
  646. getInitialState() {
  647. return {
  648. username: "请登录!",
  649. defaultActiveKey: "-1",
  650. htmlMenus: [],
  651. };
  652. },
  653. logOut() {
  654. let theActive = this.props.active;
  655. $.ajax({
  656. method: "get",
  657. dataType: "json",
  658. url: globalConfig.context + "/login",
  659. }).done(function (data) {
  660. window.location.href = globalConfig.context + "/admin/login.html";
  661. });
  662. },
  663. componentWillMount() {
  664. if (this.props.active) {
  665. this.loadData();
  666. }
  667. this.mainMenu();
  668. },
  669. //主菜单请求
  670. mainMenu() {
  671. this.setState({
  672. loading: true,
  673. });
  674. $.ajax({
  675. method: "get",
  676. dataType: "json",
  677. crossDomain: false,
  678. url: globalConfig.context + "/api/admin/selectNavList",
  679. data: {},
  680. success: function (data) {
  681. if (!data.data) {
  682. if (data.error && data.error.length) {
  683. message.warning(data.error[0].message);
  684. return;
  685. }
  686. }
  687. let menu = data.data;
  688. var htmlMenu = [];
  689. let index = menu.findIndex(
  690. (v) => getActives(v.name) === this.props.active
  691. );
  692. this.setState({
  693. htmlMenus: menu,
  694. defaultActiveKey: index + "",
  695. });
  696. }.bind(this),
  697. }).always(
  698. function (data) {
  699. this.setState({
  700. loading: false,
  701. });
  702. }.bind(this)
  703. );
  704. },
  705. loadData() {
  706. this.setState({
  707. loading: true,
  708. });
  709. $.ajax({
  710. method: "get",
  711. dataType: "json",
  712. crossDomain: false,
  713. url: globalConfig.context + "/api/admin/notice/unreadCount",
  714. success: function (data) {
  715. if (!data.data) {
  716. if (data.error[0] && data.error[0]) {
  717. message.warning(data.error[0].message);
  718. return;
  719. }
  720. }
  721. this.setState({
  722. badge: data.data,
  723. });
  724. }.bind(this),
  725. }).always(
  726. function (data) {
  727. this.setState({
  728. loading: false,
  729. });
  730. }.bind(this)
  731. );
  732. },
  733. closeUserModal(e, s) {
  734. this.state.userModalShow = e;
  735. if (s) {
  736. this.loadData();
  737. }
  738. },
  739. closeMessageModal(e, s) {
  740. this.state.messageModalShow = e;
  741. if (s) {
  742. this.loadData();
  743. }
  744. },
  745. render() {
  746. return (
  747. <div className="account-top">
  748. <div className="acc-top-user">
  749. <span className="acc-top-user-name">
  750. 欢迎您 ,{" "}
  751. {adminData.name || adminData.mobile ? (
  752. <a
  753. onClick={() => {
  754. // if (window.showPermissionList && window.showRoleList) {
  755. // return
  756. // };
  757. this.setState({ userModalShow: true });
  758. }}
  759. >
  760. {" "}
  761. {adminData.name || adminData.mobile}{" "}
  762. </a>
  763. ) : (
  764. <a onClick={this.logOut}>{this.state.username}</a>
  765. )}{" "}
  766. <a onClick={this.logOut}>[ 退出 ]</a>
  767. </span>
  768. <span className="acc-top-user-toindex">
  769. <a href={jumpUrl || "" + "/portal/index.html"}>返回首页</a>
  770. </span>
  771. {this.props.active ? (
  772. <a
  773. onClick={() => {
  774. this.setState({ messageModalShow: true });
  775. }}
  776. className="user-badge"
  777. >
  778. <Icon type="mail" />
  779. {!window.showSystem && this.state.badge ? (
  780. <Badge status="processing" />
  781. ) : null}
  782. </a>
  783. ) : null}
  784. </div>
  785. <div className="acc-index">
  786. <div className="acc-index-imgbox">
  787. <img src={logo} alt="" />
  788. </div>
  789. <span>
  790. <a href={globalConfig.context + "/admin/index.html"}>
  791. 管理中心首页
  792. </a>
  793. </span>
  794. </div>
  795. <div className="acc-top-tab">
  796. {this.state.htmlMenus.length > 0 ? (
  797. <Tabs
  798. defaultActiveKey={this.state.defaultActiveKey}
  799. activeKey={this.state.defaultActiveKey}
  800. tabPosition="top"
  801. onTabClick={(v) => {
  802. window.location.href = globalConfig.context + this.state.htmlMenus[parseInt(v)].url + '?rid=' + this.state.htmlMenus[parseInt(v)].id;
  803. }}
  804. // onChange={v=>{
  805. // window.location.href=globalConfig.context + this.state.htmlMenus[parseInt(v)].url+'?rid='+this.state.htmlMenus[parseInt(v)].id;
  806. // }}
  807. >
  808. {this.state.htmlMenus.map((v, k) => (
  809. <TabPane key={k} tab={v.name} />
  810. ))}
  811. </Tabs>
  812. ) : null}
  813. </div>
  814. <UserModal
  815. showDesc={this.state.userModalShow}
  816. closeDesc={this.closeUserModal}
  817. />
  818. <MessageModal
  819. showDesc={this.state.messageModalShow}
  820. closeDesc={this.closeMessageModal}
  821. />
  822. </div>
  823. );
  824. },
  825. });
  826. export default TopTab;