Compare commits

..

8 Commits

Author SHA1 Message Date
liubaixun
5206478e4a fix(build): build
build

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
2023-10-13 10:22:53 +08:00
liubaixun
601bf1c748 fix(build): build
build

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
2023-10-13 10:17:54 +08:00
liubaixun
987fda70f3 fix(build): build
build

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
2023-10-13 10:17:11 +08:00
liubaixun
7cf750214d fix(build): build
build

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
2023-10-13 10:15:30 +08:00
pangdundun
aef995f446 自动升级版本 2023-10-13 10:06:04 +08:00
liubaixun
2a70932008 fix(merge): merge
merge

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
2023-10-13 09:48:28 +08:00
pangdundun
3c79ac9161 折线图修改 2023-10-13 08:55:47 +08:00
pangdundun
9a9a2a10f2 新增updatatime,离线-状态隐藏和修改72参数 2023-10-12 17:15:37 +08:00
45 changed files with 234 additions and 85 deletions

43
App.vue
View File

@ -1,13 +1,50 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') // console.log('App Launch')
const updateManager = uni.getUpdateManager();
//
updateManager.onCheckForUpdate(function(res) {
//
if (res.hasUpdate) {
//
updateManager.onUpdateReady(function() {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success(res) {
// console.log(res)
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate();
}
// if (res.cancel) {
// // applyUpdate
// uni.showModal({
// title: '',
// content: ' - ',
// })
// }
}
})
})
updateManager.onUpdateFailed(function() {
//
uni.showModal({
title: '已经有新版本啦!',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。',
})
})
}
})
}, },
onShow: function() { onShow: function() {
console.log('App Show') // console.log('App Show')
}, },
onHide: function() { onHide: function() {
console.log('App Hide') // console.log('App Hide')
} }
} }
</script> </script>

View File

