杨磊
2025-04-08 fc43cbb086dcd7a5e8976d67d3e6e0f29f9e26ad
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;