Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
8ebfc0fd
提交
8ebfc0fd
编写于
9月 28, 2020
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
把学科详情页头部抽成组件
上级
e9bec694
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
136 行增加
和
120 行删除
+136
-120
directory-info.vue
src/components/question/directory-info.vue
+119
-0
question-bank.vue
src/views/question-bank.vue
+17
-120
未找到文件。
src/components/question/directory-info.vue
0 → 100644
浏览文件 @
8ebfc0fd
<
template
>
<div
class=
"fixed-qb-header"
>
<div
class=
"header-info"
:class=
"!isWeb ? 'top-set' : ''"
>
<div
class=
"info-first"
>
<img
v-if=
"directoryInfo.avatarImageUrl"
:src=
"directoryInfo.avatarImageUrl"
>
<img
v-if=
"!directoryInfo.avatarImageUrl"
src=
"../../images/question/portrait.png"
>
<div
class=
"infor"
>
<p
class=
"name"
>
{{
directoryInfo
.
name
}}
医生
</p>
<p
class=
"question-result"
>
已做题
<span>
{{
directoryInfo
.
finishedNum
}}
</span>
错误题
<span
class=
"err"
>
{{
directoryInfo
.
wrongTitle
}}
</span>
正确率
<span
class=
"suc"
>
{{
directoryInfo
.
correctRatio
}}
%
</span></p>
</div>
</div>
<div
class=
"info-second"
>
<div
class=
"item"
@
click=
"wrongBook(1)"
><img
src=
"../../images/question/text.png"
>
错题集
<span
v-if=
"directoryInfo.wrongTitleBook"
>
(
{{
directoryInfo
.
wrongTitleBook
}}
)
</span></div>
<div
class=
"item"
@
click=
"wrongBook(2)"
><img
src=
"../../images/question/heart-h.png"
>
收藏
<span
v-if=
"directoryInfo.collectTitleBook"
>
(
{{
directoryInfo
.
collectTitleBook
}}
)
</span></div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
isWeb
:
window
.
__isWeb
,
}
},
props
:
{
directoryInfo
:
{
type
:
Object
,
default
:
()
=>
{}
},
},
methods
:
{
wrongBook
(
type
)
{
this
.
$emit
(
'handlerBook'
,
type
)
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
.fixed-qb-header{
position: relative;
.header-info{
position: fixed;
z-index: 200;
background-color: #FFFFFF;
padding: 0 16px;
box-sizing: border-box;
width: 100%;
&.top-set{
top: 73px;
}
.info-first{
display: flex;
padding: 20px 0;
img{
width: 44px;
height: 44px;
border-radius: 50%;
}
.infor{
margin-left: 12px;
.name{
color: #373839;
font-size: 18px;
font-weight: 700;
line-height: 22px;
}
.question-result{
font-size: 14px;
color: #676869;
line-height: 16px;
margin-top: 9px;
span{
margin-left: 3px;
margin-right: 15px;
color: #373839;
&.err{
color: #ED3131;
}
&.suc{
color: #449284;
}
}
}
}
}
.info-second{
display: flex;
justify-content: space-between;
align-items: center;
.item{
width: 165.5px;
height: 40px;
/*line-height: 40px;*/
text-align: center;
border-radius: 6px;
background-color: #F8F9FA;
font-size: 14px;
font-weight: 700;
color: #373839;
display: flex;
align-items: center;
justify-content: center;
img{
width: 20px;
height: 20px;
margin-right: 8px;
}
span{
font-size: 12px;
margin-left: 2px;
height: 40px;
line-height: 40px;
}
}
}
}
}
</
style
>
src/views/question-bank.vue
浏览文件 @
8ebfc0fd
...
@@ -8,22 +8,7 @@
...
@@ -8,22 +8,7 @@
:isFixNavbar=
"isFixNavbar"
:isFixNavbar=
"isFixNavbar"
borderStyle=
"1px solid #fff"
borderStyle=
"1px solid #fff"
></CommonNavbar>
></CommonNavbar>
<div
class=
"fixed-qb-header"
>
<DirectoryInfo
:directoryInfo=
"directoryInfo"
@
handlerBook=
"handlerBook"
></DirectoryInfo>
<div
class=
"header-info"
:class=
"!isWeb ? 'top-set' : ''"
>
<div
class=
"info-first"
>
<img
v-if=
"directoryInfo.avatarImageUrl"
:src=
"directoryInfo.avatarImageUrl"
>
<img
v-if=
"!directoryInfo.avatarImageUrl"
src=
"../images/question/portrait.png"
>
<div
class=
"infor"
>
<p
class=
"name"
>
{{
directoryInfo
.
name
}}
医生
</p>
<p
class=
"question-result"
>
已做题
<span>
{{
directoryInfo
.
finishedNum
}}
</span>
错误题
<span
class=
"err"
>
{{
directoryInfo
.
wrongTitle
}}
</span>
正确率
<span
class=
"suc"
>
{{
directoryInfo
.
correctRatio
}}
%
</span></p>
</div>
</div>
<div
class=
"info-second"
>
<div
class=
"item"
@
click=
"wrongBook"
><img
src=
"../images/question/text.png"
>
错题集
<span
v-if=
"directoryInfo.wrongTitleBook"
>
(
{{
directoryInfo
.
wrongTitleBook
}}
)
</span></div>
<div
class=
"item"
@
click=
"collectBook"
><img
src=
"../images/question/heart-h.png"
>
收藏
<span
v-if=
"directoryInfo.collectTitleBook"
>
(
{{
directoryInfo
.
collectTitleBook
}}
)
</span></div>
</div>
</div>
</div>
<div
class=
"question-bank-content"
:class=
"!isWeb ? 'add-padding' : ''"
>
<div
class=
"question-bank-content"
:class=
"!isWeb ? 'add-padding' : ''"
>
<div
class=
"question-intro"
v-if=
"directoryInfo.directoryImageUrl || directoryInfo.directoryIntro"
>
<div
class=
"question-intro"
v-if=
"directoryInfo.directoryImageUrl || directoryInfo.directoryIntro"
>
<img
v-if=
"directoryInfo.directoryImageUrl"
:src=
"directoryInfo.directoryImageUrl"
>
<img
v-if=
"directoryInfo.directoryImageUrl"
:src=
"directoryInfo.directoryImageUrl"
>
...
@@ -77,6 +62,7 @@
...
@@ -77,6 +62,7 @@
import
ChangeCard
from
"@/components/cme/change-card"
;
import
ChangeCard
from
"@/components/cme/change-card"
;
import
CourseDialog
from
"@/components/course/course-dialog"
;
import
CourseDialog
from
"@/components/course/course-dialog"
;
import
Loading
from
"@/components/common/common-loading"
;
import
Loading
from
"@/components/common/common-loading"
;
import
DirectoryInfo
from
"@/components/question/directory-info"
;
import
{
Progress
,
Toast
}
from
'vant'
;
import
{
Progress
,
Toast
}
from
'vant'
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
getWebPageUrl
}
from
"@/utils/index"
;
import
{
getWebPageUrl
}
from
"@/utils/index"
;
...
@@ -87,7 +73,8 @@ export default {
...
@@ -87,7 +73,8 @@ export default {
ChangeCard
,
ChangeCard
,
Progress
,
Progress
,
CourseDialog
,
CourseDialog
,
Loading
Loading
,
DirectoryInfo
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -298,25 +285,16 @@ export default {
...
@@ -298,25 +285,16 @@ export default {
this
.
beforeChangeCardAction
(
this
.
cmeCardModels
.
cardKey
,
true
)
this
.
beforeChangeCardAction
(
this
.
cmeCardModels
.
cardKey
,
true
)
}
}
},
},
//错题集
//错题集或收藏夹
wrongBook
()
{
handlerBook
(
val
)
{
this
.
checkTokenForNative
(()
=>
{
let
commitKind
=
null
,
currentTitle
=
''
;
this
.
$router
.
push
({
if
(
val
==
1
)
{
path
:
'/question-detail'
,
commitKind
=
1
;
query
:
{
currentTitle
=
'错题集'
;
directoryId
:
0
,
}
else
if
(
val
==
2
)
{
secondSubjectId
:
this
.
secondSubjectId
,
commitKind
=
2
;
cardType
:
this
.
directoryInfo
.
cardType
,
currentTitle
=
'收藏'
;
goodsType
:
this
.
directoryInfo
.
goodsType
,
}
commitKind
:
1
,
freeFlag
:
1
,
currentTitle
:
'错题集'
}
})
});
},
//收藏
collectBook
()
{
this
.
checkTokenForNative
(()
=>
{
this
.
checkTokenForNative
(()
=>
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/question-detail'
,
path
:
'/question-detail'
,
...
@@ -325,9 +303,9 @@ export default {
...
@@ -325,9 +303,9 @@ export default {
secondSubjectId
:
this
.
secondSubjectId
,
secondSubjectId
:
this
.
secondSubjectId
,
cardType
:
this
.
directoryInfo
.
cardType
,
cardType
:
this
.
directoryInfo
.
cardType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
goodsType
:
this
.
directoryInfo
.
goodsType
,
commitKind
:
2
,
commitKind
:
commitKind
,
freeFlag
:
1
,
freeFlag
:
1
,
currentTitle
:
'收藏'
currentTitle
:
currentTitle
}
}
})
})
});
});
...
@@ -468,92 +446,11 @@ export default {
...
@@ -468,92 +446,11 @@ export default {
width: 100%;
width: 100%;
padding-bottom: 60px;
padding-bottom: 60px;
box-sizing: border-box;
box-sizing: border-box;
.fixed-qb-header{
position: relative;
.header-info{
position: fixed;
z-index: 200;
background-color: #FFFFFF;
padding: 0 16px;
box-sizing: border-box;
width: 100%;
&.top-set{
top: 73px;
}
.info-first{
display: flex;
padding: 20px 0;
img{
width: 44px;
height: 44px;
border-radius: 50%;
}
.infor{
margin-left: 12px;
.name{
color: #373839;
font-size: 18px;
font-weight: 700;
line-height: 22px;
}
.question-result{
font-size: 14px;
color: #676869;
line-height: 16px;
margin-top: 9px;
span{
margin-left: 3px;
margin-right: 15px;
color: #373839;
&.err{
color: #ED3131;
}
&.suc{
color: #449284;
}
}
}
}
}
.info-second{
display: flex;
justify-content: space-between;
align-items: center;
.item{
width: 165.5px;
height: 40px;
/*line-height: 40px;*/
text-align: center;
border-radius: 6px;
background-color: #F8F9FA;
font-size: 14px;
font-weight: 700;
color: #373839;
display: flex;
align-items: center;
justify-content: center;
img{
width: 20px;
height: 20px;
margin-right: 8px;
}
span{
font-size: 12px;
margin-left: 2px;
height: 40px;
line-height: 40px;
}
}
}
}
}
.question-bank-content{
.question-bank-content{
padding:
0 16px
;
padding:
126px 16px 0
;
box-sizing: border-box;
box-sizing: border-box;
position: relative;
position: relative;
/*margin-top: 155px;*/
padding-top: 126px;
&.add-padding{
&.add-padding{
padding-top: 135px;
padding-top: 135px;
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录