<template>
  <div style="padding: 0.2% 0.5%">
    <el-row>
      <el-col :span="8">
        <span style="font-weight: ; font-size: 14px">推送状态:</span>
        <el-select v-model="teriminal" placeholder="请选择推送状态">
          <el-option
            v-for="item in teriminaloption"
            :key="item.id"
            :label="item.name"
            :value="item.id"
          >
          </el-option>
        </el-select>
        <span style="font-weight: ; font-size: 14px">筛选数据:</span>
        <el-input
          v-model="input"
          style="width: 40%"
          placeholder="请输入要筛选的字段"
        ></el-input>
      </el-col>
      <el-col :span="16">
        <timepicker
          @querfromdata="querfromdata"
          :interval="interval"
          :falg="falg"
        ></timepicker>
      </el-col>
    </el-row>
    <el-row>
      <el-table
        stripe
        stripe
        :data="tableData"
        border
        style="width: 100%"
        highlight-current-row
        :height="height"
        :header-cell-style="{
          height: '25px',
          top: '0px',
          padding: '0px',
        }"
        :row-style="{ height: '25px' }"
        :cell-style="{ padding: '0px' }"
      >
        <el-table-column
          align="center"
          prop="xh"
          label="序号"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="zjsj"
          label="暂降时间"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="gdgs"
          label="供电公司"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="bdzmc"
          label="变电站名称"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="jcdmc"
          label="监测点名称"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="tzfz"
          label="特征幅值(%)"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="cssj"
          label="持续时间(s)"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="sctssj"
          label="首次推送时间"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="tscgsj"
          label="推送成功时间"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="tssbcs"
          label="推送失败次数"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="tsjg"
          label="推送结果"
          width="220"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="rgtssj"
          label="人工推送时间"
          width="220"
        ></el-table-column>
        <el-table-column align="center" fixed="right" label="操作" width="150">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.tsjg !== '成功'"
              type="primary"
              size="mini"
              >推送</el-button
            >
            <el-button
              v-if="scope.row.tsjg == '成功'"
              type="primary"
              disabled
              size="mini"
              >已推送</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        style="float: right"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageData.currentPage"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="pageData.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="pageData.total"
      >
      </el-pagination>
    </el-row>
  </div>
</template>
<script>
import { tableheight } from "@/assets/commjs/common";
import timepicker from "../../components/TimePicker/index4";
export default {
  components: {
    timepicker,
  },
  data() {
    return {
      height: "",
      tableData: [
        {
          xh: "1",
          zjsj: "2022-05-13 12:27:35",
          gdgs: "常熟市",
          bdzmc: "常熟民丰电镀_660...	",
          jcdmc: "118任南线",
          tzfz: "88",
          cssj: "0.427",
          sctssj: "2022-05-13 12:42:05",
          tscgsj: "2022-05-13 12:42:05",
          tssbcs: "/",
          tsjg: "成功",
          rgtssj: "/",
        },
        {
          xh: "2",
          zjsj: "2022-05-13 12:27:35",
          gdgs: "常熟市",
          bdzmc: "常熟民丰电镀_660...	",
          jcdmc: "118任南线",
          tzfz: "89",
          cssj: "0.78",
          sctssj: "2022-05-13 12:42:05",
          tscgsj: "2022-05-13 12:42:05",
          tssbcs: "/",
          tsjg: "不成功",
          rgtssj: "/",
        },
      ],
      //分页
      pageData: {
        currentPage: 1,
        pagesize: 100,
        total: 200,
      },
    };
  },
  created() {},
  mounted() {
    this.height = tableheight() + "px";
  },
  methods: {
    handleCurrentChange() {},
    handleCurrentChange() {},
  },
};
</script>