BUG 30099
This commit is contained in:
		| @@ -126,7 +126,7 @@ | ||||
|               style="margin-bottom: 10px;" | ||||
|               size="small" | ||||
|               placeholder="请输入网格名称/网格员姓名/网格员电话" | ||||
|               v-model="name" | ||||
|               v-model="name" @change="$refs.tree.filter(name)" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|           <el-tree | ||||
| @@ -199,12 +199,6 @@ export default { | ||||
|     ...mapState(['user']) | ||||
|   }, | ||||
|  | ||||
|   watch: { | ||||
|     name(val) { | ||||
|       this.$refs.tree.filter(val) | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   created() { | ||||
|     this.getDict() | ||||
|     this.getGirdList() | ||||
| @@ -235,8 +229,8 @@ export default { | ||||
|  | ||||
|     getGirdList() { | ||||
|       this.instance.post(`/app/appgirdinfo/listAllByTop`).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.tree = this.formatList(res.data) | ||||
|         if (res?.data) { | ||||
|           this.tree = this.formatList([res.data]) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
| @@ -256,7 +250,7 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     formatList(list) { | ||||
|       var arr = [] | ||||
|       let arr = [] | ||||
|       for (let item of list) { | ||||
|         if (item.girdMemberList && item.girdMemberList.length) { | ||||
|           let userList = JSON.parse(JSON.stringify(item.girdMemberList)).map(v => { | ||||
| @@ -273,14 +267,11 @@ export default { | ||||
|           ] | ||||
|           delete item.girdMemberList | ||||
|         } | ||||
|  | ||||
|         if (item.girdList && item.girdList.length) { | ||||
|           this.formatList(item.girdList) | ||||
|         } | ||||
|  | ||||
|         arr.push(item) | ||||
|       } | ||||
|  | ||||
|       return arr | ||||
|     }, | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user