Newer
Older
KaiFengPC / src / views / sponeScreen / projectHM / gongchenkanbani_comp / jianseduibi.vue
@zhangdeliang zhangdeliang on 15 Jul 3 KB update
<template>
  <!-- 项目建设完成图片 -->
  <div class="XiangXiXinXi">
    <div class="xiangxinfo jszp">
      <el-carousel trigger="click" type="card" height="347px" v-if="allFileList.length > 0">
        <el-carousel-item v-for="item in allFileList" :key="item">
          <el-image
            class="img_age"
            preview-teleported
            :src="item.url"
            :zoom-rate="1.2"
            :max-scale="7"
            :min-scale="0.2"
            :preview-src-list="[item.url]"
            :initial-index="4"
          />
        </el-carousel-item>
      </el-carousel>
      <el-empty :image-size="30" v-else />
    </div>
  </div>
</template>
<script setup name="XiangXiXinXi">
import { selectProjectImageList } from '@/api/sponeScreen/gcpjApi';
import bus from '@/bus';
const projectDate = ref({});
// const xmxtgcl = ref([{ label: '道路长度公里', props: 'projectName' }]);
// const xmmbList = ref([{ label: '径流总量控制目标(%)', props: 'annualRunoffTotalControlRate' }]);
const allImages = ref({});
const allFileList = computed(() => {
  return [...(allImages.value?.preConstructionFileList || []), ...(allImages.value?.postConstructionFileList || [])];
});
async function selectProjectImage(p) {
  let { data } = await selectProjectImageList(p);
  allImages.value = data[0];
}
onMounted(() => {
  bus.on('getProjectDate', v => {
    // debugger
    projectDate.value = v;
    selectProjectImage({ projectNo: v.projectNo });
  });
});
</script>

<style lang="scss" scoped>
.XiangXiXinXi {
  display: flex;
  flex-direction: column;
  overflow: auto;
  overflow-x: hidden;
  height: 100%;
  color: #fff;

  .xiangxinfo {
    margin-top: 20px;
    .img {
      width: 100%;
      margin: 10px 0;
      text-align: center;
      font-weight: 500;
      font-size: 14px;
      color: #ffffff;
      line-height: 36px;
      overflow: hidden;
      overflow-y: scroll;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-row-gap: 10px;
      grid-column-gap: 10px;
      position: relative;

      img {
        width: 100%;
        height: 100%;
      }
    }
    .ing_under {
      // width: 200px;
      // text-align: center;
      font-weight: 700;
      font-size: 18px;
      line-height: 40px;
      padding-left: 10px;
      // position: absolute;
      // top: 50px;
      // left: 111px;
    }

    display: flex;
    font-size: 12px;
    background: linear-gradient(0deg, #005cba 0%, #000f26 100%);
    .label_xnmx {
      height: 88px;
      padding: 10px;

      .title_class {
        .content {
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow: hidden;
          width: 100%;
          margin: 3px;
          text-align: center;
        }

        .top {
          height: 100%;
          width: 100%;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 4;
          -webkit-box-orient: vertical;
        }
      }
    }
  }

  .jszp {
    background: transparent;
    // height: 180px;
    display: block !important;
  }

  .projectMb {
    height: 36px;
    line-height: 36px;
    text-indent: 24px;
    background: #17b4e7;
    opacity: 0.5;
  }
}

.title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.xmzb {
  .label_xnmx {
    flex: 1 !important;
  }
}
.img_age {
  width: 500px;
  height: 347px;
}
</style>