diff --git a/pages/resiAndHouse/resiAndHouse.js b/pages/resiAndHouse/resiAndHouse.js
index b7dbb0b..8456f17 100644
--- a/pages/resiAndHouse/resiAndHouse.js
+++ b/pages/resiAndHouse/resiAndHouse.js
@@ -7,6 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
+ selectValue:0,
activeType:0,
tabList:[],
tableData:[],
@@ -24,11 +25,17 @@ Page({
}
],
+ selectedText:[],
pageNo:1,
pageSize:10,
+ lowerThreshold:'10',
+ loadMoreVisible:false,
+ loadMoreType: "none",
selectVale:'resi',
keyWord:'',
angencyId:null,
+ category:'',
+ searchOrgIdPath:'',
angencyList:[],//组织树
showAngenCascader:false,
fieldName:{text: 'agencyName', value: 'agencyId', children: 'subAgencyList' }
@@ -38,7 +45,9 @@ Page({
*/
onLoad(options) {
this.setData({
- angencyId:App.globalData.user.agencyId
+ angencyId:App.globalData.user.agencyId,
+ angencyName:App.globalData.user.angencyName,
+
})
this.getAgencygridtree()
this.getAllOrgCategoryCount()
@@ -56,7 +65,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ this.onAllSearchMessage()
},
/**
@@ -77,7 +86,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ this.getIntelligentMessage()
},
/**
@@ -168,6 +177,7 @@ Page({
url: '/subpages/OCRCard/pages/index/index',
})
},
+
getAllOrgCategoryCount(){
let parm ={
residentInfo:this.data.keyWord,
@@ -178,8 +188,9 @@ Page({
api.getAllOrgCategoryCount(parm).then(res=>{
if(res.code == 0){
this.setData({
- tabList:res.data.filter(item=>item.categoryName =='党员'||item.categoryName =='关注人群' || item.categoryName =='特殊人群'||item.categoryName =='非健康人群')
+ tabList:res.data.filter(item=>item.categoryName =='党员'||item.categoryName =='关注人群' || item.categoryName =='特殊人群'||item.categoryName =='非健康人群'||item.categoryName =='居民')
})
+
}
}).catch(err=>{
console.log(err);
@@ -193,7 +204,14 @@ Page({
})
},
onFinish(e){
- console.log(e);
+ const selectedValues = e.detail
+
+ console.log("123",selectedValues)
+ this.setData({
+ angencyName:selectedValues.selectedOptions.map(item=>item.agencyName).join(","),
+ showCascader: false
+ });
+ console.log('123121',e.detail.selectedOptions);
},
onClose(){
this.setData({
@@ -218,18 +236,73 @@ Page({
},
onAllSearchMessage(){
let parm ={
- searchKey:" ",
+ searchKey:this.data.keyWord,
pageSize:this.data.pageSize,
- pageNo:this.data.pageNo
+ pageNo:this.data.pageNo,
+ category:this.data.category,
+ searchOrgIdPath:this.data.searchOrgIdPath
}
getResidentBaseInfo(parm).then(res=>{
- console.log("11111",res);
+
this.setData({
'resiList':res.data.list
})
- console.log("123",this.resiList);
}).catch(err=>{
console.log(err);
})
- }
-})
\ No newline at end of file
+ },
+ onScrollToLower(e){
+ console.log("111"+e)
+ if (this.data.loadMoreType === 'more') {
+ this.setData({
+ loadMoreVisible: true,
+ })
+ this.data.pageNo += 1
+ this.onAllSearchMessage()
+
+ }
+ },
+ onAllSearchMessage(){
+ this.setData({
+ // 加载更多为true
+ loadMoreVisible: true,
+ nodata: false,
+ loadMoreType: "more",
+ })
+ const parm={
+ searchKey:this.data.keyWord,
+ pageSize:this.data.pageSize,
+ pageNo:this.data.pageNo,
+ category:this.data.category,
+ searchOrgIdPath:this.data.searchOrgIdPat
+ }
+
+ getResidentBaseInfo(parm).then(res=>{
+ // res.data.list = res.data.list.map(item => {
+ // if (item.createdByName && item.createdByName.length >= 3) {
+ // item.createdByName = item.createdByName.slice(1,3);
+ // }
+ // return item;
+ // });
+ this.setData({
+ loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
+ resiList: this.data.resiList.concat(res.data.list),
+
+ })
+ console.log(resiList)
+ if (this.data.resiList.length == 0) {
+ this.setData({
+ loadMoreVisible: false,
+ nodata: true
+ })
+ }
+ }).catch(err=>{
+ console.log(err);
+ this.setData({
+ loadMoreVisible: false,
+ nodata: true,
+ })
+ })
+ },
+
+ })
\ No newline at end of file
diff --git a/pages/resiAndHouse/resiAndHouse.wxml b/pages/resiAndHouse/resiAndHouse.wxml
index 576c412..86972ae 100644
--- a/pages/resiAndHouse/resiAndHouse.wxml
+++ b/pages/resiAndHouse/resiAndHouse.wxml
@@ -24,14 +24,14 @@
-
+ 。
- 海伦路社区重庆南路89号
+ {{agencyName}}
切换
@@ -46,7 +46,9 @@
-
+
+
+
{{item.name}}
@@ -61,13 +63,13 @@
-
+
国籍:
{{item.nationalityName || "--"}}
-
+
民族:
- {{item.nationName}}
+ {{item.nationName || '--'}}
@@ -83,17 +85,22 @@
地址:
{{item.agencyName || ''}} {{item.homeName || ''}}
-
+
最新更新时间:
- {{item.updatedTime}}
+ {{item.updatedTime|| '--'}}
+
+
+
+
+
-
+