fix:对接新风系统 修改计划获取的枚举
This commit is contained in:
@@ -81,17 +81,18 @@
|
||||
<div
|
||||
style="position: absolute; z-index: 2"
|
||||
:style="{
|
||||
left: 'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 13%)' : ' - 13.3%)'),
|
||||
left: 'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 12.8%)' : ' - 13%)'),
|
||||
bottom:
|
||||
'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 8.1%)' : ' - 14%)'),
|
||||
'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 7%)' : ' - 14%)'),
|
||||
}">
|
||||
<doubleSingleModel :dataSource="item" />
|
||||
</div>
|
||||
<img
|
||||
style="width: 50px; height: 75px; position: absolute"
|
||||
:style="{
|
||||
left: 'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 1.5%)' : ' - 2%)'),
|
||||
bottom: 'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 4%)' : ' - 9%)'),
|
||||
left: 'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 1.5%)' : ' - 1.8%)'),
|
||||
bottom:
|
||||
'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 4.5%)' : ' - 9%)'),
|
||||
transform: item.lineType === 1 ? 'rotateY(180deg)' : 'rotate(180deg)',
|
||||
}"
|
||||
src="../image/liftState/lift/line.png" />
|
||||
@@ -115,12 +116,12 @@
|
||||
ref="conditioningModels"
|
||||
@selectConditioningData="selectConditioningData" />
|
||||
</a-drawer>
|
||||
<!-- 空调箱 顶部详情 -->
|
||||
<!-- 空调箱 顶部详情 现阶段没有数据 先隐藏掉 -->
|
||||
<transition name="zep">
|
||||
<div
|
||||
v-if="selectIndex === 3 && selectConditioning && selectConditioning?.title"
|
||||
v-if="selectIndex === 3 && selectConditioning && selectConditioning?.title && false"
|
||||
class="newTrend-box">
|
||||
<newTreedBox :selectConditioning="selectConditioning" />
|
||||
<conditioningBox :selectConditioning="selectConditioning" />
|
||||
</div>
|
||||
</transition>
|
||||
<!-- 地暖 -->
|
||||
@@ -183,7 +184,7 @@
|
||||
import doubleSingleModel from '../components/doubleSingleModel.vue';
|
||||
import newTrendModel from './components/newTrendModel.vue';
|
||||
import conditioningModel from './components/conditioningModel.vue';
|
||||
import newTreedBox from './components/newTreedBox.vue';
|
||||
import conditioningBox from './components/conditioningBox.vue';
|
||||
import floorHeatingModel from './components/floorHeatingModel.vue';
|
||||
import { http } from '/nerv-lib/util/http';
|
||||
import { ventilating } from '/@/api/ventilatingSystem';
|
||||
@@ -192,7 +193,12 @@
|
||||
// 全局变量
|
||||
import { items } from '/@/store/item';
|
||||
// 定位数据
|
||||
import { devicePosition, newTrendPosition } from './devicePosition';
|
||||
import {
|
||||
devicePosition,
|
||||
newTrendPosition,
|
||||
airConditioningPosition,
|
||||
floorHeatingPosition,
|
||||
} from './devicePosition';
|
||||
// 全局变量
|
||||
const state = items();
|
||||
onMounted(() => {});
|
||||
@@ -457,7 +463,6 @@
|
||||
siteId: state.siteId,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.msg === 'success') {
|
||||
res.data.forEach((item: any, index: number) => {
|
||||
newTrend.value.push({
|
||||
@@ -473,13 +478,69 @@
|
||||
}
|
||||
});
|
||||
};
|
||||
//实时获取数据 暂定一分钟
|
||||
const intervalId = setInterval(getSensorData, 60000);
|
||||
onMounted(() => {
|
||||
//获取传感器数据
|
||||
const getAcBoxCtrlList = () => {
|
||||
conditioningData.value = [];
|
||||
http
|
||||
.get(airConditioningSystemApi.getAcBoxCtrlList, {
|
||||
projectId: state.projectId,
|
||||
siteId: state.siteId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
res.data.forEach((item: any, index: number) => {
|
||||
conditioningData.value.push({
|
||||
title: item.deviceInfoName,
|
||||
styleText: airConditioningPosition[index].styleText,
|
||||
type: '空调箱',
|
||||
numberUnit: item.record.tempUnit,
|
||||
lineType: airConditioningPosition[index].lineType,
|
||||
number: item.record.temp,
|
||||
url: freshAir,
|
||||
state: item.record.switchStatus.value,
|
||||
...item.record,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const getTempSysCtrlList = () => {
|
||||
floorHeatingData.value = [];
|
||||
http
|
||||
.get(airConditioningSystemApi.getTempSysCtrlList, {
|
||||
projectId: state.projectId,
|
||||
siteId: state.siteId,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, '地暖');
|
||||
if (res.msg === 'success') {
|
||||
res.data.forEach((item: any, index: number) => {
|
||||
floorHeatingData.value.push({
|
||||
title: item.deviceInfoName,
|
||||
styleText: floorHeatingPosition[index].styleText,
|
||||
type: '地暖',
|
||||
number: item.record.temp,
|
||||
numberUnit: item.record.tempUnit,
|
||||
lineType: floorHeatingPosition[index].lineType,
|
||||
...item.record,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const fetchData = () => {
|
||||
//传感器
|
||||
getSensorData();
|
||||
//获取新风主机
|
||||
//新风主机
|
||||
getnewTrendData();
|
||||
//获取空调箱
|
||||
getAcBoxCtrlList();
|
||||
//获取地暖
|
||||
getTempSysCtrlList();
|
||||
};
|
||||
//实时获取数据 暂定一分钟
|
||||
const intervalId = setInterval(fetchData, 60000);
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
clearInterval(intervalId);
|
||||
|
Reference in New Issue
Block a user