<template> <div class="XiangXiXinXi"> <!-- <div class="projectMb"> <span class="title">项目建设目的</span> </div> <div class="xiangxinfo xmzb"> <div v-for="i in xmmbList" :key="i.props" class="label_xnmx"> <div class="title_class"> <div class="top" :title="projectDate.constructionPurpose">{{ projectDate.constructionPurpose }}</div> </div> </div> </div> <div class="projectMb" style="margin-top: 20px;"> <span class="title">项目建设完成情况</span> </div> <div class="xiangxinfo xmzb"> <div v-for="i in xmxtgcl" :key="i.props" class="label_xnmx"> <div class="title_class"> <div class="top" :title="projectDate.constructionAchievements">{{ projectDate.constructionAchievements }} </div> </div> </div> </div> --> <div class="projectMb" style="margin-top: 20px"> <span class="title">建设照片</span> </div> <div class="xiangxinfo jszp"> <!-- <div class="ing_under">建设前</div> --> <div class="img" v-if="allFileList.length"> <el-image v-for="item in allFileList" class="img_age" :preview-src-list="[item.url]" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :src="item.url" alt="" /> </div> <el-empty :image-size="30" v-else /> </div> </div> </template> <script setup name="XiangXiXinXi"> import { inject } from 'vue'; 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 { .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; } } </style>