From fc43cbb086dcd7a5e8976d67d3e6e0f29f9e26ad Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期二, 08 四月 2025 14:51:47 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase

---
 src/views/directory/index.vue |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue
index 492d229..9ff6048 100644
--- a/src/views/directory/index.vue
+++ b/src/views/directory/index.vue
@@ -111,10 +111,7 @@
     <!-- 鍒楄〃鏄剧ず -->
     <div class="page-main" v-if="activeTabs == 'list'">
       <div v-for="(item, index) in universityList" :key="index">
-        <div
-          class="table-title"
-          v-if="item.studentList && item.studentList.length > 0"
-        >
+        <div class="table-title" v-if="item.studentList && item.studentList.length > 0">
           <div class="table-title-left">
             <p class="table-title-name">{{ item.name }}</p>
             <p class="table-title-degree">{{ item.degree }}</p>
@@ -124,10 +121,7 @@
             <img :src="[item.isShow ? topIcon : bottomIcon]" alt="" />
           </div>
         </div>
-        <table
-          cellpadding="100"
-          v-if="item.studentList && item.studentList.length > 0 && item.isShow"
-        >
+        <table cellpadding="100" v-if="item.studentList && item.studentList.length > 0 && item.isShow">
           <tr class="table-heading">
             <th>濮撳悕</th>
             <th>鎬у埆</th>
@@ -349,7 +343,6 @@
 
   mounted() {
     this.initChart();
-
     window.addEventListener("resize", this.handleResize);
   },
   beforeDestroy() {
@@ -362,10 +355,15 @@
     changeTab(key) {
       this.activeTabs = key;
       console.log(this.activeTabs, "activeTabs");
+      if (key == "chart") {
+        this.$nextTick(() => {
+          this.initChart();
+          window.addEventListener("resize", this.handleResize);
+        });
+      }
     },
     initChart() {
       this.chart = echarts.init(this.$refs.chart);
-
       const option = {
         tooltip: {
           trigger: "item",
@@ -574,10 +572,12 @@
     /* 绉婚櫎鏈�鍚庝竴琛岀殑涓嬭竟妗� */
   }
 }
+
 .charts-main {
   // background-color: #000;
   position: relative;
 }
+
 .table-title {
   display: flex;
   align-items: center;

--
Gitblit v1.9.1