<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
    <el-table v-if="isDisplay === true"
        :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
        @sort-change="onSortChange($event)"  
        :border="isDragendCol"
        :highlight-current-row ="isSingleSelect"
        :row-class-name="getRowClassName.bind(_self)"
        :cell-class-name="getCellClassName.bind(_self)"
        size="mini"
        stripe
        @row-click="rowClick($event)"  
        @select-all="selectAll($event)"  
        @select="select($event)"  
        @row-class-name="onRowClassName($event)"  
        @row-dblclick="rowDBLClick($event)"  
        ref='multipleTable' :data="items" :show-header="!isHideHeader">
            <template slot="empty">
                无数据 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('relationship')">
                <el-table-column show-overflow-tooltip :prop="'relationship'" :label="$t('entities.hrfamily.main_grid.columns.relationship')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.relationship')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.relationship}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('hrfamilyname')">
                <el-table-column show-overflow-tooltip :prop="'hrfamilyname'" :label="$t('entities.hrfamily.main_grid.columns.hrfamilyname')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.hrfamilyname')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.hrfamilyname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('sex')">
                <el-table-column show-overflow-tooltip :prop="'sex'" :label="$t('entities.hrfamily.main_grid.columns.sex')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.sex')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.sex" tag='CL_HR_0010' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('certtype')">
                <el-table-column show-overflow-tooltip :prop="'certtype'" :label="$t('entities.hrfamily.main_grid.columns.certtype')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.certtype')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.certtype" tag='CL_HR_0009' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('certnum')">
                <el-table-column show-overflow-tooltip :prop="'certnum'" :label="$t('entities.hrfamily.main_grid.columns.certnum')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.certnum')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.certnum}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('birthday')">
                <el-table-column show-overflow-tooltip :prop="'birthday'" :label="$t('entities.hrfamily.main_grid.columns.birthday')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.birthday')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <app-format-data format="YYYY-MM-DD" :data="row.birthday"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('age')">
                <el-table-column show-overflow-tooltip :prop="'age'" :label="$t('entities.hrfamily.main_grid.columns.age')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.age')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.age}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('workorganization')">
                <el-table-column show-overflow-tooltip :prop="'workorganization'" :label="$t('entities.hrfamily.main_grid.columns.workorganization')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.workorganization')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.workorganization}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('duty')">
                <el-table-column show-overflow-tooltip :prop="'duty'" :label="$t('entities.hrfamily.main_grid.columns.duty')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.duty')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.duty}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('political')">
                <el-table-column show-overflow-tooltip :prop="'political'" :label="$t('entities.hrfamily.main_grid.columns.political')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.political')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.political" tag='CL_HR_0013' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('emergencyflag')">
                <el-table-column show-overflow-tooltip :prop="'emergencyflag'" :label="$t('entities.hrfamily.main_grid.columns.emergencyflag')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hrfamily.main_grid.columns.emergencyflag')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.emergencyflag" tag='YesNo' codelistType='STATIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
    </el-table>
    <row class='grid-pagination' v-show="items.length > 0">
        <page class='pull-right' @on-change="pageOnChange($event)" 
            @on-page-size-change="onPageSizeChange($event)"
            :transfer="true" :total="totalRecord"
            show-sizer :current="curPage" :page-size="limit"
            :page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
            <span>
                <span class="page-column">
                    <poptip transfer placement="top-start">
                        <i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
                        <div slot="content">
                            <template v-for="col in allColumns">
                                <div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
                            </template>
                        </div>
                    </poptip>
                </span>
                <span v-if="selections.length > 0" class="batch-toolbar">
                </span>
                <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
                <span>
                    {{$t('app.gridpage.show')}}&nbsp;
                    <span>
                        <template v-if="items.length === 1">
                        1
                        </template>
                        <template v-else>
                            <span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
                        </template>
                    </span>&nbsp;
                    {{$t('app.gridpage.records')}}，{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
                </span>
            </span>
        </page>
    </row>
  </i-form>
</div>