123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <template>
- <aside
- class="aui-sidebar"
- >
- <div class="logo">
- <img src="@/assets/images/agent/logo.png">
- </div>
- <div class="create_dialog">
- + 创建新对话
- </div>
- <div class="aui-sidebar__inner" style="margin-top: 26px;">
- <el-menu
- :collapse="$store.state.sidebarFold"
- :unique-opened="true"
- :default-active="activeMenuId"
- :collapseTransition="false"
- class="aui-sidebar__menu"
- >
- <sub-menu
- v-for="(menu, index) in erjiMenu"
- :key="menu.id"
- :menu="menu"
- :index="index"
- />
- </el-menu>
- </div>
- <div class="user_info">
- <div class="left" @click.self="handleUser">
- <img src="@/assets/images/agent/avatar.png">
- <div class="name">
- <span>{{ userName }}</span>
- <span class="type">{{ userType }}</span>
- </div>
- </div>
- </div>
- </aside>
- </template>
- <script>
- import SubMenu from './main-sidebar-sub-menu'
- export default {
- data () {
- return {
- activeMenuId:'',
- erjiMenu:[],
- userName:'威廉教练',
- userType:'专业教练',
- }
- },
- components: {
- SubMenu
- },
- computed:{
- erjiMenudata(){
- return this.$store.state.erjismenu;
- }
- },
- watch:{
- "$store.state.currentMenuId":"changeMenuId",
- erjiMenudata(e){
- this.erjiMenu=e;
- console.log(this.erjiMenu);
- }
- },
- methods:{
- changeMenuId(newval,oldval){
- if(newval!=oldval){
- this.activeMenuId=newval;
- }
- },
- },
- created () {
- this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
- this.erjiMenu=this.$store.state.erjismenu==null?this.$store.state.sidebarMenuList[0].children:this.$store.state.erjismenu;
- }
- }
- </script>
- <style lang="scss" scoped>
- .logo{
- img{
- width: 202px;
- height: 34px;
- margin-top: 9px;
- }
- }
- .create_dialog{
- width: 100%;
- height: 42px;
- background: #761E6A;
- border-radius: 8px;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 42px;
- text-align: center;
- margin-top: 44px;
- cursor: pointer;
- }
- .user_info{
- width: 100%;
- padding: 24px 18px;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-top: 1px solid #E5E7EB;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 999;
- .left{
- display: flex;
- align-items: center;
- cursor: pointer;
- img{
- width: 36px;
- height: 36px;
- border-radius: 50%;
- }
- .name{
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- span{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 14px;
- color: #111111;
- line-height: 20px;
- &.type{
- font-weight: 400;
- font-size: 12px;
- color: #707784;
- line-height: 17px;
- margin-top: 2px;
- }
- }
- }
- }
- .right{
- cursor: pointer;
- img{
- width: 18px;
- height: 18px;
- }
- }
- }
- .loginBox{
- width: 100%;
- height: 100vh;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 9999;
- background: rgba(0,0,0,.35);
- display: flex;
- align-items: center;
- justify-content: center;
- .box{
- width: 712px;
- height: 418px;
- background: #FFFFFF;
- border-radius: 16px;
- display: flex;
- .left{
- width: 288px;
- height: 100%;
- img{
- width: 100%;
- height: 100%;
- }
- }
- .right{
- width: calc(100% - 288px);
- height: 100%;
- padding: 85px 48px 31px 56px;
- box-sizing: border-box;
- position: relative;
- .close{
- width: 12px;
- height: 12px;
- position: absolute;
- top: 26px;
- right: 22px;
- cursor: pointer;
- }
- .tabs{
- width: 100%;
- display: flex;
- align-items: center;
- margin-left: -24px;
- .t_pre{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #111111;
- line-height: 20px;
- padding-bottom: 8px;
- position: relative;
- width: 118px;
- text-align: center;
- cursor: pointer;
- &:last-child{
- margin-left: 0;
- }
- &.active{
- font-weight: bold;
- color: #2463EB;
- &::after{
- content: '';
- width: 72px;
- height: 2px;
- background: #2463EB;
- position: absolute;
- bottom: 0;
- left: 50%;
- margin-left: -36px;
- }
- }
- }
- }
- .content{
- margin-top: 14px;
- .c_pre{
- height: 44px;
- margin-top: 20px;
- background: #FFFFFF;
- border-radius: 6px;
- border: 1px solid #E5E7EB;
- display: flex;
- align-items: center;
- .left{
- width: 214px;
- }
- .cp_right{
- width: calc(100% - 214px);
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- cursor: pointer;
- &::before{
- content: '';
- width: 1px;
- height: 21px;
- background: rgba(36,99,235,0.21);
- position: absolute;
- top: 50%;
- margin-top: -10.5px;
- left: 0;
- }
- span{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #3C82F6;
- line-height: 20px;
- }
- }
- }
- }
- .login{
- width: 100%;
- height: 46px;
- background: rgba(36, 99, 235, .5);
- border-radius: 6px;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 46px;
- text-align: center;
- margin-top: 30px;
- letter-spacing: 1px;
- cursor: pointer;
- &.active{
- background: rgba(36, 99, 235, 1);;
- }
- }
- .agree{
- margin-top: 36px;
- }
- }
- }
- }
- ::v-deep .el-input__inner{
- border: none !important;
- width: calc(100% - 2px);
- margin-left: 2px;
- }
- ::v-deep .el-checkbox__label{
- font-weight: 400;
- font-size: 12px !important;
- color: #9CA3AF !important;
- line-height: 17px;
- }
- </style>
|