Browse Source

机柜参数修改

develop
wangsixiang 2 months ago
parent
commit
397d27724e
  1. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/index.vue

33
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue

@ -1,6 +1,7 @@
<template> <template>
<div class='DeviceParams'> <div class='DeviceParams'>
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div> <div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<h3>动力参数:</h3>
<Descriptions :list="devicesList" :data="devicesData" style="gap: 18px;" column="6"> <Descriptions :list="devicesList" :data="devicesData" style="gap: 18px;" column="6">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }"> <template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span> <span>{{ data.text }}</span>
@ -11,6 +12,13 @@
</ElTag> --> </ElTag> -->
</template> </template>
</Descriptions> </Descriptions>
<h3>环境参数:</h3>
<Descriptions :list="environment" :data="devicesData" style="gap: 18px;" column="6">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
</template>
</Descriptions>
</div> </div>
</template> </template>
@ -39,6 +47,7 @@
return { return {
secondLoading: true, secondLoading: true,
devicesList: [], devicesList: [],
environment: [],
devicesData: {}, devicesData: {},
activeOption: { activeOption: {
active: { active: {
@ -53,6 +62,7 @@
async created() { async created() {
this.devicesList = []; this.devicesList = [];
let devs = []; let devs = [];
let envDevs = []; //
// Promise.all([this.getAc('A1'), this.getAc('A2'), this.getAc('A3'), this.getAc('A4'), this.getAc('A5'), this.getAc('A6')]).then(res => { // Promise.all([this.getAc('A1'), this.getAc('A2'), this.getAc('A3'), this.getAc('A4'), this.getAc('A5'), this.getAc('A6')]).then(res => {
await request({ await request({
@ -91,7 +101,18 @@
}).then(result => { }).then(result => {
if (result.code != 200) return Message.error("操作失败"); if (result.code != 200) return Message.error("操作失败");
result.data.forEach(item => { result.data.forEach(item => {
if (item.propertyName) { if (item.propertyName) {
if (item.propertyName === "温湿度状态-湿度" || item.propertyName === "温湿度状态-温度"
||item.propertyName === "环境温度"||item.propertyName === "环境光度"||item.propertyName === "环境湿度"||item.propertyName === "系统状态-环境(温湿度等)") {
// environment
envDevs.push({
label: item.propertyName,
key: item.property,
gridColumn: 3,
});
this.devicesData[item.property] = item.formatValue;
} else {
// devicesList
devs.push({ devs.push({
label: item.propertyName, label: item.propertyName,
key: item.property, key: item.property,
@ -99,10 +120,12 @@
}); });
this.devicesData[item.property] = item.formatValue; this.devicesData[item.property] = item.formatValue;
} }
}); }
this.devicesList = devs; });
}) this.devicesList = devs;
}, this.environment = envDevs; // environment
})
},
methods: { methods: {
getAc() { getAc() {
return request({ return request({

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/index.vue

@ -8,7 +8,7 @@
<!-- {{ dialogData }} --> <!-- {{ dialogData }} -->
<Descriptions :list="list" :data="data" style="gap: 18px" /> <Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane> </ElTabPane>
<ElTabPane label="设备参数" name="second"> <ElTabPane label="动环参数" name="second">
<DeviceParams disabled :dialogData="dialogData" style="height: 180px" /> <DeviceParams disabled :dialogData="dialogData" style="height: 180px" />
</ElTabPane> </ElTabPane>
<ElTabPane label="空调参数" name="second2"> <ElTabPane label="空调参数" name="second2">

Loading…
Cancel
Save