|
|
|
@ -3,33 +3,84 @@ |
|
|
|
<div class="header-logo" @click="toHome"> |
|
|
|
<img src="../assets/header-logo.png" alt=""> |
|
|
|
</div> |
|
|
|
<div class="header-right flex"> |
|
|
|
<!-- <div class="right-item">权限设置</div> |
|
|
|
<div class="right-item">岗位设置</div> --> |
|
|
|
<!-- <el-dropdown trigger="click"> |
|
|
|
<div class="header-right flex" v-if="headerShow"> |
|
|
|
<!-- <div :class="right-item" @click="goToPage('/doctorInformation?doctor_id=' + doctor_id)">个人信息</div> |
|
|
|
<div :class="right-item" @click="goToPage('/hosInformation')">医院管理</div> --> |
|
|
|
<div :class="['right-item', currentPath == item.path ? 'right-item-active' :'']" v-for="(item,index) in routerNavList" :key="index" @click="goToPage(item.path)">{{ item.name }}</div> |
|
|
|
<el-dropdown trigger="click"> |
|
|
|
<div class="right-item flex el-dropdown-link"> |
|
|
|
<img class="right-item-icon" src="../assets/header-icon.png" alt=""> |
|
|
|
<span>学术论文出版</span> |
|
|
|
<img src="../assets/header-drop.svg" alt=""> |
|
|
|
<span>{{user}}</span> |
|
|
|
<div class="img"></div> |
|
|
|
</div> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item icon="el-icon-plus">黄金糕</el-dropdown-item> |
|
|
|
<el-dropdown-item icon="el-icon-circle-plus">狮子头</el-dropdown-item> |
|
|
|
<el-dropdown-item icon="el-icon-circle-plus-outline">螺蛳粉</el-dropdown-item> |
|
|
|
<el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item> |
|
|
|
<el-dropdown-item icon="el-icon-circle-check">蚵仔煎</el-dropdown-item> |
|
|
|
<!-- <el-dropdown-item><a href="/agent/domainList" target="_blank">我的域名</a></el-dropdown-item> --> |
|
|
|
<el-dropdown-item><div @click="loginOut">退出</div></el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> --> |
|
|
|
</el-dropdown> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
|
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
user: '', |
|
|
|
headerShow:false, |
|
|
|
doctor_id:'', |
|
|
|
currentPath:'', |
|
|
|
routerNavList:[ |
|
|
|
{ |
|
|
|
name:'个人信息', |
|
|
|
path:'/doctorInformation' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name:'医院管理', |
|
|
|
path:'/' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name:'收款管理', |
|
|
|
path:'/paymentMethod' |
|
|
|
}, |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted(){ |
|
|
|
this.user = localStorage.getItem('nick') |
|
|
|
this.doctor_id = localStorage.getItem('doctor_id') |
|
|
|
if(this.user){ |
|
|
|
this.headerShow = true |
|
|
|
}else{ |
|
|
|
this.headerShow = false |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toHome() { |
|
|
|
this.$router.push({ |
|
|
|
path: '/' |
|
|
|
}) |
|
|
|
}, |
|
|
|
goToPage(path) { |
|
|
|
this.currentPath = path; |
|
|
|
this.$router.push({ |
|
|
|
path: path + '?doctor_id=' + this.doctor_id |
|
|
|
}) |
|
|
|
}, |
|
|
|
loginOut(){ |
|
|
|
// 退出登录 |
|
|
|
this.$http('POST', '/login_out', {}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
localStorage.removeItem('token'); |
|
|
|
localStorage.removeItem('nick'); |
|
|
|
localStorage.removeItem('doctor_id'); |
|
|
|
}else{ |
|
|
|
this.$message.error(response.data.info) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -56,8 +107,8 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.header-right { |
|
|
|
width: 362px; |
|
|
|
justify-content: flex-end; |
|
|
|
gap:20px; |
|
|
|
.el-dropdown-link { |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
@ -72,6 +123,12 @@ export default { |
|
|
|
transition: all .3s; |
|
|
|
} |
|
|
|
} |
|
|
|
.right-item-active{ |
|
|
|
border-radius: 6px; |
|
|
|
background: rgba(255, 255, 255, 0.4); |
|
|
|
color: #006AFF; |
|
|
|
transition: all .3s; |
|
|
|
} |
|
|
|
.el-dropdown .right-item{ |
|
|
|
padding: 0 10px; |
|
|
|
cursor: pointer; |
|
|
|
|