修改历史趋势和方案数据选择指标存在默认值问题

This commit is contained in:
zhujiyan
2024-11-01 15:20:43 +08:00
parent c407b7ef57
commit 59969df8f0
3 changed files with 29 additions and 39 deletions

View File

@@ -62,11 +62,10 @@
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, reactive, nextTick, defineEmits } from 'vue'
import { VxeGridProps, VxeGridPropTypes } from 'vxe-table'
import { ref, onMounted, defineEmits } from 'vue'
import { VxeGridProps } from 'vxe-table'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import MyEchart from '@/components/echarts/MyEchart.vue'
import { getDeviceTrendDataGroup, getDeviceTrendData } from '@/api/cs-device-boot/EquipmentDelivery.ts'
const activeName = ref(0)
const emit = defineEmits(['changeTrendType'])
const tableList: any = []
@@ -199,16 +198,16 @@ const init = () => {
})
if (barCharts.value) {
barCharts.value[activeName.value]?.initChart()
loading.value=false
}else{
loading.value=true
loading.value = false
} else {
loading.value = true
}
return
}
const handleClick = (tab: any, event: any) => {
tableData.value=[]
echartsData.value={}
tableData.value = []
echartsData.value = {}
loading.value = true
params.value.groupId = tabsList.value[tab.index].id
emit('changeTrendType', tab.index)
@@ -224,7 +223,6 @@ const setRealTrendData = (val: any) => {
return
}
loading.value = true
console.log(val, '----------------谐波频谱------------------')
tableData.value = {}
mqttMessage.value = val
for (let key in val) {
@@ -232,8 +230,7 @@ const setRealTrendData = (val: any) => {
tableData.value[key] = val[key]
}
}
console.log(tabsList.value[activeName.value].groupName, '-------')
if (tabsList.value[activeName.value].groupName.includes('间谐波') == false) {
if (!tabsList.value[activeName.value].groupName.includes('间谐波')) {
delete tableData.value.data1
} else {
console.log('不删除')