fix issues #I7657W
This commit is contained in:
		| @ -247,13 +247,13 @@ const handleUpdate = (row: TreeVO) => { | ||||
|  | ||||
| /** 提交按钮 */ | ||||
| const submitForm = () => { | ||||
|   treeFormRef.value.validate((valid: boolean) => { | ||||
|   treeFormRef.value.validate(async (valid: boolean) => { | ||||
|     if (valid) { | ||||
|       buttonLoading.value = true; | ||||
|       if (form.value.id) { | ||||
|         updateTree(form.value).finally(() => buttonLoading.value = false); | ||||
|         await updateTree(form.value).finally(() => buttonLoading.value = false); | ||||
|       } else { | ||||
|         addTree(form.value).finally(() => buttonLoading.value = false); | ||||
|         await addTree(form.value).finally(() => buttonLoading.value = false); | ||||
|       } | ||||
|       proxy?.$modal.msgSuccess("操作成功"); | ||||
|       dialog.visible = false; | ||||
|  | ||||
| @ -8,6 +8,7 @@ | ||||
|           <el-tree | ||||
|             class="mt-2" | ||||
|             ref="deptTreeRef" | ||||
|             node-key="id" | ||||
|             :data="deptOptions" | ||||
|             :props="{ label: 'label', children: 'children' }" | ||||
|             :expand-on-click-node="false" | ||||
| @ -442,6 +443,8 @@ const resetQuery = () => { | ||||
|     dateRange.value = ['',''] | ||||
|     queryFormRef.value.resetFields(); | ||||
|     queryParams.value.pageNum = 1; | ||||
|     queryParams.value.deptId = undefined; | ||||
|     deptTreeRef.value.setCurrentKey(null); | ||||
|     handleQuery(); | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 LiuHao
					LiuHao