修复部门树问题
This commit is contained in:
		| @@ -473,7 +473,8 @@ export default { | ||||
|         params: {unitName: this.unitName} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.unitList = this.$arr2tree(res.data) | ||||
|           const origin = res.data.itemList || res.data | ||||
|           this.unitList = this.$arr2tree(origin, {parent: "parentid"}) | ||||
|           const defaultRoot = this.unitList.at(0)?.id | ||||
|           this.defaultExpanded = [defaultRoot].filter(Boolean) || [] | ||||
|           this.search.departmentId = defaultRoot | ||||
|   | ||||
		Reference in New Issue
	
	Block a user