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> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> --> </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> <a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div> </div>
</div> </div>
@ -66,9 +73,16 @@
// 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'
//
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 router = useRouter()
const applicationArea = ref('') 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 = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
@ -112,6 +157,8 @@
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
console.log('props.dataList-----watch------->', val);
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
@ -127,6 +174,7 @@
background-size: 100%; background-size: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
.left { .left {
max-width: 7.2rem; max-width: 7.2rem;
color: #fff; color: #fff;
@ -135,9 +183,11 @@
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
span { span {
font-size: 0.14rem; font-size: 0.14rem;
} }
.name { .name {
// max-width: 3.3rem; // max-width: 3.3rem;
// overflow: hidden; // overflow: hidden;
@ -155,15 +205,18 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.label-content { .label-content {
position: relative; position: relative;
} }
.lable-father { .lable-father {
position: absolute; position: absolute;
min-width: 3.5rem; min-width: 3.5rem;
right: -3.5rem; right: -3.5rem;
top: 0; top: 0;
} }
.label { .label {
padding: 0.01rem 0.1rem; padding: 0.01rem 0.1rem;
margin-right: 0.1rem; margin-right: 0.1rem;
@ -171,15 +224,18 @@
background: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.4);
} }
} }
.main { .main {
margin-top: 0.2rem; margin-top: 0.2rem;
font-size: 0.18rem; font-size: 0.18rem;
line-height: 0.34rem; line-height: 0.34rem;
&>div:nth-of-type(1) { &>div:nth-of-type(1) {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
&>div:nth-of-type(2) { &>div:nth-of-type(2) {
max-height: 1rem; max-height: 1rem;
overflow: hidden; overflow: hidden;
@ -189,9 +245,11 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
} }
.bottom { .bottom {
margin-top: 0.4rem; margin-top: 0.4rem;
display: flex; display: flex;
.ant-btn { .ant-btn {
height: 0.5rem; height: 0.5rem;
margin-right: 0.2rem; margin-right: 0.2rem;
@ -202,12 +260,15 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.ant-btn:nth-of-type(1) { .ant-btn:nth-of-type(1) {
width: 1.8rem; width: 1.8rem;
} }
.ant-btn:nth-of-type(2) { .ant-btn:nth-of-type(2) {
width: 2.2rem; width: 2.2rem;
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 1.45rem; width: 1.45rem;
background: #fff; background: #fff;
@ -215,6 +276,7 @@
} }
} }
} }
.right { .right {
width: 5.8rem; width: 5.8rem;
height: 4rem; height: 4rem;

View File

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