From f5410dfff4f4f8737a649047858be477d6e7c2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 17 Dec 2024 09:41:11 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 572f50c..0a35a1b 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -579,15 +579,6 @@ function submitFileForm() { uploadRef.value?.submit(); } -/** 初始化部门数据 */ -const initTreeData = async () => { - // 判断部门的数据是否存在,存在不获取,不存在则获取 - if (deptOptions.value === undefined) { - const { data } = await treeselect(); - deptOptions.value = data; - } -}; - /** 重置操作表单 */ const reset = () => { form.value = { ...initFormData }; @@ -605,7 +596,6 @@ const handleAdd = async () => { const { data } = await api.getUser(); dialog.visible = true; dialog.title = '新增用户'; - await initTreeData(); postOptions.value = data.posts; roleOptions.value = data.roles; form.value.password = initPassword.value.toString(); @@ -618,7 +608,6 @@ const handleUpdate = async (row?: UserForm) => { const { data } = await api.getUser(userId); dialog.visible = true; dialog.title = '修改用户'; - await initTreeData(); Object.assign(form.value, data.user); postOptions.value = data.posts; roleOptions.value = data.roles;