From 4bde837649ece932a3f516b8ca5545ce70eb7a6f Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sun, 5 Feb 2023 21:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=93=8D=E4=BD=9C=E6=A0=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- continew-admin-ui/src/views/system/dept/index.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/continew-admin-ui/src/views/system/dept/index.vue b/continew-admin-ui/src/views/system/dept/index.vue index ee2ec83..42695e8 100644 --- a/continew-admin-ui/src/views/system/dept/index.vue +++ b/continew-admin-ui/src/views/system/dept/index.vue @@ -45,6 +45,9 @@ 新增 + + 修改 + 删除 @@ -260,6 +263,7 @@ }); const ids = ref>([]); const title = ref(''); + const single = ref(true); const multiple = ref(true); const loading = ref(false); const detailLoading = ref(false); @@ -345,15 +349,16 @@ * * @param id ID */ - const toUpdate = async (id: number) => { + const toUpdate = (id: number) => { reset(); listDeptTree({}).then((res) => { treeData.value = res.data; - title.value = '修改部门'; - visible.value = true; }); + getDept(id).then((res) => { form.value = res.data; + title.value = '修改部门'; + visible.value = true; }); }; @@ -385,6 +390,7 @@ * @param id ID */ const toDetail = async (id: number) => { + if (detailLoading.value) return; detailLoading.value = true; detailVisible.value = true; getDept(id).then((res) => { @@ -453,6 +459,7 @@ */ const handleSelectionChange = (rowKeys: Array) => { ids.value = rowKeys; + single.value = rowKeys.length !== 1; multiple.value = !rowKeys.length; }; -- GitLab