| | |
| | | <!-- 列表显示 --> |
| | | <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> |
| | |
| | | <div class="table-title-right" @click="item.isShow = !item.isShow"><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> |
| | |
| | | |
| | | mounted() { |
| | | this.initChart(); |
| | | |
| | | window.addEventListener("resize", this.handleResize); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | 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", |
| | |
| | | color: #333; |
| | | font-weight: bold; |
| | | ">${data.name}</span> |
| | | ${ |
| | | data.customInfo |
| | | ${data.customInfo |
| | | ? `<span style=" |
| | | background: #ffeb3b; |
| | | padding: 2px 5px; |
| | |
| | | } |
| | | </div> |
| | | <div style="margin-top: 8px;"> |
| | | <div>节点值: <span style="color: #4f8ff7;">${ |
| | | data.value || 0 |
| | | <div>节点值: <span style="color: #4f8ff7;">${data.value || 0 |
| | | }</span></div> |
| | | <div>描述: ${data.description || "暂无描述"}</div> |
| | | |
| | |
| | | /* 移除最后一行的下边框 */ |
| | | } |
| | | } |
| | | |
| | | .charts-main { |
| | | // background-color: #000; |
| | | } |
| | | |
| | | .table-title { |
| | | display: flex; |
| | | align-items: center; |