From fc678c5088b084311f7c11cb2793dbe62049ca9e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 20 二月 2025 11:08:07 +0800
Subject: [PATCH] 字典改为树结构

---
 src/views/system/dept/index.vue |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 4dd044a..b02461d 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">
@@ -303,6 +303,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