fks-yangshouda 4 weeks ago
parent
commit
3195a1547b
  1. 7
      hx-ai-intelligent/src/api/airConditioningSystem.ts
  2. 44
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  3. 6
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  4. 0
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/conditioningBox.vue
  5. 11
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/conditioningModel.vue
  6. 6
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/floorHeatingModel.vue
  7. 47
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/newTrendModel.vue
  8. 37
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/devicePosition.ts
  9. 335
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/index.vue
  10. 10
      hx-ai-intelligent/src/view/equipmentControl/components/doubleSingleModel.vue
  11. 20
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

7
hx-ai-intelligent/src/api/airConditioningSystem.ts

@ -0,0 +1,7 @@
import { BASE_URL } from './index';
export enum airConditioningSystemApi {
getVentHostCtrlList = `${BASE_URL}/api/ventHostCtrl/getDeviceState`, // 查询新风主机最新状态
getAcBoxCtrlList = `${BASE_URL}/api/acBoxCtrl/getDeviceState`, // 查询空调箱最新状态
getTempSysCtrlList = `${BASE_URL}/tempSysCtrl/getFloorHeatingState`, // 查询地暖最新状态
}

44
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -27,24 +27,6 @@
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
</a-form-item>
<a-form-item
v-if="infoObject.alarmFrequency === 2 || infoObject.alarmFrequency === 3"
name="intervalDuration"
label="间隔时长">
<ns-input-number
style="width: 100%"
v-model:value="infoObject.intervalDuration"
placeholder="请输入间隔时长">
<template #addonAfter>
<a-select
v-model:value="infoObject.intervalDurationUnit"
placeholder="请选择间隔时长单位"
style="width: 80px"
allowClear
:options="intervalDurationUnitData" />
</template>
</ns-input-number>
</a-form-item>
<a-form-item label="优先级" name="priority">
<a-select
v-model:value="infoObject.priority"
@ -60,7 +42,7 @@
placeholder="请选择监测频率"
style="width: 100%"
allowClear
:options="MonitorFrequencyEnumm" />
:options="MonitorFrequencyEnum" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -121,7 +103,7 @@
const AlarmFrequencyEnum = ref([]);
const PriorityEnum = ref([]);
const intervalDurationUnitData = ref([]);
const MonitorFrequencyEnumm = ref([]);
const MonitorFrequencyEnum = ref([]);
const rules = {
alarmTitle: [
{
@ -138,23 +120,6 @@
},
],
alarmFrequency: [{ required: true, message: '请选择告警频率', trigger: 'change' }],
intervalDuration: [
{
required: true,
message: '请输入正确的间隔时长',
trigger: 'change',
validator: (rules: any, intervalDuration: any, cbfn: any) => {
if (intervalDuration && intervalDuration > 0) {
cbfn();
} else {
cbfn('请输入正确的间隔时长');
}
if (!infoObject.value.intervalDurationUnit) {
cbfn('请选择间隔时长单位');
}
},
},
],
repetitions: [
{
required: true,
@ -178,13 +143,13 @@
let enumData = await getAllEnum({
params: [
'PriorityEnum',
'MonitorFrequencyEnumm',
'MonitorFrequencyEnum',
'AlarmFrequencyEnum',
'IntervalDurationUnitEnum',
],
});
PriorityEnum.value = enumData.data.PriorityEnum;
MonitorFrequencyEnumm.value = enumData.data.MonitorFrequencyEnumm;
MonitorFrequencyEnum.value = enumData.data.MonitorFrequencyEnum;
AlarmFrequencyEnum.value = enumData.data.AlarmFrequencyEnum;
intervalDurationUnitData.value = enumData.data.IntervalDurationUnitEnum;
};
@ -234,7 +199,6 @@
data.createWorkOrder = Number(data.createWorkOrder);
if (data.alarmFrequency === 1) {
data.repetitions = null;
data.intervalDuration = null;
data.intervalDurationUnit = null;
}
//

6
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -42,11 +42,6 @@ const tableKeyMap = [
width: 120,
},
{
title: '频率间隔',
dataIndex: 'interval',
width: 120,
},
{
title: '监测时长',
dataIndex: 'monitorFrequency',
width: 120,
@ -139,7 +134,6 @@ export const energyAlarmConfigs = (
obj.createWorkOrder = obj.createWorkOrder + '';
if (obj.alarmFrequency === 1) {
obj.repetitions = null;
obj.intervalDuration = null;
obj.intervalDurationUnit = null;
}
if (obj.alarmFrequency === 3) {

0
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/newTreedBox.vue → hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/conditioningBox.vue

11
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/conditioningModel.vue

@ -53,10 +53,10 @@
<div class="box-bottom-item-line-value">
<a-switch
:disabled="true"
:checked="selectConditioning.enableRules === 1 ? true : false"
:checked="selectConditioning.state === 1 ? true : false"
:class="{
'blue-background': selectConditioning.enableRules === 1 ? true : false,
'grey-background': selectConditioning.enableRules === 1 ? false : true,
'blue-background': selectConditioning.state === 1 ? true : false,
'grey-background': selectConditioning.state === 1 ? false : true,
}" />
</div>
</div>
@ -64,7 +64,7 @@
<div style="width: 100%; height: 40px; line-height: 40px">温度 </div>
<div style="width: 100%; height: 60px">
<a-slider
v-model:value="selectConditioning.number"
v-model:value="selectConditioning.temp"
:marks="marks"
:min="0"
:max="100"
@ -82,7 +82,7 @@
<div style="width: 100%; height: 40px; line-height: 40px"> 风量 </div>
<div style="width: 100%; height: 60px">
<a-slider
v-model:value="selectConditioning.number"
v-model:value="selectConditioning.airVol"
:marks="marks"
:min="0"
:max="100"
@ -130,6 +130,7 @@
100: 100,
});
const toggle = (data: any, selectData: any) => {
console.log(data, selectData);
dataSource.value = data;
selectConditioning.value = selectData;
};

6
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/floorHeatingModel.vue

@ -16,19 +16,19 @@
<div class="box-bottom-item-line">
温度
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">{{ item.number }}</span>
<span style="color: #00ffd2">{{ item.temp }}{{ item.tempUnit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
设置
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">{{ item.setUpNumber }}</span>
<span style="color: #00ffd2">{{ item.temp }}{{ item.tempUnit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
运行时间
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">0.08~0.4Mpa</span>
<span style="color: #00ffd2">{{ item.runTime }}{{ item.runTimeUnit }}</span>
</div>
</div>
</div>

47
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/newTrendModel.vue

@ -19,47 +19,76 @@
<a-tag
style="background-color: rgba(0, 0, 0, 0.5); width: 50px; text-align: center"
:style="{
border: '1px solid' + ['#39d7bb', '#f3614d', '#ffa403'][0],
color: ['#39d7bb', '#f3614d', '#ffa403'][0],
border: {
'0': '1px solid rgba(0, 255, 210, 1)',
'1': '1px solid rgba(255, 118, 54, 1)',
'2': '1px solid rgba(255, 188, 70, 1)',
'3': '1px solid rgba(243, 97, 99, 1)',
}[item.runStatus.value],
color: {
'0': 'rgba(0, 255, 210, 1)',
'1': 'rgba(255, 118, 54, 1)',
'2': 'rgba(255, 188, 70, 1)',
'3': 'rgba(243, 97, 99, 1)',
}[item.runStatus.value],
}"
>开启</a-tag
>{{ item.runStatus.label }}</a-tag
>
<!-- <a-tag
v-if="item?.runStatus.value === '0'"
style="background-color: rgba(0, 0, 0, 0.5); width: 50px; text-align: center"
:style="{
border:
'1px solid' +
{
'0': 'rgba(191, 205, 226, 1)',
'1': 'rgba(0, 255, 210, 1)',
}[item.switchStatus.value],
color: {
'0': 'rgba(191, 205, 226, 1)',
'1': 'rgba(0, 255, 210, 1)',
}[item.switchStatus.value],
}">
{{ { '0': '关闭', '1': '开始' }[item.switchStatus.value] }}</a-tag
> -->
</div>
</div>
<div class="box-bottom-item-line">
电机转速
<div class="box-bottom-item-line-value">
<span style="color: #f59a23">1210/分钟</span>
<span style="color: #f59a23">{{ item.motorSp }}{{ item.motorSpUnit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
换热器热度
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">8</span>
<span style="color: #00ffd2"
>{{ item.converterTemp }}{{ item.converterTempUnit }}</span
>
</div>
</div>
<div class="box-bottom-item-line">
风量
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">12345m3/h</span>
<span style="color: #00ffd2">{{ item.airVol }}{{ item.airVolUnit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
风速
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">22m/s</span>
<span style="color: #00ffd2">{{ item.airSp }}{{ item.airSpUnit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
PM2.5
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">30</span>
<span style="color: #00ffd2">{{ item.pm2_5 }}{{ item.pm2_5Unit }}</span>
</div>
</div>
<div class="box-bottom-item-line">
二氧化碳
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">123CO2e</span>
<span style="color: #00ffd2">{{ item.co_CO2 }}{{ item.co_CO2Unit }}</span>
</div>
</div>
</div>

37
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/devicePosition.ts

@ -0,0 +1,37 @@
//传感器位置
export const devicePosition = [
{ left: '30%', bottom: '54%' },
{ left: '38%', bottom: '33%' },
{ left: '50%', bottom: '41%' },
{ left: '42%', bottom: '59%' },
{ left: '68%', bottom: '53%' },
{ left: '55%', bottom: '65.5%' },
{ left: '79%', bottom: '58%' },
{ left: '66%', bottom: '70%' },
];
// 新风主机
export const newTrendPosition = [
{ left: '46%', bottom: '54%' },
{ left: '48%', bottom: '33%' },
{ left: '64.5%', bottom: '64%' },
{ left: '66%', bottom: '46%' },
];
//空调箱
export const airConditioningPosition = [
{ styleText: { left: '16%', bottom: '33%' }, lineType: 1 },
{ styleText: { left: '31%', bottom: '38%' }, lineType: 1 },
{ styleText: { left: '41%', bottom: '55.5%' }, lineType: 1 },
{ styleText: { left: '60%', bottom: '63%' }, lineType: 1 },
{ styleText: { left: '76%', bottom: '63%' }, lineType: 1 },
{ styleText: { left: '71%', bottom: '48%' }, lineType: '' },
{ styleText: { left: '46.5%', bottom: '32%' }, lineType: '' },
];
//地暖
export const floorHeatingPosition = [
{ styleText: { left: '13%', bottom: '44%' }, lineType: '' },
{ styleText: { left: '22%', bottom: '48%' }, lineType: 1 },
{ styleText: { left: '34%', bottom: '53%' }, lineType: 1 },
{ styleText: { left: '49%', bottom: '59%' }, lineType: 1 },
{ styleText: { left: '60.5%', bottom: '65.5%' }, lineType: 1 },
{ styleText: { left: '72%', bottom: '72%' }, lineType: 1 },
];

335
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/index.vue

@ -19,7 +19,7 @@
<div class="map-box">
<!-- 温度 -->
<div v-if="selectIndex === 0">
<template v-for="(item, index) in sensor" :key="index">
<template v-for="(item, index) in sensorData" :key="index">
<div
style="position: absolute"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }">
@ -43,21 +43,22 @@
<div
style="position: absolute"
:style="{
left: 'calc(' + item.styleText.left + ' - 12.9%)',
left: 'calc(' + item.styleText.left + ' - 14%)',
bottom: 'calc(' + item.styleText.bottom + ' + 8%)',
'z-index': 2,
}">
<doubleSingleModel :dataSource="item" />
</div>
<img
style="width: 50px; height: 75px; position: absolute; z-index: 1"
style="width: 50px; height: 75px; position: absolute"
:style="{
left: 'calc(' + item.styleText.left + ' - 1.5%)',
left: 'calc(' + item.styleText.left + ' - 2%)',
bottom: 'calc(' + item.styleText.bottom + ' + 4%)',
transform: 'rotateY(180deg)',
}"
src="../image/liftState/lift/line.png" />
<img
style="width: 42px; height: 42px; position: absolute"
style="width: 42px; height: 42px; position: absolute; z-index: 2"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }"
src="../image/airConditioningSystem/fan.png" />
</template>
@ -78,25 +79,25 @@
<div v-if="selectIndex === 3">
<template v-for="(item, index) in conditioningData" :key="index">
<div
style="position: absolute"
style="position: absolute; z-index: 2"
:style="{
left:
'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 12.9%)' : ' - 13.3%)'),
left: 'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 12.8%)' : ' - 13%)'),
bottom:
'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 8%)' : ' - 14%)'),
'calc(' + item.styleText.bottom + (item.lineType === 1 ? ' + 7%)' : ' - 14%)'),
}">
<doubleSingleModel :dataSource="item" />
</div>
<img
style="width: 50px; height: 75px; position: absolute; z-index: 1"
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" />
<img
style="width: 42px; height: 42px; position: absolute"
style="width: 42px; height: 42px; position: absolute; z-index: 2"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }"
src="../image/airConditioningSystem/conditioningIcon.png" />
</template>
@ -115,19 +116,19 @@
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>
<!-- 地暖 -->
<div v-if="selectIndex === 4">
<template v-for="(item, index) in floorHeatingData" :key="index">
<div
style="position: absolute"
style="position: absolute; z-index: 1"
:style="{
left:
'calc(' + item.styleText.left + (item.lineType === 1 ? ' - 12.9%)' : ' - 13.3%)'),
@ -137,7 +138,7 @@
<doubleSingleModel :dataSource="item" />
</div>
<img
style="width: 50px; height: 75px; position: absolute; z-index: 1"
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%)'),
@ -145,7 +146,7 @@
}"
src="../image/liftState/lift/line.png" />
<img
style="width: 42px; height: 42px; position: absolute"
style="width: 42px; height: 42px; position: absolute; z-index: 1"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }"
src="../image/airConditioningSystem/floorHeatingIcon.png" />
</template>
@ -174,7 +175,7 @@
import airConditioner from '../image/airConditioningSystem/airConditioner.svg';
import floorHeating from '../image/airConditioningSystem/floorHeating.svg';
import selectImg from '../image/airConditioningSystem/selectImg.png';
//
//
import sunRed from '../image/airConditioningSystem/sunRed.png';
import sunYellow from '../image/airConditioningSystem/sunYellow.png';
import sunGreen from '../image/airConditioningSystem/sunGreen.png';
@ -183,9 +184,23 @@
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';
import { airConditioningSystemApi } from '/@/api/airConditioningSystem';
//
import { items } from '/@/store/item';
//
import {
devicePosition,
newTrendPosition,
airConditioningPosition,
floorHeatingPosition,
} from './devicePosition';
//
const state = items();
onMounted(() => {});
onUnmounted(() => {});
//
@ -199,139 +214,9 @@
const newTrendModels = ref(null);
//
const sensor = ref([
{
title: 'H区多功能传感器',
styleText: { left: '28%', bottom: '44%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
{
title: 'G区多功能传感器',
styleText: { left: '35%', bottom: '23%' },
type: '温度',
unit: '℃',
number: 20,
url: sunYellow,
},
{
title: 'F区多功能传感器',
styleText: { left: '47%', bottom: '31%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
{
title: 'E区多功能传感器',
styleText: { left: '38.5%', bottom: '49%' },
type: '温度',
unit: '℃',
number: 20,
url: sunGreen,
},
{
title: 'D区多功能传感器',
styleText: { left: '65%', bottom: '43%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
{
title: 'C区多功能传感器',
styleText: { left: '52%', bottom: '55.5%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
{
title: 'B区多功能传感器',
styleText: { left: '76%', bottom: '48%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
{
title: 'A区多功能传感器',
styleText: { left: '63%', bottom: '60%' },
type: '温度',
unit: '℃',
number: 20,
url: sunRed,
},
]);
const sensorData = ref([]);
//
const peopleData = ref([
{
title: 'H区人流传感器',
styleText: { left: '36%', bottom: '21%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'G区人流传感器',
styleText: { left: '28.5%', bottom: '43.5%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'E区人流传感器',
styleText: { left: '39%', bottom: '48%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'F区人流传感器',
styleText: { left: '47.5%', bottom: '29.5%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'D区人流传感器',
styleText: { left: '66%', bottom: '42%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'C区人流传感器',
styleText: { left: '53%', bottom: '54.5%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'B区人流传感器',
styleText: { left: '77%', bottom: '47%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
{
title: 'A区人流传感器',
styleText: { left: '64%', bottom: '59%' },
type: '人流',
unit: '人',
number: 120,
url: people,
},
]);
const peopleData = ref([]);
//
const newTrend = ref([
{
@ -379,7 +264,7 @@
},
{
title: '西区',
styleText: { left: '28%', bottom: '30%' },
styleText: { left: '28%', bottom: '28%' },
type: '空调箱',
lineType: 1,
unit: '℃',
@ -520,6 +405,146 @@
const handleClose = () => {
selectIndex.value = 0;
};
//
const getSunUrl = (number: any) => {
if (number > 0 && number < 20) {
return sunGreen;
} else if (number >= 20 && number < 30) {
return sunYellow;
} else {
return sunRed;
}
};
//
const getColor = (number: any) => {
if (number > 0 && number < 20) {
return '#0dffa4';
} else if (number >= 20 && number < 30) {
return '#f59a23';
} else {
return '#f36163';
}
};
//
const getSensorData = () => {
sensorData.value = [];
peopleData.value = [];
http
.get(ventilating.getSensorData, { projectId: state.projectId, siteId: state.siteId })
.then((res) => {
if (res.msg === 'success') {
res.data.forEach((item: any, index: number) => {
sensorData.value.push({
title: item.deviceInfoName,
styleText: devicePosition[index],
type: '温度',
unit: item.record.tempUnit,
number: item.record.temp,
url: getSunUrl(item.record.temp),
fontColor: getColor(item.record.temp),
});
peopleData.value.push({
title: item.deviceInfoName,
styleText: devicePosition[index],
type: '人流',
unit: item.record.peopleNumUnit,
number: item.record.peopleNum,
url: people,
});
});
}
});
};
const getnewTrendData = () => {
newTrend.value = [];
http
.get(airConditioningSystemApi.getVentHostCtrlList, {
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
if (res.msg === 'success') {
res.data.forEach((item: any, index: number) => {
newTrend.value.push({
title: item.deviceInfoName,
styleText: newTrendPosition[index],
type: '新风主机',
number: item.record.converterTemp,
numberUnit: item.record.converterTempUnit,
url: freshAir,
...item.record,
});
});
}
});
};
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.currentTemp,
numberUnit: item.record.currentTempUnit,
lineType: floorHeatingPosition[index].lineType,
...item.record,
});
});
}
});
};
const fetchData = () => {
//
getSensorData();
//
getnewTrendData();
//
getAcBoxCtrlList();
//
getTempSysCtrlList();
};
//
const intervalId = setInterval(fetchData, 60000);
onMounted(() => {
fetchData();
});
onUnmounted(() => {
clearInterval(intervalId);
});
</script>
<style lang="less">
.legend-box {
@ -593,7 +618,7 @@
width: 95%;
height: 100%;
position: relative;
background-image: url(../image/bg.jpg);
background-image: url(../image/floor-1.png);
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;

10
hx-ai-intelligent/src/view/equipmentControl/components/doubleSingleModel.vue

@ -26,10 +26,10 @@
<div style="margin-top: 4px"> {{ dataSource.type === '地暖' ? '设置' : '风量' }} </div>
<div style="margin-top: -5px">
<span style="font-size: 18px; color: #0dffff; font-style: italic">
{{ dataSource.type === '地暖' ? dataSource.setUpNumber : '18' }}
{{ dataSource.type === '地暖' ? dataSource.temp : dataSource.airVol }}
</span>
<span style="font-size: 10px; margin-left: 5px">{{
dataSource.type === '地暖' ? '℃' : 'm3/h'
dataSource.type === '地暖' ? dataSource.tempUnit : dataSource.airVolUnit
}}</span>
</div>
</div>
@ -48,7 +48,7 @@
<span :style="{ fontSize: '18px', color: getColor(), fontStyle: 'italic' }">
{{ dataSource.number }}
</span>
<span style="font-size: 10px; margin-left: 5px"></span>
<span style="font-size: 10px; margin-left: 5px">{{ dataSource.numberUnit }}</span>
</div>
</div>
</div>
@ -69,7 +69,7 @@
},
});
const getSunUrl = () => {
if (props.dataSource.number > 0 && props.dataSource.number < 20) {
if (props.dataSource.number >= 0 && props.dataSource.number < 20) {
return sunGreen;
} else if (props.dataSource.number >= 20 && props.dataSource.number < 30) {
return sunYellow;
@ -78,7 +78,7 @@
}
};
const getColor = () => {
if (props.dataSource.number > 0 && props.dataSource.number < 20) {
if (props.dataSource.number >= 0 && props.dataSource.number < 20) {
return '#0dffa4';
} else if (props.dataSource.number >= 20 && props.dataSource.number < 30) {
return '#f59a23';

20
hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

@ -41,7 +41,7 @@
{ field: 'planGroupName', component: 'NsInput', show: false },
{ field: 'planName', component: 'NsInput', show: false },
{ field: 'projectId', component: 'NsInput', show: false },
{ field: 'deviceType', component: 'NsInput', show: false },
{ field: 'ctrlType', component: 'NsInput', show: false },
{ field: 'orgId', component: 'NsInput', show: false },
{
field: 'createTime',
@ -74,27 +74,27 @@
});
const config = ref(null);
const enumDataList: any = () => {
return getEnum({ params: { enumType: 'CtrlDeviceType' } });
return getEnum({ params: { enumType: 'DeviceCtrlType' } });
};
const getConfigData = async () => {
const enumData = await enumDataList();
config.value = {
title: '计划库',
api: planToAddApi.getActivatedPlanListByTree,
params: { orgId, projectId, deviceType: enumData.data[0].value },
params: { orgId, projectId, ctrlType: enumData.data[0].value },
treeConfig: {
defaultExpandAll: true,
header: {
icon: 'name',
title: '执行计划',
},
params: { projectId, deviceType: enumData.data[0].value },
params: { projectId, ctrlType: enumData.data[0].value },
dynamicParams: {
id: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
ctrlType: 'ctrlType',
},
api: planToAddApi.getActivatedPlanTree,
fieldNames: {
@ -103,23 +103,23 @@
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
ctrlType: 'ctrlType',
children: 'childList',
},
formConfig: {
schemas: [
{
field: 'deviceType',
label: '告警优先级',
field: 'ctrlType',
label: '类型',
component: 'nsSelectApi',
autoSubmit: true,
componentProps: {
api: () => getEnum({ params: { enumType: 'CtrlDeviceType' } }),
api: () => getEnum({ params: { enumType: 'DeviceCtrlType' } }),
immediate: true,
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
placeholder: '请选择',
showSearch: true,
autoSelectFirst: true,
filterOption: (input: string, option: any) => {

Loading…
Cancel
Save