Commit 7b9f4e6f authored by wends's avatar wends

add 历史查询

parent 68658eaa
......@@ -2,10 +2,10 @@ import request from '@/utils/request'
// const baseURL = process.env.VUE_APP_BASE_API
const baseURL = ''
// 获取数据集列表-分页
export function getTableData(data) {
// 获取图表历史
export function getModelHistory(data) {
return request({
url: `${baseURL}/cc/linque/getDatasetList`,
url: `${baseURL}/iot/dashboard/modelHistory`,
method: 'post',
data
})
......
......@@ -39,6 +39,12 @@ export default {
description: {
type: String,
default: ''
},
config: {
type: Object,
default: () => {
return {}
}
}
},
data() {
......@@ -81,8 +87,7 @@ export default {
},
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
let config = {
title: {
text: `${this.title}监控图表`,
subtext: `单位为: ${this.description}`
......@@ -100,7 +105,13 @@ export default {
type: 'line',
data: []
}]
})
}
config = {
...config,
...this.config
}
this.chart.setOption(config)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment