From b2ff509948d646d70f5d34202f354e28d7eaa5d0 Mon Sep 17 00:00:00 2001 From: kimre Date: Fri, 8 Jul 2022 14:07:33 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20/=20=EB=A9=94=EB=89=B4=20=EB=A7=81=ED=81=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20/=20=ED=99=88=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.dev | 10 +- frontend/.env.live | 6 + frontend/.env.local | 6 + frontend/.env.stg | 6 + frontend/package.json | 103 +++---- frontend/src/components/HubWebHeader.vue | 13 +- frontend/src/components/LoginPopup.vue | 10 +- frontend/src/components/NavBar.vue | 6 +- .../src/modules/calculate/views/CalcList.vue | 2 - .../modules/channelMgt/views/TmpltList.vue | 4 +- .../custMgt/components/CarryOverListPop.vue | 8 +- .../custMgt/components/MemberRegPop.vue | 70 ----- .../custMgt/views/MemberAdminDetail.vue | 259 +++++++++--------- .../modules/custMgt/views/MemberDetail.vue | 23 +- .../src/modules/custMgt/views/MemberList.vue | 45 +-- .../src/modules/custMgt/views/SubsDetail.vue | 2 - .../src/modules/custMgt/views/SubsList.vue | 33 ++- frontend/src/modules/login/store/index.js | 10 + .../src/modules/login/views/LoginAuth.vue | 36 ++- .../src/modules/login/views/LoginMain.vue | 21 +- .../src/modules/login/views/ResetPassword.vue | 11 +- .../modules/login/views/UpdatePassword.vue | 19 +- frontend/src/modules/mntrng/service/mixins.js | 4 + .../modules/mntrng/views/LiveSendSttus.vue | 2 - .../src/modules/mntrng/views/SendList.vue | 51 +++- .../riskMgt/components/InsertIntrcpPop.vue | 92 +++++-- .../riskMgt/components/InsertMsgPop.vue | 18 +- .../riskMgt/components/IntrcpDetailPopup.vue | 55 +++- .../riskMgt/components/IntrcpMsgDetail.vue | 37 ++- frontend/src/modules/riskMgt/views/All.vue | 47 ++-- .../src/modules/riskMgt/views/IntrcpList.vue | 31 ++- frontend/src/modules/riskMgt/views/Msg.vue | 24 +- frontend/src/modules/riskMgt/views/ZezNum.vue | 45 ++- .../src/modules/sendNumMgt/views/ApprList.vue | 2 - .../modules/sendNumMgt/views/NumberList.vue | 4 +- .../modules/sendNumMgt/views/ProfileList.vue | 2 - .../modules/servMgt/views/rejectRecvList.vue | 23 +- .../src/modules/stats/views/BsnmDayList.vue | 2 - .../src/modules/stats/views/BsnmMonthList.vue | 2 - frontend/src/modules/stats/views/DayList.vue | 2 - .../src/modules/stats/views/MonthList.vue | 2 - .../src/modules/sysMgt/views/AdminList.vue | 4 +- frontend/src/modules/sysMgt/views/AuthAdd.vue | 39 ++- .../src/modules/sysMgt/views/AuthList.vue | 10 +- .../src/modules/sysMgt/views/AuthModify.vue | 42 ++- frontend/src/store.js | 4 +- frontend/src/views/HubwebLayout.vue | 11 +- frontend/vue.config.js | 2 +- .../api/channelMgt/ChannelMgtController.java | 13 +- .../ez/api/channelMgt/ChannelMgtMapper.java | 2 + .../ez/api/channelMgt/ChannelMgtService.java | 36 +-- .../channelMgt/dto/TmpltListExcelReqDto.java | 3 + .../api/channelMgt/dto/TmpltListReqDto.java | 3 + .../uplus/ez/api/custMgt/CustMgtMapper.java | 44 +-- .../uplus/ez/api/custMgt/CustMgtService.java | 141 ++++++++-- .../uplus/ez/api/custMgt/dto/CarryOver.java | 2 + .../co/uplus/ez/api/custMgt/dto/SubsInfo.java | 6 +- .../uplus/ez/api/login/LoginController.java | 16 +- .../kr/co/uplus/ez/api/login/LoginMapper.java | 10 +- .../co/uplus/ez/api/login/LoginService.java | 43 +-- .../co/uplus/ez/api/login/dto/LoginRes.java | 10 +- .../co/uplus/ez/api/login/dto/SendMsgDto.java | 12 + .../components/HubeasyApiComponents.java | 77 ++++++ .../components/WebClientRequestService.java | 29 ++ src/main/resources/application-dev.yml | 12 + src/main/resources/application-local.yml | 10 + src/main/resources/application-prd.yml | 11 + src/main/resources/application-stg.yml | 11 + .../mysql/channelMgt/channelMgt-mapper.xml | 17 ++ .../mapper/mysql/custMgt/custMgt-mapper.xml | 88 +++--- .../mapper/mysql/login/login-mapper.xml | 27 ++ .../mapper/mysql/mntrng/mntrng-mapper.xml | 2 +- .../mapper/mysql/riskMgt/riskMgt-mapper.xml | 34 ++- 73 files changed, 1251 insertions(+), 668 deletions(-) create mode 100644 frontend/.env.live create mode 100644 frontend/.env.local create mode 100644 frontend/.env.stg create mode 100644 src/main/java/kr/co/uplus/ez/api/login/dto/SendMsgDto.java create mode 100644 src/main/java/kr/co/uplus/ez/common/components/HubeasyApiComponents.java diff --git a/frontend/.env.dev b/frontend/.env.dev index 4d67519..22e9465 100644 --- a/frontend/.env.dev +++ b/frontend/.env.dev @@ -1,4 +1,6 @@ -NODE_ENV = "dev" -BASE_URL: "/" -VUE_APP_TARGET_URL=https://console.ums-dev.uplus.co.kr/ -VUE_APP_PORT=3000 \ No newline at end of file +NODE_ENV = "development" +BASE_URL: "/" +VUE_APP_TARGET_URL=http://localhost:7071 +VUE_APP_PORT=7070 +VUE_APP_HOME_PAGE_URL=https://mhez-dev.uplus.co.kr/auth/bo +VUE_APP_AUTHKEY=bohubez!@#$% \ No newline at end of file diff --git a/frontend/.env.live b/frontend/.env.live new file mode 100644 index 0000000..b6e3c8f --- /dev/null +++ b/frontend/.env.live @@ -0,0 +1,6 @@ +NODE_ENV = "production" +BASE_URL: "/" +VUE_APP_TARGET_URL=http://localhost:7070 +VUE_APP_PORT=7070 +VUE_APP_HOME_PAGE_URL=https://mhez.uplus.co.kr/auth/bo +VUE_APP_AUTHKEY=bohubez!@#$% \ No newline at end of file diff --git a/frontend/.env.local b/frontend/.env.local new file mode 100644 index 0000000..3fd44e5 --- /dev/null +++ b/frontend/.env.local @@ -0,0 +1,6 @@ +NODE_ENV = "development" +BASE_URL: "/" +VUE_APP_TARGET_URL=http://localhost:7070 +VUE_APP_PORT=7070 +VUE_APP_HOME_PAGE_URL=https://mhez-dev.uplus.co.kr/auth/bo +VUE_APP_AUTHKEY=bohubez!@#$% \ No newline at end of file diff --git a/frontend/.env.stg b/frontend/.env.stg new file mode 100644 index 0000000..27ce66d --- /dev/null +++ b/frontend/.env.stg @@ -0,0 +1,6 @@ +NODE_ENV = "dev" +BASE_URL: "/" +VUE_APP_TARGET_URL=http://localhost:7070 +VUE_APP_PORT=7070 +VUE_APP_HOME_PAGE_URL=https://mhez-dev.uplus.co.kr +VUE_APP_AUTHKEY=bohubez!@#$% \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 8e86da0..edef897 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,49 +1,54 @@ -{ - "name": "mhez-admin-web", - "version": "0.1.0", - "private": true, - "proxy":"http://localhost:7070", - "scripts": { - "serve": "vue-cli-service serve --port 3000", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint", - "test:unit": "vue-cli-service test:unit" - }, - "dependencies": { - "@toast-ui/vue-grid": "2.1.0", - "axios": "^0.19.0", - "core-js": "^2.6.5", - "element-ui": "^2.15.0", - "file-saver": "^2.0.2", - "js-base64": "^2.5.1", - "moment": "^2.24.0", - "sticky-sidebar": "^3.3.1", - "tui-grid": "4.5.2", - "v-runtime-template": "^1.10.0", - "vue": "^2.6.10", - "vue-custom-scrollbar": "^1.4.0", - "vue-router": "^3.0.3", - "vue-scrollbar": "^1.0.4", - "vue-tiny-slider": "^0.1.35", - "vuejs-daum-postcode": "^1.0.4", - "vuex": "^3.0.1", - "xlsx": "^0.15.3" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "^3.9.0", - "@vue/cli-plugin-eslint": "^3.9.0", - "@vue/cli-plugin-unit-jest": "^3.9.0", - "@vue/cli-service": "^3.9.0", - "@vue/test-utils": "1.0.0-beta.29", - "babel-core": "7.0.0-bridge.0", - "babel-eslint": "^10.0.1", - "babel-jest": "^23.6.0", - "eslint": "^5.16.0", - "eslint-plugin-vue": "^5.0.0", - "less": "^4.1.0", - "less-loader": "^7.2.1", - "sass": "^1.18.0", - "sass-loader": "^7.1.0", - "vue-template-compiler": "^2.6.10" - } -} +{ + "name": "mhez-admin-web", + "version": "0.1.0", + "private": true, + "proxy":"http://localhost:7070", + "scripts": { + "serve": "vue-cli-service serve --port 3000", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint", + "test:unit": "vue-cli-service test:unit", + "local": "vue-cli-service serve --port 3000 --mode local", + "dev": "vue-cli-service serve --port 3000 --mode dev", + "stg": "vue-cli-service serve --port 3000 --mode stg", + "live": "vue-cli-service serve --port 3000 --mode live" + }, + "dependencies": { + "@toast-ui/vue-grid": "2.1.0", + "axios": "^0.19.0", + "core-js": "^2.6.5", + "element-ui": "^2.15.0", + "file-saver": "^2.0.2", + "js-base64": "^2.5.1", + "moment": "^2.24.0", + "sticky-sidebar": "^3.3.1", + "tui-grid": "4.5.2", + "v-runtime-template": "^1.10.0", + "vue": "^2.6.10", + "vue-custom-scrollbar": "^1.4.0", + "vue-router": "^3.0.3", + "vue-scrollbar": "^1.0.4", + "vue-tiny-slider": "^0.1.35", + "vuejs-daum-postcode": "^1.0.4", + "vuex": "^3.0.1", + "vuex-persistedstate": "^4.1.0", + "xlsx": "^0.15.3" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "^3.9.0", + "@vue/cli-plugin-eslint": "^3.9.0", + "@vue/cli-plugin-unit-jest": "^3.9.0", + "@vue/cli-service": "^3.9.0", + "@vue/test-utils": "1.0.0-beta.29", + "babel-core": "7.0.0-bridge.0", + "babel-eslint": "^10.0.1", + "babel-jest": "^23.6.0", + "eslint": "^5.16.0", + "eslint-plugin-vue": "^5.0.0", + "less": "^4.1.0", + "less-loader": "^7.2.1", + "sass": "^1.18.0", + "sass-loader": "^7.1.0", + "vue-template-compiler": "^2.6.10" + } +} diff --git a/frontend/src/components/HubWebHeader.vue b/frontend/src/components/HubWebHeader.vue index 88d769c..72e52d8 100644 --- a/frontend/src/components/HubWebHeader.vue +++ b/frontend/src/components/HubWebHeader.vue @@ -3,11 +3,11 @@

