<template>
  <div class="material-manage main-page">
    <el-col :span="18" class="h100">
      <module-one-2-3 label="近期工单" class="h66"> </module-one-2-3>

      <module-one-1-3 label="混凝土使用情况" class="h33"> </module-one-1-3>
    </el-col>

    <el-col :span="6" class="h100">
      <module-one-3-1 label="超耗情况" class="labor-base h100" style="height: cacl(100% - 20px)"></module-one-3-1>
    </el-col>
  </div>
</template>

<script>
import debounce from "lodash.debounce";
import request from "@/utils/request";
export default {
  data() {
    return {
      dpi: "",
      selProject: null,
    };
  },
  mounted() {
    this.$store.dispatch("ChangeNav", 802);
    this.$bus.$on(
      "projectChange",
      debounce((prj) => {
        this.selProject = prj;
        this.init();
      })
    );
    this.selProject = this.$store.getters.selProject;
    this.init();
    this.dpi = this.$dpi();
    window.addEventListener("resize", () => {
      if (this.dpi != this.$dpi()) {
        this.dpi = this.$dpi();
        this.resize();
      }
    });
    this.resize();
  },
  methods: {
    resize() {
      let is1K = this.$dpi() == "1K";
      let is2K = this.$dpi() == "2K";
      this.chartKey++;
    },
    init() {
      let url='//wzxh.crfeb.com.cn/MklBaseController/getService'
      request({
        url,
        method:"get",
        params:{
          userId:'8401',
          chinaKey:'135f90b1bdafccab494a937eaccdedac',
          service:'getProjectChaoHaoStatisticsRPTService',
          projectId:'547d4de15da511ee9ca5506b4b2ac6ae'
        }
      }).then(d=>{
        console.log("---->",d)
      })
    },
  },
};
</script>

<style lang="less">
.material-manage {
  .screen-module {
    &.h66 {
      height: calc(66% - 20px);
    }
    &.h100 {
      height: calc(100% - 20px);
    }
    &.h33 {
      height: calc(33% - 20px);
    }
  }
}
</style>
