소스검증을 위한 수정 변경

This commit is contained in:
kimre
2022-07-12 12:26:45 +09:00
parent 74511fb587
commit 3d7032432c
40 changed files with 2028 additions and 2120 deletions

View File

@@ -4,11 +4,13 @@
<!-- 선택한 메뉴 li.is-current -->
<li v-for="child in menuList" :key="child.menuNo" :class="child.classNm">
<div class="menu_btn" ></div>
<a class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
<a href="javascript:void(0);" class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
<!-- <router-link :to="`${child.menuNo}`">{{child.menuNm}}</router-link>-->
<div class="sub_menu_wrap">
<ul class="sub_menu" v-if="child.children.length > 0">
<li v-for="child2 in child.children" :key="child2.menuNo">
<a href="javascript:void(0);" @click="clickMenu(child2.menuUrl)" :data-menu-no="child2.menuNo">{{child2.menuNm}}</a>
<!-- <a href="javascript:void(0);" @click="clickMenu(child2.menuUrl)" :data-menu-no="child2.menuNo">{{child2.menuNm}}</a>-->
<router-link :to="`${child2.menuUrl}`">{{child2.menuNm}}</router-link>
</li>
</ul>
</div>
@@ -20,8 +22,6 @@
<script>
//import "../assets/js/script.js";
import api from '@/service/api.js';
// import api from "@/service/api";
// import loginApi from "@/modules/login/service/api"
import tokenSvc from '@/common/token-service';
import { mapGetters } from 'vuex';
@@ -37,7 +37,8 @@ export default {
isErrPage: false,
navActive: false,
menuList: [],
tempList: []
tempList: [],
nowPath:'',
}
},
created() {
@@ -76,12 +77,57 @@ export default {
this.isErrPage = false;
}
},
$route(to, from) {
if (to.path != from.path) {
/* router path가 변경될 때마다 서버로 접근로그를 저장한다. */
const menuList = document.querySelectorAll('.main_menu .is-current');
for(const other of menuList){
other.classList.remove('is-current');
}
// const path = to.path;
var toPathUrl = to.path;
if(toPathUrl.indexOf('custMgt') > -1){
const div = document.querySelector('.customer');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('attractMgt') > -1){
const div = document.querySelector('.attract');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('servMgt') > -1){
const div = document.querySelector('.service');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('calculate') > -1){
const div = document.querySelector('.calculate');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('channelMgt') > -1){
const div = document.querySelector('.channel');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('sendNumMgt') > -1){
const div = document.querySelector('.key');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('mntrng') > -1){
const div = document.querySelector('.moniter');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('riskMgt') > -1){
const div = document.querySelector('.risk');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('stats') > -1){
const div = document.querySelector('.stats');
div.classList.add('is-current')
}else if(toPathUrl.indexOf('sysMgt') > -1){
const div = document.querySelector('.system');
div.classList.add('is-current')
}else{
const div = document.querySelector('.customer');
div.classList.add('is-current')
}
}
}
},
methods: {
setMenuData() {
api.menus().then(response => {
const rootMenu = response.data.data;
console.log(rootMenu);
// console.log(rootMenu);
if (rootMenu != null && rootMenu.children != null && rootMenu.children.length > 0) {
this.tempList = rootMenu.children;
for(var i=0; i<this.tempList.length; i++){
@@ -103,16 +149,8 @@ export default {
this.tempList[i].classNm = classNm;
//console.log(classNm);
}
//this.menuList = rootMenu.children;
this.menuList = this.tempList;
var location = this.$route.fullPath;
console.log(location)
if(location.contains(classNm)){
}
//this.$store.commit("login/isLogin", true);
//this.$store.commit("login/isAuthChk", true);
} else {
window.top.location.href = '/';
// this.isLogin = false;
@@ -133,6 +171,7 @@ export default {
},
reload(){
var location = this.$route.fullPath;
// console.log('reload() >> ' + location)
if (location == "/" || location == "") {
// nothing
} else {