This commit is contained in:
3321822538@qq.com 2024-07-08 18:16:58 +08:00
parent 7282664846
commit 883f6e41e8
12 changed files with 476 additions and 399 deletions

View File

@ -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;

View File

@ -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>
@ -414,14 +420,20 @@
this.getchartData6()
},
methods: {
//
btnec(num) {
uni.navigateTo({
url: '/page_Beehive/Beehive_ec?num=' + num + '&beehiveId=' + this.beehiveId
})
},
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() {
uni.navigateTo({
@ -471,7 +483,8 @@
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 => {
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)
}
@ -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, {
@ -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,6 +1899,7 @@
.sets {
position: relative;
.menu {
padding: 20rpx;
position: absolute;
@ -1894,15 +1910,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;
@ -1912,6 +1931,7 @@
align-items: center;
}
}
image {
width: 36rpx;
height: 36rpx;
@ -1927,6 +1947,7 @@
height: 372rpx;
border-radius: 20rpx;
overflow: hidden;
.fxmask {
position: absolute;
top: 0;
@ -1943,6 +1964,7 @@
box-sizing: border-box;
font-weight: 600;
}
.num {
width: 180rpx;
position: absolute;

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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",

View File

@ -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;

View File

@ -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>

View File

@ -302,7 +302,7 @@
},
btnpage() {
uni.switchTab({
url: '/pages/Beehive'
url: '/pages/Beehive?apiaryId=' + this.apiaryId
})
},
gettq() {

View File

@ -88,7 +88,7 @@
type: 3
},
{
title: '加',
title: '加',
type: 4
},
{
@ -131,7 +131,7 @@
this.getfc()
},
onShow() {
this.imglist = []
},
methods: {
//
@ -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,6 +475,7 @@
padding-right: 10rpx;
box-sizing: border-box;
position: relative;
.xx {
width: 40rpx;
height: 40rpx;
@ -477,6 +489,7 @@
top: -8rpx;
right: 0;
}
image {
height: 212rpx;
border-radius: 20rpx;

View File

@ -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;

View File

@ -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>

View File

@ -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)