Newer
Older
KaiFengPC / src / views / sponeScreen / longYW / PublicAdvice.vue
@鲁yixuan 鲁yixuan on 5 Jul 3 KB update
<template>
  <div class="partTitleHM">公众建议</div>
  <div class="ConstrucClass">
    <Vue3SeamlessScroll :list="tableData" :hover="true" class="scroll" :limitScrollNum="2">
      <div class="MainBox" v-for="(item, index) in tableData" :key="index">
        <div class="AvatarAppearance">
          <div class="zp">
            <img :src="item.headImg" alt="" class="txclass" />
          </div>
          <div class="NameTime">
            <p class="Namea">{{ item.wechatName }}</p>
            <p class="Timea">{{ item.publishTime }}</p>
          </div>
        </div>
        <div class="below">
          <p class="belowNr">{{ item.opinion }}</p>
          <div class="belowZp" v-for="(item1, index1) in item.filelist" :key="index1">
            <el-image :src="item1.url" :preview-src-list="[item1.url]" style="width: 100px; height: 50px; margin-top: 5px"> </el-image>
          </div>
        </div>
      </div>
    </Vue3SeamlessScroll>
  </div>
</template>

<script setup>
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { peopleOpinionPage } from '@/api/publicService/index';

const tableData = ref([]);
const photo = ref([]);
const allData = reactive({
  zp: [],
  queryParams: {
    pageNum: 1,
    pageSize: 10,
  },
});
const { queryParams } = toRefs(allData);

/** 获取查询数据列表 */
function getDataList() {
  peopleOpinionPage(queryParams.value).then(response => {
    tableData.value = response.data;
  });
}

onMounted(() => {
  getDataList();
});
</script>

<style lang="scss" scoped>
.ConstrucClass {
  width: 460px;
  height: 30%;
  background: #004565;
  opacity: 0.8;
  // overflow-y: auto;
  // overflow-x: hidden;
  .MainBox {
    width: 95%;
    // height: 150px;
    background: #325ca3c4;
    margin: auto;
    position: relative;
    top: 10px;

    .AvatarAppearance {
      width: 100%;
      height: 60px;
      display: flex;
      justify-content: space-around;
      margin: 5px;

      .zp {
        width: 20%;
        height: 60px;

        .txclass {
          width: 50px;
          height: 50px;
          border-radius: 25px;

          position: relative;
          top: 5px;
          left: 18px;
        }
      }
      .NameTime {
        width: 80%;
        height: 60px;
        .Namea {
          width: 100%;
          height: 30px;

          display: flex;
          align-items: center;
          color: #b3e3ff;
          font-size: 15px;
          font-family: SourceHanSansCN-Medium;
          font-weight: 400;
        }
        .Timea {
          width: 100%;
          height: 30px;
          color: #5b93eb;
          font-size: 16px;
          font-family: SourceHanSansCN-Medium;
          font-weight: 400;
        }
      }
    }
    .below {
      width: 100%;
      padding-bottom: 10px;

      .belowNr {
        width: 95%;
        color: #b3e3ff;
        font-size: 15px;
        font-family: SourceHanSansCN-Medium;
        font-weight: 400;
        margin-left: 15px;
      }
      .belowZp {
        margin-left: 15px;
        display: inline-block;
        // background: red;
      }
    }
  }
  .scroll {
    width: 100%;
    height: calc(100% - 2%);
    overflow: hidden;
    display: inline-block;
    // background: red;
  }
}
</style>