리스크관리 / 발송통계 추가

This commit is contained in:
kimre
2022-06-29 17:52:26 +09:00
parent 056ccf20e1
commit 0a2e30b1c2
32 changed files with 2864 additions and 992 deletions

View File

@@ -1,4 +1,4 @@
<template>
<template>
<header>
<h1 class="logo"><a href="javascript:void(0)">uplus 메시지허브이지<span>BACKOFFICE</span></a></h1>
<div class="user_wrap">
@@ -11,7 +11,7 @@
<a href="javascript:void(0)" class="logout" @click="logout();">로그아웃</a>
</div>
</div>
</header>
</header>
</template>
<script>
@@ -29,8 +29,8 @@ export default {
navActive: false,
}
},
created() {
created() {
},
computed: {
...mapGetters({
@@ -45,6 +45,7 @@ export default {
//this.setMenuData();
} else {
this.isLogin = false;
window.top.location.href = '/';
//this.menuList = null;
}
},
@@ -53,6 +54,7 @@ export default {
this.isErrPage = true;
} else {
this.isErrPage = false;
window.top.location.href = '/';
}
},
},

View File

@@ -9,10 +9,10 @@
<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>
</li>
</li>
</ul>
</div>
</li>
</li>
</ul>
</nav>
</template>
@@ -20,37 +20,68 @@
<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';
export default {
name: 'Nav',
props: {
},
data() {
return {
isLogin : false,
isAuthChk : false,
isErrPage: false,
navActive: false,
menuList: [],
tempList: []
}
},
created() {
// 메뉴 가져오기
created() {
this.isLogin = !!tokenSvc.getToken();
let curPage = location.pathname;
if (this.isLogin && curPage != "/login") {
this.$store.commit("login/isLogin", true);
this.setMenuData();
} else {
this.$store.commit("login/isLogin", false);
this.isLogin = false;
}
},
mounted() {},
computed: {
...mapGetters({
getLogin: 'login/isLogin',
getErrorPage: 'login/isErrorPage',
}),
},
watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
this.setMenuData();
} else {
this.isLogin = false;
this.menuList = null;
}
},
getErrorPage(data) {
if (data != null && data != '' && data == true) {
this.isErrPage = true;
} else {
this.isErrPage = false;
}
},
},
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++){
@@ -73,32 +104,51 @@ export default {
//console.log(classNm);
}
//this.menuList = rootMenu.children;
//this.menuList = rootMenu.children;
this.menuList = this.tempList;
//this.$store.commit("login/isLogin", true);
//this.$store.commit("login/isAuthChk", true);
} else {
window.top.location.href = '/';
}
});
},
clickMenu(link){
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;
this.menuList = null;
}
}).catch(rsponse => {
this.isLogin = false;
this.menuList = null;
})
},
clickMenu(link){
var location = this.$route.fullPath;
if(link != location){
this.$router.push({
path: link
});
});
}
},
reload(){
var location = this.$route.fullPath;
if (location == "/" || location == "") {
// nothing
} else {
this.$router.replace('/');
this.$nextTick(() => this.$router.replace(location));
}
},
actionMenu(e){
const menuList = document.querySelectorAll('.main_menu .is-current');
const menuList = document.querySelectorAll('.main_menu .is-current');
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){
const menuListCheck = e.target.parentNode;
if(menuListCheck.classList.contains('is-current')){
menuListCheck.classList.remove('is-current');
for(const menu of menuList){
menu.classList.remove('is-current');
}
@@ -106,12 +156,12 @@ export default {
for(const other of menuList){
other.classList.remove('is-current');
}
}
menuListCheck.classList.add('is-current');
}
}
},

View File

@@ -34,12 +34,32 @@
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="pop-btn2">
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2">
<!-- 수정 확인 -->
<div class="popup confirm2">
<div class="pop-head">
<h3 class="popup-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div>
</div>
</div>
</div>
</template>
@@ -59,7 +79,6 @@ export default {
},
methods :{
alertModalOpen(props){
console.log(props)
var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
@@ -89,6 +108,18 @@ export default {
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
confirmModalOpen2(props){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
@@ -102,6 +133,17 @@ export default {
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
@@ -113,6 +155,17 @@ export default {
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);