@ -224,7 +224,7 @@
indexs: 1, indexs: 1,
inputData1: [], inputData1: [],
timer: null timer_: null
}; };
}, },
watch: { watch: {
@ -234,13 +234,13 @@
this.deviceId = option.id this.deviceId = option.id
this.dataInit() this.dataInit()
let that = this let that = this
this.timer = setInterval(function() { this.timer_ = setInterval(function() {
that.dataInit(); that.dataInit();
}, 5000); }, 5000);
}, },
onUnload() { onUnload() {
let that = this let that = this
clearTimeout(that.timer) clearTimeout(that.timer_)
}, },
onPullDownRefresh() { onPullDownRefresh() {
// uni.showLoading({ // uni.showLoading({
@ -271,7 +271,7 @@
var data = { var data = {
"equipmentId": deviceId, "equipmentId": deviceId,
"pattern": 0, // //6ph- "pattern": 0, // //6ph-
"regNum": 71 "regNum": 72
} }
this.$http({ this.$http({
url: this.api.readFs_state, url: this.api.readFs_state,
@ -586,8 +586,8 @@
}, },
closePop() { closePop() {
this.dataInit(); // this.dataInit();
this.getReg(); // this.getReg();
this.show = false this.show = false
} }
} }

View File

@ -11,7 +11,7 @@
<text <text
:class="item.deviceState == 1 ? 'state' : 'state_act'">{{ item.deviceState == 1 ? "在线" : "离线"}}</text> :class="item.deviceState == 1 ? 'state' : 'state_act'">{{ item.deviceState == 1 ? "在线" : "离线"}}</text>
</view> </view>
<view class="right" @click="toFertilizer(item)"> <view class="right" @click="toFertilizer(item)" v-if="item.deviceState == 1">
<text>状态</text> <text>状态</text>
<image src="../../static/right-arrow.png" mode=""></image> <image src="../../static/right-arrow.png" mode=""></image>
</view> </view>

View File

@ -2,7 +2,7 @@
<view class="target_water_fertilizer_PH"> <view class="target_water_fertilizer_PH">
<!-- 目标水肥PH --> <!-- 目标水肥PH -->
<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" <u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false"
title="目标水肥PH" title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar> :title="titleName+echartName" title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
<view class="navbar"> <view class="navbar">
<image src="../../static/PH_bg.png" mode=""></image> <image src="../../static/PH_bg.png" mode=""></image>
@ -19,7 +19,7 @@
<view class="echart"> <view class="echart">
<view class="title"> <view class="title">
<image src="../../static/icon_ph.png" mode=""></image> <image src="../../static/icon_ph.png" mode=""></image>
<text>目标水肥PH</text> <text>{{ titleName+echartName }}</text>
</view> </view>
<view id="echart_p"> <view id="echart_p">
<qiun-data-charts type="line" :opts="opts" :chartData="chartData" :ontouch="true" <qiun-data-charts type="line" :opts="opts" :chartData="chartData" :ontouch="true"
@ -81,7 +81,11 @@
categoriesList:[], categoriesList:[],
valuePH:'', valuePH:'',
valuePHList:[] valuePHList:[],
newValuePHList:[],
titleName:'',
echartName:''
}; };
}, },
onReady() { onReady() {
@ -92,12 +96,15 @@
onLoad(option) { onLoad(option) {
if(option.id){ if(option.id){
this.equipmentId = option.id this.equipmentId = option.id
console.log(this.equipmentId);
} }
if(option.data){ if(option.data){
this.valuePH = option.data this.valuePH = option.data
console.log(this.valuePH);
} }
if(option.name){
this.echartName = option.name
}
this.titleName = this.getStatus(option.equipmentNumber,option.targetValue)
}, },
mounted() { mounted() {
this.getEchartsData() this.getEchartsData()
@ -111,8 +118,8 @@
let res = { let res = {
categories: this.categoriesList, categories: this.categoriesList,
series: [{ series: [{
name: "目标水肥PH", name: this.titleName+this.echartName,
data: this.valuePHList data: this.newValuePHList
}, ] }, ]
}; };
this.chartData = JSON.parse(JSON.stringify(res)); this.chartData = JSON.parse(JSON.stringify(res));
@ -125,16 +132,33 @@
url:this.api.chart_fsdata + '?equipmentId=' + this.equipmentId, url:this.api.chart_fsdata + '?equipmentId=' + this.equipmentId,
method:'POST' method:'POST'
}).then(res=>{ }).then(res=>{
console.log(res,'获取折线图数据'); // console.log(res,'线');
res.data.forEach((i,index)=>{ res.data.forEach((i,index)=>{
this.categoriesList.push(i.time); this.categoriesList.push(i.time);
this.valuePHList.push(i.value['目标水肥PH']) this.valuePHList.push(i.value)
}) })
this.getServerData(); this.getServerData();
console.log(this.categoriesList,'this.categoriesList'); // console.log(this.categoriesList,'this.categoriesList');
console.log(this.valuePHList,'this.valuePHList'); // console.log(this.valuePHList,'this.valuePHList');
this.newValuePHList = this.valuePHList.map((e,index)=>{
return e[this.titleName+this.echartName]
})
// console.log(this.newValuePHList,'121212212121211111111');
}) })
}, },
// ,1#
getStatus(equipmentNumber,targetValue){
if(targetValue == 1){
return '目标'
}else if(targetValue == 0 && equipmentNumber == 0){
return '1#平均'
}else if(targetValue == 0 && equipmentNumber == 15){
return '2#平均'
}else if(targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15){
return equipmentNumber + '#'
}
}
} }
} }
</script> </script>

View File

