This commit is contained in:
aixianling
2023-03-23 18:19:52 +08:00
parent d4f1c04f07
commit 3a01fa9011
2 changed files with 39 additions and 10 deletions

View File

@@ -14,7 +14,7 @@
{{ btnShowArea ? selectedName : "切换地区" }}
</el-button>
<a class="custom-clicker" v-else @click="chooseArea">
<slot :areaname="selectedName" :fullname="fullName" :id="selected" :areatype="selectedAreaType"/>
<slot :areaname="selectedName" :fullname="fullName" :id="selected"/>
</a>
<ai-dialog :visible.sync="dialog" title="选择地区" width="60%" @onConfirm="confirmArea" @open="selected=(value||'')">
<ai-highlight content="您当前选择&nbsp;@v" :value="selectedName" color="#333" bold/>
@@ -101,7 +101,10 @@ export default {
header: levelLabels[i], list
})).slice(Math.max(0, this.startLevel), this.endLevel)
if (this.startLevel > 0 && ops.length > 0) {
ops[0].list = ops[0].list.filter(e => e.id == this.selectedMap[this.startLevel])
const tmp = this.$copy(ops[0]?.list?.[0] || {})
const prev = +tmp.type - 1
const prevId = tmp.parentId
prev > -1 && ops.unshift({header: levelLabels[prev], list: [this.hashMap[prevId]]})
}
return ops
}