aaa
This commit is contained in:
parent
85f3246a19
commit
ca38c78719
|
@ -60,10 +60,18 @@
|
||||||
<image class=" image_7 image_13" src="../../static/蜂箱-蜂场预警.png"
|
<image class=" image_7 image_13" src="../../static/蜂箱-蜂场预警.png"
|
||||||
v-if="item.warning_attendance" />
|
v-if="item.warning_attendance" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view @click.stop="HiddenClick(item)" class="dianbox">
|
<view class="" style="display: flex;">
|
||||||
<image class="image_14" src="/static/16994974061914098024.png" />
|
<view class="shuaxin" @click="btnsx(item)">
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uQyHxbK49U3S5f4uLU6m"
|
||||||
|
mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view @click.stop="HiddenClick(item)" class="dianbox">
|
||||||
|
<image class="image_14" src="/static/16994974061914098024.png" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 气泡框 -->
|
<!-- 气泡框 -->
|
||||||
<view v-if="item.ShowHidden">
|
<view v-if="item.ShowHidden">
|
||||||
|
@ -86,22 +94,25 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 向上弹窗 -->
|
<!-- 向上弹窗 -->
|
||||||
|
|
||||||
<u-popup :closeOnClickOverlay="false" :round="30" :show="flage" mode="center" :safeAreaInsetBottom="true" overlayOpacity="0.1">
|
<u-popup :closeOnClickOverlay="false" :round="30" :show="flage" mode="center"
|
||||||
|
:safeAreaInsetBottom="true" overlayOpacity="0.1">
|
||||||
<view class="popup-box">
|
<view class="popup-box">
|
||||||
<view class="popup-top-text popup-boder-m">
|
<view class="popup-top-text popup-boder-m">
|
||||||
<view>重新命名</view>
|
<view>重新命名</view>
|
||||||
<view @click="flageupdate">X</view>
|
<view @click="flageupdate">X</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="popup-boder-m">
|
<view class="popup-boder-m">
|
||||||
<u--input shape="circle" placeholder="请输入内容" border="surround" v-model="form.inputvalue" ></u--input>
|
<u--input shape="circle" placeholder="请输入内容" border="surround"
|
||||||
|
v-model="form.inputvalue"></u--input>
|
||||||
</view>
|
</view>
|
||||||
<view class="popup-button-b" >
|
<view class="popup-button-b">
|
||||||
<u-button @click="confirmname" color="#23693f" shape="circle" type="primary" text="确 定"></u-button>
|
<u-button @click="confirmname" color="#23693f" shape="circle" type="primary"
|
||||||
|
text="确 定"></u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- <view class="xiugainame" v-if="flage">
|
<!-- <view class="xiugainame" v-if="flage">
|
||||||
<view class="mm">
|
<view class="mm">
|
||||||
<text>重新命名</text> <text @click="flageupdate">X</text>
|
<text>重新命名</text> <text @click="flageupdate">X</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -114,11 +125,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="d-baseline">
|
<view class="d-baseline" style="display: flex;">
|
||||||
<text class="font_4">{{item.qrcode}}</text>
|
<text class="font_4" style="padding-top: 20rpx;">{{item.qrcode}}</text>
|
||||||
<text class="font_4 text_6">丨 {{item.update_time}}</text>
|
<text class="font_4 text_6" style="padding-top: 20rpx;">丨 {{item.update_time}}</text>
|
||||||
<text class="font_4 text_7">丨</text>
|
<text class="font_4 text_7" style="padding-top: 20rpx;">丨</text>
|
||||||
<text class="font_4 text_8">{{item.address}}</text>
|
<text class="font_4 text_8" style="padding-top: 20rpx;">{{item.address}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="felx-99">
|
<view class="felx-99">
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
|
@ -126,7 +138,9 @@
|
||||||
<view class="flex-taxt">
|
<view class="flex-taxt">
|
||||||
<image class=" image_15" src="../../static/重量.png" />
|
<image class=" image_15" src="../../static/重量.png" />
|
||||||
<text class="font_5 text_9 text-l">重量</text>
|
<text class="font_5 text_9 text-l">重量</text>
|
||||||
<text class=" font_5 text_13">{{item.weight_day_text}}</text>
|
<text class=" font_5 text_13"
|
||||||
|
v-if="item.weight_day_text">{{item.weight_day_text}}</text>
|
||||||
|
<text class=" font_5 text_13" v-else>{{item.weight_day}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-taxt">
|
<view class="flex-taxt">
|
||||||
<image class=" image_16" src="../../static/蜂箱-温度.png" />
|
<image class=" image_16" src="../../static/蜂箱-温度.png" />
|
||||||
|
@ -145,7 +159,9 @@
|
||||||
<view class="flex-taxt">
|
<view class="flex-taxt">
|
||||||
<image class=" image_15" src="../../static/蜂箱-出勤.png" />
|
<image class=" image_15" src="../../static/蜂箱-出勤.png" />
|
||||||
<text class="font_5 text_9 text-l">出勤</text>
|
<text class="font_5 text_9 text-l">出勤</text>
|
||||||
<text class=" font_5 text_13">{{item.attendance_day_text}}</text>
|
<text class=" font_5 text_13"
|
||||||
|
v-if="item.attendance_day_text">{{item.attendance_day_text}}</text>
|
||||||
|
<text class=" font_5 text_13" v-else>{{item.attendance_day}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-taxt">
|
<view class="flex-taxt">
|
||||||
<image class=" image_16" src="../../static/蜂箱-温度.png" />
|
<image class=" image_16" src="../../static/蜂箱-温度.png" />
|
||||||
|
@ -224,6 +240,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 加载状态 -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <view class="maskgun" v-if="maskgun"></view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -233,6 +254,8 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
maskgun: false,
|
||||||
curren: '',
|
curren: '',
|
||||||
qrcodevalue: '', // 搜索框
|
qrcodevalue: '', // 搜索框
|
||||||
fengzhongcolumns: [
|
fengzhongcolumns: [
|
||||||
|
@ -271,16 +294,16 @@
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true,
|
mask: true,
|
||||||
success: function () {
|
success: function() {
|
||||||
// 显示成功的回调
|
// 显示成功的回调
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.loadData();
|
this.loadData();
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
uni.removeStorageSync('targetId');
|
uni.removeStorageSync('targetId');
|
||||||
|
@ -289,7 +312,9 @@
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
// this.listData = []
|
// this.listData = []
|
||||||
this.loadData();
|
setTimeout(() => {
|
||||||
|
this.loadData();
|
||||||
|
}, 2000)
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
id(newId, oldId) {
|
id(newId, oldId) {
|
||||||
|
@ -298,13 +323,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
backToTop() {
|
backToTop() {
|
||||||
// console.log(1);
|
uni.pageScrollTo({
|
||||||
uni.pageScrollTo({
|
scrollTop: 0, // 滚动到页面的顶部
|
||||||
scrollTop: 0, // 滚动到页面的顶部
|
duration: 1 // 滚动动画的持续时间,单位 ms
|
||||||
duration: 1 // 滚动动画的持续时间,单位 ms
|
});
|
||||||
});
|
},
|
||||||
} ,
|
|
||||||
async loadData() {
|
async loadData() {
|
||||||
// 先执行获取数据的方法
|
// 先执行获取数据的方法
|
||||||
await this.getfengchangList();
|
await this.getfengchangList();
|
||||||
|
@ -342,7 +366,21 @@
|
||||||
if (this.switchk) {
|
if (this.switchk) {
|
||||||
this.switchk = false
|
this.switchk = false
|
||||||
request.post('/api/beehive/fanSwitch/' + item, {}).then(res => {
|
request.post('/api/beehive/fanSwitch/' + item, {}).then(res => {
|
||||||
this.refresh()
|
// this.refresh()
|
||||||
|
request.get('/api/beehive/detail/' + item, {}).then(res => {
|
||||||
|
const newData = res.data.data; // 提取新数据
|
||||||
|
// 查找具有相同id的项
|
||||||
|
const existingItem = this.listData.find(item => item.id === newData.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 如果找到,替换原数据
|
||||||
|
const index = this.listData.indexOf(existingItem);
|
||||||
|
this.listData.splice(index, 1, newData); // 删除旧数据并插入新数据
|
||||||
|
} else {
|
||||||
|
// 如果没有找到,添加到数组中
|
||||||
|
this.listData.push(newData);
|
||||||
|
}
|
||||||
|
// console.log(this.listData, 101010);
|
||||||
|
})
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
@ -354,6 +392,48 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 点击刷新
|
||||||
|
btnsx(item) {
|
||||||
|
if (item.status_text == '在线') {
|
||||||
|
uni.showLoading({
|
||||||
|
mask: false
|
||||||
|
})
|
||||||
|
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||||
|
const newData = res.data.data;
|
||||||
|
const existingItem = this.listData.find(item => item.id === newData.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 如果找到,替换原数据
|
||||||
|
const index = this.listData.indexOf(existingItem);
|
||||||
|
this.listData.splice(index, 1, newData);
|
||||||
|
} else {
|
||||||
|
this.listData.push(newData);
|
||||||
|
}
|
||||||
|
// uni.hideLoading()
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
setTimeout(() => {
|
||||||
|
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||||
|
const newData = res.data.data;
|
||||||
|
const existingItem = this.listData.find(item => item.id === newData
|
||||||
|
.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 如果找到,替换原数据
|
||||||
|
const index = this.listData.indexOf(existingItem);
|
||||||
|
this.listData.splice(index, 1, newData);
|
||||||
|
} else {
|
||||||
|
this.listData.push(newData);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}, 4000)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: '设备不在线',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
fenlampbuts(item) {
|
fenlampbuts(item) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
|
@ -376,7 +456,21 @@
|
||||||
this.switchk = false
|
this.switchk = false
|
||||||
request.post('/api/beehive/heatSwitch/' + item, {}).then(res => {
|
request.post('/api/beehive/heatSwitch/' + item, {}).then(res => {
|
||||||
// this.getfengchangList()
|
// this.getfengchangList()
|
||||||
this.refresh()
|
// this.refresh()
|
||||||
|
request.get('/api/beehive/detail/' + item, {}).then(res => {
|
||||||
|
const newData = res.data.data; // 提取新数据
|
||||||
|
// 查找具有相同id的项
|
||||||
|
const existingItem = this.listData.find(item => item.id === newData.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 如果找到,替换原数据
|
||||||
|
const index = this.listData.indexOf(existingItem);
|
||||||
|
this.listData.splice(index, 1, newData); // 删除旧数据并插入新数据
|
||||||
|
} else {
|
||||||
|
// 如果没有找到,添加到数组中
|
||||||
|
this.listData.push(newData);
|
||||||
|
}
|
||||||
|
console.log(this.listData, 101010);
|
||||||
|
})
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
@ -385,10 +479,13 @@
|
||||||
})
|
})
|
||||||
this.switchk = true
|
this.switchk = true
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.maskgun = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
warmbuts(item) {
|
warmbuts(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.maskgun = true
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '操作中',
|
title: '操作中',
|
||||||
mask: true
|
mask: true
|
||||||
|
@ -405,6 +502,7 @@
|
||||||
this.warmbut(item.id)
|
this.warmbut(item.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
switch1Change: function(e) {
|
switch1Change: function(e) {
|
||||||
e.detail.value = false
|
e.detail.value = false
|
||||||
},
|
},
|
||||||
|
@ -484,7 +582,23 @@
|
||||||
})
|
})
|
||||||
request.post('/api/beehive/removePeel/' + item.id, {}).then(res => {
|
request.post('/api/beehive/removePeel/' + item.id, {}).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
that.loadData()
|
// that.loadData()
|
||||||
|
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||||
|
const newData = res.data.data; // 提取新数据
|
||||||
|
// 查找具有相同id的项
|
||||||
|
const existingItem = this.listData.find(item => item.id ===
|
||||||
|
newData.id);
|
||||||
|
if (existingItem) {
|
||||||
|
// 如果找到,替换原数据
|
||||||
|
const index = this.listData.indexOf(existingItem);
|
||||||
|
this.listData.splice(index, 1,
|
||||||
|
newData); // 删除旧数据并插入新数据
|
||||||
|
} else {
|
||||||
|
// 如果没有找到,添加到数组中
|
||||||
|
this.listData.push(newData);
|
||||||
|
}
|
||||||
|
console.log(this.listData, 101010);
|
||||||
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: res.data.msg
|
title: res.data.msg
|
||||||
|
@ -614,7 +728,7 @@
|
||||||
qrcode
|
qrcode
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
wx.setStorageSync('user_id', res.data.data[0].user_id);
|
wx.setStorageSync('user_id', res.data.data[0].user_id);
|
||||||
this.listData = JSON.parse(JSON.stringify(res.data.data))
|
this.listData = JSON.parse(JSON.stringify(res.data.data))
|
||||||
wx.pageScrollTo({
|
wx.pageScrollTo({
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
|
@ -677,10 +791,32 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
/deep/ .u-popup__content{
|
/deep/ .u-popup__content {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
}
|
}
|
||||||
.maskname{
|
|
||||||
|
.shuaxin {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.maskgun {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
position: fixed;
|
||||||
|
background-color: #ccc;
|
||||||
|
opacity: .5;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.maskname {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -690,7 +826,8 @@
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
opacity: .1;
|
opacity: .1;
|
||||||
}
|
}
|
||||||
.xiugainame{
|
|
||||||
|
.xiugainame {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 564rpx;
|
height: 564rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
@ -701,12 +838,14 @@
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
padding: 50rpx;
|
padding: 50rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.mm{
|
|
||||||
|
.mm {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
input{
|
|
||||||
|
input {
|
||||||
margin-top: 90rpx;
|
margin-top: 90rpx;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -721,7 +860,8 @@
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
margin-top: 270rpx;
|
margin-top: 270rpx;
|
||||||
|
@ -733,6 +873,7 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
z-index: 10074;
|
z-index: 10074;
|
||||||
width: 224rpx;
|
width: 224rpx;
|
||||||
|
@ -819,6 +960,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 气泡框的样式
|
// 气泡框的样式
|
||||||
|
@ -1075,9 +1217,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.image_14 {
|
.image_14 {
|
||||||
margin-top: 20rpx;
|
margin-top: 10rpx;
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 13rpx;
|
height: 13rpx;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view_2 {
|
.view_2 {
|
||||||
|
@ -1085,7 +1228,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.font_4 {
|
.font_4 {
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
font-family: 微软雅黑;
|
font-family: 微软雅黑;
|
||||||
line-height: 15rpx;
|
line-height: 15rpx;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<text class="self-start text_5">24H</text>
|
<text class="self-start text_5">24H</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 22 -->
|
<!-- 22 -->
|
||||||
<text class="self-start text_3 text_4 ml-19">{{formData.warning_count}}</text>
|
<text class="self-start text_3 text_4 ml-19">{{formData.warning_count == undefined ? 0 : formData.warning_count}}</text>
|
||||||
<!-- 左上的箭头 -->
|
<!-- 左上的箭头 -->
|
||||||
<image class="ml-28 self-start image_8 image_9" src="../../static/shouye-you.png" />
|
<image class="ml-28 self-start image_8 image_9" src="../../static/shouye-you.png" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -36,13 +36,13 @@
|
||||||
<text class="font_3 text_8 padding-top-bootm">电量不足</text>
|
<text class="font_3 text_8 padding-top-bootm">电量不足</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.battery_low_count < 1 ? 'color-text-shu1' : formData.battery_low_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.battery_low_count < 1 ? 'color-text-shu1' : formData.battery_low_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="font_5 text_12">{{formData.battery_low_count}}</text>
|
class="font_5 text_12">{{formData.battery_low_count == undefined ? 0 : formData.battery_low_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row group_5 tac-dainlaing">
|
<view class="flex-row group_5 tac-dainlaing">
|
||||||
<text class="ml-30 font_3 text_9 padding-top-bootm">震动异常</text>
|
<text class="ml-30 font_3 text_9 padding-top-bootm">震动异常</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.shake_count < 1 ? 'color-text-shu1' : formData.shake_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.shake_count < 1 ? 'color-text-shu1' : formData.shake_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="ml-68 font_5">{{formData.shake_count}}</text>
|
class="ml-68 font_5">{{formData.shake_count == undefined ? 0 : formData.shake_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -51,13 +51,13 @@
|
||||||
<text class="font_3 text_13 padding-top-bootm">出勤异常</text>
|
<text class="font_3 text_13 padding-top-bootm">出勤异常</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.work_count < 1 ? 'color-text-shu1' : formData.work_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.work_count < 1 ? 'color-text-shu1' : formData.work_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="font_5 ml-67">{{formData.work_count}}</text>
|
class="font_5 ml-67">{{formData.work_count== undefined ? 0 :formData.work_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row group_5 tac-dainlaing">
|
<view class="flex-row group_5 tac-dainlaing">
|
||||||
<text class="font_3 ml-31 padding-top-bootm">重量异常</text>
|
<text class="font_3 ml-31 padding-top-bootm">重量异常</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.weight_count < 1 ? 'color-text-shu1' : formData.weight_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.weight_count < 1 ? 'color-text-shu1' : formData.weight_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="font_5 text_14">{{formData.weight_count}}</text>
|
class="font_5 text_14">{{formData.weight_count== undefined ? 0 :formData.weight_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -66,13 +66,13 @@
|
||||||
<text class="font_3 text_16 padding-top-bootm">温度异常</text>
|
<text class="font_3 text_16 padding-top-bootm">温度异常</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.temperature_count < 1 ? 'color-text-shu1' : formData.temperature_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.temperature_count < 1 ? 'color-text-shu1' : formData.temperature_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="font_5 text_19">{{formData.temperature_count}}</text>
|
class="font_5 text_19">{{formData.temperature_count== undefined ? 0 :formData.temperature_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row group_7 tac-dainlaing">
|
<view class="flex-row group_7 tac-dainlaing">
|
||||||
<text class="font_3 text_17 ml-31 padding-top-bootm">湿度异常</text>
|
<text class="font_3 text_17 ml-31 padding-top-bootm">湿度异常</text>
|
||||||
<text
|
<text
|
||||||
:id="formData.humidity_count < 1 ? 'color-text-shu1' : formData.humidity_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
:id="formData.humidity_count < 1 ? 'color-text-shu1' : formData.humidity_count < 5 ? 'color-text-shu2' : 'color-text-shu3'"
|
||||||
class="font_5 text_20 ml-61">{{formData.humidity_count}}</text>
|
class="font_5 text_20 ml-61">{{formData.humidity_count== undefined? 0 :formData.humidity_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<view class="top-jinbaoqi" @click="topage(1)">
|
<view class="top-jinbaoqi" @click="topage(1)">
|
||||||
<view class="mt-8 flex-row tac-dainlaing">
|
<view class="mt-8 flex-row tac-dainlaing">
|
||||||
<text class="font text_6 padding-top-bootm">蜂箱数量</text>
|
<text class="font text_6 padding-top-bootm">蜂箱数量</text>
|
||||||
<text class="self-center font_4 text_3 text_10">{{formData.beehive_count}}</text>
|
<text class="self-center font_4 text_3 text_10">{{formData.beehive_count==undefined?0:formData.beehive_count}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-8 flex-row tac-dainlaing">
|
<view class="mt-8 flex-row tac-dainlaing">
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<view class="flex-row items-center tac-dainlaing">
|
<view class="flex-row items-center tac-dainlaing">
|
||||||
<image class="image_12" src="../../static/shouye-fangchang-shuliang.png" />
|
<image class="image_12" src="../../static/shouye-fangchang-shuliang.png" />
|
||||||
<text class="font padding-top-bootm">蜂场数量</text>
|
<text class="font padding-top-bootm">蜂场数量</text>
|
||||||
<text class="font_4 text_3 text_10 padding-top-bootm">{{formData.apiary_count}}</text>
|
<text class="font_4 text_3 text_10 padding-top-bootm">{{formData.apiary_count==undefined?0:formData.apiary_count}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 右 -->
|
<!-- 右 -->
|
||||||
<view class="ml-18 flex-col items-end">
|
<view class="ml-18 flex-col items-end">
|
||||||
|
@ -123,19 +123,19 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[0]">
|
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[0]">
|
||||||
<view>{{formData.apiary_data[0].name}}</view>
|
<view>{{formData.apiary_data[0].name==undefined?0:formData.apiary_data[0].name}}</view>
|
||||||
<view class="taxt-wen">:</view>
|
<view class="taxt-wen">:</view>
|
||||||
<view class="taxt-wen-1">{{formData.apiary_data[0].count}}</view>
|
<view class="taxt-wen-1">{{formData.apiary_data[0].count==undefined?0:formData.apiary_data[0].count}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[1]">
|
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[1]">
|
||||||
<view>{{formData.apiary_data[1].name}}</view>
|
<view>{{formData.apiary_data[1].name==undefined?0:formData.apiary_data[1].name}}</view>
|
||||||
<view class="taxt-wen">:</view>
|
<view class="taxt-wen">:</view>
|
||||||
<view class="taxt-wen-1">{{formData.apiary_data[1].count}}</view>
|
<view class="taxt-wen-1">{{formData.apiary_data[1].count==undefined?0:formData.apiary_data[1].count}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[2]">
|
<view class="font_2 text_15 mt-13 hg-num" v-if="formData.apiary_data[2]">
|
||||||
<view>{{formData.apiary_data[2].name}}</view>
|
<view>{{formData.apiary_data[2].name==undefined?0:formData.apiary_data[2].name}}</view>
|
||||||
<view class="taxt-wen">:</view>
|
<view class="taxt-wen">:</view>
|
||||||
<view class="taxt-wen-1">{{formData.apiary_data[2].count}}</view>
|
<view class="taxt-wen-1">{{formData.apiary_data[2].count==undefined?0:formData.apiary_data[2].count}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -145,8 +145,8 @@
|
||||||
|
|
||||||
<!-- 卡片图表 -->
|
<!-- 卡片图表 -->
|
||||||
<!-- 柱状 -->
|
<!-- 柱状 -->
|
||||||
<view @click="chuqingbianhua" class="xin-box" style="margin-top: 20rpx;">
|
<view class="xin-box" style="margin-top: 20rpx;">
|
||||||
<view class="xin-box-title">
|
<view class="xin-box-title" @click="chuqingbianhua" v-if="logoflag">
|
||||||
<view style="flex: 1;display: flex;align-items: center;">
|
<view style="flex: 1;display: flex;align-items: center;">
|
||||||
<image style="width: 40rpx;height: 40rpx;"
|
<image style="width: 40rpx;height: 40rpx;"
|
||||||
src="../../static/e5e18447349367492c81f64ccec7ebcb.png"></image>
|
src="../../static/e5e18447349367492c81f64ccec7ebcb.png"></image>
|
||||||
|
@ -154,14 +154,14 @@
|
||||||
</view>
|
</view>
|
||||||
<image class="image_8 image_13 padding-top-bootm" src="../../static/shouye-you.png" />
|
<image class="image_8 image_13 padding-top-bootm" src="../../static/shouye-you.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="charts-box">
|
<view class="charts-box" >
|
||||||
<qiun-data-charts type="column" :opts="optsZhu" :chartData="chartDataZhu" :errorShow="false"
|
<qiun-data-charts v-if="logoflag" type="column" :opts="optsZhu" :chartData="chartDataZhu" :errorShow="false" :errorReload="false" :animation="false" :tooltipShow="false" :tapLegend="false" />
|
||||||
:errorReload="false" :animation="false" :tooltipShow="false" :tapLegend="false" />
|
<view class="" v-else style="color: #ccc;font-size: 36rpx;width: 100%;text-align: center;margin-top: 50rpx;">暂无蜂箱...</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 折线 -->
|
<!-- 折线 -->
|
||||||
<view @click="zhongliangbianhua" class="xin-box">
|
<view class="xin-box" v-if="logoflag">
|
||||||
<view class="xin-box-title">
|
<view class="xin-box-title" @click="zhongliangbianhua" v-if="logoflag">
|
||||||
<view style="flex: 1;display: flex;align-items: center;">
|
<view style="flex: 1;display: flex;align-items: center;">
|
||||||
<image style="width: 40rpx;height: 40rpx;" src="../../static/kg.png"></image>
|
<image style="width: 40rpx;height: 40rpx;" src="../../static/kg.png"></image>
|
||||||
<text style="margin-left: 10rpx;">近7天蜂箱总重量变化(KG)</text>
|
<text style="margin-left: 10rpx;">近7天蜂箱总重量变化(KG)</text>
|
||||||
|
@ -169,12 +169,10 @@
|
||||||
<image class="image_8 image_13 padding-top-bootm" src="../../static/shouye-you.png" />
|
<image class="image_8 image_13 padding-top-bootm" src="../../static/shouye-you.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="line" :opts="optsZhe" :chartData="chartDataZhe" :animation="false"
|
<qiun-data-charts v-if="logoflag" type="line" :opts="optsZhe" :chartData="chartDataZhe" :animation="false" :tooltipShow="false" :tapLegend="false" />
|
||||||
:tooltipShow="false" :tapLegend="false" />
|
<view class="" v-else style="color: #ccc;font-size: 36rpx;width: 100%;text-align: center;margin-top: 50rpx;">暂无蜂箱...</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -188,6 +186,7 @@
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
logoflag:true,
|
||||||
showloading: false,
|
showloading: false,
|
||||||
uchartsData: {}, // ucharts 数据
|
uchartsData: {}, // ucharts 数据
|
||||||
formData: {}, // 上方三个盒子的数据
|
formData: {}, // 上方三个盒子的数据
|
||||||
|
@ -516,8 +515,10 @@
|
||||||
this.formData = {
|
this.formData = {
|
||||||
...res.data.data
|
...res.data.data
|
||||||
}
|
}
|
||||||
|
this.logoflag = true
|
||||||
// console.log(this.formData,'101010')
|
// console.log(this.formData,'101010')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.logoflag = false
|
||||||
// setTimeout(()=> {
|
// setTimeout(()=> {
|
||||||
// wx.navigateTo({
|
// wx.navigateTo({
|
||||||
// url: '/pages/login/index'
|
// url: '/pages/login/index'
|
||||||
|
@ -622,7 +623,8 @@
|
||||||
7)] // Y 轴
|
7)] // Y 轴
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
this.chartDataZhu = JSON.parse(JSON.stringify(res));
|
|
||||||
|
this.chartDataZhu = JSON.parse(JSON.stringify(res));
|
||||||
console.log(this.chartDataZhu, '柱状图数据');
|
console.log(this.chartDataZhu, '柱状图数据');
|
||||||
}else{
|
}else{
|
||||||
let res = {
|
let res = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user