@ -30,7 +30,7 @@
<text>{{ item1.deviceTypeName }}</text> <text>{{ item1.deviceTypeName }}</text>
</view> </view>
<view class="detail"> <view class="detail">
<view class="item" v-for="(item2,index2) in item1.childList" :key="index2" @click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData)"> <view class="item" v-for="(item2,index2) in item1.childList" :key="index2" @click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData,item2.environmentDataId,item2.equipmentNumber,item2.targetValue)">
<image :src='`../../static/icon/icon${ (index2 + 1) < 9 ? (index2 + 1) : 1 }.png`' mode=""></image> <image :src='`../../static/icon/icon${ (index2 + 1) < 9 ? (index2 + 1) : 1 }.png`' mode=""></image>
<view class="info"> <view class="info">
<view class="">{{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}</view> <view class="">{{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}</view>
@ -38,6 +38,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="updateTime">
<span></span>
<span>*更新数据时间&nbsp;: &nbsp;{{ updateTime }}</span>
</view>
</view> </view>
<!-- <view class="testBase" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1"> <!-- <view class="testBase" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
@ -251,7 +255,8 @@
{ label: '无线传感器信噪比SNR', value: 58, countType: 1,unit: 'dB' }, { label: '无线传感器信噪比SNR', value: 58, countType: 1,unit: 'dB' },
], ],
timer:null timer:null,
updateTime:''
} }
}, },
onLoad() { onLoad() {
@ -327,12 +332,14 @@
method: 'post', method: 'post',
}).then(res => { }).then(res => {
// console.log(res, ''); // console.log(res, '');
if(res.code == 200){ if(res.code == 200){
uni.hideLoading({ uni.hideLoading({
title: '完成' title: '完成'
}); });
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
i.childList= res.data; i.childList= res.data;
this.updateTime = res.data[0].updateTime
// console.log(this.waterAndFertilizerParamsList); // console.log(this.waterAndFertilizerParamsList);
}else{ }else{
@ -347,9 +354,9 @@
}, },
// 线 // 线
toTarget_water_fertilizer_PH(id,data){ toTarget_water_fertilizer_PH(id,data,name,equipmentNumber,targetValue){
uni.navigateTo({ uni.navigateTo({
url:'/pages/target_water_fertilizer_PH/target_water_fertilizer_PH?id=' + id + '&data=' + data url:'/pages/target_water_fertilizer_PH/target_water_fertilizer_PH?id=' + id + '&data=' + data + '&name=' + name + '&equipmentNumber=' + equipmentNumber + '&targetValue=' + targetValue
}) })
}, },
@ -484,7 +491,7 @@
padding: 10rpx 0rpx; padding: 10rpx 0rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-evenly; // justify-content: space-evenly;
.item { .item {
width: 50%; width: 50%;
@ -517,6 +524,14 @@
} }
} }
} }
.updateTime{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
font-size: 22rpx;
}
} }
.testBase { .testBase {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
@ -111,16 +111,54 @@ Object.defineProperty(exports, "__esModule", {
exports.default = void 0; exports.default = void 0;
var _default = { var _default = {
onLaunch: function onLaunch() { onLaunch: function onLaunch() {
console.log('App Launch'); // console.log('App Launch')
var updateManager = uni.getUpdateManager();
//检测版本更新
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
if (res.hasUpdate) {
//监听小程序有版本更新事件
updateManager.onUpdateReady(function () {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success: function success(res) {
// console.log(res)
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
// if (res.cancel) {
// // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
// uni.showModal({
// title: '取消更新将会无法体验新功能',
// content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。',
// })
// }
}
});
});
updateManager.onUpdateFailed(function () {
// 新版本下载失败
uni.showModal({
title: '已经有新版本啦!',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。'
});
});
}
});
}, },
onShow: function onShow() { onShow: function onShow() {
console.log('App Show'); // console.log('App Show')
}, },
onHide: function onHide() { onHide: function onHide() {
console.log('App Hide'); // console.log('App Hide')
} }
}; };
exports.default = _default; exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }), /***/ }),

View File

@ -413,7 +413,7 @@ var _default = {
topActive: 0, topActive: 0,
indexs: 1, indexs: 1,
inputData1: [], inputData1: [],
timer: null timer_: null
}; };
}, },
watch: {}, watch: {},
@ -421,13 +421,13 @@ var _default = {
this.deviceId = option.id; this.deviceId = option.id;
this.dataInit(); this.dataInit();
var that = this; var that = this;
this.timer = setInterval(function () { this.timer_ = setInterval(function () {
that.dataInit(); that.dataInit();
}, 5000); }, 5000);
}, },
onUnload: function onUnload() { onUnload: function onUnload() {
var that = this; var that = this;
clearTimeout(that.timer); clearTimeout(that.timer_);
}, },
onPullDownRefresh: function onPullDownRefresh() { onPullDownRefresh: function onPullDownRefresh() {
// uni.showLoading({ // uni.showLoading({
@ -460,7 +460,7 @@ var _default = {
"equipmentId": deviceId, "equipmentId": deviceId,
"pattern": 0, "pattern": 0,
//需要根据文档填写 //6目标ph-数值 //需要根据文档填写 //6目标ph-数值
"regNum": 71 "regNum": 72
}; };
this.$http({ this.$http({
url: this.api.readFs_state, url: this.api.readFs_state,
@ -752,8 +752,8 @@ var _default = {
this.indexs = index; this.indexs = index;
this.getReg(); this.getReg();
}), (0, _defineProperty2.default)(_methods, "closePop", function closePop() { }), (0, _defineProperty2.default)(_methods, "closePop", function closePop() {
this.dataInit(); // this.dataInit();
this.getReg(); // this.getReg();
this.show = false; this.show = false;
}), _methods) }), _methods)
}; };

View File

@ -1 +1 @@
<view class="preciseWaterAndFertilizer"><u-navbar vue-id="cdd718f8-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="精准水肥" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" bind:__l="__l"></u-navbar><view class="content"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><image src="../../static/icon_precise.png" mode></image><view class="center"><text>{{item.deviceTypeName}}</text><text class="{{[item.deviceState==1?'state':'state_act']}}">{{item.deviceState==1?"在线":"离线"}}</text></view><view data-event-opts="{{[['tap',[['toFertilizer',['$0'],[[['deviceList','',index]]]]]]]}}" class="right" bindtap="__e"><text>状态</text><image src="../../static/right-arrow.png" mode></image></view></view></block></view></view> <view class="preciseWaterAndFertilizer"><u-navbar vue-id="cdd718f8-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="精准水肥" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" bind:__l="__l"></u-navbar><view class="content"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><image src="../../static/icon_precise.png" mode></image><view class="center"><text>{{item.deviceTypeName}}</text><text class="{{[item.deviceState==1?'state':'state_act']}}">{{item.deviceState==1?"在线":"离线"}}</text></view><block wx:if="{{item.deviceState==1}}"><view data-event-opts="{{[['tap',[['toFertilizer',['$0'],[[['deviceList','',index]]]]]]]}}" class="right" bindtap="__e"><text>状态</text><image src="../../static/right-arrow.png" mode></image></view></block></view></block></view></view>

View File

@ -246,7 +246,10 @@ var _default = {
}, },
categoriesList: [], categoriesList: [],
valuePH: '', valuePH: '',
valuePHList: [] valuePHList: [],
newValuePHList: [],
titleName: '',
echartName: ''
}; };
}, },
onReady: function onReady() { onReady: function onReady() {
@ -256,12 +259,14 @@ var _default = {
onLoad: function onLoad(option) { onLoad: function onLoad(option) {
if (option.id) { if (option.id) {
this.equipmentId = option.id; this.equipmentId = option.id;
console.log(this.equipmentId);
} }
if (option.data) { if (option.data) {
this.valuePH = option.data; this.valuePH = option.data;
console.log(this.valuePH);
} }
if (option.name) {
this.echartName = option.name;
}
this.titleName = this.getStatus(option.equipmentNumber, option.targetValue);
}, },
mounted: function mounted() { mounted: function mounted() {
this.getEchartsData(); this.getEchartsData();
@ -275,8 +280,8 @@ var _default = {
var res = { var res = {
categories: _this.categoriesList, categories: _this.categoriesList,
series: [{ series: [{
name: "目标水肥PH", name: _this.titleName + _this.echartName,
data: _this.valuePHList data: _this.newValuePHList
}] }]
}; };
_this.chartData = JSON.parse(JSON.stringify(res)); _this.chartData = JSON.parse(JSON.stringify(res));
@ -289,15 +294,31 @@ var _default = {
url: this.api.chart_fsdata + '?equipmentId=' + this.equipmentId, url: this.api.chart_fsdata + '?equipmentId=' + this.equipmentId,
method: 'POST' method: 'POST'
}).then(function (res) { }).then(function (res) {
console.log(res, '获取折线图数据'); // console.log(res,'获取折线图数据');
res.data.forEach(function (i, index) { res.data.forEach(function (i, index) {
_this2.categoriesList.push(i.time); _this2.categoriesList.push(i.time);
_this2.valuePHList.push(i.value['目标水肥PH']); _this2.valuePHList.push(i.value);
}); });
_this2.getServerData(); _this2.getServerData();
console.log(_this2.categoriesList, 'this.categoriesList'); // console.log(this.categoriesList,'this.categoriesList');
console.log(_this2.valuePHList, 'this.valuePHList'); // console.log(this.valuePHList,'this.valuePHList');
_this2.newValuePHList = _this2.valuePHList.map(function (e, index) {
return e[_this2.titleName + _this2.echartName];
});
// console.log(this.newValuePHList,'121212212121211111111');
}); });
},
// 判断是否是平均或者目标,或者是1#
getStatus: function getStatus(equipmentNumber, targetValue) {
if (targetValue == 1) {
return '目标';
} else if (targetValue == 0 && equipmentNumber == 0) {
return '1#平均';
} else if (targetValue == 0 && equipmentNumber == 15) {
return '2#平均';
} else if (targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15) {
return equipmentNumber + '#';
}
} }
} }
}; };

