- 更新纵坐标刻度算法,优化小数趋势图范围显示 - 添加稳态趋势图全屏模式和共享工具组件 - 实现多图联动的鼠标悬停竖线同步功能 - 调整主线线宽分档策略,降低最大线宽限制 - 重构稳态趋势工具栏,优化谐波次数选择逻辑 - 添加周时间周期搜索支持和自定义时间范围选择 - 完善稳态数据表格和指示器浮动面板功能 - 优化稳态趋势图性能,添加LTB采样和动画控制 - 修复数据表格打开前的趋势数据验证问题 - 统一时间轴标签格式化和网格对齐处理
122 lines
3.5 KiB
Vue
122 lines
3.5 KiB
Vue
<template>
|
|
<section class="card checksquare-detail">
|
|
<div class="detail-header">
|
|
<div>
|
|
<div class="section-title">连续性详情</div>
|
|
<div class="section-description">
|
|
{{ selectedItem ? resolveChecksquareRowName(selectedItem) : '请选择总览表中的指标' }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<el-empty v-if="!selectedItem" description="请选择指标查看缺失区间" />
|
|
|
|
<template v-else>
|
|
<div class="stat-grid">
|
|
<div v-for="statType in CHECKSQUARE_STAT_TYPES" :key="statType" class="stat-card">
|
|
<span class="stat-name">{{ formatChecksquareStatType(statType) }}</span>
|
|
<span class="stat-value">{{ formatStatMissingRate(selectedItem, statType) }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<el-table class="segment-table" :data="segments" size="small" max-height="220" empty-text="暂无缺失区间">
|
|
<el-table-column prop="statType" label="统计类型" width="96">
|
|
<template #default="{ row }">{{ formatChecksquareStatType(row.statType) }}</template>
|
|
</el-table-column>
|
|
<el-table-column prop="startTime" label="开始时间" min-width="160" />
|
|
<el-table-column prop="endTime" label="结束时间" min-width="160" />
|
|
<el-table-column prop="missingPointCount" label="缺失点数" width="100" align="right">
|
|
<template #default="{ row }">{{ row.missingPointCount ?? '-' }}</template>
|
|
</el-table-column>
|
|
<el-table-column prop="durationMinutes" label="持续分钟" width="100" align="right">
|
|
<template #default="{ row }">{{ row.durationMinutes ?? '-' }}</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</template>
|
|
</section>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import type { SteadyDataView } from '@/api/steady/steadyDataView/interface'
|
|
import {
|
|
CHECKSQUARE_STAT_TYPES,
|
|
collectMissingSegments,
|
|
formatChecksquareStatType,
|
|
formatStatMissingRate,
|
|
resolveChecksquareRowName
|
|
} from '../utils/checksquareTable'
|
|
|
|
defineOptions({
|
|
name: 'ChecksquareDetailPanel'
|
|
})
|
|
|
|
const props = defineProps<{
|
|
selectedItem: SteadyDataView.SteadyChecksquareItem | null
|
|
}>()
|
|
|
|
const segments = computed(() => collectMissingSegments(props.selectedItem))
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.checksquare-detail {
|
|
display: flex;
|
|
flex: none;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
min-height: 0;
|
|
padding: 12px;
|
|
}
|
|
|
|
.detail-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--el-text-color-primary);
|
|
}
|
|
|
|
.section-description {
|
|
margin-top: 4px;
|
|
font-size: 13px;
|
|
color: var(--el-text-color-regular);
|
|
}
|
|
|
|
.stat-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 8px;
|
|
}
|
|
|
|
.stat-card {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
min-width: 0;
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--el-border-color-lighter);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.stat-name {
|
|
color: var(--el-text-color-secondary);
|
|
}
|
|
|
|
.stat-value {
|
|
font-weight: 600;
|
|
color: var(--el-text-color-primary);
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.stat-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
</style>
|