@@ -91,20 +88,10 @@ export default {
},
treeInit() {
- if (this.allData[0].girdLevel == 2) {
- if (this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) {
- this.userList = this.allData[0].girdMemberList
- this.userList.map((item) => {
- 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.treeList = this.allData.girdList
+ let obj = {
+ girdName: this.allData.girdName,
+ id: this.allData.id,
}
this.slectList.push(obj)
},
@@ -113,7 +100,6 @@ export default {
var obj = {
girdName: row.girdName,
id: row.id,
- girdLevel: row.girdLevel
}
this.slectList.push(obj)
this.searckGird(row)
@@ -121,23 +107,20 @@ export default {
searckGird(row) {
this.treeList = []
- if (row.girdLevel != 2) { //查网格
- this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
- if (res?.data) {
- this.treeList = res.data.records.map(e => ({...e, isChecked: e.id == this.selectUser.id}))
- }
- })
- } else { //查网格员
- this.userList = []
- this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
- if (res?.data) {
- this.userList = res.data
- this.userList.map((item) => {
- item.isChecked = item.id == this.selectUser.id
- })
- }
- })
- }
+ this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
+ if (res?.data) {
+ this.treeList = res.data.records.map(e => ({...e, isChecked: e.id == this.selectUser.id}))
+ }
+ })
+ this.userList = []
+ this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
+ if (res?.data) {
+ this.userList = res.data
+ this.userList.map((item) => {
+ item.isChecked = item.id == this.selectUser.id
+ })
+ }
+ })
},
girdNameClick(row, index) {