<template>
  <div class="app-container home">
    <div class="custom-main-w">
      <div class="resource-list">
        <el-row :gutter="40">
          <el-col :span="8" v-for="(i,index) in solutionList" :key="index" style="margin-bottom: 40px;cursor: pointer;"
                  @click="handleSolution(i.id)">
            <div class="resource-item">
              <div class="img">
                <!--                <div class="img-title">行业解决方案</div>-->
                <div class="img-title-a"> {{ selectDictLabel(solutionCategoryDict, i.category) }}</div>
                <br>
                <br>
                <div class="img-title-b">
                  {{ selectDictLabel(industryCategoryDict, i.industryCategory) }}
                </div>
              </div>
              <div class="text-content">
                <div class="title">{{ i.title }}</div>
                <div class="subtitle">{{ parseTime(i.createTime, "{y}-{m}-{d}") }}</div>
                <el-divider style="width: 50px;border-top: 1px #1c84c6 solid;"/>
                <p class="info">{{ i.introduction }}</p>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>

    <div class="content-footer">
      <div class="content-detail">
        <img src="@/assets/images/indexImg/content1.png" alt=""/>
        <div class="name">服务支持</div>
        <div class="more">了解更多 ></div>
      </div>
      <div class="content-detail">
        <img src="@/assets/images/indexImg/content2.png" alt=""/>
        <div class="name">联系我们</div>
        <div class="more">了解更多 ></div>
      </div>
      <div class="content-detail">
        <img src="@/assets/images/indexImg/content3.png" alt=""/>
        <div class="name">如何购买</div>
        <div class="more">了解更多 ></div>
      </div>
    </div>

    <div class="footer">先进计算科技有限公司 沪ICP备18000749号-2</div>
  </div>
</template>

<script setup name="industryApplicationsIndex">
import {ref} from 'vue'
import {getSolution} from "@/api/industry.js";
import {parseTime, selectDictLabel} from "@/utils/ruoyi.js";
import {useRouter} from "vue-router";
import {getDictDatas} from "@/utils/dict.js";

const solutionList = ref([])
const router = useRouter();

// 定义变量存储两个字典数据
const solutionCategoryDict = ref([]); // 解决方案分类字典
const industryCategoryDict = ref([]); // 行业分类字典

// 组件挂载时获取字典数据
onMounted(async () => {
  // 等待接口返回后，将数据存入变量
  const solutionRes = await getDictDatas("solution_category");
  solutionCategoryDict.value = solutionRes.data; // 接口返回的data数组

  const industryRes = await getDictDatas("industry_category");
  industryCategoryDict.value = industryRes.data;
});

function getData() {
  getSolution().then(res => {
    solutionList.value = res.code === 0 ? res.data : []
  })
}

getData()

function handleSolution(id) {
  router.push(`/industryApplications/detail?id=${id}`)
}
</script>

<style scoped lang="scss">
.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.view-more-text {
  position: sticky;
  text-align: center;
  font-size: 20px;
  color: #000000;
  cursor: pointer;
  padding-bottom: 60px;
  z-index: 2 !important;
}

.new-block {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding-top: 74px;
  padding-bottom: 41px;

  .new-block-details {
    z-index: 2 !important;
    padding-top: 32px;
  }

  .resourceLogo {
    width: 123px;
    height: 123px;
    margin-bottom: 32px;
    z-index: 2 !important;
  }

  .details-introduce {
    display: flex;
    justify-content: center;
    text-align: center;

    span:first-child {
      font-family: Microsoft YaHei;
      font-weight: bolder;
      font-size: 35px;
      color: #000000;
    }

    span:last-child {
      font-family: YouSheBiaoTiHei;
      font-weight: 400;
      font-size: 42px;
      color: #5E6988;
    }
  }

  .present {
    font-family: Microsoft YaHei;
    font-weight: bolder;
    font-size: 17px;
    color: #010101;
    line-height: 27px;
    text-align: center;
  }
}

.model-box {
  position: relative;

  .light {
    position: absolute;
    z-index: 1;
    width: 100%;
    left: 0;
    top: 12%;
  }
}

