SendChatLogView.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. import React from 'react';
  2. import DefaultAvatar from '../../assets/img-defaultAvatar.png';
  3. import Logo from '../../assets/img-logo.png';
  4. import Thumb from '../../assets/img-thumb.jpg';
  5. import Success from '../../assets/img-success.jpg';
  6. import {OverlayTrigger, Popover, Modal, Image, Glyphicon, Button} from 'react-bootstrap';
  7. import classes from './SendChatLogView.css';
  8. const popoverBottom = (
  9. <Popover id="popover-positioned-scrolling-bottom">
  10. <Button bsSize="xsmall" href="#/" style={{border:0,background:'#fff',width:'120px'}}><Glyphicon glyph="off" />退 出</Button>
  11. </Popover>
  12. );
  13. class App extends React.Component{
  14. // state = {};
  15. constructor(props){
  16. super(props);
  17. this.state = {
  18. showEndModal: false,
  19. showCommitSuccess: false
  20. };
  21. this.showEndModal = this.showEndModal.bind(this);
  22. this.hideEndModal = this.hideEndModal.bind(this);
  23. this.confirmEndModal = this.confirmEndModal.bind(this);
  24. this.showCommitSuccessModal = this.showCommitSuccessModal.bind(this);
  25. this.hideCommitSuccessModal = this.hideCommitSuccessModal.bind(this);
  26. }
  27. showEndModal(e){
  28. this.setState({
  29. showEndModal: true
  30. });
  31. }
  32. hideEndModal(e){
  33. this.setState({
  34. showEndModal: false
  35. });
  36. }
  37. confirmEndModal(e) {
  38. // this.hideEndModal();
  39. this.setState({
  40. showEndModal: false,
  41. showCommitSuccess: true
  42. });
  43. }
  44. //提交成功弹窗
  45. showCommitSuccessModal(e) {
  46. this.setState({
  47. showCommitSuccess: true
  48. });
  49. }
  50. hideCommitSuccessModal(e) {
  51. this.setState({
  52. showCommitSuccess: false
  53. });
  54. }
  55. //todo 聊天记录选择
  56. render() {
  57. return(
  58. <div>
  59. <div className="homeTop clearfix">
  60. <div className="left">
  61. <Image src={Logo} responsive></Image>
  62. </div>
  63. <div className="right">
  64. 南方医务通医生工作台
  65. </div>
  66. </div>
  67. <div className="homeBody clearfix">
  68. <div className="left">
  69. <div className="avatarbox">
  70. <OverlayTrigger container={this} trigger="click" placement="bottom" overlay={popoverBottom}>
  71. <Button style={{border: 0,background: '#fff'}}>
  72. <Image className="avatar" src={DefaultAvatar} rounded responsive/>
  73. </Button>
  74. </OverlayTrigger>
  75. <div className="name">李秋豪</div>
  76. </div>
  77. <div className="col-lg-12 list">
  78. <ul className="parent">
  79. <li><a href="#/userMessage"><span className="icon icon-message"></span><span className="text-message">消息&nbsp;&nbsp;2</span></a></li>
  80. <li><a href="#/home"><span className="icon icon-home"></span><span>首页</span></a></li>
  81. <ul className="childList">
  82. <li className="active"><a href="#">专家询诊</a></li>
  83. <li><a href="#">双向转诊</a></li>
  84. <li><a href="#">名医主诊</a></li>
  85. <li><a href="#">名医主诊</a></li>
  86. </ul>
  87. <li><a href="#"><span className="icon icon-patient"></span><span>我的患者</span></a></li>
  88. <li><a href="#"><span className="icon icon-doctor"></span><span>我的关联医生</span></a></li>
  89. <li><a href="#"><span className="icon icon-expert"></span><span>平台所有医生</span></a></li>
  90. </ul>
  91. </div>
  92. </div>
  93. <div className="right" style={{overflow: 'auto'}}>
  94. <div className="body">
  95. <div className="head">
  96. <ul className="clearfix">
  97. <li className="col-lg-4 col-md-4 col-xs-4"><a href="#/expertinquiry">找患者</a></li>
  98. <li className="col-lg-4 col-md-4 col-xs-4 active" ><a href="#/myorder">我的订单</a></li>
  99. <li className="col-lg-4 col-md-4 col-xs-4"><a href="#/expert">专家询诊流程</a></li>
  100. </ul>
  101. </div>
  102. <div className="sendBox">
  103. <div className="send-header">本次会话,是关于患者王帆的病情讨论!</div>
  104. <div className="send-body">
  105. <ul className="send-list">
  106. <li className="send-list-item">
  107. <div className="doctor">李秋豪医生:</div>
  108. <div className="checkBox">
  109. <div className="check"></div>
  110. <div className="context">我这有位心肌缺血患者,需要您指导治疗,病史、检查报告如下。</div>
  111. </div>
  112. </li>
  113. <li className="send-list-item">
  114. <div className="doctor">李秋豪医生:</div>
  115. <div className="checkBox">
  116. <div className="uncheck"></div>
  117. <div className="imgBox">
  118. <a href="#"><img src={Thumb} alt=""/></a>
  119. </div>
  120. </div>
  121. </li>
  122. </ul>
  123. </div>
  124. <div className="send-footer clearfix">
  125. <textarea className="messageBox" placeholder="请输入你的建议"></textarea>
  126. </div>
  127. <div style={{textAlign: 'center'}}>
  128. <Button className="btn-send" bsStyle="primary" onClick={this.showEndModal}>提交</Button>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <Modal show={this.state.showEndModal} bsSize="small" onHide={this.hideEndModal}>
  135. <Modal.Body className="text-center">
  136. <p style={{fontSize: 18}}>是否确认提交?</p>
  137. <p style={{fontSize: 18}}>结束后将不能继续</p>
  138. <Button onClick={this.hideEndModal} className="btn-end btn-cancle">取消</Button>
  139. <Button onClick={this.confirmEndModal} className="btn-end btn-confirm">确定</Button>
  140. </Modal.Body>
  141. </Modal>
  142. <Modal show={this.state.showCommitSuccess} bsSize="small" onHide={this.hideCommitSuccessModal}>
  143. <Modal.Body className="text-center">
  144. <p>
  145. <Image src={Success} className="center-block" responsive style={{padding: '23px 0'}}></Image>
  146. </p>
  147. <p style={{fontSize: 18,paddingBottom: 30}}>提交成功</p>
  148. </Modal.Body>
  149. </Modal>
  150. </div>
  151. );
  152. }
  153. }
  154. export default App;