<el-table ref="table"
          class="el-table-control el-table--scrollable-y"
          stripe
          border
          v-bind:data="listData"
          v-bind:row-key="onRowKey"
          v-bind:highlightCurrentRow="setting.selectRowMethod == 1"
          v-bind:span-method="onSpanMethod"
          v-on:sort-change="onSortChange"
          v-on:selection-change="onSelectionChange"
          v-on:select="(selection, row)=> onRowClick(row)"
          v-on:select-all="(selection)=> onRowClick()"
          v-on:row-click="onRowClick"
          v-on:current-change="setting.selectRowMethod == 1 && onCurrentChange"
          v-bind:class="{search:setting.isShowColumnSearch,group:setting.isGroupColumn}">
    <el-table-column v-if="setting.selectRowMethod == 2"
                     header-align="center"
                     type="selection"
                     width="40"
                     v-bind:reserve-selection="true">
    </el-table-column>
    <el-table-column v-else-if="setting.selectRowMethod == 1 && (showRadioColumn == null || showRadioColumn)"
                     header-align="center"
                     width="35"
                     label-class-name="el-radio-column"
                     class-name="el-radio-column">
        <template slot-scope="scope">
            <el-radio v-model="rowValue" v-bind:label="scope.row.id">
                &nbsp;
            </el-radio>
        </template>
    </el-table-column>
    <el-table-column v-if="setting.isShowSequenceColumn"
                     type="index"
                     header-align="center"
                     v-bind:index="onSequenceIndex"
                     label="序号"
                     width="60"
                     align="center">
    </el-table-column>
    <el-table-column v-if="setting.listOperateColumnControl && setting.listOperateColumnControl.length > 0"
                     header-align="center"
                     v-bind:label="setting.operateColumnName || '操作'"
                     v-bind:show-overflow-tooltip="setting.showTooltip"
                     v-bind:width="setting.operateColumnWidth || 80"
                     v-bind:label-class-name="setting.isShowColumnSearch ? 'el-table-operate-column-head' : ''">
        <div v-if="setting.isShowColumnSearch"
             class="el-table-column-search"
             v-bind:slot="setting.isShowColumnSearch ? 'header' : ''" slot-scope="scope">
        </div>
        <el-table-column v-if="setting.isShowColumnSearch"
                         header-align="center"
                         v-bind:label="setting.operateColumnName || '操作'"
                         v-bind:show-overflow-tooltip="setting.showTooltip"
                         v-bind:width="setting.operateColumnWidth || 80">
            <template slot-scope="scope">
                <el-form-control v-for="(operateColumn,index) in setting.listOperateColumnControl"
                                 v-if="!operateColumn.isHide || !javaScript.call(scope,operateColumn.isHide,scope,operateColumn)"
                                 class="inline"
                                 v-bind:key="index"
                                 v-bind:item="operateColumn"
                                 v-bind:scope="scope"
                                 v-bind:disabled="operateColumn.disabled != null && (operateColumn.disabled == true || javaScript.call(setting,operateColumn.disabled,scope,operateColumn))"
                                 v-model="scope.row[operateColumn.prop]"
                                 v-on:click="javaScript.call(scope,operateColumn.click,scope,operateColumn)"
                                 v-on:change="javaScript.call(scope,operateColumn.change,scope,operateColumn)">
                </el-form-control>
            </template>
        </el-table-column>
        <template slot-scope="scope">
            <el-form-control v-for="(operateColumn,index) in setting.listOperateColumnControl"
                             v-if="!operateColumn.isHide || !javaScript.call(scope,operateColumn.isHide,scope)"
                             class="inline"
                             v-bind:key="index"
                             v-bind:item="operateColumn"
                             v-bind:scope="scope"
                             v-bind:disabled="operateColumn.disabled != null && (operateColumn.disabled == true || javaScript.call(setting,operateColumn.disabled,scope,operateColumn))"
                             v-model="scope.row[operateColumn.prop]"
                             v-on:click="javaScript.call(scope,operateColumn.click,scope,operateColumn)"
                             v-on:change="javaScript.call(scope,operateColumn.change,scope,operateColumn)">
            </el-form-control>
        </template>
    </el-table-column>
    <template v-for="(column,index) in setting.listColumn">
        <el-table-column header-align="center"
                         v-bind:sortable="(!setting.isShowColumnSearch && (column.sortable == null || column.sortable) && (!column.listColumn || !column.listColumn.length)) ? 'custom' : false"
                         v-bind:prop="column.prop"
                         v-bind:show-overflow-tooltip="setting.showTooltip"
                         v-bind:label="column.name"
                         v-bind:key="index"
                         v-bind:width="column.width || ''"
                         v-bind:min-width="!column.width && ((column.name || ' ').length * 15 + 45)">
            <div v-if="setting.isShowColumnSearch"
                 class="el-table-column-search"
                 v-bind:slot="setting.isShowColumnSearch ? 'header' : ''" slot-scope="scope">
                <el-form-control v-bind:item="{type:'input',placeholder:''}"
                                 v-model="column.value">
                </el-form-control>
            </div>
            <el-table-column v-if="setting.isShowColumnSearch"
                             header-align="center"
                             v-bind:sortable="column.sortable == null || column.sortable ? 'custom' : false"
                             v-bind:prop="column.prop"
                             v-bind:show-overflow-tooltip="setting.showTooltip"
                             v-bind:label="column.name"
                             v-bind:key="index"
                             v-bind:width="column.width || ''"
                             v-bind:min-width="!column.width && ((column.name || ' ').length * 15 + 45)">
                <template slot-scope="scope">
                    <el-form-control v-model="scope.row[column.prop]"
                                     v-bind:item="column"
                                     v-bind:scope="scope"
                                     v-on:click="javaScript.call(scope,column.click,scope,column)"
                                     v-on:change="javaScript.call(scope,column.change,scope,column)">
                    </el-form-control>
                </template>
            </el-table-column>
            <el-table-column v-for="(column,index) in column.listColumn"
                             header-align="center"
                             v-bind:sortable="column.sortable == null || column.sortable ? 'custom' : false"
                             v-bind:prop="column.prop"
                             v-bind:show-overflow-tooltip="setting.showTooltip"
                             v-bind:label="column.name"
                             v-bind:key="index"
                             v-bind:width="column.width || ''"
                             v-bind:min-width="!column.width && ((column.name || ' ').length * 15 + 45)">
                <template slot-scope="scope">
                    <el-form-control v-model="scope.row[column.prop]"
                                     v-bind:item="column"
                                     v-bind:scope="scope"
                                     v-on:click="javaScript.call(scope,column.click,scope,column)"
                                     v-on:change="javaScript.call(scope,column.change,scope,column)">
                    </el-form-control>
                </template>
            </el-table-column>
            <template v-if="!column.listColumn || !column.listColumn.length" slot-scope="scope">
                <el-form-control v-model="scope.row[column.prop]"
                                 v-bind:item="column"
                                 v-bind:scope="scope"
                                 v-on:click="javaScript.call(scope,column.click,scope,column)"
                                 v-on:change="javaScript.call(scope,column.change,scope,column)">
                </el-form-control>
            </template>
        </el-table-column>
    </template>
</el-table>
</script>
<script src="@Url.Content("~/js/component/el-table-control.js")" type="text/javascript">