.block-light {
  position: absolute;
  z-index: 1 !important;
  width: 1700px;
  height: 900px;
  left: 10px;
  top: 40px;
}

.particulars {
  width: calc(100% - 240px);
  margin: 0 auto;
  cursor: pointer;
}

.resource-box {
  padding: 44px 66px 0 58px;
  height: 248px;

  .title {
    font-family: Microsoft YaHei;
    font-weight: 400;
    font-size: 27px;
    color: #F0A227;
    padding-bottom: 22px;
    z-index: 2 !important;
  }

  .introduce {
    font-family: Microsoft YaHei;
    font-weight: 400;
    font-size: 14px;
    color: #FAFBFD;
    line-height: 27px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }
}

.resource-col {
  z-index: 2 !important;
}

.app-container {
  padding-top: 90px;
  flex-grow: 1;
  flex-shrink: 1;
  position: relative;
}

.home {

}

.banner {
  position: relative;
  cursor: pointer;
  //margin-bottom: 64px;

  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.block {
  margin: 0 auto;
  z-index: 4 !important;
  padding-bottom: 60px;
}

.block-title {
  font-weight: bold;
  font-size: 40px;
  color: #303233;
  line-height: 60px;
  text-align: center;
  position: relative;
  z-index: 3 !important;

  .bg-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: DIN, system-ui;
    font-weight: bold;
    font-size: 90px;
    color: rgba(0, 0, 0, 0.02);
  }
}

.block-sub-title {
  font-weight: 400;
  font-size: 14px;
  color: #949899;
  line-height: 22px;
  text-align: center;
  margin-bottom: 48px;
}

.view-more-btn {
  border: 1px solid #C8CBCC;
  border-radius: 2px;
  height: 40px;
  color: #303233;
  z-index: 2 !important;
}

.application-item {
  height: 436px;
  padding: 50px 60px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;

  .title {
    margin-bottom: 10px;
  }

  .desc {
    color: #444444;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    max-height: 100px;
    -webkit-box-orient: vertical;
  }

  .link {
    color: #444444;
    justify-content: center;
  }

  .title {
    text-align: center;
  }

  .desc {
    text-align: center;
    width: 300px;
  }
}

.partners {
  height: 434px;
  margin-bottom: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url("@/assets/images/indexImg/bg-1.png") no-repeat;

  .title {
    font-weight: bold;
    font-size: 34px;
    color: #303233;
    margin-bottom: 20px;
  }

  .desc {
    font-weight: 400;
    font-size: 14px;
    color: #7e8080;
    margin-bottom: 40px;
    line-height: 1.8;
  }
}

.information-item {
  width: 570px;

  .content {
    font-size: 16px !important;
  }

  &:not(:last-child) {
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 2px solid #D6D7D8;
  }

  img {
    margin-top: 25px;
    width: 569px;

  }

  .date {
    font-family: DIN, system-ui;
    color: #949899;
    margin-right: 15px;
  }

  .month-day {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .year {
    font-size: 20px;
  }

  .right {
    min-width: 0;
  }

  .title {
    font-weight: bold;
    font-size: 24px;
    color: #303233;
    margin-bottom: 10px;
    padding-right: 45px;
  }

  .content {
    font-weight: 400;
    font-size: 14px;
    color: #626566;
    padding-right: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    :deep(*) {
      color: #626566 !important;
    }

    :deep(img) {
      display: block;
    }
  }
}

.footer {
  text-align: center;
  padding: 12px 0;
  color: #7C7D7E;
  font-weight: 400;
  font-size: 14px;
  background-color: #303233;
}

.banner-text {
  width: 913px;
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  transform: translate(-50%, -50%);
}

.banner-text .banner-left div:first-child {
  font-family: Microsoft YaHei;
  font-weight: 300;
  font-size: 75px;
  color: #F8F9FD;
  //line-height: 56px;
  text-indent: 20px;
  //padding-bottom: 16px;

  span {
    //font-family: DIN;
    font-weight: bolder;
  }
}

.banner-text .banner-left div:last-child {
  font-family: Microsoft YaHei;
  font-weight: bold;
  font-size: 20px;
  color: #ECAA1C;
  line-height: 27px;
  text-align: right;
}

.banner-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-family: Microsoft YaHei;
  color: #ECAA1C;
  padding-left: 34px;
}

