设备监控修改
This commit is contained in:
@@ -4,19 +4,31 @@
|
||||
<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="请选择统计指标">
|
||||
<el-option v-for="item in indexOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
v-model="searchForm.index"
|
||||
placeholder="请选择统计指标"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in indexOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" :loading="loading" @click="init">查询</el-button>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<div class="harmonic_body" v-loading="loading">
|
||||
<div class="harmonic_body_charts" :style="{ height: height }" v-for="(item, index) in chartsList"
|
||||
:key="index">
|
||||
<div
|
||||
class="harmonic_body_charts"
|
||||
:style="{ height: height }"
|
||||
v-for="(item, index) in chartsList"
|
||||
:key="index"
|
||||
>
|
||||
<p class="charts_title">
|
||||
{{
|
||||
indexOptions.find((item: any) => {
|
||||
@@ -43,16 +55,55 @@ searchForm.value = {
|
||||
}
|
||||
//统计指标
|
||||
const indexOptions: any = ref([])
|
||||
const legendDictList: any = ref([])
|
||||
queryByCode('portable-harmonic').then(res => {
|
||||
queryCsDictTree(res.data.id).then(item => {
|
||||
indexOptions.value = item.data
|
||||
searchForm.value.index[0] = indexOptions.value[0].id
|
||||
})
|
||||
queryStatistical(res.data.id).then(vv => {
|
||||
legendDictList.value = vv.data
|
||||
})
|
||||
})
|
||||
// const legendDictList: any = ref([])
|
||||
// queryByCode('portable-harmonic').then(res => {
|
||||
// queryCsDictTree(res.data.id).then(item => {
|
||||
// indexOptions.value = item.data
|
||||
// searchForm.value.index[0] = indexOptions.value[0].id
|
||||
// })
|
||||
// queryStatistical(res.data.id).then(vv => {
|
||||
// legendDictList.value = vv.data
|
||||
// })
|
||||
// })
|
||||
indexOptions.value = [
|
||||
{
|
||||
id: 0,
|
||||
name: '电压总有效值(kV)'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电流总有效值(A)'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '有功功率(kW)'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '无功功率(kW)'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '基波电压总有效值(kV)'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '基波电流总有效值(A)'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '频率(Hz)'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: '电压不平衡度(%)'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '电流不平衡度(%)'
|
||||
}
|
||||
]
|
||||
searchForm.value.index[0] = indexOptions.value[0].id
|
||||
const heightTop = mainHeight(275)
|
||||
let height: any = mainHeight(275).height
|
||||
//谐波频谱参数
|
||||
@@ -76,7 +127,7 @@ const init = () => {
|
||||
})
|
||||
//查询谐波频谱
|
||||
getDeviceHarmonicSpectrumData(params.value).then(res => {
|
||||
res.data.length > 3 ? height = mainHeight(275, 3).height : height = mainHeight(275, res.data.length).height
|
||||
res.data.length > 3 ? (height = mainHeight(275, 3).height) : (height = mainHeight(275, res.data.length).height)
|
||||
chartsList.value = res.data
|
||||
//数据根据相别组装成新数组
|
||||
chartsList.value.map((item: any) => {
|
||||
@@ -96,8 +147,6 @@ const init = () => {
|
||||
return
|
||||
})
|
||||
|
||||
|
||||
|
||||
//循环渲染图表
|
||||
chartsList.value &&
|
||||
chartsList.value.map((item: any, index: any) => {
|
||||
@@ -155,8 +204,7 @@ const init = () => {
|
||||
},
|
||||
boundaryGap: false
|
||||
},
|
||||
yAxis:
|
||||
{
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name:
|
||||
item.thdDataVOS.length != 0 &&
|
||||
@@ -175,9 +223,8 @@ const init = () => {
|
||||
}
|
||||
},
|
||||
splitNumber: 5,
|
||||
minInterval: 1,
|
||||
}
|
||||
,
|
||||
minInterval: 1
|
||||
},
|
||||
series: []
|
||||
}
|
||||
}
|
||||
@@ -214,7 +261,6 @@ const init = () => {
|
||||
let [min, max] = yMethod(aar)
|
||||
item.echartsData.options.yAxis.max = max
|
||||
item.echartsData.options.yAxis.min = min
|
||||
|
||||
})
|
||||
loading.value = false
|
||||
})
|
||||
@@ -232,7 +278,7 @@ watch(
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
onMounted(() => { })
|
||||
onMounted(() => {})
|
||||
defineExpose({ getHarmonicSpectrumParams })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -263,7 +309,6 @@ defineExpose({ getHarmonicSpectrumParams })
|
||||
|
||||
// padding-bottom: 200px;
|
||||
.harmonic_body_charts {
|
||||
|
||||
// margin: 15px 0;
|
||||
border: 1px solid #eee;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user