蜂箱
This commit is contained in:
parent
aa6d0c218b
commit
58ed1420fc
|
@ -1,6 +1,6 @@
|
||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
// baseUrl: 'http://192.168.2.100:3202',
|
// baseUrl: 'http://192.168.2.31:3202',
|
||||||
baseUrl: 'https://fen.ccttiot.com/prod-api',
|
baseUrl: 'https://fen.ccttiot.com/prod-api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
|
|
|
@ -16,11 +16,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
{{obj.apiaryName == undefined ? '--' : obj.apiaryName}}-{{obj.name == undefined ? '--' : obj.name}}
|
{{obj.apiaryName == undefined ? '--' : obj.apiaryName}}-{{obj.name == undefined ? '--' : obj.name}}
|
||||||
|
|
||||||
<view class="sets">
|
<view class="sets">
|
||||||
|
<view class="tongbu" v-if="tbszflag" @click="btntbsz">
|
||||||
|
同步设置
|
||||||
|
</view>
|
||||||
<!-- <image @click="btnmenu" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ" mode=""></image> -->
|
<!-- <image @click="btnmenu" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ" mode=""></image> -->
|
||||||
|
|
||||||
<!-- 正在连接 -->
|
<!-- 正在连接 -->
|
||||||
<image v-if="zcljflag" style="width: 184rpx;height: 40rpx;margin-right:20rpx" src="https://api.ccttiot.com/smartmeter/img/static/uYUoki4Tc56rzINzY2Ba" mode=""></image>
|
<image v-if="zcljflag" style="width: 180rpx;height: 40rpx;margin-right:20rpx" src="https://api.ccttiot.com/smartmeter/img/static/uYUoki4Tc56rzINzY2Ba" mode=""></image>
|
||||||
<!-- 连接成功 -->
|
<!-- 连接成功 -->
|
||||||
<image v-if="ljcgflag" style="width: 40rpx;height: 40rpx;margin-right:20rpx" src="https://api.ccttiot.com/smartmeter/img/static/uhSqWj4f07z8oDMh0i8f" mode=""></image>
|
<image v-if="ljcgflag" style="width: 40rpx;height: 40rpx;margin-right:20rpx" src="https://api.ccttiot.com/smartmeter/img/static/uhSqWj4f07z8oDMh0i8f" mode=""></image>
|
||||||
<!-- 未连接 -->
|
<!-- 未连接 -->
|
||||||
|
@ -141,7 +145,7 @@
|
||||||
src="https://api.ccttiot.com/smartmeter/img/static/uGGgEPbe8ryHspQPL2o8" mode=""></image>
|
src="https://api.ccttiot.com/smartmeter/img/static/uGGgEPbe8ryHspQPL2o8" mode=""></image>
|
||||||
<image style="height: 25rpx;" v-if="ver_data.bat < 20"
|
<image style="height: 25rpx;" v-if="ver_data.bat < 20"
|
||||||
src="https://api.ccttiot.com/smartmeter/img/static/uIRhPmP5WUJaIg0nft9E" mode=""></image>
|
src="https://api.ccttiot.com/smartmeter/img/static/uIRhPmP5WUJaIg0nft9E" mode=""></image>
|
||||||
{{ver_data.bat == undefined ? '--' : ver_data.bat}}%
|
{{this.point == undefined ? '--' : this.point}}%
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="echarts_box" v-if="xnwd" @click="btnec(1)">
|
<view class="echarts_box" v-if="xnwd" @click="btnec(1)">
|
||||||
|
@ -271,7 +275,7 @@
|
||||||
当前 {{obj.volume / 1000 == 0 ? obj.volume : (obj.volume / 1000).toFixed(1)}}khz
|
当前 {{obj.volume / 1000 == 0 ? obj.volume : (obj.volume / 1000).toFixed(1)}}khz
|
||||||
</view>
|
</view>
|
||||||
<view class="top_cont" v-else>
|
<view class="top_cont" v-else>
|
||||||
当前 {{ver_data.MIC / 1000 == 0 ? ver_data.MIC : (ver_data.MIC / 1000).toFixed(1)}}khz
|
当前 {{(ver_data.MIC !== undefined && !isNaN(ver_data.MIC) && ver_data.MIC / 1000 === 0) ? ver_data.MIC : ((ver_data.MIC !== undefined && !isNaN(ver_data.MIC)) ? (ver_data.MIC / 1000).toFixed(1) : '--')}}khz
|
||||||
</view>
|
</view>
|
||||||
<view class="top_right">
|
<view class="top_right">
|
||||||
<view style="width: 1rpx;">
|
<view style="width: 1rpx;">
|
||||||
|
@ -449,7 +453,11 @@
|
||||||
ver_data:{},
|
ver_data:{},
|
||||||
zcljflag:false,
|
zcljflag:false,
|
||||||
ljcgflag:false,
|
ljcgflag:false,
|
||||||
wljflag:false
|
wljflag:false,
|
||||||
|
tbszflag:false,
|
||||||
|
shezhiobj:{},
|
||||||
|
scdeviceflag:true,
|
||||||
|
point:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -459,6 +467,7 @@
|
||||||
this.zcljflag = false
|
this.zcljflag = false
|
||||||
this.wljflag = false
|
this.wljflag = false
|
||||||
this.ljcgflag = false
|
this.ljcgflag = false
|
||||||
|
this.tbszflag = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.canvas1.init(this.initChart)
|
this.$refs.canvas1.init(this.initChart)
|
||||||
this.$refs.canvas2.init(this.initChart2)
|
this.$refs.canvas2.init(this.initChart2)
|
||||||
|
@ -491,13 +500,36 @@
|
||||||
this.clearTimer()
|
this.clearTimer()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取设置数据值
|
||||||
|
getinfo() {
|
||||||
|
this.$u.get(`farm/userSetting/my`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.shezhiobj = res.data
|
||||||
|
// miteInterval: '', //除螨间隔时间(天)
|
||||||
|
// minPower: '', //电量保护最低电量%
|
||||||
|
// minHeat: '', //加热板开始工作的最低箱外温度℃
|
||||||
|
// maxHeat: '', //加热板停止工作的箱内外温差℃
|
||||||
|
// maxFan: '', //风扇开始工作的最高箱内温度℃
|
||||||
|
// minFan: '', //风扇停止工作的最低箱内温度℃
|
||||||
|
// minCo2: '', //风扇停止工作的最低二氧化碳浓度℃
|
||||||
|
// maxCo2: '', //风扇开始工作的最高二氧化碳浓度℃
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 连接蓝牙成功 点击同步设置
|
||||||
|
btntbsz(){
|
||||||
|
// xBlufi.notifySendCustomData({
|
||||||
|
// customData: ""
|
||||||
|
// })
|
||||||
|
},
|
||||||
// 根据蜂箱id获取设备信息
|
// 根据蜂箱id获取设备信息
|
||||||
getobj() {
|
getobj() {
|
||||||
this.$u.get(`/app/beehive/${this.beehiveId}`).then(res => {
|
this.$u.get(`/app/beehive/${this.beehiveId}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if(res.data.onlineStatus == 0){
|
if(res.data.onlineStatus == 0){ //判断蜂箱离线时
|
||||||
this.mac = res.data.mac
|
this.mac = res.data.mac
|
||||||
this.Binddevice()
|
this.Binddevice() //执行连接蓝牙方法
|
||||||
|
this.getinfo() //获取设置数值
|
||||||
}else{
|
}else{
|
||||||
// 每次进入执行定时器
|
// 每次进入执行定时器
|
||||||
this.startTimer()
|
this.startTimer()
|
||||||
|
@ -548,7 +580,20 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
this.gettq()
|
this.gettq()
|
||||||
} else {
|
} else if(res.code == 401){
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '您还未登录,是否先去登录',
|
||||||
|
showCancel: true ,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
@ -617,8 +662,10 @@
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '暂未发现蜂箱设备,是否重新搜索连接',
|
content: '暂未发现蜂箱设备,是否重新搜索连接',
|
||||||
showCancel: true ,
|
showCancel: true ,
|
||||||
success:function(res) {
|
success: function(res) {
|
||||||
that.Binddevice()
|
if (res.confirm) {
|
||||||
|
that.Binddevice()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
@ -669,6 +716,7 @@
|
||||||
this.zcljflag = false
|
this.zcljflag = false
|
||||||
this.wljflag = false
|
this.wljflag = false
|
||||||
this.ljcgflag = true
|
this.ljcgflag = true
|
||||||
|
this.tbszflag = true
|
||||||
{
|
{
|
||||||
xBlufi.notifyInitBleEsp32({
|
xBlufi.notifyInitBleEsp32({
|
||||||
deviceId: options.data.deviceId
|
deviceId: options.data.deviceId
|
||||||
|
@ -693,7 +741,23 @@
|
||||||
obj[key] = !isNaN(value) ? parseFloat(value) : value;
|
obj[key] = !isNaN(value) ? parseFloat(value) : value;
|
||||||
})
|
})
|
||||||
this.ver_data = obj
|
this.ver_data = obj
|
||||||
console.log(this.ver_data,this.ver_data.bat)
|
if(this.ver_data.bat != '' || this.ver_data.bat != undefined){ //判断是否接受到设备数据
|
||||||
|
this.point = (1 - (this.obj.modelMaxV - this.ver_data.bat) / (this.obj.modelMaxV -this.obj.modelMinV)) * 100
|
||||||
|
if(this.scdeviceflag == true){ //判断是否已经上传过
|
||||||
|
let data = {
|
||||||
|
beehiveId:this.beehiveId,
|
||||||
|
sys:this.ver_data
|
||||||
|
}
|
||||||
|
this.$u.put(`app/beehive/btUpload`,data).then(res => {
|
||||||
|
if(res.code == 200){
|
||||||
|
this.scdeviceflag = false //一次性只上传一次
|
||||||
|
}else{
|
||||||
|
this.scdeviceflag = false //一次性只上传一次
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('收取到的蓝牙数据',this.ver_data,options.data)
|
||||||
break
|
break
|
||||||
case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
|
case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
|
||||||
if (options.result) {
|
if (options.result) {
|
||||||
|
@ -930,196 +994,205 @@
|
||||||
},
|
},
|
||||||
// 点击进行蜂箱操作
|
// 点击进行蜂箱操作
|
||||||
btndow(num) {
|
btndow(num) {
|
||||||
if (num == 1) {
|
const user = uni.getStorageSync('user')
|
||||||
if(this.obj.onlineStatus == 0){
|
if(this.obj.userId == user.userId){
|
||||||
xBlufi.notifySendCustomData({
|
if (num == 1) {
|
||||||
customData: "11clear_weight@"
|
if(this.obj.onlineStatus == 0){
|
||||||
})
|
xBlufi.notifySendCustomData({
|
||||||
uni.showToast({
|
customData: "11clear_weight@"
|
||||||
title: '去皮成功',
|
})
|
||||||
icon: 'success',
|
uni.showToast({
|
||||||
duration: 2000
|
title: '去皮成功',
|
||||||
})
|
icon: 'success',
|
||||||
}else{
|
duration: 2000
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/clearWeight`).then(res => {
|
})
|
||||||
if (res.code == 200) {
|
}else{
|
||||||
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/clearWeight`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '去皮成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (num == 2) {
|
||||||
|
if(this.obj.onlineStatus == 0){
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: "11beep11@" + 10
|
||||||
|
})
|
||||||
|
uni.showToast({
|
||||||
|
title: '响铃成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/buzzer`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '响铃成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (num == 3) {
|
||||||
|
if (this.fskx == '关') {
|
||||||
|
if(this.obj.onlineStatus == 0){
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11fan100@'
|
||||||
|
})
|
||||||
|
this.fskx = '开'
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '去皮成功',
|
title: '风扇开启成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
uni.showToast({
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=true`).then(res => {
|
||||||
title: res.msg,
|
if (res.code == 200) {
|
||||||
icon: 'none',
|
if (this.fskx == '关') {
|
||||||
duration: 2000
|
this.fskx = '开'
|
||||||
|
} else {
|
||||||
|
this.fskx = '关'
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '风扇开启成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
} else {
|
||||||
}
|
if(this.obj.onlineStatus == 0){
|
||||||
} else if (num == 2) {
|
xBlufi.notifySendCustomData({
|
||||||
if(this.obj.onlineStatus == 0){
|
customData: "11fan0@"
|
||||||
xBlufi.notifySendCustomData({
|
})
|
||||||
customData: "11beep11@" + 10
|
this.fskx = '关'
|
||||||
})
|
|
||||||
uni.showToast({
|
|
||||||
title: '响铃成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/buzzer`).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '响铃成功',
|
title: '风扇关闭成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
uni.showToast({
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=false`).then(res => {
|
||||||
title: res.msg,
|
if (res.code == 200) {
|
||||||
icon: 'none',
|
if (this.fskx == '关') {
|
||||||
duration: 2000
|
this.fskx = '开'
|
||||||
|
} else {
|
||||||
|
this.fskx = '关'
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '风扇关闭成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (num == 3) {
|
|
||||||
if (this.fskx == '关') {
|
|
||||||
if(this.obj.onlineStatus == 0){
|
|
||||||
xBlufi.notifySendCustomData({
|
|
||||||
customData: '11fan100@'
|
|
||||||
})
|
|
||||||
this.fskx = '开'
|
|
||||||
uni.showToast({
|
|
||||||
title: '风扇开启成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=true`).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (this.fskx == '关') {
|
|
||||||
this.fskx = '开'
|
|
||||||
} else {
|
|
||||||
this.fskx = '关'
|
|
||||||
}
|
|
||||||
uni.showToast({
|
|
||||||
title: '风扇开启成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} else {
|
} else if (num == 4) {
|
||||||
if(this.obj.onlineStatus == 0){
|
if (this.jrkg == '关') {
|
||||||
xBlufi.notifySendCustomData({
|
if(this.obj.onlineStatus == 0){
|
||||||
customData: "11fan0@"
|
xBlufi.notifySendCustomData({
|
||||||
})
|
customData: "11hot100@"
|
||||||
this.fskx = '关'
|
})
|
||||||
uni.showToast({
|
this.jrkg = '开'
|
||||||
title: '风扇关闭成功',
|
uni.showToast({
|
||||||
icon: 'success',
|
title: '加热开启成功',
|
||||||
duration: 2000
|
icon: 'success',
|
||||||
})
|
duration: 2000
|
||||||
}else{
|
})
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=false`).then(res => {
|
}else{
|
||||||
if (res.code == 200) {
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=true`).then(res => {
|
||||||
if (this.fskx == '关') {
|
if (res.code == 200) {
|
||||||
this.fskx = '开'
|
if (this.jrkg == '关') {
|
||||||
|
this.jrkg = '开'
|
||||||
|
} else {
|
||||||
|
this.jrkg = '关'
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '加热开启成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.fskx = '关'
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
uni.showToast({
|
})
|
||||||
title: '风扇关闭成功',
|
}
|
||||||
icon: 'success',
|
} else {
|
||||||
duration: 2000
|
if(this.obj.onlineStatus == 0){
|
||||||
})
|
xBlufi.notifySendCustomData({
|
||||||
} else {
|
customData: "11hot0@"
|
||||||
uni.showToast({
|
})
|
||||||
title: res.msg,
|
this.jrkg = '关'
|
||||||
icon: 'none',
|
uni.showToast({
|
||||||
duration: 2000
|
title: '加热关闭成功',
|
||||||
})
|
icon: 'success',
|
||||||
}
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}else{
|
||||||
}
|
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=false`).then(res => {
|
||||||
} else if (num == 4) {
|
if (res.code == 200) {
|
||||||
if (this.jrkg == '关') {
|
if (this.jrkg == '关') {
|
||||||
if(this.obj.onlineStatus == 0){
|
this.jrkg = '开'
|
||||||
xBlufi.notifySendCustomData({
|
} else {
|
||||||
customData: "11hot100@"
|
this.jrkg = '关'
|
||||||
})
|
}
|
||||||
this.jrkg = '开'
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '加热关闭成功',
|
||||||
title: '加热开启成功',
|
icon: 'success',
|
||||||
icon: 'success',
|
duration: 2000
|
||||||
duration: 2000
|
})
|
||||||
})
|
} else {
|
||||||
}else{
|
uni.showToast({
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=true`).then(res => {
|
title: res.msg,
|
||||||
if (res.code == 200) {
|
icon: 'none',
|
||||||
if (this.jrkg == '关') {
|
duration: 2000
|
||||||
this.jrkg = '开'
|
})
|
||||||
} else {
|
}
|
||||||
this.jrkg = '关'
|
})
|
||||||
}
|
}
|
||||||
uni.showToast({
|
|
||||||
title: '加热开启成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(this.obj.onlineStatus == 0){
|
|
||||||
xBlufi.notifySendCustomData({
|
|
||||||
customData: "11hot0@"
|
|
||||||
})
|
|
||||||
this.jrkg = '关'
|
|
||||||
uni.showToast({
|
|
||||||
title: '加热关闭成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=false`).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (this.jrkg == '关') {
|
|
||||||
this.jrkg = '开'
|
|
||||||
} else {
|
|
||||||
this.jrkg = '关'
|
|
||||||
}
|
|
||||||
uni.showToast({
|
|
||||||
title: '加热关闭成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '您没有权限操作',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 请求天气
|
// 请求天气
|
||||||
|
@ -2253,6 +2326,19 @@
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
.sets {
|
.sets {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.tongbu{
|
||||||
|
width: 130rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #FFC107;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
.menu {
|
.menu {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -233,6 +233,8 @@
|
||||||
onShow() {
|
onShow() {
|
||||||
this.indextab = 0
|
this.indextab = 0
|
||||||
this.pagesum = 1
|
this.pagesum = 1
|
||||||
|
this.curtitidx = 0
|
||||||
|
this.apiaryId = ''
|
||||||
this.miyuancolumns = []
|
this.miyuancolumns = []
|
||||||
this.getmiyuancolumns()
|
this.getmiyuancolumns()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user