feat(userManagement): 运维模式隐藏一键添加本人并优化本人卡片与同步弹框

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-09-02 18:29:08 +08:00
co-authored by Claude Opus 4.7
parent e595ff9f64
commit 00394bf8c4
2 changed files with 31 additions and 27 deletions
@@ -95,7 +95,8 @@ Page({
groups: [] as GroupItem[],
syncShow: false,
syncPercent: 0,
syncStatus: ''
syncStatus: '',
isOps: false
},
onLoad(options: Record<string, string>) {
@@ -111,6 +112,7 @@ Page({
'device.deviceId': targetDevice.deviceId,
'device.sn': targetDevice.sn,
'device.status': targetDevice.connected,
isOps: getApp<IAppOption>().globalData.operationsEngineer ?? false,
})
this._subscribeDeviceState()
this._loadMembers()
@@ -258,7 +260,7 @@ Page({
/** 同步完成后的统一处理:上报后刷新列表 + 关闭弹框 */
_finishSync(reportUsers: SyncUser[] | null, successText: string) {
this.setData({ syncPercent: 100, syncStatus: '同步完成' })
wx.showToast({ title: successText, icon: 'success' })
// wx.showToast({ title: successText, icon: 'success' })
if (reportUsers && reportUsers.length && targetDevice?.sn) {
const syncedIds = reportUsers.map(u => u.userId).filter(Boolean)
if (syncedIds.length) {
@@ -271,7 +273,7 @@ Page({
syncCloseTimer = setTimeout(() => {
syncCloseTimer = null
this.setData({ syncShow: false })
}, 1000)
}, 1500)
},
/** 同步用户至设备:有删除标记则清空重下发,否则只下发「待同步」 */