bug
This commit is contained in:
		| @@ -275,6 +275,9 @@ export default { | ||||
|       return { | ||||
|         girdName: [ | ||||
|           {required: true, message: "请填写网格名称", trigger: "change"}, | ||||
|         ], | ||||
|         girdLevel: [ | ||||
|           {required: true, message: "请选择网格层级", trigger: "change"}, | ||||
|         ] | ||||
|       }; | ||||
|     }, | ||||
|   | ||||
| @@ -334,7 +334,7 @@ export default { | ||||
|             this.info = { ...this.treeObj.treeList[0] }; | ||||
|  | ||||
|             this.$nextTick(() => { | ||||
|               this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id) | ||||
|               this.treeObj.treeList.length && this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id) | ||||
|             }) | ||||
|           } | ||||
|         }); | ||||
| @@ -389,7 +389,7 @@ export default { | ||||
|           params: { | ||||
|             ...this.searchObj, | ||||
|             ...this.page, | ||||
|             parentGirdId: this.searchId, | ||||
|             parentGirdId: this.info.girdLevel === '0' ? '' : this.searchId, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|   | ||||
| @@ -106,7 +106,7 @@ export default { | ||||
|           this.treeObj.treeList = res.data; | ||||
|  | ||||
|           this.$nextTick(() => { | ||||
|             this.$refs.tree.setCurrentKey(res.data[0].id) | ||||
|             res.data.length && this.$refs.tree.setCurrentKey(res.data[0].id) | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user