<!--
 * @Author: 纪泽龙 jizelong@qq.com
 * @Date: 2022-06-21 09:24:11
 * @LastEditors: 纪泽龙 jizelong@qq.com
 * @LastEditTime: 2022-06-25 16:56:53
 * @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="one flex fz16">
        <div class="flex-item">
          <span class="left">危险源名称:</span
          ><span v-unValue class="right">{{ deviceData.wxymc }}</span>
        </div>
        <div class="flex-item">
          <span class="left">直径:</span
          ><span v-unValue class="right">{{ deviceData.zj }}</span>
        </div>
        <div class="flex-item">
          <span class="left">总长:</span
          ><span v-unValue class="right">{{ deviceData.zc }}</span>
        </div>
        <div class="flex-item">
          <span class="left">风险级别:</span
          ><span v-unValue class="right">{{ deviceData.fxjb }}</span>
        </div>
        <div class="flex-item">
          <span class="left">可能引发的风险:</span
          ><span v-unValue class="right">{{ deviceData.knyfdfx }}</span>
        </div>
        <div class="flex-item">
          <span class="left">侵入途径:</span
          ><span v-unValue class="right">{{ deviceData.qrtj }}</span>
        </div>
        <div class="flex-item">
          <span class="left">燃爆危险:</span
          ><span v-unValue class="right">{{ deviceData.rbwx }}</span>
        </div>
        <div class="flex-item">
          <span class="left">有害燃烧产物:</span
          ><span v-unValue class="right">{{ deviceData.yhrscw }}</span>
        </div>
      </div>

      <div class="item">
        <span class="left">危险性类别:</span
        ><span v-unValue class="right">{{ deviceData.wxxlb }}</span>
      </div>

      <div class="item">
        <span class="left">环境危害:</span
        ><span v-unValue class="right">{{ deviceData.hjwh }}</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>
