diff --git a/continew-admin-ui/src/views/system/dept/index.vue b/continew-admin-ui/src/views/system/dept/index.vue
index ee2ec83a..42695e89 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;
};