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