<template>
  <div class="project-list">
    <div class="title-div">
      <div class="title">
        <div class="title-icon"></div>
        <div class="title-span">项目列表</div>
      </div>
      <div class="add" @click="addProject"></div>
    </div>
    <div class="interval"></div>
    <div class="list">
      <div>
        <div class="project-list-item">
          <div class="list-item-icon"></div>
          <div class="list-item-content">临沂市兰山区某某某项目部</div>
          <div class="active-icon"></div>
        </div>
        <div class="item-bottom-interval"></div>
      </div>
      <div>
        <div class="project-list-item active">
          <div class="list-item-icon"></div>
          <div class="list-item-content">临沂市兰山区某某某项目部</div>
          <div class="active-icon"></div>
        </div>
        <div class="item-bottom-interval"></div>
      </div>
      <div>
        <div class="project-list-item">
          <div class="list-item-icon"></div>
          <div class="list-item-content">临沂市兰山区某某某项目部</div>
          <div class="active-icon"></div>
        </div>
        <div class="item-bottom-interval"></div>
      </div>
    </div>
    <!-- 添加项目组件 -->
    <AddProject />
  </div>
</template>

<script setup lang="ts">
import AddProject from './AddProject/index.vue'
import { ref } from "vue"

const addModal = ref(false)
const addProject = () => {
  addModal.value = true
}
</script>

<style lang="scss" scoped>
.project-list{
  position: absolute;
  top: 40px;
  left: 27px;
  width: 328px;
  height: 500px;
  background-image: url('/public/projecthome/background.png');
  background-size: 100% 100%;
  padding-top: 19px;
  .title-div{
    padding-left: 26px;
    padding-right: 24px;
    width: 100%;
    height: 33px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 13px;
    .title{
      display: flex;
      align-items: center;
      .title-icon{
        width: 24px;
        height: 24px;
        background-image: url('/public/projecthome/project_list_icon.png');
        background-size: 100% 100%;
        margin-right: 14px;
      }
      .title-span{
        font-family: 'PingFangSC-Medium';
        font-weight: 500;
        font-size: 22px;
        color: #FFFFFF;
        line-height: 33px;
        text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
      }
    }
    .add{
      width: 24px;
      height: 24px;
      background-image: url('/public/projecthome/project_list_add.png');
      background-size: 100% 100%;
      cursor: pointer;
    }
  }
  .interval{
    width: 328px;
    height: 1px;
    box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
    border: 1px solid #4E5778;
    opacity: 0.2;
  }
  .list{
    .project-list-item{
      position: relative;
      padding-left: 25px;
      width: 100%;
      height: 35px;
      display: flex;
      align-items: center;
      opacity: 0.7;
      .list-item-icon{
        width: 6px;
        height: 6px;
        background: #FFFFFF;
        box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
        margin-right: 18px;
      }
      .list-item-content{
        font-family: 'PingFangSC-Regular';
        font-weight: 400;
        font-size: 16px;
        color: #FFFFFF;
        line-height: 33px;
        text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
      }
    }
    .active{
      background: linear-gradient( 270deg, rgba(108,144,245,0) 0%, #3A57E8 100%);
      box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15), inset 0px 1px 3px 0px rgba(0,0,0,0.28);
      opacity: 1;
      .active-icon{
        position: absolute;
        top: 0px;
        left: 0px;
        width: 4px;
        height: 35px;
        background: #607AFF;
        box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
      }
    }
    .item-bottom-interval{
      margin-left: 25px;
      height: 2px;
      width: calc(100% - 25px);
      box-shadow: 0px 10px 30px 0px rgba(0, 0, 6, 0.15);
      background: #4E5778;
      opacity: 0.3;
    }
  }
}
</style>
