详情页收藏按钮

This commit is contained in:
a0049873 2022-07-15 17:32:47 +08:00
parent 60e26e151c
commit 3b10007619
6 changed files with 442 additions and 282 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:41:52 * @LastEditTime: 2022-07-15 17:30:19
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -75,6 +77,7 @@
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
// console.log('==================>', props.dataList.isCollect)
const router = useRouter() const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
const deploymentLocation = ref('') // const deploymentLocation = ref('') //
@ -121,12 +124,38 @@
} }
const componentType = ref('') const componentType = ref('')
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
}) scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
if (props.dataList.infoList) { if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12 * @LastEditTime: 2022-07-15 17:30:26
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -53,236 +53,265 @@
加入购物车 加入购物车
</a-button> --> </a-button> -->
<!-- 融合服务 存在fuseResourceList --> <!-- 融合服务 存在fuseResourceList -->
<a-button type="primary" @click="handleAKeyApplication()" v-if="dataList.fuseResourceList"> <a-button
type="primary"
@click="handleAKeyApplication()"
v-if="dataList.fuseResourceList"
>
<template #icon> <template #icon>
<form-outlined /> <form-outlined />
</template> </template>
申请使用 申请使用
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
</div> </div>
</template> </template>
<script setup> <script setup>
// import { ShoppingCartOutlined } from '@ant-design/icons-vue' // import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
// import { sgcInsert } from '@/api/home' // import { sgcInsert } from '@/api/home'
// import { useRouter } from 'vue-router' // import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus' // import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
// //
const router = useRouter() const router = useRouter()
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
})
console.log('dataList------------>', props.dataList);
// const router = useRouter()
const applicationArea = ref('')
// //
// const addShoppingCart = () => {
// console.log('==================>', props.dataList)
// sgcInsert({
// delFlag: '0',
// resourceId: props.dataList.id,
// // userId: userId.value,
// }).then((res) => {
// console.log(res)
// message.success('')
// mybus.emit('getSgcNum')
// })
// }
// //
// function toView() {
// // window.open(newpage.href, '_blank')
// router.push({
// path: '/apply',
// query: {
// name: props.dataList.name,
// resourceId: [props.dataList.id],
// },
// })
// }
// --
const handleAKeyApplication = () => {
let _applyList = [];
(props.dataList.fuseResourceList || []).map(v => {
let resource = v.resource || {}
let obj = {
arr: [
{
delFlag: resource.delFlag,
description: resource.description,
resourceId: resource.id,
resourceName: resource.name,
time: resource.createDate,
type: resource.type,
},
],
deptId: resource.deptId,
deptName: resource.deptName,
}
_applyList.push(obj)
}) })
localStorage.setItem( console.log('dataList------------>', props.dataList)
'applyList',
JSON.stringify(_applyList)
)
router.push({
path: '/apply',
})
}
// // const router = useRouter()
const goTOCollection = () => { const applicationArea = ref('')
console.log('收藏===================》', props.dataList) // //
scInsert([{ resourceId: props.dataList.id }]).then((res) => { // const addShoppingCart = () => {
console.log(res) // console.log('==================>', props.dataList)
message.success('收藏成功') // sgcInsert({
}) // delFlag: '0',
} // resourceId: props.dataList.id,
if (props.dataList.infoList) { // // userId: userId.value,
applicationArea.value = props.dataList.infoList.filter( // }).then((res) => {
(val) => val.attrType === '应用领域' // console.log(res)
)[0].attrValue // message.success('')
} // mybus.emit('getSgcNum')
watch( // })
() => props.dataList, // }
(val) => { // //
if (val) { // function toView() {
console.log('props.dataList-----watch------->', val); // // window.open(newpage.href, '_blank')
// router.push({
// path: '/apply',
// query: {
// name: props.dataList.name,
// resourceId: [props.dataList.id],
// },
// })
// }
// --
const handleAKeyApplication = () => {
let _applyList = []
;(props.dataList.fuseResourceList || []).map((v) => {
let resource = v.resource || {}
let obj = {
arr: [
{
delFlag: resource.delFlag,
description: resource.description,
resourceId: resource.id,
resourceName: resource.name,
time: resource.createDate,
type: resource.type,
},
],
deptId: resource.deptId,
deptName: resource.deptName,
}
_applyList.push(obj)
})
applicationArea.value = props.dataList.infoList.filter( localStorage.setItem('applyList', JSON.stringify(_applyList))
(val) => val.attrType === '应用领域' router.push({
)[0].attrValue path: '/apply',
} })
} }
)
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
watch(
() => props.dataList,
(val) => {
if (val) {
console.log('props.dataList-----watch------->', val)
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.algorithm-top-details { .algorithm-top-details {
height: 6rem; height: 6rem;
padding: 1.8rem 0 0; padding: 1.8rem 0 0;
background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat; background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat;
background-size: 100%;
display: flex;
justify-content: center;
.left {
max-width: 7.2rem;
color: #fff;
margin-right: 0.8rem;
.top {
display: flex;
align-items: center;
span {
font-size: 0.14rem;
}
.name {
// max-width: 3.3rem;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
font-size: 0.4rem;
margin-right: 0.2rem;
font-size: 0.4rem;
margin-right: 0.2rem;
max-width: 7rem;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.label-content {
position: relative;
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
top: 0;
}
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: rgba(255, 255, 255, 0.4);
}
}
.main {
margin-top: 0.2rem;
font-size: 0.18rem;
line-height: 0.34rem;
&>div:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&>div:nth-of-type(2) {
max-height: 1rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
.bottom {
margin-top: 0.4rem;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
background: #ff8b55;
border-radius: 0.06rem;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
}
.ant-btn:nth-of-type(1) {
width: 1.8rem;
}
.ant-btn:nth-of-type(2) {
width: 2.2rem;
}
.ant-btn:nth-of-type(3) {
width: 1.45rem;
background: #fff;
color: #526aff;
}
}
}
.right {
width: 5.8rem;
height: 4rem;
background: url('~@/assets/detailsAll/sf_right_bg.png') no-repeat;
background-size: 100%; background-size: 100%;
margin-top: -0.4rem; display: flex;
justify-content: center;
.left {
max-width: 7.2rem;
color: #fff;
margin-right: 0.8rem;
.top {
display: flex;
align-items: center;
span {
font-size: 0.14rem;
}
.name {
// max-width: 3.3rem;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
font-size: 0.4rem;
margin-right: 0.2rem;
font-size: 0.4rem;
margin-right: 0.2rem;
max-width: 7rem;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.label-content {
position: relative;
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
top: 0;
}
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: rgba(255, 255, 255, 0.4);
}
}
.main {
margin-top: 0.2rem;
font-size: 0.18rem;
line-height: 0.34rem;
& > div:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& > div:nth-of-type(2) {
max-height: 1rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
.bottom {
margin-top: 0.4rem;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
background: #ff8b55;
border-radius: 0.06rem;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
}
.ant-btn:nth-of-type(1) {
width: 1.8rem;
}
.ant-btn:nth-of-type(2) {
width: 2.2rem;
}
.ant-btn:nth-of-type(3) {
width: 1.45rem;
background: #fff;
color: #526aff;
}
}
}
.right {
width: 5.8rem;
height: 4rem;
background: url('~@/assets/detailsAll/sf_right_bg.png') no-repeat;
background-size: 100%;
margin-top: -0.4rem;
}
} }
}
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:27 * @LastEditTime: 2022-07-15 17:31:32
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -62,7 +62,9 @@
</template> </template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -71,7 +73,7 @@
<script setup> <script setup>
import { ShoppingCartOutlined } from '@ant-design/icons-vue' import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -125,12 +127,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
}) scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
if (props.dataList.infoList) { if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter( businessArea.value = props.dataList.infoList.filter(

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:59 * @LastEditTime: 2022-07-15 17:32:08
* @Description: 开发组件详情页头部 * @Description: 开发组件详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -120,12 +122,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
}) scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
const componentType = ref('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:43:18 * @LastEditTime: 2022-07-15 17:32:31
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -120,12 +122,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
}) scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
const componentType = ref('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {

View File

@ -136,7 +136,7 @@
</div> </div>
</div> </div>
<div class="dec"> <div class="dec">
<div <!-- <div
v-if=" v-if="
selectCardsname !== '基础设施' && selectCardsname !== '基础设施' &&
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
@ -144,49 +144,54 @@
" "
> >
<span>{{ item.shareType || '--' }}</span> <span>{{ item.shareType || '--' }}</span>
</div> </div> -->
<div v-if="selectCardsname !== '融合服务'"> <div v-if="selectCardsname !== '融合服务'">
<span>{{ item.deptName || '--' }}</span> <span>{{ item.deptName || '--' }}</span>
</div> </div>
<div v-if="selectCardsname !== '基础设施'">
<a-tooltip>
<template #title>{{ item.description }}</template>
{{ item.description || '--' }}
</a-tooltip>
</div>
</div> </div>
<div class="bottom" v-if="selectCardsname !== '基础设施'"> <div
<div> v-if="selectCardsname !== '基础设施'"
<div style="margin-top: 0.1rem"
v-if=" class="description"
selectCardsname !== '数据资源' && >
selectCardsname !== '融合服务' <a-tooltip>
" <template #title>{{ item.description }}</template>
> {{ item.description || '--' }}
浏览量{{ item.visits || 0 }} </a-tooltip>
</div>
<div class="btn">
<div class="bottom" v-if="selectCardsname !== '基础设施'">
<div>
<div
v-if="
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
浏览量{{ item.visits || 0 }}
</div>
<div
v-if="
selectCardsname !== '应用资源' &&
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
申请量{{ item.applyCount || 0 }}
</div>
<div
v-if="
selectCardsname === '数据资源' &&
selectCardsname !== '融合服务'
"
>
数据量{{ item.sjlCount || 0 }}
</div>
<div v-if="selectCardsname !== '数据资源'">
收藏量{{ item.collectCount || 0 }}
</div>
</div> </div>
<div <!-- <div class="pingfen">
v-if="
selectCardsname !== '应用资源' &&
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
申请量{{ item.applyCount || 0 }}
</div>
<div
v-if="
selectCardsname === '数据资源' &&
selectCardsname !== '融合服务'
"
>
数据量{{ item.sjlCount || 0 }}
</div>
<div v-if="selectCardsname !== '数据资源'">
收藏量{{ item.collectCount || 0 }}
</div>
</div>
<!-- <div class="pingfen">
<a-tooltip placement="top" mouseEnterDelay="1"> <a-tooltip placement="top" mouseEnterDelay="1">
<a-rate <a-rate
:value="item.score || 0" :value="item.score || 0"
@ -195,8 +200,7 @@
/> />
</a-tooltip> </a-tooltip>
</div> --> </div> -->
</div> </div>
<div class="btn">
<div class="right" v-if="selectCardsname !== '基础设施'"> <div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey"> <div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'"> <template v-if="selectCardsname == '组件服务'">
@ -916,7 +920,7 @@
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
div:nth-child(3) { div:nth-child(2) {
max-width: 200px; max-width: 200px;
display: -webkit-box; display: -webkit-box;
/*设置为弹性盒子*/ /*设置为弹性盒子*/
@ -1049,4 +1053,18 @@
} }
} }
} }
.description {
max-width: 990px;
height: 52px;
font-size: 14px;
line-height: 18px;
display: -webkit-box;
-webkit-line-clamp: 3;
/*最多显示3行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*超出显示为省略号*/
-webkit-box-orient: vertical;
}
</style> </style>