Browse Source

太阳能板过滤参数

develop
王兴琳 4 weeks ago
parent
commit
4c7ce43804
  1. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue

23
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue

@ -1,7 +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="!filteredDevicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" :data="devicesData" style="gap: 18px;" column="6"> <Descriptions :list="filteredDevicesList" :data="devicesData" style="gap: 18px;" column="6">
<template v-for="item in filteredDevicesList" #[`content-${getSlotKey(item.key)}`]="{ data }"> <template v-for="item in filteredDevicesList" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span> <span>{{ data.text }}</span>
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state" <Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state"
@ -122,18 +122,15 @@ export default {
}) })
}, },
computed: { computed: {
filteredDevicesList() { filteredDevicesList() {
const excludeKeys = [ const excludeKeys = ['chargingDeviceStatus', 'internalTemperatureOfTheEquipment'];
'chargeDeviceStatus', const filtered = this.devicesList.filter(item => {
'internalTemperatureOfTheEquipment', return !excludeKeys.includes(item.key);
// });
]; const result = filtered.slice(0, -1);
return result;
return this.devicesList
.filter(item => !excludeKeys.includes(item.key))
.slice(0, -1);
} }
}, },
methods: { methods: {
getAc() { getAc() {
return request({ return request({

Loading…
Cancel
Save