topTab.jsx 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  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. {v.list.length === 0 || v.isRead ? null : (
  350. <div
  351. style={{
  352. width: "8px",
  353. height: "8px",
  354. borderRadius: "8px",
  355. background: "#f00",
  356. position: "absolute",
  357. right: "5px",
  358. top: "2px",
  359. }}
  360. />
  361. )}
  362. {v.name}
  363. </div>
  364. }
  365. />
  366. ))}
  367. </Tabs>
  368. <Tabs
  369. defaultActiveKey="1"
  370. type="card"
  371. tabPosition="left"
  372. value={this.state.dataSourceType}
  373. onChange={(v) => {
  374. this.setState({
  375. dataSourceType: v,
  376. });
  377. if (v === "2") {
  378. this.loadReaded();
  379. }
  380. }}
  381. >
  382. <Tabs.TabPane tab={"未读"} key="1">
  383. <Table
  384. bordered
  385. columns={this.state.columns}
  386. dataSource={
  387. this.state.unreadData[this.state.unreadDataIndex]
  388. ? this.state.unreadData[this.state.unreadDataIndex].list
  389. : []
  390. }
  391. pagination={false}
  392. />
  393. </Tabs.TabPane>
  394. <Tabs.TabPane tab="已读" key="2">
  395. <Table
  396. bordered
  397. columns={this.state.columns}
  398. dataSource={this.state.dataSource}
  399. pagination={this.state.pagination}
  400. />
  401. </Tabs.TabPane>
  402. </Tabs>
  403. </Spin>
  404. <textarea id="copyText" style={{ opacity: 0 }} />
  405. </Modal>
  406. </Spin>
  407. <FollowDetail
  408. categoryArr={this.state.categoryArr}
  409. followData={this.state.followData}
  410. visitModul={this.state.visitModul}
  411. closeDesc={this.closeDesc}
  412. />
  413. </div>
  414. );
  415. },
  416. });
  417. const UserModal = React.createClass({
  418. getInitialState() {
  419. return {
  420. visible: false,
  421. loading: false,
  422. locations: [],
  423. };
  424. },
  425. loadData() {
  426. this.setState({
  427. loading: true,
  428. });
  429. $.ajax({
  430. method: "get",
  431. dataType: "json",
  432. crossDomain: false,
  433. url: globalConfig.context + "/api/admin/adminInfo",
  434. success: function (data) {
  435. if (!data.data) {
  436. if (data.error[0] && data.error[0]) {
  437. message.warning(data.error[0].message);
  438. }
  439. return;
  440. }
  441. this.setState({
  442. id: data.data.id,
  443. mobile: data.data.mobile,
  444. contactMobile: data.data.contactMobile,
  445. name: data.data.name,
  446. position: data.data.position,
  447. email: data.data.email,
  448. createTime: data.data.createTime,
  449. number: data.data.number,
  450. createTimeFormattedDate: data.data.createTimeFormattedDate,
  451. pwd: "",
  452. password: "",
  453. });
  454. this.loadLocations(data.data.id);
  455. }.bind(this),
  456. }).always(
  457. function (data) {
  458. this.setState({
  459. loading: false,
  460. });
  461. }.bind(this)
  462. );
  463. },
  464. loadLocations(id) {
  465. this.setState({
  466. loading: true,
  467. });
  468. $.ajax({
  469. url: globalConfig.context + "/api/admin/supervise/adminDetailLocation",
  470. cache: false,
  471. data: {
  472. id: id,
  473. },
  474. }).done((data) => {
  475. if (!data.data) {
  476. if (data.error && data.error.length) {
  477. message.warning(data.error[0].message);
  478. return;
  479. }
  480. }
  481. data.data.map((item) => {
  482. if (item.city) {
  483. item.city = item.city.split(",");
  484. }
  485. });
  486. this.setState({
  487. locations: data.data,
  488. loading: false,
  489. });
  490. });
  491. },
  492. componentWillReceiveProps(nextProps) {
  493. if (!this.state.visible && nextProps.showDesc) {
  494. this.loadData();
  495. }
  496. this.state.visible = nextProps.showDesc;
  497. },
  498. handleOk() {
  499. this.setState({
  500. loading: true,
  501. });
  502. if (this.state.contactMobile) {
  503. if (!/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile)) {
  504. message.warning("不是完整的11位手机号或者正确的手机号前七位");
  505. this.setState({
  506. loading: false,
  507. });
  508. return false;
  509. }
  510. }
  511. // if(this.state.mobile.length>11){
  512. // message.warning("登录账号不能超过11位");
  513. // return false;
  514. // }
  515. $.ajax({
  516. method: "post",
  517. dataType: "json",
  518. crossDomain: false,
  519. url: globalConfig.context + "/api/admin/updateAdminInfo",
  520. data: {
  521. id: this.state.id,
  522. mobile: this.state.mobile,
  523. contactMobile: this.state.contactMobile,
  524. name: this.state.name,
  525. email: this.state.email,
  526. province: this.state.province,
  527. password: this.state.password,
  528. pwd: this.state.pwd,
  529. },
  530. }).always(
  531. function (data) {
  532. if (data.error && data.error.length) {
  533. message.warning(data.error[0].message);
  534. } else {
  535. this.setState({
  536. loading: false,
  537. });
  538. message.success("保存成功!");
  539. this.props.closeDesc(false, true);
  540. }
  541. }.bind(this)
  542. );
  543. },
  544. handleCancel(e) {
  545. this.setState({
  546. visible: false,
  547. });
  548. this.props.closeDesc(false);
  549. },
  550. render() {
  551. return (
  552. <div className="topTab-modal">
  553. <Spin spinning={this.state.loading} className="spin-box">
  554. <Modal
  555. maskClosable={false}
  556. title="用户设置"
  557. visible={this.state.visible}
  558. onOk={this.handleOk}
  559. onCancel={this.handleCancel}
  560. width="380px"
  561. >
  562. <ul className="modal-content">
  563. <li>
  564. <span className="modal-text">名字</span>
  565. <Input
  566. value={this.state.name}
  567. onChange={(e) => {
  568. this.state.name = e.target.value;
  569. this.setState({ name: this.state.name });
  570. }}
  571. />
  572. </li>
  573. <li>
  574. <span className="modal-text">职位</span>
  575. <span>{this.state.position}</span>
  576. </li>
  577. <li>
  578. <span className="modal-text">登录账号</span>
  579. <span>{this.state.mobile}</span>
  580. </li>
  581. <li>
  582. <span className="modal-text">联系方式</span>
  583. <Input
  584. value={this.state.contactMobile}
  585. onChange={(e) => {
  586. this.state.contactMobile = e.target.value;
  587. this.setState({ contactMobile: this.state.contactMobile });
  588. }}
  589. />
  590. </li>
  591. <li>
  592. <span className="modal-text">省份</span>
  593. <div style={{ display: "inline-block", width: "78%" }}>
  594. {this.state.locations.map((item, i) => {
  595. return (
  596. <Tag key={i}>
  597. {getProvince(item.province) +
  598. " " +
  599. (item.city
  600. ? item.city.map((c) => {
  601. return getProvince(c) + " ";
  602. })
  603. : "")}
  604. </Tag>
  605. );
  606. })}
  607. </div>
  608. </li>
  609. <li>
  610. <span className="modal-text">邮箱</span>
  611. <Input
  612. value={this.state.email}
  613. onChange={(e) => {
  614. this.state.email = e.target.value;
  615. this.setState({ email: this.state.email });
  616. }}
  617. />
  618. </li>
  619. <li>
  620. <span className="modal-text">原密码</span>
  621. <Input
  622. value={this.state.pwd}
  623. type="password"
  624. onChange={(e) => {
  625. this.state.pwd = e.target.value;
  626. this.setState({ pwd: this.state.pwd });
  627. }}
  628. />
  629. </li>
  630. <li>
  631. <span className="modal-text">密码</span>
  632. <Input
  633. value={this.state.password}
  634. type="password"
  635. onChange={(e) => {
  636. this.state.password = e.target.value;
  637. this.setState({ password: this.state.password });
  638. }}
  639. />
  640. </li>
  641. </ul>
  642. </Modal>
  643. </Spin>
  644. </div>
  645. );
  646. },
  647. });
  648. const TopTab = React.createClass({
  649. getInitialState() {
  650. return {
  651. username: "请登录!",
  652. defaultActiveKey: "-1",
  653. htmlMenus: [],
  654. };
  655. },
  656. logOut() {
  657. let theActive = this.props.active;
  658. $.ajax({
  659. method: "get",
  660. dataType: "json",
  661. url: globalConfig.context + "/login",
  662. }).done(function (data) {
  663. window.location.href = globalConfig.context + "/admin/login.html";
  664. });
  665. },
  666. componentWillMount() {
  667. if (this.props.active) {
  668. this.loadData();
  669. }
  670. this.mainMenu();
  671. },
  672. //主菜单请求
  673. mainMenu() {
  674. this.setState({
  675. loading: true,
  676. });
  677. $.ajax({
  678. method: "get",
  679. dataType: "json",
  680. crossDomain: false,
  681. url: globalConfig.context + "/api/admin/selectNavList",
  682. data: {},
  683. success: function (data) {
  684. if (!data.data) {
  685. if (data.error && data.error.length) {
  686. message.warning(data.error[0].message);
  687. return;
  688. }
  689. }
  690. let menu = data.data;
  691. var htmlMenu = [];
  692. let index = menu.findIndex(
  693. (v) => getActives(v.name) === this.props.active
  694. );
  695. this.setState({
  696. htmlMenus: menu,
  697. defaultActiveKey: index + "",
  698. });
  699. }.bind(this),
  700. }).always(
  701. function (data) {
  702. this.setState({
  703. loading: false,
  704. });
  705. }.bind(this)
  706. );
  707. },
  708. loadData() {
  709. this.setState({
  710. loading: true,
  711. });
  712. $.ajax({
  713. method: "get",
  714. dataType: "json",
  715. crossDomain: false,
  716. url: globalConfig.context + "/api/admin/notice/unreadCount",
  717. success: function (data) {
  718. if (!data.data) {
  719. if (data.error[0] && data.error[0]) {
  720. message.warning(data.error[0].message);
  721. return;
  722. }
  723. }
  724. this.setState({
  725. badge: data.data,
  726. });
  727. }.bind(this),
  728. }).always(
  729. function (data) {
  730. this.setState({
  731. loading: false,
  732. });
  733. }.bind(this)
  734. );
  735. },
  736. closeUserModal(e, s) {
  737. this.state.userModalShow = e;
  738. if (s) {
  739. this.loadData();
  740. }
  741. },
  742. closeMessageModal(e, s) {
  743. this.state.messageModalShow = e;
  744. if (s) {
  745. this.loadData();
  746. }
  747. },
  748. render() {
  749. return (
  750. <div className="account-top">
  751. <div className="acc-top-user">
  752. <span className="acc-top-user-name">
  753. 欢迎您 ,{" "}
  754. {adminData.name || adminData.mobile ? (
  755. <a
  756. onClick={() => {
  757. // if (window.showPermissionList && window.showRoleList) {
  758. // return
  759. // };
  760. this.setState({ userModalShow: true });
  761. }}
  762. >
  763. {" "}
  764. {adminData.name || adminData.mobile}{" "}
  765. </a>
  766. ) : (
  767. <a onClick={this.logOut}>{this.state.username}</a>
  768. )}{" "}
  769. <a onClick={this.logOut}>[ 退出 ]</a>
  770. </span>
  771. <span className="acc-top-user-toindex">
  772. <a href={jumpUrl || "" + "/portal/index.html"}>返回首页</a>
  773. </span>
  774. {this.props.active ? (
  775. <a
  776. onClick={() => {
  777. this.setState({ messageModalShow: true });
  778. }}
  779. className="user-badge"
  780. >
  781. <Icon type="mail" />
  782. {!window.showSystem && this.state.badge ? (
  783. <Badge status="processing" />
  784. ) : null}
  785. </a>
  786. ) : null}
  787. </div>
  788. <div className="acc-index">
  789. <div className="acc-index-imgbox">
  790. <img src={logo} alt="" />
  791. </div>
  792. <span>
  793. <a href={globalConfig.context + "/admin/index.html"}>
  794. 管理中心首页
  795. </a>
  796. </span>
  797. </div>
  798. <div className="acc-top-tab">
  799. {this.state.htmlMenus.length > 0 ? (
  800. <Tabs
  801. defaultActiveKey={this.state.defaultActiveKey}
  802. activeKey={this.state.defaultActiveKey}
  803. tabPosition="top"
  804. onTabClick={(v) => {
  805. window.location.href = globalConfig.context + this.state.htmlMenus[parseInt(v)].url + '?rid=' + this.state.htmlMenus[parseInt(v)].id;
  806. }}
  807. // onChange={v=>{
  808. // window.location.href=globalConfig.context + this.state.htmlMenus[parseInt(v)].url+'?rid='+this.state.htmlMenus[parseInt(v)].id;
  809. // }}
  810. >
  811. {this.state.htmlMenus.map((v, k) => (
  812. <TabPane key={k} tab={v.name} />
  813. ))}
  814. </Tabs>
  815. ) : null}
  816. </div>
  817. <UserModal
  818. showDesc={this.state.userModalShow}
  819. closeDesc={this.closeUserModal}
  820. />
  821. <MessageModal
  822. showDesc={this.state.messageModalShow}
  823. closeDesc={this.closeMessageModal}
  824. />
  825. </div>
  826. );
  827. },
  828. });
  829. export default TopTab;