<script>
import logo from '../../assets/images/logo.png'
import s1 from '../../assets/images/lbt1.jpeg'
import s2 from '../../assets/images/lbt2.jpeg'
import s3 from '../../assets/images/lbt3.jpeg'
import tb1 from '../../assets/images/tb1.png'
import { ref, onMounted } from 'vue'

export default {
  data() {
    return {
      imagePath: {
        logo: logo,
        tb1: tb1,
        s1: s1,
        s2: s2,
        s3: s3,
      },
    }
  },
  setup() {
    const slides = [{ image: s1 }, { image: s2 }, { image: s3 }]

    const currentIndex = ref(0)

    const nextSlide = () => {
      currentIndex.value = (currentIndex.value + 1) % slides.length
    }

    const prevSlide = () => {
      currentIndex.value = (currentIndex.value - 1 + slides.length) % slides.length
    }

    // 自动播放
    onMounted(() => {
      setInterval(nextSlide, 4000)
    })

    return {
      slides,
      currentIndex,
      nextSlide,
      prevSlide,
    }
  },
}
</script>
<template>
  <div class="box">
    <div class="common-layout">
      <el-container>
        <!-- 顶部 -->
        <el-header>
          <el-row>
            <div class="dhl">
              <el-col :span="3">
                <div class="grid-content ep-bg-purple-home" />
                <img class="img-1" :src="imagePath.logo" alt="Logo" width="90" height="90" />
                <em class="em-1">辉擎科技</em>
              </el-col>
              <el-col :span="9">
                <div class="grid-content ep-bg-purple" />
              </el-col>
              <el-col :span="6">
                <div class="grid-content ep-bg-purple-light" />
                <div class="dhl-x">
                  <el-breadcrumb separator="">
                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                    <el-breadcrumb-item :to="{ path: '/' }">产品方案</el-breadcrumb-item>
                    <el-breadcrumb-item :to="{ path: '/' }">行业解决问题</el-breadcrumb-item>
                    <el-breadcrumb-item :to="{ path: '/' }">客户案例</el-breadcrumb-item>
                    <el-breadcrumb-item :to="{ path: '/' }">关于我们</el-breadcrumb-item>
                    <el-breadcrumb-item :to="{ path: '/' }"> </el-breadcrumb-item>
                  </el-breadcrumb>
                </div>
              </el-col>
              <el-col :span="1">
                <div class="grid-content ep-bg-purple" />
                <el-button class="an-3" type="primary">免费咨询</el-button>
              </el-col>
            </div>
          </el-row>
        </el-header>
        <el-main style="padding: 0 20px">
          <div class="carousel">
            <div class="slides" :style="{ transform: `translateX(-${currentIndex * 100}%)` }">
              <div class="slide" v-for="(slide, index) in slides" :key="index">
                <div v-if="!isDark" class="demo-term-box">
                  <div class="em-2">构建智能未来</div>
                  <div class="em-3">
                    辉擎成都科技有限公司致力于提供创新的软件开发解决方案，帮助企业实现数字化转型提升竞争力。
                  </div>
                  <el-button class="an-1" type="primary">联系我们</el-button>
                  <el-button class="an-2">了解服务</el-button>
                </div>
                <img :src="slide.image" alt="Slide Image" />
              </div>
            </div>
            <!-- <button class="prev" @click="prevSlide">&#10094;</button>
            <button class="next" @click="nextSlide">&#10095;</button> -->
          </div>
          <div class="bk">
            <div class="em-4">我们的服务</div>
            <div class="em-5">
              辉擎科技提供全方位的软件开发服务，从需求分析到部署维护，我们用技术为您的业务赋能。
            </div>
            <el-row :gutter="40">
              <el-col :span="5" class="bk-1-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-2" :src="imagePath.tb1" alt="tb1" width="160" height="190" />
                <div class="bt-1">人工智能平台</div>
                <div class="em-6">
                  提供企业级AI能力，包括机器学习、深度学习、自然语言处理等核心技术支持
                </div>
              </el-col>
              <el-col :span="5" class="bk-1-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-2" :src="imagePath.tb1" alt="tb1" width="160" height="190" />
                <div class="bt-1">人工智能平台</div>
                <div class="em-6">
                  提供企业级AI能力，包括机器学习、深度学习、自然语言处理等核心技术支持
                </div>
              </el-col>
              <el-col :span="5" class="bk-1-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-2" :src="imagePath.tb1" alt="tb1" width="160" height="190" />
                <div class="bt-1">人工智能平台</div>
                <div class="em-6">
                  提供企业级AI能力，包括机器学习、深度学习、自然语言处理等核心技术支持
                </div>
              </el-col>
              <el-col :span="5" class="bk-1-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-2" :src="imagePath.tb1" alt="tb1" width="160" height="190" />
                <div class="bt-1">人工智能平台</div>
                <div class="em-6">
                  提供企业级AI能力，包括机器学习、深度学习、自然语言处理等核心技术支持
                </div>
              </el-col>
            </el-row>
          </div>
          <!--  -->
          <div class="bk-2">
            <div class="em-4">成功案例</div>
            <div class="em-5">服务超过1000家企业客户，助力企业数字化转型。</div>
            <el-row :gutter="40">
              <el-col :span="6" class="bk-2-2">
                <div class="grid-content ep-bg-purple" />
                <img class="img-3" :src="imagePath.tb1" alt="tb1" width="120" height="70" />
                <div class="bt-2">远洋集团</div>
                <div class="wb-1">房地产行业</div>
                <div class="em-7">
                  通过部署智能分析平台，实现销售数据可视化分析，提升决策效率超过60%
                </div>
                <div class="sj-1">
                  部署时间：xxxx年
                  <el-link :underline="false" style="color: #2d3fdd">查看详情</el-link>
                </div>
              </el-col>
              <el-col :span="6" class="bk-2-2">
                <div class="grid-content ep-bg-purple" />
                <img class="img-3" :src="imagePath.tb1" alt="tb1" width="120" height="70" />
                <div class="bt-2">远洋集团</div>
                <div class="wb-1">房地产行业</div>
                <div class="em-7">
                  通过部署智能分析平台，实现销售数据可视化分析，提升决策效率超过60%
                </div>
                <div class="sj-1">
                  部署时间：xxxx年
                  <el-link :underline="false" style="color: #2d3fdd">查看详情</el-link>
                </div>
              </el-col>
              <el-col :span="6" class="bk-2-2">
                <div class="grid-content ep-bg-purple" />
                <img class="img-3" :src="imagePath.tb1" alt="tb1" width="120" height="70" />
                <div class="bt-2">远洋集团</div>
                <div class="wb-1">房地产行业</div>
                <div class="em-7">
                  通过部署智能分析平台，实现销售数据可视化分析，提升决策效率超过60%
                </div>
                <div class="sj-1">
                  部署时间：xxxx年
                  <el-link :underline="false" style="color: #2d3fdd">查看详情</el-link>
                </div>
                <el-button class="an-4" >查看更多案例</el-button>
              </el-col>
            </el-row>
          </div>
          <!--  -->
          <div class="bk-3">
            <div class="em-4">最新动态</div>
            <div class="em-5">了解公司最新资讯与行业洞察。</div>
            <el-row :gutter="40">
              <el-col :span="6" class="bk-3-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-4" :src="imagePath.s1" alt="tb1" width="100%" height="250" />
                <div class="sj-2">2024年3月15日</div>
                <div class="bt-3">2024数字化转型峰会圆满举行</div>
                <div class="em-8">
                  本次峰会汇聚行业专家，深入探讨数字化转型趋势与实践经验，共同展望为了发展方向。
                </div>
                <div class="an-5">
                <el-link :underline="false" style="color: #2d3fdd" >查看详情</el-link>
                </div>
              </el-col>
              <el-col :span="6" class="bk-3-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-4" :src="imagePath.s1" alt="tb1" width="100%" height="250" />
                <div class="sj-2">2024年3月15日</div>
                <div class="bt-3">2024数字化转型峰会圆满举行</div>
                <div class="em-8">
                  本次峰会汇聚行业专家，深入探讨数字化转型趋势与实践经验，共同展望为了发展方向。
                </div>
                <div class="an-5">
                <el-link :underline="false" style="color: #2d3fdd" >查看详情</el-link>
                </div>
              </el-col>
              <el-col :span="6" class="bk-3-1">
                <div class="grid-content ep-bg-purple" />
                <img class="img-4" :src="imagePath.s1" alt="tb1" width="100%" height="250" />
                <div class="sj-2">2024年3月15日</div>
                <div class="bt-3">2024数字化转型峰会圆满举行</div>
                <div class="em-8">
                  本次峰会汇聚行业专家，深入探讨数字化转型趋势与实践经验，共同展望为了发展方向。
                </div>
                <div class="an-5">
                <el-link :underline="false" style="color: #2d3fdd" >查看详情</el-link>
                </div>
              </el-col>
            </el-row>
          </div>
          <!--  -->
        </el-main>
      </el-container>
    </div>
  </div>
