BUG 29320
This commit is contained in:
@@ -121,8 +121,7 @@
|
||||
<span>现住址</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<!-- :areaId="user.areaId" v-model="form.currentAreaId"-->
|
||||
<AiAreaPicker :fullName.sync="form.currentAreaName" v-model="form.currentAreaId" :root="user.areaId">
|
||||
<AiAreaPicker :fullName.sync="form.currentAreaName" v-model="form.currentAreaId">
|
||||
<AiMore v-model="form.currentAreaName"/>
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
event: "select"
|
||||
},
|
||||
props: {
|
||||
areaId: {default: ''},
|
||||
areaId: String,
|
||||
name: {default: ''},
|
||||
value: String,
|
||||
all: Boolean,
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
return level
|
||||
},
|
||||
root() {
|
||||
return this.areaId || this.user.areaId || this.$areaId
|
||||
return this.areaId || this.rootArea
|
||||
},
|
||||
locationIcon() {
|
||||
return this.$cdn + this.icon
|
||||
@@ -61,7 +61,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
fullArea: [],
|
||||
areaName: ""
|
||||
areaName: "",
|
||||
rootArea: ""
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -72,16 +73,27 @@ export default {
|
||||
v && !this.areaName && this.getAreaName(this.value)
|
||||
},
|
||||
fullArea(v) {
|
||||
v && this.$emit('update:fullName', v?.map(e => e.name)?.join("") || "")
|
||||
v && this.value && this.$emit('update:fullName', v?.map(e => e.name)?.join("") || "")
|
||||
},
|
||||
areaName(v) {
|
||||
v && this.$emit('update:name', v)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getRootArea()
|
||||
this.value && this.getAreaName(this.value)
|
||||
},
|
||||
methods: {
|
||||
getRootArea() {
|
||||
if (uni.getStorageSync("rootArea")) {
|
||||
this.rootArea = uni.getStorageSync("rootArea")
|
||||
} else this.$http.post("/app/appdvcpconfig/getCorpArea", null, {}).then(res => {
|
||||
if (res?.data) {
|
||||
this.rootArea = res.data
|
||||
uni.setStorageSync("rootArea", res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
getInfo(areaId) {
|
||||
return areaId && this.$http.post('/admin/area/getAllParentAreaId', null, {
|
||||
withoutToken: true,
|
||||
@@ -111,9 +123,8 @@ export default {
|
||||
this.fullArea = data.fullArea
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
})
|
||||
let {value, all, valueLevel, selectRoot, areaId} = this.$props
|
||||
let {value, all, valueLevel, selectRoot, areaId = this.root} = this.$props
|
||||
let url = qs.stringifyUrl({
|
||||
url: "/components/pages/selectArea", query: {...this.$attrs, value, all, valueLevel, selectRoot, areaId}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user