修改实时数据更新时间
parent
9e1b02ff5a
commit
f295de66a6
|
@ -213,7 +213,7 @@
|
|||
</view>
|
||||
<view class="updateTime">
|
||||
<span></span>
|
||||
<span>*更新数据时间 : {{ updateTime }}</span>
|
||||
<span>*更新数据时间 : {{ updateTime[index1] }}</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -341,7 +341,7 @@
|
|||
typeList: [],
|
||||
|
||||
timer: null,
|
||||
updateTime: ''
|
||||
updateTime: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -447,6 +447,7 @@
|
|||
childList_fourteen: [],//14#
|
||||
}
|
||||
})
|
||||
this.updateTime = []
|
||||
this.waterAndFertilizerParamsList.forEach((i, index) => {
|
||||
|
||||
this.$http({
|
||||
|
@ -484,11 +485,13 @@
|
|||
i.childList_fourteen = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 14);
|
||||
|
||||
|
||||
this.updateTime = res.data[0].updateTime
|
||||
this.updateTime.push(res.data[0].updateTime ? res.data[0].updateTime : '暂无')
|
||||
|
||||
// console.log(this.waterAndFertilizerParamsList);
|
||||
} else {
|
||||
|
||||
this.updateTime.push('暂无')
|
||||
}
|
||||
console.log(this.updateTime,'this.updateTime');
|
||||
}).catch(err => {
|
||||
console.log('接口失败');
|
||||
})
|
||||
|
|
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
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
|
@ -1557,7 +1557,7 @@ function initData(vueOptions, context) {
|
|||
try {
|
||||
data = data.call(context); // 支持 Vue.prototype 上挂的数据
|
||||
} catch (e) {
|
||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
|
||||
}
|
||||
}
|
||||
|
@ -8934,7 +8934,7 @@ function type(obj) {
|
|||
|
||||
function flushCallbacks$1(vm) {
|
||||
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
|
||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
var mpInstance = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
|
||||
|
@ -8955,14 +8955,14 @@ function nextTick$1(vm, cb) {
|
|||
//1.nextTick 之前 已 setData 且 setData 还未回调完成
|
||||
//2.nextTick 之前存在 render watcher
|
||||
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
|
||||
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
var mpInstance = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:nextVueTick');
|
||||
}
|
||||
return nextTick(cb, vm)
|
||||
}else{
|
||||
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
var mpInstance$1 = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
|
||||
']:nextMPTick');
|
||||
|
@ -9058,7 +9058,7 @@ var patch = function(oldVnode, vnode) {
|
|||
});
|
||||
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
|
||||
if (Object.keys(diffData).length) {
|
||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
|
||||
']差量更新',
|
||||
JSON.stringify(diffData));
|
||||
|
@ -12674,7 +12674,7 @@ function _extends() {
|
|||
var formatRegExp = /%[sdj%]/g;
|
||||
var warning = function warning() {}; // don't print warning message when in production env or node runtime
|
||||
|
||||
if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
|
||||
if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
|
||||
warning = function warning(type, errors) {
|
||||
if (typeof console !== 'undefined' && console.warn) {
|
||||
if (errors.every(function (e) {
|
||||
|
|
|
@ -757,7 +757,7 @@ var _default = {
|
|||
//countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10
|
||||
typeList: [],
|
||||
timer: null,
|
||||
updateTime: ''
|
||||
updateTime: []
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad() {
|
||||
|
@ -879,6 +879,7 @@ var _default = {
|
|||
});
|
||||
});
|
||||
|
||||
_this.updateTime = [];
|
||||
_this.waterAndFertilizerParamsList.forEach(function (i, index) {
|
||||
_this.$http({
|
||||
url: (i.equipmentName == 1 ? _this.api.getFs_rtdata : _this.api.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
|
||||
|
@ -945,9 +946,13 @@ var _default = {
|
|||
i.childList_fourteen = res.data.filter(function (el) {
|
||||
return _this.getStatus(el.equipmentNumber, el.targetValue) == el.equipmentNumber + '#' && el.equipmentNumber == 14;
|
||||
});
|
||||
_this.updateTime = res.data[0].updateTime;
|
||||
_this.updateTime.push(res.data[0].updateTime ? res.data[0].updateTime : '暂无');
|
||||
|
||||
// console.log(this.waterAndFertilizerParamsList);
|
||||
} else {}
|
||||
} else {
|
||||
_this.updateTime.push('暂无');
|
||||
}
|
||||
console.log(_this.updateTime, 'this.updateTime');
|
||||
}).catch(function (err) {
|
||||
console.log('接口失败');
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue