蜂箱
This commit is contained in:
parent
58ed1420fc
commit
07957bf4e8
|
@ -24,11 +24,14 @@
|
|||
<!-- <image @click="btnmenu" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ" 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="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>
|
||||
<!-- 未连接 -->
|
||||
<image v-if="wljflag" style="width: 40rpx;height: 40rpx;margin-right:20rpx" src="https://api.ccttiot.com/smartmeter/img/static/uBp1lbXlGEMD4s5P8LGu" mode=""></image>
|
||||
<image v-if="wljflag" style="width: 40rpx;height: 40rpx;margin-right:20rpx"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uBp1lbXlGEMD4s5P8LGu" mode=""></image>
|
||||
|
||||
<image @click="btnedit" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ"
|
||||
mode=""></image>
|
||||
|
@ -137,15 +140,15 @@
|
|||
{{obj.surplusPowerPoint == undefined ? '--' : obj.surplusPowerPoint}}%
|
||||
</view>
|
||||
<view class="ele" v-else>
|
||||
<image style="height: 25rpx;" v-if="ver_data.bat <= 100 && ver_data.bat >= 80"
|
||||
<image style="height: 25rpx;" v-if="point <= 100 && point >= 80"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uWbKPMvIuFZjzviEJjmP" mode=""></image>
|
||||
<image style="height: 25rpx;" v-if="ver_data.bat < 80 && ver_data.bat >= 50"
|
||||
<image style="height: 25rpx;" v-if="point < 80 && point >= 50"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/u0mCXpSrvcROLCMsahNh" mode=""></image>
|
||||
<image style="height: 25rpx;" v-if="ver_data.bat < 50 && ver_data.bat >= 20"
|
||||
<image style="height: 25rpx;" v-if="point < 50 && point >= 20"
|
||||
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="point < 20"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uIRhPmP5WUJaIg0nft9E" mode=""></image>
|
||||
{{this.point == undefined ? '--' : this.point}}%
|
||||
{{point == undefined ? '--' : point}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box" v-if="xnwd" @click="btnec(1)">
|
||||
|
@ -275,7 +278,8 @@
|
|||
当前 {{obj.volume / 1000 == 0 ? obj.volume : (obj.volume / 1000).toFixed(1)}}khz
|
||||
</view>
|
||||
<view class="top_cont" v-else>
|
||||
当前 {{(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
|
||||
当前
|
||||
{{(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 class="top_right">
|
||||
<view style="width: 1rpx;">
|
||||
|
@ -332,7 +336,8 @@
|
|||
</view>
|
||||
<view class="top" style="margin-top: 14rpx;">
|
||||
<view class="weather_add">
|
||||
蜂场位置:<span style="color: #42A5F5;">{{obj.apiaryCounty == undefined ? '--' : obj.apiaryCounty}}</span>
|
||||
蜂场位置:<span
|
||||
style="color: #42A5F5;">{{obj.apiaryCounty == undefined ? '--' : obj.apiaryCounty}}</span>
|
||||
</view>
|
||||
<view class="up_time">
|
||||
{{daytime}}更新
|
||||
|
@ -346,7 +351,7 @@
|
|||
<view class="week">
|
||||
{{item.textDay}}
|
||||
</view>
|
||||
<view class="week_weather" >
|
||||
<view class="week_weather">
|
||||
{{item.windDirDay}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -448,16 +453,16 @@
|
|||
eyht: false,
|
||||
beep: false,
|
||||
timer: null,
|
||||
mac:'',
|
||||
devicesList:[],
|
||||
ver_data:{},
|
||||
zcljflag:false,
|
||||
ljcgflag:false,
|
||||
wljflag:false,
|
||||
tbszflag:false,
|
||||
shezhiobj:{},
|
||||
scdeviceflag:true,
|
||||
point:''
|
||||
mac: '',
|
||||
devicesList: [],
|
||||
ver_data: {},
|
||||
zcljflag: false,
|
||||
ljcgflag: false,
|
||||
wljflag: false,
|
||||
tbszflag: false,
|
||||
shezhiobj: {},
|
||||
scdeviceflag: true,
|
||||
point: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -517,28 +522,48 @@
|
|||
})
|
||||
},
|
||||
// 连接蓝牙成功 点击同步设置
|
||||
btntbsz(){
|
||||
// xBlufi.notifySendCustomData({
|
||||
// customData: ""
|
||||
// })
|
||||
btntbsz() {
|
||||
console.log("11bat_stop" + this.shezhiobj.minPower + '@' + "temp_start" + this.shezhiobj.minHeat + '@' + "temp_stop" + this.shezhiobj.maxHeat + '@' + "fan_start" + this.shezhiobj.maxFan + '@' + "fan_stop" + this.shezhiobj.minFan + '@' + "co2_start" + this.shezhiobj.maxCo2 + '@' + "co2_stop" + this.shezhiobj.minCo2 + '@');
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11bat_stop" + this.shezhiobj.minPower + '@' + "temp_start" + this.shezhiobj.minHeat + '@' + "temp_stop" + this.shezhiobj.maxHeat + '@' + "fan_start" + this.shezhiobj.maxFan + '@' + "fan_stop" + this.shezhiobj.minFan + '@' + "co2_start" + this.shezhiobj.maxCo2 + '@' + "co2_stop" + this.shezhiobj.minCo2 + '@'
|
||||
})
|
||||
uni.showToast({
|
||||
title: '同步成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 根据蜂箱id获取设备信息
|
||||
getobj() {
|
||||
this.$u.get(`/app/beehive/${this.beehiveId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if(res.data.onlineStatus == 0){ //判断蜂箱离线时
|
||||
if (res.data.onlineStatus == 0) { //判断蜂箱离线时
|
||||
this.mac = res.data.mac
|
||||
this.Binddevice() //执行连接蓝牙方法
|
||||
this.getinfo() //获取设置数值
|
||||
}else{
|
||||
} else {
|
||||
// 每次进入执行定时器
|
||||
this.startTimer()
|
||||
}
|
||||
this.obj = res.data
|
||||
if(res.data.lat == null || res.data.lng == null){
|
||||
if (res.data.lat == null || res.data.lng == null) {
|
||||
this.latitude = 27.100845
|
||||
this.longitude = 120.25469
|
||||
}else{
|
||||
} else {
|
||||
this.latitude = res.data.lat
|
||||
this.longitude = res.data.lng
|
||||
}
|
||||
|
@ -580,20 +605,20 @@
|
|||
})
|
||||
|
||||
this.gettq()
|
||||
} else if(res.code == 401){
|
||||
} else if (res.code == 401) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '您还未登录,是否先去登录',
|
||||
showCancel: true ,
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/login/login'
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -635,14 +660,14 @@
|
|||
} else {
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList))
|
||||
this.devicesList = uniqueDevicesList
|
||||
console.log(this.devicesList,'列表');
|
||||
console.log(this.devicesList, '列表');
|
||||
// 初始化一个标志变量,用于跟踪是否有匹配
|
||||
let isMatched = false
|
||||
// 遍历设备列表
|
||||
this.devicesList.forEach(device => {
|
||||
// 从设备名称中提取MAC地址(假设MAC地址是设备名称的最后12个字符)
|
||||
let macFromName = device.name.substring(device.name.length - 12)
|
||||
console.log(macFromName,this.mac)
|
||||
console.log(macFromName, this.mac)
|
||||
// 检查MAC地址是否匹配
|
||||
if (macFromName == this.mac) {
|
||||
this.createBLEConnection(device)
|
||||
|
@ -661,14 +686,14 @@
|
|||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '暂未发现蜂箱设备,是否重新搜索连接',
|
||||
showCancel: true ,
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.zcljflag = false
|
||||
this.wljflag = false
|
||||
this.ljcgflag = true
|
||||
|
@ -711,7 +736,7 @@
|
|||
uni.showToast({
|
||||
title: '连接成功',
|
||||
icon: 'success',
|
||||
duration:2000
|
||||
duration: 2000
|
||||
})
|
||||
this.zcljflag = false
|
||||
this.wljflag = false
|
||||
|
@ -741,23 +766,24 @@
|
|||
obj[key] = !isNaN(value) ? parseFloat(value) : value;
|
||||
})
|
||||
this.ver_data = obj
|
||||
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){ //判断是否已经上传过
|
||||
if (this.ver_data.bat != '' || this.ver_data.bat != undefined) { //判断是否接受到设备数据
|
||||
let dian = (1 - (this.obj.modelMaxV - this.ver_data.bat) / (this.obj.modelMaxV - this.obj.modelMinV)) * 100
|
||||
this.point = dian.toFixed(1)
|
||||
if (this.scdeviceflag == true) { //判断是否已经上传过
|
||||
let data = {
|
||||
beehiveId:this.beehiveId,
|
||||
sys:this.ver_data
|
||||
beehiveId: this.beehiveId,
|
||||
sys: this.ver_data
|
||||
}
|
||||
this.$u.put(`app/beehive/btUpload`,data).then(res => {
|
||||
if(res.code == 200){
|
||||
this.$u.put(`app/beehive/btUpload`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.scdeviceflag = false //一次性只上传一次
|
||||
}else{
|
||||
} else {
|
||||
this.scdeviceflag = false //一次性只上传一次
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log('收取到的蓝牙数据',this.ver_data,options.data)
|
||||
console.log('收取到的蓝牙数据', this.ver_data, options.data)
|
||||
break
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
|
||||
if (options.result) {
|
||||
|
@ -785,6 +811,12 @@
|
|||
break
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED: {
|
||||
console.log('蓝牙异常断开', options.result)
|
||||
if(options.result == false){
|
||||
this.zcljflag = false
|
||||
this.wljflag = false
|
||||
this.ljcgflag = false
|
||||
this.tbszflag = false
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -793,7 +825,7 @@
|
|||
|
||||
|
||||
// 跳转天气
|
||||
btntqxq(){
|
||||
btntqxq() {
|
||||
|
||||
},
|
||||
// 每30秒上报数据
|
||||
|
@ -852,8 +884,8 @@
|
|||
// 点击跳转到操作详情
|
||||
btnvideo() {
|
||||
const user = uni.getStorageSync('user')
|
||||
if(this.obj.userId == user.userId){
|
||||
if(this.obj.apiaryId == '' || this.obj.apiaryId == null){
|
||||
if (this.obj.userId == user.userId) {
|
||||
if (this.obj.apiaryId == '' || this.obj.apiaryId == null) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
|
@ -861,17 +893,19 @@
|
|||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url:'/page_Beehive/add_Beehive?tit=' + '修改蜂箱' + '&beehiveId=' + that.beehiveId
|
||||
url: '/page_Beehive/add_Beehive?tit=' + '修改蜂箱' +
|
||||
'&beehiveId=' + that.beehiveId
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj.apiaryName
|
||||
url: '/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj
|
||||
.apiaryName
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '您没有权限操作',
|
||||
icon: 'none',
|
||||
|
@ -890,11 +924,11 @@
|
|||
// 点击跳转预警
|
||||
btnyj() {
|
||||
const user = uni.getStorageSync('user')
|
||||
if(this.obj.userId == user.userId){
|
||||
if (this.obj.userId == user.userId) {
|
||||
uni.navigateTo({
|
||||
url: '/page_Beehive/Beehive_woring?apiaryId=' + this.beehiveId + '&tit=' + '蜂箱预警记录'
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '您没有权限操作',
|
||||
icon: 'none',
|
||||
|
@ -905,12 +939,12 @@
|
|||
// 点击编辑
|
||||
btnedit() {
|
||||
const user = uni.getStorageSync('user')
|
||||
if(this.obj.userId == user.userId){
|
||||
if (this.obj.userId == user.userId) {
|
||||
this.menuflag = false
|
||||
uni.navigateTo({
|
||||
url: '/page_Beehive/add_Beehive?tit=' + '修改蜂箱' + '&beehiveId=' + this.beehiveId
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '您没有权限操作',
|
||||
icon: 'none',
|
||||
|
@ -995,18 +1029,31 @@
|
|||
// 点击进行蜂箱操作
|
||||
btndow(num) {
|
||||
const user = uni.getStorageSync('user')
|
||||
if(this.obj.userId == user.userId){
|
||||
if (this.obj.userId == user.userId) {
|
||||
if (num == 1) {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11clear_weight@"
|
||||
})
|
||||
customData: "11clear_weight@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '去皮成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/clearWeight`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
@ -1024,16 +1071,29 @@
|
|||
})
|
||||
}
|
||||
} else if (num == 2) {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11beep11@" + 10
|
||||
})
|
||||
customData: "11beep11@" + 10
|
||||
})
|
||||
uni.showToast({
|
||||
title: '响铃成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/buzzer`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
@ -1052,9 +1112,10 @@
|
|||
}
|
||||
} else if (num == 3) {
|
||||
if (this.fskx == '关') {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '11fan100@'
|
||||
customData: '11fan100@'
|
||||
})
|
||||
this.fskx = '开'
|
||||
uni.showToast({
|
||||
|
@ -1063,6 +1124,18 @@
|
|||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=true`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (this.fskx == '关') {
|
||||
|
@ -1085,9 +1158,10 @@
|
|||
})
|
||||
}
|
||||
} else {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11fan0@"
|
||||
customData: "11fan0@"
|
||||
})
|
||||
this.fskx = '关'
|
||||
uni.showToast({
|
||||
|
@ -1096,6 +1170,18 @@
|
|||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=false`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (this.fskx == '关') {
|
||||
|
@ -1120,9 +1206,10 @@
|
|||
}
|
||||
} else if (num == 4) {
|
||||
if (this.jrkg == '关') {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11hot100@"
|
||||
customData: "11hot100@"
|
||||
})
|
||||
this.jrkg = '开'
|
||||
uni.showToast({
|
||||
|
@ -1131,6 +1218,18 @@
|
|||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=true`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (this.jrkg == '关') {
|
||||
|
@ -1153,9 +1252,10 @@
|
|||
})
|
||||
}
|
||||
} else {
|
||||
if(this.obj.onlineStatus == 0){
|
||||
if (this.obj.onlineStatus == 0) {
|
||||
if(this.ljcgflag == true){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11hot0@"
|
||||
customData: "11hot0@"
|
||||
})
|
||||
this.jrkg = '关'
|
||||
uni.showToast({
|
||||
|
@ -1164,6 +1264,18 @@
|
|||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '设备暂未连接,是否连接?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.Binddevice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=false`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (this.jrkg == '关') {
|
||||
|
@ -1187,7 +1299,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '您没有权限操作',
|
||||
icon: 'none',
|
||||
|
@ -2000,9 +2112,10 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#active{
|
||||
#active {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
@ -2012,13 +2125,16 @@
|
|||
background-color: #3D3D3D;
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #FAFDFD;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding: 38rpx;
|
||||
padding-bottom: 200rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.weather_info {
|
||||
position: fixed;
|
||||
padding: 30rpx 50rpx;
|
||||
|
@ -2029,11 +2145,13 @@
|
|||
background: #FFFFFF;
|
||||
z-index: 999 !important;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
|
||||
.echarts_box {
|
||||
margin-top: 24rpx;
|
||||
width: 646rpx;
|
||||
height: 344rpx;
|
||||
}
|
||||
|
||||
.weather_cont {
|
||||
margin-top: 42rpx;
|
||||
width: 100%;
|
||||
|
@ -2041,6 +2159,7 @@
|
|||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.weather_li {
|
||||
.data {
|
||||
text-align: center;
|
||||
|
@ -2049,6 +2168,7 @@
|
|||
font-size: 24rpx;
|
||||
color: #50565A;
|
||||
}
|
||||
|
||||
.week {
|
||||
margin-top: 4rpx;
|
||||
text-align: center;
|
||||
|
@ -2057,6 +2177,7 @@
|
|||
font-size: 24rpx;
|
||||
color: #50565A;
|
||||
}
|
||||
|
||||
.week_weather {
|
||||
margin-top: 14rpx;
|
||||
text-align: center;
|
||||
|
@ -2065,12 +2186,14 @@
|
|||
font-size: 28rpx;
|
||||
color: #50565A;
|
||||
}
|
||||
|
||||
.week_weather_img {
|
||||
margin-top: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72rpx;
|
||||
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
|
@ -2078,25 +2201,30 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.weather_info_tit {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
|
||||
.weather_add {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #50565A;
|
||||
}
|
||||
|
||||
.up_time {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
|
@ -2104,6 +2232,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.echarts_box {
|
||||
margin-top: 26rpx;
|
||||
padding: 18rpx 24rpx;
|
||||
|
@ -2111,14 +2240,17 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
|
||||
.echarts {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
height: 330rpx;
|
||||
}
|
||||
|
||||
.echarts_top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.top_left {
|
||||
width: 33.33%;
|
||||
display: flex;
|
||||
|
@ -2126,12 +2258,14 @@
|
|||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
image {
|
||||
margin-left: 10rpx;
|
||||
width: 25.03rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top_cont {
|
||||
width: 33.33%;
|
||||
text-align: center;
|
||||
|
@ -2139,10 +2273,12 @@
|
|||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.top_right {
|
||||
width: 33.33%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.txt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -2151,6 +2287,7 @@
|
|||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #4D4D4D;
|
||||
|
||||
.icon-xiangyou1 {
|
||||
margin-top: 4rpx;
|
||||
margin-left: 8rpx;
|
||||
|
@ -2159,6 +2296,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom_box {
|
||||
padding: 38rpx 20rpx;
|
||||
position: fixed;
|
||||
|
@ -2172,6 +2310,7 @@
|
|||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
.type_li {
|
||||
padding: 12rpx 26rpx;
|
||||
background: #FFF5D6;
|
||||
|
@ -2181,6 +2320,7 @@
|
|||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.act1 {
|
||||
background: #FFC107;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
|
@ -2188,22 +2328,26 @@
|
|||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.card_top {
|
||||
margin-top: 28rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.time {
|
||||
margin-left: 18rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.ele {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
|
@ -2212,6 +2356,7 @@
|
|||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
|
||||
image {
|
||||
margin-right: 12rpx;
|
||||
width: 46rpx;
|
||||
|
@ -2219,6 +2364,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setbox {
|
||||
margin: 0 auto;
|
||||
margin-top: 34rpx;
|
||||
|
@ -2226,6 +2372,7 @@
|
|||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.setcard {
|
||||
position: relative;
|
||||
padding: 14rpx 22rpx;
|
||||
|
@ -2234,33 +2381,39 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
.bot {
|
||||
margin-top: 14rpx;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.img {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
bottom: 24rpx;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
|
||||
image {
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
|
@ -2268,30 +2421,36 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.weather {
|
||||
margin-top: 12rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.weather_left {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.txt {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
|
||||
.weather_right {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -2299,22 +2458,27 @@
|
|||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #42A5F5;
|
||||
|
||||
.icon-xiangyou1 {}
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 8rpx;
|
||||
|
||||
image {
|
||||
margin-right: 8rpx;
|
||||
width: 20rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -2324,11 +2488,13 @@
|
|||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
.sets {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tongbu{
|
||||
|
||||
.tongbu {
|
||||
width: 130rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 4rpx;
|
||||
|
@ -2339,6 +2505,7 @@
|
|||
background-color: #FFC107;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.menu {
|
||||
padding: 20rpx;
|
||||
position: absolute;
|
||||
|
@ -2349,15 +2516,18 @@
|
|||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
z-index: 10;
|
||||
|
||||
.menu_li:first-child {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.menu_li {
|
||||
image {
|
||||
margin-right: 14rpx;
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
}
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
|
@ -2367,12 +2537,14 @@
|
|||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mapbox {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
|
@ -2381,6 +2553,7 @@
|
|||
height: 372rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.fxmask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -2397,11 +2570,13 @@
|
|||
box-sizing: border-box;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 180rpx;
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
left: 30rpx;
|
||||
|
||||
.txt {
|
||||
width: 180rpx;
|
||||
font-weight: 600;
|
||||
|
@ -2409,15 +2584,18 @@
|
|||
color: #FFC107;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
|
||||
image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.map {
|
||||
width: 672rpx;
|
||||
height: 372rpx;
|
||||
|
|
|
@ -21,18 +21,18 @@
|
|||
<view class="machao">
|
||||
总重量:{{(obj.totalWeight == undefined ? '--' : (Number(obj.totalWeight / 1000)).toFixed(2)) + 'kg'}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱内温度:{{obj.innerTemperature == undefined ? '--' : obj.innerTemperature + '°C'}} <input type="text" v-model="wdxsn" /> <view class="" @click="btnone">校准</view>
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱内湿度:{{obj.innerHumidity == undefined ? '--' : obj.innerHumidity + '%'}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱外温度:{{obj.outerTemperature == undefined ? '--' : obj.outerTemperature + '°C'}} <input type="text" v-model="wdxsw" /> <view class="" @click="btntwo">校准</view>
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱外湿度:{{obj.outerHumidity == undefined ? '--' : obj.outerHumidity + '%'}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱内温度:{{obj.innerTemperature == undefined ? '--' : obj.innerTemperature + '°C'}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
箱外温度:{{obj.outerTemperature == undefined ? '--' : obj.outerTemperature + '°C'}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
剩余电量:{{obj.surplusPowerPoint == undefined ? '--' : obj.surplusPowerPoint + '%'}}
|
||||
</view>
|
||||
|
@ -90,6 +90,8 @@
|
|||
powerStatus: '--',
|
||||
message: '定时器未启动',
|
||||
intervalId: null, // 用于存储定时器的ID
|
||||
wdxsn:'',
|
||||
wdxsw:''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
@ -127,6 +129,34 @@
|
|||
this.clearInterval();
|
||||
},
|
||||
methods: {
|
||||
// 内部温度
|
||||
btnone(){
|
||||
this.$u.put(`/app/beehive/admin/wdxsn?sn=${this.storeId}&wdxsn=${this.wdxsn}`).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.obj.innerTemperature = Number(this.obj.innerTemperature) + Number(this.wdxsn)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 外部温度
|
||||
btntwo(){
|
||||
this.$u.put(`/app/beehive/admin/wdxsw?sn=${this.storeId}&wdxsw=${this.wdxsw}`).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.obj.outerTemperature = Number(this.obj.outerTemperature) + Number(this.wdxsw)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
btnshang(){
|
||||
uni.reLaunch({
|
||||
url:'/page_user/luru'
|
||||
|
@ -360,6 +390,23 @@
|
|||
margin-top: 20rpx;
|
||||
text-align: left;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
input{
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
border: 1px solid #ce9e10;
|
||||
margin-left: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
view{
|
||||
margin-left: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #ce9e10;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
<button class="button" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" >
|
||||
授权登录
|
||||
</button>
|
||||
<view class="button" style="text-align: center;background-color: transparent;border: 1px solid #FFF5D6;margin-top: 80rpx;color: #FFF5D6;" @click="btnname">
|
||||
<!-- <view class="button" style="text-align: center;background-color: transparent;border: 1px solid #FFF5D6;margin-top: 80rpx;color: #FFF5D6;" @click="btnname">
|
||||
手机号登录
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="yinsi">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="checked" shape="circle" size="28"></u-checkbox>
|
||||
|
|
Loading…
Reference in New Issue
Block a user