Commit 5ee564e7 by zhangquan

修复bug

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