业务95值

This commit is contained in:
康冉冉
2025-10-30 21:30:22 +08:00
parent 9cc43a8700
commit d7963d69a5
18 changed files with 510 additions and 207 deletions

View File

@@ -65,11 +65,22 @@
},
methods: {
getList(title, dataXY) {
console.log('dataXY===',dataXY);
const lineDataListIntance = echarts.init(document.getElementById('lineChart' + this.num));
let titleList = {text: title, x: '50%', y: '3%', textAlign: 'center',textStyle: {fontSize: 16}};
if (dataXY && dataXY.titleVal) {
titleList = Object.assign({},titleList, dataXY.titleVal);
}
let legendData = dataXY && dataXY.legend ? dataXY.legend : {};
if (dataXY && dataXY.legend && dataXY.legend.formatter) {
let formatData = {
// formatter: function(params) {
// const customSuffix = 'xxxxx';
// return `${params} ${customSuffix}`;
// },
};
legendData = Object.assign({}, legendData, formatData);
}
let series = [];
if (dataXY && dataXY.dataList && dataXY.dataList.length > 0) {
dataXY.dataList.forEach(item => {
@@ -96,7 +107,7 @@
}
let option = {
title: [titleList],
legend: dataXY && dataXY.legend ? dataXY.legend : {},
legend: legendData,
tooltip: {
trigger: 'axis',
axisPointer: {
@@ -108,9 +119,9 @@
},
grid: {
top: dataXY && dataXY.gridTop || '80px',
left: '2%',
left: dataXY && dataXY.gridLeft || '2%',
right: '4%',
bottom: '3%',
bottom: dataXY && dataXY.gridBotm || '3%',
containLabel: true
},
xAxis: {