update slected header
This commit is contained in:
@ -28,9 +28,7 @@
|
||||
<span class="body-2">닫기</span>
|
||||
<v-icon size="20">mdi-chevron-down</v-icon></a-button> -->
|
||||
</template>
|
||||
<v-list class="py-2 btn-close-menu-list" :style="{
|
||||
backgroundColor: isDarkMode ? '#144985' : '#3f4d7d',
|
||||
}">
|
||||
<v-list class="py-2 btn-close-menu-list">
|
||||
<v-list-item class="px-2">
|
||||
<v-list-item-title @click="delAllTabsData()" class="body-2">전체 닫기</v-list-item-title>
|
||||
</v-list-item>
|
||||
@ -56,9 +54,7 @@
|
||||
<span class="body-2">즐겨찾기</span>
|
||||
<v-icon size="20">mdi-chevron-down</v-icon></a-button> -->
|
||||
</template>
|
||||
<v-list v-if="myMenuList.length > 0" class="py-2 btn-close-menu-list" :style="{
|
||||
backgroundColor: isDarkMode ? '#144985' : '#3f4d7d',
|
||||
}">
|
||||
<v-list v-if="myMenuList.length > 0" class="py-2 btn-close-menu-list">
|
||||
<v-list-item v-for="item in myMenuList" :key="item.menuId" class="px-2" style="cursor: pointer">
|
||||
<v-list-item-title @click="moveToMyMenu(item.url, item.menuId, item.prgmId)" class="body-2">{{
|
||||
item.menuNm
|
||||
@ -69,7 +65,9 @@
|
||||
<a-button id="refresh" class="btn-header" @click="removeBookMark" v-if="bookmarkBtn == 1">
|
||||
<span class="material-icons" style="font-size: 17px">star</span>
|
||||
</a-button>
|
||||
<a-button id="refresh" class="btn-header" @click="addBookMark" v-if="bookmarkBtn == 0">
|
||||
<a-button id="refresh" class="btn-header" :style="{
|
||||
display: 'flex',
|
||||
alignItems: 'center'}" @click="addBookMark" v-if="bookmarkBtn == 0">
|
||||
<span class="material-icons" style="font-size: 17px">star_border</span>
|
||||
</a-button>
|
||||
<a-button
|
||||
@ -178,9 +176,7 @@
|
||||
<span class="body-2">닫기</span>
|
||||
<v-icon size="20">mdi-chevron-down</v-icon></a-button>
|
||||
</template>
|
||||
<v-list class="py-2 btn-close-menu-list" :style="{
|
||||
backgroundColor: isDarkMode ? '#144985' : '#3f4d7d',
|
||||
}">
|
||||
<v-list class="py-2 btn-close-menu-list" >
|
||||
<v-list-item class="px-2">
|
||||
<v-list-item-title @click="delAllTabsData()" class="body-2">전체 닫기</v-list-item-title>
|
||||
</v-list-item>
|
||||
@ -206,9 +202,7 @@
|
||||
<span class="body-2">즐겨찾기</span>
|
||||
<v-icon size="20">mdi-chevron-down</v-icon></a-button>
|
||||
</template>
|
||||
<v-list v-if="myMenuList.length > 0" class="py-2 btn-close-menu-list" :style="{
|
||||
backgroundColor: isDarkMode ? '#144985' : '#3f4d7d',
|
||||
}">
|
||||
<v-list v-if="myMenuList.length > 0" class="py-2 btn-close-menu-list" >
|
||||
<v-list-item v-for="item in myMenuList" :key="item.menuId" class="px-2" style="cursor: pointer">
|
||||
<v-list-item-title @click="moveToMyMenu(item.url, item.menuId, item.prgmId)" class="body-2">{{
|
||||
item.menuNm
|
||||
@ -447,80 +441,71 @@ export default {
|
||||
activeTree: {
|
||||
deep: true,
|
||||
handler(newVal, oldVal) {
|
||||
var _this = this;
|
||||
const nv = newVal[0];
|
||||
const ov = oldVal[0];
|
||||
if (nv !== ov) {
|
||||
if (!nv) {
|
||||
// 중복클릭 시 발생 상황 기존 값을 다시 넣어줌
|
||||
this.activeTree.push(ov);
|
||||
} else {
|
||||
this.myPrgmId = nv;
|
||||
console.log("menu:", this.menuData);
|
||||
if (this.menuData[nv].url) {
|
||||
const menuUrl = this.menuData[nv].url;
|
||||
const menuId = this.menuData[nv].menuId;
|
||||
var _this = this;
|
||||
const nv = newVal[0];
|
||||
const ov = oldVal[0];
|
||||
if (nv !== ov) {
|
||||
if (!nv) {
|
||||
// 중복클릭 시 발생 상황 기존 값을 다시 넣어줌
|
||||
this.activeTree.push(ov);
|
||||
} else {
|
||||
this.myPrgmId = nv;
|
||||
if (this.menuData[nv].url) {
|
||||
const menuUrl = this.menuData[nv].url;
|
||||
const menuId = this.menuData[nv].menuId;
|
||||
|
||||
const isCommMenu = menuUrl.indexOf("comm/");
|
||||
const isEmsMenu = menuUrl.indexOf("ems/");
|
||||
const isCmmsMenu = menuUrl.indexOf("cmms/");
|
||||
const isCommMenu = menuUrl.indexOf('comm/');
|
||||
const isEmsMenu = menuUrl.indexOf('ems/');
|
||||
const isCmmsMenu = menuUrl.indexOf('cmms/');
|
||||
|
||||
// console.log('activeTree...');
|
||||
console.log(isEmsMenu);
|
||||
// console.log('activeTree...');
|
||||
|
||||
if (isCommMenu > -1 || isEmsMenu > -1 || isCmmsMenu > -1) {
|
||||
// console.log('activeTree if stmt1');
|
||||
// console.log('this.isLoading : ', this.isLoading);
|
||||
// if(this.isLoading == true){
|
||||
// console.log('if isLoading stmt1');
|
||||
// return;
|
||||
// }
|
||||
console.log("this:", this.menuData[nv].url);
|
||||
|
||||
this.$router.push({
|
||||
path: `/${this.menuData[nv].url}?prgmId=${nv}`,
|
||||
});
|
||||
// this.$router.replace("/").then(() => {
|
||||
// alert("hihi");
|
||||
// this.$router.push({
|
||||
// path: `${this.menuData[nv].url}?prgmId=${nv}`,
|
||||
// });
|
||||
// });
|
||||
|
||||
// this.$router.beforeEach((to, from, next) => {
|
||||
// if(_this.isLoading == true){
|
||||
// next(false);
|
||||
// }
|
||||
// if (!to.matched.length) {
|
||||
// next(false);
|
||||
// } else {
|
||||
// next();
|
||||
// }
|
||||
// });
|
||||
var tmp = 0;
|
||||
for (var i = 0; i < this.myMenuList.length; i++) {
|
||||
if (this.myMenuList[i].menuId == menuId) {
|
||||
tmp = 1;
|
||||
}
|
||||
}
|
||||
this.bookmarkBtn = tmp;
|
||||
} else {
|
||||
// console.log('activeTree if stmt2');
|
||||
// console.log('this.isLoading : ', this.isLoading);
|
||||
// if(this.isLoading == true){
|
||||
// console.log('if isLoading stmt2');
|
||||
// return;
|
||||
// }
|
||||
this.$refs.routerTab.openIframe(
|
||||
encodeURI(`http://localhost:9999${this.menuData[nv].url}?prgmId=${nv}`),
|
||||
this.menuData[nv].menuNm
|
||||
);
|
||||
}
|
||||
this.$axios.get(`${this.menuData[nv].url}?$menuId=${menuId}`);
|
||||
} else alert("지정된 페이지 경로가 없습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
if (isCommMenu > -1 || isEmsMenu > -1 || isCmmsMenu > -1) {
|
||||
// console.log('activeTree if stmt1');
|
||||
// console.log('this.isLoading : ', this.isLoading);
|
||||
// if(this.isLoading == true){
|
||||
// console.log('if isLoading stmt1');
|
||||
// return;
|
||||
// }
|
||||
this.$router.push({
|
||||
path: `${this.menuData[nv].url}?prgmId=${nv}`,
|
||||
});
|
||||
// this.$router.beforeEach((to, from, next) => {
|
||||
// if(_this.isLoading == true){
|
||||
// next(false);
|
||||
// }
|
||||
// if (!to.matched.length) {
|
||||
// next(false);
|
||||
// } else {
|
||||
// next();
|
||||
// }
|
||||
// });
|
||||
var tmp = 0;
|
||||
for (var i = 0; i < this.myMenuList.length; i++) {
|
||||
if (this.myMenuList[i].menuId == menuId) {
|
||||
tmp = 1;
|
||||
}
|
||||
}
|
||||
this.bookmarkBtn = tmp;
|
||||
} else {
|
||||
// console.log('activeTree if stmt2');
|
||||
// console.log('this.isLoading : ', this.isLoading);
|
||||
// if(this.isLoading == true){
|
||||
// console.log('if isLoading stmt2');
|
||||
// return;
|
||||
// }
|
||||
this.$refs.routerTab.openIframe(
|
||||
encodeURI(
|
||||
`http://localhost:9999${this.menuData[nv].url}?prgmId=${nv}`,
|
||||
),
|
||||
this.menuData[nv].menuNm,
|
||||
);
|
||||
}
|
||||
this.$axios.get(`${this.menuData[nv].url}?$menuId=${menuId}`);
|
||||
} else alert('지정된 페이지 경로가 없습니다.');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
menuData: {
|
||||
deep: true,
|
||||
|
Reference in New Issue
Block a user