DocIndex.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div class="docContainer">
  3. <div style="position:relative;">
  4. <img @click="goPage('notice')" width="30" src="../assets/images/msg.png" class="msg">
  5. <span v-if="new_notice" class="red"></span>
  6. <img src="../assets/images/infobg.png" alt="" width="100%" style="">
  7. <div class="docinfo">
  8. <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
  9. <p class="docname">{{doctorInfo.name}} 医生,您好!</p>
  10. </div>
  11. </div>
  12. <div class="content">
  13. <div class="footer">
  14. <!-- <div class="csbtn" @click="goPage('/regpatinfo')">新病例信息录入</div> -->
  15. <div class="csbtn" @click="regNew">新病例信息录入</div>
  16. <div class="jbbtn" @click="goPage('patcaselist')">历史病例管理</div>
  17. <div class="jbbtn" @click="logout">退出登录</div>
  18. <div class="usageInfo" @click="goPage('agreedoc?type=1')">使用说明</div>
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import {
  25. Field,
  26. MessageBox,
  27. Toast,
  28. Popup
  29. } from 'mint-ui'
  30. export default {
  31. name: 'Index',
  32. components: {
  33. Field,
  34. MessageBox,
  35. Toast,
  36. Popup
  37. },
  38. data() {
  39. return {
  40. doctorInfo: {},
  41. new_notice:0
  42. }
  43. },
  44. methods: {
  45. goPage(path) {
  46. this.$router.push(path)
  47. },
  48. logout() {
  49. window.localStorage.removeItem('token')
  50. window.localStorage.removeItem('authinfo')
  51. window.location.reload()
  52. },
  53. getData() {
  54. this.$api.getAccountInfo().then(res => {
  55. if (!res.data.code) {
  56. this.doctorInfo = res.data.data
  57. localStorage.setItem("authinfo",JSON.stringify(this.doctorInfo));
  58. }
  59. })
  60. },
  61. getNotice(){
  62. this.$api.get_patient_doctor_notice_new().then(res=>{
  63. if (!res.data.code) {
  64. if(res.data.data.total>0){
  65. this.new_notice=1
  66. }
  67. }
  68. })
  69. },
  70. regNew() {
  71. this.$api.getPatientDoingCase({
  72. doctor_id: this.doctorInfo.id
  73. }).then(res => {
  74. if(res.data.code == 0){
  75. this.$router.push("regpatinfo")
  76. }
  77. // if (res.data.code == 0 && res.data.data.id) {
  78. // MessageBox ({
  79. // title: '提示',
  80. // message: '您有一个病例未完成',
  81. // showCancelButton: true,
  82. // confirmButtonText: "继续录入",
  83. // cancelButtonText: "重新录入",
  84. // cancelButtonClass: "docIndexCancelBtn",
  85. // confirmButtonClass: "confirmButtonClass"
  86. // }, action => {
  87. // console.log(action)
  88. // if (action == "confirm") {
  89. // this.$router.push({
  90. // path: "/diagcalc",
  91. // query: {
  92. // id: res.data.data.id,
  93. // patid: res.data.data.patient_id
  94. // }
  95. // })
  96. // } else {
  97. // this.$router.push("regpatinfo")
  98. // }
  99. // });
  100. // } else {
  101. // this.$router.push("regpatinfo")
  102. // }
  103. })
  104. }
  105. },
  106. created() {
  107. this.getData()
  108. this.getNotice()
  109. }
  110. }
  111. </script>
  112. <style lang="scss">
  113. .docContainer {
  114. .bgcolor {
  115. width: 100%;
  116. height: 10rem;
  117. // border:1px solid red;
  118. position: absolute;
  119. /* z-index:-1; */
  120. background: #016AFA;
  121. }
  122. .msg{
  123. position: absolute;
  124. right: 10px;
  125. top: 10px;
  126. z-index: 9;
  127. }
  128. .red{
  129. width: 10px;
  130. height: 10px;
  131. border-radius: 50%;
  132. background: red;
  133. position: absolute;
  134. top: 13px;
  135. right: 15px;
  136. z-index: 10;
  137. }
  138. .bgimg {
  139. width: 100%;
  140. height: 24.8rem;
  141. // border:1px solid red;
  142. /* top: 10rem; */
  143. position: absolute;
  144. /* z-index:-1; */
  145. background-image: url("../assets/images/infobg.png");
  146. background-size: 100% 100%;
  147. }
  148. .docinfo {
  149. position: absolute;
  150. top: 30%;
  151. left: 0;
  152. right: 0;
  153. .docavatar {
  154. border-radius: 60rem;
  155. }
  156. .docname {
  157. color: #fff;
  158. margin: 0.1rem;
  159. }
  160. z-index:3;
  161. }
  162. .footer {
  163. margin-bottom: 2rem;
  164. .usageInfo {
  165. width: 6rem;
  166. height: 2.4rem;
  167. line-height: 2.4rem;
  168. border-radius: 1rem;
  169. background: #595758;
  170. color: #fff;
  171. margin: 2rem 1rem;
  172. }
  173. }
  174. }
  175. .docIndexCancelBtn {
  176. font-size: 24px;
  177. /* color: red !important; */
  178. }
  179. </style>