Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mt-education-mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王旭
mt-education-mobile
Commits
31b43754
Commit
31b43754
authored
Jan 06, 2020
by
yun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8838d868
c8c938aa
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
22 deletions
+63
-22
NavBar.vue
src/components/NavBar.vue
+12
-3
index.vue
src/components/Search/index.vue
+1
-1
index.js
src/utils/index.js
+9
-4
index.vue
src/views/TrainDetail/index.vue
+5
-7
classificationResult.vue
src/views/classification/classificationResult.vue
+20
-4
index.vue
src/views/classification/index.vue
+16
-3
No files found.
src/components/NavBar.vue
View file @
31b43754
...
...
@@ -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
)
}
},
...
...
src/components/Search/index.vue
View file @
31b43754
...
...
@@ -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"
...
...
src/utils/index.js
View file @
31b43754
...
...
@@ -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
{
...
...
src/views/TrainDetail/index.vue
View file @
31b43754
...
...
@@ -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%;
...
...
src/views/classification/classificationResult.vue
View file @
31b43754
...
...
@@ -3,7 +3,7 @@
<nav-bar-view
class=
"navBarBox"
:title=
"title"
:from
N
ame=
"fromName"
:from
-n
ame=
"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
(()
=>
{
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
({
...
...
src/views/classification/index.vue
View file @
31b43754
...
...
@@ -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
(()
=>
{
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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment