BUG 26288

This commit is contained in:
aixianling
2021-12-31 16:25:32 +08:00
parent 1f24e979de
commit d10281defd
2 changed files with 8 additions and 14 deletions

View File

@@ -39,8 +39,8 @@
<AiEmpty v-if="!list.length" style="padding-bottom:80px;"/> <AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
</div> </div>
</div> </div>
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="valueId" <u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="eachUnitNumber"
@confirm="confirmSelect"></u-select> @confirm="confirmSelect"/>
<u-popup v-model="show" mode="bottom" border-radius="14" height="1000"> <u-popup v-model="show" mode="bottom" border-radius="14" height="1000">
<div class="popup"> <div class="popup">
<div class="bg"></div> <div class="bg"></div>
@@ -154,12 +154,14 @@ export default {
selectCellIndex: 0, selectCellIndex: 0,
houseId: '', houseId: '',
detail: {}, detail: {},
cellName: '',
eachUnitNumber: '' eachUnitNumber: ''
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
cellName() {
return this.selectList.find(e => e.eachUnitNumber == this.eachUnitNumber)?.cellName || ""
}
}, },
onShow() { onShow() {
document.title = "以房找人" document.title = "以房找人"
@@ -178,11 +180,9 @@ export default {
res.data.records.forEach(e => { res.data.records.forEach(e => {
this.selectList.push({ this.selectList.push({
...e, ...e,
cellName: `${e.communityName + e.buildingNumber}${e.eachUnitNumber}单元`, cellName: `${e.communityName + e.buildingNumber}${e.eachUnitNumber}单元`
valueId: `${e.id}${e.eachUnitNumber}`
}) })
}) })
this.cellName = this.selectList[0].cellName
this.eachUnitNumber = this.selectList[0].eachUnitNumber this.eachUnitNumber = this.selectList[0].eachUnitNumber
this.getStatistics() this.getStatistics()
this.getList() this.getList()
@@ -231,19 +231,12 @@ export default {
res.data.startDate = res.data.startDate.substring(0, 10) res.data.startDate = res.data.startDate.substring(0, 10)
} }
this.houseInfo = res.data this.houseInfo = res.data
this.show = true this.show = true
} }
}) })
}, },
confirmSelect(e) { confirmSelect(e) {
this.selectList.map((item, index) => { this.eachUnitNumber = e[0].value
if (item.valueId == e[0].value) {
this.selectCellIndex = index
}
})
this.cellName = this.selectList[this.selectCellIndex].cellName
this.eachUnitNumber = this.selectList[this.selectCellIndex].eachUnitNumber
this.getStatistics() this.getStatistics()
this.getList() this.getList()
}, },

View File

@@ -26,6 +26,7 @@
"devServer": { "devServer": {
"disableHostCheck": true, "disableHostCheck": true,
"port": "10323", "port": "10323",
"open": true,
"proxy": { "proxy": {
"/lan": { "/lan": {
"target": "http://192.168.1.87:9000", "target": "http://192.168.1.87:9000",