|
@@ -323,18 +323,18 @@ wepy.component({
|
|
|
this.$emit('setCanScroll', true)
|
|
|
},
|
|
|
eachAirOpen(aindex) {
|
|
|
- isWithinLocation()
|
|
|
- .then(() => {
|
|
|
- this.allDevices[aindex].open = !this.allDevices[aindex].open
|
|
|
- var value = this.allDevices[aindex].open ? 1 : 0
|
|
|
+ // isWithinLocation()
|
|
|
+ // .then(() => {
|
|
|
+ this.allDevices[aindex].open = !this.allDevices[aindex].open
|
|
|
+ var value = this.allDevices[aindex].open ? 1 : 0
|
|
|
|
|
|
- this.changeOneAir(
|
|
|
+ this.changeOneAir(
|
|
|
this.allDevices[aindex].id,
|
|
|
this.allDevices[aindex].switchCode,
|
|
|
value
|
|
|
)
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ // })
|
|
|
+ // .catch(() => {})
|
|
|
},
|
|
|
showDetail(funcid) {
|
|
|
this.$emit('showDetail', { funcid: funcid })
|
|
@@ -495,85 +495,85 @@ wepy.component({
|
|
|
},
|
|
|
changeZongAir(btnType, value) {
|
|
|
if (!this.airData.isOpen && btnType != 'sw') return
|
|
|
- isWithinLocation()
|
|
|
- .then(() => {
|
|
|
- if (this.roomType === '开放') {
|
|
|
- this.showWorkTime = this.checkAirCanOpen(
|
|
|
+ // isWithinLocation()
|
|
|
+ // .then(() => {
|
|
|
+ if (this.roomType === '开放') {
|
|
|
+ this.showWorkTime = this.checkAirCanOpen(
|
|
|
'air',
|
|
|
!this.airData.isOpen
|
|
|
)
|
|
|
- if (!this.showWorkTime) {
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- var _this = this
|
|
|
- if (btnType == 'gear' && value == 'windLow') {
|
|
|
+ if (!this.showWorkTime) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var _this = this
|
|
|
+ if (btnType == 'gear' && value == 'windLow') {
|
|
|
// 降挡
|
|
|
- if (this.airGear > 1) {
|
|
|
- this.airGear--
|
|
|
- this.isAutoGear = 0
|
|
|
- } else {
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- if (btnType == 'gear' && value == 'windUp') {
|
|
|
+ if (this.airGear > 1) {
|
|
|
+ this.airGear--
|
|
|
+ this.isAutoGear = 0
|
|
|
+ } else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (btnType == 'gear' && value == 'windUp') {
|
|
|
// 升档
|
|
|
- if (this.airGear < 3) {
|
|
|
- this.airGear++
|
|
|
- this.isAutoGear = 0
|
|
|
- } else {
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- if (btnType == 'gear' && value == 'auto') {
|
|
|
- this.isAutoGear = this.isAutoGear == 1 ? 0 : 1
|
|
|
- }
|
|
|
- if (btnType == 'mode') {
|
|
|
- this.airMode = value
|
|
|
+ if (this.airGear < 3) {
|
|
|
+ this.airGear++
|
|
|
+ this.isAutoGear = 0
|
|
|
+ } else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (btnType == 'gear' && value == 'auto') {
|
|
|
+ this.isAutoGear = this.isAutoGear == 1 ? 0 : 1
|
|
|
+ }
|
|
|
+ if (btnType == 'mode') {
|
|
|
+ this.airMode = value
|
|
|
+ }
|
|
|
+ if (btnType == 'sw') {
|
|
|
+ this.airData.isOpen = !this.airData.isOpen
|
|
|
+ }
|
|
|
+
|
|
|
+ let paramArr = []
|
|
|
+ this.allDevices.forEach((dele) => {
|
|
|
+ if (btnType == 'sw') {
|
|
|
+ let paramObj = {
|
|
|
+ id: dele.id,
|
|
|
+ code: dele.switchCode,
|
|
|
+ value: _this.airData.isOpen ? 1 : 0
|
|
|
}
|
|
|
- if (btnType == 'sw') {
|
|
|
- this.airData.isOpen = !this.airData.isOpen
|
|
|
+ paramArr.push(paramObj)
|
|
|
+ }
|
|
|
+ var pvalue
|
|
|
+ dele.allModel.forEach((mele) => {
|
|
|
+ if (mele.id == 'temp') {
|
|
|
+ pvalue = value
|
|
|
+ } else if (mele.id == 'gear') {
|
|
|
+ pvalue = _this.isAutoGear == 1 ? 4 : _this.airGear
|
|
|
+ } else if (mele.id == 'mode') {
|
|
|
+ pvalue = _this.airMode
|
|
|
}
|
|
|
|
|
|
- let paramArr = []
|
|
|
- this.allDevices.forEach((dele) => {
|
|
|
- if (btnType == 'sw') {
|
|
|
- let paramObj = {
|
|
|
- id: dele.id,
|
|
|
- code: dele.switchCode,
|
|
|
- value: _this.airData.isOpen ? 1 : 0
|
|
|
- }
|
|
|
- paramArr.push(paramObj)
|
|
|
+ if (mele.id == btnType) {
|
|
|
+ let paramObj = {
|
|
|
+ id: dele.id,
|
|
|
+ code: mele.code,
|
|
|
+ value: pvalue
|
|
|
}
|
|
|
- var pvalue
|
|
|
- dele.allModel.forEach((mele) => {
|
|
|
- if (mele.id == 'temp') {
|
|
|
- pvalue = value
|
|
|
- } else if (mele.id == 'gear') {
|
|
|
- pvalue = _this.isAutoGear == 1 ? 4 : _this.airGear
|
|
|
- } else if (mele.id == 'mode') {
|
|
|
- pvalue = _this.airMode
|
|
|
- }
|
|
|
-
|
|
|
- if (mele.id == btnType) {
|
|
|
- let paramObj = {
|
|
|
- id: dele.id,
|
|
|
- code: mele.code,
|
|
|
- value: pvalue
|
|
|
- }
|
|
|
- paramArr.push(paramObj)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ paramArr.push(paramObj)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
- this.vibrateShort()
|
|
|
- wx.showLoading()
|
|
|
+ this.vibrateShort()
|
|
|
+ wx.showLoading()
|
|
|
|
|
|
// 下达指令
|
|
|
- changeManualTempHttp(paramArr, {
|
|
|
- curTemp: _this.temperature,
|
|
|
- equipType: 'airConditioner'
|
|
|
- })
|
|
|
+ changeManualTempHttp(paramArr, {
|
|
|
+ curTemp: _this.temperature,
|
|
|
+ equipType: 'airConditioner'
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
if (btnType == 'temp') {
|
|
|
_this.airTemp = value
|
|
@@ -583,8 +583,8 @@ wepy.component({
|
|
|
.catch(() => {
|
|
|
wx.hideLoading()
|
|
|
})
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ // })
|
|
|
+ // .catch(() => {})
|
|
|
},
|
|
|
changeOneAir(id, code, value, deviceObjCopy) {
|
|
|
var _this = this
|