|
@@ -238,7 +238,7 @@ import {
|
|
|
onUnmounted,
|
|
|
onBeforeMount,
|
|
|
onBeforeUnmount,
|
|
|
- nextTick
|
|
|
+ nextTick,
|
|
|
} from "vue";
|
|
|
import { Switch, Dialog, Toast } from "vant";
|
|
|
import { swiper } from "@/utils/swiper";
|
|
@@ -253,7 +253,7 @@ export default defineComponent({
|
|
|
temperature: {
|
|
|
// 空调基本信息
|
|
|
type: Number,
|
|
|
- default: () => 0
|
|
|
+ default: () => 0,
|
|
|
},
|
|
|
// hasAir: {
|
|
|
// // 有无空调
|
|
@@ -263,33 +263,33 @@ export default defineComponent({
|
|
|
airVolumes: {
|
|
|
// 风量信息
|
|
|
type: Array,
|
|
|
- default: () => []
|
|
|
+ default: () => [],
|
|
|
},
|
|
|
projectId: {
|
|
|
type: String,
|
|
|
- default: () => ""
|
|
|
+ default: () => "",
|
|
|
},
|
|
|
spaceId: {
|
|
|
type: String,
|
|
|
- default: () => ""
|
|
|
+ default: () => "",
|
|
|
},
|
|
|
userIsControl: {
|
|
|
type: Boolean,
|
|
|
- default: () => false
|
|
|
+ default: () => false,
|
|
|
},
|
|
|
forceOverTimeFlag: {
|
|
|
type: Boolean,
|
|
|
- default: () => false
|
|
|
+ default: () => false,
|
|
|
},
|
|
|
seviceEquipmentList: {
|
|
|
// 是否走服务定制的设备
|
|
|
type: Array,
|
|
|
- default: () => []
|
|
|
- }
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
},
|
|
|
components: {
|
|
|
Switch,
|
|
|
- [Dialog.Component.name]: Dialog.Component
|
|
|
+ [Dialog.Component.name]: Dialog.Component,
|
|
|
},
|
|
|
setup(props, contx) {
|
|
|
const propsVal = props;
|
|
@@ -307,7 +307,7 @@ export default defineComponent({
|
|
|
gear: 0, // 风量
|
|
|
boundPoint: {}, // 开关 档位 温度 模式点位
|
|
|
isOpen: false, // 空调开关 true 是开
|
|
|
- runStatus: 0 // 查询设备的真实状态
|
|
|
+ runStatus: 0, // 查询设备的真实状态
|
|
|
};
|
|
|
const feedbackTimer: any = null;
|
|
|
const airTimer: any = null;
|
|
@@ -355,7 +355,7 @@ export default defineComponent({
|
|
|
remark: [],
|
|
|
nowImg: "",
|
|
|
toWhere: "",
|
|
|
- designTemperature: 0
|
|
|
+ designTemperature: 0,
|
|
|
},
|
|
|
checkNav(type: any = "all") {
|
|
|
proxyData.navType = type;
|
|
@@ -470,9 +470,10 @@ export default defineComponent({
|
|
|
return;
|
|
|
}
|
|
|
handBox.addEventListener("touchstart", function(e: any) {
|
|
|
- barLeft = isNaN(parseInt(barBox.style.left))
|
|
|
+ let oldBarLeft=barBox && barBox.style && barBox.style.left || 0
|
|
|
+ barLeft = isNaN(parseInt(oldBarLeft))
|
|
|
? 0
|
|
|
- : parseInt(barBox.style.left);
|
|
|
+ : parseInt(oldBarLeft);
|
|
|
isMove = true;
|
|
|
});
|
|
|
handBox.addEventListener("touchend", function(e: any) {
|
|
@@ -510,7 +511,7 @@ export default defineComponent({
|
|
|
// console.log(proxyData.realTemp);
|
|
|
barBox.style.left = left + proxyData.sliderPading + "px";
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
// 定时获取空调状态
|
|
@@ -648,7 +649,7 @@ export default defineComponent({
|
|
|
changeChildItemAir(btnType: any, childItem: any, symbol: any) {
|
|
|
const domAirOpen = !childItem.isOpen;
|
|
|
let isExeSpaceTime: Boolean = proxyData.checkDeviceIsExeSpaceTime([
|
|
|
- childItem
|
|
|
+ childItem,
|
|
|
]);
|
|
|
if (
|
|
|
proxyData.forceOverTimeFlag &&
|
|
@@ -673,7 +674,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: childItem.id, //类型:String 必有字段 备注:设备id
|
|
|
code: childItem.switchCode, //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: childItem.isOpen ? "1" : "0" //类型:String 必有字段 备注:值 0
|
|
|
+ value: childItem.isOpen ? "1" : "0", //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
arr.push(obj);
|
|
|
} else if (btnType === "temp") {
|
|
@@ -692,7 +693,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: childItem.id, //类型:String 必有字段 备注:设备id
|
|
|
code: childItem.tempSetCode, //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: childItem.tempSet //类型:String 必有字段 备注:值 0
|
|
|
+ value: childItem.tempSet, //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
arr.push(obj);
|
|
|
proxyData.childDisabled(childItem, arr);
|
|
@@ -721,7 +722,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: childItem.id, //类型:String 必有字段 备注:设备id
|
|
|
code: childItem.gearCode, //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: childItem.isAutoGear ? 4 : childItem.gear //类型:String 必有字段 备注:值 0
|
|
|
+ value: childItem.isAutoGear ? 4 : childItem.gear, //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
arr.push(obj);
|
|
|
} else if (btnType === "model") {
|
|
@@ -739,7 +740,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: childItem.id, //类型:String 必有字段 备注:设备id
|
|
|
code: childItem.modeSetCode, //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: childItem.workMode //类型:String 必有字段 备注:值 0
|
|
|
+ value: childItem.workMode, //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
arr.push(obj);
|
|
|
}
|
|
@@ -753,7 +754,7 @@ export default defineComponent({
|
|
|
// 改变设备状态
|
|
|
setSpaceCondtioners(data: any) {
|
|
|
setSpaceCondtioners(data)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
// proxyData.setLoadingNumber();
|
|
|
proxyData.loadinngEnd();
|
|
|
})
|
|
@@ -773,7 +774,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: item.id, //类型:String 必有字段 备注:设备id
|
|
|
code: item[equpObj.codeKey], //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: equpObj.value //类型:String 必有字段 备注:值 0
|
|
|
+ value: equpObj.value, //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
data.push(obj);
|
|
|
});
|
|
@@ -882,7 +883,7 @@ export default defineComponent({
|
|
|
let obj: any = {
|
|
|
id: item.id, //类型:String 必有字段 备注:设备id
|
|
|
code: item.switchCode, //类型:String 必有字段 备注:编码 EquipSwtichSet
|
|
|
- value: proxyData.airData.isOpen ? "1" : "0" //类型:String 必有字段 备注:值 0
|
|
|
+ value: proxyData.airData.isOpen ? "1" : "0", //类型:String 必有字段 备注:值 0
|
|
|
};
|
|
|
data.push(obj);
|
|
|
});
|
|
@@ -981,13 +982,13 @@ export default defineComponent({
|
|
|
// 空调信息airTemp的修改
|
|
|
getAirInfo(isAddTimer: any = 0) {
|
|
|
const paramObj = {
|
|
|
- spaceId: proxyData.spaceId
|
|
|
+ spaceId: proxyData.spaceId,
|
|
|
// spaceId: props.spaceId,//'Sp110108025564f438d7fef64eea8202a6462f1bbcce' 空间id
|
|
|
};
|
|
|
//wx.showLoading();
|
|
|
let str: any = setQueryConfig(paramObj);
|
|
|
querySpaceConditioners(str)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
let data: any = res.data || {};
|
|
|
proxyData.firstLoadingAir = false;
|
|
|
proxyData.loadingAir = false;
|
|
@@ -1021,7 +1022,7 @@ export default defineComponent({
|
|
|
proxyData.getAirInfoToTimer(3000);
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
watch(
|
|
|
[() => props, () => props.spaceId],
|
|
@@ -1041,7 +1042,7 @@ export default defineComponent({
|
|
|
},
|
|
|
{
|
|
|
deep: true,
|
|
|
- immediate: true
|
|
|
+ immediate: true,
|
|
|
}
|
|
|
);
|
|
|
onBeforeUnmount(() => {
|
|
@@ -1049,7 +1050,6 @@ export default defineComponent({
|
|
|
clearTimeout(proxyData.airTimer);
|
|
|
proxyData.airTimer = null;
|
|
|
proxyData.distroyFlag = true;
|
|
|
- console.log("定时器销毁了--");
|
|
|
}
|
|
|
});
|
|
|
onMounted(() => {
|
|
@@ -1059,9 +1059,9 @@ export default defineComponent({
|
|
|
// 获取空调信息
|
|
|
});
|
|
|
return {
|
|
|
- ...toRefs(proxyData)
|
|
|
+ ...toRefs(proxyData),
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|