<!--
 * @Author: 纪泽龙 jizelong@qq.com
 * @Date: 2022-06-21 09:24:11
 * @LastEditors: 纪泽龙 jizelong@qq.com
 * @LastEditTime: 2022-06-24 17:38:50
 * @FilePath: /danger-manage-web/src/components/bigWindow/Danger.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="danger-wrapper">
    <div class="close" @click="close">
      <img src="@/assets/images/closeBtn.png" alt="" />
    </div>
    <div class="up pb10" :class="{noBroder:deviceData.colorNum>2}">
      <div class="tit fz16 pb10">风险辨识</div>
      <div class="one flex fz16">
        <div class="flex-item">
          <span class="left">风险类别:</span
          ><span v-unValue class="right">{{ deviceData.fxlb }}</span>
        </div>
        <div class="flex-item">
          <span class="left">辨识计划:</span
          ><span v-unValue class="right">{{ deviceData.bsjh }}</span>
        </div>
        <div class="flex-item">
          <span class="left">危险源:</span
          ><span v-unValue class="right">{{ deviceData.wxy }}</span>
        </div>
        <!-- <div class="flex-item">
          <span class="left">风险点:</span
          ><span v-unValue class="right">{{ deviceData.fxd }}</span>
        </div> -->
      </div>

      <div class="item">
        <span class="left">危险因素:</span
        ><span v-unValue class="right">{{ deviceData.wxys }}</span>
      </div>

      <div class="item">
        <span class="left">危害后果:</span
        ><span v-unValue class="right">{{ deviceData.fxlb }}</span>
      </div>

      <div class="one flex fz16">
        <div class="flex-item">
          <span class="left">事故类型:</span
          ><span v-unValue class="right">{{ deviceData.sglx }}</span>
        </div>
        <div class="flex-item">
          <span class="left">事故发生频率:</span
          ><span v-unValue class="right">{{ deviceData.sgfspl }}</span>
        </div>
        <div class="flex-item">
          <span class="left">管控层级:</span
          ><span v-unValue class="right">{{ deviceData.gkcj }}</span>
        </div>
        <div class="flex-item">
          <span class="left">管控部门:</span
          ><span v-unValue class="right">{{ deviceData.gkbm }}</span>
        </div>
        <div class="flex-item">
          <span class="left">管控责任岗位:</span
          ><span v-unValue class="right">{{ deviceData.gkzrgw }}</span>
        </div>
        <div class="flex-item">
          <span class="left">管控责任人:</span
          ><span v-unValue class="right">{{ deviceData.gkzrr }}</span>
        </div>
      </div>
    </div>

  <!-- deviceData.colorNum<3的风险区域没有下面这些东西 -->
    <div class="bottom pb10" v-if="deviceData.colorNum<3">
      <div class="tit fz16 pb10">采取的风险管控措施</div>
      <div class="item">
        <span class="left">管理:</span
        ><span v-unValue class="right">{{ deviceData.gl }}</span>
      </div>

      <div class="item">
        <span class="left">工程技术:</span
        ><span v-unValue class="right">{{ deviceData.gcjs }}</span>
      </div>
      <div class="item">
        <span class="left">警示标识:</span>
        <span v-unValue class="img"><img :src="deviceData.src" alt="" /></span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  mounted() {
    console.log(this.deviceData);
  },
  methods: {
    close() {
      //this.handleClose();
      this.mapClass.clearInfoWindow();
    },
  },
};
</script>
<style lang="scss" scoped>
.danger-wrapper {
  background-color: rgba(9, 18, 32, 0.6);
  position: absolute;
  padding: 30px;
  padding-bottom: 0;
  box-sizing: border-box;
  width: 600px;
  // height: 510px;
  .up {
    border-bottom: 1px solid #cccccc;
    margin-bottom: 15px;
    &.noBroder{
    border-bottom: 0px solid #cccccc;
    margin-bottom: 10px;


    }
  }
  .tit {
    line-height: 14px;
    color: #ffffff;
    font-weight: 600;
    position: relative;
    margin-left: 12px;
    &:before {
      content: "";
      position: absolute;
      width: 5px;
      height: 15px;
      left: -12px;
      top: 0;
      background: #fff;
    }
  }
  .close {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
  }
  .one {
    width: 100%;
    flex-wrap: wrap;
    .flex-item {
      width: 50%;
      margin-bottom: 5px;
      .left {
        color: #cccccc;
      }
      .right {
        color: #fff;
        margin-left: 5px;
      }
    }
  }
  .item {
    margin-bottom: 5px;
    .left {
      color: #cccccc;
    }
    .right {
      color: #fff;
      margin-left: 5px;
    }
    .img {
      width: 300px;
      height: 120px;
      display: inline-block;
      vertical-align: top;
      margin-left: 5px;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>
