修改测试问题

This commit is contained in:
guanj
2026-06-12 11:02:46 +08:00
parent 1a09c31669
commit 1c01fe5ae1
15 changed files with 268 additions and 175 deletions

View File

@@ -77,7 +77,7 @@ import { useConfig } from '@/stores/config'
import { queryByCode, queryCsDictTree } from '@/api/system-boot/dictTree'
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
import { getTime } from '@/utils/formatTime'
import { yMethod, exportCSV } from '@/utils/echartMethod'
import { yMethod, exportSeriesCSV, completeTimeSeries } from '@/utils/echartMethod'
import APFTree from '@/components/tree/govern/APFTree.vue'
const prop = defineProps({
w: { type: [String, Number] },
@@ -110,6 +110,7 @@ const harmonicCountOptions = ref(Array.from({ length: 49 }, (_, i) => i + 2))
const indicatorList = ref()
const echartList = ref()
const timeControl = ref(false)
const headerHeight = ref(57)
@@ -210,7 +211,7 @@ const setEchart = () => {
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
series.push({
name: `治理前${phaseName}`,
name: `${phaseName}_治理前`,
type: 'line',
showSymbol: false,
smooth: true,
@@ -234,12 +235,12 @@ const setEchart = () => {
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
series.push({
name: `治理后${phaseName}`,
name: `${phaseName}_治理后`,
type: 'line',
showSymbol: false,
smooth: true,
symbol: 'none',
data: afterGroupedByPhase[phase],
data: timeControl.value ? completeTimeSeries(afterGroupedByPhase[phase]) : afterGroupedByPhase[phase],
itemStyle: {
normal: {
color: color
@@ -255,9 +256,9 @@ const setEchart = () => {
// 获取指标名称用于图表标题
let titleText = '治理前后对比'
if (beforeData.length > 0 && beforeData[0].anotherName) {
titleText = beforeData[0].anotherName
titleText = beforeData[0].anotherName+'治理前后对比'
} else if (afterData.length > 0 && afterData[0].anotherName) {
titleText = afterData[0].anotherName
titleText = afterData[0].anotherName+'治理前后对比'
}
// statisticalData
@@ -371,10 +372,40 @@ const setEchart = () => {
left: '10px',
right: '20px'
},
toolbox: {
featureProps: {
myTool1: {
show: true,
title: '下载csv',
icon: 'path://M642 673.1H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9s-8 17.9-17.9 17.9zM642 511.8H301.6c-9.9 0-17.9-8-17.9-17.9 0-9.9 8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9 0 9.9-8 17.9-17.9 17.9zM480.7 350.6H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9h179.2c9.9 0 17.9 8 17.9 17.9s-8.1 17.9-18 17.9zM874.9 350.6H695.7c-49.4 0-89.6-40.2-89.6-89.6V81.9c0-9.9 8-17.9 17.9-17.9 9.9 0 17.9 8 17.9 17.9V261c0 29.6 24.1 53.7 53.7 53.7h179.2c9.9 0 17.9 8 17.9 17.9s-7.9 18-17.8 18zM794.3 959.7H221c-49.4 0-89.6-40.2-89.6-89.6V153.5c0-49.4 40.2-89.6 89.6-89.6h403.1c4.8 0 9.3 1.9 12.7 5.2L887.6 320c3.4 3.4 5.2 7.9 5.2 12.7v537.5c0 52.7-51.9 89.5-98.5 89.5zM221 99.8c-29.6 0-53.7 24.1-53.7 53.7v716.6c0 29.6 24.1 53.7 53.7 53.7h573.3c29 0 62.7-23.5 62.7-53.7v-530L616.7 99.8H221z',
iconStyle: timeControl.value ? { borderColor: '#409EFF' } : {},
onclick: () => {
exportSeriesCSV(
echartList.value.series,
`${echartList.value.title?.text || '趋势对比'}.csv`
)
}
},
myTool2: {
show: true,
title: timeControl.value ? '关闭缺失数据' : '缺失数据',
icon: 'path://M832 512l-192-192v128H128v128h512v128l192-192zM192 512l192 192v-128h512v-128H384V320L192 512z',
iconStyle: timeControl.value ? { borderColor: '#409EFF' } : {},
onclick: () => {
setTimeControl()
}
}
}
},
series: series
}
}
const setTimeControl = () => {
timeControl.value = !timeControl.value
setEchart()
}
const tableStore: any = new TableStore({
url: '/cs-device-boot/csGroup/sensitiveUserTrendData',
method: 'POST',