修改 海南测试bug
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button>
|
||||
<el-upload action="" accept=".xlsx" :show-file-list="false" :auto-upload="false" :on-change="choose">
|
||||
<el-upload action="" accept=".xlsx" :show-file-list="false" :auto-upload="false"
|
||||
:on-change="choose">
|
||||
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
|
||||
</el-upload>
|
||||
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
|
||||
@@ -51,13 +52,14 @@
|
||||
<MyEChart :options="options2" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="谐波电流幅值" name="3" class="mt10" style="position: relative;">
|
||||
|
||||
<el-select v-model="harmonicValue" style="position: absolute;z-index:99;top:-10px; right: 185px; width: 80px"
|
||||
placeholder="请选择谐波" @change="onSubmit">
|
||||
<el-option v-for="item in harmonic" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
<el-select v-model="harmonicValue"
|
||||
style="position: absolute;z-index:99;top:-10px; right: 185px; width: 80px"
|
||||
placeholder="请选择谐波" @change="onSubmit">
|
||||
<el-option v-for="item in harmonic" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
|
||||
<MyEChart :options="options3" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="首端电压模型参数" name="4">
|
||||
@@ -66,9 +68,10 @@
|
||||
<vxe-colgroup field="group0" title="模型参数">
|
||||
<vxe-column field="name" width="180" title="相别"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-column field="c" title="C"></vxe-column>
|
||||
|
||||
<vxe-column field="a" title="a"></vxe-column>
|
||||
<vxe-column field="b" title="b"></vxe-column>
|
||||
<vxe-column field="c" title="c"></vxe-column>
|
||||
</vxe-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -148,6 +151,7 @@ import {
|
||||
getLineDetailData,
|
||||
modelTraining
|
||||
} from '@/api/advance-boot/bearingCapacity'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const props = defineProps(['rowList'])
|
||||
const harmonic = harmonicOptions.filter(item => item.value < 26)
|
||||
@@ -281,7 +285,7 @@ const onSubmit = async () => {
|
||||
})
|
||||
}
|
||||
setEChart(1, res[0].data.data, '有功功率', 'w')
|
||||
setEChart(2, res[1].data.data, '无功功率', 'w')
|
||||
setEChart(2, res[1].data.data, '无功功率', 'Var')
|
||||
setEChart(3, res[2].data.data, '谐波电流幅值', 'A')
|
||||
showBtn.value = true
|
||||
loading.value = false
|
||||
@@ -307,24 +311,55 @@ const modelTrain = () => {
|
||||
}
|
||||
|
||||
const setEChart = (val: any, data: any, text: string, name: string) => {
|
||||
// console.log("🚀 ~ setEChart ~ data:", data.map(item => item.value))
|
||||
let [min, max] = yMethod(data.map(item => item.value))
|
||||
let options = {
|
||||
title: {
|
||||
text: text,
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
// textStyle: {
|
||||
// fontWeight: 'normal'
|
||||
// }
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
color: '#fff',
|
||||
fontSize: 16
|
||||
}
|
||||
},
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0,
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
data: data.filter(item => item.phaseType == 'A').map(item => item.time),
|
||||
|
||||
// data: data.filter(item => item.phaseType == 'A').map(item => item.time),
|
||||
name: '时间',
|
||||
position: 'bottom' // 设置 x 轴在底部
|
||||
type: 'time',
|
||||
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: name,
|
||||
max: Math.ceil(Math.max(...data.map(item => item.value))),
|
||||
min: Math.floor(Math.min(...data.map(item => item.value)))
|
||||
max: max,
|
||||
min: min
|
||||
// max: Math.ceil(Math.max(...data.map(item => item.value))),
|
||||
// min: Math.floor(Math.min(...data.map(item => item.value)))
|
||||
},
|
||||
// legend: {
|
||||
// data: ['A', 'B', 'C']
|
||||
@@ -341,9 +376,10 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
|
||||
type: 'line',
|
||||
// smooth: true,
|
||||
symbol: 'none',
|
||||
data: data
|
||||
.filter(item => item.phaseType == 'A')
|
||||
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3)))
|
||||
data:
|
||||
data
|
||||
.filter(item => item.phaseType == 'A')
|
||||
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
|
||||
},
|
||||
{
|
||||
name: 'B相',
|
||||
@@ -352,7 +388,7 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
|
||||
symbol: 'none',
|
||||
data: data
|
||||
.filter(item => item.phaseType == 'B')
|
||||
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3)))
|
||||
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
|
||||
},
|
||||
{
|
||||
name: 'C相',
|
||||
@@ -361,9 +397,24 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
|
||||
symbol: 'none',
|
||||
data: data
|
||||
.filter(item => item.phaseType == 'C')
|
||||
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3)))
|
||||
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
|
||||
}
|
||||
]
|
||||
],
|
||||
options: {
|
||||
dataZoom: [{
|
||||
type: 'inside',
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 10
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 10
|
||||
}]
|
||||
}
|
||||
}
|
||||
val == 1
|
||||
? (options1.value = options)
|
||||
@@ -579,6 +630,7 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user