feat(userManagement): 新增添加用户弹框组件
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9e8e26cb19
commit
dc0a294406
@@ -96,6 +96,7 @@ Page({
|
||||
syncShow: false,
|
||||
syncPercent: 0,
|
||||
syncStatus: '',
|
||||
addUserShow: false,
|
||||
isOps: false
|
||||
},
|
||||
|
||||
@@ -403,14 +404,34 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/** 添加用户 */
|
||||
/** 添加用户:运维模式或已有本人直接跳添加页,否则弹出选择弹框 */
|
||||
onTapAddUser() {
|
||||
if (this.data.memberCount >= 10) {
|
||||
wx.showToast({ title: '最多添加10位用户', icon: 'none' })
|
||||
return
|
||||
}
|
||||
const sn = targetDevice?.sn || ''
|
||||
wx.navigateTo({ url: `/pages/addUser/addUser?sn=${encodeURIComponent(sn)}` })
|
||||
if (this.data.isOps || this.data.self) {
|
||||
this.onTapAddNew()
|
||||
} else {
|
||||
this.setData({ addUserShow: true })
|
||||
}
|
||||
},
|
||||
|
||||
/** 关闭添加用户弹框 */
|
||||
onCloseAddUser() {
|
||||
this.setData({ addUserShow: false })
|
||||
},
|
||||
|
||||
/** 弹框:一键添加本人 */
|
||||
onAddSelfTap() {
|
||||
this.setData({ addUserShow: false })
|
||||
this.onTapAddSelf()
|
||||
},
|
||||
|
||||
/** 弹框:添加其他用户 */
|
||||
onAddOtherTap() {
|
||||
this.setData({ addUserShow: false })
|
||||
this.onTapAddNew()
|
||||
},
|
||||
|
||||
/** 编辑成员:跳转 addUser 编辑模式 */
|
||||
|
||||
Reference in New Issue
Block a user