<template>
  <div>
    <div>
      <!-- <span>排查总数：</span> -->
      <div class="hidden-danger-detection_top">
        <!-- <div>按排查进度分：</div> -->
        <div class="hidden-danger-detection_top_inner">
          <span>排查总数</span>
          <hidden-danger-total :number="list.ypclds" label="" unit="栋" />
        </div>
        <div class="hidden-danger-detection_top_inner" @click="openModal(null)" style="cursor: pointer;">
          <span>发现隐患总数</span>
          <hidden-danger-total :number="allNum" label="" unit="栋/条" />
        </div>
        <div class="hidden-danger-detection_top_inner" @click="openModal(['已整改'])" style="cursor: pointer;">
          <span>已整改数</span>
          <hidden-danger-total :number="yzgsNum" label="" unit="栋/条"  />
        </div>
        <div class="hidden-danger-detection_top_inner" @click="openModal(['待计划', '待整改'])" style="cursor: pointer;">
          <span>未整改数</span>
          <hidden-danger-total :number="wzgsNum" label="" unit="栋/条" />
        </div>
      </div>
    </div>

    <!-- 一楼一策弹窗 -->
    <basic-modal top="120px" ref="yhModal" >
      <YhModalContent :default="params" />
      <YlycModalHeader slot="title" />
    </basic-modal>
  </div>
</template>

<script>
import HiddenDangerTotal from "@/components/HiddenDangerTotal.vue";
import YhModalContent from "../../../Detail/components/YhModalContent.vue";
export default {
  components: { HiddenDangerTotal, YhModalContent },
  props: {
    ScheduletList: Object,
    list: Object,
    pcdsNum: String,
    allNum: String,
    yzgsNum: String,
    wzgsNum: String,
    qy:String
  },
  data() {
    return {
      params: null,
    };
  },
  methods: {
    openModal(val) {
      if (val) {
        this.params = {
          qx:this.qy,
          zgjd: val,
        };
      } else {
        this.params = null;
      }

      this.showModal("yhModal");
    },
  },
};
</script>

<style lang="less" scoped>
.hidden-danger-detection_top {
  margin: 5px 4px;
  background-color: rgba(0, 213, 255, 0.12);
  padding: 8px;
  .hidden-danger-detection_top_inner {
    margin-top: 8px;
    text-align: center;
    span {
      display: inline-block;
      margin-bottom: 10px;
      margin-right: 60px;
    }
  }
}
</style>
