main-sidebar.vue 6.6 KB

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