<template>
  <div class="leakage-cable">
    <el-button-group>
      <el-button
        v-for="item in tabs"
        :key="item.key"
        :type="activeName === item.key ? 'primary' : ''"
        @click="changeType(item)"
        >{{ item.label }}</el-button
      >
    </el-button-group>

    <railWayTable v-if="activeName == '0'"></railWayTable>
    <stationTable v-if="activeName == '1'"></stationTable>
    <fsuTable v-if="activeName == '2'"></fsuTable>
    <monitorTable v-if="activeName == '3'"></monitorTable>
    <leakyTable v-if="activeName == '4'"></leakyTable>
  </div>
</template>

<script>
import railWayTable from "./comp/railWayTable.vue";
import stationTable from "./comp/stationTable.vue";
import fsuTable from "./comp/fsuTable.vue";
import monitorTable from "./comp/monitorTable.vue";
import leakyTable from "./comp/leakyTable.vue";
import Pagination from "@/components/Pagination";
import {
  railWaylist,
  railWaybatchDelete,
  railWaydetail,
  sitelist,
} from "../api";
export default {
  components: { Pagination, railWayTable, stationTable,fsuTable,monitorTable,leakyTable },
  data() {
    return {
      params: {
        pageNum: 1,
        pageSize: 10,
      },
      total: 10,
      activeName: "0",
      tabs: [
        {
          label: "铁路线",
          key: "0",
        },
        {
          label: "站点",
          key: "1",
        },
        {
          label: "FSU",
          key: "2",
        },
        {
          label: "监测设备",
          key: "3",
        },
        {
          label: "漏缆",
          key: "4",
        },
        {
          label: "天馈线",
          key: "5",
        },
      ],
      tableData2: [],
      tableData: [
       
      ],
      multipleSelection: [],
      ids: [],
    };
  },
  methods: {
    tableRowClassName({ row, rowIndex }) {
      return rowIndex % 2 === 0 ? "" : "single-row";
    },
    changeType(item) {
      this.activeName = item.key;
    },
   
    refresh() {},
    query() {},
    exportData() {},
 

   
   
  },
  mounted() {
  
  },
};
</script>

<style lang="scss" scoped>
.leakage-cable {
  .leakage-top {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }
  & ::v-deep .cell {
    color: #333333;
  }
  & ::v-deep .stripe {
    background-color: #eaf1fe;
  }
  & ::v-deep .red {
    background-color: #f00;
  }
  & ::v-deep .green {
    background-color: green;
  }
  .page {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    .pageNum {
      margin: 0 20px;
    }
  }
}
</style>
<style lang="scss">
.statistics-table {
  .single-row {
    background: #f1f6ff;
  }
  td {
    padding: 5px !important;
  }
}
</style>