|
|
|
@ -5,13 +5,13 @@
|
|
|
|
<!-- 顶部状态栏 -->
|
|
|
|
<!-- 顶部状态栏 -->
|
|
|
|
<div class="header-status">
|
|
|
|
<div class="header-status">
|
|
|
|
<div class="time-info">
|
|
|
|
<div class="time-info">
|
|
|
|
<span>{{ currentTime }} 星期五</span>
|
|
|
|
<span>{{ currentTime }} {{ week }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="page-title">
|
|
|
|
<div class="page-title">
|
|
|
|
<h1>手动控制</h1>
|
|
|
|
<h1>手动控制</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="system-status">
|
|
|
|
<div class="system-status">
|
|
|
|
<span>系统已运行:{{ systemRuntime }}</span>
|
|
|
|
<!-- <span>系统已运行:{{ systemRuntime }}</span> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@ -71,11 +71,11 @@
|
|
|
|
<div class="circuit-section">
|
|
|
|
<div class="circuit-section">
|
|
|
|
<!-- 上排回路 -->
|
|
|
|
<!-- 上排回路 -->
|
|
|
|
<div class="circuit-row">
|
|
|
|
<div class="circuit-row">
|
|
|
|
<div v-for="circuit in circuits.slice(0, 5)" :key="circuit.id" class="circuit-item">
|
|
|
|
<div v-for="(circuit, index) in info.loops.slice(0, 5)" :key="circuit.name" class="circuit-item">
|
|
|
|
<div class="circuit-status" :class="{ active: circuit.status === '打开' }">
|
|
|
|
<div class="circuit-status" :class="{ active: circuit.is_open }">
|
|
|
|
{{ circuit.name }}:{{ circuit.status }}
|
|
|
|
回路{{ index + 1 }}:{{ circuit.is_open ? '打开' : '关闭' }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="circuit-icon" :class="{ active: circuit.status === '打开' }" @click="toggleCircuit(circuit.id)">
|
|
|
|
<div class="circuit-icon" :class="{ active: circuit.is_open }" @click="toggleCircuit(circuit.name)">
|
|
|
|
<el-icon>
|
|
|
|
<el-icon>
|
|
|
|
<Sunny />
|
|
|
|
<Sunny />
|
|
|
|
</el-icon>
|
|
|
|
</el-icon>
|
|
|
|
@ -85,11 +85,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 下排回路 -->
|
|
|
|
<!-- 下排回路 -->
|
|
|
|
<div class="circuit-row">
|
|
|
|
<div class="circuit-row">
|
|
|
|
<div v-for="circuit in circuits.slice(5, 10)" :key="circuit.id" class="circuit-item">
|
|
|
|
<div v-for="(circuit, index) in info.loops.slice(5, 10)" :key="circuit.name" class="circuit-item">
|
|
|
|
<div class="circuit-status" :class="{ active: circuit.status === '打开' }">
|
|
|
|
<div class="circuit-status" :class="{ active: circuit.is_open }">
|
|
|
|
{{ circuit.name }}:{{ circuit.status }}
|
|
|
|
回路{{ index + 6 }}:{{ circuit.is_open ? '打开' : '关闭' }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="circuit-icon" :class="{ active: circuit.status === '打开' }" @click="toggleCircuit(circuit.id)">
|
|
|
|
<div class="circuit-icon" :class="{ active: circuit.is_open }" @click="toggleCircuit(circuit.name)">
|
|
|
|
<el-icon>
|
|
|
|
<el-icon>
|
|
|
|
<Sunny />
|
|
|
|
<Sunny />
|
|
|
|
</el-icon>
|
|
|
|
</el-icon>
|
|
|
|
@ -102,20 +102,20 @@
|
|
|
|
<div class="dimming-section">
|
|
|
|
<div class="dimming-section">
|
|
|
|
<!-- 上排调光通道 -->
|
|
|
|
<!-- 上排调光通道 -->
|
|
|
|
<div class="dimming-row">
|
|
|
|
<div class="dimming-row">
|
|
|
|
<div v-for="channel in dimmingChannels.slice(0, 5)" :key="channel.id" class="dimming-item">
|
|
|
|
<div v-for="(channel, index) in info.loops.slice(0, 5)" :key="channel.name" class="dimming-item">
|
|
|
|
<div class="channel-label">{{ channel.name }}</div>
|
|
|
|
<div class="channel-label">调光通道{{ index + 1 }}</div>
|
|
|
|
<div class="brightness-display" :class="{ active: channel.brightness > 0 }" @click="openBrightnessDialog(channel.id)">
|
|
|
|
<div class="brightness-display" :class="{ active: channel.pwm > 0 }" @click="openBrightnessDialog(channel.name)">
|
|
|
|
{{ channel.brightness }}%
|
|
|
|
{{ channel.pwm }}%
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 下排调光通道 -->
|
|
|
|
<!-- 下排调光通道 -->
|
|
|
|
<div class="dimming-row">
|
|
|
|
<div class="dimming-row">
|
|
|
|
<div v-for="channel in dimmingChannels.slice(5, 10)" :key="channel.id" class="dimming-item">
|
|
|
|
<div v-for="(channel, index) in info.loops.slice(5, 10)" :key="channel.name" class="dimming-item">
|
|
|
|
<div class="channel-label">{{ channel.name }}</div>
|
|
|
|
<div class="channel-label">调光通道{{ index + 6 }}</div>
|
|
|
|
<div class="brightness-display" :class="{ active: channel.brightness > 0 }" @click="openBrightnessDialog(channel.id)">
|
|
|
|
<div class="brightness-display" :class="{ active: channel.pwm > 0 }" @click="openBrightnessDialog(channel.name)">
|
|
|
|
{{ channel.brightness }}%
|
|
|
|
{{ channel.pwm }}%
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -171,6 +171,9 @@
|
|
|
|
<span>日落时间:{{ sunsetTime }}</span>
|
|
|
|
<span>日落时间:{{ sunsetTime }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="color:#fff">
|
|
|
|
|
|
|
|
设备号:{{ commit_uid }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="bottom_item">
|
|
|
|
<div class="bottom_item">
|
|
|
|
<el-button class="restart-button" @click="restartSystem">
|
|
|
|
<el-button class="restart-button" @click="restartSystem">
|
|
|
|
<el-icon>
|
|
|
|
<el-icon>
|
|
|
|
@ -206,46 +209,73 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
import { ref, onMounted, onUnmounted } from 'vue'
|
|
|
|
import { ref, onMounted, onUnmounted, watch } from 'vue'
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
import RPC from '@/utils/rpc'
|
|
|
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const commit_uid = localStorage.getItem('central_control_comm_uid')
|
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
const router = useRouter()
|
|
|
|
const currentTime = ref('')
|
|
|
|
const currentTime = ref('')
|
|
|
|
const systemRuntime = ref('38分钟')
|
|
|
|
const systemRuntime = ref('38分钟')
|
|
|
|
const brightnessDialogVisible = ref(false)
|
|
|
|
const brightnessDialogVisible = ref(false)
|
|
|
|
const currentBrightness = ref(50)
|
|
|
|
const currentBrightness = ref(50)
|
|
|
|
const selectedChannelId = ref(null)
|
|
|
|
const selectedChannelName = ref(null)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const week = ref('')
|
|
|
|
|
|
|
|
const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RPC.post('/adl400/readPhaseData', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
|
|
|
powerPhases.value[0].voltage = res.aVoltage + 'V'
|
|
|
|
|
|
|
|
powerPhases.value[0].current = res.aElectricCurrent + 'A'
|
|
|
|
|
|
|
|
powerPhases.value[0].power = res.aPower + 'Kw'
|
|
|
|
|
|
|
|
powerPhases.value[0].factor = res.aPowerFactor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
powerPhases.value[1].voltage = res.bVoltage + 'V'
|
|
|
|
|
|
|
|
powerPhases.value[1].current = res.bElectricCurrent + 'A'
|
|
|
|
|
|
|
|
powerPhases.value[1].power = res.bPower + 'Kw'
|
|
|
|
|
|
|
|
powerPhases.value[1].factor = res.bPowerFactor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
powerPhases.value[2].voltage = res.cVoltage + 'V'
|
|
|
|
|
|
|
|
powerPhases.value[2].current = res.cElectricCurrent + 'A'
|
|
|
|
|
|
|
|
powerPhases.value[2].power = res.cPower + 'Kw'
|
|
|
|
|
|
|
|
powerPhases.value[2].factor = res.cPowerFactor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
energyParams.value.activeEnergy = res.activeEnergy + 'A'
|
|
|
|
|
|
|
|
energyParams.value.powerFactor = res.powerFactor
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 电力参数数据
|
|
|
|
// 电力参数数据
|
|
|
|
const powerPhases = ref([
|
|
|
|
const powerPhases = ref([
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'A',
|
|
|
|
name: 'A',
|
|
|
|
voltage: '220.5V',
|
|
|
|
voltage: '0V',
|
|
|
|
current: '10.00A',
|
|
|
|
current: '0A',
|
|
|
|
power: '20.88kw',
|
|
|
|
power: '20.88kw',
|
|
|
|
factor: '0.99'
|
|
|
|
factor: '0'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'B',
|
|
|
|
name: 'B',
|
|
|
|
voltage: '220.5V',
|
|
|
|
voltage: '0V',
|
|
|
|
current: '10.00A',
|
|
|
|
current: '0A',
|
|
|
|
power: '20.88kw',
|
|
|
|
power: '0kw',
|
|
|
|
factor: '0.99'
|
|
|
|
factor: '0'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'C',
|
|
|
|
name: 'C',
|
|
|
|
voltage: '220.5V',
|
|
|
|
voltage: '0V',
|
|
|
|
current: '10.00A',
|
|
|
|
current: '0A',
|
|
|
|
power: '20.88kw',
|
|
|
|
power: '0kw',
|
|
|
|
factor: '0.99'
|
|
|
|
factor: '0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
const energyParams = ref({
|
|
|
|
const energyParams = ref({
|
|
|
|
dcVoltage: '0.0V',
|
|
|
|
dcVoltage: '0.0V',
|
|
|
|
activeEnergy: '88.88kwh',
|
|
|
|
activeEnergy: '0kwh',
|
|
|
|
activePower: '20.88kw',
|
|
|
|
activePower: '0kw',
|
|
|
|
powerFactor: '0.99'
|
|
|
|
powerFactor: '0'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 回路控制数据
|
|
|
|
// 回路控制数据
|
|
|
|
@ -276,8 +306,105 @@ const dimmingChannels = ref([
|
|
|
|
{ id: 10, name: '调光通道10', brightness: 0 }
|
|
|
|
{ id: 10, name: '调光通道10', brightness: 0 }
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
const sunriseTime = ref('05时38分00秒')
|
|
|
|
const info = ref({
|
|
|
|
const sunsetTime = ref('19时08分00秒')
|
|
|
|
"disable": false,
|
|
|
|
|
|
|
|
"backup_byte1": 0,
|
|
|
|
|
|
|
|
"loops": [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 0,
|
|
|
|
|
|
|
|
"name": "#1",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 1,
|
|
|
|
|
|
|
|
"name": "#2",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 2,
|
|
|
|
|
|
|
|
"name": "#3",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 3,
|
|
|
|
|
|
|
|
"name": "#4",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 4,
|
|
|
|
|
|
|
|
"name": "#5",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 5,
|
|
|
|
|
|
|
|
"name": "#6",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 6,
|
|
|
|
|
|
|
|
"name": "#7",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 7,
|
|
|
|
|
|
|
|
"name": "#8",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 8,
|
|
|
|
|
|
|
|
"name": "#9",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"index": 9,
|
|
|
|
|
|
|
|
"name": "#10",
|
|
|
|
|
|
|
|
"is_open": false,
|
|
|
|
|
|
|
|
"pwm": 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
"backup_byte4": 0
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isSync = ref(true)
|
|
|
|
|
|
|
|
const getInfo = () => {
|
|
|
|
|
|
|
|
isSync.value = true
|
|
|
|
|
|
|
|
RPC.post('/m9z/getDeviceManualInfo', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
|
|
|
info.value = res
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
isSync.value = false
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getInfo()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const oldInfo = ref('')
|
|
|
|
|
|
|
|
watch(info, () => {
|
|
|
|
|
|
|
|
if (oldInfo.value === JSON.stringify(info.value)) return
|
|
|
|
|
|
|
|
RPC.post('/m9z/setDeviceManualInfo', { comm_uid: commit_uid, ...info.value }).finally(() => {
|
|
|
|
|
|
|
|
if (!isSync.value) {
|
|
|
|
|
|
|
|
isSync.value = true
|
|
|
|
|
|
|
|
getInfo()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
oldInfo.value = JSON.stringify(info.value)
|
|
|
|
|
|
|
|
}, { deep: true })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const sunriseTime = ref('')
|
|
|
|
|
|
|
|
const sunsetTime = ref('')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RPC.post('/m9z/getDeviceSunRiseTime', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
|
|
|
sunriseTime.value = res.Sunrise ? dayjs(res.Sunrise).format('HH:mm:ss') : ''
|
|
|
|
|
|
|
|
sunsetTime.value = res.Sunset ? dayjs(res.Sunset).format('HH:mm:ss') : ''
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 更新时间
|
|
|
|
// 更新时间
|
|
|
|
const updateTime = () => {
|
|
|
|
const updateTime = () => {
|
|
|
|
@ -289,37 +416,38 @@ const updateTime = () => {
|
|
|
|
const minutes = String(now.getMinutes()).padStart(2, '0')
|
|
|
|
const minutes = String(now.getMinutes()).padStart(2, '0')
|
|
|
|
const seconds = String(now.getSeconds()).padStart(2, '0')
|
|
|
|
const seconds = String(now.getSeconds()).padStart(2, '0')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
week.value = weekDays[now.getDay()]
|
|
|
|
|
|
|
|
|
|
|
|
currentTime.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
|
|
currentTime.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 切换回路状态
|
|
|
|
// 切换回路状态
|
|
|
|
const toggleCircuit = (circuitId) => {
|
|
|
|
const toggleCircuit = (circuitName) => {
|
|
|
|
const circuit = circuits.value.find(c => c.id === circuitId)
|
|
|
|
const circuit = info.value.loops.find(c => c.name === circuitName)
|
|
|
|
if (circuit) {
|
|
|
|
if (circuit) {
|
|
|
|
circuit.status = circuit.status === '关闭' ? '打开' : '关闭'
|
|
|
|
circuit.is_open = !circuit.is_open
|
|
|
|
ElMessage.success(`${circuit.name}已${circuit.status}`)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 打开亮度调节弹窗
|
|
|
|
// 打开亮度调节弹窗
|
|
|
|
const openBrightnessDialog = (channelId) => {
|
|
|
|
const openBrightnessDialog = (channelName) => {
|
|
|
|
selectedChannelId.value = channelId
|
|
|
|
selectedChannelName.value = channelName
|
|
|
|
const channel = dimmingChannels.value.find(c => c.id === channelId)
|
|
|
|
const channel = info.value.loops.find(c => c.name === channelName)
|
|
|
|
if (channel) {
|
|
|
|
if (channel) {
|
|
|
|
currentBrightness.value = channel.brightness
|
|
|
|
currentBrightness.value = channel.pwm
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 确认亮度设置
|
|
|
|
// 确认亮度设置
|
|
|
|
const confirmBrightness = () => {
|
|
|
|
const confirmBrightness = () => {
|
|
|
|
const channel = dimmingChannels.value.find(c => c.id === selectedChannelId.value)
|
|
|
|
const channel = info.value.loops.find(c => c.name === selectedChannelName.value)
|
|
|
|
if (channel) {
|
|
|
|
if (channel) {
|
|
|
|
channel.brightness = currentBrightness.value
|
|
|
|
channel.pwm = currentBrightness.value
|
|
|
|
ElMessage.success(`${channel.name}亮度已设置为${currentBrightness.value}%`)
|
|
|
|
// ElMessage.success(`${channel.name}亮度已设置为${currentBrightness.value}%`)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
dimmingChannels.value.forEach(channel => {
|
|
|
|
info.value.loops.forEach(channel => {
|
|
|
|
channel.brightness = currentBrightness.value
|
|
|
|
channel.pwm = currentBrightness.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
brightnessDialogVisible.value = false
|
|
|
|
brightnessDialogVisible.value = false
|
|
|
|
@ -327,31 +455,30 @@ const confirmBrightness = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 打开全局亮度调节
|
|
|
|
// 打开全局亮度调节
|
|
|
|
const openGlobalBrightnessDialog = () => {
|
|
|
|
const openGlobalBrightnessDialog = () => {
|
|
|
|
selectedChannelId.value = null
|
|
|
|
selectedChannelName.value = null
|
|
|
|
currentBrightness.value = 50
|
|
|
|
currentBrightness.value = 50
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
brightnessDialogVisible.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 全开灯光
|
|
|
|
// 全开灯光
|
|
|
|
const openLightSettings = () => {
|
|
|
|
const openLightSettings = () => {
|
|
|
|
circuits.value.forEach(circuit => {
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
circuit.status = '打开'
|
|
|
|
circuit.is_open = true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// dimmingChannels.value.forEach(channel => {
|
|
|
|
// dimmingChannels.value.forEach(channel => {
|
|
|
|
// channel.brightness = 100
|
|
|
|
// channel.brightness = 100
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
ElMessage.success('所有回路已打开')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 全关灯光
|
|
|
|
// 全关灯光
|
|
|
|
const turnOffAll = () => {
|
|
|
|
const turnOffAll = () => {
|
|
|
|
circuits.value.forEach(circuit => {
|
|
|
|
info.value.loops.forEach(circuit => {
|
|
|
|
circuit.status = '关闭'
|
|
|
|
circuit.is_open = false
|
|
|
|
})
|
|
|
|
|
|
|
|
dimmingChannels.value.forEach(channel => {
|
|
|
|
|
|
|
|
channel.brightness = 0
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
ElMessage.success('所有灯光已关闭')
|
|
|
|
// dimmingChannels.value.forEach(channel => {
|
|
|
|
|
|
|
|
// channel.brightness = 0
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// ElMessage.success('所有灯光已关闭')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 返回主界面
|
|
|
|
// 返回主界面
|
|
|
|
@ -361,7 +488,10 @@ const goBack = () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 重启系统
|
|
|
|
// 重启系统
|
|
|
|
const restartSystem = () => {
|
|
|
|
const restartSystem = () => {
|
|
|
|
ElMessage.warning('远程重启功能开发中...')
|
|
|
|
RPC.post('/m9z/setRestart', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
|
|
|
ElMessage.success('远程重启成功')
|
|
|
|
|
|
|
|
getInfo()
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let timeInterval = null
|
|
|
|
let timeInterval = null
|
|
|
|
@ -419,6 +549,7 @@ onUnmounted(() => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.system-status {
|
|
|
|
.system-status {
|
|
|
|
|
|
|
|
min-width: 200px;
|
|
|
|
font-size: 18px;
|
|
|
|
font-size: 18px;
|
|
|
|
font-weight: 300;
|
|
|
|
font-weight: 300;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|