gaoluyang
7 小时以前 0c9aa3e1d5cfbf2245f9e7462e1d27cc8c7827d1
src/views/bi/dashboard/index.vue
@@ -39,7 +39,7 @@
    loading.value = false;
    await nextTick();
    resizeAllCharts();
    if (!background && dashboardCode.value === 'purchase-sales') {
    if (!background) {
      const intervals = charts.value.map((chart) => chart.refreshInterval).filter((interval) => interval > 0);
      if (intervals.length) dataRefreshTimer = setInterval(() => {
        if (!loading.value && document.visibilityState === 'visible') loadData(true);
@@ -159,6 +159,11 @@
    return val.slice(0, 10);
  }
  return val;
}
// 大屏表格「实时滚动」:数据复制一份,配合 CSS marquee 做无缝纵向滚动
function duplicateRows(rows?: Record<string, unknown>[]): Record<string, unknown>[] {
  return rows ? [...rows, ...rows] : [];
}
// ======== 看板主题色 ========
@@ -316,9 +321,9 @@
                  >{{ key }}</th>
                </tr>
              </thead>
              <tbody>
              <tbody class="marquee-tbody">
                <tr
                  v-for="(row, ri) in chart.data"
                  v-for="(row, ri) in duplicateRows(chart.data)"
                  :key="ri"
                  :style="{ animationDelay: `${ri * 50}ms` }"
                >
@@ -610,7 +615,10 @@
}
.table-wrap {
  overflow-x: auto; border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: 320px;
  border-radius: 8px;
  background: rgba(4, 14, 36, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
@@ -619,6 +627,12 @@
.data-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table thead th {
@@ -653,6 +667,18 @@
  to { opacity: 1; transform: translateY(0); }
}
/* 大屏表格「实时滚动」:tbody 复制一份后 translateY(-50%) 无缝循环 */
.marquee-tbody {
  animation: table-marquee 15s linear infinite;
}
.marquee-tbody:hover {
  animation-play-state: paused;
}
@keyframes table-marquee {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
/* ======== 空状态 ======== */
.empty-state {
  position: relative; z-index: 1;