diff --git a/src/App.vue b/src/App.vue
index efbd490..1776d82 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -296,7 +296,7 @@ uni-page-body {
align-items: center;
justify-content: space-between;
padding: 24rpx 30rpx;
- margin-bottom: 20rpx;
+ // margin-bottom: 20rpx;
font-size: 28rpx;
.tit {
font-size: 28rpx;
diff --git a/src/pages/device/warning.vue b/src/pages/device/warning.vue
index 1694d3f..9c1f728 100644
--- a/src/pages/device/warning.vue
+++ b/src/pages/device/warning.vue
@@ -76,7 +76,7 @@
{{formInfo.created_at|timeFormat}}
- 地址
+ 内容
{{formInfo.content}}
diff --git a/src/pages/index/components/pests-chart.vue b/src/pages/index/components/pests-chart.vue
index 5ff4d83..774ca03 100644
--- a/src/pages/index/components/pests-chart.vue
+++ b/src/pages/index/components/pests-chart.vue
@@ -8,7 +8,11 @@
-
+
@@ -212,7 +216,10 @@ export default {
this.getData()
},
async getData() {
- if (!this.filterParmas.device_id) return
+ if (!this.filterParmas.device_id) {
+ this.$u.toast('没有关联基地')
+ return (this.chartData = { series: [] })
+ }
try {
const { data } = await http.get(
`/api/devices/${this.filterParmas.device_id}/worm-statics`,
diff --git a/src/pages/index/components/pests-images.vue b/src/pages/index/components/pests-images.vue
index 88ceb83..a5821dc 100644
--- a/src/pages/index/components/pests-images.vue
+++ b/src/pages/index/components/pests-images.vue
@@ -148,7 +148,11 @@ export default {
this.mescroll.resetUpScroll()
},
async getData(e) {
- if (!e.device_id) return
+ if (!e.device_id) {
+ this.mescroll.endByPage(0, 0)
+
+ return this.$u.toast('没有关联基地')
+ }
try {
const { data } = await http.get(
`/api/devices/${e.device_id}/worm-photos`,
diff --git a/src/pages/index/insect-monitors.vue b/src/pages/index/insect-monitors.vue
index 29d82d1..523ee20 100644
--- a/src/pages/index/insect-monitors.vue
+++ b/src/pages/index/insect-monitors.vue
@@ -148,7 +148,9 @@ export default {
this.mescroll.resetUpScroll()
},
async getData(e) {
- if (!e.device_id) return
+ if (!e.device_id) {
+ return this.$u.toast('没有关联基地')
+ }
try {
const { data } = await http.get(
`/api/devices/${e.device_id}/worm-photos`,
diff --git a/src/pages/index/insecticidal-lamp.vue b/src/pages/index/insecticidal-lamp.vue
index b179896..6da6685 100644
--- a/src/pages/index/insecticidal-lamp.vue
+++ b/src/pages/index/insecticidal-lamp.vue
@@ -190,7 +190,9 @@ export default {
},
async getData() {
this.chatList = []
- if (!this.filterParmas.device_id) return
+ if (!this.filterParmas.device_id){
+ return this.$u.toast('没有关联基地')
+ }
const { data } = await http.get('/api/monitoring-data', {
params: this.filterParmas,
})
diff --git a/src/pages/index/meteorological.vue b/src/pages/index/meteorological.vue
index c1ca965..c118c38 100644
--- a/src/pages/index/meteorological.vue
+++ b/src/pages/index/meteorological.vue
@@ -399,15 +399,21 @@
}
this.$http.get('/api/agricultural-device-basic',{params:params}).then(({data})=>{
console.log(data);
+
if(data.code==200){
let _data = data.data;
+ if(_data.length==0){
+ return this.$u.toast('没有关联基地');
+ }
for(let item of _data){
item['label'] = item.name;
item['value'] = item.id;
}
+
this.deviceAddressList = _data;
this.addressValue = _data[0].id;
this.addressName = _data[0].name;
+
this.queryAddressDevicePoints(this.addressValue);
}
}).catch(()=>{
diff --git a/src/pages/index/monitor.vue b/src/pages/index/monitor.vue
index 80d1a94..cc8aa1f 100644
--- a/src/pages/index/monitor.vue
+++ b/src/pages/index/monitor.vue
@@ -406,6 +406,7 @@ export default {
params['is_recommend'] = this.is_recommend
}
this.loading = 'loading'
+
this.$http
.get('/api/devices', { params: params })
.then(async ({ data }) => {
@@ -533,6 +534,10 @@ export default {
console.log(data)
if (data.code == 200) {
let _data = data.data
+ if(_data.length==0){
+ this.loading = 'nomore'
+ return this.$u.toast('没有关联基地')
+ }
for (let item of _data) {
item['label'] = item.name
item['value'] = item.id
diff --git a/src/pages/index/soil-monitoring.vue b/src/pages/index/soil-monitoring.vue
index 55028ad..aab8347 100644
--- a/src/pages/index/soil-monitoring.vue
+++ b/src/pages/index/soil-monitoring.vue
@@ -41,12 +41,17 @@
-
+
预警数据统计
设置
+
+
+
+
+
Ⅰ级预警
@@ -68,10 +73,13 @@
-
+
电导率us/cm
{{addressName}}
+
+
+
-
+
湿度%RH
{{addressName}}
+
+
+
-
+
温度℃
{{addressName}}
+
+
+
-
+
氮mg/kg
{{addressName}}
+
+
+
-
+
磷mg/kg
{{addressName}}
+
+
+
-
+
钾mg/kg
{{addressName}}
+
+
+
-
+
预警数据统计
设置
+
+
+
Ⅰ级预警
@@ -68,10 +71,13 @@
-
+
氯mg/L
{{addressName}}
+
+
+
-
+
电导率us/cm
{{addressName}}
+
+
+
-
+
氧气mg/L
{{addressName}}
+
+
+
-
+
PH
{{addressName}}
+
+
+
-
+
温度℃
{{addressName}}
+
+
+
-
+
浊度NTU
{{addressName}}
+
+
+