<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>
        <!-- <div class="theadtop">
          设备名称: <span v-un-content>{{ data.detectorName }}</span>
        </div> -->
        <div>
          设备编号: <span v-un-content>{{ data.detectorCode }}</span>
        </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.detectorStatus }}</span>
        </div>
        <div>
          报警时间: <span v-un-content>{{ data.alarmTime }}</span>
        </div>
        <div>
          创建时间: <span v-un-content>{{ data.creatTime }}</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() {},
  methods: {
    moment,
    deviceMore() {
      this.data.class.view.$router.push({
        // path: "/dataMonitoring/realtimedetail",
        path: "/device/deviceInfoDetail",
        query: {
          deviceId: this.data.deviceId,
          // deviceType: this.data.deviceType,
        },
      });
    },
    close() {
      this.map.clearInfoWindow();
      this.data.class.view.domAllShow();
      this.data.class.clearDetectorOnlyOpen();
    },
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  // width: 406px;
  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 div{
      margin-bottom:8px;
    }
  }
}

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