Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
4533cbb2
提交
4533cbb2
authored
7月 14, 2020
作者:
王拯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
在字段为0的情况下隐藏特定导航条
上级
e2cba1aa
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
5 行删除
+39
-5
sidebar.vue
client/src/components/learnSysLayout/sidebar.vue
+34
-1
course.vue
client/src/pages/learn/course.vue
+5
-4
没有找到文件。
client/src/components/learnSysLayout/sidebar.vue
浏览文件 @
4533cbb2
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<el-button
type=
"text"
class=
"com-txt out-login"
@
click=
"goOutLogin"
>
{{ $t('components.learnSysLayout.sideBar.outLogin') }}
</el-button>
<el-button
type=
"text"
class=
"com-txt out-login"
@
click=
"goOutLogin"
>
{{ $t('components.learnSysLayout.sideBar.outLogin') }}
</el-button>
</el-menu-item>
</el-menu-item>
<
template
v-for=
"(item, index) in headerData"
>
<
template
v-for=
"(item, index) in headerData"
>
<template
v-if=
"item.children"
>
<template
v-if=
"item.children
&& item.children.length > 0
"
>
<el-submenu
v-bind:key=
"index"
:index=
"item.index"
>
<el-submenu
v-bind:key=
"index"
:index=
"item.index"
>
<template
slot=
"title"
><i
:class=
"item.iconClass"
></i><span
slot=
"title"
>
{{
item
.
name
}}
</span></
template
>
<template
slot=
"title"
><i
:class=
"item.iconClass"
></i><span
slot=
"title"
>
{{
item
.
name
}}
</span></
template
>
<
template
v-for=
"(_item, _index) in item.children"
>
<
template
v-for=
"(_item, _index) in item.children"
>
...
@@ -110,8 +110,41 @@ export default {
...
@@ -110,8 +110,41 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
defineEvent
()
this
.
defineEvent
()
this
.
showHeaderData
()
},
},
methods
:
{
methods
:
{
arrHeader
(
arr
)
{
var
newArr
=
[]
arr
.
map
(
k
=>
{
newArr
.
push
({
name
:
k
.
name
,
iconClass
:
k
.
iconClass
,
index
:
k
.
index
,
children
:
[]
})
return
arr
})
return
newArr
},
showHeaderData
()
{
const
isOpenExamination
=
this
.
UserInfo
.
student_info
.
is_open_learning_notes
||
null
const
isOpenExaminationNotes
=
this
.
UserInfo
.
student_info
.
is_open_examination_notes
||
null
var
arrList
=
[]
var
obj
if
(
Number
(
isOpenExamination
)
===
0
&&
Number
(
isOpenExaminationNotes
)
===
0
)
{
this
.
headerData
=
this
.
arrHeader
(
this
.
headerData
).
filter
(
k
=>
k
.
index
!==
'1'
)
}
else
if
(
Number
(
isOpenExamination
)
===
0
)
{
obj
=
{
name
:
'考前须知'
,
index
:
'1-2'
}
arrList
=
this
.
arrHeader
(
this
.
headerData
)
arrList
[
0
].
children
.
push
(
obj
)
this
.
headerData
=
arrList
}
else
if
(
Number
(
isOpenExaminationNotes
)
===
0
)
{
obj
=
{
name
:
'学习须知'
,
index
:
'1-1'
}
arrList
=
this
.
arrHeader
(
this
.
headerData
)
arrList
[
0
].
children
.
push
(
obj
)
this
.
headerData
=
arrList
}
},
goPages
(
str
)
{
goPages
(
str
)
{
switch
(
str
)
{
switch
(
str
)
{
case
'1-1'
:
this
.
$router
.
push
({
path
:
'/app/tips/learning-tips'
});
break
case
'1-1'
:
this
.
$router
.
push
({
path
:
'/app/tips/learning-tips'
});
break
...
...
client/src/pages/learn/course.vue
浏览文件 @
4533cbb2
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<ul>
<ul>
<template
v-for=
"(item1, index1) in item.arrItem"
>
<template
v-for=
"(item1, index1) in item.arrItem"
>
<li
:class=
"['tab', (item.selectIndex == index1 ? 'active' : '')]"
@
click=
"selFindSelect"
:key=
"index1"
:data-index=
'index1'
:data-i=
"index"
:data-key=
'item.key'
:data-val=
'item1.val'
>
{{
item1
.
name
}}
</li>
<li
:class=
"['tab', (item.selectIndex == index1 ? 'active' : '')]"
@
click=
"selFindSelect"
:key=
"index1"
:data-index=
'index1'
:data-i=
"index"
:data-key=
'item.key'
:data-val=
'item1.val'
v-if=
"Number(item1.show) === 1"
>
{{
item1
.
name
}}
</li>
</
template
>
</
template
>
</ul>
</ul>
</div>
</div>
...
@@ -85,6 +85,7 @@ import cAction from '@action'
...
@@ -85,6 +85,7 @@ import cAction from '@action'
export
default
{
export
default
{
components
:
{},
components
:
{},
data
()
{
data
()
{
const
_global
=
this
.
$GLOBAL
return
{
return
{
filter
:
{
filter
:
{
studyEarly
:
'down'
,
studyEarly
:
'down'
,
...
@@ -96,9 +97,9 @@ export default {
...
@@ -96,9 +97,9 @@ export default {
selectIndex
:
0
,
selectIndex
:
0
,
key
:
'course_type'
,
key
:
'course_type'
,
arrItem
:
[
arrItem
:
[
{
val
:
'1'
,
name
:
this
.
$t
(
'action.courseAction.mustLearn'
)
},
{
val
:
'1'
,
name
:
this
.
$t
(
'action.courseAction.mustLearn'
)
,
show
:
(
_global
&&
_global
.
UserInfo
).
student_info
.
is_open_textbook_learning
},
{
val
:
'2'
,
name
:
this
.
$t
(
'action.courseAction.changeLearn'
)
},
{
val
:
'2'
,
name
:
this
.
$t
(
'action.courseAction.changeLearn'
)
,
show
:
(
_global
&&
_global
.
UserInfo
).
student_info
.
is_open_required_course
},
{
val
:
'3'
,
name
:
this
.
$t
(
'action.courseAction.repeatLearn'
)
}
{
val
:
'3'
,
name
:
this
.
$t
(
'action.courseAction.repeatLearn'
)
,
show
:
(
_global
&&
_global
.
UserInfo
).
student_info
.
is_open_extended_course
}
]
]
}],
}],
homeList
:
[],
// 从后台请求
homeList
:
[],
// 从后台请求
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论