修改测试bug

This commit is contained in:
GGJ
2024-11-19 10:39:46 +08:00
parent 2101d03126
commit 64fb9141fd
14 changed files with 682 additions and 330 deletions

View File

@@ -9,15 +9,15 @@
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
模版下载
</el-button> -->
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Connection" @click="handleImport">
<!-- <el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Connection" @click="handleImport">
离线补召
</el-button>
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Monitor" @click="handleaddDevice">
在线补召
</el-button>
</el-button> -->
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Tickets"
@click="handleAnalysisList">
补召日志
补召
</el-button>
</template>
<el-descriptions-item label="名称">
@@ -131,15 +131,22 @@
"
></div> -->
<!-- v-loading="tableLoading" -->
<div style="overflow: auto" :style="{ height: tableHeight }" v-loading="tableLoading" v-if="
dataSet.indexOf('_trenddata') == -1 &&
dataSet.indexOf('_realtimedata') == -1 &&
dataSet.indexOf('_event') == -1 &&
tableData.length != 0
">
<div class="mb5 mt5" v-if="dataSet.indexOf('_history') == -1">
统计时间:{{ tableData[0].children.length ? tableData[0].children[0].time : '' }}
</div>
<!-- 循环渲染的card 最新数据/历史数据显示 -->
<div class="content" v-if="tableData.length != 0 && !tableLoading">
<el-card class="box-card" v-for="(item, index) in tableData" :key="index">
<div class="content" v-if="tableData.length != 0 && !tableLoading"
:style="{ height: tableHeightBox }">
<el-card class="box-card" :class="dataSet.indexOf('_history') == -1 ? 'box-card-new' : ''"
v-for="(item, index) in tableData" :key="index">
<template #header>
<div class="clearfix">
<span style="flex: 1">{{ item.name }}</span>
@@ -149,15 +156,17 @@
</template>
<!-- 模块数据 -->
<div class="box-card-content" v-if="dataSet.indexOf('_history') == -1">
<div v-for="(child, childIndex) in item.children" :key="childIndex">
{{ child.anotherName }}:
{{ child.dataValue === 3.1415926 ? '暂无数据' : child.dataValue }}
</div>
<div class="mt10">
统计时间:{{ item.children.length ? item.children[0].time : '' }}
<div class="box-card-div">
<div v-for="(child, childIndex) in item.children" :key="childIndex">
{{ child.anotherName }}:
{{ child.dataValue === 3.1415926 ? '暂无数据' : child.dataValue }}
</div>
</div>
</div>
<div v-else-if="item.children.length">
<div v-else-if="item.children.length" class="box-card-div">
<div style="display: flex; align-items: center">
<el-tag effect="dark" type="danger" style="width: 40px; text-align: center"
class="mr10">
@@ -170,7 +179,7 @@
: item.children[0].maxValue
}}
</div>
<div style="display: flex; align-items: center" class="mt10">
<div style="display: flex; align-items: center">
<el-tag effect="dark" type="success" style="width: 40px; text-align: center"
class="mr10">
AVG
@@ -182,7 +191,7 @@
: item.children[0].avgValue
}}
</div>
<div style="display: flex; align-items: center" class="mt10">
<div style="display: flex; align-items: center">
<el-tag effect="dark" type="warning" style="width: 40px; text-align: center"
class="mr10">
MIN
@@ -214,8 +223,8 @@
<Trend ref="trendRef"></Trend>
</div>
<!-- 实时数据 -->
<div style="height: calc(100vh - 340px)" v-if="dataSet.indexOf('_realtimedata') != -1"
v-loading="tableLoading">
<div :style="`height: calc(100vh - (${sonTab == 1 ? '378px' : sonTab == 2 ? '340px' : '425px'}))`"
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">
实时录波
@@ -295,6 +304,7 @@ const devTypeOptions = ref([])
const devModelOptions = ref([])
const tableData = ref<any[]>([])
const tableHeight = mainHeight(330).height
const tableHeightBox = mainHeight(365).height
const mangePopup = ref()
const datePickerRef = ref()
const formInline = reactive({
@@ -871,7 +881,11 @@ const handleDownLoadTemplate = () => { }
const analysisListRef = ref()
//打开补召日志
const handleAnalysisList = () => {
analysisListRef.value && analysisListRef.value.open()
analysisListRef.value && analysisListRef.value.open({
lineId: lineId.value,
deviceData: deviceData.value,
deviceId: deviceId.value,
})
}
//离线数据导入
const offLineDataImportRef = ref()
@@ -935,8 +949,7 @@ onBeforeUnmount(() => {
box-sizing: border-box;
overflow: auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-template-rows: max-content;
grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
grid-gap: 10px;
justify-content: center;
@@ -945,7 +958,7 @@ onBeforeUnmount(() => {
flex-direction: column;
justify-content: space-between;
color: var(--el-color-white);
min-height: 150px;
min-height: 80px;
font-size: 13px;
.el-card__header {
@@ -969,6 +982,8 @@ onBeforeUnmount(() => {
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
.box-card-content {
height: 100%;
display: flex;
flex-direction: column;
@@ -976,8 +991,27 @@ onBeforeUnmount(() => {
}
}
}
}
}
.box-card-div {
display: grid;
// grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
}
}
.box-card-new {
min-height: 110px !important;
.el-card__body {
overflow-y: auto;
}
}
.view_top_btn {