修改测试问题

This commit is contained in:
guanj
2026-06-16 08:34:45 +08:00
parent 1c01fe5ae1
commit d9dfd804c5
63 changed files with 5289 additions and 3842 deletions

View File

@@ -13,6 +13,7 @@ import 'echarts-liquidfill'
import 'echarts/lib/component/dataZoom'
import { color, gradeColor3 } from './color'
import { useConfig } from '@/stores/config'
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
// import { nextTick } from 'process'
const emit = defineEmits(['chartClick'])
@@ -71,7 +72,9 @@ const initChart = () => {
feature: {
saveAsImage: {
title: '下载图片',
name: props.options?.title?.text || '图表'
name: props.options?.exportFileName
? buildExportBaseName(props.options.exportFileName)
: ((props.options?.title?.text || '图表') + '_' + formatExportDateTime())
},
...(props.options?.toolbox?.featureProps || null)
},
@@ -93,7 +96,7 @@ const initChart = () => {
...(props.options?.legend || null)
},
grid: {
top: props.options?.title?.text ? '50px' : '25px',
top: props.options?.title?.text ? '50px' : '25px',
left: '30px',
right: '70px',
bottom: props.options?.options?.dataZoom === null ? '10px' : '40px',

View File

@@ -1,4 +1,18 @@
export let color = [ '#07CCCA','#00BFF5', '#FFBF00', '#77DA63', '#Ff6600', '#FF9100', '#5B6E96', '#66FFCC', '#B3B3B3']
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']
export let color = ['#07CCCA', '#00BFF5', '#FFBF00', '#77DA63', '#Ff6600', '#FF9100', '#5B6E96', '#66FFEC', '#B3B3B3', '#9B59B6', '#3498DB', '#2ECC71']
export let color1 = [
'#00A8B5', // 青
'#3B7DD8', // 蓝
'#5B5FC7', // 靛
'#8B5CF6', // 紫
'#B07CC6', // 淡紫
'#C060A8', // 玫红
'#D4A017', // 金
'#6AAF50', // 草绿
'#00A878', // 翠绿
'#7C9EB2', // 烟蓝
'#6B7B8C', // 板岩灰
'#A8A8A8' // 灰
]
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']

View File

@@ -19,7 +19,7 @@ import url from '@/assets/img/point.png'
import url2 from '@/assets/img/dw.png'
import { buildWaveCacheKey, getWaveCache, setWaveCache } from '@/utils/waveCache'
import { getRmsWorker, buildWorkerPayload } from '@/utils/waveWorkerPool'
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
let waveRequestId = 0
const pendingCacheKeys = new Map<number, string>()
let rmsWorker: Worker | null = null
@@ -202,7 +202,7 @@ const download = () => {
scale: 2
}).then(function (canvas) {
const creatIMg = document.createElement('a')
creatIMg.download = 'rms波形.png'
creatIMg.download = (props.boxoList.lineName || props.boxoList.measurementPointName || props.boxoList.equipmentName) + '_RMS波形_' + formatExportDateTime() + '.png'
creatIMg.href = canvas.toDataURL()
creatIMg.click()
creatIMg.remove()
@@ -810,7 +810,7 @@ const initWave = (
start: 0,
bottom: '20px',
end: 100,
filterMode: 'filter'
filterMode: 'filter'
},
{
start: 0,

View File

@@ -18,6 +18,7 @@ import { calcShuYAxisRange, formatAxisLabel } from '@/utils/chartAxisHelper'
import url from '@/assets/img/point.png'
import { buildWaveCacheKey, getWaveCache, setWaveCache } from '@/utils/waveCache'
import { getShuWorker, buildWorkerPayload } from '@/utils/waveWorkerPool'
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
let waveRequestId = 0
const pendingCacheKeys = new Map<number, string>()
@@ -207,7 +208,7 @@ const download = () => {
scale: 2
}).then(function (canvas) {
const creatIMg = document.createElement('a')
creatIMg.download = '瞬间波形.png'
creatIMg.download = (props.boxoList.lineName || props.boxoList.measurementPointName || props.boxoList.equipmentName) + '_瞬间波形_' + formatExportDateTime() + '.png'
creatIMg.href = canvas.toDataURL()
creatIMg.click()
creatIMg.remove()
@@ -566,7 +567,7 @@ const initWave = (
start: 0,
bottom: '20px',
end: 100,
filterMode: 'filter'
filterMode: 'filter'
},
{
start: 0,