BUG 27049

This commit is contained in:
aixianling
2022-02-17 14:49:30 +08:00
parent 9a3043c170
commit 96db78522c

View File

@@ -96,7 +96,6 @@ export default {
areaId(v) { areaId(v) {
v && this.getFullArea() v && this.getFullArea()
}, },
fullArea: { fullArea: {
handler(v) { handler(v) {
this.$nextTick(() => { this.$nextTick(() => {
@@ -112,14 +111,14 @@ export default {
this.handleInit() this.handleInit()
this.$refs.areaSelector.showPopup() this.$refs.areaSelector.showPopup()
}, },
scrollHeight () { scrollHeight() {
var obj = this.createSelectorQuery() var obj = this.createSelectorQuery()
obj.select('#areaSelector').boundingClientRect() obj.select('#areaSelector').boundingClientRect()
obj.exec(rect => { obj.exec(rect => {
if (rect.length) { if (rect.length) {
this.height = `calc(100% - ${rect[0].height}px)` this.height = `calc(100% - ${rect[0].height}px)`
} }
}) })
}, },
getFullArea() { getFullArea() {
let areaId = this.areaId || (this.all ? '' : this.$areaId) let areaId = this.areaId || (this.all ? '' : this.$areaId)
@@ -147,15 +146,15 @@ export default {
}).then((res) => { }).then((res) => {
if (res.data.length) { if (res.data.length) {
this.list = res.data this.list = res.data
let self = this.fullArea.find((e) => e.id == this.areaId) let self = this.fullArea.find((e) => e.id == this.areaId)
if (self.id && !this.isHideTown) { if (!!self?.id && !this.isHideTown) {
this.list.unshift(self) this.list.unshift(self)
} }
} }
}) })
}, },
isVillage (areaId) { isVillage(areaId) {
return areaId.substr(areaId.length - 3, 3) != '000' return areaId.substr(areaId.length - 3, 3) != '000'
}, },
@@ -230,7 +229,7 @@ export default {
color: #333; color: #333;
font-weight: bold; font-weight: bold;
line-height: 112px; line-height: 112px;
margin-right: 72px; margin-right: 72px !important;
position: relative; position: relative;
&:last-of-type { &:last-of-type {
@@ -286,7 +285,6 @@ export default {
} }
.fixedTop { .fixedTop {
// position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
left: 0; left: 0;