@@ -16,7 +16,7 @@
{{ item.girdName }}
-

+
@@ -41,9 +41,12 @@ export default {
treeList: [],
slectList: [],
userList: [],
+
+ type: 0, //0统计 1组织
}
},
- onLoad() {
+ onLoad(option) {
+ this.type = option.type
this.getTree()
},
methods: {
@@ -75,7 +78,7 @@ export default {
},
itemClick(row) {
- console.log(row)
+ if(row.girdLevel == 2) return
var obj = {
girdName: row.girdName,
id: row.id,
@@ -86,22 +89,12 @@ export default {
},
searckGird(row) {
- 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
- }
- })
- }else { //查网格员
- this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
- if (res?.data) {
- this.userList = res.data
- this.userList.map((item) => {
- item.isChecked = false
- })
- }
- })
- }
+ if(row.girdLevel == 2) return
+ this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
+ if (res?.data) {
+ this.treeList = res.data.records
+ }
+ })
},
girdNameClick(row, index) {
@@ -136,26 +129,13 @@ export default {
this.$forceUpdate()
},
- userClick(row, index) {
- if (this.userList[index].isChecked) {//取消
- this.userList[index].isChecked = false
- this.SelectGird = {}
- } else {
- this.userList.map((item) => {
- item.isChecked = false
- })
- this.userList[index].isChecked = true
- this.SelectGird = row
- }
- this.$forceUpdate()
- },
submit() {
if (this.SelectGird.id != null) {
uni.$emit('goback', this.SelectGird)
uni.navigateBack()
} else {
- return this.$u.toast('请选择网格或网格员')
+ return this.$u.toast('请选择网格')
}
},