Newer
Older
KaiFengPC / src / views / sponeScreen / longYW / PromotionTraining.vue
@鲁yixuan 鲁yixuan on 23 Jul 2 KB update
<template>
  <div class="longYW">
    <div class="partTitleHM">宣传培训</div>
    <div class="ConstrucClass">
      <!-- <Vue3SeamlessScroll :list="tableData" :singleHeight="110" :singleWaitTime="1500" :hover="true" class="scroll"> -->
      <div class="PublicityContent" v-for="item in tableData" @click="zpClck(item)">
        <div class="PublicityContentZP">
          <img :src="item.filelist[0].url" alt="" class="zp" />
        </div>
        <div class="PublicityContentlR">
          <div class="PublicityContentXM" :title="item.address">
            <span>{{ item.address }}</span>
          </div>
          <div class="PublicityContentTime">
            <span>发布时间</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <span>{{ item.trainTime }}</span>
          </div>
        </div>
      </div>
      <!-- </Vue3SeamlessScroll> -->
    </div>
  </div>
</template>

<script setup>
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { specialNavPage } from '@/api/publicService/index';
const tableData = ref([]);
const allData = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 10,
  },
});
const { queryParams } = toRefs(allData);
// 照片点击
function zpClck(val) {
  window.open(val.linkUrl);
}

/** 获取查询数据列表 */
function getDataList() {
  specialNavPage(queryParams.value).then(response => {
    tableData.value = response.data;
    console.log(tableData.value, ' tableData.value ');
  });
}
onMounted(() => {
  getDataList();
});
</script>

<style lang="scss" scoped>
.longYW {
  margin-top: 10px;
  width: 460px;
  height: 30%;
  background: #004565;
  opacity: 0.8;
  .ConstrucClass {
    height: calc(100% - 18%);
    overflow: hidden;
    overflow-y: auto;
    // background: red;
    .scroll {
      margin-top: 5px;
      width: 100%;
      height: calc(100% - 10%);
      overflow: hidden;
      display: inline-block;
    }
  }
  .PublicityContent {
    margin: 5px;
    width: 97%;
    height: 90px;
    background: #325ca3c4;
    position: relative;
    display: flex;
    cursor: pointer;
    .PublicityContentZP {
      width: 20%;
      height: 90px;
      .zp {
        width: 80px;
        height: 80px;
        margin: auto;
        margin-top: 5px;
      }
    }
    .PublicityContentlR {
      width: 80%;
      height: 90px;
      margin-left: 5px;

      .PublicityContentXM {
        width: 100%;
        height: 60%;
        display: flex;
        align-items: center;
        span {
          height: 60%;
          font-size: 16px;
          color: #e4f5ff;
          overflow: hidden;
          white-space: nowrap; /* 防止文字换行 */
          text-overflow: ellipsis; /* 超出部分显示省略号 */
        }
      }
      .PublicityContentTime {
        width: 100%;
        height: 40%;
        font-size: 15px;
        // background: yellowgreen;
        color: #5b93eb;
        line-height: 20px;
      }
    }
  }
}
</style>