diff --git a/packDetail/pages/waste/add.vue b/packDetail/pages/waste/add.vue
index 1f23e2d..2e39967 100644
--- a/packDetail/pages/waste/add.vue
+++ b/packDetail/pages/waste/add.vue
@@ -37,6 +37,14 @@
+
+
+ 秸秆残留量:
+
+
+
+
+
覆膜年份:
@@ -103,6 +111,7 @@
mulchYear:'',
mulchRemain:'',
cropName:'',
+ strawRemain:'',
stationName:'',
stationCode:'',
mNote:'',
@@ -132,21 +141,17 @@
value:res.data.data[i].stationCode
})
this.array.push(res.data.data[i].stationName)
- console.log(this.array)
}
})
},
bindPickerChange: function(e) {
- console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
- console.log(this.index)
this.survMulchRecord.stationName = this.array[this.index]
for(var i=0;i{
- console.log(res.data)
var imglist = that.imglist
imglist.push({
path:res.data.data.savePath,
@@ -190,7 +197,6 @@
})
var mpics = that.mpics
mpics.push(res.data.data.savePath)
- console.log(imglist,1456145)
})
}
}else {
@@ -204,7 +210,6 @@
},
// 预览图片
seepic(item) {
- console.log(item.path,'图片路径')
let photoList = this.imglist.map(item => {
return this.baseUrl + '/applet/common/static/' + item.path;
});
@@ -244,6 +249,14 @@
})
return
}
+ if(!this.survMulchRecord.strawRemain){
+ uni.showToast({
+ title: "请输入秸秆残留量",
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
if(!this.survMulchRecord.mulchYear){
uni.showToast({
title: "请选择覆膜年份",
diff --git a/packDetail/pages/waste/detail.vue b/packDetail/pages/waste/detail.vue
index 96f0987..b6e9091 100644
--- a/packDetail/pages/waste/detail.vue
+++ b/packDetail/pages/waste/detail.vue
@@ -13,6 +13,10 @@
覆膜作物:
{{survMulchRecord.cropName}}
+
+ 秸秆残留量:
+ {{survMulchRecord.strawRemain}}
+
覆膜年份:
{{survMulchRecord.mulchYear}}年
@@ -75,9 +79,7 @@
},
onLoad(options) {
this.survMulchRecord = JSON.parse(decodeURIComponent(options.item));
- console.log(this.survMulchRecord)
this.mpics = this.survMulchRecord.mPics
- console.log(this.mpics)
this.imglist = []
var imglist = this.imglist
for(var i=0;i {
return item.path;
});
diff --git a/packDetail/pages/waste/edit.vue b/packDetail/pages/waste/edit.vue
index 2843fac..7b9d191 100644
--- a/packDetail/pages/waste/edit.vue
+++ b/packDetail/pages/waste/edit.vue
@@ -37,6 +37,14 @@
+
+
+ 秸秆残留量:
+
+
+
+
+
覆膜年份:
@@ -103,6 +111,7 @@
mulchYear:'',
mulchRemain:'',
cropName:'',
+ strawRemain:'',
stationName:'',
stationCode:'',
mNote:'',
@@ -119,9 +128,7 @@
},
onLoad(options) {
this.survMulchRecord = JSON.parse(decodeURIComponent(options.item));
- console.log(this.survMulchRecord)
this.mpics = this.survMulchRecord.mPics
- console.log(this.mpics)
this.imglist = []
var imglist = this.imglist
for(var i=0;i{
- console.log(res.data)
+ }).then(res =>{
var imglist = that.imglist
imglist.push({
path:res.data.data.savePath,
@@ -203,7 +208,6 @@
})
var mpics = that.mpics
mpics.push(res.data.data.savePath)
- console.log(imglist,1456145)
})
}
}else {
@@ -221,7 +225,6 @@
},
// 预览图片
seepic(item) {
- console.log(item.path,'图片路径')
let photoList = this.imglist.map(item => {
return this.baseUrl + '/applet/common/static/' + item.path;
});
@@ -257,6 +260,14 @@
})
return
}
+ if(!this.survMulchRecord.strawRemain){
+ uni.showToast({
+ title: "请输入秸秆残留量",
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
if(!this.survMulchRecord.mulchYear){
uni.showToast({
title: "请选择覆膜年份",
@@ -281,7 +292,6 @@
})
return
}
- console.log(this.survMulchRecord)
this.$http.post('/applet/survMulchRecord/edit',this.survMulchRecord).then(res=>{
uni.showLoading({
title: '正在提交...'
diff --git a/packDetail/pages/waste/index.vue b/packDetail/pages/waste/index.vue
index d7d8b29..85bfbf3 100644
--- a/packDetail/pages/waste/index.vue
+++ b/packDetail/pages/waste/index.vue
@@ -41,6 +41,10 @@
覆膜作物:
{{item.cropName}}
+
+ 秸秆残留量:
+ {{item.strawRemain?item.strawRemain:0}}
+
地膜残留量:
{{item.mulchRemain}}kg/hm²
@@ -109,7 +113,6 @@
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
- console.log(this.height,ktxStatusHeight,navigationHeight)
this.scorllheight = this.height - 182
}
});
@@ -122,14 +125,12 @@
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
- console.log(this.height,ktxStatusHeight,navigationHeight)
this.scorllheight = this.height - 182
}
});
let pages = getCurrentPages();
let currPage = pages[pages.length - 1]; //当前页面
this.reload = currPage.data.reload
- console.log('this.reload',this.reload)
if(this.reload){
this.cropName = ''
this.sampTime = ''
@@ -152,7 +153,6 @@
value:res.data.data[i].stationCode
})
this.array.push(res.data.data[i].stationName)
- console.log(this.array)
}
})
},
@@ -187,24 +187,18 @@
this.List = this.List.concat(data)
if(res.data.data.total != 0){
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
- console.log(this.allNum,'总页数')
if(this.allNum.indexOf('.') == -1) {
this.allNum = this.allNum;
- console.log(this.allNum,'if')
} else {
this.allNum = parseInt(Number(this.allNum)+1);
- console.log(this.allNum,'else')
}
- console.log(this.pageNo,this.allNum,'156156')
if(this.pageNo == this.allNum) {
this.isLastpage = true;
this.loadStatus='nomore'
- console.log(this.isLastpage,'true','nomore')
} else {
this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more'
- console.log(this.isLastpage,'false')
}
}else{
this.isLastpage = true;
@@ -216,7 +210,6 @@
})
},
lower() {
- console.log("最后一页了,取消下拉功能");
// 最后一页了,取消下拉功能
if (this.isLastpage) {
return
@@ -226,7 +219,6 @@
this.intervalId = setInterval(() => {
num = num+1;
},1000)
- console.log(this.intervalId,num)
this.pageNo = this.pageNo + 1;
let params = {}
params.pageNo = this.pageNo
@@ -243,12 +235,10 @@
if(this.pageNo == this.allNum) {
this.isLastpage = true;
this.loadStatus='nomore'
- console.log(this.isLastpage,'true')
} else {
this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more'
- console.log(this.isLastpage,'false')
}
}else{
this.isLastpage = true;
@@ -258,7 +248,6 @@
})
},
bindPickerChange: function(e) {
- console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
this.stationName = this.array[this.index]
for(var i=0;i{
if(res.data.code == 0){
uni.showToast({