血透系统PC前端

Navbar.vue 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <div class="top-nav">
  3. <div class="nav-logo">
  4. <img :src="require(`../../../assets/logo/logo.png`)" alt="">
  5. </div>
  6. <el-menu class="navbar" mode="horizontal">
  7. <div>
  8. <!--<el-dropdown trigger="click" style="color:#fff;">-->
  9. <!--<span class="el-dropdown-link">-->
  10. <!--南山市人民医院<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
  11. <!--</span>-->
  12. <!--&lt;!&ndash;<el-dropdown-menu slot="dropdown" style="margin-top:21px;">&ndash;&gt;-->
  13. <!--&lt;!&ndash;<el-dropdown-item>深圳市人民医院</el-dropdown-item>&ndash;&gt;-->
  14. <!--&lt;!&ndash;<el-dropdown-item>长沙是透析中心</el-dropdown-item>&ndash;&gt;-->
  15. <!--&lt;!&ndash;<el-dropdown-item>东莞血液透析中心</el-dropdown-item>&ndash;&gt;-->
  16. <!--&lt;!&ndash;<el-dropdown-item>东莞血液透析中心</el-dropdown-item>&ndash;&gt;-->
  17. <!--&lt;!&ndash;<el-dropdown-item>东莞血液透析中心</el-dropdown-item>&ndash;&gt;-->
  18. <!--&lt;!&ndash;</el-dropdown-menu>&ndash;&gt;-->
  19. <!--</el-dropdown>-->
  20. </div>
  21. <div class="system-nav">
  22. <div class="system-nav-menu">
  23. <!--<a href="http://jk.kuyicloud.com/">-->
  24. <a href="http://test1.sgjyun.com/">
  25. <span><i class="iconfont icon-pengyou"></i> SCRM</span>
  26. </a>
  27. </div>
  28. <div class="system-nav-menu">
  29. <!--<a href="http://mall.kuyicloud.com/">-->
  30. <a href="http://mall.test.sgjyun.com/">
  31. <span><i class="icon iconfont icon-service_fill"></i> 微商城</span>
  32. </a>
  33. </div>
  34. <div class="system-nav-menu active">
  35. <a>
  36. <span><i class="icon iconfont icon-jiankangshuidi"></i> 血透管理</span>
  37. </a>
  38. </div>
  39. <div class="system-nav-menu">
  40. <!--<a href="http://cdm.kuyicloud.com/">-->
  41. <a href=" http://cdm.test.sgjyun.com/">
  42. <span><i class="icon iconfont icon-manbing-xuanzhong"></i> 慢病管理</span>
  43. </a>
  44. </div>
  45. <div class="system-nav-menu">
  46. <!--<a href="http://sso.kuyicloud.com/org/app/create">-->
  47. <a href="http://testsso.sgjyun.com/org/app/create">
  48. <span><i class="icon iconfont icon-suoyou"></i> 应用</span>
  49. </a>
  50. </div>
  51. </div>
  52. <div class="right-menu">
  53. <el-dropdown class="avatar-container right-menu-item" trigger="click">
  54. <div class="avatar-wrapper">
  55. <img class="user-avatar" :src="avater">
  56. <span class="user-title">{{ this.$store.getters.xt_user.user.user_name }}</span>
  57. <i class="el-icon-caret-bottom"></i>
  58. </div>
  59. <el-dropdown-menu slot="dropdown">
  60. <el-dropdown-item>
  61. <span @click="modifyUserInfoAction">修改个人信息</span>
  62. </el-dropdown-item>
  63. <el-dropdown-item divided>
  64. <span @click="myServe">我的服务</span>
  65. </el-dropdown-item>
  66. <el-dropdown-item divided>
  67. <span @click="logout" style="display:block;">{{$t('navbar.logOut')}}</span>
  68. </el-dropdown-item>
  69. </el-dropdown-menu>
  70. </el-dropdown>
  71. <!-- <screenfull class="screenfull right-menu-item"></screenfull> -->
  72. <modify-user-info-dialog ref="modify_user_info_dialog"></modify-user-info-dialog>
  73. </div>
  74. </el-menu>
  75. </div>
  76. </template>
  77. <script>
  78. import { mapGetters } from "vuex";
  79. // import Breadcrumb from "@/components/Breadcrumb";
  80. // import Hamburger from "@/components/Hamburger";
  81. import Screenfull from "@/components/Screenfull";
  82. import ModifyUserInfoDialog from "@/xt_pages/home/modify_user_info_dialog";
  83. export default {
  84. components: {
  85. // Breadcrumb,
  86. // Hamburger,
  87. Screenfull,
  88. ModifyUserInfoDialog
  89. },
  90. computed: {
  91. ...mapGetters(["sidebar"]),
  92. avater: function() {
  93. var avatar = this.$store.getters.xt_user.user.avatar;
  94. return avatar.length > 0
  95. ? avatar
  96. : require("../../../assets/home/userData.png");
  97. }
  98. },
  99. methods: {
  100. // toggleSideBar() {
  101. // this.$store.dispatch("toggleSideBar");
  102. // },
  103. logout() {
  104. this.$store.dispatch("FrontendLogout");
  105. window.location.href = process.env.BASE_API + "/logout";
  106. },
  107. modifyUserInfoAction() {
  108. this.$refs.modify_user_info_dialog.show();
  109. },
  110. myServe() {
  111. this.$router.push("/service");
  112. return false;
  113. }
  114. }
  115. };
  116. </script>
  117. <style rel="stylesheet/scss" lang="scss" scoped>
  118. .top-nav {
  119. background: #409eff;
  120. position: fixed;
  121. top: 0;
  122. left: 0;
  123. right: 0;
  124. z-index: 1000;
  125. .nav-logo {
  126. width: 162px;
  127. display: flex;
  128. align-items: center;
  129. height: 60px;
  130. text-align: center;
  131. justify-content: center;
  132. padding: 10px 0;
  133. box-sizing: border-box;
  134. float: left;
  135. img {
  136. display: inline-block;
  137. width: 100px;
  138. }
  139. }
  140. .navbar {
  141. border-radius: 0px !important;
  142. display: flex;
  143. justify-content: space-between;
  144. width: calc(100% - 180px);
  145. align-items: center;
  146. color: #fff;
  147. border: none;
  148. background: #409eff;
  149. float: left;
  150. .breadcrumb-container {
  151. float: left;
  152. }
  153. .errLog-container {
  154. display: inline-block;
  155. vertical-align: top;
  156. }
  157. .right-menu {
  158. float: right;
  159. height: 100%;
  160. z-index: 99999;
  161. &:focus {
  162. outline: none;
  163. }
  164. .right-menu-item {
  165. display: inline-block;
  166. margin: 0 8px;
  167. .iconfont {
  168. font-size: 18px;
  169. }
  170. }
  171. .screenfull {
  172. height: 20px;
  173. }
  174. .international {
  175. vertical-align: top;
  176. }
  177. .theme-switch {
  178. vertical-align: 15px;
  179. }
  180. .avatar-container {
  181. margin-right: 10px;
  182. .avatar-wrapper {
  183. cursor: pointer;
  184. margin-top: 3px;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. .user-avatar {
  189. width: 40px;
  190. height: 40px;
  191. border-radius: 50%;
  192. object-fit: cover;
  193. object-position: center;
  194. }
  195. .user-title {
  196. margin: 0 8px;
  197. font-size: 14px;
  198. color: #fff;
  199. }
  200. .el-icon-caret-bottom {
  201. font-size: 12px;
  202. color: #fff;
  203. }
  204. }
  205. }
  206. }
  207. }
  208. .system-nav {
  209. .system-nav-menu {
  210. float: left;
  211. height: 60px;
  212. line-height: 60px;
  213. padding: 0 25px;
  214. a {
  215. font-size: 15px;
  216. .iconfont {
  217. font-size: 18px;
  218. }
  219. }
  220. }
  221. .active {
  222. background: #3090eb;
  223. border-left: 1px #5fabf7 solid;
  224. border-right: 1px #5fabf7 solid;
  225. }
  226. }
  227. .el-menu::after,
  228. .el-menu::before {
  229. width: 1px;
  230. height: 1px;
  231. position: absolute;
  232. top: 0;
  233. left: 0;
  234. }
  235. }
  236. .el-dropdown-menu{
  237. z-index: 9999!important;
  238. }
  239. .v-modal{
  240. z-index: 9999!important;
  241. }
  242. </style>