@@ -251,7 +251,7 @@ const setDeviceTime = () => {
const week = ref('')
const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
-
+const phaseLoading = ref(true)
RPC.post('/adl400/readPhaseData', { comm_uid: commit_uid }).then(res => {
powerPhases.value[0].voltage = res.aVoltage + 'V'
powerPhases.value[0].current = res.aElectricCurrent + 'A'
@@ -271,6 +271,8 @@ RPC.post('/adl400/readPhaseData', { comm_uid: commit_uid }).then(res => {
energyParams.value.activeEnergy = res.activeEnergy + 'kW·h'
energyParams.value.activePower = res.activePower + 'kW'
energyParams.value.powerFactor = res.powerFactor
+}).finally(() => {
+ phaseLoading.value = false
})
// 电力参数数据
@@ -404,7 +406,9 @@ const info = ref({
})
const isSync = ref(true)
+const infoLoading = ref(false)
const getInfo = () => {
+ infoLoading.value = true
isSync.value = true
RPC.post('/m9z/getDeviceManualInfo', { comm_uid: commit_uid }).then(res => {
info.value = res
@@ -413,12 +417,14 @@ const getInfo = () => {
}, 1000);
}).finally(() => {
isInitData.value = false
+ infoLoading.value = false
})
}
getInfo()
const refresh = () => {
getInfo()
+ phaseLoading.value = true
RPC.post('/adl400/readPhaseData', { comm_uid: commit_uid }).then(res => {
powerPhases.value[0].voltage = res.aVoltage + 'V'
powerPhases.value[0].current = res.aElectricCurrent + 'A'
@@ -438,6 +444,8 @@ const refresh = () => {
energyParams.value.activeEnergy = res.activeEnergy + 'kW·h'
energyParams.value.activePower = res.activePower + 'kW'
energyParams.value.powerFactor = res.powerFactor
+ }).finally(() => {
+ phaseLoading.value = false
})
RPC.post('/m9z/getDeviceSunRiseTime', { comm_uid: commit_uid }).then(res => {
sunriseTime.value = res.Sunrise ? dayjs(res.Sunrise).format('HH:mm:ss') : ''
diff --git a/src/views/Monitoring/index.vue b/src/views/Monitoring/index.vue
index b732e2e..8b6fe04 100644
--- a/src/views/Monitoring/index.vue
+++ b/src/views/Monitoring/index.vue
@@ -20,7 +20,7 @@
-
+
{{ phase.name }}相
@@ -76,70 +76,72 @@
{{ info.Mode ? '手动' : '自动' }}
-
-
-
-
-
- 直流回路{{ index + 1 }}:{{ circuit.is_open ? '打开' : '关闭' }}
-
-
-
-
-
电压: {{ circuit.V ? circuit.V?.toFixed(2) : 0 }}V
-
电流: {{ circuit.A ? circuit.A?.toFixed(2) : 0 }}A
+
+
+
+
+
+
+ 直流回路{{ index + 1 }}:{{ circuit.is_open ? '打开' : '关闭' }}
-
-
功率: {{ circuit.Kw ? circuit.Kw?.toFixed(3) : 0 }}kW
+
+
+
+
电压: {{ circuit.V ? circuit.V?.toFixed(2) : 0 }}V
+
电流: {{ circuit.A ? circuit.A?.toFixed(2) : 0 }}A
+
+
+
功率: {{ circuit.Kw ? circuit.Kw?.toFixed(3) : 0 }}kW
+
-
-
-
-
-
- 直流回路{{ index + 6 }}:{{ circuit.is_open ? '打开' : '关闭' }}
-
-
-
-
-
电压: {{ circuit.V ? circuit.V?.toFixed(2) : 0 }}V
-
电流: {{ circuit.A ? circuit.A?.toFixed(2) : 0 }}A
+
+
+
+
+ 直流回路{{ index + 6 }}:{{ circuit.is_open ? '打开' : '关闭' }}
-
-
功率: {{ circuit.Kw ? circuit.Kw?.toFixed(3) : 0 }}kW
+
+
+
+
电压: {{ circuit.V ? circuit.V?.toFixed(2) : 0 }}V
+
电流: {{ circuit.A ? circuit.A?.toFixed(2) : 0 }}A
+
+
+
功率: {{ circuit.Kw ? circuit.Kw?.toFixed(3) : 0 }}kW
+
-
-
-
-
-
-
调光通道{{ index + 1 }}
-
- {{ channel.pwm }}%
+
+
+
+
+
调光通道{{ index + 1 }}
+
+ {{ channel.pwm }}%
+
-
-
-
-
-
调光通道{{ index + 6 }}
-
- {{ channel.pwm }}%
+
+
+
+
调光通道{{ index + 6 }}
+
+ {{ channel.pwm }}%
+
@@ -423,10 +425,14 @@ const info = ref({
"backup_byte4": 0
})
+const infoLoading = ref(false)
+const phaseLoading = ref(false)
const getInfo = () => {
// RPC.post('/m9z/getDeviceManualInfo', { comm_uid: commit_uid }).then(res => {
// info.value = res
// })
+ infoLoading.value = true
+ phaseLoading.value = true
RPC.post('/adl400/readPhaseData', { comm_uid: commit_uid }).then(res => {
powerPhases.value[0].voltage = res.aVoltage + 'V'
powerPhases.value[0].current = res.aElectricCurrent + 'A'
@@ -446,12 +452,16 @@ const getInfo = () => {
energyParams.value.activeEnergy = res.activeEnergy + 'kW·h'
energyParams.value.activePower = res.activePower + 'kW'
energyParams.value.powerFactor = res.powerFactor
+ }).finally(() => {
+ phaseLoading.value = false
})
RPC.post('/m9z/getDeviceStatus2', { comm_uid: commit_uid }).then((res) => {
// 直流电流、电源、功率
if (res.Loops?.length === 10) {
info.value = res
}
+ }).finally(() => {
+ infoLoading.value = false
})
getLineData()