Browse Source

fix:冷热源对接接口 直接展示图片

temp
zhaohy 3 months ago
parent
commit
695ec5f4a0
  1. 231
      hx-ai-intelligent/src/view/equipmentControl/coldAndHeatSources/index.vue

231
hx-ai-intelligent/src/view/equipmentControl/coldAndHeatSources/index.vue

@ -16,10 +16,10 @@
<div style="width: 100%; height: 20px; color: rgb(128, 255, 255)"> <div style="width: 100%; height: 20px; color: rgb(128, 255, 255)">
{{ item.deviceInfoName }} {{ item.deviceInfoName }}
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.autoStatus" style="width: 100%; height: 20px">
模式: <span style="color: #fff">{{ item.autoStatus.label }}</span> 模式: <span style="color: #fff">{{ item.autoStatus.label }}</span>
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.temp" style="width: 100%; height: 20px">
设定温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span> 设定温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span>
</div> </div>
<img <img
@ -117,10 +117,10 @@
<div style="width: 100%; height: 20px; color: rgb(128, 255, 255); z-index: 2"> <div style="width: 100%; height: 20px; color: rgb(128, 255, 255); z-index: 2">
{{ item.deviceInfoName }} {{ item.deviceInfoName }}
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.autoStatus" style="width: 100%; height: 20px">
模式: <span style="color: #fff">{{ item.autoStatus.label }}</span> 模式: <span style="color: #fff">{{ item.autoStatus.label }}</span>
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.temp" style="width: 100%; height: 20px">
设定温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span> 设定温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span>
</div> </div>
</div> </div>
@ -170,10 +170,10 @@
<div style="width: 100%; height: 20px; color: rgb(128, 255, 255); margin-top: 20px"> <div style="width: 100%; height: 20px; color: rgb(128, 255, 255); margin-top: 20px">
{{ item.deviceInfoName }} {{ item.deviceInfoName }}
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.temp" style="width: 100%; height: 20px">
出水温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span> 出水温度: <span style="color: #fff">{{ item.temp }} {{ item.tempUnit }}</span>
</div> </div>
<div style="width: 100%; height: 20px"> <div v-if="item.temp" style="width: 100%; height: 20px">
容量: <span style="color: #fff">{{ item.vol }} {{ item.volUnit }}</span> 容量: <span style="color: #fff">{{ item.vol }} {{ item.volUnit }}</span>
</div> </div>
<img <img
@ -193,13 +193,14 @@
" "
:style="{ left: item.style.mLeft, bottom: item.style.mBottom }"> :style="{ left: item.style.mLeft, bottom: item.style.mBottom }">
<a-switch <a-switch
:checked="item.switchStatus.value === 1 ? true : false" v-if="item.switchStatus"
:checked="item?.switchStatus?.value === 1 ? true : false"
size="small" size="small"
:disabled="true" :disabled="true"
style="position: absolute; left: 30px; bottom: 0px; z-index: 2" style="position: absolute; left: 30px; bottom: 0px; z-index: 2"
:class="{ :class="{
'blue-background': item.switchStatus.value === 1 ? true : false, 'blue-background': item?.switchStatus?.value === 1 ? true : false,
'grey-background': item.switchStatus.value === 1 ? false : true, 'grey-background': item?.switchStatus?.value === 1 ? false : true,
}" /> }" />
<img <img
style=" style="
@ -360,6 +361,7 @@
" "
:style="{ left: item.style.mLeft, bottom: item.style.mBottom }"> :style="{ left: item.style.mLeft, bottom: item.style.mBottom }">
<a-switch <a-switch
v-if="item.switchStatus"
:checked="item.switchStatus.value === 1 ? true : false" :checked="item.switchStatus.value === 1 ? true : false"
size="small" size="small"
:disabled="true" :disabled="true"
@ -877,9 +879,53 @@
}, },
}, },
]); ]);
const airSourceThermalCollapse = ref([]); const airSourceThermalCollapse = ref([
{
style: {
mLeft: '17%',
mBottom: '54%',
},
url: airSourceThermalCollapseSrc,
},
{
style: {
mLeft: '24%',
mBottom: '59%',
},
url: airSourceThermalCollapseSrc,
},
{
style: {
mLeft: '31%',
mBottom: '66%',
},
url: airSourceThermalCollapseSrc,
},
{
style: {
mLeft: '38%',
mBottom: '73%',
},
url: airSourceThermalCollapseSrc,
},
]);
// //
const screwGeothermalHeatPump = ref([]); const screwGeothermalHeatPump = ref([
{
style: {
mLeft: '9.5%',
mBottom: '22.5%',
},
url: screwGeothermalHeatPumpSrc,
},
{
style: {
mLeft: '18.5%',
mBottom: '31.5%',
},
url: screwGeothermalHeatPumpSrc,
},
]);
// //
const diluteCoolingPump = ref([ const diluteCoolingPump = ref([
{ {
@ -892,11 +938,63 @@
}, },
]); ]);
// //
const coldWater = ref([]); const coldWater = ref([
{
url: coldWaterSrc,
style: {
mLeft: '36%',
mBottom: '39%',
},
},
]);
// //
const userWaterPump = ref([]); const userWaterPump = ref([
{
url: waterPumpSrc,
style: {
mLeft: '50%',
mBottom: '55.5%',
},
},
{
url: waterPumpSrc,
style: {
mLeft: '55%',
mBottom: '51%',
},
},
{
url: waterPumpSrc,
style: {
mLeft: '59%',
mBottom: '47%',
},
},
]);
// //
const waterPump = ref([]); const waterPump = ref([
{
style: {
mLeft: '65%',
mBottom: '41%',
},
url: waterPumpSrc,
},
{
style: {
mLeft: '70%',
mBottom: '36%',
},
url: waterPumpSrc,
},
{
style: {
mLeft: '75%',
mBottom: '31%',
},
url: waterPumpSrc,
},
]);
// //
const pressureWater = ref([ const pressureWater = ref([
{ {
@ -911,13 +1009,66 @@
}, },
]); ]);
// - // -
const waterSensor = ref([]); const waterSensor = ref([
{
url: sensorSrc,
style: {
mLeft: '9%',
mBottom: '27%',
},
},
]);
// //
const manifoldSensor = ref([]); const manifoldSensor = ref([
{
url: sensorSrc,
style: {
mLeft: '81%',
mBottom: '51%',
},
},
]);
// //
const soilCouplerSensor = ref([]); const soilCouplerSensor = ref([
{
url: sensorSrc,
style: {
mLeft: '79%',
mBottom: '13%',
},
},
]);
// - // -
const airSourceSensor = ref([]); const airSourceSensor = ref([
{
style: {
mLeft: '26.5%',
mBottom: '34%',
},
url: sensorSrc,
},
{
style: {
mLeft: '32.5%',
mBottom: '39%',
},
url: sensorSrc,
},
{
style: {
mLeft: '38.5%',
mBottom: '44.5%',
},
url: sensorSrc,
},
{
style: {
mLeft: '47.5%',
mBottom: '52.5%',
},
url: sensorSrc,
},
]);
// //
const arrow = ref([ const arrow = ref([
{ {
@ -965,12 +1116,12 @@
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any, index: any) => { res.data.forEach((item: any, index: any) => {
userWaterPump.value.push({ userWaterPump.value[index] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: waterPumpSrc, url: waterPumpSrc,
style: userWaterPumpPosition[index].style, style: userWaterPumpPosition[index].style,
}); };
}); });
} }
}); });
@ -986,12 +1137,12 @@
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any, index: any) => { res.data.forEach((item: any, index: any) => {
waterPump.value.push({ waterPump.value[index] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: waterPumpSrc, url: waterPumpSrc,
style: waterPumpPosition[index].style, style: waterPumpPosition[index].style,
}); };
}); });
} }
}); });
@ -1008,12 +1159,12 @@
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any, index: any) => { res.data.forEach((item: any, index: any) => {
airSourceThermalCollapse.value.push({ airSourceThermalCollapse.value[index] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: airSourceThermalCollapseSrc, url: airSourceThermalCollapseSrc,
style: airSourceThermalCollapsePosition[index].style, style: airSourceThermalCollapsePosition[index].style,
}); };
}); });
} }
}); });
@ -1029,12 +1180,12 @@
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any, index: any) => { res.data.forEach((item: any, index: any) => {
screwGeothermalHeatPump.value.push({ screwGeothermalHeatPump.value[index] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: screwGeothermalHeatPumpSrc, url: screwGeothermalHeatPumpSrc,
style: screwGeothermalHeatPumpPosition[index].style, style: screwGeothermalHeatPumpPosition[index].style,
}); };
}); });
} }
}); });
@ -1050,24 +1201,16 @@
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any) => { res.data.forEach((item: any) => {
coldWater.value.push({ coldWater.value[0] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: coldWaterSrc, };
style: {
mLeft: '36%',
mBottom: '39%',
},
});
}); });
} }
}); });
}; };
// //
const getSensorData = () => { const getSensorData = () => {
waterSensor.value = [];
airSourceSensor.value = [];
manifoldSensor.value = [];
http http
.get(ventilating.getSensorData, { .get(ventilating.getSensorData, {
projectId: state.projectId, projectId: state.projectId,
@ -1078,17 +1221,17 @@
if (res.msg === 'success') { if (res.msg === 'success') {
res.data.forEach((item: any, index: any) => { res.data.forEach((item: any, index: any) => {
if (index < 4) { if (index < 4) {
airSourceSensor.value.push({ airSourceSensor.value[index] = {
deviceInfoName: item.deviceInfoName, deviceInfoName: item.deviceInfoName,
...item.record, ...item.record,
url: sensorSrc, url: sensorSrc,
style: airSourceSensorPosition[index].style, style: airSourceSensorPosition[index].style,
}); };
} }
}); });
// //
let data = res.data[Math.floor(Math.random() * res.data.length)]; let data = res.data[Math.floor(Math.random() * res.data.length)];
waterSensor.value.push({ waterSensor.value[0] = {
deviceInfoName: data.deviceInfoName, deviceInfoName: data.deviceInfoName,
...data.record, ...data.record,
url: sensorSrc, url: sensorSrc,
@ -1096,10 +1239,10 @@
mLeft: '9%', mLeft: '9%',
mBottom: '27%', mBottom: '27%',
}, },
}); };
// - // -
data = res.data[Math.floor(Math.random() * res.data.length)]; data = res.data[Math.floor(Math.random() * res.data.length)];
manifoldSensor.value.push({ manifoldSensor.value[0] = {
deviceInfoName: data.deviceInfoName, deviceInfoName: data.deviceInfoName,
...data.record, ...data.record,
url: sensorSrc, url: sensorSrc,
@ -1107,10 +1250,10 @@
mLeft: '81%', mLeft: '81%',
mBottom: '51%', mBottom: '51%',
}, },
}); };
// - // -
data = res.data[Math.floor(Math.random() * res.data.length)]; data = res.data[Math.floor(Math.random() * res.data.length)];
soilCouplerSensor.value.push({ soilCouplerSensor.value[0] = {
deviceInfoName: data.deviceInfoName, deviceInfoName: data.deviceInfoName,
...data.record, ...data.record,
url: sensorSrc, url: sensorSrc,
@ -1118,7 +1261,7 @@
mLeft: '79%', mLeft: '79%',
mBottom: '13%', mBottom: '13%',
}, },
}); };
} }
}); });
}; };

Loading…
Cancel
Save