Commit 7b9f4e6f authored by wends's avatar wends

add 历史查询

parent 68658eaa
...@@ -2,10 +2,10 @@ import request from '@/utils/request' ...@@ -2,10 +2,10 @@ import request from '@/utils/request'
// const baseURL = process.env.VUE_APP_BASE_API // const baseURL = process.env.VUE_APP_BASE_API
const baseURL = '' const baseURL = ''
// 获取数据集列表-分页 // 获取图表历史
export function getTableData(data) { export function getModelHistory(data) {
return request({ return request({
url: `${baseURL}/cc/linque/getDatasetList`, url: `${baseURL}/iot/dashboard/modelHistory`,
method: 'post', method: 'post',
data data
}) })
......
...@@ -39,6 +39,12 @@ export default { ...@@ -39,6 +39,12 @@ export default {
description: { description: {
type: String, type: String,
default: '' default: ''
},
config: {
type: Object,
default: () => {
return {}
}
} }
}, },
data() { data() {
...@@ -81,8 +87,7 @@ export default { ...@@ -81,8 +87,7 @@ export default {
}, },
initChart() { initChart() {
this.chart = echarts.init(document.getElementById(this.id)) this.chart = echarts.init(document.getElementById(this.id))
let config = {
this.chart.setOption({
title: { title: {
text: `${this.title}监控图表`, text: `${this.title}监控图表`,
subtext: `单位为: ${this.description}` subtext: `单位为: ${this.description}`
...@@ -100,7 +105,13 @@ export default { ...@@ -100,7 +105,13 @@ export default {
type: 'line', type: 'line',
data: [] 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