|
@@ -70,7 +70,6 @@
|
|
|
:command="item.ctType"
|
|
:command="item.ctType"
|
|
|
>{{ item.ctType }}</el-dropdown-item
|
|
>{{ item.ctType }}</el-dropdown-item
|
|
|
>
|
|
>
|
|
|
- <!-- <el-dropdown-item>小学高年级</el-dropdown-item> -->
|
|
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
@@ -106,9 +105,8 @@
|
|
|
}"
|
|
}"
|
|
|
></div>
|
|
></div>
|
|
|
<div class="additional-text">
|
|
<div class="additional-text">
|
|
|
- <!-- 0{{ index + 1 }} {{ getCourseTitle(index + 1) }}-->
|
|
|
|
|
- ({{ outlineData.ctTypeSort }}) {{ outlineData.ctType }}
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ 0{{ outlineData.ctTypeSort }} {{ outlineData.ctType }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -145,8 +143,6 @@ const drawerVisible = ref(true)
|
|
|
const handleGradeSelect = (command) => {
|
|
const handleGradeSelect = (command) => {
|
|
|
selectedGrade.value = command
|
|
selectedGrade.value = command
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 添加切换抽屉显示状态的函数
|
|
// 添加切换抽屉显示状态的函数
|
|
|
const toggleDrawer = () => {
|
|
const toggleDrawer = () => {
|
|
|
drawerVisible.value = !drawerVisible.value
|
|
drawerVisible.value = !drawerVisible.value
|
|
@@ -159,12 +155,19 @@ const classOutlineData = ref([])
|
|
|
const fetchCtTypes = async () => {
|
|
const fetchCtTypes = async () => {
|
|
|
try {
|
|
try {
|
|
|
const response = await ClassList()
|
|
const response = await ClassList()
|
|
|
-
|
|
|
|
|
|
|
+ console.log(response);
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
classData.value = response.data
|
|
classData.value = response.data
|
|
|
// 获取到数据,将第一个选项的值作为默认选中值
|
|
// 获取到数据,将第一个选项的值作为默认选中值
|
|
|
if (classData.value.length > 0) {
|
|
if (classData.value.length > 0) {
|
|
|
selectedGrade.value = classData.value[0].ctType
|
|
selectedGrade.value = classData.value[0].ctType
|
|
|
|
|
+ // 初始化时获取课程大纲数据
|
|
|
|
|
+ const selectedItem = classData.value[0]
|
|
|
|
|
+ ClassOutline(selectedItem.id).then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ classOutlineData.value = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -172,25 +175,6 @@ const fetchCtTypes = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 添加 watch 监听 selectedGrade 的变化
|
|
|
|
|
-watch(selectedGrade, newValue => {
|
|
|
|
|
- // 根据 id 切换高年级或低年级
|
|
|
|
|
- const selectedItem = classData.value.find(item => item.ctType === newValue)
|
|
|
|
|
- if (selectedItem) {
|
|
|
|
|
- if (selectedItem.id === 1) {
|
|
|
|
|
- selectedGrade.value = '小学低年级'
|
|
|
|
|
- } else if (selectedItem.id === 3) {
|
|
|
|
|
- selectedGrade.value = '小学高年级'
|
|
|
|
|
- }
|
|
|
|
|
- // 调用获取教学大纲函数并传入年级id
|
|
|
|
|
- ClassOutline(selectedItem.id).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- classOutlineData.value = res.data
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
// 添加获取课程标题
|
|
// 添加获取课程标题
|
|
|
const getCourseTitle = index => {
|
|
const getCourseTitle = index => {
|
|
|
if (
|
|
if (
|
|
@@ -202,6 +186,7 @@ const getCourseTitle = index => {
|
|
|
}
|
|
}
|
|
|
return ''
|
|
return ''
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 课程标题数组,依赖修改后的 getCourseTitle 函数 修改课程标题数组为 computed 属性
|
|
// 课程标题数组,依赖修改后的 getCourseTitle 函数 修改课程标题数组为 computed 属性
|
|
|
const courseTitles = computed(() => {
|
|
const courseTitles = computed(() => {
|
|
|
return Array.from({ length: 8 }, (_, i) => getCourseTitle(i + 1))
|
|
return Array.from({ length: 8 }, (_, i) => getCourseTitle(i + 1))
|
|
@@ -264,6 +249,7 @@ const goToAIExperience = outlineData => {
|
|
|
@function rpx($px) {
|
|
@function rpx($px) {
|
|
|
@return math.div($px, 750) * 100vw;
|
|
@return math.div($px, 750) * 100vw;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
/* 添加过渡样式 */
|
|
/* 添加过渡样式 */
|
|
|
.drawer-slide-enter-active,
|
|
.drawer-slide-enter-active,
|
|
|
.drawer-slide-leave-active {
|
|
.drawer-slide-leave-active {
|
|
@@ -340,14 +326,15 @@ const goToAIExperience = outlineData => {
|
|
|
|
|
|
|
|
.mb-2 {
|
|
.mb-2 {
|
|
|
color: white;
|
|
color: white;
|
|
|
- font-size: rpx(8);
|
|
|
|
|
- margin-left: rpx(13);
|
|
|
|
|
|
|
+ font-size: rpx(9);
|
|
|
|
|
+ margin-left: rpx(10);
|
|
|
}
|
|
}
|
|
|
.mb-2 img {
|
|
.mb-2 img {
|
|
|
width: rpx(15);
|
|
width: rpx(15);
|
|
|
height: rpx(15);
|
|
height: rpx(15);
|
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
|
margin-top: rpx(-2);
|
|
margin-top: rpx(-2);
|
|
|
|
|
+ margin-left: rpx(-5);
|
|
|
}
|
|
}
|
|
|
.el-menu-item {
|
|
.el-menu-item {
|
|
|
width: rpx(115);
|
|
width: rpx(115);
|
|
@@ -355,7 +342,7 @@ const goToAIExperience = outlineData => {
|
|
|
margin-bottom: rpx(10);
|
|
margin-bottom: rpx(10);
|
|
|
border-radius: rpx(6);
|
|
border-radius: rpx(6);
|
|
|
color: white;
|
|
color: white;
|
|
|
- font-size: rpx(7);
|
|
|
|
|
|
|
+ font-size: rpx(8);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.el-menu ::v-deep(.el-menu-item:hover),
|
|
.el-menu ::v-deep(.el-menu-item:hover),
|
|
@@ -591,7 +578,6 @@ const goToAIExperience = outlineData => {
|
|
|
.additional-text {
|
|
.additional-text {
|
|
|
margin-top: auto;
|
|
margin-top: auto;
|
|
|
margin-bottom: rpx(4);
|
|
margin-bottom: rpx(4);
|
|
|
- // margin-top: rpx(4);
|
|
|
|
|
- font-size: rpx(7);
|
|
|
|
|
|
|
+ font-size: rpx(8);
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|