fuliqi
2024-09-29 06cf1c7f78a33a22d075d116a3cf40e6b6915b6c
src/views/screen/index.vue
@@ -213,6 +213,7 @@
    return {
      deptList: [],
      deptId: '',
      intervalId: null, // 用于存储定时器的ID
      carList: [],
      videoList: [],
      faceList: [],
@@ -309,7 +310,14 @@
      .catch((err) => {
      });
    // 查询数据
    this.getData();
    this.intervalId = setInterval(this.getData,  3600000); //一小时一次
  },
  beforeDestroy() {
    // 组件销毁前清除定时器,防止内存泄漏
    if (this.intervalId) {
      clearInterval(this.intervalId);
      this.intervalId = null;
    }
  },
  methods: {
    getDeptId(deptName) {
@@ -1118,6 +1126,7 @@
              list-style-type: none;
              border-bottom: 1px dashed #223654;
              margin: 7px 0;
              li {
                width: 25%;
                text-align: center;