修改测试bug

This commit is contained in:
GGJ
2024-10-16 20:31:54 +08:00
parent 10b8710832
commit 67383d5888
9 changed files with 1599 additions and 1558 deletions

View File

@@ -27,7 +27,7 @@ import { mainHeight } from '@/utils/layout'
import url from '@/assets/img/point.png'; import url from '@/assets/img/point.png';
import url2 from '@/assets/img/dw.png'; import url2 from '@/assets/img/dw.png';
export default { export default {
props: { props: {
value: { value: {
type: Number, type: Number,
default: 2, default: 2,
@@ -47,12 +47,12 @@ props: {
type: [Object, Array], type: [Object, Array],
}, },
height: { height: {
type: [String,Number], type: [String, Number],
default: false, default: false,
}, },
}, },
data() { data() {
return { return {
zoom: "", zoom: "",
loading: true, loading: true,
@@ -83,8 +83,8 @@ data() {
vh: null, vh: null,
vw: null, vw: null,
}; };
}, },
watch: { watch: {
value: function (a, b) { value: function (a, b) {
if (a == 2) { if (a == 2) {
//alert(a) //alert(a)
@@ -94,18 +94,18 @@ watch: {
this.initWaves(); this.initWaves();
} }
}, },
}, },
created() { created() {
if (this.flag == 1) { if (this.flag == 1) {
this.vh = mainHeight(165).height this.vh = mainHeight(200).height
}else if( this.height != false){ } else if (this.height != false) {
this.vh = this.height this.vh = this.height
} else { } else {
this.vh = mainHeight(165,2).height this.vh = mainHeight(200, 2).height
} }
this.vw = '100%' this.vw = '100%'
}, },
mounted() { mounted() {
// this.$wave = $("#wave").eq(0); // this.$wave = $("#wave").eq(0);
this.zoom = 1 / document.body.style.zoom; this.zoom = 1 / document.body.style.zoom;
window.addEventListener("resize", () => { window.addEventListener("resize", () => {
@@ -113,8 +113,8 @@ mounted() {
}); });
// this.$rms = $("#rms").eq(0); // this.$rms = $("#rms").eq(0);
this.query(); this.query();
}, },
methods: { methods: {
download() { download() {
// 转换成canvas // 转换成canvas
html2canvas(document.getElementById("boxr"), { html2canvas(document.getElementById("boxr"), {
@@ -195,7 +195,7 @@ methods: {
"% 持续时间:" + "% 持续时间:" +
this.boxoList.duration + this.boxoList.duration +
"s"; "s";
} else if(this.boxoList.systemType == "ZL"){ } else if (this.boxoList.systemType == "ZL") {
this.titles = this.titles =
// "变电站名称:" + // "变电站名称:" +
// this.boxoList.equipmentName + // this.boxoList.equipmentName +
@@ -208,7 +208,19 @@ methods: {
" 持续时间:" + " 持续时间:" +
this.boxoList.evtParamTm + this.boxoList.evtParamTm +
"s"; "s";
}else { } else if (this.boxoList.systemType == 'WX') {
this.titles =
' 监测点名称:' +
this.boxoList.lineName +
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') +
'% 持续时间:' +
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's'
} else {
this.titles = this.titles =
"变电站名称:" + "变电站名称:" +
this.boxoList.subName + this.boxoList.subName +
@@ -240,18 +252,18 @@ methods: {
for (var i = 0; i < picCounts; i++) { for (var i = 0; i < picCounts; i++) {
this.fliteWaveData(this.wp, i) this.fliteWaveData(this.wp, i)
this.waveDatas.push({ this.waveDatas.push({
instantF :this.instantF, instantF: this.instantF,
instantS :this.instantS, instantS: this.instantS,
RMSF :this.RMSF, RMSF: this.RMSF,
RMSS :this.RMSS, RMSS: this.RMSS,
RMSFMinDetail :this.RMSFMinDetail, RMSFMinDetail: this.RMSFMinDetail,
RMSSMinDetail :this.RMSSMinDetail, RMSSMinDetail: this.RMSSMinDetail,
shunshiF :this.shunshiF, shunshiF: this.shunshiF,
shunshiS :this.shunshiS, shunshiS: this.shunshiS,
RMSFWave :this.RMSFWave, RMSFWave: this.RMSFWave,
RMSSWave :this.RMSSWave, RMSSWave: this.RMSSWave,
title :this.title, title: this.title,
unit :this.unit unit: this.unit
}); });
} }
@@ -826,8 +838,7 @@ methods: {
for (var step = 1; step < waveDatas.length; step++) { for (var step = 1; step < waveDatas.length; step++) {
var rmsId = "rms" + step; var rmsId = "rms" + step;
var newDivRms = $( var newDivRms = $(
` <div style="height:${ ` <div style="height:${this.vh
this.vh
};overflow: hidden;"><div class='bx' id='${rmsId}' ></div></div>` };overflow: hidden;"><div class='bx' id='${rmsId}' ></div></div>`
); );
newDivRms.insertAfter($("#rmsp")); newDivRms.insertAfter($("#rmsp"));
@@ -857,10 +868,10 @@ methods: {
var myChartes = echarts.init(document.getElementById("rms")); var myChartes = echarts.init(document.getElementById("rms"));
// console.log("==========", radata); // console.log("==========", radata);
let echartsColor = {WordColor:"#000",thread:"#000000",FigureColor:["#07CCCA ","#00BFF5","#FFBF00","#77DA63","#D5FF6B","#Ff6600","#FF9100","#5B6E96","#66FFCC","#B3B3B3","#FF00FF","#CC00FF","#FF9999"]} let echartsColor = { WordColor: "#000", thread: "#000000", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
setTimeout(() => { setTimeout(() => {
document.getElementById("rms").style.width ='100%'; document.getElementById("rms").style.width = '100%';
document.getElementById("rms").style.height =_this.vh; document.getElementById("rms").style.height = _this.vh;
}, 0); }, 0);
var option = { var option = {
tooltip: { tooltip: {
@@ -875,7 +886,7 @@ methods: {
if (params[i].seriesName != "暂降触发点") { if (params[i].seriesName != "暂降触发点") {
tips += tips +=
params[i].seriesName + ":" + (params[i].value[1]-0).toFixed(2) + "<br/>"; params[i].seriesName + ":" + (params[i].value[1] - 0).toFixed(2) + "<br/>";
} }
} }
return tips; return tips;
@@ -899,7 +910,7 @@ methods: {
}, },
title: { title: {
left: "center", left: "center",
text: "电网侧-电压 "+title, text: title,
subtitle: { subtitle: {
text: "电压", text: "电压",
align: "left", align: "left",
@@ -1061,10 +1072,14 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#FFCC00", color: "#FFCC00",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: radata, data: radata,
}, },
{ {
@@ -1072,10 +1087,14 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#009900", color: "#009900",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: rbdata, data: rbdata,
}, },
{ {
@@ -1083,10 +1102,14 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#CC0000", color: "#CC0000",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: rcdata, data: rcdata,
}, },
{ {
@@ -1137,7 +1160,7 @@ methods: {
], ],
}; };
myChartes.setOption(option) myChartes.setOption(option)
// window.echartsArr.push(myChartes); // window.echartsArr.push(myChartes);
setTimeout(() => { setTimeout(() => {
myChartes.resize(); myChartes.resize();
this.loading = false; this.loading = false;
@@ -1149,12 +1172,12 @@ methods: {
for (var step = 0; step < waveDatasTemp.length; step++) { for (var step = 0; step < waveDatasTemp.length; step++) {
var waveDataTemp = waveDatasTemp[step]; var waveDataTemp = waveDatasTemp[step];
this.drawPics(waveDataTemp, picHeight, step, show, myChartes,rmscm,rmscu,title); this.drawPics(waveDataTemp, picHeight, step, show, myChartes, rmscm, rmscu, title);
} }
} }
}, },
//绘制剩余横向的波形图 //绘制剩余横向的波形图
drawPics(waveDataTemp, picHeight, step, show, myChartes1,rmscm,rmscu,title) { drawPics(waveDataTemp, picHeight, step, show, myChartes1, rmscm, rmscu, title) {
step = step + 1; step = step + 1;
//新建瞬时DIV和RMS波形DIV //新建瞬时DIV和RMS波形DIV
// var waveId = 'wave' + step; // var waveId = 'wave' + step;
@@ -1228,55 +1251,55 @@ methods: {
var myChartes = echarts.init(document.getElementById(rmsId)); var myChartes = echarts.init(document.getElementById(rmsId));
//debugger //debugger
if(this.boxoList.systemType == "ZL"){ if (this.boxoList.systemType == "ZL") {
let str =[] let str = []
str = rmsId.split('s') str = rmsId.split('s')
let str1 = Number(str[1]) let str1 = Number(str[1])
var titlename ='' var titlename = ''
this.wp.channelNames.forEach((element,i) => { this.wp.channelNames.forEach((element, i) => {
if(i==4 || i==7 || i==10){ if (i == 4 || i == 7 || i == 10) {
if(str1==1 && i==4){ if (str1 == 1 && i == 4) {
let s =[] let s = []
let s1 ='' let s1 = ''
s=element.split('A') s = element.split('A')
if(s[0]=='LI'){ if (s[0] == 'LI') {
s1 ='电网侧-电流' s1 = '电网侧-电流'
}else{ } else {
s1= s[0]+'侧'+s[1] s1 = s[0] + '侧' + s[1]
} }
titlename = s1+' '+title titlename = s1 + ' ' + title
} }
if(str1==2 && i==7){ if (str1 == 2 && i == 7) {
let s =[] let s = []
let s1 ='' let s1 = ''
s=element.split('A') s = element.split('A')
if(s[0]=='SU'){ if (s[0] == 'SU') {
s1 ='负载侧-电压' s1 = '负载侧-电压'
}else{ } else {
s1= s[0]+'侧'+s[1] s1 = s[0] + '侧' + s[1]
} }
titlename = s1+' '+title titlename = s1 + ' ' + title
} }
if(str1==3 && i==10){ if (str1 == 3 && i == 10) {
let s =[] let s = []
let s1 ='' let s1 = ''
s=element.split('A') s = element.split('A')
if(s[0]=='SI'){ if (s[0] == 'SI') {
s1 ='负载侧-电流' s1 = '负载侧-电流'
}else{ } else {
s1= s[0]+'侧'+s[1] s1 = s[0] + '侧' + s[1]
} }
titlename = s1+' '+title titlename = s1 + ' ' + title
} }
} }
}); });
} }
let echartsColor = {WordColor:"#000",thread:"#000000",FigureColor:["#07CCCA ","#00BFF5","#FFBF00","#77DA63","#D5FF6B","#Ff6600","#FF9100","#5B6E96","#66FFCC","#B3B3B3","#FF00FF","#CC00FF","#FF9999"]} let echartsColor = { WordColor: "#000", thread: "#000000", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
var option = { var option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
@@ -1295,7 +1318,7 @@ methods: {
for (var i = 0; i < params.length; i++) { for (var i = 0; i < params.length; i++) {
if (params[i].seriesName != "暂降触发点") { if (params[i].seriesName != "暂降触发点") {
tips += tips +=
params[i].seriesName + ":" + (params[i].value[1]-0).toFixed(2) + "<br/>"; params[i].seriesName + ":" + (params[i].value[1] - 0).toFixed(2) + "<br/>";
} }
} }
return tips; return tips;
@@ -1479,10 +1502,14 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#FFCC00", color: "#FFCC00",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: radata, data: radata,
}, },
{ {
@@ -1490,10 +1517,14 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#009900", color: "#009900",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: rbdata, data: rbdata,
}, },
{ {
@@ -1501,16 +1532,20 @@ methods: {
type: "line", type: "line",
smooth: true, smooth: true,
symbol: "none", symbol: "none",
sampling: "lttb", sampling: "average",
itemStyle: { itemStyle: {
color: "#CC0000", color: "#CC0000",
}, },
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 1000,
large: true,
data: rcdata, data: rcdata,
}, },
], ],
}; };
myChartes.setOption(option) myChartes.setOption(option)
// window.echartsArr.push(myChartes); // window.echartsArr.push(myChartes);
setTimeout(() => { setTimeout(() => {
myChartes.resize(); myChartes.resize();
this.loading = false; this.loading = false;
@@ -1542,6 +1577,6 @@ methods: {
temp = temp < tempB ? temp : tempB; temp = temp < tempB ? temp : tempB;
return temp; return temp;
}, },
}, },
}; };
</script> </script>

View File

@@ -73,9 +73,9 @@ export default {
created() { created() {
if (this.flag == 1) { if (this.flag == 1) {
this.vh = mainHeight(165).height this.vh = mainHeight(200).height
} else { } else {
this.vh = mainHeight(165, 2).height this.vh = mainHeight(200, 2).height
} }
this.vw = '100%' this.vw = '100%'
}, },
@@ -156,7 +156,7 @@ export default {
// "变电站名称:" + // "变电站名称:" +
// this.boxoList.equipmentName + // this.boxoList.equipmentName +
' 监测点名称:' + ' 监测点名称:' +
this.boxoList.equipmentName + this.boxoList.lineName +
' 发生时刻:' + ' 发生时刻:' +
this.boxoList.startTime + this.boxoList.startTime +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
@@ -166,17 +166,16 @@ export default {
's' 's'
} }
else if (this.boxoList.systemType == 'WX') { else if (this.boxoList.systemType == 'WX') {
console.log("🚀 ~ initWaves ~ this.boxoList:", this.boxoList)
this.titles = this.titles =
' 监测点名称:' + ' 监测点名称:' +
this.boxoList.lineId + this.boxoList.lineName +
' 发生时刻:' + ' 发生时刻:' +
this.boxoList.startTime + this.boxoList.startTime +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
this.boxoList.featureAmplitude==null ? '/' : this.boxoList.featureAmplitude.toFixed(2) + (this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') +
' 持续时间:' + '% 持续时间:' +
this.boxoList.persistTime==null ? '/' : this.boxoList.persistTime + (this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's' 's'
} else { } else {
this.titles = this.titles =
@@ -547,6 +546,7 @@ export default {
wave.style.height = _this.vh; wave.style.height = _this.vh;
}, 0); }, 0);
var option = { var option = {
animation: false,
tooltip: { tooltip: {
top: '10px', top: '10px',
trigger: 'axis', trigger: 'axis',
@@ -557,6 +557,7 @@ export default {
fontSize: '15px', fontSize: '15px',
padding: 10 padding: 10
}, },
enterable: true,
formatter: function (params) { formatter: function (params) {
// console.log(params) // console.log(params)
var tips = '' var tips = ''
@@ -569,13 +570,7 @@ export default {
} }
return tips return tips
}, },
// axisPointer: {
// type: "cross",
// label: {
// color: "#fff",
// fontSize: 16,
// },
// },
textStyle: { textStyle: {
color: '#fff', color: '#fff',
fontStyle: 'normal', fontStyle: 'normal',
@@ -583,11 +578,12 @@ export default {
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0 borderWidth: 0,
}, },
title: { title: {
left: 'center', left: 'center',
text: '电网侧-电压 ' + title, text: title,
textStyle: { textStyle: {
fontSize: '0.8rem', fontSize: '0.8rem',
color: _this.DColor ? '#fff' : echartsColor.WordColor color: _this.DColor ? '#fff' : echartsColor.WordColor
@@ -738,10 +734,15 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#FFCC00' color: '#FFCC00'
}, },
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: adata data: adata
}, },
{ {
@@ -749,10 +750,15 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#009900' color: '#009900'
}, },
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: bdata data: bdata
}, },
{ {
@@ -760,10 +766,15 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#CC0000' color: '#CC0000'
}, },
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: cdata data: cdata
}, },
{ {
@@ -774,6 +785,7 @@ export default {
width: 18, width: 18,
height: 18 height: 18
}, },
data: cu data: cu
} }
] ]
@@ -906,6 +918,7 @@ export default {
var myChartes = echarts.init(waveIds) var myChartes = echarts.init(waveIds)
let echartsColor = { WordColor: "#000", thread: "#000000", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] } let echartsColor = { WordColor: "#000", thread: "#000000", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
var option = { var option = {
animation: false,
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
borderColor: 'grey', borderColor: 'grey',
@@ -921,13 +934,7 @@ export default {
} }
return tips return tips
}, },
// axisPointer: {
// type: "cross",
// label: {
// color: "#fff",
// fontSize: 16,
// },
// },
textStyle: { textStyle: {
color: '#fff', color: '#fff',
fontStyle: 'normal', fontStyle: 'normal',
@@ -1092,10 +1099,14 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#FFCC00' color: '#FFCC00'
}, },
large: true,
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
data: adata data: adata
}, },
{ {
@@ -1103,10 +1114,14 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#009900' color: '#009900'
}, },
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: bdata data: bdata
}, },
{ {
@@ -1114,10 +1129,14 @@ export default {
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
sampling: 'lttb', sampling: 'average',
itemStyle: { itemStyle: {
color: '#CC0000' color: '#CC0000'
}, },
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: cdata data: cdata
} }
] ]

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title"> <el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
<el-scrollbar> <el-scrollbar>
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef"> <el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
<el-form-item label="校验密码:" prop="password"> <el-form-item label="校验密码:" prop="password">

View File

@@ -68,7 +68,7 @@ const view = ref(true)
const view2 = ref(false) const view2 = ref(false)
const showBoxi = ref(true) const showBoxi = ref(true)
const bxactiveName = ref('ssbx') const bxactiveName = ref('ssbx')
const boxoList = ref({}) const boxoList: any = ref({})
const wp = ref({}) const wp = ref({})
const value = ref(1) const value = ref(1)
const options = ref([ const options = ref([
@@ -108,7 +108,7 @@ const tableStore = new TableStore({
{ title: '事件发生位置', field: 'evtParamPosition', align: 'center' }, { title: '事件发生位置', field: 'evtParamPosition', align: 'center' },
{ title: '相别', field: 'evtParamPhase', align: 'center' }, { title: '相别', field: 'evtParamPhase', align: 'center' },
{ title: '持续时间(s)', field: 'evtParamTm', align: 'center' }, { title: '持续时间(s)', field: 'evtParamTm', align: 'center' },
{ title: '暂降深度', field: 'evtParamVVaDepth', align: 'center' }, { title: '暂降深度(%)', field: 'evtParamVVaDepth', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' }, { title: '发生时刻', field: 'startTime', align: 'center' },
{ {
title: '操作', title: '操作',
@@ -128,6 +128,9 @@ const tableStore = new TableStore({
click: async row => { click: async row => {
row.loading = true row.loading = true
boxoList.value = row boxoList.value = row
boxoList.value.systemType = 'WX'
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? (row.evtParamVVaDepth - 0) : null
boxoList.value.persistTime = row.evtParamTm != '-' ? (row.evtParamTm - 0) : null
await analyseWave(row.id) await analyseWave(row.id)
.then(res => { .then(res => {
row.loading = false row.loading = false
@@ -163,7 +166,9 @@ const tableStore = new TableStore({
loadCallback: () => { loadCallback: () => {
tableStore.table.data.forEach((item: any) => { tableStore.table.data.forEach((item: any) => {
item.loading = false item.loading = false
item.evtParamTm = item.evtParamTm.split('s')[0] item.evtParamTm = item.evtParamTm.split('s')[0] != '-' ? (item.evtParamTm.split('s')[0] - 0).toFixed(2) : '-'
item.evtParamVVaDepth = item.evtParamVVaDepth.split('%')[0] != "-" ? (item.evtParamVVaDepth.split('%')[0] - 0).toFixed(2) : '-'
}) })
} }
}) })
@@ -267,7 +272,7 @@ const backbxlb = () => {
onMounted(() => { onMounted(() => {
tableStore.index() tableStore.index()
}) })
const bxecharts = mainHeight(155).height as any const bxecharts = mainHeight(175).height as any
setTimeout(() => { setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any tableStore.table.height = mainHeight(200).height as any
}, 0) }, 0)

View File

@@ -14,12 +14,12 @@
</div> </div>
<el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick"> <el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="瞬时波形" name="ssbx" <el-tab-pane label="瞬时波形" name="ssbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;padding-bottom:200px;'"> :style="'height:' + bxecharts + ';overflow-y: scroll;'">
<shushiboxi v-if="isWp && wp && activeName == 'ssbx'" :value="value" :boxoList="boxoList" :wp="wp"> <shushiboxi v-if="isWp && wp && activeName == 'ssbx'" :value="value" :boxoList="boxoList" :wp="wp">
</shushiboxi> </shushiboxi>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="RMS波形" name="rmsbx" <el-tab-pane label="RMS波形" name="rmsbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;padding-bottom:200px;'"> :style="'height:' + bxecharts + ';overflow-y: scroll;'">
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx'" :value="value" :boxoList="boxoList" :wp="wp"> <rmsboxi v-if="isWp && wp && activeName == 'rmsbx'" :value="value" :boxoList="boxoList" :wp="wp">
</rmsboxi> </rmsboxi>
</el-tab-pane> </el-tab-pane>
@@ -104,7 +104,7 @@ const changeView = () => {
showBoxi.value = true showBoxi.value = true
}, 0) }, 0)
} }
const bxecharts = mainHeight(195).height as any const bxecharts = mainHeight(345).height as any
const handleClick = (tab: any, event: any) => { const handleClick = (tab: any, event: any) => {
// activeName.value = tab.index // activeName.value = tab.index

View File

@@ -8,7 +8,7 @@
@handleHideCharts="isWaveCharts = false" @handleHideCharts="isWaveCharts = false"
:wp="wp" :wp="wp"
/> />
<el-button v-if="isWaveCharts" type="primary" @click="handleBack" :icon="ArrowLeft">返回</el-button> <!-- <el-button v-if="isWaveCharts" type="primary" @click="handleBack" :icon="ArrowLeft">返回</el-button> -->
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@@ -33,7 +33,7 @@ const waveFormAnalysisRef = ref()
const headerRef = ref() const headerRef = ref()
const tableStore: any = new TableStore({ const tableStore: any = new TableStore({
url: '/cs-device-boot/csGroup/deviceDataByType', url: '/cs-device-boot/csGroup/deviceDataByType',
publicHeight: 210, publicHeight: 215,
method: 'POST', method: 'POST',
column: [ column: [
// { width: '60', type: 'checkbox', fixed: 'left' }, // { width: '60', type: 'checkbox', fixed: 'left' },
@@ -54,7 +54,7 @@ const tableStore: any = new TableStore({
title: '持续时间(s)', title: '持续时间(s)',
minWidth: 100, minWidth: 100,
formatter: (row: any) => { formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/' row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
return row.cellValue return row.cellValue
} }
}, },
@@ -91,7 +91,7 @@ const tableStore: any = new TableStore({
row.loading = false row.loading = false
if (res != undefined) { if (res != undefined) {
boxoList.value = row boxoList.value = row
// boxoList.value.systemType = 'WX' boxoList.value.systemType = 'WX'
wp.value = res.data wp.value = res.data
view.value = false view.value = false
view2.value = true view2.value = true

View File

@@ -108,14 +108,14 @@
<TableHeader :showSearch="false" ref="tableHeaderRef" :key="searchFormIndex" <TableHeader :showSearch="false" ref="tableHeaderRef" :key="searchFormIndex"
@selectChange="selectChange"> @selectChange="selectChange">
<template v-slot:select> <template v-slot:select>
<el-form-item for="-" label="统计指标" label-width="80px"> <el-form-item for="-" label="统计指标">
<el-select collapse-tags collapse-tags-tooltip v-model="searchForm.index" <el-select collapse-tags collapse-tags-tooltip v-model="searchForm.index"
placeholder="请选择统计指标" multiple :multiple-limit="3"> placeholder="请选择统计指标" multiple :multiple-limit="3">
<el-option v-for="item in indexOptions" :key="item.id" :label="item.name" <el-option v-for="item in indexOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item for="-" label="值类型" label-width="80px"> <el-form-item for="-" label="值类型">
<el-select style="width: 160px !important" v-model="searchForm.dataLevel"> <el-select style="width: 160px !important" v-model="searchForm.dataLevel">
<el-option value="Primary" label="一次值"></el-option> <el-option value="Primary" label="一次值"></el-option>
<el-option value="Secondary" label="二次值"></el-option> <el-option value="Secondary" label="二次值"></el-option>
@@ -256,7 +256,7 @@ const nodeClick = async (e: anyObj) => {
//查询测试项信息 //查询测试项信息
await getTestRecordInfo(id) await getTestRecordInfo(id)
.then(res => { .then(async (res) => {
deviceData.value = res.data deviceData.value = res.data
if (res.data.records.length == 1) { if (res.data.records.length == 1) {
activeName.value = res.data.records[0].id activeName.value = res.data.records[0].id
@@ -269,8 +269,13 @@ const nodeClick = async (e: anyObj) => {
} }
}) })
} }
searchForm.value.index = [indexOptions.value[0].id]
schemeTreeRef.value.getPlanData(deviceData.value) schemeTreeRef.value.getPlanData(deviceData.value)
await setTimeout(() => {
init(true) init(true)
}, 500);
loading.value = false loading.value = false
}) })
.catch(e => { .catch(e => {
@@ -429,7 +434,7 @@ const init = (flag: boolean) => {
const xname = params[0].value[0]; const xname = params[0].value[0];
let str = `${xname}<br>`; let str = `${xname}<br>`;
params.forEach((el, index) => { params.forEach((el, index) => {
str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1]}${el.value[2]}<br>`; str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1] ? (el.value[1] + ' ' + el.value[2]) : '-'}<br>`;
}); });
return str; return str;
}, },
@@ -494,7 +499,7 @@ const init = (flag: boolean) => {
} }
seriesList.push([cc.time, cc.statisticalData?.toFixed(2),cc.unit]) seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit])
}) })

View File

@@ -3,45 +3,22 @@
<TableHeader> <TableHeader>
<template #select> <template #select>
<el-form-item label="数据分类"> <el-form-item label="数据分类">
<el-select <el-select v-model="tableStore.table.params.dataType" multiple filterable collapse-tags clearable
v-model="tableStore.table.params.dataType" placeholder="请选择数据分类">
multiple <el-option v-for="item in DataTypeSelect" :key="item.id" :label="item.name"
filterable :value="item.id"></el-option>
collapse-tags
clearable
placeholder="请选择数据分类"
>
<el-option
v-for="item in DataTypeSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="数据存储"> <el-form-item label="数据存储">
<el-select <el-select v-model="tableStore.table.params.classId" multiple filterable collapse-tags clearable
v-model="tableStore.table.params.classId" placeholder="请选择数据存储">
multiple <el-option v-for="item in DataSelect" :key="item.id" :label="item.name"
filterable :value="item.id"></el-option>
collapse-tags
clearable
placeholder="请选择数据存储"
>
<el-option
v-for="item in DataSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="过滤筛选"> <el-form-item label="过滤筛选">
<el-input <el-input v-model="tableStore.table.params.searchValue" placeholder="数据名称、别名、名称"
v-model="tableStore.table.params.searchValue" clearable></el-input>
placeholder="数据名称、别名、名称"
clearable
></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template #operation> <template #operation>
@@ -75,18 +52,18 @@ const tableStore = new TableStore({
url: '/system-boot/csDictData/list', url: '/system-boot/csDictData/list',
method: 'POST', method: 'POST',
column: [ column: [
{ title: '序号', type: 'seq',width:60 }, { title: '序号', type: 'seq', width: 60 },
{ title: '数据分类', field: 'dataTypeName' , width: 170 }, { title: '数据分类', field: 'dataTypeName', minWidth: 170 },
{ title: '数据名称', field: 'name' , width: 220 }, { title: '数据名称', field: 'name', minWidth: 220 },
{ title: '别名', field: 'otherName' , width: 220 }, { title: '别名', field: 'otherName', minWidth: 220 },
{ title: '展示名称', field: 'showName' , width: 170 }, { title: '展示名称', field: 'showName', minWidth: 170 },
{ title: '相别', field: 'phaseName', width: 80 }, { title: '相别', field: 'phaseName', minWidth: 80 },
{ title: '单位', field: 'unit', width: 80 }, { title: '单位', field: 'unit', minWidth: 80 },
{ title: '基础数据类型', field: 'type', width: 170 }, { title: '基础数据类型', field: 'type', minWidth: 170 },
{ title: '数据谐波次数', field: 'harmStartEnd', width: 170 }, { title: '数据谐波次数', field: 'harmStartEnd', minWidth: 170 },
{ title: '数据统计方法', field: 'statMethod', width: 170 }, { title: '数据统计方法', field: 'statMethod', minWidth: 170 },
{ title: '数据存储', field: 'classIdName' , width: 120 }, { title: '数据存储', field: 'classIdName', minWidth: 120 },
{ title: '数据来源', field: 'resourcesIdName' , width: 120 }, { title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
@@ -142,8 +119,8 @@ const tableStore = new TableStore({
}) })
tableStore.table.params.searchValue = '' tableStore.table.params.searchValue = ''
tableStore.table.params.dataType = '' tableStore.table.params.dataType = []
tableStore.table.params.classId = '' tableStore.table.params.classId = []
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {
tableStore.index() tableStore.index()

View File

@@ -127,7 +127,7 @@ const tableStore = new TableStore({
], ],
loadCallback: () => { loadCallback: () => {
tableStore.table.data.forEach((item: any) => { tableStore.table.data.forEach((item: any) => {
item.statusName = item.status === 1 ? '用' : '用' item.statusName = item.status === 1 ? '用' : '用'
for (let key in item) { for (let key in item) {
if (typeof item[key] !== 'number') { if (typeof item[key] !== 'number') {
item[key] = item[key] || '/' item[key] = item[key] || '/'