|
@@ -93,14 +93,14 @@
|
|
|
<div class="knowledge_right_container">
|
|
<div class="knowledge_right_container">
|
|
|
<!-- Tab切换 -->
|
|
<!-- Tab切换 -->
|
|
|
<div class="knowledge_tab">
|
|
<div class="knowledge_tab">
|
|
|
- <div class="tab_item" :class="{ active: activeTab === 'zero' }" @click="activeTab = 'zero'">
|
|
|
|
|
- 零分知识点
|
|
|
|
|
|
|
+ <div class="tab_item" :class="{ active: activeTab === 'all' }" @click="activeTab = 'all'">
|
|
|
|
|
+ 全部知识点
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tab_item" :class="{ active: activeTab === 'highFreq' }" @click="activeTab = 'highFreq'">
|
|
<div class="tab_item" :class="{ active: activeTab === 'highFreq' }" @click="activeTab = 'highFreq'">
|
|
|
高频错题知识点
|
|
高频错题知识点
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="tab_item" :class="{ active: activeTab === 'all' }" @click="activeTab = 'all'">
|
|
|
|
|
- 全部知识点
|
|
|
|
|
|
|
+ <div class="tab_item" :class="{ active: activeTab === 'zero' }" @click="activeTab = 'zero'">
|
|
|
|
|
+ 零分知识点
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -295,7 +295,7 @@ export default {
|
|
|
// 组件挂载状态标记
|
|
// 组件挂载状态标记
|
|
|
_isMounted: false,
|
|
_isMounted: false,
|
|
|
// Tab切换状态
|
|
// Tab切换状态
|
|
|
- activeTab: 'zero',
|
|
|
|
|
|
|
+ activeTab: 'all',
|
|
|
// 对比选择器数据
|
|
// 对比选择器数据
|
|
|
activeComparison: 'grade', // 默认对比年级
|
|
activeComparison: 'grade', // 默认对比年级
|
|
|
studentPosition: 'C层', // 学生位置
|
|
studentPosition: 'C层', // 学生位置
|
|
@@ -399,27 +399,26 @@ export default {
|
|
|
// 保存当前tab值,用于比较是否需要修改
|
|
// 保存当前tab值,用于比较是否需要修改
|
|
|
const oldActiveTab = this.activeTab;
|
|
const oldActiveTab = this.activeTab;
|
|
|
|
|
|
|
|
- // 优先级:零分知识点 > 高频错题知识点 > 全部知识点
|
|
|
|
|
- if (this.fatalVulnerability && this.fatalVulnerability.length > 0) {
|
|
|
|
|
- // 如果零分知识点有数据,切换到零分知识点并选中第一条
|
|
|
|
|
- if (this.activeTab !== 'zero') {
|
|
|
|
|
- this.activeTab = 'zero';
|
|
|
|
|
|
|
+ // 优先级:全部知识点 > 高频错题知识点 > 零分知识点
|
|
|
|
|
+ if (this.allKnowledgeList && this.allKnowledgeList.length > 0) {
|
|
|
|
|
+ // 如果前两者都没有数据但全部知识点有数据,切换到全部知识点并选中第一条
|
|
|
|
|
+ if (this.activeTab !== 'all') {
|
|
|
|
|
+ this.activeTab = 'all';
|
|
|
}
|
|
}
|
|
|
this.selectedIndex = 0;
|
|
this.selectedIndex = 0;
|
|
|
- } else if (this.highVulnerability && this.highVulnerability.length > 0) {
|
|
|
|
|
|
|
+ }else if (this.highVulnerability && this.highVulnerability.length > 0) {
|
|
|
// 如果零分知识点没有数据但高频错题知识点有数据,切换到高频错题知识点并选中第一条
|
|
// 如果零分知识点没有数据但高频错题知识点有数据,切换到高频错题知识点并选中第一条
|
|
|
if (this.activeTab !== 'highFreq') {
|
|
if (this.activeTab !== 'highFreq') {
|
|
|
this.activeTab = 'highFreq';
|
|
this.activeTab = 'highFreq';
|
|
|
}
|
|
}
|
|
|
this.selectedIndex = 0;
|
|
this.selectedIndex = 0;
|
|
|
- } else if (this.allKnowledgeList && this.allKnowledgeList.length > 0) {
|
|
|
|
|
- // 如果前两者都没有数据但全部知识点有数据,切换到全部知识点并选中第一条
|
|
|
|
|
- if (this.activeTab !== 'all') {
|
|
|
|
|
- this.activeTab = 'all';
|
|
|
|
|
|
|
+ }else if (this.fatalVulnerability && this.fatalVulnerability.length > 0) {
|
|
|
|
|
+ // 如果零分知识点有数据,切换到零分知识点并选中第一条
|
|
|
|
|
+ if (this.activeTab !== 'zero') {
|
|
|
|
|
+ this.activeTab = 'zero';
|
|
|
}
|
|
}
|
|
|
this.selectedIndex = 0;
|
|
this.selectedIndex = 0;
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
// 只有当tab值实际发生变化时,才触发选中事件
|
|
// 只有当tab值实际发生变化时,才触发选中事件
|
|
|
// 初始化时不触发,避免重复调用接口
|
|
// 初始化时不触发,避免重复调用接口
|
|
|
if (this._isMounted && oldActiveTab !== this.activeTab) {
|
|
if (this._isMounted && oldActiveTab !== this.activeTab) {
|
|
@@ -568,13 +567,13 @@ export default {
|
|
|
layout: 'radial',
|
|
layout: 'radial',
|
|
|
symbol: 'circle',
|
|
symbol: 'circle',
|
|
|
initialTreeDepth: 999, // 设置一个足够大的值,确保所有节点都展开
|
|
initialTreeDepth: 999, // 设置一个足够大的值,确保所有节点都展开
|
|
|
- expandAndCollapse: true,
|
|
|
|
|
|
|
+ expandAndCollapse: false,
|
|
|
// 调整树状图布局参数,确保节点均匀分布
|
|
// 调整树状图布局参数,确保节点均匀分布
|
|
|
orient: 'radial',
|
|
orient: 'radial',
|
|
|
roam: true,
|
|
roam: true,
|
|
|
|
|
|
|
|
// 使用基础配置实现居中
|
|
// 使用基础配置实现居中
|
|
|
- center: ['12%', '10%'],
|
|
|
|
|
|
|
+ center: ['10%', '8%'],
|
|
|
|
|
|
|
|
zoom: this.getZoomValue(),
|
|
zoom: this.getZoomValue(),
|
|
|
scaleLimit: {
|
|
scaleLimit: {
|