|
@@ -60,7 +60,7 @@
|
|
<img src="../../assets/learncenter/noSeekResult.png" alt="" />
|
|
<img src="../../assets/learncenter/noSeekResult.png" alt="" />
|
|
<p class="p1">
|
|
<p class="p1">
|
|
<!-- 抱歉,我找不到相关的内容。 -->
|
|
<!-- 抱歉,我找不到相关的内容。 -->
|
|
- {{ $t("Key547") }}
|
|
|
|
|
|
+ {{ $t('Key547') }}
|
|
</p>
|
|
</p>
|
|
<!-- <p class="p2">Try the following keywords</p> -->
|
|
<!-- <p class="p2">Try the following keywords</p> -->
|
|
<!-- <div class="keywords">
|
|
<!-- <div class="keywords">
|
|
@@ -75,14 +75,14 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { cousrseAPI, TextbookAPI } from "@/api/api";
|
|
|
|
|
|
+import { cousrseAPI, TextbookAPI } from '@/api/api'
|
|
|
|
|
|
-import Header from "@/components/Header";
|
|
|
|
-import HeaderOne from "@/components/learnCenter/HeaderOne";
|
|
|
|
-import ClassicalCourse from "@/components/learnCenter/ClassicalCourse";
|
|
|
|
-import Course from "@/components/learnCenter/Course";
|
|
|
|
-import Textbook from "@/components/learnCenter/Textbook";
|
|
|
|
-import { updateWordPack } from "@/utils/i18n";
|
|
|
|
|
|
+import Header from '@/components/Header'
|
|
|
|
+import HeaderOne from '@/components/learnCenter/HeaderOne'
|
|
|
|
+import ClassicalCourse from '@/components/learnCenter/ClassicalCourse'
|
|
|
|
+import Course from '@/components/learnCenter/Course'
|
|
|
|
+import Textbook from '@/components/learnCenter/Textbook'
|
|
|
|
+import { updateWordPack } from '@/utils/i18n'
|
|
export default {
|
|
export default {
|
|
props: [],
|
|
props: [],
|
|
components: {
|
|
components: {
|
|
@@ -97,9 +97,9 @@ export default {
|
|
CourseList: null, //课程列表
|
|
CourseList: null, //课程列表
|
|
TextList: null, //教材列表
|
|
TextList: null, //教材列表
|
|
dataList: null, //展示列表
|
|
dataList: null, //展示列表
|
|
- seekContent: "", //搜索内容
|
|
|
|
- gotoPage: "",
|
|
|
|
- keycode: "",
|
|
|
|
|
|
+ seekContent: '', //搜索内容
|
|
|
|
+ gotoPage: '',
|
|
|
|
+ keycode: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 8,
|
|
pageSize: 8,
|
|
targetPage: 1,
|
|
targetPage: 1,
|
|
@@ -111,17 +111,17 @@ export default {
|
|
pageSizes: [8, 16, 32, 64],
|
|
pageSizes: [8, 16, 32, 64],
|
|
pageSizes1: [8, 16, 32, 64],
|
|
pageSizes1: [8, 16, 32, 64],
|
|
pageSizes2: [10, 20, 30, 40],
|
|
pageSizes2: [10, 20, 30, 40],
|
|
- };
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
getCurrentQuestionView() {
|
|
getCurrentQuestionView() {
|
|
switch (this.classilfyIndex) {
|
|
switch (this.classilfyIndex) {
|
|
case 0:
|
|
case 0:
|
|
- return Course;
|
|
|
|
|
|
+ return Course
|
|
case 1:
|
|
case 1:
|
|
- return Textbook;
|
|
|
|
|
|
+ return Textbook
|
|
default:
|
|
default:
|
|
- return null;
|
|
|
|
|
|
+ return null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -129,126 +129,147 @@ export default {
|
|
classilfyIndex(newval, oldval) {
|
|
classilfyIndex(newval, oldval) {
|
|
if (newval != oldval) {
|
|
if (newval != oldval) {
|
|
if (newval == 0) {
|
|
if (newval == 0) {
|
|
- this.pageNum = 1;
|
|
|
|
- this.pageSizes = this.pageSizes1;
|
|
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.pageNum = 1
|
|
|
|
+ this.pageSizes = this.pageSizes1
|
|
|
|
+ this.getData('课程')
|
|
} else if (newval == 1) {
|
|
} else if (newval == 1) {
|
|
- this.pageNum = 1;
|
|
|
|
- this.pageSizes = this.pageSizes2;
|
|
|
|
- this.getData("教材");
|
|
|
|
|
|
+ this.pageNum = 1
|
|
|
|
+ this.pageSizes = this.pageSizes2
|
|
|
|
+ this.getData('教材')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
- this.pageNum = 1;
|
|
|
|
- this.pageSize = val;
|
|
|
|
|
|
+ this.pageNum = 1
|
|
|
|
+ this.pageSize = val
|
|
if (this.classilfyIndex == 0) {
|
|
if (this.classilfyIndex == 0) {
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.getData('课程')
|
|
} else if (this.classilfyIndex == 1) {
|
|
} else if (this.classilfyIndex == 1) {
|
|
- this.getData("教材");
|
|
|
|
|
|
+ this.getData('教材')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 跳页
|
|
// 跳页
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
- this.pageNum = val;
|
|
|
|
|
|
+ this.pageNum = val
|
|
if (this.classilfyIndex == 0) {
|
|
if (this.classilfyIndex == 0) {
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.getData('课程')
|
|
} else if (this.classilfyIndex == 1) {
|
|
} else if (this.classilfyIndex == 1) {
|
|
- this.getData("教材");
|
|
|
|
|
|
+ this.getData('教材')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 切换分类
|
|
// 切换分类
|
|
cutClassilfy(item, i) {
|
|
cutClassilfy(item, i) {
|
|
- this.classilfyIndex = i;
|
|
|
|
|
|
+ this.classilfyIndex = i
|
|
},
|
|
},
|
|
// 获取子组件传过来的keycode进行查询
|
|
// 获取子组件传过来的keycode进行查询
|
|
changeKeycode(val) {
|
|
changeKeycode(val) {
|
|
- this.keycode = val;
|
|
|
|
|
|
+ this.keycode = val
|
|
if (this.classilfyIndex == 0) {
|
|
if (this.classilfyIndex == 0) {
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.getData('课程')
|
|
} else if (this.classilfyIndex == 1) {
|
|
} else if (this.classilfyIndex == 1) {
|
|
- this.getData("教材");
|
|
|
|
|
|
+ this.getData('教材')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 输入目标页 并跳到目标页
|
|
// 输入目标页 并跳到目标页
|
|
toPageChange() {
|
|
toPageChange() {
|
|
- this.gotoPage = this.gotoPage.replace(/[^\d]/g, ""); //使用空字符串去替换非数字的字符
|
|
|
|
|
|
+ this.gotoPage = this.gotoPage.replace(/[^\d]/g, '') //使用空字符串去替换非数字的字符
|
|
if (this.gotoPage > Math.ceil(this.CourseList.total / 8)) {
|
|
if (this.gotoPage > Math.ceil(this.CourseList.total / 8)) {
|
|
- return;
|
|
|
|
|
|
+ return
|
|
} else if (this.gotoPage != this.targetPage) {
|
|
} else if (this.gotoPage != this.targetPage) {
|
|
- this.targetPage = this.gotoPage * 1;
|
|
|
|
- this.pageNum = this.gotoPage * 1;
|
|
|
|
|
|
+ this.targetPage = this.gotoPage * 1
|
|
|
|
+ this.pageNum = this.gotoPage * 1
|
|
if (this.classilfyIndex == 0) {
|
|
if (this.classilfyIndex == 0) {
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.getData('课程')
|
|
} else if (this.classilfyIndex == 1) {
|
|
} else if (this.classilfyIndex == 1) {
|
|
- this.getData("教材");
|
|
|
|
|
|
+ this.getData('教材')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取数据
|
|
// 获取数据
|
|
getData(val) {
|
|
getData(val) {
|
|
- this.loading = true;
|
|
|
|
- if (val == "课程") {
|
|
|
|
|
|
+ this.loading = true
|
|
|
|
+ if (val == '课程') {
|
|
// 获取课程列表
|
|
// 获取课程列表
|
|
- cousrseAPI("page_query-PageQueryCourseList", {
|
|
|
|
|
|
+ cousrseAPI('page_query-PageQueryCourseList', {
|
|
page_capacity: this.pageSize,
|
|
page_capacity: this.pageSize,
|
|
cur_page: this.pageNum,
|
|
cur_page: this.pageNum,
|
|
finish_status: 53,
|
|
finish_status: 53,
|
|
release_status: 1,
|
|
release_status: 1,
|
|
name: this.keycode,
|
|
name: this.keycode,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.dataList = res;
|
|
|
|
- this.CourseList = res;
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.dataList = res
|
|
|
|
+ this.dataList.course_list.forEach((item, index) => {
|
|
|
|
+ let teacher_list = [
|
|
|
|
+ {
|
|
|
|
+ teacher_name: '张仪',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ teacher_name: '吴先文',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ teacher_name: '韦所所',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ teacher_name: '罗蒙',
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ item.teacherName = teacher_list
|
|
|
|
+ .map(function(obj, index) {
|
|
|
|
+ return obj.teacher_name
|
|
|
|
+ })
|
|
|
|
+ .join(' ')
|
|
|
|
+ })
|
|
|
|
+ this.CourseList = res
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
- TextbookAPI("book-book_manager-PageQueryBookList", {
|
|
|
|
|
|
+ TextbookAPI('book-book_manager-PageQueryBookList', {
|
|
cur_page: this.pageNum,
|
|
cur_page: this.pageNum,
|
|
page_capacity: this.pageSize == 8 ? this.pageSize + 2 : this.pageSize,
|
|
page_capacity: this.pageSize == 8 ? this.pageSize + 2 : this.pageSize,
|
|
name: this.keycode,
|
|
name: this.keycode,
|
|
publish_status: 1,
|
|
publish_status: 1,
|
|
- is_control_publish_scope: "true",
|
|
|
|
|
|
+ is_control_publish_scope: 'true',
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.TextList = res;
|
|
|
|
- if (val == "教材") {
|
|
|
|
- this.dataList = null;
|
|
|
|
- this.dataList = this.TextList;
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
+ this.TextList = res
|
|
|
|
+ if (val == '教材') {
|
|
|
|
+ this.dataList = null
|
|
|
|
+ this.dataList = this.TextList
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
- this.keycode = this.$route.query.keycode;
|
|
|
|
- this.classilfyID = this.$route.query.id;
|
|
|
|
|
|
+ this.keycode = this.$route.query.keycode
|
|
|
|
+ this.classilfyID = this.$route.query.id
|
|
// classilfyIndex
|
|
// classilfyIndex
|
|
// if (this.$route.query.id == "COURSE") {
|
|
// if (this.$route.query.id == "COURSE") {
|
|
- this.classilfyIndex = 0;
|
|
|
|
- this.getData("课程");
|
|
|
|
|
|
+ this.classilfyIndex = 0
|
|
|
|
+ this.getData('课程')
|
|
// } else {
|
|
// } else {
|
|
// this.getData("教材");
|
|
// this.getData("教材");
|
|
// this.classilfyIndex = 1;
|
|
// this.classilfyIndex = 1;
|
|
// }
|
|
// }
|
|
await updateWordPack({
|
|
await updateWordPack({
|
|
word_key_list: [
|
|
word_key_list: [
|
|
- "Key8",
|
|
|
|
- "Key38",
|
|
|
|
- "Key39",
|
|
|
|
- "Key573",
|
|
|
|
- "Key44",
|
|
|
|
- "Key215",
|
|
|
|
- "Key248",
|
|
|
|
- "Key323",
|
|
|
|
- "Key547",
|
|
|
|
|
|
+ 'Key8',
|
|
|
|
+ 'Key38',
|
|
|
|
+ 'Key39',
|
|
|
|
+ 'Key573',
|
|
|
|
+ 'Key44',
|
|
|
|
+ 'Key215',
|
|
|
|
+ 'Key248',
|
|
|
|
+ 'Key323',
|
|
|
|
+ 'Key547',
|
|
],
|
|
],
|
|
- });
|
|
|
|
- this.isData = true;
|
|
|
|
- this.classilfyList = [this.$t("Key215"), this.$t("Key44")];
|
|
|
|
|
|
+ })
|
|
|
|
+ this.isData = true
|
|
|
|
+ this.classilfyList = [this.$t('Key215'), this.$t('Key44')]
|
|
},
|
|
},
|
|
-};
|
|
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -358,4 +379,4 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|