main-sidebar.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <aside
  3. class="aui-sidebar"
  4. >
  5. <div class="logo">
  6. <img src="@/assets/images/agent/logo3.png">
  7. </div>
  8. <!-- <div class="create_dialog">
  9. + 创建新对话
  10. </div> -->
  11. <div class="aui-sidebar__inner" style="margin-top: 26px;">
  12. <el-menu
  13. :collapse="$store.state.sidebarFold"
  14. :unique-opened="true"
  15. :default-active="activeMenuId"
  16. :collapseTransition="false"
  17. class="aui-sidebar__menu"
  18. >
  19. <sub-menu
  20. v-for="(menu, index) in erjiMenu"
  21. :key="menu.id"
  22. :menu="menu"
  23. :index="index"
  24. />
  25. </el-menu>
  26. </div>
  27. <div class="user_info">
  28. <div class="left" @click="handleUser">
  29. <img src="@/assets/images/agent/avatar.png">
  30. <div class="name">
  31. <span>{{ $store.state.user.realName }}</span>
  32. <span class="type" v-if="$store.state.user.superAdmin===1">{{ '管理员' }}</span>
  33. <span class="type" v-else-if="$store.state.user.roleCodes==['Coach', 'Admin']">{{ '管理员/教练' }}</span>
  34. <span class="type" v-else>{{ $store.state.user.qualificationType }}</span>
  35. </div>
  36. </div>
  37. </div>
  38. </aside>
  39. </template>
  40. <script>
  41. import SubMenu from './main-sidebar-sub-menu'
  42. export default {
  43. data () {
  44. return {
  45. activeMenuId:'1922562129463336962',
  46. erjiMenu:[],
  47. userType:'专业教练',
  48. }
  49. },
  50. components: {
  51. SubMenu
  52. },
  53. computed:{
  54. erjiMenudata(){
  55. return this.$store.state.erjismenu;
  56. }
  57. },
  58. watch:{
  59. "$store.state.currentMenuId":"changeMenuId",
  60. erjiMenudata(e){
  61. this.erjiMenu=e;
  62. console.log(this.erjiMenu);
  63. }
  64. },
  65. methods:{
  66. changeMenuId(newval,oldval){
  67. if(newval!=oldval){
  68. this.activeMenuId=newval;
  69. }
  70. },
  71. handleUser(){
  72. this.$router.push('agentUserInfo')
  73. }
  74. },
  75. created () {
  76. this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
  77. this.erjiMenu=this.$store.state.erjismenu==null?this.$store.state.sidebarMenuList[0].children:this.$store.state.erjismenu;
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .logo{
  83. img{
  84. width: 118px;
  85. height: 34px;
  86. margin-top: 9px;
  87. }
  88. }
  89. .create_dialog{
  90. width: 100%;
  91. height: 42px;
  92. background: #33A7A7;
  93. border-radius: 8px;
  94. font-family: PingFang-SC, PingFang-SC;
  95. font-weight: bold;
  96. font-size: 14px;
  97. color: #FFFFFF;
  98. line-height: 42px;
  99. text-align: center;
  100. margin-top: 44px;
  101. cursor: pointer;
  102. }
  103. .user_info{
  104. width: 100%;
  105. padding: 24px 18px;
  106. box-sizing: border-box;
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. border-top: 1px solid #E5E7EB;
  111. position: absolute;
  112. bottom: 0;
  113. left: 0;
  114. z-index: 999;
  115. .left{
  116. display: flex;
  117. align-items: center;
  118. cursor: pointer;
  119. img{
  120. width: 36px;
  121. height: 36px;
  122. border-radius: 50%;
  123. }
  124. .name{
  125. margin-left: 10px;
  126. display: flex;
  127. flex-direction: column;
  128. span{
  129. font-family: PingFang-SC, PingFang-SC;
  130. font-weight: bold;
  131. font-size: 14px;
  132. color: #111111;
  133. line-height: 20px;
  134. &.type{
  135. font-weight: 400;
  136. font-size: 12px;
  137. color: #707784;
  138. line-height: 17px;
  139. margin-top: 2px;
  140. }
  141. }
  142. }
  143. }
  144. .right{
  145. cursor: pointer;
  146. img{
  147. width: 18px;
  148. height: 18px;
  149. }
  150. }
  151. }
  152. .loginBox{
  153. width: 100%;
  154. height: 100vh;
  155. position: fixed;
  156. top: 0;
  157. left: 0;
  158. z-index: 9999;
  159. background: rgba(0,0,0,.35);
  160. display: flex;
  161. align-items: center;
  162. justify-content: center;
  163. .box{
  164. width: 712px;
  165. height: 418px;
  166. background: #FFFFFF;
  167. border-radius: 16px;
  168. display: flex;
  169. .left{
  170. width: 288px;
  171. height: 100%;
  172. img{
  173. width: 100%;
  174. height: 100%;
  175. }
  176. }
  177. .right{
  178. width: calc(100% - 288px);
  179. height: 100%;
  180. padding: 85px 48px 31px 56px;
  181. box-sizing: border-box;
  182. position: relative;
  183. .close{
  184. width: 12px;
  185. height: 12px;
  186. position: absolute;
  187. top: 26px;
  188. right: 22px;
  189. cursor: pointer;
  190. }
  191. .tabs{
  192. width: 100%;
  193. display: flex;
  194. align-items: center;
  195. margin-left: -24px;
  196. .t_pre{
  197. font-family: PingFangSC, PingFang SC;
  198. font-weight: 400;
  199. font-size: 14px;
  200. color: #111111;
  201. line-height: 20px;
  202. padding-bottom: 8px;
  203. position: relative;
  204. width: 118px;
  205. text-align: center;
  206. cursor: pointer;
  207. &:last-child{
  208. margin-left: 0;
  209. }
  210. &.active{
  211. font-weight: bold;
  212. color: #2463EB;
  213. &::after{
  214. content: '';
  215. width: 72px;
  216. height: 2px;
  217. background: #2463EB;
  218. position: absolute;
  219. bottom: 0;
  220. left: 50%;
  221. margin-left: -36px;
  222. }
  223. }
  224. }
  225. }
  226. .content{
  227. margin-top: 14px;
  228. .c_pre{
  229. height: 44px;
  230. margin-top: 20px;
  231. background: #FFFFFF;
  232. border-radius: 6px;
  233. border: 1px solid #E5E7EB;
  234. display: flex;
  235. align-items: center;
  236. .left{
  237. width: 214px;
  238. }
  239. .cp_right{
  240. width: calc(100% - 214px);
  241. display: flex;
  242. align-items: center;
  243. justify-content: center;
  244. position: relative;
  245. cursor: pointer;
  246. &::before{
  247. content: '';
  248. width: 1px;
  249. height: 21px;
  250. background: rgba(36,99,235,0.21);
  251. position: absolute;
  252. top: 50%;
  253. margin-top: -10.5px;
  254. left: 0;
  255. }
  256. span{
  257. font-family: PingFangSC, PingFang SC;
  258. font-weight: 400;
  259. font-size: 14px;
  260. color: #3C82F6;
  261. line-height: 20px;
  262. }
  263. }
  264. }
  265. }
  266. .login{
  267. width: 100%;
  268. height: 46px;
  269. background: rgba(36, 99, 235, .5);
  270. border-radius: 6px;
  271. font-family: PingFang-SC, PingFang-SC;
  272. font-weight: bold;
  273. font-size: 14px;
  274. color: #FFFFFF;
  275. line-height: 46px;
  276. text-align: center;
  277. margin-top: 30px;
  278. letter-spacing: 1px;
  279. cursor: pointer;
  280. &.active{
  281. background: rgba(36, 99, 235, 1);;
  282. }
  283. }
  284. .agree{
  285. margin-top: 36px;
  286. }
  287. }
  288. }
  289. }
  290. ::v-deep .el-input__inner{
  291. border: none !important;
  292. width: calc(100% - 2px);
  293. margin-left: 2px;
  294. }
  295. ::v-deep .el-checkbox__label{
  296. font-weight: 400;
  297. font-size: 12px !important;
  298. color: #9CA3AF !important;
  299. line-height: 17px;
  300. }
  301. </style>