判断搜索数据数量
This commit is contained in:
@@ -395,7 +395,7 @@ let searchInit = (data) => {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
seachKey.key = res.data
|
seachKey.key = res.data
|
||||||
seachInfoData.data=JSON.parse(JSON.stringify(res.data))
|
seachInfoData.data=JSON.parse(JSON.stringify(res.data))
|
||||||
let seachObj=setSeachId()
|
let seachObj=checkSearckInit(setSeachId())
|
||||||
seachAllType.searchid = seachObj.searchid
|
seachAllType.searchid = seachObj.searchid
|
||||||
getDataList(seachAllType,seachObj.count==0?false:true)
|
getDataList(seachAllType,seachObj.count==0?false:true)
|
||||||
} else {
|
} else {
|
||||||
@@ -406,6 +406,24 @@ let searchInit = (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//判断搜索数据数量
|
||||||
|
let checkSearckInit=(data)=>{
|
||||||
|
if(data.count) return data
|
||||||
|
let obj={}
|
||||||
|
if(seachInfoData.data.personal.count>0){
|
||||||
|
obj=seachInfoData.data.personal
|
||||||
|
tabType.value = 'person'
|
||||||
|
}else if(seachInfoData.data.intermediary.count>0){
|
||||||
|
obj=seachInfoData.data.intermediary
|
||||||
|
tabType.value = 'intermediary'
|
||||||
|
}else if(seachInfoData.data.studentapartment.count>0){
|
||||||
|
obj=seachInfoData.data.studentapartment
|
||||||
|
tabType.value = 'apartment'
|
||||||
|
}else setSeachId()
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
//搜索数据
|
//搜索数据
|
||||||
let seachList = (item) => {
|
let seachList = (item) => {
|
||||||
let routeInfo = route.currentRoute.value
|
let routeInfo = route.currentRoute.value
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="box-min-1200-src">
|
||||||
<pageTopBar></pageTopBar>
|
<pageTopBar></pageTopBar>
|
||||||
<inputModule :getDataList="setSeachSelectData" :count="dataCount" ref="inputModuleInfo"></inputModule>
|
<inputModule :getDataList="setSeachSelectData" :count="dataCount" ref="inputModuleInfo"></inputModule>
|
||||||
<div class="dis-f jus-x al-item">
|
<div class="dis-f jus-x al-item">
|
||||||
|
|||||||
Reference in New Issue
Block a user