</template>
<style scoped>

.an-5{
  margin-left: -20px;
  margin-top: 20px;
  width: 100px;
}
.sj-2 {
  margin-top: 15px;
}
.em-8 {
  margin-top: 30px;
  width: 390px;
  line-height: 1.5;
  font-size: 15px;
}
.bt-3 {
  margin-top: 15px;
  font-weight: bold;
}
.img-4 {
  margin-top: 20px;
}
.bk-3-1 {
  height: 470px;
  border-radius: 5px;
  margin-top: 80px;
  margin-left: 115px;
  box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.2);
}
.bk-3 {
  margin-top: 100px;
}
.sj-1 {
  margin-top: 20px;
  margin-left: 30px;
}
.img-3 {
  margin-top: 25px;
  margin-left: 30px;
}
.em-7 {
  margin-left: 30px;
  margin-top: 35px;
  font-size: 15px;
  line-height: 1.7;
  width: 350px;
}
.wb-1 {
  margin-left: 110px;
  margin-top: 8px;
}
.bk-2-2 {
  height: 230px;
  margin-top: 80px;
  margin-left: 115px;
  border-radius: 7px;
  padding: 20px;
  background-color: #f0f0f0;
}
.bt-2 {
  font-weight: bold;
  margin-top: -80px;
  margin-left: 110px;
}
.bk-2 {
  height: 500px;
}
.img-2 {
  margin-top: 15px;
  margin-left: 30px;
}
.img-1 {
  margin-top: 8px;
}
.bt-1 {
  margin-top: -70px;
  margin-left: 30px;
  font-size: 25px;
}
.em-6 {
  margin-top: 40px;
  margin-left: 30px;
  font-size: 14px;
  width: 260px;
  line-height: 1.5;
}
.bk-1-1 {
  background-color: #dad3d3;

  height: 300px;
  margin-top: 80px;
  margin-left: 62px;
  border-radius: 15px; /* 设置圆角 */
  padding: 20px;
  background-color: #f0f0f0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
.bk-1 {
  background-color: #d1cfcf;

  height: 300px;
  margin-top: 70px;
  margin-left: 62px;
  border-radius: 15px; /* 设置圆角 */
  padding: 20px;
  background-color: #f0f0f0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
.bk {
  position: relative;
  background-color: #fff;
  margin-top: 90px;
  height: 600px;
}
.em-5 {
  margin-top: 30px;
  text-align: center;
}
.em-4 {
  text-align: center;
  font-weight: bold;
  font-size: 30px;
}
.an-3 {
  margin-right: -20px;
}
.an-1 {
  position: absolute;
  top: 300px;
  left: 145px;
}
.an-2 {
  position: absolute;
  top: 300px;
  left: 280px;
}
.an-4 {
  margin-top: 90px;
  margin-left: -440px;
  width: 150px;
}
.box {
  height: 100%;
}
.em-3 {
  position: absolute;
  top: 190px;
  left: 145px;
  width: 290px;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 2.5px;
}
.em-2 {
  position: absolute;
  width: 250px;
  font-weight: bold;
  margin: 120px 300px 300px 145px;
  font-size: 40px;
  color: #fff;
}
.em-1 {
  margin-left: 5px;
  position: absolute;
  top: 22px;
  left: 260px;
  font-size: 25px;
  font-weight: bold;
}
.dhl {
  float: right;
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  margin-top: 10px;
}
.el-link {
  margin-right: 25px;
  float: right;
  color: #000;
}
.dhl-x {
  display: flex;
  gap: 20px;
  margin-right: 0px;
}
.carousel {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}
</style>