forked from drone/command-center-dashboard

罗广辉
2025-04-21 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7
src/hooks/components/EventPopUpBox.vue
@@ -16,7 +16,7 @@
               fit="cover"
               :preview-src-list="[info.url]"
               preview-teleported
            />
            ></el-image>
            <video v-else :src="info.url" autoplay muted playsinline preload="metadata" />
         </div>
@@ -31,7 +31,8 @@
   </div>
</template>
<script setup>
import { ElImage } from 'element-plus'
import { ElImage, ElIcon } from 'element-plus'
// src="@/assets/images/home/useEventOperate/eventErr.png"
import { Close } from '@element-plus/icons-vue'
import { getEventDetails } from '@/api/home/aggregation'
@@ -53,10 +54,20 @@
   loading.value = true
   const res = await getEventDetails({ id: props.data.eventId })
   info.value = res.data.data
   info.value.url = import.meta.env.VITE_APP_AIRLINE_URL + info.value.url
   info.value.url = disposeUrl(info.value)
   loading.value = false
})
const disposeUrl = ({ url, media_type }) => {
   if (media_type == 'PHOTO_TYPE') {
      const parts = url.split('.')
      parts[parts.length - 2] += '_small' // 在最后一个点前插入 _small
      return import.meta.env.VITE_APP_AIRLINE_URL + parts.join('.')
   }
   return import.meta.env.VITE_APP_AIRLINE_URL + url
}
</script>
<style scoped lang="scss">
@@ -108,7 +119,8 @@
         margin-right: 10px;
         > img,
         video {
         video,
         div {
            width: 100%;
            height: 100%;
         }