<template>  

	<div>
<!--	s: 팝업	-->
		<!-- 관리자명 조회 실패시 -->
		<div class="dimmed modal27" @click="searchIdFailModalClose();"></div>
    <div class="popup modal27">
      <div class="pop-head">
        <h3 class="pop-tit">관리자명 조회</h3>
      </div>
      <div class="pop-cont">
        <p>입력하신 마당 ID를 조회할 수 없습니다.</p>
      </div>
      <div class="popup-btn1">
        <button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
      </div>
    </div>
			
			<!-- 관리자 ID 조회 -->
		<div class="dimmed modal28" @click="searchIdModalCancelClose();"></div>
    <div class="popup modal28">
      <div class="pop-head">
        <h3 class="pop-tit">관리자 ID 조회</h3>
      </div>
      <div class="pop-cont">
        <p>선택하신 정보가 아래와 같습니다.</p>
        <p>유치자 정보를 수정하시겠습니까?</p>
      </div>
      <ul class="pop-cont-detail">
        <li>마당ID : {{madangId}}</li>
        <li>코드 : {{code}}</li>
        <li>이름 : {{name}}</li>
        <li>대리점명 : {{agencyNm}}</li>
      </ul>
      <div class="popup-btn2">
        <button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
        <button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
      </div>
    </div>
		</div>

			<!-- 시스템관리 팝업 끝-->
<!--	e: 팝업	-->
	
</template>

<script>
export default {
	data(){
        return{
	      authType: [],
		  madangId:'',
		  adminPw:'',
		  name:'',
		  mdn:'',
		  email:'',
		  auth:'',
          stat: '',
		  code: '',
		  userNm:"",
		  agencyNm:"",
        }
    },
	methods :{
		// 모달 띄우기(성공모달)
		searchIdModalOpen(target){
			var dimmed = document.getElementsByClassName('dimmed modal28');
			var wrap = document.getElementsByClassName('popup-wrap modal28');
			var obj = document.getElementsByClassName(target);
			dimmed[0].style.display = 'block';
			wrap[0].style.display = 'block';
			obj[0].style.display = 'block';
		},
		// 성공 모달 끄기(ok)
		searchIdModalOkClose(){
			var dimmed = document.getElementsByClassName('modal28');
			for(var i = 0; i < dimmed.length; i++){
				dimmed[i].style.display = 'none';
			}
			
			this.$parent.adminIdNmChangeOk();
		},
		// 성공 모달 끄기(cancel)
		searchIdModalCancelClose(){
			var dimmed = document.getElementsByClassName('modal28');
			for(var i = 0; i < dimmed.length; i++){
				dimmed[i].style.display = 'none';
			}
			this.$parent.resetRegPop();
		},
		// 모달 띄우기(실패모달)
		searchIdFailModalOpen(target){
			var dimmed = document.getElementsByClassName('dimmed modal27');
			var wrap = document.getElementsByClassName('popup-wrap modal27');
			var obj = document.getElementsByClassName(target);
			dimmed[0].style.display = 'block';
			wrap[0].style.display = 'block';
			obj[0].style.display = 'block';
		},
		// 실패 모달 끄기
		searchIdFailModalClose(){
			var dimmed = document.getElementsByClassName('modal27');
			for(var i = 0; i < dimmed.length; i++){
				dimmed[i].style.display = 'none';
			}
			this.$parent.resetRegPop();
		},
		searchIdPop(params){
			var userName = params.userNm;			
			this.madangId = params.madangId ;
			this.name = params.userNm;
			this.code = params.code;
			this.agencyNm = params.agencyNm;	
			
			var dimmed = document.getElementsByClassName('modal28');
			for(var i = 0; i < dimmed.length; i++){
				dimmed[i].style.display = 'block';
			}
		},
		searchIdFailPop(){			
			var dimmed = document.getElementsByClassName('modal27');
			for(var i = 0; i < dimmed.length; i++){
				dimmed[i].style.display = 'block';
			}
		},
	}
}
</script>