Newer
Older
KaiFengPC / src / views / sponeScreen / longYW / PublicAdvice.vue
@zhangdeliang zhangdeliang 23 days ago 2 KB update
<template>
  <div class="partTitleHM">公众建议</div>
  <div class="ConstrucClass" v-loading="loading">
    <div class="MainBox" v-for="(item, index) in tableData" :key="index">
      <div class="AvatarAppearance">
        <div class="NameTime">
          <div class="Namea">{{ item.wechatName }}</div>
          <div class="Timea">{{ item.createTime || '--' }}</div>
        </div>
      </div>
      <div class="below">
        <div class="belowNr">{{ item.opinion }}</div>
        <div class="belowZp">
          <img :src="item1.url" v-for="(item1, index1) in item.filelist" :key="index1" />
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { peopleOpinionPage } from '@/api/publicService/index';

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

/** 获取搜索数据列表 */
function getDataList() {
  loading.value = true;
  peopleOpinionPage(queryParams.value).then(response => {
    tableData.value = response.data || [];
    loading.value = false;
  });
}

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

<style lang="scss" scoped>
.ConstrucClass {
  width: 460px;
  height: 30%;
  background: #004565;
  overflow-y: auto;
  margin-top: -3px;
  .MainBox {
    width: 93%;
    background: #035c8a;
    opacity: 0.8;
    margin: 5px auto;
    margin-top: 10px;

    .AvatarAppearance {
      width: 100%;
      display: flex;
      align-items: center;
      margin: 5px 15px;
      .NameTime {
        flex: 1;
        height: 60px;
        .Namea {
          width: 100%;
          height: 30px;
          line-height: 30px;
          color: #fff;
          font-size: 16px;
          font-family: SourceHanSansCN-Medium;
          font-weight: 800;
        }
        .Timea {
          width: 100%;
          height: 30px;
          line-height: 30px;
          color: #3afff8;
          font-size: 16px;
          font-family: SourceHanSansCN-Medium;
          font-weight: 400;
        }
      }
    }
    .below {
      width: 100%;
      .belowNr {
        width: 95%;
        color: #fff;
        font-size: 14px;
        font-family: SourceHanSansCN-Medium;
        font-weight: 200;
        margin-left: 15px;
      }
      .belowZp {
        display: flex;
        margin: 10px 0px 10px 15px;
        img {
          width: 30%;
          margin-right: 1%;
          margin-bottom: 5px;
        }
      }
    }
  }
  .scroll {
    width: 100%;
    height: calc(100% - 2%);
    overflow: hidden;
    display: inline-block;
    // background: red;
  }
}
</style>