Compare commits
3 Commits
905880c498
...
3f85c4505c
Author | SHA1 | Date |
---|---|---|
liubaixun | 3f85c4505c | |
liubaixun | 41f2f89daf | |
pangdundun | e0dbd6d2f2 |
|
@ -51,9 +51,9 @@
|
|||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function(res) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||
}
|
||||
})
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
url: this.api.chart_fsdata + '?equipmentId=' + this.equipmentId,
|
||||
method: 'POST'
|
||||
}).then(res => {
|
||||
console.log(res, '获取折线图数据');
|
||||
// console.log(res, '获取折线图数据');
|
||||
res.data.forEach((i, index) => {
|
||||
this.categoriesList.push(i.time);
|
||||
this.valuePHList.push(i.value)
|
||||
|
@ -161,7 +161,7 @@
|
|||
return e[this.titleName + this.echartName] == undefined ? '' : e[this.titleName +
|
||||
this.echartName]
|
||||
})
|
||||
console.log(this.newValuePHList, '121212212121211111111');
|
||||
// console.log(this.newValuePHList, '121212212121211111111');
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -260,7 +260,21 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
let that = this
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function(res) {
|
||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||
},
|
||||
// fail:function(err){
|
||||
// uni.reLaunch({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
})
|
||||
this.timer = setInterval(function() {
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -276,9 +290,13 @@
|
|||
}, 60000);
|
||||
},
|
||||
onUnload() {
|
||||
clearTimeout(this.timer)
|
||||
let that = this
|
||||
clearTimeout(that.timer)
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
let that = this
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -293,6 +311,9 @@
|
|||
})
|
||||
},
|
||||
mounted() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
let that = this
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -310,9 +331,9 @@
|
|||
// 根据用户id查询对应的设备数据
|
||||
getEquipmentInfo(userid) {
|
||||
let that = this
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// });
|
||||
this.$http({
|
||||
url: this.api.sel_eqbyid + userid,
|
||||
method: 'GET'
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
userId: res.data
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
if (res.code == 200) {
|
||||
that.userName = res.data.username;
|
||||
that.admin = that.user_level(res.data.userType);
|
||||
|
|
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
|
@ -216,9 +216,9 @@ var _default = {
|
|||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function success(res) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -306,7 +306,7 @@ var _default = {
|
|||
url: this.api.chart_fsdata + '?equipmentId=' + this.equipmentId,
|
||||
method: 'POST'
|
||||
}).then(function (res) {
|
||||
console.log(res, '获取折线图数据');
|
||||
// console.log(res, '获取折线图数据');
|
||||
res.data.forEach(function (i, index) {
|
||||
_this2.categoriesList.push(i.time);
|
||||
_this2.valuePHList.push(i.value);
|
||||
|
@ -321,7 +321,7 @@ var _default = {
|
|||
_this2.newValuePHList = _this2.valuePHList.map(function (e, index) {
|
||||
return e[_this2.titleName + _this2.echartName] == undefined ? '' : e[_this2.titleName + _this2.echartName];
|
||||
});
|
||||
console.log(_this2.newValuePHList, '121212212121211111111');
|
||||
// console.log(this.newValuePHList, '121212212121211111111');
|
||||
});
|
||||
},
|
||||
// 判断是否是平均或者目标,或者是1#
|
||||
|
|
|
@ -667,7 +667,22 @@ var _default = {
|
|||
};
|
||||
},
|
||||
onLoad: function onLoad() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
var that = this;
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function success(res) {
|
||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||
}
|
||||
// fail:function(err){
|
||||
// uni.reLaunch({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
});
|
||||
|
||||
this.timer = setInterval(function () {
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -683,9 +698,13 @@ var _default = {
|
|||
}, 60000);
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
clearTimeout(this.timer);
|
||||
var that = this;
|
||||
clearTimeout(that.timer);
|
||||
},
|
||||
onPullDownRefresh: function onPullDownRefresh() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
var that = this;
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -700,6 +719,9 @@ var _default = {
|
|||
});
|
||||
},
|
||||
mounted: function mounted() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
var that = this;
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
|
@ -718,9 +740,9 @@ var _default = {
|
|||
getEquipmentInfo: function getEquipmentInfo(userid) {
|
||||
var _this = this;
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// });
|
||||
this.$http({
|
||||
url: this.api.sel_eqbyid + userid,
|
||||
method: 'GET'
|
||||
|
|
|
@ -254,7 +254,7 @@ var _default = {
|
|||
userId: res.data
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
if (res.code == 200) {
|
||||
that.userName = res.data.username;
|
||||
that.admin = that.user_level(res.data.userType);
|
||||
|
|
Loading…
Reference in New Issue