Commit 31b43754 authored by yun's avatar yun

Merge remote-tracking branch 'origin/master'

parents 8838d868 c8c938aa
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
}) })
} else if (this.$route.name === 'CourseDetail' && this.$route.query.pageName && this.$route.query.pageName === 'courseSearch') { } else if (this.$route.name === 'CourseDetail' && this.$route.query.pageName && this.$route.query.pageName === 'courseSearch') {
this.$router.push({ this.$router.push({
name: 'Home', name: this.$route.query.routerPage,
params: { params: {
searchFocus: 'focus', searchFocus: 'focus',
searchContent: this.$route.query.searchContent searchContent: this.$route.query.searchContent
...@@ -104,13 +104,22 @@ export default { ...@@ -104,13 +104,22 @@ export default {
}) })
} else if (this.$route.name === 'TrainDetail' && this.$route.query.pageName && this.$route.query.pageName === 'courseSearch') { } else if (this.$route.name === 'TrainDetail' && this.$route.query.pageName && this.$route.query.pageName === 'courseSearch') {
this.$router.push({ this.$router.push({
name: 'Home', name: this.$route.query.routerPage,
params: { params: {
searchFocus: 'focus', searchFocus: 'focus',
searchContent: this.$route.query.searchContent searchContent: this.$route.query.searchContent
} }
}) })
} else { } else if (this.$route.name === 'Classification') {
this.$router.replace({
name: 'Home'
})
} else if (this.$route.name === 'ClassificationResult') {
this.$router.replace({
name: 'Classification'
})
}
else {
this.$router.go(-1) this.$router.go(-1)
} }
}, },
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
class="con-box large-con-box" class="con-box large-con-box"
v-for="(item,index) in tabsContentList" v-for="(item,index) in tabsContentList"
:key="index" :key="index"
@click="$curriculumTrainRouter(item.lessonType, item.businessId, '', item.valueConsume, item.lecturerId, item.lessonName,'courseSearch',value)" @click="$curriculumTrainRouter(item.lessonType, item.businessId, '', item.valueConsume, item.lecturerId, item.lessonName,'courseSearch',value,$route.name)"
> >
<curriculum <curriculum
:item="item" :item="item"
......
...@@ -397,7 +397,8 @@ export function removeClass(ele, cls) { ...@@ -397,7 +397,8 @@ export function removeClass(ele, cls) {
* @param lecturerId 讲师ID * @param lecturerId 讲师ID
* @param lessonName 课程名称 * @param lessonName 课程名称
*/ */
export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, lecturerId, lessonName, searchCourse, searchContent) { export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, lecturerId, lessonName, searchCourse, searchContent, routerPage) {
console.log(this.$route)
// 当前登录人请求 // 当前登录人请求
get.getMyCurInfo({ get.getMyCurInfo({
requireId: '' requireId: ''
...@@ -429,7 +430,9 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le ...@@ -429,7 +430,9 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le
query: { query: {
id: id, id: id,
pageName: searchCourse, pageName: searchCourse,
searchContent: searchContent searchContent: searchContent,
routerPage
} }
}) })
} else { } else {
...@@ -450,7 +453,8 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le ...@@ -450,7 +453,8 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le
query: { query: {
id: id, id: id,
pageName: searchCourse, pageName: searchCourse,
searchContent: searchContent searchContent: searchContent,
routerPage
} }
}) })
} else { } else {
...@@ -472,7 +476,8 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le ...@@ -472,7 +476,8 @@ export function curriculumTrainRouter(lessonType, id, fromName, valueConsume, le
fromName: fromName, fromName: fromName,
role: 'people', role: 'people',
pageName: searchCourse, pageName: searchCourse,
searchContent: searchContent searchContent: searchContent,
routerPage
} }
}) })
} else { } else {
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
style="width: 24px;height: 30px;display: inline-block;margin: 0 20px 0 10px" style="width: 24px;height: 30px;display: inline-block;margin: 0 20px 0 10px"
@click="filePreview(item)" @click="filePreview(item)"
> >
<div style="white-space: nowrap;text-overflow: ellipsis;overflow:hidden"> <div style="white-space: nowrap;text-overflow: ellipsis;overflow:hidden;width: 100%">
<span <span
@click="filePreview(item)" @click="filePreview(item)"
:title="item.fileName" :title="item.fileName"
...@@ -163,8 +163,7 @@ ...@@ -163,8 +163,7 @@
<span <span
class="saveTrain" class="saveTrain"
id="saveTrain" id="saveTrain"
v-if="course.role !== 'teacher'" @click.stop="saveTrain(item)"
@click="saveTrain(item)"
> >
保存 保存
</span> </span>
...@@ -1487,15 +1486,14 @@ export default { ...@@ -1487,15 +1486,14 @@ export default {
} }
.saveTrain{ .saveTrain{
top: -10px;
background-color: rgba(222,222,222,0); background-color: rgba(222,222,222,0);
height: 20px; height: 20px;
/*border: 0px;*/ /*border: 0px;*/
color: #4498F0; color: #4498F0;
width: 21.33333vw;
text-align: right; text-align: right;
flex: auto; width: 50px;
padding: 20px; white-space: nowrap;
padding:0 15px 0 0;
} }
.content { .content {
height: 100%; height: 100%;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<nav-bar-view <nav-bar-view
class="navBarBox" class="navBarBox"
:title="title" :title="title"
:fromName="fromName" :from-name="fromName"
> >
<template <template
v-slot:right v-slot:right
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
> >
<div class="iconSpan"> <div class="iconSpan">
<img <img
id="resultSearch"
class="search" class="search"
src="~@assets/images/搜索.png" src="~@assets/images/搜索.png"
@click="search" @click="search"
...@@ -87,7 +88,10 @@ ...@@ -87,7 +88,10 @@
:key="index" :key="index"
@click="$curriculumTrainRouter(item.lessonType, item.businessId, '', item.valueConsume, item.lecturerId, item.lessonName)" @click="$curriculumTrainRouter(item.lessonType, item.businessId, '', item.valueConsume, item.lecturerId, item.lessonName)"
> >
<curriculum :item="item" :returnValue="returnValue"/> <curriculum
:item="item"
:return-value="returnValue"
/>
</div> </div>
</list> </list>
</div> </div>
...@@ -200,6 +204,7 @@ ...@@ -200,6 +204,7 @@
</div> </div>
</transition> </transition>
<search-box <search-box
ref="searchBox"
v-if="searchShow" v-if="searchShow"
@onCancel="onCancel" @onCancel="onCancel"
/> />
...@@ -264,7 +269,8 @@ export default { ...@@ -264,7 +269,8 @@ export default {
methods: { methods: {
// 点击搜索 事件 // 点击搜索 事件
search() { search() {
const navBar = document.getElementById('navBar') const that = this,
navBar = document.getElementById('navBar')
navBar.style.display = 'none' navBar.style.display = 'none'
// 重建组件 // 重建组件
this.$nextTick(() => { this.$nextTick(() => {
...@@ -273,7 +279,14 @@ export default { ...@@ -273,7 +279,14 @@ export default {
// setTimeout(() => { // setTimeout(() => {
this.searchShow = true this.searchShow = true
setTimeout(() => { setTimeout(() => {
if (that.$route.params.searchFocus !== 'focus') {
document.getElementById('searchInputP').focus() document.getElementById('searchInputP').focus()
}
if (that.$route.params.searchContent !== undefined) {
that.$refs.searchBox.backToSearch(that.$route.params.searchContent)
}
delete that.$route.params.searchContent
delete that.$route.params.searchFocus
}, 500) }, 500)
// }, 10) // }, 10)
}) })
...@@ -432,6 +445,9 @@ export default { ...@@ -432,6 +445,9 @@ export default {
console.log(this.$route) console.log(this.$route)
const params = this.$route.params.fromName === 'Classification' ? this.$route.params : JSON.parse(sessionStorage.getItem('classificationResultObj')) const params = this.$route.params.fromName === 'Classification' ? this.$route.params : JSON.parse(sessionStorage.getItem('classificationResultObj'))
this._getMounted(params) this._getMounted(params)
if (this.$route.params.searchFocus && this.$route.params.searchFocus === 'focus') {
document.getElementById('resultSearch').click()
}
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
sessionStorage.setItem('classificationResultObj', JSON.stringify({ sessionStorage.setItem('classificationResultObj', JSON.stringify({
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
> >
<div class="iconSpan"> <div class="iconSpan">
<img <img
id="searchClassImg"
class="search" class="search"
src="~@assets/images/搜索.png" src="~@assets/images/搜索.png"
@click="search" @click="search"
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
</div> </div>
</div> </div>
<search-box <search-box
ref="searchBox"
v-if="searchShow" v-if="searchShow"
@onCancel="onCancel" @onCancel="onCancel"
/> />
...@@ -117,7 +119,8 @@ export default { ...@@ -117,7 +119,8 @@ export default {
methods: { methods: {
// 点击搜索 事件 // 点击搜索 事件
search() { search() {
const navBar = document.getElementById('navBar') const that = this,
navBar = document.getElementById('navBar')
navBar.style.display = 'none' navBar.style.display = 'none'
// 重建组件 // 重建组件
this.$nextTick(() => { this.$nextTick(() => {
...@@ -126,7 +129,14 @@ export default { ...@@ -126,7 +129,14 @@ export default {
// setTimeout(() => { // setTimeout(() => {
this.searchShow = true this.searchShow = true
setTimeout(() => { setTimeout(() => {
if (that.$route.params.searchFocus !== 'focus') {
document.getElementById('searchInputP').focus() document.getElementById('searchInputP').focus()
}
if (that.$route.params.searchContent !== undefined) {
that.$refs.searchBox.backToSearch(that.$route.params.searchContent)
}
delete that.$route.params.searchContent
delete that.$route.params.searchFocus
}, 500) }, 500)
// }, 10) // }, 10)
}) })
...@@ -194,10 +204,13 @@ export default { ...@@ -194,10 +204,13 @@ export default {
fromName: 'Classification' fromName: 'Classification'
} }
}) })
}, }
}, },
mounted() { mounted() {
this.BCourse() this.BCourse()
if (this.$route.params.searchFocus && this.$route.params.searchFocus === 'focus') {
document.getElementById('searchClassImg').click()
}
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment