mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 08:06:38 +09:00
로그인 관련 / 메뉴 링크 추가 / 홈페이지 로그인 적용
This commit is contained in:
@@ -20,13 +20,18 @@
|
||||
<th>발송타입</th>
|
||||
<td v-if="code === null || code === ''">
|
||||
<div v:class="select_box">
|
||||
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd">
|
||||
<option v-for="(option, i) in tpType"
|
||||
:value="sndblckTpCd"
|
||||
v-bind:key="i"
|
||||
>
|
||||
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd" @keyup.enter="search">
|
||||
<option v-for="(option, i) in tpType" :value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
<!--
|
||||
<option v-for="(option, i) in tpType"
|
||||
:v-bind:value="option.grpCd"
|
||||
v-bind:key="i"
|
||||
:selected="code === option.grpCd"
|
||||
>
|
||||
{{ option.codeNm }}
|
||||
</option> -->
|
||||
<!-- <option value="">문자</option>
|
||||
<option value="">RCS</option> -->
|
||||
</select>
|
||||
@@ -36,9 +41,9 @@
|
||||
<tr>
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div>
|
||||
<div>
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType" :value="blckRsnCd" v-bind:key="i">
|
||||
<option v-for="(option, i) in rsnType" :value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
@@ -47,7 +52,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메모</th>
|
||||
<td class="sender"><textarea class="memo_text" v-model.trim="meno" ref="meno"></textarea></td>
|
||||
<td class="sender"><textarea class="memo_text" v-model.trim="meno" ref="meno" @input="memoLimitByte()"></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -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 바이트길이 구하기
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user