|
|
@ -122,6 +122,72 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="所属房屋"> |
|
|
|
<div class="resi-cell-value"> |
|
|
|
<div class="resi-cell-col"> |
|
|
|
<el-form-item prop="neighborHoodId"> |
|
|
|
<el-select v-model.trim="neighborHoodId" |
|
|
|
:disabled="vDisabled" |
|
|
|
placeholder="小区" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="resi-cell-select" |
|
|
|
@change="handleChangeV"> |
|
|
|
<el-option v-for="item in optionsV" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="buildingId"> |
|
|
|
<el-select v-model.trim="buildingId" |
|
|
|
placeholder="楼号" |
|
|
|
:disabled="!neighborHoodId || bDisabled" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="resi-cell-select resi-cell-select-middle list_item_width_1" |
|
|
|
@change="handleChangeB"> |
|
|
|
<el-option v-for="item in optionsB" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="buildingUnitId"> |
|
|
|
<el-select v-model.trim="buildingUnitId" |
|
|
|
placeholder="单元" |
|
|
|
size="small" |
|
|
|
:disabled="!buildingId" |
|
|
|
clearable |
|
|
|
class="resi-cell-select resi-cell-select-middle list_item_width_1" |
|
|
|
@change="handleChangeD"> |
|
|
|
<el-option v-for="item in optionsD" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="houseId"> |
|
|
|
<el-select v-model.trim="houseId" |
|
|
|
placeholder="房号" |
|
|
|
:disabled="!buildingUnitId" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="resi-cell-select resi-cell-select-middle list_item_width_1"> |
|
|
|
<el-option v-for="item in optionsH" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-button style="margin-left:30px" |
|
|
|
size="small" |
|
|
|
class="diy-button--search" |
|
|
@ -155,6 +221,10 @@ |
|
|
|
:ownerPhone="ownerPhone" |
|
|
|
:rentFlag="rentFlag" |
|
|
|
:purpose="purpose" |
|
|
|
:neighborHoodId="neighborHoodId" |
|
|
|
:buildingId="buildingId" |
|
|
|
:buildingUnitId="buildingUnitId" |
|
|
|
:houseId="houseId" |
|
|
|
:remark="remark" |
|
|
|
:updateStartDate="updateStartDate" |
|
|
|
:updateEndDate="updateEndDate" |
|
|
@ -187,6 +257,7 @@ import roomTable from './roomTable' |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { Loading } from 'element-ui' // 引入Loading服务 |
|
|
|
import nextTick from 'dai-js/tools/nextTick' |
|
|
|
|
|
|
|
let loading // 加载动画 |
|
|
|
export default { |
|
|
@ -263,6 +334,20 @@ export default { |
|
|
|
startPickerOptions: { |
|
|
|
disabledDate: startDisabledDate |
|
|
|
}, |
|
|
|
|
|
|
|
optionsV: [], |
|
|
|
optionsB: [], |
|
|
|
optionsH: [], |
|
|
|
optionsD: [], |
|
|
|
neighborHoodId: "", |
|
|
|
buildingId: "", |
|
|
|
buildingUnitId: "", |
|
|
|
houseId: "", |
|
|
|
selGridId: '', |
|
|
|
selAgencyId: '', |
|
|
|
|
|
|
|
vDisabled: false, |
|
|
|
bDisabled: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
@ -274,6 +359,7 @@ export default { |
|
|
|
await this.loadOrgData() |
|
|
|
await this.loadTree() |
|
|
|
// await this.loadOpenNode() |
|
|
|
this.getValiheList('', '') |
|
|
|
|
|
|
|
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
if (this.treeData.length > 0) { |
|
|
@ -299,6 +385,113 @@ export default { |
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleChangeV (val) { |
|
|
|
|
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
this.getBuildList(); |
|
|
|
// this.getUniList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeB (val) { |
|
|
|
|
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
this.getUniList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeD () { |
|
|
|
this.houseId = ""; |
|
|
|
this.getHouseList(); |
|
|
|
}, |
|
|
|
|
|
|
|
async getValiheList () { |
|
|
|
const { user } = this.$store.state; |
|
|
|
if (!this.selGridId) { |
|
|
|
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId |
|
|
|
} |
|
|
|
|
|
|
|
const url = "/gov/org/icneighborhood/neighborhood-options"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
gridId: this.selGridId, |
|
|
|
agencyId: this.selAgencyId, |
|
|
|
isPage: false |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsV = data; |
|
|
|
|
|
|
|
this.neighborHoodId = "" |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async getBuildList () { |
|
|
|
const url = "/gov/org/icbuilding/buildingoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
neighborHoodId: this.neighborHoodId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsB = data; |
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
async getUniList () { |
|
|
|
|
|
|
|
const url = "/gov/org/icbuildingunit/unitoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
|
buildingId: this.buildingId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.optionsD = data; |
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
getHouseList () { |
|
|
|
this.$http |
|
|
|
.post("/gov/org/ichouse/houseoption", { unitId: this.buildingUnitId }) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
|
|
|
|
this.optionsH = res.data; |
|
|
|
this.houseId = ""; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSearch () { |
|
|
|
// if (this.ownerName || this.ownerPhone || this.rentFlag || this.purpose || this.remark) { |
|
|
@ -323,6 +516,10 @@ export default { |
|
|
|
this.remark = '' |
|
|
|
this.updateStartDate = '' |
|
|
|
this.updateEndDate = '' |
|
|
|
this.neighborHoodId = '' |
|
|
|
this.buildingId = '' |
|
|
|
this.buildingUnitId = '' |
|
|
|
this.houseId = '' |
|
|
|
|
|
|
|
this.pageSize = 10 |
|
|
|
this.pageNo = 1 |
|
|
@ -392,7 +589,7 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleNodeClick (obj) { |
|
|
|
async handleNodeClick (obj) { |
|
|
|
this.ownerName = '' |
|
|
|
this.ownerPhone = '' |
|
|
|
this.rentFlag = '' |
|
|
@ -404,18 +601,42 @@ export default { |
|
|
|
|
|
|
|
this.selObj = JSON.parse(JSON.stringify(obj)) |
|
|
|
this.getTreeObj(obj) |
|
|
|
await nextTick(1000) |
|
|
|
this.vDisabled = false |
|
|
|
this.bDisabled = false |
|
|
|
if (obj.level === 'building') {//点击楼栋 |
|
|
|
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = '' |
|
|
|
await this.getValiheList() |
|
|
|
this.neighborHoodId = this.selTreeObj.pid |
|
|
|
await this.getBuildList() |
|
|
|
this.buildingId = this.selTreeObj.id |
|
|
|
await this.getUniList() |
|
|
|
this.vDisabled = true |
|
|
|
this.bDisabled = true |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
if (obj.level === 'building') {//点击楼栋 |
|
|
|
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) |
|
|
|
|
|
|
|
} else if (obj.level === 'neighborHood') {//点击小区 |
|
|
|
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) |
|
|
|
} else if (obj.level === 'neighborHood') {//点击小区 |
|
|
|
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = '' |
|
|
|
await this.getValiheList() |
|
|
|
this.neighborHoodId = this.selTreeObj.id |
|
|
|
await this.getBuildList() |
|
|
|
this.vDisabled = true |
|
|
|
} else { |
|
|
|
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
|
|
|
|
if (obj.level === 'grid') { |
|
|
|
this.selAgencyId = '' |
|
|
|
this.selGridId = this.selTreeObj.id |
|
|
|
} else { |
|
|
|
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
this.selAgencyId = this.selTreeObj.id |
|
|
|
this.selGridId = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getValiheList('', '') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
@ -507,7 +728,7 @@ export default { |
|
|
|
obj.longitude = this.centerPoint[1] |
|
|
|
} |
|
|
|
this.selTreeObj = obj |
|
|
|
console.log(this.selTreeObj) |
|
|
|
console.log('selTreeObj', this.selTreeObj) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|