BUG 29477
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<AiTopFixed v-if="isAdmin">
|
<AiTopFixed v-if="isAdmin">
|
||||||
<div class="pad-t32"></div>
|
<div class="pad-t32"></div>
|
||||||
<div class="select-gird">
|
<div class="select-gird">
|
||||||
<AiPagePicker type="custom" @select="confirmSelect" v-model="girdId"
|
<AiPagePicker type="custom" @select="confirmSelect" v-model="girdId" self
|
||||||
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
||||||
<div flex class="center">
|
<div flex class="center">
|
||||||
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
|
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
|
||||||
@@ -388,6 +388,7 @@ export default {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<h2>上报网格</h2>
|
<h2>上报网格</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<AiPagePicker type="custom" v-model="form.girdId" @select="handleSelectGrid"
|
<AiPagePicker type="custom" v-model="form.girdId" @select="handleSelectGrid" self
|
||||||
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
||||||
<AiMore v-model="form.girdName"/>
|
<AiMore v-model="form.girdName"/>
|
||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ export default {
|
|||||||
isFormMap: 0, //1为网格地图 一级不允许选中
|
isFormMap: 0, //1为网格地图 一级不允许选中
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isMyGirds() {
|
||||||
|
return !!this.$route.query.self
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.isFormMap) {
|
if (option.isFormMap) {
|
||||||
this.isFormMap = option.isFormMap
|
this.isFormMap = option.isFormMap
|
||||||
@@ -67,10 +72,14 @@ export default {
|
|||||||
},
|
},
|
||||||
getAllGrids() {
|
getAllGrids() {
|
||||||
this.slectList = []
|
this.slectList = []
|
||||||
let {girdMemberId} = this.userGird
|
let {girdMemberId} = this.userGird,
|
||||||
this.$http.post(`/app/appgirdinfo/queryAppGirdInfoByGirdLevel`, null, {
|
url = `/app/appgirdinfo/queryAppGirdInfoByGirdLevel`,
|
||||||
params: {girdMemberId}
|
params = {girdMemberId}
|
||||||
}).then((res) => {
|
if (this.isMyGirds) {
|
||||||
|
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`
|
||||||
|
params = {}
|
||||||
|
}
|
||||||
|
this.$http.post(url, null, {params}).then((res) => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
let parents = res.data.map(e => e.parentGirdId)
|
let parents = res.data.map(e => e.parentGirdId)
|
||||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||||
@@ -80,7 +89,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
treeInit() {
|
treeInit() {
|
||||||
this.treeList = this.allData.filter(e => !e.parentGirdId)
|
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
||||||
this.treeList.map((item) => {
|
this.treeList.map((item) => {
|
||||||
item.isChecked = false
|
item.isChecked = false
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user