Newer
Older
KaiFengPC / src / views / sponeScreen / waterFlood / floodWZ.vue
@zhangdeliang zhangdeliang on 24 Jun 1 KB update
<template>
  <!-- 防汛物资 -->
  <div class="floodWZPage">
    <div class="partTitleHM">防汛物资</div>
    <div class="partContHM">
      <div class="scrollMapHM">
        <div class="scrollTitle flex">
          <p>物资储备地点</p>
          <p>物资详情</p>
          <p>负责人</p>
        </div>
        <Vue3SeamlessScroll :list="dataList" :singleHeight="50" :singleWaitTime="2000" :hover="true" class="scroll">
          <div class="scrollCont flex" v-for="item in dataList" :key="item.id">
            <p class="ellipsis" :title="item.address">{{ item.address }}</p>
            <p class="ellipsis" :title="item.materialDetails">{{ item.materialDetails }}</p>
            <p class="ellipsis">{{ item.header }}<br />{{ item.headerPhone }}</p>
          </div>
        </Vue3SeamlessScroll>
      </div>
    </div>
  </div>
</template>

<script setup>
import { FloodPreventionMaterialList } from '@/api/longoPeration/MaterialManagement';
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';

const { proxy } = getCurrentInstance();

const dataList = ref([]);
const loading = ref(true);

/** 查询列表 */
const getList = async () => {
  loading.value = true;
  let res = await FloodPreventionMaterialList({});
  if (res && res.code == 200) {
    dataList.value = res.data || [];
    console.log(dataList.value);
  }
  loading.value = false;
};
onMounted(() => {
  getList();
});
</script>

<style lang="scss" scoped>
.floodWZPage {
  width: 100%;
  .scrollMapHM {
    height: 270px;
    p {
      width: 30%;
    }
    .scroll {
      height: 230px;
    }
  }
}
</style>