|
|
@ -1,130 +1,131 @@ |
|
|
|
<template> |
|
|
|
<div id="title-wrap"> |
|
|
|
<img :src="logo" /> |
|
|
|
<p>{{ title }}</p> |
|
|
|
<el-dropdown> |
|
|
|
<el-avatar shape="square" :size="32" fit="contain" :src="userLogo" /> |
|
|
|
<template #dropdown> |
|
|
|
<el-dropdown-menu> |
|
|
|
<el-dropdown-item @click="logOut">退出登录</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</template> |
|
|
|
</el-dropdown> |
|
|
|
|
|
|
|
<!-- <el-badge is-dot class="item"> |
|
|
|
<el-button |
|
|
|
class="share-button" |
|
|
|
icon="el-icon-message-solid" |
|
|
|
type="primary" |
|
|
|
></el-button> |
|
|
|
</el-badge> --> |
|
|
|
<!-- <el-button |
|
|
|
class="question-button" |
|
|
|
icon="el-icon-question" |
|
|
|
type="primary" |
|
|
|
></el-button> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
export default { |
|
|
|
name: "HelloWorld", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
logo: process.env["VUE_APP_LOGO"] |
|
|
|
? require(process.env["VUE_APP_LOGO"]) |
|
|
|
: require("../assets/img/logo.png"), |
|
|
|
title: process.env["VUE_APP_TITLE"] |
|
|
|
? process.env["VUE_APP_TITLE"] |
|
|
|
: "沈阳领新智科智能信息系统有限公司", |
|
|
|
userLogo: require("../assets/img/logo.png"), |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 退出登录 |
|
|
|
logOut() { |
|
|
|
this.$confirm("确定注销并退出系统吗?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
localStorage.token = ""; |
|
|
|
this.$router.push({ path: "/login" }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="less"> |
|
|
|
#title-wrap { |
|
|
|
.item { |
|
|
|
.el-button--primary { |
|
|
|
.el-icon-message-solid::before { |
|
|
|
font-size: 22px; |
|
|
|
} |
|
|
|
} |
|
|
|
sup { |
|
|
|
background: #ce2b2b; |
|
|
|
top: 13px; |
|
|
|
right: 9px; |
|
|
|
border: none; |
|
|
|
} |
|
|
|
} |
|
|
|
.question-button { |
|
|
|
.el-icon-question::before { |
|
|
|
font-size: 22px; |
|
|
|
} |
|
|
|
} |
|
|
|
.el-dropdown { |
|
|
|
float: right; |
|
|
|
margin-top: 8px; |
|
|
|
margin-right: 24px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped lang="less"> |
|
|
|
#title-wrap { |
|
|
|
img { |
|
|
|
float: left; |
|
|
|
width: 25px; |
|
|
|
height: 25px; |
|
|
|
margin-top: 10px; |
|
|
|
margin-left: 53px; |
|
|
|
} |
|
|
|
|
|
|
|
p { |
|
|
|
float: left; |
|
|
|
margin-left: 12px; |
|
|
|
font-size: 16px; |
|
|
|
font-family: PingFangSC-Semibold, PingFang SC; |
|
|
|
font-weight: 600; |
|
|
|
color: #ffffff; |
|
|
|
line-height: 48px; |
|
|
|
text-shadow: 0px -1px 0px #215c85; |
|
|
|
} |
|
|
|
|
|
|
|
.item { |
|
|
|
float: right; |
|
|
|
height: 30px; |
|
|
|
margin-top: 4px; |
|
|
|
margin-right: 30px; |
|
|
|
.el-button--primary { |
|
|
|
border: none; |
|
|
|
background: none; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.question-button { |
|
|
|
float: right; |
|
|
|
border: none; |
|
|
|
background: none; |
|
|
|
padding-right: 22px; |
|
|
|
color: #fff; |
|
|
|
box-shadow: none; |
|
|
|
} |
|
|
|
.share-button { |
|
|
|
color: #fff; |
|
|
|
box-shadow: none; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
<template> |
|
|
|
<div id="title-wrap"> |
|
|
|
<img :src="logo" /> |
|
|
|
<p>{{ title }}</p> |
|
|
|
<el-dropdown> |
|
|
|
<el-avatar shape="square" :size="32" fit="contain" :src="userLogo" /> |
|
|
|
<template #dropdown> |
|
|
|
<el-dropdown-menu> |
|
|
|
<el-dropdown-item @click="logOut">退出登录</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</template> |
|
|
|
</el-dropdown> |
|
|
|
|
|
|
|
<!-- <el-badge is-dot class="item"> |
|
|
|
<el-button |
|
|
|
class="share-button" |
|
|
|
icon="el-icon-message-solid" |
|
|
|
type="primary" |
|
|
|
></el-button> |
|
|
|
</el-badge> --> |
|
|
|
<!-- <el-button |
|
|
|
class="question-button" |
|
|
|
icon="el-icon-question" |
|
|
|
type="primary" |
|
|
|
></el-button> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
export default { |
|
|
|
name: "HelloWorld", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
logo: process.env["VUE_APP_LOGO"] |
|
|
|
? require(process.env["VUE_APP_LOGO"]) |
|
|
|
: require("../assets/img/logo.png"), |
|
|
|
title: process.env["VUE_APP_TITLE"] |
|
|
|
? process.env["VUE_APP_TITLE"] |
|
|
|
: "沈阳领新智科智能信息系统有限公司", |
|
|
|
userLogo: require("../assets/img/logo.png"), |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 退出登录 |
|
|
|
logOut() { |
|
|
|
this.$confirm("确定注销并退出系统吗?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
localStorage.token = ""; |
|
|
|
localStorage.router = ""; |
|
|
|
this.$router.push({ path: "/login" }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="less"> |
|
|
|
#title-wrap { |
|
|
|
.item { |
|
|
|
.el-button--primary { |
|
|
|
.el-icon-message-solid::before { |
|
|
|
font-size: 22px; |
|
|
|
} |
|
|
|
} |
|
|
|
sup { |
|
|
|
background: #ce2b2b; |
|
|
|
top: 13px; |
|
|
|
right: 9px; |
|
|
|
border: none; |
|
|
|
} |
|
|
|
} |
|
|
|
.question-button { |
|
|
|
.el-icon-question::before { |
|
|
|
font-size: 22px; |
|
|
|
} |
|
|
|
} |
|
|
|
.el-dropdown { |
|
|
|
float: right; |
|
|
|
margin-top: 8px; |
|
|
|
margin-right: 24px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped lang="less"> |
|
|
|
#title-wrap { |
|
|
|
img { |
|
|
|
float: left; |
|
|
|
width: 25px; |
|
|
|
height: 25px; |
|
|
|
margin-top: 10px; |
|
|
|
margin-left: 53px; |
|
|
|
} |
|
|
|
|
|
|
|
p { |
|
|
|
float: left; |
|
|
|
margin-left: 12px; |
|
|
|
font-size: 16px; |
|
|
|
font-family: PingFangSC-Semibold, PingFang SC; |
|
|
|
font-weight: 600; |
|
|
|
color: #ffffff; |
|
|
|
line-height: 48px; |
|
|
|
text-shadow: 0px -1px 0px #215c85; |
|
|
|
} |
|
|
|
|
|
|
|
.item { |
|
|
|
float: right; |
|
|
|
height: 30px; |
|
|
|
margin-top: 4px; |
|
|
|
margin-right: 30px; |
|
|
|
.el-button--primary { |
|
|
|
border: none; |
|
|
|
background: none; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.question-button { |
|
|
|
float: right; |
|
|
|
border: none; |
|
|
|
background: none; |
|
|
|
padding-right: 22px; |
|
|
|
color: #fff; |
|
|
|
box-shadow: none; |
|
|
|
} |
|
|
|
.share-button { |
|
|
|
color: #fff; |
|
|
|
box-shadow: none; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |