修改实时数据
This commit is contained in:
@@ -4,33 +4,18 @@
|
|||||||
<div class="harmonic_select">
|
<div class="harmonic_select">
|
||||||
<el-form :model="searchForm" id="history_select">
|
<el-form :model="searchForm" id="history_select">
|
||||||
<el-form-item label="稳态指标">
|
<el-form-item label="稳态指标">
|
||||||
<el-select
|
<el-select multiple collapse-tags collapse-tags-tooltip v-model="searchForm.index"
|
||||||
multiple
|
placeholder="请选择统计指标" :multiple-limit="3" value-key="id">
|
||||||
collapse-tags
|
<el-option v-for="(item, index) in indexOptions" :label="item.name" :key="index"
|
||||||
collapse-tags-tooltip
|
:value="item"></el-option>
|
||||||
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-button type="primary" :loading="loading" @click="init">查询</el-button> -->
|
<!-- <el-button type="primary" :loading="loading" @click="init">查询</el-button> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="harmonic_body">
|
<div class="harmonic_body">
|
||||||
<div
|
<div class="harmonic_body_charts" :style="{ height: height }" v-for="(item, index) in searchForm.index"
|
||||||
class="harmonic_body_charts"
|
:key="index">
|
||||||
:style="{ height: height }"
|
|
||||||
v-for="(item, index) in searchForm.index"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<MyEchart :ref="setChildRef(index)" :options="item.echartsData" :isInterVal="true"></MyEchart>
|
<MyEchart :ref="setChildRef(index)" :options="item.echartsData" :isInterVal="true"></MyEchart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -363,8 +348,8 @@ const init = () => {
|
|||||||
? (height = mainHeight(275, 3).height)
|
? (height = mainHeight(275, 3).height)
|
||||||
: (height = mainHeight(275, searchForm.value.index.length).height)
|
: (height = mainHeight(275, searchForm.value.index.length).height)
|
||||||
item.children.map((zz: any, zzIndex: any) => {
|
item.children.map((zz: any, zzIndex: any) => {
|
||||||
let [min, max] = yMethod(allDataList.value)
|
|
||||||
console.log(max, min)
|
|
||||||
item.echartsData.series.push({
|
item.echartsData.series.push({
|
||||||
name: zz.phase,
|
name: zz.phase,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@@ -377,15 +362,19 @@ const init = () => {
|
|||||||
smooth: true, // 这里设置平滑曲线
|
smooth: true, // 这里设置平滑曲线
|
||||||
symbol: 'none' // 设置为 'none' 去掉折点小圆
|
symbol: 'none' // 设置为 'none' 去掉折点小圆
|
||||||
})
|
})
|
||||||
item.echartsData.yAxis.max = max
|
|
||||||
item.echartsData.yAxis.min = min
|
|
||||||
})
|
})
|
||||||
|
let arrList=item.children?.map(item => item.yMethodList.map(val => val[1])).flat()
|
||||||
|
let [min, max] = yMethod(arrList.length==0?[0]:arrList)
|
||||||
|
console.log("🚀 ~ item.children.map ~ zz.yMethodList:",min, max )
|
||||||
|
item.echartsData.yAxis.max = max
|
||||||
|
item.echartsData.yAxis.min = min
|
||||||
})
|
})
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => { })
|
||||||
defineExpose({ resetData, setHarmonicSpectrumData })
|
defineExpose({ resetData, setHarmonicSpectrumData })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user