| | |
| | | costiomTime: "", //自定义灌溉时间 |
| | | waterAmount: 0, //定量开阀的水量 |
| | | costiomWater: "", //输入的自定义水量 |
| | | isWXRefreshing:false, |
| | | isWXRefreshing: false, |
| | | intakeName: "" //扫码开阀从首页传来的取水口名称 |
| | | }, |
| | | openValva(event) { |
| | | const { |
| | |
| | | if (item.isAlarmValue === true) { |
| | | //金额报警 |
| | | wx.navigateTo({ |
| | | url: '/pages/rechargeMoney/rechargMoney?vcId=' + item.vcId, |
| | | url: '/pages/rechargeMoney/rechargMoney?vcId=' + item.id, |
| | | }) |
| | | } else if (item.inUse === false) { |
| | | // 选择虚拟卡后 |
| | | this.initDialogData(); |
| | | this.setData({ |
| | | vcId: item.id, |
| | | }) |
| | | if (this.data.intakeName) { |
| | | //扫码开阀逻辑 |
| | | this.postOpenValva(false); |
| | | } else { |
| | | // 选择虚拟卡后 |
| | | this.initDialogData(); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | handleAutoIrrigation() {}, |
| | |
| | | */ |
| | | onLoad(options) { |
| | | const { |
| | | intakeId |
| | | intakeId, |
| | | intakeName |
| | | } = options; |
| | | this.setData({ |
| | | intakeId: intakeId |
| | | intakeId: intakeId, |
| | | intakeName: intakeName |
| | | }) |
| | | console.log('intakeId:' + this.data.intakeId); |
| | | this.getCardList(); |
| | |
| | | // 更新列表数据 |
| | | this.setData({ |
| | | allCardPoints: updatedList, |
| | | isWXRefreshing:false |
| | | isWXRefreshing: false |
| | | }); |
| | | }, |
| | | handleClost() { |
| | |
| | | const data = { |
| | | intakeId: this.data.intakeId, //取水口ID |
| | | vcId: this.data.vcId, //虚拟卡ID |
| | | intakeName: this.data.intakeName, //取水口名称 |
| | | operator: app.globalData.sessionId, //操作员 |
| | | forceOpen: !!isforce // 使用逻辑非操作符 !! 来确保 isForce 是布尔值 |
| | | }; |