谐波/间谐波电压含有率谐波电流有效值谐波次数特殊处理
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
class="history_count"
|
||||
v-for="(item, index) in countData"
|
||||
:key="index"
|
||||
:label="item.name + '谐波次数'"
|
||||
:label="item.name.includes('次数') ? item.name : item.name + '谐波次数'"
|
||||
v-show="item.countOptions.length != 0"
|
||||
>
|
||||
<!-- v-if="item.countOptions.length != 0" -->
|
||||
@@ -181,7 +181,7 @@ const init = async () => {
|
||||
//颜色数组
|
||||
const colorList = color
|
||||
//选择的指标使用方法处理
|
||||
initSearchFormIndexAndCount(searchForm.value.index)
|
||||
formatCountOptions(searchForm.value.index)
|
||||
//查询历史趋势
|
||||
historyDataList.value = []
|
||||
chartTitle.value = ''
|
||||
@@ -529,7 +529,7 @@ const handleExport = async () => {
|
||||
const countData: any = ref([])
|
||||
|
||||
//根据选择的指标处理谐波次数
|
||||
const initSearchFormIndexAndCount = (list: any) => {
|
||||
const formatCountOptions = (list: any) => {
|
||||
if (list.length != 0) {
|
||||
list.map((item: any, index: any) => {
|
||||
if (!countData.value[index]) {
|
||||
@@ -558,9 +558,15 @@ const initSearchFormIndexAndCount = (list: any) => {
|
||||
}
|
||||
})
|
||||
})
|
||||
console.log('🚀 ~ initSearchFormIndexAndCount ~ countData.value:', countData.value)
|
||||
|
||||
// countData.value = countData.value.filter(item => item.countOptions.length > 0);
|
||||
countData.value.map((item: any, key: any) => {
|
||||
if (item.name.includes('谐波电流有效值')) {
|
||||
item.name = '谐波电流次数'
|
||||
} else if (item.name.includes('谐波电压含有率')) {
|
||||
item.name = '谐波电压次数'
|
||||
} else if (item.name.includes('间谐波电压含有率')) {
|
||||
item.name = '间谐波电压次数'
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
tableHeaderRef.value.computedSearchRow()
|
||||
@@ -583,7 +589,7 @@ watch(
|
||||
(val: any, oldval: any) => {
|
||||
if (val) {
|
||||
setTimeout(() => {
|
||||
initSearchFormIndexAndCount(val)
|
||||
formatCountOptions(val)
|
||||
}, 100)
|
||||
if (val == 0) {
|
||||
countData.value = []
|
||||
@@ -604,18 +610,6 @@ watch(
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
// watch(
|
||||
// () => trendRequestData.value,
|
||||
// (val: any, oldval: any) => {
|
||||
// if (val) {
|
||||
// init()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// deep: true,
|
||||
// immediate: true
|
||||
// }
|
||||
// )
|
||||
onMounted(() => {
|
||||
datePickerRef.value.setInterval(5)
|
||||
})
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
for="-"
|
||||
v-for="(item, index) in countData"
|
||||
:key="index"
|
||||
:label="item.name + '谐波次数'"
|
||||
:label="item.name.includes('次数') ? item.name : item.name + '谐波次数'"
|
||||
label-width="180px"
|
||||
v-show="item.countOptions.length != 0"
|
||||
>
|
||||
@@ -750,6 +750,15 @@ const formatCountOptions = (list: any) => {
|
||||
}
|
||||
})
|
||||
})
|
||||
countData.value.map((item: any, key: any) => {
|
||||
if (item.name.includes('谐波电流有效值')) {
|
||||
item.name = '谐波电流次数'
|
||||
} else if (item.name.includes('谐波电压含有率')) {
|
||||
item.name = '谐波电压次数'
|
||||
} else if (item.name.includes('间谐波电压含有率')) {
|
||||
item.name = '间谐波电压次数'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
countData.value = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user