View File

@ -1 +1 @@
<view class="target_water_fertilizer_PH data-v-3d983434"><u-navbar vue-id="454957e0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="目标水肥PH" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-3d983434" bind:__l="__l"></u-navbar><view class="navbar data-v-3d983434"><image src="../../static/PH_bg.png" mode class="data-v-3d983434"></image></view><view class="content data-v-3d983434"><view class="number data-v-3d983434">{{''+valuePH+''}}</view><view class="data_analysis data-v-3d983434"><image src="../../static/data_analysis.png" mode class="data-v-3d983434"></image><text class="data-v-3d983434">数据分析</text></view><view class="echart data-v-3d983434"><view class="title data-v-3d983434"><image src="../../static/icon_ph.png" mode class="data-v-3d983434"></image><text class="data-v-3d983434">目标水肥PH</text></view><view id="echart_p" class="data-v-3d983434"><qiun-data-charts vue-id="454957e0-2" type="line" opts="{{opts}}" chartData="{{chartData}}" ontouch="{{true}}" background="none" class="data-v-3d983434" bind:__l="__l"></qiun-data-charts></view></view></view></view> <view class="target_water_fertilizer_PH data-v-3d983434"><u-navbar vue-id="454957e0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="{{titleName+echartName}}" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-3d983434" bind:__l="__l"></u-navbar><view class="navbar data-v-3d983434"><image src="../../static/PH_bg.png" mode class="data-v-3d983434"></image></view><view class="content data-v-3d983434"><view class="number data-v-3d983434">{{''+valuePH+''}}</view><view class="data_analysis data-v-3d983434"><image src="../../static/data_analysis.png" mode class="data-v-3d983434"></image><text class="data-v-3d983434">数据分析</text></view><view class="echart data-v-3d983434"><view class="title data-v-3d983434"><image src="../../static/icon_ph.png" mode class="data-v-3d983434"></image><text class="data-v-3d983434">{{titleName+echartName}}</text></view><view id="echart_p" class="data-v-3d983434"><qiun-data-charts vue-id="454957e0-2" type="line" opts="{{opts}}" chartData="{{chartData}}" ontouch="{{true}}" background="none" class="data-v-3d983434" bind:__l="__l"></qiun-data-charts></view></view></view></view>

View File

@ -270,6 +270,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
// //
// //
// //
//
//
//
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -656,7 +660,8 @@ var _default = {
countType: 1, countType: 1,
unit: 'dB' unit: 'dB'
}], }],
timer: null timer: null,
updateTime: ''
}; };
}, },
onLoad: function onLoad() { onLoad: function onLoad() {
@ -731,12 +736,14 @@ var _default = {
method: 'post' method: 'post'
}).then(function (res) { }).then(function (res) {
// console.log(res, '主页查看施肥机实时数据'); // console.log(res, '主页查看施肥机实时数据');
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading({ uni.hideLoading({
title: '完成' title: '完成'
}); });
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
i.childList = res.data; i.childList = res.data;
_this.updateTime = res.data[0].updateTime;
// console.log(this.waterAndFertilizerParamsList); // console.log(this.waterAndFertilizerParamsList);
} else {} } else {}
}).catch(function (err) { }).catch(function (err) {
@ -747,9 +754,9 @@ var _default = {
}); });
}, },
// 跳转到折线图 // 跳转到折线图
toTarget_water_fertilizer_PH: function toTarget_water_fertilizer_PH(id, data) { toTarget_water_fertilizer_PH: function toTarget_water_fertilizer_PH(id, data, name, equipmentNumber, targetValue) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/target_water_fertilizer_PH/target_water_fertilizer_PH?id=' + id + '&data=' + data url: '/pages/target_water_fertilizer_PH/target_water_fertilizer_PH?id=' + id + '&data=' + data + '&name=' + name + '&equipmentNumber=' + equipmentNumber + '&targetValue=' + targetValue
}); });
}, },
// 数据单位 // 数据单位

