|
|
@@ -23,14 +23,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view v-if="!$isEmpty(searchList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
- <view @click="residentailConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in searchList" :key="index">
|
|
|
+ <view @click="agencyConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in searchList" :key="index">
|
|
|
<text>{{item.label}}</text>
|
|
|
</view>
|
|
|
<u-divider v-if="searchList.length>=10" height="80">只显示十条数据</u-divider>
|
|
|
</scroll-view>
|
|
|
<u-empty v-else name="search"></u-empty>
|
|
|
</u-popup>
|
|
|
- <!-- 楼栋 -->
|
|
|
+ <!-- 小区名字筛选 -->
|
|
|
<u-popup border-radius="60" height="60%" mode="bottom" v-model="residentailShow">
|
|
|
<view class="fixed cu-bar search bg-white">
|
|
|
<view class="search-form round">
|
|
|
@@ -38,11 +38,11 @@
|
|
|
<u-input style="width: 90%;" v-model="residentialKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <scroll-view v-if="!$isEmpty(residentialList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
- <view @click="buildingConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in residentialList" :key="index">
|
|
|
+ <scroll-view v-if="!$isEmpty(list)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
+ <view @click="buildingConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in list" :key="index">
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
- <u-divider v-if="residentialList.length>=10" height="80">只显示十条数据</u-divider>
|
|
|
+ <u-divider v-if="list.length>=10" height="80">只显示十条数据</u-divider>
|
|
|
</scroll-view>
|
|
|
<u-empty v-else name="search"></u-empty>
|
|
|
</u-popup>
|
|
|
@@ -80,7 +80,7 @@
|
|
|
return {
|
|
|
|
|
|
//顶部菜单栏
|
|
|
- filterMenu: ["地区","所属机构","物业名称","筛选"],
|
|
|
+ filterMenu: ["地区","归属","物业名称","筛选"],
|
|
|
data:['','','',''],
|
|
|
|
|
|
//地区
|
|
|
@@ -101,8 +101,6 @@
|
|
|
//小区
|
|
|
residentailShow:false,
|
|
|
residentialKeyWord:'',
|
|
|
- residentialList:[],
|
|
|
-
|
|
|
list: [],
|
|
|
downOption: {
|
|
|
use: true,
|
|
|
@@ -123,7 +121,7 @@
|
|
|
},
|
|
|
onLoad(){
|
|
|
that=this
|
|
|
- this.getListByLikeName({isSelect:true})
|
|
|
+ this.getResidentailList()
|
|
|
},
|
|
|
onShow() {
|
|
|
if (this.canReset) {
|
|
|
@@ -145,7 +143,7 @@
|
|
|
regionArea: that.areaValue,
|
|
|
agencyName: that.agencyKeyword
|
|
|
}
|
|
|
- this.getListByLikeName(params)
|
|
|
+ this.getAgencyList(params)
|
|
|
}, 500)
|
|
|
},
|
|
|
residentialKeyWord(){
|
|
|
@@ -160,7 +158,7 @@
|
|
|
agencyId:that.params.agencyId,
|
|
|
name:that.residentialKeyWord
|
|
|
}
|
|
|
- that.fetchresidentialList(params)
|
|
|
+ that.getResidentailList(params)
|
|
|
}, 500)
|
|
|
},
|
|
|
},
|
|
|
@@ -221,30 +219,25 @@
|
|
|
*/
|
|
|
reset(){
|
|
|
this.params={}
|
|
|
- this.data=['','','','','']
|
|
|
+ this.data=['','','','']
|
|
|
this.areaValue=''
|
|
|
this.searchList=[]
|
|
|
this.agencyKeyword=''
|
|
|
this.unitList=[]
|
|
|
this.residentialKeyWord='',
|
|
|
- this.residentialList=[],
|
|
|
this.list=[],
|
|
|
this.mescroll.resetUpScroll()
|
|
|
},
|
|
|
/**
|
|
|
- * 点击选择机构
|
|
|
+ * 获取小区列表
|
|
|
+ * @param {Object} params
|
|
|
*/
|
|
|
- residentailConfirm(res){
|
|
|
- //筛选标题
|
|
|
- this.params.residentialId =res.value
|
|
|
- this.data[1] = res.label
|
|
|
- this.popupShow = false
|
|
|
- //获取机构
|
|
|
- let params={
|
|
|
- residentialId:this.params.residentialId
|
|
|
- }
|
|
|
- this.fetchresidentialList(params)
|
|
|
- this.mescroll.resetUpScroll()
|
|
|
+ getResidentailList(params){
|
|
|
+ console.log(params)
|
|
|
+ this.$api.residential.page(params).then(res=>{
|
|
|
+ console.log(122,res)
|
|
|
+ this.list = res.list;
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 顶部菜单选择
|
|
|
@@ -257,7 +250,7 @@
|
|
|
return
|
|
|
}
|
|
|
if(index==1){
|
|
|
- //机构
|
|
|
+ //归属
|
|
|
this.popupShow = true;
|
|
|
return;
|
|
|
}else if(index==2){
|
|
|
@@ -286,27 +279,67 @@
|
|
|
isSelect: true,
|
|
|
regionArea: this.areaValue
|
|
|
};
|
|
|
- this.getListByLikeName(params);
|
|
|
+ this.getAgencyList(params);
|
|
|
},
|
|
|
/**
|
|
|
* 获取机构列表
|
|
|
* @param {Object} params
|
|
|
*/
|
|
|
- getListByLikeName(params){
|
|
|
+ // getListByLikeName(params){
|
|
|
+ // let list = [];
|
|
|
+ // this.$api.permissions.orgList(params).then(res=>{
|
|
|
+ // console.log(res)
|
|
|
+ // let list = [];
|
|
|
+ // for(let item of res.data.records){
|
|
|
+ // let element = {
|
|
|
+ // label: item.name,
|
|
|
+ // value: item.id
|
|
|
+ // }
|
|
|
+ // list.splice(list.length,0,element);
|
|
|
+ // // list.push(obj);
|
|
|
+ // }
|
|
|
+ // this.searchList = list;
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ /**
|
|
|
+ * 获取机构列表
|
|
|
+ * @param {Object} params
|
|
|
+ */
|
|
|
+ getAgencyList(params){
|
|
|
let list = [];
|
|
|
this.$api.permissions.orgList(params).then(res=>{
|
|
|
console.log(res)
|
|
|
let list = [];
|
|
|
for(let item of res.data.records){
|
|
|
let element = {
|
|
|
- label: item.name,
|
|
|
+ label: item.parentName,
|
|
|
value: item.id
|
|
|
}
|
|
|
list.splice(list.length,0,element);
|
|
|
// list.push(obj);
|
|
|
}
|
|
|
this.searchList = list;
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 点击确认选择归属
|
|
|
+ */
|
|
|
+ agencyConfirm(res){
|
|
|
+ //筛选标题
|
|
|
+ this.params.agencyId =res.value
|
|
|
+ this.data[1] = res.label
|
|
|
+ this.popupShow = false
|
|
|
+ console.log(res)
|
|
|
+ //获取小区
|
|
|
+ let params={
|
|
|
+ agencyId:this.params.agencyId
|
|
|
+ }
|
|
|
+ this.$api.residential.pageBycondition(params).then(res=>{
|
|
|
+ console.log(333,res)
|
|
|
+ this.list = res.data.records;
|
|
|
})
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
},
|
|
|
/**
|
|
|
* 添加小区
|
|
|
@@ -318,7 +351,7 @@
|
|
|
},
|
|
|
delItem(item){
|
|
|
this.$dialog.showModal('确定要删除此项吗?').then(res=>{
|
|
|
- this.$api,room.del({id:item.id}).then(res=>{
|
|
|
+ this.$api.residential.del({id:item.id}).then(res=>{
|
|
|
if (res.data) {
|
|
|
this.$showToast('删除成功')
|
|
|
that.mescroll.resetUpScroll()
|