修改测试BUG

This commit is contained in:
guanj
2026-06-18 16:35:16 +08:00
parent 13f11596e4
commit 8527939eb1
44 changed files with 1329 additions and 953 deletions

View File

@@ -193,14 +193,14 @@
</TableHeader>
<div class="data_time" :style="{
alignItems: realTimeFlag ? 'flex-end' : 'center'
}" v-if="dataSet.includes('_realtimedata') && sonTab != 2 && !realTimeFlag">
<p class="mb10 mt10" >
}" v-if="dataSet.includes('_realtimedata') && sonTab != 2 && !realTimeFlag">
<p class="mb10 mt10">
<span>数据时间:{{ trendDataTime || '-' }}</span>
</p>
<el-button v-if="!realTimeFlag && dataSet.includes('_realtimedata')" style="float: right !important"
:icon="Back" @click="handleReturn" >
:icon="Back" @click="handleReturn">
返回
</el-button>
</div>
@@ -503,7 +503,7 @@ const activeTrendName: any = ref(0)
const trendTimer: any = ref()
const trendDataTime: any = ref()
const showButton = ref(false)
const latestTime=ref('')
const latestTime = ref('')
const decodeMqttPayload = (message: any) => {
try {
return JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
@@ -552,6 +552,7 @@ const handleTrend = async () => {
})
.catch(e => {
realTrendRef.value && realTrendRef.value.setRealTrendData(false)
harmonicSpectrumRef.value && harmonicSpectrumRef.value.setloading()
tableLoading.value = false
})
@@ -559,8 +560,12 @@ const handleTrend = async () => {
if (res.code == 'A0000') {
realTrendRef.value && realTrendRef.value.setOverLimitData(res.data)
}
}).catch(e => {
realTrendRef.value && realTrendRef.value.setRealTrendData(false)
harmonicSpectrumRef.value && harmonicSpectrumRef.value.setloading()
tableLoading.value = false
})
realTrendRef.value &&
await realTrendRef.value &&
realTrendRef.value.open({ devId: deviceId.value, lineId: lineId.value, activeTrendName: activeTrendName.value })
}
//实时趋势
@@ -632,7 +637,7 @@ const handleSearch = () => {
if (oddAndEvenFlag.value) {
list = list.filter((item: any) => {
let str = item.name.split('次')[0]
if (oddAndEven.value == '1') {
// 奇次
@@ -693,24 +698,25 @@ const nodeClick = async (e: anyObj, node?: any) => {
if (e == undefined) {
return (loading.value = false)
}
if(e.pname?.includes('便携')){
if (e.pname?.includes('便携')) {
deviceType.value = '1'
}else{
} else {
deviceType.value = '2'
}
searchValue.value = ''
deviceId.value = e?.pid
lineId.value = e?.id
TrendList.value = e
if (!e) {
loading.value = false
return
}
//选中设备名称后,点击标签页也能查询数据,要求点击设备名称后,点击标签页默认查询第一个监测点数据
if (e.level == 3) {
searchValue.value = ''
deviceId.value = e?.pid
lineId.value = e?.id
TrendList.value = e
if (!e) {
loading.value = false
return
}
engineeringName.value = node?.parent.parent.data.name
await queryDictType({
@@ -795,7 +801,7 @@ const nodeClick = async (e: anyObj, node?: any) => {
//治理设备和便携式设备切换判断
const deviceType = ref('0')
const pointTypeChange = (val: any, obj: any) => {
nodeClick(obj)
}
const realTimeRef: any = ref()
@@ -1209,7 +1215,7 @@ const handleClick = async (tab?: any) => {
}
//运行趋势
if (dataSet.value.includes('_devRunTrend')) {
tableLoading.value=true
tableLoading.value = true
setTimeout(async () => {
if (tab.props != undefined) await (datePickerRef.value && datePickerRef.value?.setInterval(5))
@@ -1242,13 +1248,13 @@ const handleClick = async (tab?: any) => {
//查询当前指标
if (!dataSet.value.includes('_')) {
formInline.id = dataSet.value
latestTime.value=''
tableData.value=[]
latestTime.value = ''
tableData.value = []
// await deviceRtData(formInline)
await realTimeData(formInline)
.then((res: any) => {
tableData.value = res.data[0].children
latestTime.value=res.data[0].dataTime
latestTime.value = res.data[0].dataTime
formInline.total = res.data.total
let queryListName = queryList.value.filter((item: any) => item.id == formInline.targetType)
let list = tableData.value.filter((item: any) => {