cim前两个

This commit is contained in:
gaoyuanwei 2022-08-19 14:50:41 +08:00
parent b2effa3c14
commit 9d075bda9c
1 changed files with 25 additions and 28 deletions

View File

@ -13,10 +13,13 @@
@slideChange="onSlideChange" @slideChange="onSlideChange"
> >
<swiper-slide v-for="item in platformList" :key="item.id"> <swiper-slide v-for="item in platformList" :key="item.id">
<div class="platformBox"> <div class="platformBox" @click.stop="toView(item)">
<h2>{{ item.name }}</h2> <h2>{{ item.name }}</h2>
<a-image :preview="false" :src="item.pic" :fallback="item.pic2" /> <a-image :preview="false" :src="item.pic" :fallback="item.pic2" />
<a-tooltip>
<template #title>{{ item.description }}</template>
<p>{{ item.description }}</p> <p>{{ item.description }}</p>
</a-tooltip>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
@ -30,33 +33,10 @@
import { Swiper, SwiperSlide } from 'swiper/vue/swiper-vue.js' import { Swiper, SwiperSlide } from 'swiper/vue/swiper-vue.js'
import 'swiper/swiper-bundle.min.css' import 'swiper/swiper-bundle.min.css'
import { getCIMApplyApplicationList } from '@/api/cimSpecialArea' import { getCIMApplyApplicationList } from '@/api/cimSpecialArea'
import { useRouter } from 'vue-router'
const router = useRouter()
const modules = ref([Pagination]) const modules = ref([Pagination])
const platformList = ref([ const platformList = ref([])
// {
// name: 'CIM+',
// img: require('@/assets/capacitySquare/yyzy.jpg'),
// content:
// 'CIM+',
// },
// {
// name: 'CIM+',
// img: require('@/assets/capacitySquare/yyzy.jpg'),
// content:
// 'CIM+',
// },
// {
// name: 'CIM+',
// img: require('@/assets/capacitySquare/yyzy.jpg'),
// content:
// 'CIM+',
// },
// {
// name: 'CIM+',
// img: require('@/assets/capacitySquare/yyzy.jpg'),
// content:
// 'CIM+',
// },
])
getCIMApplyApplicationList().then((res) => { getCIMApplyApplicationList().then((res) => {
if (res.status === 200) { if (res.status === 200) {
res.data.data.map((val) => { res.data.data.map((val) => {
@ -69,6 +49,16 @@
platformList.value.push(...res.data.data) platformList.value.push(...res.data.data)
} }
}) })
const toView = (data) => {
console.log('111111111111111111===========>', data)
const newpage = router.resolve({
path: '/details',
query: {
id: data.id,
},
})
window.open(newpage.href, '_blank')
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.box { .box {
@ -84,6 +74,7 @@
border-bottom: 0.01rem solid #bcbdbd; border-bottom: 0.01rem solid #bcbdbd;
} }
.platformBox { .platformBox {
cursor: pointer;
width: 5.34rem; width: 5.34rem;
height: 5.65rem; height: 5.65rem;
padding: 0.28rem 0.35rem; padding: 0.28rem 0.35rem;
@ -106,6 +97,12 @@
p { p {
font-size: 0.18rem; font-size: 0.18rem;
margin: 0.2rem 0 0; margin: 0.2rem 0 0;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-all;
} }
} }
:deep(.swiper) { :deep(.swiper) {