谐波次数、弹窗位置

This commit is contained in:
caozehui
2025-01-13 13:57:24 +08:00
parent 4bb4eb80d9
commit 17fe29cb1b
7 changed files with 44 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog :append-to-body="appendToBody" class="dialog" title="数据查询" :model-value='visible' @close="close"
v-bind="dialogBig" :draggable="false" style="margin-left: 20%;">
v-bind="dialogBig" :draggable="false">
<div class="data-check-dialog">
<div class="data-check-head">
<el-form :model='formContent' label-width="auto" class="form-three ">
@@ -63,7 +63,7 @@
</el-popover>
</span>
</div>
<el-form-item style="margin-left: 0px;margin-bottom:0px !important;width: 210px;" v-if="harmNumList.length" label='谐波次数'>
<el-form-item style="margin-left: 0px;margin-bottom:0px !important;width: 210px;" v-if="harmNumList.length" label='次数'>
<el-select v-model="currentHarmNum">
<el-option v-for="item in harmNumList" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
@@ -341,7 +341,7 @@ const updateTableData = async () => {
} else if (keys1.length != 0) {
let tempHarmNumList: { value: string, label: string }[] = []
for (let [key, value] of resTableData.resultData) {
tempHarmNumList.push({value: key, label: value.isData === '1' ? key : value.isData === '4' ? `${key}/` : `${key}(不符合)`})
tempHarmNumList.push({value: key, label: value.isData === 1 ? key : value.isData === 4 ? `${formatHarmNum(key)}/` : `${formatHarmNum(key)}(不符合)`})
}
Object.assign(harmNumList, tempHarmNumList)
@@ -455,6 +455,14 @@ const setCheckResultData = (data: CheckData.ResCheckResult) => {
Object.assign(checkResultData, result)
}
const formatHarmNum = (num: string) => {
if(num.includes('.5')){
return num
}else{
return num.replace('.0','')
}
}
const setRawData = (data: CheckData.RawDataItem[]) => {
console.log("原始数据", data)
data.forEach((item: CheckData.RawDataItem) => {
@@ -605,7 +613,7 @@ defineExpose({
display: flex;
flex-direction: column;
align-items: center;
max-height: 473px;
max-height: 495px;
padding: 10px 0.5% 0px 0.5%;
border: 1px solid #ccc;