<template>
  <div>
    <div>调度日志</div>
    <div class="search"></div>
    <div>
      <el-table
        :data="tableData"
        style="width: 100%"
        :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
      >
        <el-table-column label="任务ID" align="center" />
        <el-table-column prop="siteName" label="调度时间" align="center" />
        <el-table-column prop="alarmName" label="调度结果" align="center" />
        <el-table-column prop="alarmType" label="调度备注" align="center" />
        <el-table-column prop="alarmType" label="执行时间" align="center" />
        <el-table-column prop="alarmType" label="执行结果" align="center" />
        <el-table-column
          prop="alarmLevelName"
          label="执行备注"
          align="center"
        />
        <el-table-column label="操作" align="center" width="100">
          <template slot-scope="scope">
            <el-button type="text" @click="eliminate(scope.row)"
              >操作</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { joblogList } from "@/api/job.js";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.handleJoblogList();
  },
  methods: {
    async handleJoblogList() {
      let data = {
        jobGroup: 0,
        jobId: 0,
        logStatus: -1,
        filterTime: "2024-12-09 00:00:00 - 2025-01-09 23:59:59",
        start: 0,
        length: 10,
      };
      const queryParams = new URLSearchParams(data).toString();
      const res = await joblogList(queryParams);
      console.log(res);
      this.tableData = res;
    },
  },
};
</script>

<style lang="scss" scoped>
</style>