|
@@ -212,25 +212,25 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// 获取图表信息
|
|
|
- getAction(_this.url.listparams, _this.queryParams).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- console.log("listparams")
|
|
|
- _this.equipmentparams = res.result.records || res.result;
|
|
|
- getAction(_this.url.list, _this.queryParams).then((res) => {
|
|
|
- console.log("list")
|
|
|
- if (res.success) {
|
|
|
- _this.mongodbdata = [];
|
|
|
- _this.mongodbdata = res.result.records || res.result;
|
|
|
- _this.initEcharts();
|
|
|
- } else {
|
|
|
- this.$message.warning(res.message)
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.warning(res.message)
|
|
|
- }
|
|
|
- });
|
|
|
- // this.getTest();
|
|
|
+ // getAction(_this.url.listparams, _this.queryParams).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // console.log("listparams")
|
|
|
+ // _this.equipmentparams = res.result.records || res.result;
|
|
|
+ // getAction(_this.url.list, _this.queryParams).then((res) => {
|
|
|
+ // console.log("list")
|
|
|
+ // if (res.success) {
|
|
|
+ // _this.mongodbdata = [];
|
|
|
+ // _this.mongodbdata = res.result.records || res.result;
|
|
|
+ // _this.initEcharts();
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning(res.message)
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning(res.message)
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.getTest();
|
|
|
},
|
|
|
// 后端好了需要删掉
|
|
|
getTest() {
|
|
@@ -241,6 +241,10 @@ export default {
|
|
|
initEcharts() {
|
|
|
var _this = this
|
|
|
var chartDom = this.$refs.trendCharts
|
|
|
+
|
|
|
+ if (_this.myChart != null && _this.myChart.dispose) {
|
|
|
+ _this.myChart.dispose(); // 销毁实例
|
|
|
+ }
|
|
|
_this.myChart = echarts.init(chartDom)
|
|
|
_this.echartsHeight = 4 * 300;
|
|
|
// 获取time
|