topTab.jsx 24 KB

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