|
|
|
@ -133,7 +133,7 @@
|
|
|
|
</el-icon>
|
|
|
|
</el-icon>
|
|
|
|
切换模式
|
|
|
|
切换模式
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-button class="mode-button active">手动</el-button>
|
|
|
|
<el-button class="mode-button active" @click="info.disable = !info.disable">{{ info.disable ? '手动' : '自动' }}</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 灯控设置 -->
|
|
|
|
<!-- 灯控设置 -->
|
|
|
|
@ -423,6 +423,7 @@ const updateTime = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 切换回路状态
|
|
|
|
// 切换回路状态
|
|
|
|
const toggleCircuit = (circuitName) => {
|
|
|
|
const toggleCircuit = (circuitName) => {
|
|
|
|
|
|
|
|
if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
|
|
|
|
const circuit = info.value.loops.find(c => c.name === circuitName)
|
|
|
|
const circuit = info.value.loops.find(c => c.name === circuitName)
|
|
|
|
if (circuit) {
|
|
|
|
if (circuit) {
|
|
|
|
circuit.is_open = !circuit.is_open
|
|
|
|
circuit.is_open = !circuit.is_open
|
|
|
|
@ -431,6 +432,7 @@ const toggleCircuit = (circuitName) => {
|
|
|
|
|
|
|
|
|
|
|
|
// 打开亮度调节弹窗
|
|
|
|
// 打开亮度调节弹窗
|
|
|
|
const openBrightnessDialog = (channelName) => {
|
|
|
|
const openBrightnessDialog = (channelName) => {
|
|
|
|
|
|
|
|
if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
|
|
|
|
selectedChannelName.value = channelName
|
|
|
|
selectedChannelName.value = channelName
|
|
|
|
const channel = info.value.loops.find(c => c.name === channelName)
|
|
|
|
const channel = info.value.loops.find(c => c.name === channelName)
|
|
|
|
if (channel) {
|
|
|
|
if (channel) {
|
|
|
|
@ -455,6 +457,7 @@ const confirmBrightness = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 打开全局亮度调节
|
|
|
|
// 打开全局亮度调节
|
|
|
|
const openGlobalBrightnessDialog = () => {
|
|
|
|
const openGlobalBrightnessDialog = () => {
|
|
|
|
|
|
|
|
if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
|
|
|
|
selectedChannelName.value = null
|
|
|
|
selectedChannelName.value = null
|
|
|
|
currentBrightness.value = 50
|
|
|
|
currentBrightness.value = 50
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
@ -462,6 +465,7 @@ const openGlobalBrightnessDialog = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 全开灯光
|
|
|
|
// 全开灯光
|
|
|
|
const openLightSettings = () => {
|
|
|
|
const openLightSettings = () => {
|
|
|
|
|
|
|
|
if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
circuit.is_open = true
|
|
|
|
circuit.is_open = true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -472,6 +476,7 @@ const openLightSettings = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 全关灯光
|
|
|
|
// 全关灯光
|
|
|
|
const turnOffAll = () => {
|
|
|
|
const turnOffAll = () => {
|
|
|
|
|
|
|
|
if (!info.value.disable) return ElMessage.warning('请切换至手动模式')
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
circuit.is_open = false
|
|
|
|
circuit.is_open = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|