Commit 5ee564e7 by zhangquan

修复bug

1 parent 7cd59766
......@@ -124,6 +124,32 @@ export default {
},
selectItem(item){
const { id, name } = item
if(id!= this.selectInfo[this.curLevel]?.id && this.curLevel!=3) {
if(this.curLevel==1){
this.selectInfo['2'] = {
id: '',
name: ''
}
this.searchObj['2'] = {
pageSize : 10,
pageNum : 1,
loaded: false,
loadFinished: false,
areaList: []
}
}
this.selectInfo['3'] = {
id: '',
name: ''
}
this.searchObj['3'] = {
pageSize : 10,
pageNum : 1,
loaded: false,
loadFinished: false,
areaList: []
}
}
this.selectInfo[this.curLevel].id = id
this.selectInfo[this.curLevel].name = name
this.keyWord = ''
......@@ -132,7 +158,6 @@ export default {
this.getRoomList()
},
getRoomList(isConcat) {
console.log(1111)
const { pageSize , pageNum } = this.searchObj[this.curLevel]
const params = {
name: this.keyWord,
......@@ -144,14 +169,12 @@ export default {
}
if(this.searchObj[this.curLevel].loadFinished) return;
detailApi.getRoomListApi(params).then(res => {
console.log(res, 2366)
if(res?.list) {
const list = res?.list || []
this.searchObj[this.curLevel].areaList = isConcat ? [...this.searchObj[this.curLevel].areaList, ...list] : list
const len = this.searchObj?.[this.curLevel]?.areaList?.length || 0
this.searchObj[this.curLevel].loadFinished = res.total<=len
this.searchObj[this.curLevel].loaded = true
console.log(this.searchObj)
}
})
},
......@@ -201,6 +224,7 @@ export default {
}
.list-wrap{
padding: 8px 0 30px;
margin-bottom: 20px;
max-height: 300px;
overflow: auto;
.item{
......
......@@ -25,24 +25,26 @@
</template>
</template>
</div>
<div class="box">
<div v-for="(item,index) in addressList" :key="index" class="item flex" @click="changeAddress(index+1)">
<div class="label">{{item.name}}</div>
<div class="value">
{{ownerInfoObj[item.key]}}
<van-icon name="arrow" class="arrow"/>
<template v-if="showAddr">
<div class="box">
<div v-for="(item,index) in addressList" :key="index" class="item flex" @click="changeAddress(index+1)">
<div class="label">{{item.name}}</div>
<div class="value">
{{ownerInfoObj[item.key]}}
<van-icon name="arrow" class="arrow"/>
</div>
</div>
</div>
</div>
<div class="box">
<div class="item flex" @click="changeOwnerType">
<div class="label">住户类型</div>
<div class="value">
{{ownerInfoObj.ownerTypeName}}
<van-icon name="arrow" class="arrow"/>
<div class="box">
<div class="item flex" @click="changeOwnerType">
<div class="label">住户类型</div>
<div class="value">
{{ownerInfoObj.ownerTypeName}}
<van-icon name="arrow" class="arrow"/>
</div>
</div>
</div>
</div>
</template>
</template>
<template v-if="showDialog">
<addressPopup :show="showDialog" :info="ownerInfoObj" @cancelFn="cancelFn" @confirm="confirmAddress"></addressPopup>
......@@ -152,6 +154,7 @@ export default {
],
show: false,
homeownerType: '',
showAddr: false,
ownerInfoObj: {}
}
},
......@@ -159,11 +162,15 @@ export default {
addressPopup
},
activated () {
const { entmicroId } = this.getLocalStorage('dj_scrm_userInfo') || {}
this.showAddr = window.$fetchConfig.merchantWhiteList?.includes(entmicroId)
let { userInfo, show } = this.getParams()
this.userInfo = userInfo
console.log(this.userInfo, 'this.userInfo')
this.show = show
this.getOwnerTypeList()
if(this.showAddr) {
this.getOwnerTypeList() //显示才调接口
}
},
methods: {
getOwnerInfo(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!