修改云南测试用例
This commit is contained in:
@@ -98,7 +98,9 @@ import TableStore from '@/utils/tableStore'
|
||||
import waveForm from '@/components/echarts/waveForm.vue'
|
||||
import html2canvas from 'html2canvas'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
import * as echarts from 'echarts' // 全引入
|
||||
import { min } from 'xe-utils'
|
||||
const datePickerRef = ref()
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const checked = ref(monitoringPoint.state.showCheckBox)
|
||||
@@ -131,6 +133,7 @@ const tableStore = new TableStore({
|
||||
method: 'POST',
|
||||
column: []
|
||||
})
|
||||
const tableData = ref([])
|
||||
const tableHeaderRef = ref()
|
||||
const options = ref({})
|
||||
const traceability = ref<any>([])
|
||||
@@ -201,6 +204,7 @@ const init = () => {
|
||||
}
|
||||
const shujuchuli = (res: any) => {
|
||||
let shujuData = res.data
|
||||
tableData.value = res.data
|
||||
shujuData.forEach((item: any, i: number) => {
|
||||
//判断是否存在暂降点
|
||||
|
||||
@@ -269,7 +273,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -321,7 +327,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -337,7 +345,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -407,7 +417,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -450,7 +462,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -465,7 +479,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -530,7 +546,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -573,7 +591,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -588,7 +608,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -653,7 +675,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue > 1 ? (item.minValue - 0.5).toFixed(3) : item.minValue.toFixed(3),
|
||||
@@ -696,7 +720,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -710,7 +736,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -774,7 +802,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -814,7 +844,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -830,7 +862,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -890,7 +924,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
maxValue: item.maxValue.toFixed(3),
|
||||
@@ -927,7 +963,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -941,7 +979,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -1001,7 +1041,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -1038,7 +1080,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -1052,7 +1096,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -1107,7 +1153,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -1138,7 +1186,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: item.minValue.toFixed(3),
|
||||
@@ -1151,7 +1201,9 @@ const shujuchuli = (res: any) => {
|
||||
let shuju = {
|
||||
id: 'qushifenx' + i,
|
||||
title: item.lineName + '--' + item.targetName,
|
||||
wiringMethod: item.wiringMethod || '0',
|
||||
targetName: item.targetName,
|
||||
value: item.value,
|
||||
legend: item.phaiscType,
|
||||
valueName: item.unit[0],
|
||||
minValue: null,
|
||||
@@ -1390,11 +1442,25 @@ const rendering = () => {
|
||||
}
|
||||
const getEcharts = () => {
|
||||
list.value.forEach((item: any, i: number) => {
|
||||
console.log('🚀 ~ getEcharts ~ item:', item)
|
||||
|
||||
const values = item.value && item.value.length > 0 ? item.value.map(k => k[1]) : [0]
|
||||
let [min, max] = yMethod([item.maxValue, item.minValue, ...values])
|
||||
item.option = {
|
||||
backgroundColor: '#fff',
|
||||
title: {
|
||||
left: 'center',
|
||||
text: item.title
|
||||
text: item.title,
|
||||
subtext:
|
||||
item.wiringMethod == '1'
|
||||
? item.targetName == '相电压有效值'
|
||||
? '该监测点为三角型接线,相电压有效值没有数据'
|
||||
: ''
|
||||
: '', // 副标题
|
||||
subtextStyle: {
|
||||
fontSize: 14,
|
||||
color: '#ff0000'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -1531,6 +1597,7 @@ const getEcharts = () => {
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
name: '时间',
|
||||
type: 'time',
|
||||
axisLine: {
|
||||
show: true,
|
||||
@@ -1556,9 +1623,12 @@ const getEcharts = () => {
|
||||
{
|
||||
type: 'value',
|
||||
|
||||
// min: item.minValue,
|
||||
min: min,
|
||||
max: max,
|
||||
name: item.valueName,
|
||||
minInterval: 1,
|
||||
// max:10,
|
||||
// min:0,
|
||||
// axisLabel: {
|
||||
// interval: 0,
|
||||
// // formatter: function (value: any) {
|
||||
|
||||
@@ -229,20 +229,20 @@ const init = () => {
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)'
|
||||
// formatter: function (params: any) {
|
||||
// //console.log(params)
|
||||
// let msg = ''
|
||||
// msg += params[0].name + '<br/>'
|
||||
// for (let i in params) {
|
||||
// if (params[i].data == 1) {
|
||||
// msg += params[i].seriesName + ': 暂无数据<br/>'
|
||||
// } else {
|
||||
// msg += params[i].seriesName + ': ' + params[i].data + '<br/>'
|
||||
// }
|
||||
// }
|
||||
// return msg
|
||||
// }
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
formatter: function (params: any) {
|
||||
//console.log(params)
|
||||
let msg = ''
|
||||
msg += params[0].name + '<br/>'
|
||||
for (let i in params) {
|
||||
if (params[i].data == 3.14159) {
|
||||
msg +=params[i].marker+ params[i].seriesName + ': 暂无数据<br/>'
|
||||
} else {
|
||||
msg += params[i].marker+ params[i].seriesName + ': ' + params[i].data + '<br/>'
|
||||
}
|
||||
}
|
||||
return msg
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
name: '指标类型',
|
||||
|
||||
@@ -63,8 +63,10 @@ const init = () => {
|
||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||
getHarmInHarmData(formData).then((res: any) => {
|
||||
let xName = ''
|
||||
analysisData.value = []
|
||||
if (formData.harmState === 1) {
|
||||
xName = 'A'
|
||||
analysisData.value.push(
|
||||
{
|
||||
name: '谐波电流幅值(A)',
|
||||
@@ -82,6 +84,7 @@ const init = () => {
|
||||
}
|
||||
)
|
||||
} else {
|
||||
xName = '%'
|
||||
analysisData.value.push(
|
||||
{
|
||||
name: '谐波电压含有率(%)',
|
||||
@@ -101,10 +104,12 @@ const init = () => {
|
||||
}
|
||||
options.value = {
|
||||
xAxis: {
|
||||
name: '次数',
|
||||
type: 'category',
|
||||
data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`)
|
||||
},
|
||||
yAxis: {
|
||||
name: xName,
|
||||
type: 'value'
|
||||
},
|
||||
color: ['#2E8B57', '#DAA520'],
|
||||
|
||||
Reference in New Issue
Block a user