BUG 28186

This commit is contained in:
aixianling
2022-03-15 15:54:12 +08:00
parent 6b167aeadc
commit 8066b0a8cd

View File

@@ -165,12 +165,12 @@ export default {
let self = this.fullArea.find((e) => e.id == this.areaId) let self = this.fullArea.find((e) => e.id == this.areaId)
if (this.value && !this.areaName && this.value !== this.areaId) { if (this.value && !this.areaName && this.value !== this.areaId) {
this.areaName = this.list.find((e) => e.id == this.value).name this.areaName = this.list.find((e) => e.id == this.value)?.name
} }
if (!this.areaName && this.value === this.areaId) { if (!this.areaName && this.value === this.areaId) {
this.areaName = self.name this.areaName = self.name
} }
if (self.id) { if (self?.id) {
this.list.unshift(self) this.list.unshift(self)
} }
this.scrollHeight() this.scrollHeight()
@@ -210,7 +210,7 @@ export default {
}, },
getChild(op) { getChild(op) {
if (op.id != this.index) { if (op.id != this.index) {
if (op.type <= this.valueLevel && op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) { if (op.type < this.valueLevel && op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) {
this.fullArea.push(op) this.fullArea.push(op)
this.getChildAreas(op.id) this.getChildAreas(op.id)
} }