<template>
    <MainSlot ref="mainSlot">
        <template>
            <div class="info">
					<div class="count">사용자ID 정보
					<p>( 최대 100개까지 등록 가능 )</p>
					</div>
					<div class="button_group">
						<button type="button" class="button blue add">사용자 ID 생성</button>
						<button type="button" class="button blue add">사용자 ID 대량생성</button>
						<button type="button" class="button white del">삭제</button>
					</div>
					
				</div>

				<!-- <div class="table">     -->
					<custom-grid
						ref="table"
						:totalItems="'totalItems'"
						:url="grid.url"
						:pagePerRows="grid.pagePerRows"
						:initialRequest="grid.initialRequest"
						:pagination="grid.pagination"
						:isCheckbox="grid.isCheckbox"
						:columns="grid.columns"
						:noDataStr="grid.noDataStr"
						:addCls="grid.addCls"
						:header="grid.headder"        
					></custom-grid>
				<!-- </div> -->
            
        </template>
    </MainSlot>
</template>
<script>
import customGrid from "@/components/CustomGrid";
import MainSlot from '../views/MemberDetail';

export default {
	name: "memberDetailList",
    data() {
        return {
           grid: {
				url: '/api/v1/bo/custMgt/memberDetailList',
				pagePerRows: 20,
				pagination: true,           
				isCheckbox: true,        // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
				initialRequest: false,
				addCls: 'box_OFvis',

				columns: [          
					{ name: 'no', header: 'No', align: 'center', width: 60},
					{ name: 'userNm', header: '이름', align: 'center', width: 130},
					{ name: 'userType', header: '구분', align: 'center', width: 130},
					{ name: 'adminId', header: '관리자ID', align: 'center', width: 130, cls: 'td_line'},
					{ name: 'userId', header: 'ID', align: 'center', width: 130},
					{ name: 'regDt', header: '등록일', align: 'center', width: 130},
					{ name: 'userStat', header: '상태', align: 'center', width: 130}
				],
				noDataStr: '검색 결과가 없습니다.',
				params: {}    
			}    
        }
    },
    computed: {
 
    },
    created() {
		this.grid.params.searchText=this.$route.params.searchText;
    },
    mounted() {
		this.toPage('mounted')
    },
    components: {
        "customGrid": customGrid,
        MainSlot, 
    },
    methods:{
		toPage(lifeCycle){
            const page = this.isNull(this.$route.params.page) ?1:this.$route.params.page;
            try {
                this.$refs.table.movePage(page, true);
            }catch(error){
            }
        },
    }
};
</script>