라우터 console 체크 및 공지사항 FAQ console.log 삭제

This commit is contained in:
kimjhjjang
2022-11-08 14:22:42 +09:00
parent 3e2a361272
commit bb61126c09
5 changed files with 18 additions and 16 deletions

View File

@@ -313,9 +313,9 @@ export default {
fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' })); fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' }));
for (var pair of fd.entries()) { /* for (var pair of fd.entries()) {
console.log(pair[0] + ' : ' + pair[1]); console.log(pair[0] + ' : ' + pair[1]);
} } */
homeMgtApi.insertNotice(fd).then((response) => { homeMgtApi.insertNotice(fd).then((response) => {
if (response.data.retCode == '0000') { if (response.data.retCode == '0000') {

View File

@@ -353,15 +353,11 @@ export default {
delFileNo: this.delFileList.join(), delFileNo: this.delFileList.join(),
}; };
console.log(params);
console.log(params.delFileNo);
console.log(typeof params.delFileNo);
fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' })); fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' }));
for (var pair of fd.entries()) { /* for (var pair of fd.entries()) {
console.log(pair[0] + ' : ' + pair[1]); console.log(pair[0] + ' : ' + pair[1]);
} } */
homeMgtApi.updateNotice(fd).then((response) => { homeMgtApi.updateNotice(fd).then((response) => {
if (response.data.retCode == '0000') { if (response.data.retCode == '0000') {

View File

@@ -6,14 +6,12 @@ export default [
path: '/homeMgt/notice', path: '/homeMgt/notice',
component: Notice, component: Notice,
name: 'notice', name: 'notice',
props: true,
meta: { public: false }, meta: { public: false },
}, },
{ {
path: '/homeMgt/faq', path: '/homeMgt/faq',
component: Faq, component: Faq,
name: 'faq', name: 'faq',
props: true,
meta: { public: false }, meta: { public: false },
}, },
]; ];

View File

@@ -140,7 +140,7 @@ export default {
}, },
{ {
name: 'emgYn', name: 'emgYn',
header: '긴급여부(Y/N)', header: '긴급여부',
align: 'center', align: 'center',
width: '10%', width: '10%',
formatter: (props) => { formatter: (props) => {

View File

@@ -66,7 +66,11 @@ const router = new Router({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const isPublic = to.matched.some((record) => record.meta.public); const isPublic = to.matched.some((record) => record.meta.public);
const loggedIn = !!tokenSvc.getToken(); const loggedIn = !!tokenSvc.getToken();
console.log(isPublic);
console.log(loggedIn);
console.log(to);
if (!isPublic && !loggedIn) { if (!isPublic && !loggedIn) {
console.log('1');
return next('/login'); return next('/login');
} else { } else {
var nextUrl = to.fullPath; var nextUrl = to.fullPath;
@@ -77,6 +81,7 @@ router.beforeEach((to, from, next) => {
var moveFlag = false; var moveFlag = false;
for (var i = 0; i < menuUrls.length; i++) { for (var i = 0; i < menuUrls.length; i++) {
var targetUrl = menuUrls[i]; var targetUrl = menuUrls[i];
console.log('nextUrl : ' + nextUrl + ' /// targetUrl : ' + targetUrl);
if (nextUrl == targetUrl) { if (nextUrl == targetUrl) {
moveFlag = true; moveFlag = true;
if (fromUrl != '/' && fromUrl != '/view/error/404' && fromUrl != '/view/error/500') { if (fromUrl != '/' && fromUrl != '/view/error/404' && fromUrl != '/view/error/500') {
@@ -179,17 +184,16 @@ router.beforeEach((to, from, next) => {
} }
} }
} }
// url 홈페이지 관리 // url 홈페이지 관리
if (nextUrl == '/homeMgt/notice' || nextUrl == '/homeMgt/faq') { /* if (nextUrl == '/homeMgt/notice' || nextUrl == '/homeMgt/faq') {
moveFlag = true; moveFlag = true;
} } */
// url 배치 모니터링 // url 배치 모니터링
if((nextUrl == '/sysMgt/batchList') || '/sysMgt/batchDetail'){ /* if (nextUrl == '/sysMgt/batchList' || '/sysMgt/batchDetail') {
moveFlag = true; moveFlag = true;
} }
*/
if (!moveFlag) { if (!moveFlag) {
if ( if (
fromUrl == '/login' || fromUrl == '/login' ||
@@ -197,6 +201,7 @@ router.beforeEach((to, from, next) => {
fromUrl == '/view/login/resetPassword' || fromUrl == '/view/login/resetPassword' ||
fromUrl == '/view/login/updatePassword' fromUrl == '/view/login/updatePassword'
) { ) {
console.log('2');
return next('/login'); return next('/login');
} }
// store.commit("login/isErrorPage", true); // store.commit("login/isErrorPage", true);
@@ -209,6 +214,7 @@ router.beforeEach((to, from, next) => {
nextUrl == '/view/login/updatePassword' nextUrl == '/view/login/updatePassword'
) { ) {
if (fromUrl != '/login') { if (fromUrl != '/login') {
console.log('3');
return next('/login'); return next('/login');
} }
} }
@@ -216,6 +222,7 @@ router.beforeEach((to, from, next) => {
if (nextUrl == '/') { if (nextUrl == '/') {
const rootUrl = store.getters['login/getRootUrl']; const rootUrl = store.getters['login/getRootUrl'];
if (rootUrl == null) { if (rootUrl == null) {
console.log('4');
return next('/login'); return next('/login');
} }
return next(rootUrl); return next(rootUrl);
@@ -224,6 +231,7 @@ router.beforeEach((to, from, next) => {
if (nextUrl == '/login' && loggedIn) { if (nextUrl == '/login' && loggedIn) {
const rootUrl = store.getters['login/getRootUrl']; const rootUrl = store.getters['login/getRootUrl'];
if (rootUrl == null) { if (rootUrl == null) {
console.log('5');
return next('/login'); return next('/login');
} }
return next(rootUrl); return next(rootUrl);