diff --git a/wg-basic/page-unit.md b/wg-basic/page-unit.md index 6c7c2af..d23d20f 100644 --- a/wg-basic/page-unit.md +++ b/wg-basic/page-unit.md @@ -2,7 +2,7 @@ title: 页面组件 description: 页面上使用的组件 published: true -date: 2021-09-08T06:52:51.449Z +date: 2021-09-08T06:54:28.815Z tags: wg-basic editor: markdown dateCreated: 2021-09-08T06:41:19.351Z @@ -349,3 +349,17 @@ function initFactoryGateUploadFile() { 代码以厂区图片为例,实际只需要替换对应的内容即可:模板名称、模板BOX名称 # 10. 选择用户 +```javascript +top.dialog.dialogData.selectedUserIds = $('#selectedUserIds').val(); +top.dialog.open({ + url: top.restAjax.path('route/department/user/select-user', []), + title: '选择用户', + width: '500px', + height: '500px', + onClose: function() { + var selectedUsers = top.dialog.dialogData.selectedDepartmentUsers; + // 这里写处理逻辑 + if(selectedUsers && selectedUsers.length > 0) {} + } +}) +```