修改首页 选择数据类型样式 , 修改 全局搜索逻辑

This commit is contained in:
a0049873 2022-08-23 16:51:41 +08:00
parent d9186e3ac8
commit d1e6b9acd7
3 changed files with 135 additions and 118 deletions

View File

@ -1100,6 +1100,16 @@
getCountByFuzzyQuery(searchValue.value || '').then((res) => {
console.log('全局搜索==========》', res.data.data)
globalData.data = res.data.data
let mapFlag = true
res.data.data.map((val) => {
if (mapFlag && val.count != 0) {
mapFlag = false
changeCards(val.type)
}
})
if (!mapFlag) {
return
}
if (paramsGetResources.type == '基础设施') {
console.log('camera1', camera.value)
camera.value.getCamera(true, searchValue.value)
@ -1238,6 +1248,7 @@
val.applyCount = val.syqk //
val.deptName = val.TGBM //
val.createDate = val.fbrq //
val.description = val.xgxt //
})
resourceList.data = res.data.data.data || []
resourceTotal.value = res.data.data.rows || ''
@ -1334,6 +1345,7 @@
val.applyCount = val.syqk //
val.deptName = val.TGBM //
val.createDate = val.fbrq //
val.description = val.xgxt //
})
resourceList.data = res.data.data.data || []
resourceTotal.value = res.data.data.rows || ''

View File

@ -135,6 +135,7 @@
val.applyCount = val.syqk //
val.deptName = val.TGBM //
val.createDate = val.fbrq //
val.description = val.xgxt //
})
obj.value = res.data.data.data || []
object.sjNum = res.data.data.rows
@ -291,113 +292,113 @@
}
</script>
<style lang="less" scoped>
.capability-convergence {
height: 7.2rem;
background: url('~@/assets/newHome/Convergence-bg.png') no-repeat;
background-size: 100%;
.capability-convergence {
height: 7.2rem;
background: url('~@/assets/newHome/Convergence-bg.png') no-repeat;
background-size: 100%;
display: flex;
justify-content: center;
.main {
width: 13rem;
margin-top: 1.8rem;
display: flex;
justify-content: center;
.main {
width: 13rem;
margin-top: 1.8rem;
flex-direction: column;
flex-wrap: wrap;
.top {
font-size: 0.3rem;
color: #212121;
text-align: center;
display: flex;
flex-direction: column;
flex-wrap: wrap;
.top {
font-size: 0.3rem;
color: #212121;
text-align: center;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.line {
width: 0.34rem;
height: 0.03rem;
background-color: #0058e1;
margin-top: 0.08rem;
justify-content: center;
align-items: center;
.line {
width: 0.34rem;
height: 0.03rem;
background-color: #0058e1;
margin-top: 0.08rem;
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 0.4rem;
.item {
width: 2.44rem;
height: 3.91rem;
font-size: 0.16rem;
background-color: #fff;
border-radius: 0.02rem;
box-shadow: 0 0.05rem 0.2rem #ccc;
position: relative;
div:nth-of-type(1) {
height: 1.02rem;
line-height: 1.02rem;
font-size: 0.2rem;
color: #fff;
padding-left: 0.15rem;
background-size: 100%;
}
.jc {
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
}
.sj {
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
}
.zj {
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
}
.yy {
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
}
.zs {
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
}
.name {
height: 0.47rem;
line-height: 0.47rem;
margin: 0 0.16rem;
border-bottom: 0.01rem solid #e9e9e9;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.name:hover {
color: #0058e1;
cursor: pointer;
}
.name-last {
border-bottom: none;
}
.btn {
cursor: pointer;
width: 0.8rem;
height: 0.24rem;
border: 0.01rem solid #0058e1;
font-size: 0.14rem;
color: #0058e1;
border-radius: 0.02rem;
text-align: center;
margin-top: 0.1rem;
margin-left: 0.85rem;
position: absolute;
bottom: 0.2rem;
}
.btn:hover {
background: rgba(0, 88, 225, 0.3);
color: #000;
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 0.4rem;
.item {
width: 2.44rem;
height: 3.91rem;
font-size: 0.16rem;
background-color: #fff;
border-radius: 0.02rem;
box-shadow: 0 0.05rem 0.2rem #ccc;
position: relative;
div:nth-of-type(1) {
height: 1.02rem;
line-height: 1.02rem;
font-size: 0.2rem;
color: #fff;
padding-left: 0.15rem;
background-size: 100%;
}
.jc {
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
}
.sj {
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
}
.zj {
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
}
.yy {
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
}
.zs {
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
}
.name {
height: 0.47rem;
line-height: 0.47rem;
margin: 0 0.16rem;
border-bottom: 0.01rem solid #e9e9e9;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.name:hover {
color: #0058e1;
cursor: pointer;
}
.name-last {
border-bottom: none;
}
.btn {
cursor: pointer;
width: 0.8rem;
height: 0.24rem;
border: 0.01rem solid #0058e1;
font-size: 0.14rem;
color: #0058e1;
border-radius: 0.02rem;
text-align: center;
margin-top: 0.1rem;
margin-left: 0.85rem;
position: absolute;
bottom: 0.2rem;
}
.btn:hover {
background: rgba(0, 88, 225, 0.3);
color: #000;
}
}
.item:hover {
border-radius: 0.02rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
}
.item:hover {
border-radius: 0.02rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
}
}
}
}
</style>

View File

@ -167,7 +167,7 @@
'数据资源',
'知识库',
])
const select = ref('组件服务')
const select = ref(whoShow.itShowQingDao ? '' : '组件服务')
let applicationDataList = ref([])
let technosphereDataList = ref([])
const fabubumen = ref([
@ -326,31 +326,35 @@
text-align: center;
margin: 0 0.1rem;
font-size: 0.18rem;
background: linear-gradient(
to right,
rgba(68, 107, 164, 0.4) 0%,
rgba(68, 107, 164, 0) 100%
);
// background: linear-gradient(
// to right,
// rgba(68, 107, 164, 0.4) 0%,
// rgba(68, 107, 164, 0) 100%
// );
color: white;
border-left: 0.02rem solid rgb(108, 147, 204);
// border-left: 0.02rem solid rgb(108, 147, 204);
}
span:nth-of-type(1) {
margin-left: 0;
}
span:hover {
background: linear-gradient(
to right,
rgba(68, 107, 164, 0.5) 0%,
rgba(68, 107, 164, 0.1) 100%
);
}
// span:hover {
// background: linear-gradient(
// to right,
// rgba(68, 107, 164, 0.5) 0%,
// rgba(68, 107, 164, 0.1) 100%
// );
// }
.select {
background: linear-gradient(
to right,
rgba(68, 107, 164, 0.8) 0%,
rgba(68, 107, 164, 0.4) 100%
to bottom,
rgba(255, 255, 255, 0.6) 0%,
rgba(61, 122, 214, 0.8) 20%,
rgb(50, 116, 215) 50%,
rgba(61, 122, 214, 0.8) 80%,
rgba(255, 255, 255, 0.6) 100%
) !important;
border-left: 0.02rem solid #fff;
border-radius: 0.5rem;
// border-left: 0.02rem solid #fff;
}
}
.bottom {