fix: 融合服务详情-申请使用, 常见问题

This commit is contained in:
guoyue 2022-07-14 10:56:04 +08:00
parent 3d223aaaf3
commit e4280e3874
2 changed files with 216 additions and 156 deletions

View File

@ -52,6 +52,13 @@
<template #icon><shopping-cart-outlined /></template>
加入购物车
</a-button> -->
<!-- 融合服务 存在fuseResourceList -->
<a-button type="primary" @click="handleAKeyApplication()" v-if="dataList.fuseResourceList">
<template #icon>
<form-outlined />
</template>
申请使用
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div>
</div>
@ -66,9 +73,16 @@
// import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
//
const router = useRouter()
const props = defineProps({
dataList: { type: Object, default: null },
})
console.log('dataList------------>', props.dataList);
// const router = useRouter()
const applicationArea = ref('')
// //
@ -95,6 +109,37 @@
// },
// })
// }
// --
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(
'applyList',
JSON.stringify(_applyList)
)
router.push({
path: '/apply',
})
}
//
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
@ -112,6 +157,8 @@
() => props.dataList,
(val) => {
if (val) {
console.log('props.dataList-----watch------->', val);
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
@ -127,6 +174,7 @@
background-size: 100%;
display: flex;
justify-content: center;
.left {
max-width: 7.2rem;
color: #fff;
@ -135,9 +183,11 @@
.top {
display: flex;
align-items: center;
span {
font-size: 0.14rem;
}
.name {
// max-width: 3.3rem;
// overflow: hidden;
@ -155,15 +205,18 @@
-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;
@ -171,15 +224,18 @@
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;
@ -189,9 +245,11 @@
-webkit-box-orient: vertical;
}
}
.bottom {
margin-top: 0.4rem;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
@ -202,12 +260,15 @@
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;
@ -215,6 +276,7 @@
}
}
}
.right {
width: 5.8rem;
height: 4rem;

View File

@ -187,14 +187,12 @@ const getIntegrationServicesDeatil = (id) => {
let questionValue = fuseAttrList.find(v => v.attrType === '常见问题') || {}
let questionObj = {
attrType: '常见问题',
attrValue: JSON.stringify(questionValue.attrValue || [])
attrValue: questionValue.attrValue || "[]"
}
let areaObj = {
attrType: '应用领域',
attrValue: detailInfoObj.value.applicationArea
}
console.log('areaObj------------>', areaObj);
combineList.value.map(item => {
let arr = (fuseResourceList.filter(v => v.resource && v.resource.type == item.title) || []).map(d => d.resource.name)
item.list = arr;