<template>
  <BasePanelRight :isHidePanel="isHide">
    <div class="num-area">
      <div class="txt-num"><img src="@/assets/image/smart-early-warning/yjNum.png" alt="">今日预警数量：3,258</div>
      <div class="txt-num"><img src="@/assets/image/smart-early-warning/jrDcl.png" alt="">今日待处理：3,258</div>
    </div>
    <div class="warning-container">
      <BaseMain title="预警详情">
        <template v-slot:mainArea>
          <div class="detail-container">
            <Carousel :items="items" />
            <el-collapse v-model="activeNames" class="v-collapse">
              <el-collapse-item title="预警来源" name="1">
                <div class="form-content">
                  <div class="form-item">
                    <div class="label">摄像机编号：</div>
                    <div class="value">{{ info.deviceCode }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">摄像机名称：</div>
                    <div class="value">{{ info.deviceName }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">通道名称：</div>
                    <div class="value">{{ info.channelName }}</div>
                  </div>
                  <!-- <div class="form-item">
                    <div class="label">摄像机厂家：</div>
                    <div class="value">{{ info.params4 }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">摄像机挂高：</div>
                    <div class="value">{{ info.params5 }}</div>
                  </div> -->
                  <div class="form-item">
                    <div class="label">摄像机经纬度：</div>
                    <div class="value">{{ info.longitude }},{{ info.latitude }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">摄像机地址：</div>
                    <div class="value">{{ info.address }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">置信度：</div>
                    <div class="value">{{ info.confidenceLevel }}</div>
                  </div>
                  <!-- <div class="form-item">
                    <div class="label">水平方位角：</div>
                    <div class="value">{{ info.params9 }}</div>
                  </div> -->
                </div>
              </el-collapse-item>
              <el-collapse-item title="事件信息" name="2">
                <div class="form-content">
                  <div class="form-item">
                    <div class="label">事件编号：</div>
                    <div class="value">{{ info.orderId }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">事件标题：</div>
                    <div class="value">{{ info.alarmBody }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">预警来源：</div>
                    <div class="value">{{ info.warningSourceName }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">预警类型：</div>
                    <div class="value">{{ info.warningTypeName }}</div>
                  </div>
                  <!-- <div class="form-item">
                    <div class="label">预警原因：</div>
                    <div class="value">{{ info.params5 }}</div>
                  </div> -->
                  <div class="form-item">
                    <div class="label">重要等级：</div>
                    <div class="value">{{ info.emergencyLevelName }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">预警时间：</div>
                    <div class="value">{{ info.alarmTime }}</div>
                  </div>
                  <!-- <div class="form-item">
                    <div class="label">所属网格：</div>
                    <div class="value">{{ info.params8 }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">所属网格员：</div>
                    <div class="value">{{ info.params9 }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">事发地点：</div>
                    <div class="value">{{ info.params10 }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">经纬度：</div>
                    <div class="value">{{ info.params11 }}</div>
                  </div>
                  <div class="form-item">
                    <div class="label">事件描述：</div>
                    <div class="value">{{ info.params12 }}</div>
                  </div> -->
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </template>
      </BaseMain>
    </div>
  </BasePanelRight>
</template>

<script>
import BasePanelRight from '@/components/base-panel/base-panel-right'
import BaseMain from '@/components/base-main/base-main.vue'
import Carousel from './carousel.vue'
import ImgUrl from '@/assets/image/smart-early-warning/banner.png'
export default {
  props:{
    info:Object
  },
  data() {
    return {
      isHide:true,
      items: [
        {
          image: ImgUrl,
          thumbnail: ImgUrl
        },
        {
          image: ImgUrl,
          thumbnail: ImgUrl
        },
        {
          image: ImgUrl,
          thumbnail: ImgUrl
        }
      ],
      activeNames: ['1', '2']
    }
  },
  components: {
    BasePanelRight,
    BaseMain,
    Carousel
  }
}
</script>

<style lang="scss" scoped>
.num-area{
  position: absolute;
  top: px-to-rem(8);
  right: px-to-rem(130);
  z-index: 1;
  display: flex;
  .txt-num{
    display: flex;
    align-items: center;
    width: px-to-rem(180);
    font-weight: 400;
    font-size: px-to-rem(14);
    color: #FFFFFF;
    margin-left: px-to-rem(130);
    img{
      width: px-to-rem(30);
      margin-bottom: px-to-rem(7);
    }
  }
}
.warning-container {
  position: absolute;
   top: px-to-rem(30);
  z-index: 1;
  left: px-to-rem(-4);
  height: calc(100% - px-to-rem(55));
  :deep(.baseMainContainer) {
    height: inherit;
    .content-area {
      height: 100%;
    }
  }
  .detail-container {
    padding: px-to-rem(10) px-to-rem(8);
    .form-content {
      .form-item {
        display: flex;
        justify-content: flex-end;
        gap: px-to-rem(11);
        .label {
          width: 35%;
          font-weight: 400;
          font-size: px-to-rem(14);
          color: #abb4c1;
          text-align: right;
        }
        .value {
          width: 65%;
          font-weight: 400;
          font-size: px-to-rem(14);
          color: #ffffff;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }
  }
  .v-collapse {
    border-top:0;
    border-bottom:0;
    :deep(.el-collapse-item__header) {
      background: #26344b;
      font-weight: 500;
      font-size: px-to-rem(14);
      color: #ffffff;
      padding: px-to-rem(5) px-to-rem(11);
      height: auto;
      line-height: initial;
      border-bottom: 0;
      border-left: px-to-rem(1) solid #4f9fff;
    }
    :deep(.el-collapse-item__wrap) {
      background-color: transparent;
      border-bottom: 0;
    }
    :deep(.el-collapse-item__content) {
      padding: px-to-rem(13) px-to-rem(0);
    }
  }
}
</style>