<template>
  <div class="wrapper">
    <span class="dot-left"></span>
    <div class="top display-default">
      <div class="left text ddd" :title="data.deviceName">
        {{ data.detectorName }}
      </div>
      <div class="right text">
        <img src="../../assets/images/closeBtn.png" alt="" @click="close" />
      </div>
    </div>
    <div class="contant">
      <div class="one">
        <div >
          设备编号: <span v-un-content>{{ data.detectorCode }}</span>
        </div>
        <div>
          监测介质: <span v-un-content>{{ data.medium }}</span>
        </div>
        <div>
          设备状态: <span v-un-content>{{ data.detectorStatus }}</span>
        </div>
      </div>
      <div class="two">
        <div>联系人信息</div>
        <div>
          姓名: <span v-un-content>{{ data.linkman }}</span>
        </div>
        <div>
          电话: <span v-un-content>{{ data.phone }}</span>
        </div>
        <div>
          详细信息: <span v-un-content>{{ data.remarks }}</span>
        </div>
        <div>
          备注：<span v-un-content>{{ data.remark }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import moment from "moment";
//line移入时的的infowindow
export default {
  props: {
    obj: { typs: Object },
    title: "",
    data: {},
    map: null,
  },
  data() {
    return {
      userTypeName: ["家用报警器", "商用报警器", "工业报警器"],
    };
  },
  mounted() {
    console.log(this.data);
  },
  methods: {
    moment,
    close() {
      this.map.clearInfoWindow();
      this.data.class.view.domAllShow();
      this.data.class.clearDetectorOnlyOpen();
    },
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  min-width: 300px;
  max-height: 430px;
  // background: #fff;
  border-radius: 4px;
  background: rgba(7, 29, 51, 0.9);
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  color: #fff;
  font-size: 14px;
  // overflow: hidden;
  .top {
    width: 100%;
    height: 51px;
    // background-color: #053b6a;
    background-image: url(../../assets/images/blueTopBg.png);
    background-size: 100% 100%;
    background-position: center;
    &:before {
      // content: "";
      // position: absolute;
      // left: -20px;
      // top: 5px;
      // width: 0px;
      // height: 0px;
      // z-index:-1;
      // border-top: 15px solid transparent;
      // border-bottom: 15px solid transparent;
      // border-right: 30px solid #053b6a;
      content: "";
      position: absolute;
      left: -20px;
      top: 5px;
      z-index: -1;
      width: 33px;
      height: 33px;
      background-image: url(../../assets/images/blueLeftTriangle.png);
    }
    .text {
      font-weight: 600;
      font-size: 16px;
      color: #ffffff;
      line-height: 51px;
    }
    .left {
      padding-left: 22px;
    }
    .right {
      padding-right: 22px;
      img {
        cursor: pointer;
      }
    }
  }
  .contant {
    padding: 10px;
    & > div {
      &.one {
        border-bottom: 1px solid #cccccc8f;
      }
      &.two{
        padding-top:8px;
      }
      div {
        margin-bottom: 8px;
      }
    }
  }
}

.wrapperEditorPage {
}
.display-default {
  display: flex;
  justify-content: space-between;
}
</style>
