Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
|
||||
</div>
|
||||
</div>
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="id"
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="valueId"
|
||||
@confirm="confirmSelect"></u-select>
|
||||
<u-popup v-model="show" mode="bottom" border-radius="14" height="1000">
|
||||
<div class="popup">
|
||||
@@ -153,15 +153,13 @@ export default {
|
||||
selectList: [],
|
||||
selectCellIndex: 0,
|
||||
houseId: '',
|
||||
detail: {}
|
||||
detail: {},
|
||||
cellName: '',
|
||||
eachUnitNumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
cellName() {
|
||||
let building = this.selectList.find(e => e.id == this.detail.id)
|
||||
return building?.cellName || ""
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
|
||||
@@ -178,19 +176,22 @@ export default {
|
||||
methods: {
|
||||
getSelectList(communityId) {
|
||||
//通过小区ID获取楼栋列表,用来切换楼栋
|
||||
this.$http.post(`/app/appcommunitybuildinginfo/list`, null, {
|
||||
this.$http.post(`/app/appcommunitybuildinginfo/listByUnitNumber`, null, {
|
||||
params: {communityId, size: 999}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.selectList = []
|
||||
res.data.records.forEach(e => {
|
||||
for (let i = 0; i < e.unitNumber; i++) {
|
||||
this.selectList.push({
|
||||
...e,
|
||||
cellName: `${e.communityName + e.buildingNumber}栋${i+1}单元`
|
||||
})
|
||||
}
|
||||
this.selectList.push({
|
||||
...e,
|
||||
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.getStatistics()
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -202,17 +203,15 @@ export default {
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detail = res.data
|
||||
this.getStatistics()
|
||||
this.getList()
|
||||
this.getSelectList(res.data.communityId)
|
||||
}
|
||||
})
|
||||
},
|
||||
getStatistics() {
|
||||
//获取楼栋统计信息
|
||||
let {id, unitNumber: unitNum} = this.detail
|
||||
let {id} = this.detail
|
||||
this.$http.post(`app/appcommunitybuildinginfo/statistics`, null, {
|
||||
params: {id, unitNum}
|
||||
params: {id, unitNum: this.eachUnitNumber}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.numInfo = res.data.unit
|
||||
@@ -221,9 +220,9 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
//获取房间列表
|
||||
let {id: buildingId, unitNumber} = this.detail
|
||||
let {id: buildingId} = this.detail
|
||||
this.$http.post(`app/appcommunityhouseinfo/list`, null, {
|
||||
params: {size: 10000, buildingId, unitNumber}
|
||||
params: {size: 10000, buildingId, unitNumber: this.eachUnitNumber}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = res.data.records
|
||||
@@ -245,10 +244,12 @@ export default {
|
||||
},
|
||||
confirmSelect(e) {
|
||||
this.selectList.map((item, index) => {
|
||||
if (item.id == 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.getList()
|
||||
},
|
||||
|
||||
@@ -217,7 +217,7 @@ export default {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
z-index: 999;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
realityClick() {
|
||||
if(this.id) return
|
||||
if (!this.forms.create_user_name) {
|
||||
return this.$u.toast('请选择走访慰问对象')
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
this.showStstus = true
|
||||
},
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.forms.create_user_name) {
|
||||
return this.$u.toast('请选择走访慰问对象')
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
if (!this.forms.title) {
|
||||
return this.$u.toast('请输入入户走访事项')
|
||||
|
||||
Reference in New Issue
Block a user