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