<template>
  <DragWindow
    ref="ref_assistant"
    v-if="show"
    @onClose="$emit('update:show', false)"
    title="预警详情"
    v-model:layout="state.layout"
    close
  >
    <div class="assistant" v-if="show" v-loading="state.loading">
      <div class="title">
        北斗终端异常古
        <div class="__hover">查看详情</div>
      </div>
      <div class="target">琼海123456</div>
      <div class="content">
        <div class="img">
          <img src="@/assets/images/web/ship.png">
        </div>
        <div class="infos">
          <div>预警时间</div>
          <div>2024-02-22 12:33:44</div>
          <div>预警区域</div>
          <div>海口海域</div>
        </div>
      </div>
    </div>
  </DragWindow>
</template>

<script setup lang="ts">
import {computed, getCurrentInstance, markRaw, onBeforeMount, onMounted, reactive, ref, watch} from "vue";
import DragWindow from '../components/drag-window.vue'
import {useDictionaryStore, useShipMapStore} from "@/stores";
import {ElMessage} from "element-plus";

const DictionaryStore = useDictionaryStore()
const ShipMapStore = useShipMapStore()
const {proxy} = getCurrentInstance()
const props = defineProps({
  show: {},
  mapFunc: {},
  mapHeight: {},
})
const state: any = reactive({
  layout: {
    width: 506,
    left: 85,
    top: props.mapHeight - 60 - (300 + 60)
  },
})
const ref_assistant = ref()
watch(() => props.show, (n) => {
  if (n) {
  }
})
onMounted(() => {
})
</script>

<style lang="scss" scoped>
.assistant {
  height: 300px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  .title {
    width: 100%;
    height: 40px;
    background: rgba(88,148,235,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 20px;
    color: #FFFFFF;
    &:before {
      content: '';
      width: 6px;
      height: 100%;
      background: linear-gradient(0deg, rgba(255,255,255,0.11), rgba(255,255,255,0.75));
      box-shadow: 0px 2px 0px 0px rgba(81,129,228,0.4);
      border-radius: 8px 0px 0px 8px;
      margin-right: 10px;
    }
    >div {
      margin-left: auto;
      margin-right: 24px;
      font-weight: 400;
      font-size: 16px;
      color: #FFFFFF;
    }
  }
  .target {
    font-weight: 400;
    font-size: 18px;
    color: #FFFFFF;
  }
  .content {
    display: flex;
    gap: 22px;
    .img {
      width: 240px;
      height: 150px;
      border-radius: 4px;
      border: 1px solid #AED0FF;
      padding: 9px;
      >img {
        width: 100%;
        height: 100%;
      }
    }
    .infos {
      display: flex;
      flex-direction: column;
      font-weight: 400;
      font-size: 16px;
      color: #FFFFFF;
      line-height: 27px;
      >:nth-child(3) {
        margin-top: 10px;
      }
    }
  }
}
</style>
