diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
index e2c968c9..e2dfb20b 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
@@ -8,6 +8,7 @@
+ 暂无设备参数
{{ data.text }}
@@ -32,7 +33,7 @@ import Video from "@screen/components/Video"
import LineChart from './components/LineChart/index.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
-import { getRoadInfoByStakeMark, getOrganizationName, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
+import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
import request from "@/utils/request";
import { Message } from 'element-ui';
@@ -53,6 +54,7 @@ export default {
return {
activeName: 'first',
releaseVisible: false,
+ secondLoading: true,
data: {
deviceName: "LH24",
roadName: "G35济泽高速",
@@ -113,11 +115,6 @@ export default {
this.dialogData.brand = data.brand;
})
- getOrganizationName(this.dialogData.iotDeviceId)
- .then(data => {
- this.dialogData.organizationName = data?.organizationName;
- })
-
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
@@ -128,50 +125,52 @@ export default {
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
params: {}
- }).then(result => {
- if (result.code != 200) return;
- const [deviceInfo] = result.data;
+ })
+ .then(result => {
+ if (result.code != 200) return;
+ const [deviceInfo] = result.data;
- const typeMap = {
- ac: '220v',
- dc: '12v',
- }
+ const typeMap = {
+ ac: '220v',
+ dc: '12v',
+ }
- for (const key in deviceInfo.formatValue) {
- // electricity 电流
- // voltage 电压
- if (key.includes('electricity')) {
- const args = key.match(/[a-z]+|[0-9]+$/g);
+ for (const key in deviceInfo.formatValue) {
+ // electricity 电流
+ // voltage 电压
+ if (key.includes('electricity')) {
+ const args = key.match(/[a-z]+|[0-9]+$/g);
- const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
- this.devicesList.push(
- {
- label: `支路${num} (${typeMap[type]}) 电压`,
- key: `${prefix}_voltage_${num}`,
- text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
- gridColumn: 3
- },
- {
- label: '电流',
- key: `${prefix}_electricity_${num}`,
- text: deviceInfo.formatValue[key],
- gridColumn: 2,
- state: deviceInfo.value[key] > 0
- }
- );
+ const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
+ this.devicesList.push(
+ {
+ label: `支路${num} (${typeMap[type]}) 电压`,
+ key: `${prefix}_voltage_${num}`,
+ text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
+ gridColumn: 3
+ },
+ {
+ label: '电流',
+ key: `${prefix}_electricity_${num}`,
+ text: deviceInfo.formatValue[key],
+ gridColumn: 2,
+ state: deviceInfo.value[key] > 0
+ }
+ );
+ }
}
- }
- this.devicesList.push({
- label: '风扇',
- key: `fan_status`,
- text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
- gridColumn: 5
+ this.devicesList.push({
+ label: '风扇',
+ key: `fan_status`,
+ text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
+ gridColumn: 5
+ })
+ // this.data = result.rows;
+ // this.total = result.total;
+ })
+ .finally(() => {
+ this.secondLoading = false
})
- // this.data = result.rows;
- // this.total = result.total;
- }).finally(() => {
- // closeLoading();
- })
},
methods: {
handleSwitcherChange(value, data) {
diff --git a/ruoyi-ui/src/views/JiHeExpressway/scss/reset.scss b/ruoyi-ui/src/views/JiHeExpressway/scss/reset.scss
index b0f793f6..8a4b77bc 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/scss/reset.scss
+++ b/ruoyi-ui/src/views/JiHeExpressway/scss/reset.scss
@@ -42,4 +42,13 @@ body {
background-color: rgba(13, 95, 121, 0.6);
}
}
+
+ .no-data {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
+ width: 100%;
+ height: 100%;
+ }
}