BUG 29526

This commit is contained in:
aixianling
2022-05-06 18:17:23 +08:00
parent 8f450f3182
commit 4e3590d0c6

View File

@@ -10,13 +10,10 @@
<div v-if="treeList.length > 0"> <div v-if="treeList.length > 0">
<div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item)"> <div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item)">
<div class="imges"> <div class="imges">
<span v-if="item.girdLevel == 1" style="width: 24px;"></span>
<span v-if="item.girdLevel == 2">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" <img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked"
@click.stop="girdClick(item, index)"/> @click.stop="girdClick(item, index)"/>
<img src="./components/img/xz.png" alt="" class="imgselect" v-else <img src="./components/img/xz.png" alt="" class="imgselect" v-else
@click.stop="girdClick(item, index)"/> @click.stop="girdClick(item, index)"/>
</span>
<img src="./components/img/gird--select-icon.png" alt="" class="avatras"/> <img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
</div> </div>
<div class="rightes"> <div class="rightes">
@@ -91,20 +88,10 @@ export default {
}, },
treeInit() { treeInit() {
if (this.allData[0].girdLevel == 2) { this.treeList = this.allData.girdList
if (this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) { let obj = {
this.userList = this.allData[0].girdMemberList girdName: this.allData.girdName,
this.userList.map((item) => { id: this.allData.id,
item.isChecked = item.id == this.selectUser.id
})
}
} else {
this.treeList = this.allData[0].girdList
}
var obj = {
girdName: this.allData[0].girdName,
id: this.allData[0].id,
girdLevel: this.allData[0].girdLevel
} }
this.slectList.push(obj) this.slectList.push(obj)
}, },
@@ -113,7 +100,6 @@ export default {
var obj = { var obj = {
girdName: row.girdName, girdName: row.girdName,
id: row.id, id: row.id,
girdLevel: row.girdLevel
} }
this.slectList.push(obj) this.slectList.push(obj)
this.searckGird(row) this.searckGird(row)
@@ -121,13 +107,11 @@ export default {
searckGird(row) { searckGird(row) {
this.treeList = [] this.treeList = []
if (row.girdLevel != 2) { //查网格
this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => { this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
if (res?.data) { if (res?.data) {
this.treeList = res.data.records.map(e => ({...e, isChecked: e.id == this.selectUser.id})) this.treeList = res.data.records.map(e => ({...e, isChecked: e.id == this.selectUser.id}))
} }
}) })
} else { //查网格员
this.userList = [] this.userList = []
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => { this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
if (res?.data) { if (res?.data) {
@@ -137,7 +121,6 @@ export default {
}) })
} }
}) })
}
}, },
girdNameClick(row, index) { girdNameClick(row, index) {