<table class="table table-striped table-md table-hover" id="table">
    <thead>
    <tr>
        <th>
            序号
        </th>
        <th>
            货主
        </th>
        <th>
            规则名称
        </th>
        <th>
            设备类型
        </th>
        <th>
            波次类型
        </th>
        <th>
            操作
        </th>
    </tr>
    <template v-if="stationRuleBatches.length > 0">
        <tr v-for="(stationRuleBatch,i) in stationRuleBatches" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
            <td>
                @{{ i+1 }}
            </td>
            <td>
                @{{ stationRuleBatch.owner ? stationRuleBatch.owner.name : '' }}
            </td>
            <td>
                @{{ stationRuleBatch.name }}
            </td>
            <td>
                @{{ stationRuleBatch.station_type ? stationRuleBatch.station_type.name  : ''}}
            </td>
            <td>
                @{{ stationRuleBatch.batch_type ? stationRuleBatch.batch_type :'无'}}
            </td>
            <td>
                @can('站管理-站规则-编辑')<button class="btn btn-sm btn-outline-primary" @click="editStationRuleBatch(stationRuleBatch,i)">编辑</button>@endcan
                @can('站管理-站规则-删除')<button class="btn btn-sm btn-outline-danger" @click="deleteStationRuleBatch(stationRuleBatch,i)">删除</button>@endcan
            </td>
        </tr>
    </template>
    </thead>
</table>
