<template>
  <section class="homeRTGT">
    <section class="homeAdvertNews" v-if='bannerArr.length'>
      <el-carousel :interval="5000" arrow="always" height="200">
        <el-carousel-item v-for="(item,index) in bannerArr" :key="index">
          <img :src="item.pic" @click="appliNewsBannerlink(item,index)" />
        </el-carousel-item>
      </el-carousel>
    </section>

    <!-- 弹窗 -->
    <el-dialog title="" :visible.sync="DialogVisible" :close-on-click-modal="false" width="90%" class="dialogpic"
      center>
      <span class="dialogImg"><img :src="src" /></span>
    </el-dialog>
  </section>
</template>
<script>
export default {
  data() {
    return {
      bannerArr: [
        {
          name: "新闻",
          pic: require(`../assets/images/RTImgs/news1banner.png`),
        },
        {
          name: "新闻",
          pic: require(`../assets/images/RTImgs/news2banner.png`),
        },
      ], //广告
      DialogVisible: false,
      src: "",
    };
  },
  mounted() {},
  methods: {
    appliNewsBannerlink(item, index) {
      if (index == 0) {
        this.$parent.$parent.$parent.$parent.navtopmenuclick(6);
      } else if (index == 1) {
        this.DialogVisible = true;
        this.src = require(`../assets/images/RTImgs/智能指数评分标准.png`);
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.homeRTGT {
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
    0px 3px 6px -4px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  .htaTitle {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 18px;
    color: rgba(0, 0, 0, 0.85);
    padding: 16px;
    display: flex;
    align-items: center;
    .TitleName {
      display: flex;
      align-items: center;
      margin-right: 40px;
      i {
        width: 2px;
        height: 18px;
        background: #0e71ff;
        margin-right: 4px;
      }
      strong {
        color: rgba(0, 0, 0, 0.85);
        font-size: 16px;
      }
    }
    .TitleTab {
      flex: 1;
      em {
        margin-right: 15px;
        font-size: 16px;
        padding-bottom: 16px;
        cursor: pointer;
        &.active {
          border-bottom: 0px solid #ff7946;
          color: #ff7946;
        }
      }
    }
    .more {
      flex-wrap: 150px;
      font-size: 14px;
      cursor: pointer;
    }
  }
  .htaBox {
    padding: 16px 0 16px 16px;
    ul {
      display: flex;
      flex-wrap: wrap;
      align-content: flex-start;

      li {
        background: #fff;
        width: 140px;
        height: 100px;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        padding: 16px;
        margin-right: 16px;
        margin-bottom: 16px;
        align-items: center;
        text-align: center;
        span {
          margin-bottom: 8px;
          img {
            width: 48px;
            height: 48px;
          }
          strong {
            color: rgba(0, 0, 0, 0.85);
            font-size: 14px;
            font-weight: normal;
          }
        }
      }
    }
  }
  .scrollbarClass {
    .el-scrollbar__wrap {
      overflow: scroll !important;
      height: calc(100% + 20px) !important; //多出来的20px是横向滚动条默认的样式
    }
    .el-table--scrollable-x .el-table__body-wrapper {
      overflow-x: hidden !important;
    }
  }

  .htaBoxIntel {
    ul {
      &.zslist {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 158px;
        overflow: auto;
        li {
          display: flex;
          line-height: 24px;
          padding: 5px 0;
          cursor: pointer;
          i {
            width: 11px;
            margin-left: 16px;
            margin-right: 16px;
          }
          em {
            flex: 1;
          }
          b {
            width: 30px;
            margin-right: 40px;
            color: rgba(0, 0, 0, 0.85);
          }
        }
      }
    }
  }

  .sdlist {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 158px;
    overflow: auto;
    li {
      padding: 5px;
      cursor: pointer;
      line-height: 24px;
    }
  }

  .dialogImg {
    img {
      width: 100%;
    }
  }
}
</style>
<style lang="scss">
.dialogpic .el-dialog--center .el-dialog__body {
  height: 700px;
  overflow: auto;
}

.homeAdvertNews {
  img {
    height: 193px;
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
  }
  .el-carousel__container {
    height: 193px !important;
  }
}
</style>
<style lang="scss" scoped>
.newsContent {
  display: flex;
  flex-direction: column;
  h3 {
    text-align: center;
    margin-bottom: 10px;
  }
  .linebottom {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(0, 0, 0, 0.65);
    em {
      color: #0f71ff;
      margin-right: 30px;
    }
    b {
      strong {
        font-weight: normal;
      }
    }
  }
  .nr {
  }
  .fj {
    ul {
      li {
        cursor: pointer;
        color: #0e71ff;
        text-decoration: underline;
      }
    }
  }
}
</style>