修改 bug

This commit is contained in:
GGJ
2024-09-27 16:22:34 +08:00
parent a6ee1bd322
commit 80d0bb9d41
9 changed files with 146 additions and 122 deletions

View File

@@ -13,6 +13,7 @@
collapse-tags-tooltip
v-model="searchForm.index"
placeholder="请选择统计指标"
@change="onIndexChange($event)"
>
<el-option
v-for="item in indexOptions"
@@ -28,11 +29,13 @@
v-if="item.countOptions.length != 0"
label-width="180px"
>
<el-select
v-model="item.count"
multiple
collapse-tags
collapse-tags-tooltip
@change="onCountChange($event, index)"
placeholder="请选择谐波次数"
>
<el-option v-for="vv in item.countOptions" :key="vv" :label="vv" :value="vv"></el-option>
@@ -274,16 +277,10 @@ const init = async () => {
right: '3%', // 位置调整
top: 0,
bottom: 20,
width: 400,
width: 430,
height: 50
},
grid: {
left: '3%',
right: '5%',
bottom: '5%',
top: '8%',
containLabel: true
},
xAxis: [
{
type: 'category',
@@ -460,7 +457,7 @@ const handleExport = async () => {
if (deviceData.value.records && deviceData.value.records.length != 0) {
let csv = '',
obj = {}
obj:any = {}
obj = deviceData.value.records.find((item: any) => {
return item.id == activeName.value
})
@@ -613,6 +610,17 @@ const initSearchFormIndexAndCount = (list: any) => {
})
}
}
// 判断下拉框是否存在
const onCountChange = (val: any, index: any) => {
if(val.length==0){
countData.value[index].count=[countData.value[index].countOptions[0]]
}
}
const onIndexChange = (val: any, ) => {
if(val.length==0){
searchForm.value.index=[indexOptions.value[0].id]
}
}
watch(
() => searchForm.value.index,
(val: any, oldval: any) => {
@@ -638,7 +646,7 @@ watch(
}
)
// watch(
// () => trendRequestData.value,
// () => trendRequestData.value,
// (val: any, oldval: any) => {
// if (val) {
// init()