View File

@ -1 +1 @@
<view class="timeEnvironment data-v-34c343d8"><u-navbar vue-id="63a4351c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时环境" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-34c343d8" bind:__l="__l"></u-navbar><view class="navbar data-v-34c343d8"><image src="https://cdn.lihe-control.com/static/timeEnvironment_bg.png" mode class="data-v-34c343d8"></image></view><view class="content data-v-34c343d8"><view class="title data-v-34c343d8"><image src="../../static/logo_1.png" mode class="data-v-34c343d8"></image><view class="right data-v-34c343d8"><view class="data-v-34c343d8">温室智慧云</view><view class="data-v-34c343d8">Greenhouse wisdom Cloud</view></view></view><view class="subtitle data-v-34c343d8">欢迎使用温室智慧云数据统计</view><block wx:for="{{$root.l1}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="waterAndFertilizerParams data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/PH.png" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item1.$orig.deviceTypeName}}</text></view><view class="detail data-v-34c343d8"><block wx:for="{{item1.l0}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view data-event-opts="{{[['tap',[['toTarget_water_fertilizer_PH',['$0','$1'],[[['waterAndFertilizerParamsList','',index1],['childList','',index2,'equipmentId']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'environmentData']]]]]]]}}" class="item data-v-34c343d8" bindtap="__e"><image src="{{'../../static/icon/icon'+(index2+1<9?index2+1:1)+'.png'}}" mode class="data-v-34c343d8"></image><view class="info data-v-34c343d8"><view class="data-v-34c343d8">{{item2.m0+item2.$orig.environmentDataId}}</view><view class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m1}}</view></view></view></block></view></view></block></view></view> <view class="timeEnvironment data-v-34c343d8"><u-navbar vue-id="63a4351c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时环境" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-34c343d8" bind:__l="__l"></u-navbar><view class="navbar data-v-34c343d8"><image src="https://cdn.lihe-control.com/static/timeEnvironment_bg.png" mode class="data-v-34c343d8"></image></view><view class="content data-v-34c343d8"><view class="title data-v-34c343d8"><image src="../../static/logo_1.png" mode class="data-v-34c343d8"></image><view class="right data-v-34c343d8"><view class="data-v-34c343d8">温室智慧云</view><view class="data-v-34c343d8">Greenhouse wisdom Cloud</view></view></view><view class="subtitle data-v-34c343d8">欢迎使用温室智慧云数据统计</view><block wx:for="{{$root.l1}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="waterAndFertilizerParams data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/PH.png" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item1.$orig.deviceTypeName}}</text></view><view class="detail data-v-34c343d8"><block wx:for="{{item1.l0}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view data-event-opts="{{[['tap',[['toTarget_water_fertilizer_PH',['$0','$1','$2','$3','$4'],[[['waterAndFertilizerParamsList','',index1],['childList','',index2,'equipmentId']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'environmentData']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'environmentDataId']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'equipmentNumber']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'targetValue']]]]]]]}}" class="item data-v-34c343d8" bindtap="__e"><image src="{{'../../static/icon/icon'+(index2+1<9?index2+1:1)+'.png'}}" mode class="data-v-34c343d8"></image><view class="info data-v-34c343d8"><view class="data-v-34c343d8">{{item2.m0+item2.$orig.environmentDataId}}</view><view class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m1}}</view></view></view></block></view><view class="updateTime data-v-34c343d8"><label class="_span data-v-34c343d8"></label><label class="_span data-v-34c343d8">{{"*更新数据时间 :  "+updateTime}}</label></view></view></block></view></view>

View File

@ -114,7 +114,6 @@
padding: 10rpx 0rpx; padding: 10rpx 0rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-evenly;
} }
.timeEnvironment .content .waterAndFertilizerParams .detail .item.data-v-34c343d8 { .timeEnvironment .content .waterAndFertilizerParams .detail .item.data-v-34c343d8 {
width: 50%; width: 50%;
@ -141,6 +140,14 @@
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.timeEnvironment .content .waterAndFertilizerParams .updateTime.data-v-34c343d8 {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
font-size: 22rpx;
}
.timeEnvironment .content .testBase.data-v-34c343d8 { .timeEnvironment .content .testBase.data-v-34c343d8 {
width: 690rpx; width: 690rpx;
height: auto; height: auto;