uplus 메시지허브이지BACKOFFICE

-

슈퍼관리자

- Uplus01 +

{{ this.$store.getters['login/userNm'] }}

+ {{ this.$store.getters['login/userId'] }}
@@ -30,12 +30,13 @@ export default { } }, created() { - + // console.log(this.$store["login/isLogin"]) + // this.$store.getters.getCounter }, computed: { ...mapGetters({ getLogin: 'login/isLogin', - getErrorPage: 'login/isErrorPage', + getErrorPage: 'login/isErrorPage' }), }, watch: { @@ -75,7 +76,7 @@ export default { loginApi.logout().then(response => { if(response.data.retCode == '0000'){ - //tokenSvc.removeToken(); + // tokenSvc.removeToken(); this.$router.push({ path: "/login" diff --git a/frontend/src/components/LoginPopup.vue b/frontend/src/components/LoginPopup.vue index 7fb4408..3a7f20b 100644 --- a/frontend/src/components/LoginPopup.vue +++ b/frontend/src/components/LoginPopup.vue @@ -277,8 +277,8 @@ export default { } - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/frontend/src/components/NavBar.vue b/frontend/src/components/NavBar.vue index f9c6f14..8aef46e 100644 --- a/frontend/src/components/NavBar.vue +++ b/frontend/src/components/NavBar.vue @@ -4,7 +4,7 @@
  • - {{child.menuNm}} + {{child.menuNm}}
    -
    + + + +
    @@ -32,7 +38,7 @@ @@ -81,7 +87,7 @@
    ID {{userId}} - + 관리자명 {{adminId}} / {{adminNm}}
    - +
    @@ -149,7 +155,6 @@
    - \ No newline at end of file diff --git a/frontend/src/modules/custMgt/views/MemberList.vue b/frontend/src/modules/custMgt/views/MemberList.vue index 4e190b9..df062fb 100644 --- a/frontend/src/modules/custMgt/views/MemberList.vue +++ b/frontend/src/modules/custMgt/views/MemberList.vue @@ -210,8 +210,6 @@ export default { vuejsDatepicker, }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); this.setCodeData(); this.setPeriodDay(0); }, @@ -249,10 +247,24 @@ export default { } this.search(isKeep); }, + beforeRouteLeave(to, from, next) { + + const getP = this.$refs.table.getPagination(); + console.log("==========getP : " + getP._currentPage); + this.$store.commit('searchcondition/updateSearchCondition', { + page: getP._currentPage, + perPage: this.perPageCnt, + params: this.grid.params + }); + // 라우트 하기전 실행 + next(); + }, methods: { search: function(isKeep) { + this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD'); + this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD'); console.log('this.perPageCnt'+this.perPageCnt); - //console.log(this.grid.params); + console.log(this.grid.params); this.$refs.table.search(this.grid.params, isKeep); this.sendStoreData(); }, @@ -302,9 +314,10 @@ export default { setPeriodDay(day) { this.periodDay = day; this.endDate = new Date(); - this.startDate = moment(this.endDate) - .subtract(day, 'day') - .toDate(); + //this.startDate = moment(this.endDate) + // .subtract(day, 'day') + // .toDate(); + this.initSetStartDate(); this.closeDate('start'); this.closeDate('end'); @@ -345,18 +358,14 @@ export default { return moment(date).format('YYYY-MM-DD'); } }, + initSetStartDate(){ + let setYear = Number(moment(new Date()).format('YYYY')); + let initStartDate = new Date(setYear, 0, 1); + this.startDate = initStartDate; + console.log(moment(this.startDate).format('YYYY-MM-DD')); + }, }, - beforeRouteLeave(to, from, next) { - - const getP = this.$refs.table.getPagination(); - console.log("==========getP : " + getP._currentPage); - this.$store.commit('searchcondition/updateSearchCondition', { - page: getP._currentPage, - perPage: this.perPageCnt, - params: this.grid.params - }); - // 라우트 하기전 실행 - next(); - }, + + }; \ No newline at end of file diff --git a/frontend/src/modules/custMgt/views/SubsDetail.vue b/frontend/src/modules/custMgt/views/SubsDetail.vue index c93ca2f..3b37368 100644 --- a/frontend/src/modules/custMgt/views/SubsDetail.vue +++ b/frontend/src/modules/custMgt/views/SubsDetail.vue @@ -239,8 +239,6 @@ export default { commonModal, }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); console.log(this.$route.params.serviceId); this.subsDetail(this.$route.params.serviceId); // checkVaildBizNum diff --git a/frontend/src/modules/custMgt/views/SubsList.vue b/frontend/src/modules/custMgt/views/SubsList.vue index f12f131..f77998a 100644 --- a/frontend/src/modules/custMgt/views/SubsList.vue +++ b/frontend/src/modules/custMgt/views/SubsList.vue @@ -219,13 +219,25 @@ export default { vuejsDatepicker, }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); + this.setCodeData(); this.getExcelHeader(); this.setPeriodDay(0); + }, destroyed() { + this.$store.commit('searchcondition/updateSearchCondition', { + page: 1, + perPage: 50, + params: { + searchType1: '', + searchType2: '', + searchType3: '', + searchText1: '', + startDt: '', + endDt: '' + } + }); }, mounted() { @@ -260,8 +272,10 @@ export default { }, methods: { search: function(isKeep) { + this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD'); + this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD'); console.log('this.perPageCnt'+this.perPageCnt); - //console.log(this.grid.params); + console.log(this.grid.params); this.$refs.table.search(this.grid.params, isKeep); this.sendStoreData(); }, @@ -351,9 +365,10 @@ export default { setPeriodDay(day) { this.periodDay = day; this.endDate = new Date(); - this.startDate = moment(this.endDate) - .subtract(day, 'day') - .toDate(); + // this.startDate = moment(this.endDate) + // .subtract(day, 'day') + // .toDate(); + this.initSetStartDate(); this.closeDate('start'); this.closeDate('end'); @@ -394,6 +409,12 @@ export default { return moment(date).format('YYYY-MM-DD'); } }, + initSetStartDate(){ + let setYear = Number(moment(new Date()).format('YYYY')); + let initStartDate = new Date(setYear, 0, 1); + this.startDate = initStartDate; + console.log(moment(this.startDate).format('YYYY-MM-DD')); + }, }, }; \ No newline at end of file diff --git a/frontend/src/modules/login/store/index.js b/frontend/src/modules/login/store/index.js index e9c9f0b..5bcf33c 100644 --- a/frontend/src/modules/login/store/index.js +++ b/frontend/src/modules/login/store/index.js @@ -3,6 +3,8 @@ const state = { isLogin: false, isErrorPage: false, isAuthChk: false, + userId:null, + userNm:null, pwd: null }; @@ -11,6 +13,8 @@ const getters = { isLogin: state => state.isLogin, isErrorPage: state => state.isErrorPage, isAuthChk: state => state.isAuthChk, + userId: state => state.userId, + userNm: state => state.userNm, getPwd: state => state.pwd, }; @@ -38,6 +42,12 @@ const mutations = { savePwd: (state, value) => { state.pwd = value; }, + userId: (state, value) => { + state.userId = value; + }, + userNm: (state, value) => { + state.userNm = value; + } }; const actions = { diff --git a/frontend/src/modules/login/views/LoginAuth.vue b/frontend/src/modules/login/views/LoginAuth.vue index 921b57d..2696801 100644 --- a/frontend/src/modules/login/views/LoginAuth.vue +++ b/frontend/src/modules/login/views/LoginAuth.vue @@ -65,7 +65,8 @@ export default { confirmNum: '', userId: '', isAuthNum: false, - isLogin: true, + isLogin: false, + isAuth: false, pwd: '', text: '', number: '', @@ -79,15 +80,15 @@ export default { ,commonModal }, created() { - if(!!tokenSvc.getToken()){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); - this.$router.push({ path: '/' }); - }else{ - if(!this.getLogin){ - this.$router.push({ path: '/login' }); - } - } + // if(!!tokenSvc.getToken()){ + // this.$store.commit("login/isLogin", true); + // this.$store.commit("login/isAuthChk", true); + // this.$router.push({ path: '/' }); + // }else{ + // if(!this.getLogin){ + // this.$router.push({ path: '/login' }); + // } + // } }, mounted() { if (localStorage.hubwebUserId) { @@ -116,6 +117,13 @@ export default { if(data != null && data != ''){ this.pwd = data; } + }, + getAuthChk(data){ + if (data != null && data != '' && data == true) { + this.isAuth = true; + } else { + this.isAuth = false; + } } }, destroyed() { @@ -216,11 +224,13 @@ export default { try { const response = await api.confirmNum(params) const rsp = response.data; - console.log("RESULT_CODE : "+rsp.retCode); + console.log("LOGIN ßRESUßLT_CODE : "+rsp.retCode); + console.log(rsp); if(rsp.retCode == '0000'){ vm.$store.commit("login/isLogin", true); - //var nextUrl = rsp.data.nextUrl; - //vm.$router.push({ path: nextUrl}); + vm.$store.commit("login/isAuthChk", true); + vm.$store.commit("login/userId", rsp.data.userId) + vm.$store.commit("login/userNm", rsp.data.userNm) vm.$router.push({ path: '/'}); }else if (rsp.retCode == '4008'){ this.row.title = '휴대폰번호 확인'; diff --git a/frontend/src/modules/login/views/LoginMain.vue b/frontend/src/modules/login/views/LoginMain.vue index a380522..f54611a 100644 --- a/frontend/src/modules/login/views/LoginMain.vue +++ b/frontend/src/modules/login/views/LoginMain.vue @@ -1,5 +1,4 @@ \ No newline at end of file diff --git a/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue b/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue index b198637..68d2f00 100644 --- a/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue +++ b/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue @@ -20,13 +20,18 @@ 발송타입
    - + + @@ -36,9 +41,9 @@ 차단사유 -
    +
    @@ -47,7 +52,7 @@ 메모 - + @@ -80,11 +85,12 @@ export default { rsnType: [], tpType: [], blckSndrno: '', - sndblckTpCd: '', - blckRsnCd: '', + sndblckTpCd: '01', + blckRsnCd: '01', meno: '', code:"", - + LINE_FEED : 10, // '\n', + maxByte: 2000, // params: { // 'blckSndrno' : '' // ,'sndblckTpCd' : '01' @@ -94,13 +100,16 @@ export default { } }, create(){ - // this.setCodeDate(); + this.setCodeDate(); this.formReset(); }, - components: { - commonModal, - ValidationConfirmPopup -}, + mounted(){ + //this.sndblckTpCd = '01' + }, + components: { + commonModal, + ValidationConfirmPopup + }, methods :{ //모달 띄우기 ModalOpen(){ @@ -124,12 +133,19 @@ export default { }, // 저장 후 부모창 호출 - toComplete(){z + toComplete(){ this.$parent.$refs.table.reloadData(); this.ModalClose(); }, async doInsert(){ // if(this.doValidate() && this.regisConfirm()){ + this.row.blckSndrno = this.blckSndrno; + this.row.sndblckTpCd = this.sndblckTpCd; + this.row.blckRsnCd = this.blckRsnCd; + this.row.meno = this.meno; + this.regId = 'admin'; + console.log(this.row); + try { const response = await riskMgtApi.insertIntrcp(this.row); const result = response.data; @@ -137,8 +153,8 @@ export default { this.row.title = '발신번호 차단'; this.row.msg1 = '성공 하였습니다.'; this.$parent.alertInsert(this.row); - this.toComplete(); } + this.toComplete(); } catch(err) { console.log(err); this.row.title = '발신번호 차단'; @@ -188,7 +204,45 @@ export default { if(this.doValidate()){ this.$refs.ValidationConfirmPopup.confirmInsertOpen(); } - }, + }, + // 바이트길이 구하기 + getByteLength: function (decimal) { + return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1 + }, + + getByte: function (str) { + return str + .split('') + .map((s) => s.charCodeAt(0)) + .reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0) + }, + getLimitedByteText: function (inputText, maxByte) { + const characters = inputText.split('') + let validText = '' + let totalByte = 0 + + for (let i = 0; i < characters.length; i += 1) { + const character = characters[i] + const decimal = character.charCodeAt(0) + const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기 + + // 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면 + if (totalByte + byte <= maxByte) { + totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함 + validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함 + } else { // 최대 바이트 길이를 넘으면 + break // for 루프 종료 + } + } + + return validText + }, + + memoLimitByte() { + this.meno = this.getLimitedByteText(this.meno, this.maxByte); + + }, //END 바이트길이 구하기 + }, } diff --git a/frontend/src/modules/riskMgt/components/InsertMsgPop.vue b/frontend/src/modules/riskMgt/components/InsertMsgPop.vue index 8f56a6d..764e323 100644 --- a/frontend/src/modules/riskMgt/components/InsertMsgPop.vue +++ b/frontend/src/modules/riskMgt/components/InsertMsgPop.vue @@ -14,7 +14,7 @@ 차단문구 - + @@ -43,9 +43,8 @@
    @@ -54,7 +53,7 @@ 메모 - + @@ -94,9 +93,9 @@ export default { word: '', // 차단문구 blckSndrno:'', sndblckTpCd:'', - blckRsnCd: '', // 차단사유 + blckRsnCd: '01', // 차단사유 blckYn:'', - blckContCd:'', //차단 조건 + blckContCd:'01', //차단 조건 chgDt:'', regId: '', regDt: '', @@ -216,9 +215,10 @@ export default { if(this.doValidate()){ this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen(); } - }, + } + +} - }, } \ No newline at end of file diff --git a/frontend/src/modules/riskMgt/components/IntrcpDetailPopup.vue b/frontend/src/modules/riskMgt/components/IntrcpDetailPopup.vue index 3709e54..8d1e46c 100644 --- a/frontend/src/modules/riskMgt/components/IntrcpDetailPopup.vue +++ b/frontend/src/modules/riskMgt/components/IntrcpDetailPopup.vue @@ -43,14 +43,14 @@ 메모 - + 차단여부 - + - + @@ -87,11 +87,17 @@ export default { blckRsnCd:'', regId: '', meno: '', + LINE_FEED : 10, // '\n', + maxByte: 2000, } }, components: { ValidationConfirmPopup }, + created(){ + this.setCodeDate(); + // this.formReset(); + }, methods :{ // 모달 띄우기 async IntrcpDetailModalOpen(props){ @@ -161,6 +167,7 @@ export default { try { const response = await riskMgtApi.updateIntrcp(this.row); const result = response.data; + console.log(result); if (result != null && result.retCode == "0000") { this.row.title = '발신번호 차단'; this.row.msg1 = '수정 하였습니다.'; @@ -209,6 +216,48 @@ export default { this.$refs.ValidationConfirmPopup.confirmDeleteOpen(); } }, + // formReset(){ + // var type= this.insertType; + // Object.assign(this.$data, this.$options.data()); + // this.insertType = type; + // }, + // 바이트길이 구하기 + getByteLength: function (decimal) { + return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1 + }, + + getByte: function (str) { + return str + .split('') + .map((s) => s.charCodeAt(0)) + .reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0) + }, + getLimitedByteText: function (inputText, maxByte) { + const characters = inputText.split('') + let validText = '' + let totalByte = 0 + + for (let i = 0; i < characters.length; i += 1) { + const character = characters[i] + const decimal = character.charCodeAt(0) + const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기 + + // 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면 + if (totalByte + byte <= maxByte) { + totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함 + validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함 + } else { // 최대 바이트 길이를 넘으면 + break // for 루프 종료 + } + } + + return validText + }, + + memoLimitByte() { + this.meno = this.getLimitedByteText(this.meno, this.maxByte); + + }, //END 바이트길이 구하기 diff --git a/frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue b/frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue index b6bb60c..ed1db11 100644 --- a/frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue +++ b/frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue @@ -14,7 +14,7 @@ 차단문구 - + @@ -31,10 +31,10 @@ 조건 - - - - + + + + @@ -59,9 +59,9 @@ 차단여부 - + - + @@ -83,7 +83,9 @@ import api from '@/service/api'; import riskMgtApi from '../service/riskMgtApi'; import ValidationConfirmPopup from './ValidationConfirmPopup.vue'; +import { utils_mixin, chkPattern2 } from '../service/mixins'; export default { + mixins: [utils_mixin, chkPattern2], data(){ return{ @@ -140,6 +142,7 @@ export default { try { const response = await riskMgtApi.msgIntrcpDetail(this.row); const result = response.data; + console.log('----------------'); console.log(result); if (result != null && result.retCode == "0000") { this.blckContCd = result.data.blckContCd; @@ -154,6 +157,7 @@ export default { } catch(err) { alert("실패 하였습니다."); } + console.log(this.blckContCd); console.log('-----------') console.log(this.row) var dimmed = document.getElementsByClassName('modal58'); @@ -191,12 +195,19 @@ export default { }, //신규등록 팝업에서 문구 추가 버튼 doAdd: function() { + if(this.isNull(this.word)){ + this.row.title = '메세지 차단'; + this.row.msg1 = '문구를 입력해주세요.'; + this.$parent.msgAlertModalOpen(this.row); + this.$refs._word.focus(); + return false; + } if(this.msgBlckwordList.length < 10){ this.msgBlckwordList.push({ //seqNo: '', word: this.word }); - + this.word = ''; } }, //신규등록 팝업에서 문구 삭제 버튼 @@ -239,14 +250,14 @@ export default { const result = response.data; if (result != null && result.retCode == "0000") { this.row.title = '메세지 차단'; - this.row.msg1 = '수정 하였습니다.'; - this.$parent.msgAlertModalOpen(this.row); + this.row.msg1 = '수정 하였습니다.'; + this.$parent.msgAlertModalOpen(this.row); } this.toComplete(); } catch(err) { - this.row.title = '메세지 차단'; - this.row.msg1 = '실패 하였습니다.'; - this.$parent.msgAlertModalOpen(this.row); + this.row.title = '메세지 차단'; + this.row.msg1 = '실패 하였습니다.'; + this.$parent.msgAlertModalOpen(this.row); } // } }, diff --git a/frontend/src/modules/riskMgt/views/All.vue b/frontend/src/modules/riskMgt/views/All.vue index 8e97d2e..a5be9cd 100644 --- a/frontend/src/modules/riskMgt/views/All.vue +++ b/frontend/src/modules/riskMgt/views/All.vue @@ -52,11 +52,11 @@
    - +
    - +
    @@ -74,12 +74,10 @@
    -
    {{ totalItems }} 건 +
    {{ totalItems }}
    - +
    @@ -108,6 +106,7 @@ import customGrid from '@/components/CustomGrid'; import moment from 'moment'; import commonModal from "@/components/modal/commonModal"; +import { utils_mixin, chkPattern2 } from '../service/mixins'; //import api from '../service/api'; class CustomATagRenderer { @@ -133,22 +132,29 @@ class CustomATagRenderer { } export default { name: 'intrcpList', + mixins: [utils_mixin, chkPattern2], data() { return { totalItems: 0, + perPageCnt: 50, // 달력 데이터 ko: vdp_translation_ko.js, periodDay: 7, sDateDiv: 'day', startDate: new Date(), endDate: new Date(), - + options: [ + { text: '20', value: 20}, + { text: '50', value: 50}, + { text: '100', value: 100} + ], statType: [], userType: [], row:{}, grid: { url: '/api/v1/bo/riskMgt/web/intrcpList', perPage: 20, + pagePerRows: 20, pagination: true, isCheckbox: false, initialRequest: false, @@ -168,20 +174,20 @@ export default { ], columns: [ - { name: 'no', header: 'NO', align: 'center', width: 60 }, - { name: 'blckTpCd', header: '차단구분', align: 'center', width: 160 }, - { name: 'userId', header: '발송ID', align: 'center', width: 100}, - { name: 'sndrno', header: '발신번호', align: 'center', width: 130}, - { name: 'custNm', header: '고객사명', align: 'center', width: 130, renderer: { + { name: 'no', header: 'NO', align: 'center', width: '5%' }, + { name: 'blckTpCd', header: '차단구분', align: 'center', width: '11%' }, + { name: 'userId', header: '발송ID', align: 'center', width: '11%'}, + { name: 'sndrno', header: '발신번호', align: 'center', width: '11%'}, + { name: 'custNm', header: '고객사명', align: 'center', width: '11%', renderer: { type: CustomATagRenderer , options: { callback: this.custDetail, } }}, - { name: 'bizrno', header: '사업자번호', align: 'center', width: 90}, - { name: 'rcvno', header: '수신번호', align: 'center', width: 90 }, - { name: 'blckRsnCd', header: '차단사유', align: 'center', width: 90 }, - { name: 'blckDt', header: '발송일자', align: 'center', width: 90 }, + { name: 'bizrno', header: '사업자번호', align: 'center', width: '11%'}, + { name: 'rcvno', header: '수신번호', align: 'center', width: '11%' }, + { name: 'blckRsnCd', header: '차단사유', align: 'center', width: '7%' }, + { name: 'blckDt', header: '발송일자', align: 'center', width: '11%' }, ], noDataStr: '검색 결과가 없습니다.', @@ -220,8 +226,6 @@ export default { }); }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); const getCondition = this.$store.getters['searchcondition/getSearchCondition']; this.setPeriodDay(0); }, @@ -241,6 +245,11 @@ export default { methods: { search: function(isKeep) { console.log(this.grid.params); + this.grid.params.blckDt = moment(this.startDate).format('YYYYMMDD'); + this.grid.params.blckRsnCd = this.grid.params.searchType1; + this.grid.params.blckTpCd = this.grid.params.searchText1; + this.grid.params.sndrno = this.grid.params.searchText2; + this.grid.params.custNm = this.grid.params.searchText3; this.$refs.table.search(this.grid.params, isKeep); this.sendStoreData(); }, diff --git a/frontend/src/modules/riskMgt/views/IntrcpList.vue b/frontend/src/modules/riskMgt/views/IntrcpList.vue index 632f4a6..5fc91d2 100644 --- a/frontend/src/modules/riskMgt/views/IntrcpList.vue +++ b/frontend/src/modules/riskMgt/views/IntrcpList.vue @@ -11,7 +11,7 @@
    - +
    @@ -93,6 +93,7 @@ import api from '@/service/api.js'; import intrcpDetailPopup from '../components/IntrcpDetailPopup'; import insertIntrcpPop from '../components/InsertIntrcpPop'; import commonModal from "@/components/modal/commonModal"; +import { utils_mixin, chkPattern2 } from '../service/mixins'; //import api from '../service/api'; class CustomATagRenderer { @@ -112,6 +113,7 @@ class CustomATagRenderer { addEvent(selEl) { selEl.addEventListener("click", () => { const { callback } = this.props["cgrido" + this.props.colName].options; + console.log(this.props); callback(this.props); }); } @@ -119,6 +121,7 @@ class CustomATagRenderer { export default { name: 'intrcpList', + mixins: [utils_mixin, chkPattern2], data() { return { totalItems: 0, @@ -149,21 +152,25 @@ export default { ], columns: [ - { name: 'no', header: 'NO', align: 'center', width: 50 }, - { name: 'blcksndrno', header: '발신번호', align: 'center', width: 160, + { name: 'no', header: 'NO', align: 'center', width: '5%' }, + { name: 'blcksndrno', header: '발신번호', align: 'center', width: '25%', renderer: { type: CustomATagRenderer, options: { callback: this.inDetailPop} } }, - { name: 'blckYn', header: '차단여부', align: 'center', width: 100}, - { name: 'sndblckTpCd', header: '발송타입', align: 'center', width: 100}, - { name: 'lastChgDt', header: '최근수정일', align: 'center', width: 100}, - { name: 'blckRsnCd', header: '차단사유', width: 100, cls: 'td_line' }, - { name: 'regId', header: '등록자', width: 150 } + { name: 'blckYn', header: '차단여부', align: 'center', width: '15%'}, + { name: 'sndblckTpCd', header: '발송타입', align: 'center', width: '15%', hidden: true}, + { name: 'sndblckTpNm', header: '발송타입', align: 'center', width: '15%'}, + { name: 'lastChgDt', header: '최근수정일', align: 'center', width: '15%'}, + { name: 'blckRsnCd', header: '차단사유', width: '15%', cls: 'td_line', hidden: true }, + { name: 'blckRsnNm', header: '차단사유', width: '15%', cls: 'td_line' }, + { name: 'regId', header: '등록자', width: '15%' } ], noDataStr: '검색 결과가 없습니다.', params: { regId: '', blckRsnCd: '', + blckRsnNm: '', blckYn: '', sndblckTpCd: '', + sndblckTpNm: '', blcksndrno: '' }, excelHeader: [] @@ -180,8 +187,6 @@ export default { }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); this.setCodeData(); // this.formReset(); }, @@ -229,11 +234,17 @@ export default { api.commCode({'grpCd' : 'SVCUSER_TP_CD'}).then(response => { this.userType = response.data.data.list; }); + //발송타입 + api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => { + this.tpType = response.data.data.list; + }); }, ModalOpen: function(){ this.$refs.insertIntrcpPop.ModalOpen(); }, inDetailPop(props) { + console.log('======'); + console.log(props); this.$refs.intrcpDetailPopup.IntrcpDetailModalOpen(props); }, // formReset(){ diff --git a/frontend/src/modules/riskMgt/views/Msg.vue b/frontend/src/modules/riskMgt/views/Msg.vue index 0c3611d..7368e08 100644 --- a/frontend/src/modules/riskMgt/views/Msg.vue +++ b/frontend/src/modules/riskMgt/views/Msg.vue @@ -10,7 +10,7 @@
    - +
    @@ -70,7 +70,7 @@ import customGrid from '@/components/CustomGrid'; import InsertMsgPop from '../components/InsertMsgPop'; import IntrcpMsgDetail from '../components/IntrcpMsgDetail'; import commonModal from "@/components/modal/commonModal"; -undefined +import { utils_mixin, chkPattern2 } from '../service/mixins'; //import api from '../service/api'; class CustomATagRenderer { constructor(props) { @@ -95,6 +95,7 @@ class CustomATagRenderer { } export default { name: 'intrcpList', + mixins: [utils_mixin, chkPattern2], data() { return { totalItems: 0, @@ -127,21 +128,22 @@ export default { ], columns: [ - { name: 'no', header: 'NO', align: 'center', width: 60 }, - { name: 'seqNo', header: '일련번호', align: 'center', width: 60, hidden: true}, - { name: 'word', header: '차단메시지', align: 'center', width: 160, + { name: 'no', header: 'NO', align: 'center', width: '5%' }, + { name: 'seqNo', header: '일련번호', align: 'center', width: '19%', hidden: true}, + { name: 'word', header: '차단메시지', align: 'center', width: '19%', renderer: {type: CustomATagRenderer, options: { callback: this.msgDetailPop}} }, - { name: 'blckYn', header: '차단여부', align: 'center', width: 130}, - { name: 'lastChgDt', header: '마지막 수정일', align: 'center', width: 130}, - { name: 'blckRsnCd', header: '차단사유', align: 'center', width: 130}, - { name: 'regId', header: '등록자', width: 90, cls: 'td_line' } + { name: 'blckYn', header: '차단여부', align: 'center', width: '19%'}, + { name: 'lastChgDt', header: '마지막 수정일', align: 'center', width: '19%'}, + { name: 'blckRsnCd', header: '차단사유', align: 'center', width: '19%'}, + { name: 'regId', header: '등록자', width: '19%', cls: 'td_line' } ], noDataStr: '검색 결과가 없습니다.', params: { regId: '', blckRsnCd: '', word: '', - seqNo: '' + seqNo: '', + blckYn: '', }, excelHeader: [] } @@ -157,8 +159,6 @@ export default { }, created(){ - this.$store.commit("login/isLogin", true); - this.$store.commit("login/isAuthChk", true); const getCondition = this.$store.getters['searchcondition/getSearchCondition']; }, mounted() { diff --git a/frontend/src/modules/riskMgt/views/ZezNum.vue b/frontend/src/modules/riskMgt/views/ZezNum.vue index 9d8a29f..8e6a0be 100644 --- a/frontend/src/modules/riskMgt/views/ZezNum.vue +++ b/frontend/src/modules/riskMgt/views/ZezNum.vue @@ -11,15 +11,15 @@
    - +
    - +
    - - + +
    @@ -57,6 +57,7 @@