修改测试bug

This commit is contained in:
GGJ
2024-10-22 15:55:24 +08:00
parent 25ffc10857
commit aed37ba624
4 changed files with 193 additions and 252 deletions

View File

@@ -4,33 +4,18 @@
<div class="harmonic_select">
<el-form :model="searchForm" id="history_select">
<el-form-item label="稳态指标">
<el-select
multiple
collapse-tags
collapse-tags-tooltip
v-model="searchForm.index"
placeholder="请选择统计指标"
:multiple-limit="3"
value-key="id"
>
<el-option
v-for="(item, index) in indexOptions"
:label="item.name"
:key="index"
:value="item"
></el-option>
<el-select multiple collapse-tags collapse-tags-tooltip v-model="searchForm.index"
placeholder="请选择统计指标" :multiple-limit="3" value-key="id">
<el-option v-for="(item, index) in indexOptions" :label="item.name" :key="index"
:value="item"></el-option>
</el-select>
</el-form-item>
<!-- <el-button type="primary" :loading="loading" @click="init">查询</el-button> -->
</el-form>
</div>
<div class="harmonic_body">
<div
class="harmonic_body_charts"
:style="{ height: height }"
v-for="(item, index) in searchForm.index"
:key="index"
>
<div class="harmonic_body_charts" :style="{ height: height }" v-for="(item, index) in searchForm.index"
:key="index">
<MyEchart :ref="setChildRef(index)" :options="item.echartsData" :isInterVal="true"></MyEchart>
</div>
</div>
@@ -271,6 +256,7 @@ const resetData = () => {
resetData()
const mqttMessage: any = ref()
const setHarmonicSpectrumData = (val: any) => {
console.log("🚀 ~ setHarmonicSpectrumData ~ val:", val)
mqttMessage.value = val
init()
}
@@ -280,7 +266,7 @@ const setChildRef = (index: any) => {
}
const childRefs: any = {}
const init = () => {
resetData()
// resetData()
console.log(searchForm.value.index, '----------')
loading.value = true
searchForm.value.index.map((item: any, index: any) => {
@@ -324,13 +310,21 @@ const init = () => {
// right: '4%'
// },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
show: false
color: '#fff',
fontSize: 16
}
}
},
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0
},
xAxis: {
name: '时间',
@@ -347,20 +341,7 @@ const init = () => {
yAxis: {
type: 'value',
name: item.unit,
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#000'
}
},
splitNumber: 5,
minInterval: 1
},
series: []
}
@@ -390,7 +371,7 @@ const init = () => {
loading.value = false
}
onMounted(() => {})
onMounted(() => { })
defineExpose({ resetData, setHarmonicSpectrumData })
</script>
<style lang="scss" scoped>
@@ -418,6 +399,7 @@ defineExpose({ resetData, setHarmonicSpectrumData })
.harmonic_body {
flex: 1;
overflow-y: auto;
.harmonic_body_charts {
border: 1px solid #eee;
position: relative;