<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('employeecode')">
                <el-table-column show-overflow-tooltip :prop="'employeecode'" :label="$t('entities.hremployee.grid_001_grid.columns.employeecode')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.employeecode')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.employeecode}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('employeename')">
                <el-table-column show-overflow-tooltip :prop="'employeename'" :label="$t('entities.hremployee.grid_001_grid.columns.employeename')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.employeename')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.employeename}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('organizationname')">
                <el-table-column show-overflow-tooltip :prop="'organizationname'" :label="$t('entities.hremployee.grid_001_grid.columns.organizationname')" :width="250"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.organizationname')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.organizationname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('hrdutyname')">
                <el-table-column show-overflow-tooltip :prop="'hrdutyname'" :label="$t('entities.hremployee.grid_001_grid.columns.hrdutyname')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.hrdutyname')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.hrdutyname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('hrpostname')">
                <el-table-column show-overflow-tooltip :prop="'hrpostname'" :label="$t('entities.hremployee.grid_001_grid.columns.hrpostname')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.hrpostname')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.hrpostname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('certnum')">
                <el-table-column show-overflow-tooltip :prop="'certnum'" :label="$t('entities.hremployee.grid_001_grid.columns.certnum')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_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.hremployee.grid_001_grid.columns.birthday')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_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.hremployee.grid_001_grid.columns.age')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.age')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.age}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('mobile')">
                <el-table-column show-overflow-tooltip :prop="'mobile'" :label="$t('entities.hremployee.grid_001_grid.columns.mobile')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.mobile')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.mobile}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('email')">
                <el-table-column show-overflow-tooltip :prop="'email'" :label="$t('entities.hremployee.grid_001_grid.columns.email')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.email')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.email}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('empstate')">
                <el-table-column show-overflow-tooltip :prop="'empstate'" :label="$t('entities.hremployee.grid_001_grid.columns.empstate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.hremployee.grid_001_grid.columns.empstate')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.empstate" tag='CL_HR_0016' codelistType='DYNAMIC' ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('uagridcolumn1')">
                <el-table-column :column-key="'uagridcolumn1'" :label="$t('entities.hremployee.grid_001_grid.columns.uagridcolumn1')" :width="100"  :align="'center'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                          <i class='fa fa-pencil'></i>
                        {{$t('entities.hremployee.grid_001_grid.columns.uagridcolumn1')}}
                      </span>
                    </template>
                    <template slot-scope="scope">
                        <div style="text-align: center;">
                          <a v-show="scope.row.SignContract.visabled" :disabled="scope.row.SignContract.disabled" @click="uiAction(scope.row, 'SignContract', $event)" :title="$t('entities.hremployee.grid_001_grid.uiactions.hremployee_signcontract')">
                            <i class=''></i>
                            {{$t('entities.hremployee.grid_001_grid.uiactions.hremployee_signcontract')}}
                          </a>
                        </div>
                    </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>