小小儁爺
2026-03-12 0c8bc58122c1f620d5a9c692262e94f9fab351a6
src/views/kanbanManager/cgdd.vue
@@ -1,6 +1,9 @@
<template>
  <div>
    <div class="kb_dashboard">
    <div
      class="kb_dashboard"
      :style="{transform:'scale('+zoomX+','+zoomY+')',top:topDistance+'px',left:leftDistance+'px'}"
    >
      <div class="kb_backgroundCustom" />
      <div class="kb_header">
@@ -84,6 +87,11 @@
  data() {
    return {
      zoomX: 1,
      zoomY: 1,
      topDistance: 0,
      leftDistance: 0,
      onLine: navigator.onLine, // 监听网络是否在线
      headTime: '',
@@ -196,12 +204,22 @@
    setInterval(() => {
      this.getPurchaseRight()
    }, 20 * 1000)
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  beforeDestroy() {
    window.removeEventListener('online', this.updateOnlineStatus)
    window.removeEventListener('offline', this.updateOnlineStatus)
  },
  methods: {
    // 获取页面高度
    getHeight() {
      this.zoomX = window.innerWidth / 1920
      this.zoomY = window.innerHeight / 1080
      this.topDistance = (window.innerHeight - 1080) / 2
      this.leftDistance = (window.innerWidth - 1920) / 2
    },
    // 更新网络状态
    updateOnlineStatus(e) {
      if (e.isFirst) {