From b609f77709c4646daf155341475ae14fc0c7943d Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期五, 27 六月 2025 13:25:30 +0800
Subject: [PATCH] 修改
---
src/views/system/dept/index.vue | 53 ++++++++++++++++++++++++++++-------------------------
1 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index e013bb7..13afa61 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -26,26 +26,26 @@
</el-form-item>
</el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="Plus"
- @click="handleAdd"
- v-hasPermi="['system:dept:add']"
- >新增</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="info"
- plain
- icon="Sort"
- @click="toggleExpandAll"
- >展开/折叠</el-button>
- </el-col>
- <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
+<!-- <el-row :gutter="10" class="mb8">-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="primary"-->
+<!-- plain-->
+<!-- icon="Plus"-->
+<!-- @click="handleAdd"-->
+<!-- v-hasPermi="['system:dept:add']"-->
+<!-- >新增</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="info"-->
+<!-- plain-->
+<!-- icon="Sort"-->
+<!-- @click="toggleExpandAll"-->
+<!-- >展开/折叠</el-button>-->
+<!-- </el-col>-->
+<!-- <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
+<!-- </el-row>-->
<el-table
v-if="refreshTable"
@@ -142,13 +142,14 @@
<script setup name="Dept">
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
-
+import {onMounted,ref} from "vue";
+import {parseTime} from "@/utils/ruoyi";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const deptList = ref([]);
const open = ref(false);
-const loading = ref(true);
+const loading = ref(false);
const showSearch = ref(true);
const title = ref("");
const deptOptions = ref([]);
@@ -172,11 +173,15 @@
const { queryParams, form, rules } = toRefs(data);
+onMounted(()=>{
+ getList()
+})
+
/** 查询部门列表 */
function getList() {
loading.value = true;
listDept(queryParams.value).then(response => {
- deptList.value = proxy.handleTree(response.data, "deptId");
+ deptList.value = proxy.handleTree(response.data, "deptId",'parentId','children');
loading.value = false;
});
}
@@ -269,6 +274,4 @@
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
-
-getList();
</script>
--
Gitblit v1.9.2