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