.text-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-family: Microsoft YaHei;
  font-weight: bold;
  font-size: 15px;
  color: #ECAA1C;
  //line-height: 20px;
  //padding-bottom: 8px;

  .text-right-del {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .exclamation-point {
    font-family: Microsoft YaHei;
    font-weight: bold;
    font-size: 42px;
    font-style: italic;
    padding-left: 9px;
  }
}

.text-bottom {
  font-family: Copperplate Gothic Light;
  font-weight: 400;
  font-size: 24px;
  color: #ECAA1C;

  span {
    font-weight: bolder;
  }
}

.content-footer {
  width: 100%;
  height: 218px;
  background: #fafafa;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 190px;

  .content-detail {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    width: 100%;
    max-width: 1520px;
    cursor: pointer;

    .name {
      line-height: 32px;
      font-size: 24px;
      color: #333333;
      text-align: center;
    }

    .more {
      line-height: 22px;
      font-size: 16px;
      color: #333333;
      margin-top: 16px;
      text-align: center;
    }
  }

  img {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
  }
}

.iframe-container {
  position: absolute;
  top: 10%;
  left: 6%;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
}

:deep(.el-dialog__body) {
  padding-top: unset !important;
}

.el-tabs {
  --el-border-color-light: #2E77E3;
  --el-tabs-header-height: 48px;

  :deep(.el-tabs__content) {
    overflow: visible
  }

  :deep(.el-tabs__active-bar) {
    display: none;
  }

  :deep(.el-tabs__item) {
    --el-font-size-base: 16px;
    padding-left: 24px !important;
    padding-right: 24px !important;

    &.is-active {
      color: #ffffff;
      background-color: #2E77E3;
    }
  }
}

.custom-title {
  padding: 80px 0 50px;
  text-align: center
}

.custom-title h5 {
  font-size: 30px;
  font-weight: 700;
  line-height: 2
}

.custom-title p {
  color: #9a9a9a;
  font-size: 20px;
  line-height: 2
}

.view-more-text {
  position: sticky;
  text-align: center;
  font-size: 20px;
  color: #000;
  cursor: pointer;
  padding-bottom: 100px;
  z-index: 2 !important
}

.view-more-text .el-button {
  padding: 20px 30px
}

.resource-list {
  margin: 40px 45px;
}

.resource-item {
  background-color: #fff;
  border: 1px solid #CECECE;
  position: relative;
}

