Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-annual-summary
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-annual-summary
提交
87bd8014
提交
87bd8014
编写于
5月 14, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
弹框、按钮逻辑等
上级
6d323227
变更
12
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
1512 行增加
和
53 行删除
+1512
-53
coop-list-item copy.vue
src/components/business/coop-list-item copy.vue
+407
-0
coop-list-item.vue
src/components/business/coop-list-item.vue
+13
-0
basic-info.vue
src/components/cme/basic-info.vue
+1
-1
common-button.vue
src/components/cme/common-button.vue
+1
-1
exjumper-button.vue
src/components/cme/exjumper-button.vue
+67
-0
exjumper-dialog.vue
src/components/cme/exjumper-dialog.vue
+167
-0
item-leader.vue
src/components/cme/item-leader.vue
+1
-1
env-config.js
src/utils/env-config.js
+1
-1
fetch.js
src/utils/fetch.js
+1
-1
mixins.js
src/utils/mixins.js
+1
-1
merge-detail copy.vue
src/views/merge-detail copy.vue
+698
-0
merge-detail.vue
src/views/merge-detail.vue
+154
-47
未找到文件。
src/components/business/coop-list-item copy.vue
0 → 100644
浏览文件 @
87bd8014
<
template
>
<!-- 专项合作列表 -->
<section
class=
"coop-container"
>
<div
v-show=
"paramData.length && isShow"
v-for=
"(item , index) in paramData"
:key=
"index"
class=
"coop-item"
@
click=
"coopDetails(item)"
>
<div
class=
"coop-item-left"
>
<img
:src=
"item.imgUrl"
/>
<span
v-if=
"item.projectStatusValue"
class=
"coop-container-status"
:style=
"
{'background': cBgColor(item)}"
>
{{
item
.
projectStatusValue
|
statusText
}}
</span>
</div>
<div
class=
"coop-item-right"
>
<span
class=
"coop-item-right-title"
>
{{
item
.
name
}}
</span>
<span
class=
"coop-item-right-other"
>
{{
item
.
level
}}
|
{{
item
.
credit
}}
|
{{
item
.
scope
}}
</span>
<!--
<span
v-if=
"item.pType == 1"
class=
"coop-item-right-other"
>
起止日期
{{
item
.
oldTime
}}
</span>
-->
<!--
<span
v-else
class=
"coop-item-right-other"
>
起止日期
{{
item
.
projectBegintimeLong
|
formatTime
}}
-
{{
item
.
projectEndtimeLong
|
formatTime
}}
</span>
-->
<span
class=
"coop-item-right-other"
>
{{
item
.
startDate
|
formatTime
(
'{y
}
.{m
}
.{d
}
'
)
}}
至
{{
item
.
endDate
|
formatTime
(
'{y
}
.{m
}
.{d
}
'
)
}}
<
/span
>
<
/div
>
<
/div
>
<
NoMoreContent
v
-
show
=
"paramData.length > 9"
><
/NoMoreContent
>
<
NoContent
v
-
show
=
"!paramData.length && isShow"
:
tabNum
=
"tabTo"
><
/NoContent
>
<!--
<
UpdateDialog
:
showGoUpdate
=
"showGoUpdate"
@
goUpdateHandler
=
"goUpdateHandler"
><
/UpdateDialog>--
>
<!--
<
van
-
popup
v
-
model
=
"showGoUpdate"
position
=
"bottom"
:
style
=
"{ height: '4.427rem'
}
"
>
<
div
class
=
"update-dialog-content"
>
<
p
class
=
"title"
>
该项目仅对河北石家庄市的用户开放
<
/p
>
<
p
class
=
"update-btn v-hairline-top confirm-btn"
@
click
=
"goUpdateHandler"
>
确定
<
/p
>
<
p
class
=
"update-btn v-hairline-top"
@
click
=
"showGoUpdate = false"
>
取消
<
/p
>
<
/div
>
<
/van-popup>--
>
<
/section
>
<
/template
>
<
script
>
import
NoMoreContent
from
"@/components/business/no-more-content"
;
import
NoContent
from
"@/components/business/no-content"
;
import
UpdateDialog
from
"@/components/business/update-dialog"
;
import
{
setEventByModuleCode
,
deepCopy
,
getWebPageUrl
}
from
"@/utils/index"
;
import
{
getAppVersion
}
from
"@/utils"
;
import
{
mapActions
,
mapGetters
}
from
"vuex"
;
import
{
Popup
}
from
"vant"
;
export
default
{
name
:
"coop-list-item"
,
data
()
{
return
{
bgColor
:
"green"
,
statusText
:
"进行中"
,
showGoUpdate
:
false
}
;
}
,
props
:
{
paramData
:
{
type
:
Array
,
default
:
()
=>
[]
}
,
coopType
:
{
type
:
Number
,
default
:
1
}
,
isShow
:
{
type
:
Boolean
,
default
:
false
}
,
tabTo
:
{
type
:
Number
,
default
:
1
}
,
userMobile
:
{
type
:
String
,
default
:
""
}
}
,
computed
:
{
...
mapGetters
([
"userInfo"
])
// cBgColor()
{
//
}
}
,
components
:
{
NoMoreContent
,
NoContent
,
UpdateDialog
}
,
mounted
()
{
}
,
filters
:
{
statusText
(
status
)
{
if
(
status
===
1
)
{
return
"参加中"
;
}
else
if
(
status
===
5
)
{
return
"进行中"
;
}
else
if
(
status
===
10
)
{
return
"已结束"
;
}
else
{
return
"已结束"
;
}
}
}
,
methods
:
{
...
mapActions
([
"setProjectTabIndex"
]),
cBgColor
(
item
)
{
if
(
item
.
projectStatusValue
===
1
)
{
return
"#5890DD"
;
}
else
if
(
item
.
projectStatusValue
===
5
)
{
return
"#449284"
;
}
else
if
(
item
.
projectStatusValue
===
10
)
{
return
"#373839"
;
}
else
{
return
"#5890DD"
;
}
}
,
coopDetails
(
item
)
{
if
(
this
.
userMobile
)
{
let
paramList
=
[
{
key
:
"pageUrl"
,
value
:
getWebPageUrl
(
`cme/#/coop?id=${item.id
}
&courseRequire=${item.courseRequire
}
`
),
type
:
4
,
seqNo
:
1
}
];
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M300"
,
jsonString
:
paramList
}
);
}
else
{
rocNative
.
gotoLogin
();
}
this
.
$sendBuriedData
({
component_tag
:
`210#210002#${item.id
}
#${item.name
}
`
//'210#210002#0#'+item.projectName
}
);
// if (item.courseRequire == 1)
{
//对课程完成度有控制,需判断版本号
// let appVersion = getAppVersion(this.userInfo.appVersion);
// // alert('版本'+appVersion)
// let flag = appVersion < 315;
// if (flag === true)
{
// // 小于315版本,添加去更新弹层
// this.showGoUpdate = true;
//
}
else
{
// // 跳转到老项目
// if(this.tabTo != 3)
{
// this.setProjectTabIndex(this.tabTo)
//
}
// if (item.pType == 1)
{
// this.goToPage(item);
// // 跳转到新项目
//
}
else
{
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
//
}
//
}
//
}
else
{
// // 跳转到老项目
// if(this.tabTo != 3)
{
// this.setProjectTabIndex(this.tabTo)
//
}
// if (item.pType == 1)
{
// this.goToPage(item);
// // 跳转到新项目
//
}
else
{
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// // this.$router.push(
{
// // path: "/coop",
// // query:
{
// // id: item.id,
// // coopType: this.coopType
// //
}
// //
}
);
//
}
//
}
}
,
// 跳转到新项目
// showModule(item, coopType, tabTo, courseRequire)
{
// if (window.__isWeb)
{
// if(item.parent === false)
{
// this.$router.push(
{
// path: "/coop",
// query:
{
// id: item.id,
// coopType: coopType,
// tabTo: tabTo,
// courseRequire: courseRequire,
//
}
//
}
);
//
}
else
{
// this.$router.push(
{
// path: "/parent",
// query:
{
// entryId: item.entryId,
//
}
//
}
);
//
}
// return;
//
}
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false)
{
// pageUrl = getWebPageUrl('coopv2/#/coop');
// paramList = [
//
{
// key: "pageUrl",
// value: pageUrl + `?id=$
{
item
.
id
}
&
coopType
=
$
{
coopType
}
&
tabTo
=
$
{
tabTo
}
&
courseRequire
=
$
{
courseRequire
}
`,
// type: 4,
// seqNo: 1
//
}
// ]
//
}
else {
// pageUrl = getWebPageUrl('coopv2/#/parent');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `
?
entryId
=
$
{
item
.
entryId
}
`,
// type: 4,
// seqNo: 1
//
}
// ]
//
}
// rocNative.dispatchEventByModuleCode({
// modeCode: "M300",
// jsonString: paramList
//
}
);
//
}
,
goToPage(item) {
let _this = this;
// 如果是湖北考试项目,则做相应权限判断 湖北的projectId=3
if (item.id == "3") {
if (!_this.userInfo.userToken) {
rocNative.gotoLogin();
return;
}
let param = {
type: 1,
token: _this.userInfo.userToken || _this.token,
setEntry: true
}
;
this.GET("portal/portalApp/role/3", param).then(res => {
if (res.code == "000000") {
// {
// "data": 0, // 0就是无权限,1有权限
// "code": "000000",
// "message": "成功"
//
}
if (res.data == 0) {
rocNative.showNativeToast({
message: "您不属于该项目,无法查看"
}
);
return;
}
}
else {
rocNative.gotoLogin();
return;
}
_this.goToPage1(item.contentListModel);
}
);
}
else {
_this.goToPage1(item.contentListModel);
}
}
,
// 跳转
goToPage1(itemData) {
let paramList = deepCopy(setEventByModuleCode(itemData));
let isStrokeUrl =
paramList[0] &&
paramList[0]["value"] &&
paramList[0]["value"].indexOf("stroke.js") !== -1;
let strokeUrl = "";
if (isStrokeUrl) {
strokeUrl =
paramList[0]["value"] + "&token=" + this.userInfo.userToken ||
_this.token;
paramList[0]["value"] = strokeUrl;
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
}
);
// this.appBuryingPointEntrust({
// ...activity_action,
// labelId: itemData.id,
// functionCode: this.id == 1 ? "c_project" : "f_activity",
// actionCode: this.id == 1 ? "c_project_tab" : "c_activity_tab",
// labelValue: itemData.title,
// createdTime: new Date().getTime()
//
}
);
}
,
goUpdateHandler() {
//去更新
rocNative.upGradeVersion();
this.showGoUpdate = false;
}
}
}
;
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.coop-container {
position: relative;
margin: px2rem(0px) px2rem(15px);
&-status {
position: absolute;
top: px2rem(6px);
left: 0;
// display: block;
width: px2rem(44px);
height: px2rem(18px);
line-height: px2rem(18px);
padding: px2rem(0px) 0 0 px2rem(4px);
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: px2rem(11px);
border-top-right-radius: px2rem(3px);
border-bottom-right-radius: px2rem(3px);
}
}
.coop-item {
display: flex;
width: 100%;
height: px2rem(128px);
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: px2rem(115px);
height: px2rem(86px);
margin-right: px2rem(15px);
border-radius: px2rem(3px);
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: px2rem(215px);
flex-direction: column;
padding-top: px2rem(4px);
&-title {
height: px2rem(50px);
line-height: px2rem(20px);
font-size: px2rem(16px);
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: px2rem(21px);
line-height: px2rem(20px);
font-size: px2rem(13px);
font-weight: 400;
color: rgba(151, 152, 153, 1);
width: px2rem(210px);
overflow : hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
}
}
.update-dialog-content {
padding: 0 px2rem(15px);
box-sizing: border-box;
.title {
text-align: center;
color: #373839;
font-size: px2rem(18px);
padding: px2rem(15px) 0;
line-height: px2rem(25px);
}
.update-btn {
text-align: center;
height: px2rem(55px);
line-height: px2rem(55px);
font-size: px2rem(16px);
color: #979899;
&.confirm-btn {
color: #449284;
}
&.v-hairline-top::after {
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay {
background-color: rgba(0, 0, 0, 0.5);
}
</style>
src/components/business/coop-list-item.vue
浏览文件 @
87bd8014
...
...
@@ -123,6 +123,19 @@ export default {
}
}
,
coopDetails
(
item
)
{
// 临时添加
if
(
window
.
__isWeb
)
{
this
.
$router
.
push
({
path
:
"/coop"
,
query
:
{
id
:
item
.
id
,
coopType
:
this
.
coopType
,
courseRequire
:
item
.
courseRequire
}
}
);
return
;
}
if
(
this
.
userMobile
)
{
let
paramList
=
[
{
...
...
src/components/cme/basic-info.vue
浏览文件 @
87bd8014
<
template
>
<div
class=
"basic-container"
>
<div
class=
"basic-title"
>
基本信息
</div>
<div
class=
"content"
>
<div
v-if=
"projectNo"
class=
"content"
>
<span>
项目编号
</span>
<span>
{{
projectNo
}}
</span>
</div>
...
...
src/components/cme/common-button.vue
浏览文件 @
87bd8014
...
...
@@ -40,7 +40,7 @@ export default {
line-height
:
px2rem
(
50px
);
width
:
100%
;
border-radius
:
px2rem
(
25px
);
font-size
:
17px
;
font-size
:
px2rem
(
17px
)
;
font-weight
:
700
;
color
:
#FFFFFF
;
background
:
#449284
;
...
...
src/components/cme/exjumper-button.vue
0 → 100644
浏览文件 @
87bd8014
<
template
>
<div
class=
"exjumper-button-wrapper button-default"
:class=
"type"
@
click=
"btnClick"
>
<span>
{{
btnText
}}
</span>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
btnText
:
{
type
:
String
,
default
:
'确定'
},
type
:
{
type
:
String
,
default
:
'primary'
}
},
data
()
{
return
{
}
},
methods
:
{
btnClick
()
{
if
(
this
.
type
==
'disabled'
)
return
;
this
.
$emit
(
'btnClick'
);
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"../../style/mixin"
;
.exjumper-button-wrapper
{
position
:
fixed
;
left
:
0
;
bottom
:
0
;
right
:
0
;
font-size
:
px2rem
(
14px
);
margin
:
px2rem
(
20px
)
px2rem
(
15px
);
text-align
:
center
;
&
.button-default
{
span
{
display
:
block
;
height
:
px2rem
(
50px
);
line-height
:
px2rem
(
50px
);
width
:
100%
;
border-radius
:
px2rem
(
25px
);
font-size
:
px2rem
(
17px
);
font-weight
:
700
;
color
:
#FFFFFF
;
background
:
#449284
;
}
}
&
.primary
{
span
{
color
:
#FFFFFF
;
background
:
#449284
;
}
}
&
.disabled
{
span
{
color
:
rgba
(
255
,
255
,
255
,
0
.95
);
background
:
#C7C8C9
;
}
}
}
</
style
>
\ No newline at end of file
src/components/cme/exjumper-dialog.vue
0 → 100644
浏览文件 @
87bd8014
<
template
>
<div
class=
"exjumper-dialog-wrraper"
v-if=
"isShowDialog"
>
<div
class=
"dialog-mask"
></div>
<div
class=
"dialog-container"
>
<div
class=
"title"
v-html=
"title"
></div>
<div
class=
"dialog-content"
>
{{
content
}}
</div>
<div
v-show=
"needSubContent"
class=
"dialog-sub-content"
v-html=
"subContent"
></div>
<div
class=
"dialog-footer v-hairline-top"
>
<span
:class=
"
{'single-btn': isSingle}" @click.stop.prevent="handlerAction(1)">
{{
cancleBtnText
}}
</span>
<span
v-show=
"!isSingle"
class=
"confirm-btn v-hairline-left"
@
click
.
stop
.
prevent=
"handlerAction(2)"
>
{{
confirmBtnText
}}
</span>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"common-dialog"
,
data
()
{
return
{
};
},
props
:
{
title
:
{
type
:
String
,
default
:
'即将打开<br/>“中华医学教育在线”平台'
},
content
:
{
type
:
String
,
default
:
''
},
needSubContent
:
{
type
:
Boolean
,
default
:
false
},
subContent
:
{
type
:
String
,
default
:
''
},
cancleBtnText
:
{
type
:
String
,
default
:
'取消'
},
confirmBtnText
:
{
type
:
String
,
default
:
'确定'
},
isShowDialog
:
{
type
:
Boolean
,
default
:
false
},
isSingle
:
{
type
:
Boolean
,
default
:
false
},
},
methods
:
{
handlerAction
(
type
)
{
this
.
$emit
(
"handlerAction"
,
type
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"../../style/mixin"
;
.exjumper-dialog-wrraper
{
position
:
fixed
;
top
:
0
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
2019
;
.dialog-mask
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2020
;
}
.dialog-container
{
z-index
:
2021
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
overflow
:
hidden
;
width
:
px2rem
(
300px
);
font-size
:
px2rem
(
18px
);
-webkit-transition
:
0
.3s
;
transition
:
0
.3s
;
border-radius
:
px2rem
(
4px
);
background-color
:
#fff
;
-webkit-transform
:
translate3d
(
-50%
,
-50%
,
0
);
transform
:
translate3d
(
-50%
,
-50%
,
0
);
-webkit-backface-visibility
:
hidden
;
backface-visibility
:
hidden
;
.title
{
margin-top
:
px2rem
(
30px
);
text-align
:
center
;
font-size
:
px2rem
(
18px
);
font-weight
:
700
;
color
:
#373839
;
}
.dialog-content
{
// margin: px2rem(30px) px2rem(22px);
margin
:
px2rem
(
20px
)
px2rem
(
30px
)
px2rem
(
30px
);
text-align
:
left
;
font-size
:
px2rem
(
14px
);
font-weight
:
400
;
color
:
#373839
;
}
.dialog-sub-content
{
margin
:
px2rem
(
-16px
)
px2rem
(
30px
)
px2rem
(
20px
);
// margin: px2rem(-16px) px2rem(22px) px2rem(30px);
text-align
:
left
;
font-size
:
px2rem
(
14px
);
line-height
:
px2rem
(
24px
);
font-weight
:
400
;
color
:
#979899
;
}
.dialog-footer
{
height
:
px2rem
(
50px
);
display
:
flex
;
align-items
:
center
;
&.
v-hairline-top
:
:
after
{
border-top-width
:
1px
;
}
span
{
display
:
inline-block
;
// width: 50%;
flex
:
1
;
height
:
px2rem
(
50px
);
line-height
:
px2rem
(
50px
);
font-size
:
px2rem
(
17px
);
text-align
:
center
;
color
:
#979899
;
&.
v-hairline-left
:
:
after
{
border-left-width
:
1px
;
}
&
.confirm-btn
{
color
:
#449284
;
}
&
.single-btn
{
color
:
#449284
;
}
}
}
}
[
class
*=
"v-hairline"
]
{
position
:
relative
;
&
:
:
after
{
content
:
" "
;
position
:
absolute
;
pointer-events
:
none
;
box-sizing
:
border-box
;
top
:
-50%
;
left
:
-50%
;
right
:
-50%
;
bottom
:
-50%
;
-webkit-transform
:
scale
(
0
.5
);
transform
:
scale
(
0
.5
);
border
:
0
solid
#f0f1f2
;
}
}
}
</
style
>
src/components/cme/item-leader.vue
浏览文件 @
87bd8014
...
...
@@ -12,7 +12,7 @@
</div>
</div>
<div
class=
"content"
>
<div
class=
"text"
>
{{
leaderText
}}
</div>
<div
class=
"text"
v-html=
"leaderText"
>
</div>
<div
v-if=
"leaderText.length > 70"
class=
"desc"
@
click=
"allText"
>
<span>
{{
btnText
}}
</span>
<img
v-if=
"!allTextFlag"
src=
"../../images/down.png"
/>
...
...
src/utils/env-config.js
浏览文件 @
87bd8014
...
...
@@ -9,7 +9,7 @@ export const envConfig = {
// baseUrl: 'http://192.168.140.14:10201/',
apiUrl
:
'https://dev-api.yunqueyi.com/'
,
webPageUrl
:
'https://dev-phome.yunqueyi.com/'
,
baseUrl
:
'https://
test1
-sc.yunqueyi.com/'
,
baseUrl
:
'https://
dev
-sc.yunqueyi.com/'
,
// baseUrl: 'https://test1-sc.yunqueyi.com/',
// apiUrl: 'https://test1-api.yunqueyi.com/',
...
...
src/utils/fetch.js
浏览文件 @
87bd8014
...
...
@@ -17,7 +17,7 @@ service.interceptors.request.use(config => {
if
(
config
.
data
.
token
){
config
.
headers
[
'token'
]
=
config
.
data
.
token
||
'0F32D60C3D7042158BCF1FB574E482BE'
if
(
process
.
env
.
BUILD_ENV
==
"development"
){
// 本地开发环境
config
.
headers
[
'token'
]
=
config
.
data
.
token
||
'
DA2A4E43343E47DEB4C4B708288D02D4'
||
'F5CE3BAEC4934864B1022C1C4D39EB40
'
;
config
.
headers
[
'token'
]
=
config
.
data
.
token
||
'
7A15D95AC2AF4C7C8FEEE23E7FF6EF34
'
;
}
// delete config.data.token;
}
...
...
src/utils/mixins.js
浏览文件 @
87bd8014
...
...
@@ -13,7 +13,7 @@ module.exports = {
query
=
this
.
$route
.
query
}
// alert('this.token' + this.token)
this
.
token
=
this
.
getUrlKey
(
'token'
)
||
(
query
&&
query
.
token
)
||
'9
B62E5874DA94979A54DB3E9DFC1443F
'
this
.
token
=
this
.
getUrlKey
(
'token'
)
||
(
query
&&
query
.
token
)
||
'9
22F166A53074EE4834AED6A762A430C
'
},
mounted
()
{
...
...
src/views/merge-detail copy.vue
0 → 100644
浏览文件 @
87bd8014
<
template
>
<!-- 组件详情页面:模块列表及其下面的元件列表 -->
<div
class=
"page-container-merge"
>
<CommonNavbar
id=
"header"
:bgColor=
"bgColor"
v-show=
"isShowNavbar"
:isBlack=
"isBlack"
:isShowShare=
"isShowShare"
:title=
"navTitle"
:shareTitle=
"project.projectName"
:shareTitleInfo=
"project.projectIntro"
:isFixNavbar=
"isFixNavbar"
:burialPoint=
"pointStyle"
borderStyle=
"0px solid #fff"
:backMethod=
"from"
></CommonNavbar>
<div
class=
"page-content list-container"
>
<!-- banner图片 -->
<div
v-if=
"bannerType == 1"
class=
"page-content-img-container"
>
<img
class=
"banner-img"
:src=
"attachmentUrl"
/>
<!--
<img
v-show=
"project.status == 1"
class=
"banner-img-1"
src=
"../images/status-join.png"
/>
-->
<img
v-show=
"project.status == 5"
class=
"banner-img-5"
src=
"../images/status-keep-on.png"
/>
<img
v-show=
"project.status == 10"
class=
"banner-img-10"
src=
"../images/status-end-cme.png"
/>
</div>
<!-- banner视频 -->
<CommonTcPlayer
v-if=
"bannerType == 2"
style=
"flex"
:options=
"videoOptions"
></CommonTcPlayer>
<!-- 项目标题 -->
<CommonDescription
:projectName=
"project.projectName"
:studyNum=
"project.studyNum"
:subject=
"project.subject"
/>
<!-- 步骤条 -->
<div
ref=
"cmeStepRef"
>
<CmeStep
:currentProgress=
"project.currentProgress"
:studyProgress=
"project.studyProgress"
:credit=
"project.credit"
:creditId=
"project.creditId"
:certificateUrl=
"project.certificateUrl"
:inScope=
"project.inScope"
:projectId=
"projectId"
:certificateId=
"project.certificateId"
@
applicationCredit=
"applicationCredit"
/>
</div>
<!-- 简介和目录 -->
<div
class=
"intro-catalogue-container"
>
<div
id=
"content-title"
class=
"title"
:class=
"
{'fixed-title-1': (fixedFlag
&&
!isWeb), 'fixed-title-2': (fixedFlag
&&
isWeb)}">
<span
:class=
"
{'focus': tabFlag}" @click="jumpIntro">简介
</span>
<span
:class=
"
{'focus': !tabFlag}" @click="jumpCatalogue">目录
</span>
</div>
<div
id=
"intro-content"
class=
"intro-content"
>
<BasicInfo
:projectNo=
"project.projectNo"
:credit=
"project.credit"
:level=
"project.level"
:scope=
"project.scope"
:startDate=
"project.startDate"
:endDate=
"project.endDate"
:organName=
"project.organName"
:remind=
"project.remind"
:projectCredit=
"project.projectCredit"
/>
<LearnKnow
:mustKnow=
"project.mustKnow"
></LearnKnow>
<CommonSpliteLine></CommonSpliteLine>
<ItemIntro
:textContent=
"textContent"
@
itemIntroText=
"itemIntroText"
></ItemIntro>
<ItemLeader
:projectLeader=
"projectLeader"
:leaderText=
"leaderText"
@
changeLeaderText=
"changeLeaderText"
/>
<TeacterIntro
:doctorList=
"doctorList"
></TeacterIntro>
</div>
<CommonSpliteLine></CommonSpliteLine>
<div
id=
"catalogue-content"
class=
"catalogue-content"
>
<div
class=
"catalogue-title"
>
目录
</div>
<CellListDetail
:projectComponent=
"projectComponentDTOS"
:actionList=
"actionList"
:detailNum=
"detailNum"
:courseRequire=
"courseRequire"
/>
</div>
</div>
</div>
<Loading
v-show=
"showLoading"
/>
<!-- 弹框 -->
<CommonDialog
:isShowDialog=
"isShowDialog"
:isSingle=
"isSingle"
:cancleBtnText=
"cancleBtnText"
:confirmBtnText=
"confirmBtnText"
:content=
"dialogContent"
@
handlerAction=
"handlerAction"
/>
</div>
</
template
>
<
script
>
import
CommonNavbar
from
"@/components/common/common-navbar"
;
import
CommonDescription
from
"@/components/common/common-description"
;
import
CommonSpliteLine
from
"@/components/common/common-splite-line"
;
import
CellListDetail
from
"@/components/business/cell-list-detail"
;
// import NoPermContent from "@/components/business/no-perm-content";
// import CommonBannerVideo from "@/components/common/common-banner-video";
import
CommonTcPlayer
from
"@/components/common/common-tcplayer"
;
import
Loading
from
"@/components/common/common-loading"
;
import
CmeStep
from
"@/components/cme/cme-step"
;
import
BasicInfo
from
"@/components/cme/basic-info"
;
import
LearnKnow
from
"@/components/cme/learn-know"
;
import
ItemIntro
from
"@/components/cme/item-intro"
;
import
ItemLeader
from
"@/components/cme/item-leader"
;
import
TeacterIntro
from
"@/components/cme/teacter-intro"
;
import
CommonDialog
from
"@/components/cme/common-dialog"
;
import
{
getWebPageUrl
,
gotoPage
}
from
"@/utils/index"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
vueFilters
from
"@/utils/filter"
;
export
default
{
data
()
{
return
{
// token: "9B62E5874DA94979A54DB3E9DFC1443F",
isWeb
:
window
.
__isWeb
,
textContent
:
""
,
leaderText
:
""
,
pageTitle
:
""
,
isShowShare
:
true
,
premissionFlag
:
false
,
isSingle
:
false
,
dialogContent
:
""
,
// 弹框内容
confirmBtnText
:
""
,
// 弹框按钮
cancleBtnText
:
""
,
isShowDialog
:
false
,
tabFlag
:
true
,
// 显示目录还是简介
fixedFlag
:
false
,
// 目录和简介是否固定
project
:
{
credit
:
""
,
// 学分
creditId
:
0
,
// 学分Id
level
:
""
,
// 项目等级
scope
:
""
,
// 申请范围
remind
:
""
,
// 在不在范围提醒
startDate
:
0
,
// 开始时间
endDate
:
0
,
// 结束时间
organName
:
""
,
// 发起机构
projectName
:
""
,
// 项目名称
projectNo
:
""
,
// 项目编号
currentProgress
:
0
,
// 项目进度
projectIntro
:
""
,
// 项目介绍
mustKnow
:
""
,
// 学习须知
studyNum
:
0
,
// 学习人数
studyProgress
:
"0%"
,
// 学习进度
subject
:
""
,
// 学科
status
:
0
,
// 项目状态 5是进行中 10是已结束
certificateUrl
:
""
,
// 证书url
inScope
:
0
,
// 是否在范围内判断
projectCredit
:
""
,
// 学分
certificateId
:
"0"
},
projectLeader
:
{},
doctorList
:
[],
from
:
"inner"
,
isBlack
:
false
,
showLoading
:
false
,
projectId
:
"1"
,
//componentId: 1,
//moduleId: 1,
contentList
:
[],
//moduleName: "",
bannerType
:
1
,
// 1 图片 2视频
videoOptions
:
{
mp4
:
""
,
autoplay
:
false
,
//iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的
coverpic
:
require
(
"../images/video-cover.png"
),
width
:
"415"
,
//视频的显示宽度,请尽量使用视频分辨率宽度
height
:
"210"
//视频的显示高度,请尽量使用视频分辨率高度
},
//projectStatus: 1, //1没有获得证书 2是获得全部证书
attachmentUrl
:
require
(
"../images/banner-default.png"
),
bgColor
:
"none"
,
navTitle
:
"项目详情"
,
// compTitle: "组件名称",
isShowNavbar
:
true
,
isFixNavbar
:
true
,
pointStyle
:
"activity"
,
projectComponentDTOS
:
[],
actionList
:
[],
detailNum
:
0
,
courseRequire
:
0
,
clientType
:
0
};
},
components
:
{
CommonNavbar
,
CommonDescription
,
CommonSpliteLine
,
CellListDetail
,
Loading
,
CommonTcPlayer
,
CmeStep
,
BasicInfo
,
LearnKnow
,
ItemIntro
,
ItemLeader
,
TeacterIntro
,
CommonDialog
},
computed
:
{
...
mapGetters
([
"userInfo"
])
},
created
()
{
let
_this
=
this
;
this
.
from
=
this
.
$route
.
query
.
from
||
this
.
from
||
"native"
;
this
.
projectId
=
this
.
$route
.
query
.
id
||
1
;
this
.
courseRequire
=
this
.
$route
.
query
.
courseRequire
;
window
.
__getUserInfo64Comp
=
function
(
param
)
{
_this
.
token
=
param
.
userToken
;
_this
.
setUserInfo
(
param
);
_this
.
checkToken
();
_this
.
getProjectParticularsV2
();
};
_this
.
getUserInfo
();
// if (__isWeb && process.env.BUILD_ENV == "development") {
// let param = {};
// __getUserInfo64Comp(param);
// }
if
(
__isWeb
)
{
_this
.
getProjectParticularsV2
();
}
window
.
__refresh
=
function
()
{
_this
.
getUserInfo
();
};
// 打开页面埋点
this
.
$sendBuriedData
({
// action: "打开页面",
component_tag
:
`211#0#
${
this
.
projectId
}
#0`
});
},
mounted
()
{
window
.
addEventListener
(
"scroll"
,
this
.
scrollFun
);
const
_this
=
this
;
},
beforeDestroyed
()
{
window
.
removeEventListener
(
"scroll"
,
this
.
scrollFun
);
},
methods
:
{
...
mapActions
([
"setUserInfo"
]),
//获取用户信息
getUserInfo
()
{
rocNative
.
getUserInfo
({
__funcName
:
"__getUserInfo64Comp"
});
},
scrollFun
()
{
let
scrollTop
=
document
.
body
.
scrollTop
||
document
.
documentElement
.
scrollTop
;
const
catalogue
=
document
.
getElementById
(
"catalogue-content"
);
const
h
=
catalogue
.
offsetTop
-
600
;
if
(
scrollTop
>
20
)
{
this
.
isBlack
=
true
;
this
.
bgColor
=
"#fff"
;
}
else
{
this
.
isBlack
=
false
;
this
.
bgColor
=
"none"
;
}
this
.
fixedFlag
=
scrollTop
>
300
?
true
:
false
;
this
.
tabFlag
=
scrollTop
>
h
?
false
:
true
;
},
// token是否失效校验
checkToken
()
{
let
_this
=
this
;
let
param
=
{
token
:
_this
.
userInfo
.
userToken
||
_this
.
token
,
setEntry
:
true
};
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
if
(
res
.
code
!==
"000000"
)
{
//未登录 跳转登录页
console
.
log
(
"跳登录"
);
rocNative
.
gotoLogin
();
}
else
{
// if (!_this.premissionFlag) {
// _this.premissionFlag = true;
// _this.permission(); // 提示是否有机构和在申请范围内
// }
}
});
},
//(判断是否加入机构,是否为认证用户,是否在申请范围内)
permission
()
{
let
_this
=
this
;
let
param
=
{
id
:
_this
.
projectId
,
creditId
:
_this
.
project
.
creditId
,
token
:
_this
.
userInfo
.
userToken
||
this
.
token
,
setEntry
:
true
};
_this
.
NEW_POST
(
"cme/credit/rangeCheck"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"219004"
||
res
.
code
==
"219012"
)
{
// 未加入机构 219004 不在申请范围 219012
this
.
dialogContent
=
`该项目仅对
${
_this
.
project
.
scope
}
的用户开放`
;
this
.
cancleBtnText
=
"我知道了"
;
this
.
isShowDialog
=
true
;
this
.
isSingle
=
true
;
}
else
{
this
.
isShowDialog
=
false
;
}
});
},
// 立即申请学分
applicationCredit
()
{
let
_this
=
this
;
let
param
=
{
id
:
_this
.
projectId
,
creditId
:
_this
.
project
.
creditId
,
token
:
_this
.
userInfo
.
userToken
||
this
.
token
,
setEntry
:
true
};
_this
.
NEW_POST
(
"cme/credit/applyCheck"
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
gotoPage
(
_this
,
`cme/#/credit-edit?creditId=
${
_this
.
project
.
creditId
}
`
);
}
else
if
(
res
.
code
==
"219004"
||
res
.
code
==
"219005"
)
{
// 未加入机构 219004 未身份认证 219005 不在申请范围 219012
let
params
=
{
__funcName
:
"__checkPermissions"
,
permCode
:
"009014"
};
rocNative
.
checkPermissions
(
params
);
}
// else if (res.code == "219012") {
// this.dialogContent = res.message;
// this.cancleBtnText = "我知道了";
// this.isShowDialog = true;
// this.isSingle = true;
// }
else
{
this
.
dialogContent
=
res
.
message
;
this
.
cancleBtnText
=
"我知道了"
;
this
.
isShowDialog
=
true
;
this
.
isSingle
=
true
;
}
});
},
// 弹框按钮事件
handlerAction
(
data
)
{
this
.
isShowDialog
=
false
;
},
// 锚点到简介
jumpIntro
()
{
this
.
tabFlag
=
true
;
this
.
fixedFlag
=
true
;
const
intro
=
document
.
getElementById
(
"intro-content"
);
const
title
=
document
.
getElementById
(
"content-title"
);
let
h
;
if
(
this
.
isWeb
)
{
h
=
intro
.
offsetTop
-
title
.
offsetHeight
;
}
else
{
h
=
intro
.
offsetTop
-
75
-
title
.
offsetHeight
;
}
window
.
scrollTo
(
0
,
h
);
this
.
isBlack
=
true
;
this
.
bgColor
=
"#fff"
;
this
.
$sendBuriedData
({
component_tag
:
`211#211007#
${
this
.
projectId
}
`
});
},
// 锚点到目录
jumpCatalogue
()
{
this
.
tabFlag
=
false
;
this
.
fixedFlag
=
true
;
const
catalogue
=
document
.
getElementById
(
"catalogue-content"
);
const
title
=
document
.
getElementById
(
"content-title"
);
let
h
;
if
(
this
.
isWeb
)
{
h
=
catalogue
.
offsetTop
-
title
.
offsetHeight
;
}
else
{
h
=
catalogue
.
offsetTop
-
85
-
title
.
offsetHeight
;
}
window
.
scrollTo
(
0
,
h
);
this
.
isBlack
=
true
;
this
.
bgColor
=
"#fff"
;
this
.
$sendBuriedData
({
component_tag
:
`211#211008#
${
this
.
projectId
}
`
});
},
// 获取项目详情
getProjectParticularsV2
()
{
let
_this
=
this
;
let
param
=
{
token
:
_this
.
userInfo
.
userToken
||
this
.
token
,
setEntry
:
true
};
// _this.showLoading = true;
this
.
NEW_GET
(
`cme/project/
${
_this
.
projectId
}
/info`
,
param
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// 先设置视频URL再显示视频组件 ------------ BEGIN
if
(
res
.
data
.
attachmentType
==
2
)
{
_this
.
videoOptions
.
mp4
=
res
.
data
.
attachmentUrl
;
}
else
{
_this
.
attachmentUrl
=
res
.
data
.
attachmentUrl
;
}
_this
.
bannerType
=
res
.
data
.
attachmentType
;
if
(
_this
.
bannerType
==
2
)
{
_this
.
clientType
=
__isWeb
?
1
:
__isAndroid
?
2
:
3
;
}
// 先设置视频URL再显示视频组件 ------------ END
_this
.
project
=
res
.
data
;
if
(
_this
.
project
.
projectIntro
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
}
_this
.
project
.
mustKnow
=
_this
.
project
.
mustKnow
.
replace
(
/
(\r\n)
|
\r
|
\n
/g
,
"<br>"
);
_this
.
projectLeader
=
res
.
data
.
projectLeader
||
{};
if
(
_this
.
projectLeader
.
info
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
}
_this
.
doctorList
=
res
.
data
.
doctorList
;
//_this.projectStatus = res.data.projectStatus;
_this
.
projectComponentDTOS
=
_this
.
setListData
(
res
.
data
.
projectComponentDTOS
);
if
(
!
_this
.
isWeb
&&
!
_this
.
premissionFlag
)
{
_this
.
premissionFlag
=
true
;
_this
.
permission
();
// 提示是否有机构和在申请范围内
}
// TODO Add by Anndy Yang
if
(
_this
.
project
.
currentProgress
==
2
)
{
this
.
$nextTick
(
()
=>
{
window
.
scrollTo
(
0
,
0
);
// window.scrollTo(0, this.$refs.cmeStepRef.offsetTop - 100);
// window.scrollTo(0, this.$refs.cmeStepRef.offsetTop - 100);
})
}
}
//_this.showLoading = false;
});
},
// 项目负责人--详情(收起)
changeLeaderText
(
data
)
{
let
_this
=
this
;
if
(
_this
.
projectLeader
.
info
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
}
else
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
;
}
}
},
// 项目介绍
itemIntroText
(
data
)
{
let
_this
=
this
;
if
(
_this
.
project
.
projectIntro
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
}
else
{
_this
.
textContent
=
_this
.
project
.
projectIntro
;
}
}
},
setListData
(
data
)
{
let
_this
=
this
;
let
list
=
data
;
let
actionList
=
[];
let
detailNum
=
0
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
list
[
i
].
portalModuleDTOS
.
length
;
j
++
)
{
detailNum
++
;
if
(
list
[
i
].
portalModuleDTOS
[
j
].
status
===
2
)
{
list
[
i
].
portalModuleDTOS
[
j
].
value
=
"共"
+
list
[
i
].
portalModuleDTOS
[
j
].
nodeCount
+
"节"
;
}
else
{
list
[
i
].
portalModuleDTOS
[
j
].
value
=
"尚未开始"
;
}
list
[
i
].
portalModuleDTOS
[
j
].
disabled
=
list
[
i
].
portalModuleDTOS
[
j
].
status
===
2
?
false
:
true
;
//展开项记录
if
(
list
[
i
].
portalModuleDTOS
[
j
].
expandStatus
==
1
)
{
actionList
.
push
(
list
[
i
].
portalModuleDTOS
[
j
].
expandKey
);
}
for
(
let
z
=
0
;
z
<
list
[
i
].
portalModuleDTOS
[
j
].
contentList
.
length
;
z
++
)
{
list
[
i
].
portalModuleDTOS
[
j
].
contentList
[
z
].
height
=
_this
.
getHight
(
list
[
i
].
portalModuleDTOS
[
j
].
contentList
[
z
]
);
}
}
}
_this
.
actionList
=
actionList
;
_this
.
detailNum
=
detailNum
;
console
.
log
(
"list转为:"
,
list
,
actionList
,
detailNum
);
// list[0].portalModuleDTOS[3].contentList[0].certificateFlag = 2;
// list[0].portalModuleDTOS[3].contentList[1].certificateFlag = 2;
return
list
;
},
getHight
(
data
)
{
let
len
=
vueFilters
.
strLength
(
data
.
name
);
let
certificate
=
data
.
certificateFlag
;
if
(
len
>
30
&&
certificate
==
2
)
{
return
"2"
;
}
else
if
(
len
>
30
&&
certificate
!=
2
)
{
return
2
;
}
else
if
(
len
<=
30
&&
certificate
==
2
)
{
return
"1"
;
}
else
if
(
len
<=
30
&&
certificate
!=
2
)
{
return
1
;
}
}
// 获取单个模块信息
// getComponentInfoById(componentId) {
// let _this = this;
// let param = {
// componentId: componentId,
// token: _this.userInfo.userToken,
// setEntry: true
// };
// this.GET("portal/portalApp/component", param).then(res => {
// if (res.code == "000000") {
// _this.attachmentUrl = res.data.imageUrl;
// _this.projectIntro = res.data.introduce;
// _this.projectName = res.data.name;
// }
// });
// },
// 获取单个项目信息
// getCoopInfo(projectId) {
// let _this = this;
// let param = {
// portalProjectId: projectId,
// token: _this.userInfo.userToken,
// setEntry: true
// };
// this.GET("portal/portalApp/queryProjectParticulars", param).then(res => {
// if (res.code == "000000") {
// // 先设置视频URL再显示视频组件 ------------ BEGIN
// if (res.data.attachmentType == 2) {
// _this.videoOptions.mp4 = res.data.attachmentUrl;
// } else {
// _this.attachmentUrl = res.data.attachmentUrl;
// }
// _this.bannerType = res.data.attachmentType;
// if(_this.bannerType == 2) {
// _this.clientType = __isWeb ? 1 : __isAndroid ? 2 : 3;
// }
// // 先设置视频URL再显示视频组件 ------------ END
// _this.projectIntro = res.data.projectIntro;
// _this.projectName = res.data.projectName;
// _this.pStatus = res.data.status;
// }
// });
// },
// setContent(data) {
// let list = data;
// for(let i=0;i
<
list
.
length
;
i
++
)
{
// let len = vueFilters.strLength(list[i].name);
// let certificate = list[i].certificateFlag;
// if(len > 30 && certificate == 2) {
// list[i].height = "2";
// } else if (len > 30 && certificate != 2) {
// list[i].height = 2;
// } else if (len
<=
30
&&
certificate
==
2
)
{
// list[i].height = "1";
// } else if(len
<=
30
&&
certificate
!=
2
)
{
// list[i].height = 1;
// }
// }
// console.log('contentList!',list);
// return list;
// },
// 获取内容列表
// getContentList(moduleId) {
// let _this = this;
// let param = {
// moduleId: _this.moduleId,
// token: _this.userInfo.userToken,
// setEntry: true,
// projectId: _this.projectId,
// };
// _this.showLoading = true;
// this.GET("portal/portalApp/contentList", param).then(res => {
// // _this.showLoading = false;
// if (res.code == "000000") {
// _this.contentList = _this.setContent(res.data.contentList);
// }
// });
// },
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"../style/mixin"
;
.page-container-merge
{
.nav-top
.nav-title
{
height
:
px2rem
(
0px
);
// padding: px2rem(18px);
}
.banner-img
{
display
:
inherit
;
width
:
px2rem
(
375px
);
height
:
px2rem
(
210px
);
&
-1
{
position
:
absolute
;
left
:
0
;
top
:
px2rem
(
180px
);
width
:
px2rem
(
76px
);
height
:
px2rem
(
30px
);
}
&
-5
{
position
:
absolute
;
left
:
0
;
top
:
px2rem
(
180px
);
width
:
px2rem
(
76px
);
height
:
px2rem
(
30px
);
}
&
-10
{
position
:
absolute
;
left
:
0
;
top
:
px2rem
(
180px
);
width
:
px2rem
(
76px
);
height
:
px2rem
(
30px
);
}
}
.list-container
{
// margin-bottom: px2rem(40px);
}
.intro-catalogue-container
{
.title
{
height
:
px2rem
(
50px
);
line-height
:
px2rem
(
30px
);
padding
:
0
px2rem
(
15px
);
border-bottom
:
1px
solid
#f0f1f2
;
span
{
display
:
inline-block
;
line-height
:
px2rem
(
15px
);
font-size
:
px2rem
(
15px
);
color
:
#979899
;
padding-right
:
px2rem
(
35px
);
}
span
.focus
{
position
:
relative
;
color
:
#373839
;
}
span
.focus
:after
{
content
:
""
;
position
:
absolute
;
left
:
px2rem
(
7px
);
bottom
:
px2rem
(
-14px
);
background
:
#449284
;
// border-bottom: px2rem(1px) solid #449284;
width
:
px2rem
(
10px
);
height
:
px2rem
(
3px
);
border-radius
:
px2rem
(
3px
);
}
}
.title.fixed-title-1
{
position
:
fixed
;
left
:
0
;
top
:
px2rem
(
60px
);
background
:
#fff
;
width
:
100%
;
z-index
:
999
;
}
.title.fixed-title-2
{
position
:
fixed
;
left
:
0
;
top
:
px2rem
(
0px
);
background
:
#fff
;
width
:
100%
;
z-index
:
999
;
}
.catalogue-content
{
padding
:
px2rem
(
30px
)
px2rem
(
15px
)
0
;
.catalogue-title
{
font-size
:
px2rem
(
18px
);
color
:
#373839
;
font-weight
:
700
;
margin-bottom
:
px2rem
(
16px
);
}
}
}
}
</
style
>
src/views/merge-detail.vue
浏览文件 @
87bd8014
...
...
@@ -15,7 +15,7 @@
borderStyle=
"0px solid #fff"
:backMethod=
"from"
></CommonNavbar>
<div
class=
"page-content list-container"
>
<div
class=
"page-content list-container"
>
<!-- banner图片 -->
<div
v-if=
"bannerType == 1"
class=
"page-content-img-container"
>
<img
class=
"banner-img"
:src=
"attachmentUrl"
/>
...
...
@@ -32,22 +32,26 @@
:subject=
"project.subject"
/>
<!-- 步骤条 -->
<div
ref=
"cmeStepRef
"
>
<CmeStep
:currentProgress=
"project.currentProgress"
:studyProgress=
"project.studyProgress"
:credit=
"project.credit"
:creditId=
"project.creditId"
:certificateUrl=
"project.certificateUrl"
:inScope=
"project.inScope"
:projectId=
"projectId"
:certificateId=
"project.certificateId"
@
applicationCredit=
"applicationCredit"
/>
<div
v-if=
"project.cmeType == 1
"
>
<CmeStep
:currentProgress=
"project.currentProgress"
:studyProgress=
"project.studyProgress"
:credit=
"project.credit"
:creditId=
"project.creditId"
:certificateUrl=
"project.certificateUrl"
:inScope=
"project.inScope"
:projectId=
"projectId"
:certificateId=
"project.certificateId"
@
applicationCredit=
"applicationCredit"
/>
</div>
<!-- 简介和目录 -->
<div
class=
"intro-catalogue-container"
>
<div
id=
"content-title"
class=
"title"
:class=
"
{'fixed-title-1': (fixedFlag
&&
!isWeb), 'fixed-title-2': (fixedFlag
&&
isWeb)}">
<div
id=
"content-title"
class=
"title"
:class=
"
{'fixed-title-1': (fixedFlag
&&
!isWeb), 'fixed-title-2': (fixedFlag
&&
isWeb)}"
>
<span
:class=
"
{'focus': tabFlag}" @click="jumpIntro">简介
</span>
<span
:class=
"
{'focus': !tabFlag}" @click="jumpCatalogue">目录
</span>
</div>
...
...
@@ -66,10 +70,11 @@
<LearnKnow
:mustKnow=
"project.mustKnow"
></LearnKnow>
<CommonSpliteLine></CommonSpliteLine>
<ItemIntro
:textContent=
"textContent"
@
itemIntroText=
"itemIntroText"
></ItemIntro>
<ItemLeader
:projectLeader=
"projectLeader"
:leaderText=
"leaderText"
@
changeLeaderText=
"changeLeaderText"
/>
<ItemLeader
v-if=
"projectLeader"
:projectLeader=
"projectLeader"
:leaderText=
"leaderText"
@
changeLeaderText=
"changeLeaderText"
/>
<TeacterIntro
:doctorList=
"doctorList"
></TeacterIntro>
</div>
<CommonSpliteLine></CommonSpliteLine>
...
...
@@ -93,7 +98,23 @@
:confirmBtnText=
"confirmBtnText"
:content=
"dialogContent"
@
handlerAction=
"handlerAction"
/>
<!-- 弹框 -->
<ExjumperDialog
:isShowDialog=
"isShowEJDialog"
isSingle
needSubContent
content=
"确保您已经从云鹊平台购买优惠学习卡。跳转后请申请考试、激活学习卡,考试通过后申请证书。"
subContent=
"学分由中华医学电子音像出版社授予,如有问题可致电400-920-8899云鹊医客服咨询。"
cancleBtnText=
"我知道了"
@
handlerAction=
"handlerEJAction"
/>
<ExjumperButton
@
btnClick=
"beforeJumpToExam"
v-if=
"project.inScope !== 0"
:btnText=
"project.currentProgress == 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type=
"project.currentProgress == 1 ? 'primary' : 'disabled'"
></ExjumperButton>
<div
v-if=
"project.inScope !== 0"
style=
"padding-top: 30px"
></div>
</div>
</
template
>
<
script
>
...
...
@@ -114,6 +135,8 @@ import ItemIntro from "@/components/cme/item-intro";
import
ItemLeader
from
"@/components/cme/item-leader"
;
import
TeacterIntro
from
"@/components/cme/teacter-intro"
;
import
CommonDialog
from
"@/components/cme/common-dialog"
;
import
ExjumperDialog
from
"@/components/cme/exjumper-dialog"
;
import
ExjumperButton
from
"@/components/cme/exjumper-button"
;
import
{
getWebPageUrl
,
gotoPage
}
from
"@/utils/index"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
...
...
@@ -134,6 +157,7 @@ export default {
confirmBtnText
:
""
,
// 弹框按钮
cancleBtnText
:
""
,
isShowDialog
:
false
,
isShowEJDialog
:
false
,
tabFlag
:
true
,
// 显示目录还是简介
fixedFlag
:
false
,
// 目录和简介是否固定
project
:
{
...
...
@@ -157,7 +181,16 @@ export default {
certificateUrl
:
""
,
// 证书url
inScope
:
0
,
// 是否在范围内判断
projectCredit
:
""
,
// 学分
certificateId
:
"0"
certificateId
:
"0"
,
cmeType
:
1
,
// 1: 自营项目; 2: 中华医学会二类
examBtnUrl
:
''
,
// 考试按钮跳转连接
firstIntoExam
:
false
,
// true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents
:
false
,
// 是否跳转到目录
// cmeType=2时不显示进度,
// projectNo为空时不显示项目编号,
// projectLeader为空时不显示项目负责人,
// inScope=0时考试按钮不显示,
// currentProgress>1时考试按钮显示并可用
},
projectLeader
:
{},
doctorList
:
[],
...
...
@@ -189,7 +222,10 @@ export default {
actionList
:
[],
detailNum
:
0
,
courseRequire
:
0
,
clientType
:
0
clientType
:
0
,
// currentProgress>1时考试按钮显示并可用
btnType
:
'primary'
,
// primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时
btnText
:
'学完全部课程,可参加考试'
// 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试
};
},
components
:
{
...
...
@@ -205,11 +241,15 @@ export default {
ItemIntro
,
ItemLeader
,
TeacterIntro
,
CommonDialog
CommonDialog
,
ExjumperButton
,
ExjumperDialog
},
computed
:
{
...
mapGetters
([
"userInfo"
])
...
mapGetters
([
"userInfo"
])
,
},
created
()
{
let
_this
=
this
;
this
.
from
=
this
.
$route
.
query
.
from
||
this
.
from
||
"native"
;
...
...
@@ -249,6 +289,52 @@ export default {
},
methods
:
{
...
mapActions
([
"setUserInfo"
]),
beforeJumpToExam
()
{
// 如果是首次,则弹出弹框
if
(
this
.
project
.
firstIntoExam
)
{
this
.
isShowEJDialog
=
true
;
}
else
{
this
.
jumpToExamAction
();
}
},
// 第一次跳转弹框,点击时调用相应接口
handlerEJAction
()
{
this
.
isShowEJDialog
=
false
;
this
.
jumpToExamAction
();
this
.
firstIntoExamAction
();
},
// 跳转到第三方考试页面
jumpToExamAction
()
{
this
.
isShowEJDialog
=
false
;
let
paramList
=
[
{
key
:
"pageUrl"
,
value
:
this
.
project
.
examBtnUrl
,
type
:
4
,
seqNo
:
1
}
];
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M300"
,
jsonString
:
paramList
});
},
// 首次进入考试时记录(点击‘我知道了’时调用)
firstIntoExamAction
()
{
let
_this
=
this
;
let
param
=
{
token
:
_this
.
userInfo
.
userToken
||
this
.
token
,
setEntry
:
true
};
this
.
NEW_POST
(
`cme/project/
${
_this
.
projectId
}
/firstIntoExam`
,
param
).
then
(
res
=>
{
console
.
log
(
'in isFirstIntoExam back'
,
res
);
});
},
//获取用户信息
getUserInfo
()
{
rocNative
.
getUserInfo
({
...
...
@@ -334,7 +420,7 @@ export default {
permCode
:
"009014"
};
rocNative
.
checkPermissions
(
params
);
}
}
// else if (res.code == "219012") {
// this.dialogContent = res.message;
// this.cancleBtnText = "我知道了";
...
...
@@ -353,6 +439,7 @@ export default {
handlerAction
(
data
)
{
this
.
isShowDialog
=
false
;
},
// 锚点到简介
jumpIntro
()
{
this
.
tabFlag
=
true
;
...
...
@@ -360,9 +447,9 @@ export default {
const
intro
=
document
.
getElementById
(
"intro-content"
);
const
title
=
document
.
getElementById
(
"content-title"
);
let
h
;
if
(
this
.
isWeb
)
{
if
(
this
.
isWeb
)
{
h
=
intro
.
offsetTop
-
title
.
offsetHeight
;
}
else
{
}
else
{
h
=
intro
.
offsetTop
-
75
-
title
.
offsetHeight
;
}
window
.
scrollTo
(
0
,
h
);
...
...
@@ -379,9 +466,9 @@ export default {
const
catalogue
=
document
.
getElementById
(
"catalogue-content"
);
const
title
=
document
.
getElementById
(
"content-title"
);
let
h
;
if
(
this
.
isWeb
)
{
if
(
this
.
isWeb
)
{
h
=
catalogue
.
offsetTop
-
title
.
offsetHeight
;
}
else
{
}
else
{
h
=
catalogue
.
offsetTop
-
85
-
title
.
offsetHeight
;
}
window
.
scrollTo
(
0
,
h
);
...
...
@@ -414,14 +501,23 @@ export default {
// 先设置视频URL再显示视频组件 ------------ END
_this
.
project
=
res
.
data
;
if
(
_this
.
project
.
projectIntro
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
if
(
_this
.
project
.
projectIntro
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
}
_this
.
project
.
mustKnow
=
_this
.
project
.
mustKnow
.
replace
(
/
(\r\n)
|
\r
|
\n
/g
,
"<br>"
);
_this
.
project
.
mustKnow
=
_this
.
project
.
mustKnow
.
replace
(
/
(\r\n)
|
\r
|
\n
/g
,
"<br>"
);
_this
.
projectLeader
=
res
.
data
.
projectLeader
||
{};
if
(
_this
.
projectLeader
.
info
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
_this
.
projectLeader
=
res
.
data
.
projectLeader
;
if
(
_this
.
projectLeader
&&
_this
.
projectLeader
.
info
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
}
_this
.
doctorList
=
res
.
data
.
doctorList
;
...
...
@@ -430,19 +526,24 @@ export default {
res
.
data
.
projectComponentDTOS
);
if
(
!
_this
.
isWeb
&&
!
_this
.
premissionFlag
)
{
if
(
!
_this
.
isWeb
&&
!
_this
.
premissionFlag
)
{
_this
.
premissionFlag
=
true
;
_this
.
permission
();
// 提示是否有机构和在申请范围内
}
// TODO Add by Anndy Yang
if
(
_this
.
project
.
currentProgress
==
2
)
{
this
.
$nextTick
(
()
=>
{
if
(
_this
.
project
.
currentProgress
==
2
)
{
this
.
$nextTick
(()
=>
{
window
.
scrollTo
(
0
,
0
);
// window.scrollTo(0, this.$refs.cmeStepRef.offsetTop - 100);
// window.scrollTo(0, this.$refs.cmeStepRef.offsetTop - 100);
})
});
}
// 直接跳转
if
(
_this
.
project
.
jumpToContents
)
{
setTimeout
(()
=>
{
this
.
jumpCatalogue
();
},
200
);
}
}
//_this.showLoading = false;
});
...
...
@@ -450,10 +551,13 @@ export default {
// 项目负责人--详情(收起)
changeLeaderText
(
data
)
{
let
_this
=
this
;
if
(
_this
.
projectLeader
.
info
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
}
else
{
if
(
_this
.
projectLeader
.
info
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
.
length
>
70
?
_this
.
projectLeader
.
info
.
slice
(
0
,
70
)
+
"..."
:
this
.
projectLeader
.
info
;
}
else
{
_this
.
leaderText
=
_this
.
projectLeader
.
info
;
}
}
...
...
@@ -461,10 +565,13 @@ export default {
// 项目介绍
itemIntroText
(
data
)
{
let
_this
=
this
;
if
(
_this
.
project
.
projectIntro
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
}
else
{
if
(
_this
.
project
.
projectIntro
)
{
if
(
!
data
.
allTextFlag
)
{
_this
.
textContent
=
_this
.
project
.
projectIntro
.
length
>
70
?
_this
.
project
.
projectIntro
.
slice
(
0
,
70
)
+
"..."
:
this
.
project
.
projectIntro
;
}
else
{
_this
.
textContent
=
_this
.
project
.
projectIntro
;
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录