优化暂态事件列表
This commit is contained in:
@@ -193,14 +193,14 @@
|
||||
</TableHeader>
|
||||
<div class="data_time" :style="{
|
||||
alignItems: realTimeFlag ? 'flex-end' : 'center'
|
||||
}" v-if="dataSet.includes('_realtimedata') && sonTab != 2 && trendDataTime && !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" :loading="tableLoading">
|
||||
:icon="Back" @click="handleReturn" >
|
||||
返回
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -225,7 +225,7 @@
|
||||
">
|
||||
<div class="mb10 mt10" v-if="dataSet.indexOf('_history') == -1"
|
||||
style="font-weight: 700; font-size: 13px; text-align: center">
|
||||
最新数据时标:{{ tableData[0]?.time || '-' }}
|
||||
最新数据时标:{{ latestTime || '-' }}
|
||||
</div>
|
||||
|
||||
<nearRealTimeData ref="nearRealTimeDataRef" v-if="dataSet.indexOf('_history') == -1"
|
||||
@@ -309,8 +309,7 @@
|
||||
</div>
|
||||
<!-- 实时数据 -->
|
||||
<div :style="`height: calc(100vh - (${sonTab == 1 ? '346px' : sonTab == 2 ? '308px' : '393px'}))`"
|
||||
v-if="dataSet.indexOf('_realtimedata') != -1" v-loading="tableLoading"
|
||||
>
|
||||
v-if="dataSet.indexOf('_realtimedata') != -1" v-loading="tableLoading">
|
||||
<!-- <div class="view_top_btn" v-if="realTimeFlag">
|
||||
<el-button type="primary" :icon="Platform" @click="handleRecordWaves">
|
||||
实时录波
|
||||
@@ -334,7 +333,7 @@
|
||||
</div>
|
||||
<!-- 暂态事件 -->
|
||||
<div style="height: calc(100vh - 340px)" v-if="dataSet.indexOf('_event') != -1">
|
||||
<Event ref="eventRef" :deviceType="deviceType"></Event>
|
||||
<Event ref="eventRef" :deviceType="deviceType" @fileRecall="handleAnalysisList"></Event>
|
||||
</div>
|
||||
<!-- 测试项记录 -->
|
||||
<div style="height: calc(100vh - 395px)" v-if="dataSet.indexOf('_items') != -1"
|
||||
@@ -503,7 +502,7 @@ const activeTrendName: any = ref(0)
|
||||
const trendTimer: any = ref()
|
||||
const trendDataTime: any = ref()
|
||||
const showButton = ref(false)
|
||||
|
||||
const latestTime=ref('')
|
||||
const decodeMqttPayload = (message: any) => {
|
||||
try {
|
||||
return JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||
@@ -536,7 +535,7 @@ const handleTrend = async () => {
|
||||
await getHarmRealData(lineId.value, activeTrendName.value)
|
||||
.then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
trendDataTime.value = ''
|
||||
// trendDataTime.value = ''
|
||||
// ElMessage.success('设备应答成功')
|
||||
//每隔30s调用一下接口,通知后台推送mqtt消息
|
||||
trendTimer.value = window.setInterval(() => {
|
||||
@@ -625,14 +624,14 @@ const handleReturn = async () => {
|
||||
const handleSearch = () => {
|
||||
let queryListName = queryList.value.filter((item: any) => item.id == formInline.targetType)
|
||||
let list = tableData.value.filter((item: any) => {
|
||||
if (item.otherName.includes(searchValue.value)) {
|
||||
if (item.name.includes(searchValue.value)) {
|
||||
return item
|
||||
}
|
||||
})
|
||||
if (oddAndEvenFlag.value) {
|
||||
list = list.filter((item: any) => {
|
||||
let str = item.otherName.split('次')[0]
|
||||
queryListName[0].name == '间谐波电压含有率' ? (str = str - 0.5) : ''
|
||||
let str = item.name.split('次')[0]
|
||||
|
||||
|
||||
if (oddAndEven.value == '1') {
|
||||
// 奇次
|
||||
@@ -689,9 +688,16 @@ const dataLevel: any = ref('')
|
||||
const dataSource = ref([])
|
||||
const engineeringName = ref('')
|
||||
const nodeClick = async (e: anyObj, node?: any) => {
|
||||
console.log("🚀 ~ nodeClick ~ node:", e)
|
||||
if (e == undefined) {
|
||||
return (loading.value = false)
|
||||
}
|
||||
if(e.pname?.includes('便携')){
|
||||
deviceType.value = '1'
|
||||
}else{
|
||||
deviceType.value = '2'
|
||||
}
|
||||
|
||||
searchValue.value = ''
|
||||
|
||||
deviceId.value = e?.pid
|
||||
@@ -788,7 +794,7 @@ const nodeClick = async (e: anyObj, node?: any) => {
|
||||
//治理设备和便携式设备切换判断
|
||||
const deviceType = ref('0')
|
||||
const pointTypeChange = (val: any, obj: any) => {
|
||||
deviceType.value = val
|
||||
|
||||
nodeClick(obj)
|
||||
}
|
||||
const realTimeRef: any = ref()
|
||||
@@ -1234,21 +1240,23 @@ const handleClick = async (tab?: any) => {
|
||||
//查询当前指标
|
||||
if (!dataSet.value.includes('_')) {
|
||||
formInline.id = dataSet.value
|
||||
latestTime.value=''
|
||||
tableData.value=[]
|
||||
// await deviceRtData(formInline)
|
||||
await realTimeData(formInline)
|
||||
.then((res: any) => {
|
||||
tableData.value = res.data
|
||||
tableData.value = res.data[0].children
|
||||
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) => {
|
||||
if (item.otherName.includes(searchValue.value)) {
|
||||
if (item.name.includes(searchValue.value)) {
|
||||
return item
|
||||
}
|
||||
})
|
||||
if (oddAndEvenFlag.value) {
|
||||
list = list.filter((item: any) => {
|
||||
let str = item.otherName.split('次')[0]
|
||||
queryListName[0].name == '间谐波电压含有率' ? (str = str - 0.5) : ''
|
||||
let str = item.name.split('次')[0]
|
||||
|
||||
if (oddAndEven.value == '1') {
|
||||
// 奇次
|
||||
@@ -1276,6 +1284,7 @@ const handleClick = async (tab?: any) => {
|
||||
}, 1500)
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
setTimeout(() => {
|
||||
tableLoading.value = false
|
||||
}, 1500)
|
||||
@@ -1340,10 +1349,12 @@ queryByCode('Device_Type').then(res => {
|
||||
})
|
||||
})
|
||||
const handleTargetTypeChange = () => {
|
||||
if (queryList.value.filter((item: any) => item.id == formInline.targetType)[0].name != '基本数据') {
|
||||
oddAndEvenFlag.value = true
|
||||
const targetItem = queryList.value.filter((item: any) => item.id == formInline.targetType)[0];
|
||||
|
||||
if (targetItem?.name !== '基本数据' && !targetItem?.name?.includes('间谐波')) {
|
||||
oddAndEvenFlag.value = true;
|
||||
} else {
|
||||
oddAndEvenFlag.value = false
|
||||
oddAndEvenFlag.value = false;
|
||||
}
|
||||
}
|
||||
const queryList: any = ref([])
|
||||
|
||||
Reference in New Issue
Block a user