<script>
import {
  updateFangpaishuiPumpoperationrecordApi,
  deleteFangpaishuiPumpoperationrecordApi,
  findPumpoperationrecordByDetailApi,
  addFangpaishuiPumpoperationrecordApi,
  findFangpaishuiPumpoperationrecordByMonthApi,
} from "@@/apis/tables/drainageWorkshop/pumpOperationLog.ts";
import { getSpecificDate } from "@@/utils/datetime";
export default {
  data() {
    return {
      date: "",
      tableList: [],
      fillinTime: "2025年4月25日",
    };
  },
  created() {
    // 页面渲染之前执行，一般调用methods定义的方法
    this.getList();
  },
  methods: {
    //获取列表
    async getList() {
      const res = await findAllMiningglossApi();
      console.log(res);
    },
    //按月查询
    async getMouthLoss() {
      let data = getSpecificDate(this.date);
      const res = await findTotalMiningByMonthApi(data);
      console.log(res);
    },
  },
};
</script>

<template>
  <div class="app-container">
    <div
      style="margin-bottom: 20px; display: flex; justify-content: space-between"
    >
      <div>
        <el-date-picker v-model="date" type="month" placeholder="选择年月">
        </el-date-picker>
        <el-button
          type="primary"
          size="mini"
          style="margin-left: 20px"
          @click="getMouthLoss"
          >查询</el-button
        >
      </div>
      <div>
        <el-tag type="info" size="large" color="#Fff"
          ><span style="color: #000"
            >填报时间：{{ this.fillinTime }}</span
          ></el-tag
        >
      </div>
    </div>
    <el-table
      :data="tableList"
      border
      style="width: 100%"
      :header-align="center"
    >
      <el-table-column align="center" label="计划运矿量">
        <el-table-column align="center" label="车数"> </el-table-column>
        <el-table-column align="center" label="吨数"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="实际完成运矿量">
        <el-table-column align="center" label="东站">
          <el-table-column align="center" label="车数"> </el-table-column>
          <el-table-column align="center" label="吨数"> </el-table-column
        ></el-table-column>
        <el-table-column align="center" label="西站"
          ><el-table-column align="center" label="车数"> </el-table-column>
          <el-table-column align="center" label="吨数"> </el-table-column>
        </el-table-column>
        <el-table-column align="center" label="大厂卸车数">
          <el-table-column align="center" label="车数"> </el-table-column>
          <el-table-column align="center" label="吨数"> </el-table-column>
          <el-table-column align="center" label="列数"> </el-table-column>
          <el-table-column align="center" label="实际吨公里数">
          </el-table-column
        ></el-table-column>
      </el-table-column>
      <el-table-column align="center" label="完成计划（%）" />
      <el-table-column align="center" label="累计"
        ><el-table-column align="center" label="车数"> </el-table-column>
        <el-table-column align="center" label="吨数"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="实际作业台班"
        ><el-table-column align="center" label="个"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="作业率"
        ><el-table-column align="center" label="%"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="出车率"
        ><el-table-column align="center" label="%"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="电机车综合效率"
        ><el-table-column align="center" label="吨公里/吨台班">
        </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="电机车效率"
        ><el-table-column align="center" label="吨/台班"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="列车周转时间"
        ><el-table-column align="center" label="分钟"> </el-table-column>
      </el-table-column>
      <el-table-column align="center" label="装车质量"
        ><el-table-column align="center" label="吨/列"> </el-table-column>
      </el-table-column>
      <!-- 空数据时的显示 -->
      <template #empty>
        <div style="display: grid; place-items: center center">
          <el-empty :image-size="242" :description="暂无数据" />
        </div>
      </template>
    </el-table>
  </div>
</template>
