You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import * as echarts from "echarts";
|
|
|
|
|
|
|
|
/** 获取echart实例 */
|
|
|
|
export const getEchartInstance = (domId) => {
|
|
|
|
const dom = document.getElementById(domId); // 绘制图表 // setOption方法设置图表实例的配置项 以及数据 所有参数和数据的修改都可以通过 setOption 完成,ECharts 会合并新的参数和数据,然后刷新图表。
|
|
|
|
let myChart = echarts.getInstanceByDom(dom);
|
|
|
|
if (myChart == null) {
|
|
|
|
myChart = echarts.init(dom);
|
|
|
|
} else {
|
|
|
|
myChart.clear()
|
|
|
|
}
|
|
|
|
return myChart
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getCommonData = (reqBusiFlagId, paramsObj) => {
|
|
|
|
return jwtServerInstance.request({
|
|
|
|
url: '/system/sql/common',
|
|
|
|
method: 'post',
|
|
|
|
data: {
|
|
|
|
reqBusiFlagId,
|
|
|
|
paramsObj
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|