BUG修改
This commit is contained in:
parent
4930027d67
commit
f36e2bbffc
|
@ -22,16 +22,29 @@
|
|||
</div>
|
||||
<div class="bottom" v-show="selectFlag2">
|
||||
<span class="light"></span>
|
||||
<div v-for="val in dictList" :key="val" @click="changeAreaFunction(val)">
|
||||
<div
|
||||
v-for="val in dictList"
|
||||
:key="val"
|
||||
@click="changeAreaFunction(val)"
|
||||
>
|
||||
{{ val }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="algorithm-class">
|
||||
<div v-for="(item, index) in dataList" :key="`algorithm-${index}`" class="algorithm-card">
|
||||
<a-image :src="item.pic" :width="525" :height="275" :fallback="imgSrc"
|
||||
:preview="false"></a-image>
|
||||
<div
|
||||
v-for="(item, index) in dataList"
|
||||
:key="`algorithm-${index}`"
|
||||
class="algorithm-card"
|
||||
>
|
||||
<a-image
|
||||
:src="item.pic || imgSrc"
|
||||
:width="525"
|
||||
:height="275"
|
||||
:fallback="imgSrc"
|
||||
:preview="false"
|
||||
></a-image>
|
||||
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.name }}</template>
|
||||
|
@ -72,14 +85,14 @@ const params = {
|
|||
pageNum: 1,
|
||||
type: '图层服务',
|
||||
area: typeName2.value == '全部' ? '' : typeName2.value,
|
||||
pageSize: 9 // 固定9
|
||||
pageSize: 9, // 固定9
|
||||
}
|
||||
|
||||
// 切换领域
|
||||
const changeAreaFunction = (val) => {
|
||||
params.pageNum = 1;
|
||||
params.pageNum = 1
|
||||
typeName2.value = val
|
||||
params.area = typeName2.value == '全部' ? '' : typeName2.value;
|
||||
params.area = typeName2.value == '全部' ? '' : typeName2.value
|
||||
selectFlag2.value = false
|
||||
pageWithAttrsFunction()
|
||||
}
|
||||
|
@ -126,9 +139,9 @@ const changeDeptType = (str) => {
|
|||
typeName.value = '企 业'
|
||||
break
|
||||
}
|
||||
params.pageNum = 1;
|
||||
params.pageNum = 1
|
||||
if (deptType.value !== null && deptType.value !== undefined) {
|
||||
params.deptType = deptType.value;
|
||||
params.deptType = deptType.value
|
||||
} else {
|
||||
if (Object.keys(params).includes('deptType')) {
|
||||
delete params.deptType
|
||||
|
@ -142,14 +155,22 @@ const changeDeptType = (str) => {
|
|||
const getData = (str) => {
|
||||
getGisByArea(params).then((res) => {
|
||||
const resData = res.data.data || {}
|
||||
if (resData.list.length > 0 && resData.list.length < 9 && algorithmclassDom) {
|
||||
if (
|
||||
resData.list.length > 0 &&
|
||||
resData.list.length < 9 &&
|
||||
algorithmclassDom
|
||||
) {
|
||||
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
|
||||
}
|
||||
dataList.value = resData.list || []
|
||||
nextTick(() => {
|
||||
algorithmclassDom = document.querySelector('.algorithm-box')
|
||||
if (str && algorithmclassDom) {
|
||||
algorithmclassDom.removeEventListener('scroll', algorithmFunction, true)
|
||||
algorithmclassDom.removeEventListener(
|
||||
'scroll',
|
||||
algorithmFunction,
|
||||
true
|
||||
)
|
||||
algorithmclassDom.addEventListener('scroll', algorithmFunction, true)
|
||||
}
|
||||
})
|
||||
|
@ -216,7 +237,8 @@ onBeforeUnmount(() => {
|
|||
position: absolute;
|
||||
top: 0.4rem;
|
||||
left: 1.52rem;
|
||||
background: url('~@/assets/capacitySquare/select-light1.png') no-repeat;
|
||||
background: url('~@/assets/capacitySquare/select-light1.png')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +259,8 @@ onBeforeUnmount(() => {
|
|||
position: absolute;
|
||||
top: -0.08rem;
|
||||
left: -0.3rem;
|
||||
background: url('~@/assets/capacitySquare/select-light2.png') no-repeat;
|
||||
background: url('~@/assets/capacitySquare/select-light2.png')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
|
@ -286,7 +309,8 @@ onBeforeUnmount(() => {
|
|||
.algorithm-card-photo {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: url('~@/assets/capacitySquare/algorithm-photo.jpg') no-repeat;
|
||||
background: url('~@/assets/capacitySquare/algorithm-photo.jpg')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
|
@ -300,7 +324,8 @@ onBeforeUnmount(() => {
|
|||
font-family: alibaba;
|
||||
bottom: 0.15rem;
|
||||
padding-left: 0.22rem;
|
||||
background: url('~@/assets/capacitySquare/algorithm-title-bg.png') no-repeat;
|
||||
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
Loading…
Reference in New Issue