From f9ae47c20537fec55350e1fba1668870dd53b4cb Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期二, 11 二月 2025 11:12:09 +0800 Subject: [PATCH] 显示当前曲线 --- src/views/model/pre/analysis/index.vue | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/views/model/pre/analysis/index.vue b/src/views/model/pre/analysis/index.vue index 87ba5d9..64155c3 100644 --- a/src/views/model/pre/analysis/index.vue +++ b/src/views/model/pre/analysis/index.vue @@ -258,7 +258,7 @@ }) /** 查询列表 */ -const getList = async () => { +const getList = async (isClear = true) => { loading1.value = true try { if (!formData.value.chartCheck) { @@ -369,7 +369,7 @@ type: 'line', yAxisIndex: yAxisIndex, showSymbol: false, - smooth: true, + smooth: false, lineStyle: { width: 2 } @@ -377,13 +377,14 @@ } if (chartCheckArray.indexOf('T+N') !== -1) { let legendName = dataView.resultName + '(T+N)'; + legendData.push(legendName); seriesData.push({ name: legendName, data: dataView.preDataN || [], type: 'line', yAxisIndex: yAxisIndex, showSymbol: false, - smooth: true, + smooth: false, lineStyle: { width: 2 } @@ -399,7 +400,7 @@ showSymbol: false, connectNulls: true, yAxisIndex: yAxisIndex, - smooth: true, + smooth: false, lineStyle: { width: 2 } @@ -413,10 +414,10 @@ data: dataView.curData || [], type: 'line', yAxisIndex: yAxisIndex, - showSymbol: false, - smooth: true, + showSymbol: true, + smooth: false, lineStyle: { - width: 2 + width: 3 } }); } @@ -430,7 +431,7 @@ yAxisIndex: yAxisIndex, showSymbol: false, connectNulls: true, - smooth: true, + smooth: false, lineStyle: { width: 2, type: 'dashed' @@ -491,7 +492,9 @@ ], series: seriesData } - myChart.clear() + if (isClear) { + myChart.clear() + } myChart.setOption(option) } finally { loading1.value = false @@ -505,6 +508,10 @@ async function getPreItemTree() { treeData.value = await McsApi.getPredictItemTree() +} + +function changeChartCheck(value) { + getList(true) } function leftSearchDataByRange() { @@ -524,7 +531,7 @@ endTime = getYMDHMS(new Date(endTime) - 1000 * 60 * mins); formData.value.endTime = endTime; } - getList(); + getList(false); } function getRangeMins() { @@ -651,7 +658,7 @@ endTime = getYMDHMS(new Date(endTime) - 0 + 1000 * 60 * mins); formData.value.endTime = endTime; } - getList(); + getList(false); } /** 重置表单 */ @@ -681,7 +688,7 @@ queryStep: 2, isMultipleYRadio: '单坐标轴', isMultipleY: false, - predictFreq: 3, + predictFreq: 2, } calRateForm.value = { calItem: undefined, -- Gitblit v1.9.3