|
|
@ -7,14 +7,15 @@ |
|
|
|
<img src="../../../../assets/img/shuju/title-tip.png" |
|
|
|
alt /> |
|
|
|
<div class="customer_select"> |
|
|
|
<!-- <span>{{neighborHoodName+'-'}}</span> --> |
|
|
|
<el-select v-model="selBuildingId" |
|
|
|
:popper-append-to-body="false" |
|
|
|
style="width:100%" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in buildingArray" |
|
|
|
:key="item.buildingId" |
|
|
|
:label="item.buildingName" |
|
|
|
:value="item.buildingId"> |
|
|
|
:value="item.buildingId" |
|
|
|
@click="handleClickBuilding(index)"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
@ -48,7 +49,7 @@ |
|
|
|
alt /> |
|
|
|
|
|
|
|
<div class="user_list" |
|
|
|
v-show="item.showAllUser"> |
|
|
|
v-show="item.showAllUser&&userArray.length>0"> |
|
|
|
<div v-for="(userItem,userIndex) in userArray" |
|
|
|
:key="userIndex" |
|
|
|
class="user_item" |
|
|
@ -89,56 +90,7 @@ export default { |
|
|
|
//父组件传过来的小区id |
|
|
|
neighborHoodId: '', |
|
|
|
neighborHoodName: '', |
|
|
|
buildingArray: [ |
|
|
|
{ |
|
|
|
buildingId: "1", |
|
|
|
buildingName: '1号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "2", |
|
|
|
buildingName: '2号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "3", |
|
|
|
buildingName: '3号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "4", |
|
|
|
buildingName: '4号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "5", |
|
|
|
buildingName: '5号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "6", |
|
|
|
buildingName: '6号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "7", |
|
|
|
buildingName: '1号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "8", |
|
|
|
buildingName: '2号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "9", |
|
|
|
buildingName: '3号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "10", |
|
|
|
buildingName: '4号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "11", |
|
|
|
buildingName: '5号楼' |
|
|
|
}, |
|
|
|
{ |
|
|
|
buildingId: "12", |
|
|
|
buildingName: '6号楼' |
|
|
|
} |
|
|
|
],//楼栋下拉框数据 |
|
|
|
buildingArray: [],//楼栋下拉框数据 |
|
|
|
selBuildingId: '', |
|
|
|
selBuildingName: '', |
|
|
|
|
|
|
@ -405,35 +357,14 @@ export default { |
|
|
|
selHouseName: '', |
|
|
|
selHouseIndex: 0, |
|
|
|
|
|
|
|
userArray: [ |
|
|
|
{ |
|
|
|
name: '张三', |
|
|
|
userId: '1', |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '李三四', |
|
|
|
userId: '2', |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '王婷', |
|
|
|
userId: '3', |
|
|
|
} |
|
|
|
, |
|
|
|
{ |
|
|
|
name: '王婷婷婷王婷婷婷', |
|
|
|
userId: '4', |
|
|
|
} |
|
|
|
], |
|
|
|
userArray: [], |
|
|
|
selUserName: '', |
|
|
|
selUserId: '', |
|
|
|
|
|
|
|
|
|
|
|
orgData: {},//当前组织对象 |
|
|
|
orgId: '', |
|
|
|
orgLevel: '', |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//下钻层级记录 |
|
|
|
runNum: 0, |
|
|
|
runAgencyArray: [], |
|
|
@ -461,17 +392,28 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//切换楼栋 |
|
|
|
handleClickBuilding (index) { |
|
|
|
this.selBuildingId = this.buildingArray[index].buildingId |
|
|
|
this.selBuildingName = this.buildingArray[index].buildingName |
|
|
|
|
|
|
|
this.$emit('refreshInfoList', this.selBuildingId, 'building') |
|
|
|
}, |
|
|
|
//选择房间 |
|
|
|
handleClickRoom (index) { |
|
|
|
this.selHouseIndex = index |
|
|
|
this.selHouseId = this.roomArray[index].houseId |
|
|
|
this.selHouseName = this.roomArray[index].houseName |
|
|
|
|
|
|
|
// this.$emit('refreshInfoList', this.selHouseId, 'room') |
|
|
|
}, |
|
|
|
//点击全部成员 |
|
|
|
async handleShowAllUser (selIndex) { |
|
|
|
// this.startLoading() |
|
|
|
|
|
|
|
this.roomArray.forEach((element, index) => { |
|
|
|
let obj = JSON.parse(JSON.stringify(element)) |
|
|
|
|
|
|
|
|
|
|
|
if (index === selIndex) { |
|
|
|
obj.showAllUser = !obj.showAllUser |
|
|
|
this.$set(this.roomArray, selIndex, obj) |
|
|
@ -483,7 +425,7 @@ export default { |
|
|
|
// element.showAllUser = false |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// this.endLoading() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
@ -496,80 +438,33 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//下钻到下一级 |
|
|
|
toSubAgency (e) { |
|
|
|
//点击小区neighborHood显示楼栋,点击非小区,进入下一级地图 |
|
|
|
this.runNum++ |
|
|
|
this.runAgencyArray.push(this.orgData) |
|
|
|
|
|
|
|
this.subAgencyArray.forEach(item => { |
|
|
|
if (item.id === e.selected[0].id_) { |
|
|
|
this.selPolygonId = item.id |
|
|
|
this.selPolygon = item |
|
|
|
this.orgId = item.id |
|
|
|
this.orgLevel = item.level |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
console.log(this.runNum) |
|
|
|
console.log(this.runAgencyArray) |
|
|
|
if (this.orgLevel === 'neighborHood') { |
|
|
|
|
|
|
|
} else { |
|
|
|
this.refreshMap(true) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//返回所选组织 |
|
|
|
handleClickAgency (index) { |
|
|
|
|
|
|
|
const cutNum = this.runAgencyArray.length - index//要减去的长度 |
|
|
|
this.runNum = this.runNum - cutNum |
|
|
|
this.orgData = this.runAgencyArray[index] |
|
|
|
for (let i = 0; i < cutNum; i++) { |
|
|
|
this.runAgencyArray.pop() |
|
|
|
} |
|
|
|
|
|
|
|
this.orgId = this.orgData.id |
|
|
|
this.orgLevel = this.orgData.level |
|
|
|
|
|
|
|
console.log(this.runAgencyArray) |
|
|
|
console.log(this.orgData) |
|
|
|
|
|
|
|
if (this.orgLevel === 'neighborHood') {//显示小区 |
|
|
|
|
|
|
|
} else { |
|
|
|
this.refreshMap(true) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//加载楼栋数据 |
|
|
|
async loadBuilding () { |
|
|
|
// const url = "/gov/org/agency/baseinfofamilybuilding" |
|
|
|
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/baseinfofamilybuilding" |
|
|
|
const url = "/gov/org/agency/baseinfofamilybuilding" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/baseinfofamilybuilding" |
|
|
|
let params = { |
|
|
|
neighborHoodId: this.orgId |
|
|
|
neighborHoodId: this.neighborHoodId |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
// this.buildingArray = data |
|
|
|
this.buildingArray = data |
|
|
|
this.buildingArray.forEach(item => { |
|
|
|
item.buildingName = this.neighborHoodName + "-" + item.buildingName |
|
|
|
if (!this.buildingArray[0].buildingName) { |
|
|
|
item.buildingName = '楼' |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
if (this.buildingArray.length > 0) { |
|
|
|
this.selBuildingId = this.buildingArray[0].buildingId |
|
|
|
this.selBuildingName = this.buildingArray[0].buildingName |
|
|
|
|
|
|
|
} else { |
|
|
|
this.selBuildingId = '' |
|
|
|
this.selBuildingName = '' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -578,8 +473,8 @@ export default { |
|
|
|
|
|
|
|
//加载房间数据 |
|
|
|
async loadRoom () { |
|
|
|
// const url = "/gov/org/ichouse/houselist" |
|
|
|
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/ichouse/houselist" |
|
|
|
const url = "/gov/org/ichouse/houselist" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/ichouse/houselist" |
|
|
|
let params = { |
|
|
|
buildingId: this.selBuildingId |
|
|
|
} |
|
|
@ -587,15 +482,13 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
// this.roomArray = data |
|
|
|
this.roomArray = data |
|
|
|
|
|
|
|
if (this.roomArray.length > 0) { |
|
|
|
this.selHouseId = this.roomArray[0].houseId |
|
|
|
this.selHouseName = this.roomArray[0].houseName |
|
|
|
|
|
|
|
this.roomArray.forEach(roomItem => { |
|
|
|
let iconArrayShow = JSON.parse(JSON.stringify(roomItem.categoryList)) |
|
|
|
// debugger |
|
|
|
|
|
|
|
if (iconArrayShow.length > 0) { |
|
|
|
if (iconArrayShow[0].isSpecial === '1') {//第一个图标是党员 |
|
|
|
roomItem.isParty = true |
|
|
@ -625,8 +518,8 @@ export default { |
|
|
|
|
|
|
|
//加载成员数据 |
|
|
|
async loadUser (houseId, index) { |
|
|
|
// const url = "/epmetuser/icresiuser/getpeoplebyroom" |
|
|
|
const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom" |
|
|
|
const url = "/epmetuser/icresiuser/getpeoplebyroom" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/getpeoplebyroom" |
|
|
|
let params = { |
|
|
|
homeId: houseId |
|
|
|
} |
|
|
@ -634,8 +527,10 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
// this.userArray = data |
|
|
|
|
|
|
|
this.userArray = data |
|
|
|
if (this.userArray.length === 0) { |
|
|
|
this.$message.warning('该房间下没有住户') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -666,6 +561,11 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// selectWidth () { |
|
|
|
// let width = this.selHouseName.length * 200 |
|
|
|
// console.log(width) |
|
|
|
// return width + 'px'; |
|
|
|
// }, |
|
|
|
|
|
|
|
mapHeight () { |
|
|
|
|
|
|
@ -735,8 +635,16 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
/* 修改的是el-input上下的小图标的颜色 */ |
|
|
|
/deep/ .el-select .el-input .el-select__caret { |
|
|
|
/deep/ .el-select .el-input .el-select__caret::before { |
|
|
|
color: #fff; |
|
|
|
content: ""; |
|
|
|
background: url("../../../../assets/img/xiala.png") center center no-repeat; |
|
|
|
position: absolute; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
top: 50%; |
|
|
|
left: 50%; |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
} |
|
|
|
|
|
|
|
/* 修改总体选项的样式 最外层 */ |
|
|
|