<template>
  <div class="latrine_scene">
    <!-- 标题区域 -->
    <div class="title">
      <div class="title_text">各厕所实况</div>
      <img src="@/assets/images/33.png" />
    </div>

    <!-- 筛选框区域 -->
    <div class="select">
      <div class="search_box">
        <el-select v-model="placeValue" placeholder="请选择地点">
          <el-option
            v-for="(item, index) in options"
            :key="index"
            :label="item"
            :value="item"
          />
        </el-select>
      </div>
    </div>

    <!-- 列表区域 -->
    <div class="list">
      <!-- 每一个盒子区域 -->
      <!-- 男厕 -->
      <div class="list_box">
        <!-- 四个角的图标 -->
        <div class="angle left_top"></div>
        <div class="angle right_top"></div>
        <div class="angle left_bottom"></div>
        <div class="angle right_bottom"></div>

        <!-- 左边区域 -->
        <div class="box_left">
          <div class="left_icon"></div>
          <div class="left_text">男厕 52/200</div>
        </div>

        <!-- 右边区域 -->
        <div class="box_right">
          <div class="right_item">
            <div class="item_name">入流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="80"
                :show-text="false"
                color="#8DCDEB"
              />
            </div>
            <div class="item_num">150</div>
          </div>
          <div class="right_item">
            <div class="item_name">出流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="50"
                :show-text="false"
                color="#F5BBA1"
              />
            </div>
            <div class="item_num">142</div>
          </div>
          <div class="right_item">
            <div class="item_name">驻留人数</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="10"
                :show-text="false"
                color="#3BA3FF"
              />
            </div>
            <div class="item_num">8</div>
          </div>
        </div>
      </div>

      <!-- 女厕 -->
      <div class="list_box">
        <!-- 四个角的图标 -->
        <div class="angle left_top"></div>
        <div class="angle right_top"></div>
        <div class="angle left_bottom"></div>
        <div class="angle right_bottom"></div>

        <!-- 左边区域 -->
        <div class="box_left">
          <div class="left_icon2"></div>
          <div class="left_text">女厕 50/300</div>
        </div>

        <!-- 右边区域 -->
        <div class="box_right">
          <div class="right_item">
            <div class="item_name">入流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="65"
                :show-text="false"
                color="#8DCDEB"
              />
            </div>
            <div class="item_num">288</div>
          </div>
          <div class="right_item">
            <div class="item_name">出流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="60"
                :show-text="false"
                color="#F5BBA1"
              />
            </div>
            <div class="item_num">266</div>
          </div>
          <div class="right_item">
            <div class="item_name">驻留人数</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="10"
                :show-text="false"
                color="#3BA3FF"
              />
            </div>
            <div class="item_num">22</div>
          </div>
        </div>
      </div>

      <!-- 无障碍厕所 -->
      <div class="list_box">
        <!-- 四个角的图标 -->
        <div class="angle left_top"></div>
        <div class="angle right_top"></div>
        <div class="angle left_bottom"></div>
        <div class="angle right_bottom"></div>

        <!-- 左边区域 -->
        <div class="box_left">
          <div class="left_icon3"></div>
          <div class="left_text">无障碍厕所</div>
          <div class="left_text">50/88</div>
        </div>

        <!-- 右边区域 -->
        <div class="box_right">
          <div class="right_item">
            <div class="item_name">入流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="60"
                :show-text="false"
                color="#8DCDEB"
              />
            </div>
            <div class="item_num">30</div>
          </div>
          <div class="right_item">
            <div class="item_name">出流量</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="50"
                :show-text="false"
                color="#F5BBA1"
              />
            </div>
            <div class="item_num">28</div>
          </div>
          <div class="right_item">
            <div class="item_name">驻留人数</div>
            <div class="item_pro">
              <el-progress
                :stroke-width="12"
                :percentage="5"
                :show-text="false"
                color="#3BA3FF"
              />
            </div>
            <div class="item_num">2</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const placeValue = ref();

const options = ref(["三爪仑风景区", "虎啸峡", "三清山"]);
</script>

<style lang="scss" scoped>
.latrine_scene {
  width: 100%;
  height: 100%;

  .title {
    position: relative;
    width: 100%;
    height: 41px;
    line-height: 41px;

    .title_text {
      position: absolute;
      left: 15px;
      z-index: 1;
      font-size: 23.5px;
      font-weight: bold;
      color: #e0efff;
    }

    img {
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 16px;
    }
  }

  .select {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 80px;

    .search_box {
      width: 288px;
      height: 38px;
    }
  }

  .list {
    height: 330px;

    .list_box {
      position: relative;
      display: flex;
      padding: 13px 0;
      margin-bottom: 12px;
      height: 100px;
      border: 2px solid rgba(212, 234, 250, 0.2);
      background-color: rgba(212, 234, 250, 0.04);

      .angle {
        position: absolute;
        width: 11px;
        height: 11px;
        background-image: url(@/assets/images/40.png);
        background-size: 100% 100%;
      }

      .left_top {
        top: 0;
        left: 0;
      }

      .right_top {
        top: 0;
        right: 0;
        transform: rotate(90deg);
      }

      .left_bottom {
        bottom: 0;
        left: 0;
        transform: rotate(-90deg);
      }

      .right_bottom {
        bottom: 0;
        right: 0;
        transform: rotate(180deg);
      }

      .box_left {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 130px;
        height: 100%;
        border-right: 2px solid rgba(141, 205, 235, 0.12);

        .left_icon {
          width: 46px;
          height: 46px;
          background-image: url(@/assets/images/41.png);
          background-size: 100% 100%;
        }

        .left_icon2 {
          width: 46px;
          height: 46px;
          background-image: url(@/assets/images/42.png);
          background-size: 100% 100%;
        }

        .left_icon3 {
          margin-top: -8px;
          width: 40px;
          height: 40px;
          background-image: url(@/assets/images/43.png);
          background-size: 100% 100%;
        }

        .left_text {
          margin-top: 5px;
          font-size: 16px;
        }
      }

      .box_right {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 352px;
        height: 100%;

        .right_item {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 0 15px;
          width: 100%;
          height: 20px;
          font-size: 16px;

          .item_name {
            width: 70px;
          }

          .item_pro {
            margin-left: -10px;
            width: 170px;
          }

          .item_num {
            width: 35px;
          }
        }
      }
    }
  }
}

::v-deep(.el-select__wrapper) {
  height: 38px;
  background-color: transparent;
}

::v-deep(.el-progress-bar__outer) {
  background-color: rgba(212, 234, 250, 0.08);
}
</style>
