main-sidebar.vue 6.4 KB

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