|
@@ -12,15 +12,15 @@
|
|
|
text-color="#000"
|
|
|
active-text-color="#FF9900"
|
|
|
>
|
|
|
- <el-menu-item index="TEACHINGTOOL"> 教研工具</el-menu-item>
|
|
|
+ <!-- <el-menu-item index="TEACHINGTOOL"> 教研工具</el-menu-item> -->
|
|
|
<el-menu-item index="TEXTBOOK">
|
|
|
- <!-- 教辅资料 -->{{ $t("Key554") }}
|
|
|
+ <!-- 教辅资料 -->{{ $t('Key554') }}
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="TEACHING">
|
|
|
- <!-- 教研资料 -->{{ $t("Key214") }}
|
|
|
+ <!-- 教研资料 -->{{ $t('Key214') }}
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="TOOLBOOK">
|
|
|
- <!-- 工具书 -->{{ $t("Key555") }}
|
|
|
+ <!-- 工具书 -->{{ $t('Key555') }}
|
|
|
</el-menu-item>
|
|
|
</el-menu>
|
|
|
<div class="seek" @keyup="keyDownSeekData">
|
|
@@ -44,9 +44,9 @@
|
|
|
</div>
|
|
|
<!-- 主要信息列表 -->
|
|
|
<div class="main" v-loading="loading">
|
|
|
- <div id="TEACHINGTOOL">
|
|
|
+ <!-- <div id="TEACHINGTOOL">
|
|
|
<TeachingTool />
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div id="TEXTBOOK" v-if="textBookList">
|
|
|
<Textbook v-if="textBookList.data" :classList="textBookList.data" />
|
|
|
</div>
|
|
@@ -61,18 +61,18 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Header from "@/components/Header";
|
|
|
+import Header from '@/components/Header'
|
|
|
|
|
|
-import Textbook from "@/components/teacher-dev/Textbook";
|
|
|
-import Teaching from "@/components/teacher-dev/Teaching";
|
|
|
-import ToolBook from "@/components/teacher-dev/ToolBook";
|
|
|
-import TeachingTool from "@/components/teacher-dev/TeachingTool";
|
|
|
+import Textbook from '@/components/teacher-dev/Textbook'
|
|
|
+import Teaching from '@/components/teacher-dev/Teaching'
|
|
|
+import ToolBook from '@/components/teacher-dev/ToolBook'
|
|
|
+import TeachingTool from '@/components/teacher-dev/TeachingTool'
|
|
|
|
|
|
-import { materiallist } from "@/api/api";
|
|
|
-import { updateWordPack } from "@/utils/i18n";
|
|
|
+import { materiallist } from '@/api/api'
|
|
|
+import { updateWordPack } from '@/utils/i18n'
|
|
|
|
|
|
export default {
|
|
|
- name: "teacher_edu",
|
|
|
+ name: 'teacher_edu',
|
|
|
components: {
|
|
|
Header,
|
|
|
|
|
@@ -84,109 +84,109 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- activeIndex: "TEACHINGTOOL",
|
|
|
- navName: "CLASSICAL COURSE",
|
|
|
- SeekName: "",
|
|
|
+ activeIndex: 'TEXTBOOK',
|
|
|
+ navName: 'CLASSICAL COURSE',
|
|
|
+ SeekName: '',
|
|
|
loading: false,
|
|
|
dataList: null,
|
|
|
textBookList: null, //book数据
|
|
|
teachingList: null, // tea数据
|
|
|
toolBookList: null, //工具书
|
|
|
isData: false,
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
// 切换导航
|
|
|
handleSelect(key, keyPath) {
|
|
|
- console.log(key, keyPath);
|
|
|
- this.navName = key;
|
|
|
- this.changeNav(key);
|
|
|
+ console.log(key, keyPath)
|
|
|
+ this.navName = key
|
|
|
+ this.changeNav(key)
|
|
|
},
|
|
|
// 锚点定位
|
|
|
changeNav(index) {
|
|
|
- let id = index;
|
|
|
- let dom = document.getElementById(id);
|
|
|
+ let id = index
|
|
|
+ let dom = document.getElementById(id)
|
|
|
if (dom) {
|
|
|
- document.getElementById(id).scrollIntoView();
|
|
|
+ document.getElementById(id).scrollIntoView()
|
|
|
}
|
|
|
},
|
|
|
// 前往搜索结果
|
|
|
gotoSeekResult() {
|
|
|
- if (this.SeekName != "") {
|
|
|
- this.SeekName = this.SeekName.trim();
|
|
|
+ if (this.SeekName != '') {
|
|
|
+ this.SeekName = this.SeekName.trim()
|
|
|
this.$router.push({
|
|
|
- path: "/Viewmore",
|
|
|
+ path: '/Viewmore',
|
|
|
query: { keyWord: this.SeekName },
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.$message.warning("请输入内容");
|
|
|
+ this.$message.warning('请输入内容')
|
|
|
}
|
|
|
},
|
|
|
keyDownSeekData(e) {
|
|
|
if (e.keyCode == 13) {
|
|
|
- this.gotoSeekResult();
|
|
|
+ this.gotoSeekResult()
|
|
|
}
|
|
|
},
|
|
|
// 获取数据
|
|
|
getData() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
materiallist({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- tagList: ["TEXTBOOK"],
|
|
|
+ tagList: ['TEXTBOOK'],
|
|
|
keyWord: this.keyWord,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.textBookList = res.data;
|
|
|
+ this.textBookList = res.data
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
materiallist({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- tagList: ["TEACHING"],
|
|
|
+ tagList: ['TEACHING'],
|
|
|
keyWord: this.keyWord,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.teachingList = res.data;
|
|
|
- this.loading = false;
|
|
|
+ this.teachingList = res.data
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
materiallist({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- tagList: ["TOOLBOOK"],
|
|
|
+ tagList: ['TOOLBOOK'],
|
|
|
keyWord: this.keyWord,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.toolBookList = res.data;
|
|
|
- this.loading = false;
|
|
|
+ this.toolBookList = res.data
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
async created() {
|
|
|
await updateWordPack({
|
|
|
word_key_list: [
|
|
|
- "Key5",
|
|
|
- "Key8",
|
|
|
- "Key9",
|
|
|
- "Key39",
|
|
|
- "Key47",
|
|
|
- "Key131",
|
|
|
- "Key214",
|
|
|
- "Key214",
|
|
|
- "Key554",
|
|
|
- "Key555",
|
|
|
+ 'Key5',
|
|
|
+ 'Key8',
|
|
|
+ 'Key9',
|
|
|
+ 'Key39',
|
|
|
+ 'Key47',
|
|
|
+ 'Key131',
|
|
|
+ 'Key214',
|
|
|
+ 'Key214',
|
|
|
+ 'Key554',
|
|
|
+ 'Key555',
|
|
|
],
|
|
|
- });
|
|
|
- this.isData = true;
|
|
|
+ })
|
|
|
+ this.isData = true
|
|
|
// 需要根据身份信息来判断是进入首页还是录入
|
|
|
// if (token) {
|
|
|
// if (JSON.parse(token).popedom_code_list.indexOf(2000006) != -1) {
|
|
@@ -209,9 +209,9 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getData();
|
|
|
+ this.getData()
|
|
|
},
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.teacher_edu {
|
|
@@ -277,4 +277,4 @@ export default {
|
|
|
padding: 0;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|