zhongshujie
2025-04-08 96de5562aa8245de24582623951fed016cf90a00
src/views/directory/index.vue
@@ -28,10 +28,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>
@@ -41,10 +38,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>
@@ -286,7 +280,6 @@
  mounted() {
    this.initChart();
    window.addEventListener("resize", this.handleResize);
  },
  beforeDestroy() {
@@ -299,10 +292,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",
@@ -484,9 +482,11 @@
    /* 移除最后一行的下边框 */
  }
}
.charts-main {
  // background-color: #000;
}
.table-title {
  display: flex;
  align-items: center;