feat(equipment): 接入运维模式开关与编辑用户 mode 字段
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
2e07a7fcee
commit
f6d6591c69
@@ -42,6 +42,7 @@ let scanTimer: number | null = null
|
||||
|
||||
Page({
|
||||
data: {
|
||||
operationsEngineer: false,
|
||||
devices: [] as DeviceItem[],
|
||||
loadingShow: false,
|
||||
loadingTitle: '正在连接设备',
|
||||
@@ -49,6 +50,7 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.setData({ operationsEngineer: getApp<IAppOption>().globalData.operationsEngineer ?? false })
|
||||
this.loadDevices()
|
||||
this._subscribeDisconnected()
|
||||
},
|
||||
@@ -240,9 +242,16 @@ Page({
|
||||
wx.navigateTo({ url: '/pages/connectedDevice/connectedDevice' })
|
||||
},
|
||||
|
||||
/** 长按 banner 打开运维模式 */
|
||||
onLongPressBanner() {
|
||||
getApp<IAppOption>().globalData.operationsEngineer = true
|
||||
this.setData({ operationsEngineer: true })
|
||||
},
|
||||
|
||||
/** 关闭运维模式 */
|
||||
onCloseOps() {
|
||||
// 关闭运维模式(待接入)
|
||||
getApp<IAppOption>().globalData.operationsEngineer = false
|
||||
this.setData({ operationsEngineer: false })
|
||||
},
|
||||
|
||||
/** 取消全部配对:解除所有设备绑定 */
|
||||
|
||||
Reference in New Issue
Block a user