
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<template>
<header class="admin-header">
<div class="title-zone">
<div class="page-title">
<p>{{ pgNm }} </p>
</div>
<Breadcrumb v-if="$route.path !== this.$filters.ctxPath('/adm/main.page') && $route.path !== this.$filters.ctxPath('/main.page')" />
</div>
<div class="info-wrap">
<div class="info">
<p class="info-name">{{ mbrNm }} 님</p>
<ul class="info-btn">
<li><button class="btn-ico xsm ico-logout" @click="fnlogOut" title="로그아웃"></button></li>
<li><button class="btn-ico xsm ico-go" @click="fnSiteMove" title="사이트이동"></button></li>
<li><button class="btn-ico xsm ico-reset" @click="cacheClean()" title="변경사항 적용"></button></li>
</ul>
</div>
</div>
</header>
</template>
<script>
import store from "../../views/pages/AppStore";
import queryParams from '../../resources/js/queryParams';
import { mapActions } from "vuex";
import { cacheReSet } from "../../resources/api/cacheReSet";
import Breadcrumb from "../component/Breadcrumb/Breadcrumb.vue";
export default {
mixins: [queryParams],
components: {
'Breadcrumb':Breadcrumb
},
data() {
return {
mbrNm: store.state.mbrNm,
pgNm: store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈",
}
},
created() {
},
methods: {
// 사이트 이동
fnSiteMove() {
this.$router.push({
path: this.$filters.ctxPath("/"),
});
},
...mapActions(["logout"]),
// 로그 아웃
async fnlogOut() {
await this.logout();
this.$router.push({
path: this.$filters.ctxPath("/login.page"),
});
},
// 캐시 초기화
async cacheClean() {
if (!confirm("변경사항을 적용하시겠습니까?")) return;
const res = await cacheReSet();
alert(res.data.message);
},
},
watch: {
'pgNm'(newValue,oldValue){
console.log(oldValue)
},
'$store.state.menu'(newValue) {
this.pgNm = newValue.menuNm
},
},
computed: {
pgNm() {
return store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈";
}
},
mounted() {
}
}
</script>