aaa
This commit is contained in:
parent
7282664846
commit
883f6e41e8
|
@ -134,7 +134,8 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.cont {
|
||||
position: fixed;
|
||||
left: 60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 78rpx;
|
||||
width: 664rpx;
|
||||
height: 122rpx;
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<view class="tit">
|
||||
{{obj.name == undefined ? '--' : obj.name}}-{{obj.sn == undefined ? '--' : obj.sn}}
|
||||
<view class="sets">
|
||||
<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 @click="btnedit" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ"
|
||||
mode=""></image>
|
||||
<view class="menu" v-if="menuflag">
|
||||
<view class="menu_li" @click="btnedit">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uE84FLJ6hKTfgt6gxYMw" mode=""></image>
|
||||
|
@ -41,10 +43,12 @@
|
|||
<view class="weather">
|
||||
<view class="weather_left">
|
||||
<view class="txt">
|
||||
多云 {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
|
||||
多云 {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~
|
||||
{{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
|
||||
</view>
|
||||
<view class="txt" style="margin-left: 40rpx;">
|
||||
{{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay }} {{daily[0].windSpeedDay == undefined ? '--' : daily[0].windSpeedDay}}级
|
||||
{{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay }}
|
||||
{{daily[0].windSpeedDay == undefined ? '--' : daily[0].windSpeedDay}}级
|
||||
</view>
|
||||
</view>
|
||||
<view class="weather_right" @click="btngd">
|
||||
|
@ -113,7 +117,7 @@
|
|||
{{obj.surplusPower}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(1)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
温度
|
||||
|
@ -138,7 +142,7 @@
|
|||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(2)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
湿度
|
||||
|
@ -163,7 +167,7 @@
|
|||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(3)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
重量
|
||||
|
@ -188,7 +192,7 @@
|
|||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(4)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
进出量
|
||||
|
@ -213,7 +217,7 @@
|
|||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(5)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
频率
|
||||
|
@ -238,7 +242,7 @@
|
|||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<view class="echarts_box" @click="btnec(6)">
|
||||
<view class="echarts_top">
|
||||
<view class="top_left">
|
||||
二氧化碳
|
||||
|
@ -268,7 +272,8 @@
|
|||
<view class="weather_info_tit">
|
||||
未来7日天气预知
|
||||
</view>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uQK4q99a1Qb7LFD6O3Hw" mode="" @click="showtq = false"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uQK4q99a1Qb7LFD6O3Hw" mode=""
|
||||
@click="showtq = false"></image>
|
||||
</view>
|
||||
<view class="top" style="margin-top: 14rpx;">
|
||||
<view class="weather_add">
|
||||
|
@ -295,7 +300,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="echarts_box">
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas7" canvas-id="uni-ec-canvas" :ec="ec">
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas7" canvas-id="uni-ec-canvas"
|
||||
:ec="ec">
|
||||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -327,7 +333,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
menuflag:false,
|
||||
menuflag: false,
|
||||
ec: {
|
||||
lazyLoad: true
|
||||
},
|
||||
|
@ -352,33 +358,33 @@
|
|||
}],
|
||||
chartday: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
|
||||
chartData: [120, 200, 150, 80, 70, 110, 130],
|
||||
showtq:true,
|
||||
beehiveId:'',
|
||||
obj:{},
|
||||
daily:[],
|
||||
fskx:'关',
|
||||
jrkg:'关',
|
||||
chartData1:[],
|
||||
chartData2:[],
|
||||
chartData3:[],
|
||||
chartData4:[],
|
||||
chartData5:[],
|
||||
chartData6:[],
|
||||
chartData7:[],
|
||||
chartData8:[],
|
||||
showtq: true,
|
||||
beehiveId: '',
|
||||
obj: {},
|
||||
daily: [],
|
||||
fskx: '关',
|
||||
jrkg: '关',
|
||||
chartData1: [],
|
||||
chartData2: [],
|
||||
chartData3: [],
|
||||
chartData4: [],
|
||||
chartData5: [],
|
||||
chartData6: [],
|
||||
chartData7: [],
|
||||
chartData8: [],
|
||||
yeartime: {
|
||||
year: '',
|
||||
month: '',
|
||||
day:''
|
||||
day: ''
|
||||
},
|
||||
yeartimes: {
|
||||
year: '',
|
||||
month: '',
|
||||
day:''
|
||||
day: ''
|
||||
},
|
||||
daytime:'',
|
||||
daytime: '',
|
||||
covers: [],
|
||||
dtflag:false
|
||||
dtflag: false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -414,110 +420,117 @@
|
|||
this.getchartData6()
|
||||
},
|
||||
methods: {
|
||||
btnvideo(){
|
||||
// 跳转图标详情
|
||||
btnec(num) {
|
||||
uni.navigateTo({
|
||||
url:'/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj.apiaryName
|
||||
url: '/page_Beehive/Beehive_ec?num=' + num + '&beehiveId=' + this.beehiveId
|
||||
})
|
||||
},
|
||||
btngd(){
|
||||
btnvideo() {
|
||||
uni.navigateTo({
|
||||
url: '/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj.apiaryName
|
||||
})
|
||||
},
|
||||
btngd() {
|
||||
// this.gettq()
|
||||
this.showtq = true
|
||||
this.gettq()
|
||||
},
|
||||
btnyj(){
|
||||
btnyj() {
|
||||
uni.navigateTo({
|
||||
url:'/page_Beehive/Beehive_woring?apiaryId=' + this.beehiveId + '&tit=' + '蜂箱预警记录'
|
||||
url: '/page_Beehive/Beehive_woring?apiaryId=' + this.beehiveId + '&tit=' + '蜂箱预警记录'
|
||||
})
|
||||
},
|
||||
btnedit(){
|
||||
btnedit() {
|
||||
this.menuflag = false
|
||||
uni.navigateTo({
|
||||
url:'/page_Beehive/add_Beehive?tit=' + '修改蜂箱' + '&beehiveId=' + this.beehiveId
|
||||
url: '/page_Beehive/add_Beehive?tit=' + '修改蜂箱' + '&beehiveId=' + this.beehiveId
|
||||
})
|
||||
},
|
||||
btnfx(){
|
||||
btnfx() {
|
||||
this.menuflag = false
|
||||
uni.navigateTo({
|
||||
url:'/page_Beehive/share_Beehive'
|
||||
url: '/page_Beehive/share_Beehive'
|
||||
})
|
||||
},
|
||||
btnmenu(){
|
||||
if(this.menuflag == true){
|
||||
btnmenu() {
|
||||
if (this.menuflag == true) {
|
||||
this.menuflag = false
|
||||
}else{
|
||||
} else {
|
||||
this.menuflag = true
|
||||
}
|
||||
},
|
||||
// 温度图表
|
||||
getchartData1(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData1() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/tempN?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.chartData1 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 湿度图表
|
||||
getchartData2(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData2() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/hpN?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.chartData2 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重量图表
|
||||
getchartData3(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData3() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/weightDay?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
this.$u.get(`/farmer/report/weightDay?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
this.chartData3 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 进出量图表
|
||||
getchartData4(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData4() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/ioCount?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.chartData4 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 频率图表
|
||||
getchartData5(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData5() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/mic?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.chartData5 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 二氧化碳图表
|
||||
getchartData6(){
|
||||
let time = this.yeartime.year +'-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
getchartData6() {
|
||||
let time = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
|
||||
let times = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
|
||||
this.$u.get(`/farmer/report/co2?dateRange=${times},${time}&beehiveId=${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.chartData6 = res.data.map(item => item.value)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
btndow(num){
|
||||
if(num == 1){
|
||||
btndow(num) {
|
||||
if (num == 1) {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/clearWeight`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '去皮成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -525,15 +538,15 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else if(num == 2){
|
||||
} else if (num == 2) {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/buzzer`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '响铃成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -541,13 +554,13 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else if(num == 3){
|
||||
if(this.fskx == '关'){
|
||||
} else if (num == 3) {
|
||||
if (this.fskx == '关') {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=true`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(this.fskx == '关'){
|
||||
if (res.code == 200) {
|
||||
if (this.fskx == '关') {
|
||||
this.fskx = '开'
|
||||
}else{
|
||||
} else {
|
||||
this.fskx = '关'
|
||||
}
|
||||
uni.showToast({
|
||||
|
@ -555,7 +568,7 @@
|
|||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -563,12 +576,12 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/fan?open=false`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(this.fskx == '关'){
|
||||
if (res.code == 200) {
|
||||
if (this.fskx == '关') {
|
||||
this.fskx = '开'
|
||||
}else{
|
||||
} else {
|
||||
this.fskx = '关'
|
||||
}
|
||||
uni.showToast({
|
||||
|
@ -576,7 +589,7 @@
|
|||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -585,13 +598,13 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
}else if(num == 4){
|
||||
if(this.jrkg == '关'){
|
||||
} else if (num == 4) {
|
||||
if (this.jrkg == '关') {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=true`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(this.jrkg == '关'){
|
||||
if (res.code == 200) {
|
||||
if (this.jrkg == '关') {
|
||||
this.jrkg = '开'
|
||||
}else{
|
||||
} else {
|
||||
this.jrkg = '关'
|
||||
}
|
||||
uni.showToast({
|
||||
|
@ -599,7 +612,7 @@
|
|||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -607,12 +620,12 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.$u.put(`farm/beehive/iot/${this.beehiveId}/heat?open=false`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(this.jrkg == '关'){
|
||||
if (res.code == 200) {
|
||||
if (this.jrkg == '关') {
|
||||
this.jrkg = '开'
|
||||
}else{
|
||||
} else {
|
||||
this.jrkg = '关'
|
||||
}
|
||||
uni.showToast({
|
||||
|
@ -620,7 +633,7 @@
|
|||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -631,27 +644,27 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
getobj(){
|
||||
getobj() {
|
||||
this.$u.get(`/farm/beehive/${this.beehiveId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.obj = res.data
|
||||
this.latitude = res.data.lat
|
||||
this.longitude = res.data.lng
|
||||
if(res.data.enableFan == false){
|
||||
if (res.data.enableFan == false) {
|
||||
this.fskx = '关'
|
||||
}else{
|
||||
} else {
|
||||
this.fskx = '开'
|
||||
}
|
||||
if(res.data.enableHeat == false){
|
||||
if (res.data.enableHeat == false) {
|
||||
this.jrkg = '关'
|
||||
}else{
|
||||
} else {
|
||||
this.jrkg = '开'
|
||||
}
|
||||
if(res.data.lat == 0 && res.data.lng == 0){
|
||||
if (res.data.lat == 0 && res.data.lng == 0) {
|
||||
console.log('未找到位置信息');
|
||||
this.zoomSize = 5
|
||||
this.dtflag = true
|
||||
}else{
|
||||
} else {
|
||||
this.dtflag = false
|
||||
this.covers.push({
|
||||
id: parseFloat(res.data.beehiveId),
|
||||
|
@ -664,7 +677,7 @@
|
|||
}
|
||||
|
||||
this.gettq()
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -673,9 +686,9 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
gettq(){
|
||||
gettq() {
|
||||
this.$u.get(`weather/7d?location=${this.longitude},${this.latitude}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.daily = res.data.daily
|
||||
this.chartData7 = res.data.daily.map(item => item.tempMin)
|
||||
this.chartData8 = res.data.daily.map(item => item.tempMax)
|
||||
|
@ -1358,7 +1371,7 @@
|
|||
left: '4%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
top:'0%',
|
||||
top: '0%',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
|
@ -1402,8 +1415,7 @@
|
|||
show: false // 隐藏Y轴背景网格线
|
||||
}
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
dataZoom: [{
|
||||
show: true,
|
||||
type: 'inside',
|
||||
filterMode: 'none',
|
||||
|
@ -1471,7 +1483,8 @@
|
|||
formatter: '{c}°',
|
||||
color: '#42A5F5'
|
||||
},
|
||||
}]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
chart = echarts.init(canvas, null, {
|
||||
|
@ -1493,7 +1506,7 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask{
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
|
@ -1502,6 +1515,7 @@
|
|||
background-color: #3D3D3D;
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #FAFDFD;
|
||||
}
|
||||
|
@ -1512,6 +1526,7 @@
|
|||
padding: 38rpx;
|
||||
padding-bottom: 200rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.weather_info {
|
||||
position: fixed;
|
||||
padding: 30rpx 50rpx;
|
||||
|
@ -1884,25 +1899,29 @@
|
|||
|
||||
.sets {
|
||||
position: relative;
|
||||
.menu{
|
||||
|
||||
.menu {
|
||||
padding: 20rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
width: 218rpx;
|
||||
height: 234rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.15);
|
||||
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{
|
||||
|
||||
.menu_li:first-child {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.menu_li{
|
||||
image{
|
||||
|
||||
.menu_li {
|
||||
image {
|
||||
margin-right: 14rpx;
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
}
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
|
@ -1912,6 +1931,7 @@
|
|||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
|
@ -1927,7 +1947,8 @@
|
|||
height: 372rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
.fxmask{
|
||||
|
||||
.fxmask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
@ -1943,6 +1964,7 @@
|
|||
box-sizing: border-box;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 180rpx;
|
||||
position: absolute;
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
type: 3
|
||||
},
|
||||
{
|
||||
title: '加牌',
|
||||
title: '加脾',
|
||||
type: 4
|
||||
},
|
||||
{
|
||||
|
@ -391,13 +391,25 @@
|
|||
width: 750rpx;
|
||||
|
||||
.no_cont {
|
||||
margin: 152rpx auto 0;
|
||||
width: 432rpx;
|
||||
// margin: 152rpx auto 0;
|
||||
// width: 432rpx;
|
||||
padding: 16rpx;
|
||||
margin-left: -10rpx;
|
||||
width: 100%;
|
||||
height: 82vh;
|
||||
background: #fff;
|
||||
padding-left: 50rpx;
|
||||
padding-top: 200rpx;
|
||||
// overflow: scroll;
|
||||
padding-bottom: 200rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.img {
|
||||
padding-left: 50rpx;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 432rpx;
|
||||
height: 432rpx;
|
||||
width: 350rpx;
|
||||
height: 350rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
<view class="left_cont" :class="[
|
||||
index=== currentIndex? 'act1' : '',
|
||||
index + 1 === currentIndex? 'act2' : '',
|
||||
index- 1 === currentIndex? 'act3' : ''
|
||||
]">
|
||||
index- 1 === currentIndex? 'act3' : '']">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -177,7 +176,7 @@
|
|||
this.pageNum = 1
|
||||
this.rzlist = []
|
||||
if (this.title == '蜂箱预警记录') {
|
||||
this.yjtxt = '该蜂场其他蜂箱'
|
||||
this.yjtxt = '其他蜂箱'
|
||||
this.getfx()
|
||||
this.getyuj()
|
||||
} else {
|
||||
|
@ -401,13 +400,23 @@
|
|||
width: 750rpx;
|
||||
|
||||
.no_cont {
|
||||
margin: 152rpx auto 0;
|
||||
width: 432rpx;
|
||||
padding: 16rpx;
|
||||
margin-left: -10rpx;
|
||||
width: 100%;
|
||||
height: 82vh;
|
||||
background: #fff;
|
||||
padding-left: 50rpx;
|
||||
padding-top: 200rpx;
|
||||
// overflow: scroll;
|
||||
padding-bottom: 200rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.img {
|
||||
padding-left: 50rpx;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 432rpx;
|
||||
height: 432rpx;
|
||||
width: 350rpx;
|
||||
height: 350rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
// 蜂场
|
||||
{
|
||||
"path": "pages/Apiary",
|
||||
|
@ -202,6 +203,14 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path" : "Beehive_ec",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "share_Beehive",
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<view class="Apiary_card" v-for="(item,index) in list" :key="index" @click="btnapiaryxq(item.apiaryId)">
|
||||
<image :src="item.picture" mode=""></image>
|
||||
<view class="weather">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u6wWpgZOuId6JSX8LGmz" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u6wWpgZOuId6JSX8LGmz" mode="scaleToFill"></image>
|
||||
<view class="txt1">
|
||||
多云
|
||||
</view>
|
||||
|
@ -66,7 +66,7 @@
|
|||
total: '',
|
||||
pagesize: 10,
|
||||
logoflag: false,
|
||||
code: ''
|
||||
code: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -170,7 +170,7 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
|
||||
image {
|
||||
width: 674rpx;
|
||||
height: 360rpx;
|
||||
|
@ -221,7 +221,6 @@
|
|||
width: 674rpx;
|
||||
height: 70rpx;
|
||||
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
|
||||
|
||||
image {
|
||||
width: 44rpx;
|
||||
|
@ -250,7 +249,7 @@
|
|||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
width: 664rpx;
|
||||
|
||||
align-items: center;
|
||||
.search {
|
||||
|
||||
display: flex;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<view class="">
|
||||
|
||||
</view>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uLpiGDDDvBwk7hOhOtVp" mode="" v-if=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uLpiGDDDvBwk7hOhOtVp" mode="scaleToFill" v-if=""></image>
|
||||
|
||||
</view>
|
||||
<view class="imgbox" v-else>
|
||||
|
|
|
@ -302,7 +302,7 @@
|
|||
},
|
||||
btnpage() {
|
||||
uni.switchTab({
|
||||
url: '/pages/Beehive'
|
||||
url: '/pages/Beehive?apiaryId=' + this.apiaryId
|
||||
})
|
||||
},
|
||||
gettq() {
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
type: 3
|
||||
},
|
||||
{
|
||||
title: '加牌',
|
||||
title: '加脾',
|
||||
type: 4
|
||||
},
|
||||
{
|
||||
|
@ -118,7 +118,7 @@
|
|||
token: '',
|
||||
checked: false,
|
||||
id: '',
|
||||
arrimg:[]
|
||||
arrimg: []
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -131,7 +131,7 @@
|
|||
this.getfc()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.imglist = []
|
||||
},
|
||||
methods: {
|
||||
// 编辑
|
||||
|
@ -144,32 +144,32 @@
|
|||
this.apiaryName = res.data.beehiveName
|
||||
this.textValue = res.data.content
|
||||
this.checked = res.data.apiaryLog
|
||||
if(res.data.picture.length > 0){
|
||||
if (res.data.picture.length > 0) {
|
||||
this.imglist = res.data.picture.split(',')
|
||||
}else{
|
||||
} else {
|
||||
this.imglist = []
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
imgdel(indexToRemove){
|
||||
imgdel(indexToRemove) {
|
||||
this.imglist = this.imglist.filter((item, index) => index !== indexToRemove)
|
||||
},
|
||||
btnedit(){
|
||||
btnedit() {
|
||||
if (this.imglist) {
|
||||
let validUrls = this.imglist.filter(item => typeof item === 'string')
|
||||
this.arrimg = validUrls.join(',')
|
||||
}
|
||||
let data = {
|
||||
id:this.id,
|
||||
id: this.id,
|
||||
beehiveId: this.apiaryId,
|
||||
type: this.type,
|
||||
content: this.textValue,
|
||||
picture: this.arrimg,
|
||||
apiaryLog: this.checked
|
||||
}
|
||||
this.$u.put(`/farm/beehive/log`,data).then(res => {
|
||||
if(res.code == 200){
|
||||
this.$u.put(`/farm/beehive/log`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '编辑成功',
|
||||
icon: 'success',
|
||||
|
@ -178,7 +178,7 @@
|
|||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -194,9 +194,19 @@
|
|||
this.checked = e
|
||||
},
|
||||
btnadd() {
|
||||
if (this.imglist) {
|
||||
let validUrls = this.imglist.filter(item => typeof item === 'string')
|
||||
if (this.apiaryId == '') {
|
||||
uni.showToast({
|
||||
title: '请选择蜂箱',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else {
|
||||
if (this.imglist.length > 80) {
|
||||
let validUrls = this.imglist.filter(item => typeof item == 'string')
|
||||
this.imglist = validUrls.join(',')
|
||||
console.log(this.imglist.length);
|
||||
}else{
|
||||
this.imglist = this.imglist[0]
|
||||
}
|
||||
let data = {
|
||||
beehiveId: this.apiaryId,
|
||||
|
@ -223,6 +233,7 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
confirmmy(e) {
|
||||
|
@ -464,7 +475,8 @@
|
|||
padding-right: 10rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.xx{
|
||||
|
||||
.xx {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
|
@ -477,6 +489,7 @@
|
|||
top: -8rpx;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
height: 212rpx;
|
||||
border-radius: 20rpx;
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="tabbar">
|
||||
<view class="cont" :id="indextab == index ? 'active' : ''" v-for="(item,index) in miyuancolumns" :key="index" @click="btntab(index,item)">
|
||||
{{item.label}}
|
||||
<view class="cont" v-for="(item,index) in miyuancolumns" :key="index" @click="btntab(index,item)">
|
||||
{{item.label}} <text v-if="item.count != '-1'">({{item.count}})</text>
|
||||
<view class="gl" :id="indextab == index ? 'active' : ''"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -191,7 +192,7 @@
|
|||
code: '',
|
||||
swiperHeight:554,
|
||||
curtitidx:0,
|
||||
miyuancolumns: [{label:'全部'}],
|
||||
miyuancolumns: [{label:'全部',count:'a'}],
|
||||
pagesum: 1,
|
||||
pagesize: 99,
|
||||
pagesizes: 5,
|
||||
|
@ -203,9 +204,10 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.apiaryId = this.miyuancolumns[0].value
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.indextab = 0
|
||||
this.pagesum = 1
|
||||
// this.fxlist = []
|
||||
this.getmiyuancolumns()
|
||||
|
@ -251,23 +253,21 @@
|
|||
this.logoflag = true
|
||||
}else{
|
||||
this.logoflag = false
|
||||
// let uniqueIds = new Set(this.fxlist.map(item => item.sn))
|
||||
// let uniqueRows = res.rows.filter(row => !uniqueIds.has(row.sn))
|
||||
// uniqueRows.forEach(row => uniqueIds.add(row.sn))
|
||||
// this.fxlist = this.fxlist.concat(uniqueRows)
|
||||
let oldSnSet = new Set(this.fxlist.map(item => item.sn));
|
||||
let result = [];
|
||||
|
||||
res.rows.forEach(row => {
|
||||
if (oldSnSet.has(row.sn)) {
|
||||
result.push(row)
|
||||
oldSnSet.delete(row.sn);
|
||||
oldSnSet.delete(row.sn)
|
||||
} else {
|
||||
result.push(row);
|
||||
result.push(row)
|
||||
}
|
||||
})
|
||||
this.fxlist = this.fxlist.filter(item => oldSnSet.has(item.sn));
|
||||
});
|
||||
result.sort((a, b) => b.onlineStatus - a.onlineStatus) // 1 在前,0 在后
|
||||
this.fxlist = result.filter(row => oldSnSet.has(row.sn))
|
||||
this.fxlist = result;
|
||||
this.pagesum++
|
||||
this.pagesum++;
|
||||
}
|
||||
}else{
|
||||
// uni.showToast({
|
||||
|
@ -298,9 +298,10 @@
|
|||
if (res.code === 200) {
|
||||
this.miyuancolumns = res.rows.map(item => ({
|
||||
value: item.apiaryId,
|
||||
label: item.name
|
||||
label: item.name,
|
||||
count:item.beehiveCount
|
||||
}))
|
||||
this.miyuancolumns.unshift({ label: '全部',value:''})
|
||||
this.miyuancolumns.unshift({ label: '全部',value:'',count:'-1'})
|
||||
this.apiaryId = this.miyuancolumns[0].value
|
||||
this.logoflag = false
|
||||
this.getlist()
|
||||
|
@ -334,6 +335,7 @@
|
|||
border-bottom: 3px solid #FFC107;
|
||||
font-weight: 600;
|
||||
font-size: 40rpx;
|
||||
display: block !important;
|
||||
}
|
||||
#status{
|
||||
background-color: #808080;
|
||||
|
@ -477,6 +479,18 @@
|
|||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
position: relative;
|
||||
.gl{
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
background: #FFC107;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 2rpx;
|
||||
right: -10rpx;
|
||||
opacity: .7;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -487,7 +501,7 @@
|
|||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
width: 664rpx;
|
||||
|
||||
align-items: center;
|
||||
.search {
|
||||
|
||||
display: flex;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
</view>
|
||||
<view class="txt">
|
||||
<view class="iconfont icon-xiangyou1"></view>
|
||||
<!-- <view class="iconfont icon-xiangyou1"></view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -89,7 +89,7 @@
|
|||
|
||||
</view>
|
||||
<view class="txt">
|
||||
<view class="iconfont icon-xiangyou1"></view>
|
||||
<!-- <view class="iconfont icon-xiangyou1"></view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<view class="fclt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ukbyhyrDcp3VzgyeJo2G" mode=""></image>
|
||||
<view class="fctit">{{fxobj.name == undefined ? '--' : fxobj.name}}</view>
|
||||
<view class="fcry">已认养</view>
|
||||
<!-- <view class="fcry">已认养</view> -->
|
||||
</view>
|
||||
<view class="fcrt" @click="fxslag = false">
|
||||
x
|
||||
|
@ -80,7 +80,7 @@
|
|||
<view class="fclt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uB2k1NNeN2QUuSZIAf5r" mode=""></image>
|
||||
<view class="fctit">{{fcobj.name == undefined ? '--' : fcobj.name}}</view>
|
||||
<view class="fcry">已认养</view>
|
||||
<!-- <view class="fcry">已认养</view> -->
|
||||
</view>
|
||||
<view class="fcrt" @click="fcflag = false">
|
||||
x
|
||||
|
@ -112,7 +112,7 @@
|
|||
<view class="">当前湿度:{{nowtqobj.humidity == undefined ? '--' : nowtqobj.humidity}}%</view>
|
||||
</view>
|
||||
<view class="fcli">
|
||||
<view class="">在线数:{{fcobj.beehiveCount == undefined ? '--' : fcobj.beehiveCount}}箱</view>
|
||||
<view class="">总蜂箱数:{{fcobj.beehiveCount == undefined ? '--' : fcobj.beehiveCount}}箱</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btncha" @click="btnpage(2)">
|
||||
|
@ -163,8 +163,6 @@
|
|||
onShow() {
|
||||
this.getMyLocation()
|
||||
this.getMyLocations()
|
||||
|
||||
|
||||
},
|
||||
onReady() {
|
||||
this.mapContext = uni.createMapContext('map', this)
|
||||
|
|
Loading…
Reference in New Issue
Block a user