From 1fa6ac40e2ce16e1174cec9ca538d45eeb660fdc Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 05 六月 2025 18:17:56 +0800
Subject: [PATCH] 工作台

---
 src/views/system/dept/index.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 4dd044a..cfc38bf 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -56,7 +56,7 @@
       :default-expand-all="isExpandAll"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="260"></el-table-column>
+      <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="500"></el-table-column>
       <el-table-column prop="orderNum" label="鎺掑簭" width="200"></el-table-column>
       <el-table-column prop="status" label="鐘舵��" width="100">
         <template slot-scope="scope">
@@ -181,7 +181,7 @@
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
       // 鏄惁灞曞紑锛岄粯璁ゅ叏閮ㄥ睍寮�
-      isExpandAll: true,
+      isExpandAll: false,
       // 閲嶆柊娓叉煋琛ㄦ牸鐘舵��
       refreshTable: true,
       // 鏌ヨ鍙傛暟
@@ -226,10 +226,12 @@
     /** 鏌ヨ閮ㄩ棬鍒楄〃 */
     getList() {
       this.loading = true;
+      console.log(this.queryParams, "dddddd")
       listDept(this.queryParams).then(response => {
         this.deptList = this.handleTree(response.data, "deptId");
         this.loading = false;
       });
+
     },
     /** 杞崲閮ㄩ棬鏁版嵁缁撴瀯 */
     normalizer(node) {
@@ -303,6 +305,13 @@
             const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] };
             this.deptOptions.push(noResultsOptions);
           }
+          if (row.parentId === 0) {
+            this.deptOptions.push({
+              deptId: 0,
+              deptName: '鏃�',
+              children: []
+            });
+          }
         });
       });
     },

--
Gitblit v1.8.0