diff --git a/src/views/HandleControl/index.vue b/src/views/HandleControl/index.vue
index 8e8a5e4..9c482a6 100644
--- a/src/views/HandleControl/index.vue
+++ b/src/views/HandleControl/index.vue
@@ -133,7 +133,7 @@
切换模式
- 手动
+ {{ info.disable ? '手动' : '自动' }}
@@ -423,6 +423,7 @@ const updateTime = () => {
// 切换回路状态
const toggleCircuit = (circuitName) => {
+ if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
const circuit = info.value.loops.find(c => c.name === circuitName)
if (circuit) {
circuit.is_open = !circuit.is_open
@@ -431,6 +432,7 @@ const toggleCircuit = (circuitName) => {
// 打开亮度调节弹窗
const openBrightnessDialog = (channelName) => {
+ if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
selectedChannelName.value = channelName
const channel = info.value.loops.find(c => c.name === channelName)
if (channel) {
@@ -455,6 +457,7 @@ const confirmBrightness = () => {
// 打开全局亮度调节
const openGlobalBrightnessDialog = () => {
+ if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
selectedChannelName.value = null
currentBrightness.value = 50
brightnessDialogVisible.value = true
@@ -462,6 +465,7 @@ const openGlobalBrightnessDialog = () => {
// 全开灯光
const openLightSettings = () => {
+ if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
info.value.loops.forEach(circuit => {
circuit.is_open = true
})
@@ -472,6 +476,7 @@ const openLightSettings = () => {
// 全关灯光
const turnOffAll = () => {
+ if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
info.value.loops.forEach(circuit => {
circuit.is_open = false
})