.resource-item .img {
  width: 100%;
  height: 150px;
  background: url("@/assets/images/scheme.jpg") no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-title-a {
  font-family: YouSheBiaoTiHei, system-ui;
  font-size: 36px;
  color: #fff;
  line-height: 30px;
  padding: 0px 20px;
  margin-bottom: 50px
}

.img-title-b{
  font-family: YouSheBiaoTiHei, system-ui;
  font-size: 26px;
  color: #fff;
  line-height: 30px;
  padding: 0 20px;
  margin-bottom: -50px;
}

.resource-item .img img {
  width: auto;
  max-height: 100%;
  max-width: 100%;
  display: inline-block
}

.resource-item .title {
  font-weight: 700;
  font-size: 22px;
  text-align: left;
  //height: 80px;
  //line-height: 80px
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  color: #333
}

.resource-item .text-content {
  padding: 20px 20px 20px 20px;

  .subtitle {
    font-size: 14px;
    color: #bbb8bf;
    padding-top: 5px;
  }
}

.resource-item .info {
  font-weight: 400;
  font-size: 16px;
  color: #666;
  line-height: 28px;
  margin-top: 9px;
  margin-bottom: 20px;
  height: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical
}

.service-card {
  background-color: #fff;
  margin-bottom: 30px
}

.tabs-container {
  display: flex;
  flex-direction: column
}

.tabs-header {
  display: flex;
  width: 900px;
  margin: 0 auto;
  justify-content: space-around;
  //display: flex;
  //position: relative;
  //overflow-x: auto;
  //white-space: nowrap
}

//.tabs-header div {
//  display: flex;
//  justify-content: space-around;
//}

.tabs-header button {
  display: block;
  padding: 5px 0;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  margin: 0 auto;
  font-size: 22px;
  transition: all .3s ease
}

.tabs-header button :hover {
  color: #1f4aaf
}

.tabs-header .tab-active {
  color: #1f4aaf;
  position: relative
}

.indicator {
  //position: absolute;
  //bottom: 0;
  height: 2px;
  background-color: #1f4aaf;
  transition: transform .3s ease
}

.swiper-box {
  //width: 900px;
  height: 400px;
  //position: relative;
  //overflow: hidden;
  margin: 40px 0
}

.swiper-box .swiper-list {
  //display: flex;
  //width: 99999px;
  //height: 100%;
  //overflow-x: auto;
  //position: absolute;
  //top: 0;
  //left: -300px;
  //transition: all .3s
}

.swiper-box .swiper-list .swiper-item {
  height: 100%;
  border-radius: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover
}

.swiper-box .swiper-list .swiper-item :last-child {
  margin-right: 0
}

.swiper-box .swiper-list .swiper-item .item {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  padding: 30px 20px 60px 20px;
  color: #fff;
  background-color: #00000026
}

.swiper-box .swiper-list .swiper-item .title {
  font-size: 22px;
  font-weight: 600;
  height: 40px;
  line-height: 40px;
  padding-bottom: 20px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.swiper-box .swiper-list .swiper-item .desc {
  font-size: 16px;
  line-height: 28px;
  height: 112px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical
}

.swiper-box .swiper-list .swiper-item .info {
  margin: 20px 0 0
}

.swiper-box .swiper-list .swiper-item .btn {
  border: 1px solid #fff;
  padding: 5px 20px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 20px;
}

.iframe-container {
  position: absolute;
  top: 10%;
  left: 6%
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0
}

.el-dialog__body {
  padding-top: unset !important
}

.partner-card {
  background: #fff
}

.partner-list {
  margin: 0 45px;
  padding-bottom: 80px
}

.partner-item {
  margin: 30px 40px;
  cursor: pointer
}

.partner-item .img {
  width: 160px;
  height: 70px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center
}

.partner-item .img img {
  width: auto;
  max-height: 100%;
  max-width: 100%;
  display: inline-block
}

.partner-item .title {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  margin: 10px auto 0;
  height: 36px;
  line-height: 36px;
  overflow: hidden;
  color: #333
}

.information-bottom {
  padding: 80px 0 40px
}

.info-top-item {
  position: relative;
  height: 400px;
  overflow: hidden
}

.info-top-item :hover {
  cursor: pointer
}

.info-top-item .content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 0 10px 10px;
  background-color: #10101080;
  color: #fff;
  padding: 14px 20px;
  text-overflow: ellipsis
}

.info-top-item .title {
  height: 40px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical
}

.info-top-item img {
  border-radius: 10px;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover
}

.info-bottom-item {
  margin-bottom: 40px
}

.info-bottom-item :hover {
  cursor: pointer
}

.info-bottom-item:hover .title, .info-bottom-item:hover .remark, .info-bottom-item:hover .date {
  color: #2c53ad
}

.info-bottom-item .content {
  flex: 1;
  width: 75%;
  padding-right: 200px
}

.info-bottom-item .title {
  font-size: 20px;
  color: #333;
  margin-bottom: 5px;
  line-height: 30px;
  height: 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.info-bottom-item .remark {
  font-size: 16px;
  color: #9a9a9a;
  overflow: hidden;
  line-height: 24px;
  max-height: 48px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical
}

.info-bottom-item .date {
  font-family: DIN, system-ui;
  margin: 0 15px 0 30px;
  line-height: 40px;
  height: 40px;
  font-size: 16px
}
.img-titleA {
  /* 你原来的所有样式（颜色、定位、内边距等）都保留 */
  br + * { font-size: 12px; } // 只改这行：让<br>后面的文字变小
}

</style>

