Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
V
vue-quasar-admin-dev
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
vue-quasar-admin-dev
Commits
b244bf6b
Commit
b244bf6b
authored
Apr 29, 2026
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3de9a072
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
8 行删除
+18
-8
src/components/organization-dept-panel.vue
+9
-8
src/service/user/user.js
+9
-0
没有找到文件。
src/components/organization-dept-panel.vue
View file @
b244bf6b
...
...
@@ -141,7 +141,7 @@
</div>
<div
class=
"text-grey-6 text-center q-mt-md"
>
已选 {{ tempCheckedUsers.size }} 人
已选 {{ tempCheckedUsers.size }} 人
/ {{ deptUsers.length }} 人
</div>
</div>
</q-modal-layout>
...
...
@@ -152,7 +152,7 @@
<
script
>
import
Tree
from
'ant-design-vue/lib/tree'
;
import
'ant-design-vue/dist/antd.css'
;
import
{
deptTree
,
getDeptUsers
}
from
"@/service/user/user"
;
import
{
deptTree
,
getDeptUsers
,
getDeptUsersWithChildren
}
from
"@/service/user/user"
;
let
cachedTreeData
=
null
;
...
...
@@ -265,19 +265,20 @@
this
.
currentDept
=
dept
;
this
.
deptUserSearchText
=
''
;
this
.
deptModal
=
true
;
// 懒加载部门用户
this
.
tempCheckedUsers
=
new
Set
();
// 懒加载部门用户
(包括子部门)
if
(
dept
.
key
>=
1000000
)
{
const
realDeptId
=
dept
.
key
-
1000000
;
this
.
deptUserLoading
=
true
;
this
.
deptUsers
=
[];
try
{
let
res
=
await
getDeptUsers
(
realDeptId
,
1
,
100
);
let
users
=
(
res
.
data
.
data
.
list
||
res
.
data
.
data
)
||
[];
// 修改:调用新 API,查询部门及子部门用户
let
res
=
await
getDeptUsersWithChildren
(
realDeptId
);
let
users
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
list
)
||
res
.
data
.
data
||
[];
this
.
deptUsers
=
users
.
map
(
u
=>
({
key
:
u
.
id
,
title
:
u
.
title
||
u
.
label
||
''
,
no
:
u
.
no
||
''
title
:
u
.
username
||
u
.
title
||
''
,
no
:
u
.
account
||
u
.
number
||
''
}));
}
catch
(
e
)
{
console
.
error
(
'loadDeptUsers error:'
,
e
);
...
...
src/service/user/user.js
View file @
b244bf6b
...
...
@@ -215,6 +215,15 @@ export function getweixinisleaderindeptByaccount(){
});
}
export
function
getDeptUsersWithChildren
(
deptId
)
{
return
request
({
url
:
'/user/dept_users_with_children/'
+
deptId
,
method
:
'get'
,
params
:
{
pageNum
:
1
,
pageSize
:
100
},
loading
:
'gears'
});
}
export
function
listByIds
(
ids
)
{
return
request
({
url
:
'/user/list_by_ids'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论