Commit 31b43754 authored by yun's avatar yun

Merge remote-tracking branch 'origin/master'

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