提交 fa5d1b44 编写于 作者: huangwensu's avatar huangwensu

添加申请学分提示框

上级 71f0e77a
<template>
<div class="step-content">
<p class="step-text step1-text" v-if="step1">学习进度{{studyProgress}}</p>
<div class="step-item">
<span :class="{'actived': step1 || step2 || step3 || step4}">1</span>
<p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p>
</div>
<div class="step-line step-one-line" :class="{'actived': step2 || step3 || step4}"></div>
<p class="step-text step2-text" v-if="step2" @click="applyFor">立即申请></p>
<div class="step-item">
<span :class="{'actived': step2 || step3 || step4}">2</span>
<p :class="{'actived': step2 || step3 || step4}">申请学分</p>
</div>
<div class="step-line step-two-line" :class="{'actived': step3 || step4}"></div>
<p class="step-text step3-text" v-if="step3" @click="verifyResult">{{progressText}}></p>
<div class="step-item">
<span :class="{'actived': step3 || step4}">3</span>
<p :class="{'actived': step3 || step4}">学分审核</p>
</div>
<div class="step-line step-three-line" :class="{'actived': step4}"></div>
<p class="step-text step4-text" v-if="step4" @click="getScore">获得{{credit}}></p>
<div class="step-item">
<span :class="{'actived': step4}">4</span>
<p :class="{'actived': step4}">申请成功</p>
</div>
<div class="step-content">
<p class="step-text step1-text" v-if="step1">学习进度{{studyProgress}}</p>
<div class="step-item">
<span :class="{'actived': step1 || step2 || step3 || step4}">1</span>
<p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p>
</div>
<div class="step-line step-one-line" :class="{'actived': step2 || step3 || step4}"></div>
<p class="step-text step2-text" v-if="step2" @click="applyFor">立即申请></p>
<div class="step-item">
<span :class="{'actived': step2 || step3 || step4}">2</span>
<p :class="{'actived': step2 || step3 || step4}">申请学分</p>
</div>
<div class="step-line step-two-line" :class="{'actived': step3 || step4}"></div>
<p class="step-text step3-text" v-if="step3" @click="verifyResult">{{progressText}}></p>
<div class="step-item">
<span :class="{'actived': step3 || step4}">3</span>
<p :class="{'actived': step3 || step4}">学分审核</p>
</div>
<div class="step-line step-three-line" :class="{'actived': step4}"></div>
<p class="step-text step4-text" v-if="step4" @click="getScore">获得{{credit}}></p>
<div class="step-item">
<span :class="{'actived': step4}">4</span>
<p :class="{'actived': step4}">申请成功</p>
</div>
<!-- 申请学分提示框 -->
<div class="apply-score-content" v-if="showTip">
<div class="lm">
<img src="../../images/cme/hand.png" />
</div>
<div class="title">恭喜您完成该项目学习及考试,快去申请学分</div>
<div class="line"></div>
<div class="rm" @click="closeTip">
<img src="../../images/cme/delete.png" />
</div>
</div>
</div>
</template>
<script>
import { getWebPageUrl } from '@/utils/index';
import { getWebPageUrl } from "@/utils/index";
export default {
props: {
currentProgress: {
type: Number,
default: 0
},
studyProgress: {
type: String,
default: "0%"
},
credit: {
type: String,
default: ""
},
creditId: {
type: Number,
default: 0
},
certificateUrl: {
type: String,
default: ""
}
props: {
currentProgress: {
type: Number,
default: 0
},
data() {
return {
step1: false,
step2: true,
step3: false,
step4: false,
progressText: "审核中"
}
studyProgress: {
type: String,
default: "0%"
},
watch: {
currentProgress(n,o) {
if(o == 1) { // 项目学习
this.step1 = true;
this.step2 = false;
this.step3 = false;
this.step4 = false;
}else if(o == 2) { // 申请学分
this.step1 = false;
this.step2 = true;
this.step3 = false;
this.step4 = false;
}else if(o == 3) { // 学分审核
this.step1 = false;
this.step2 = false;
this.step3 = true;
this.step4 = false;
this.progressText = "审核中";
}else if(o == 4) { // 审核失败
this.step1 = false;
this.step2 = false;
this.step3 = true;
this.step4 = false;
this.progressText = "审核失败";
}else if(o == 5) { // 申请成功
this.step1 = false;
this.step2 = false;
this.step3 = false;
this.step4 = true;
}
}
credit: {
type: String,
default: ""
},
creditId: {
type: Number,
default: 0
},
created() {
certificateUrl: {
type: String,
default: ""
}
},
data() {
return {
step1: false,
step2: true,
step3: false,
step4: false,
progressText: "审核中",
showTip: false
};
},
watch: {
// currentProgress(n,o) {
// if(n == 1) { // 项目学习
// this.step1 = true;
// this.step2 = false;
// this.step3 = false;
// this.step4 = false;
// }else if(n == 2) { // 申请学分
// this.step1 = false;
// this.step2 = true;
// this.step3 = false;
// this.step4 = false;
// this.showTip = true;
// setInterval(() => {
// this.showTip = false;
// },5000)
// }else if(n == 3) { // 学分审核
// this.step1 = false;
// this.step2 = false;
// this.step3 = true;
// this.step4 = false;
// this.progressText = "审核中";
// }else if(n == 4) { // 审核失败
// this.step1 = false;
// this.step2 = false;
// this.step3 = true;
// this.step4 = false;
// this.progressText = "审核失败";
// }else if(n == 5) { // 申请成功
// this.step1 = false;
// this.step2 = false;
// this.step3 = false;
// this.step4 = true;
// }
// }
},
created() {},
methods: {
// 立即申请
applyFor() {
this.$emit("applicationCredit");
},
// 关闭提示
closeTip() {
this.showTip = false;
},
// 审核
verifyResult() {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(`cme/#/credit-detail?id=${this.creditId}`),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
methods: {
// 立即申请
applyFor() {
this.$emit("applicationCredit");
// 获得学分--下载证书
getScore() {
let paramList = [
{
key: "className",
value:
"com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView",
type: 4,
seqNo: 1
},
// 审核
verifyResult() {
let paramList = [
{
"key":"pageUrl",
"value": getWebPageUrl(`cme/#/credit-detail?id=${this.creditId}`),
"type":4,
"seqNo":1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList
});
{
key: "url",
value: this.certificateUrl,
type: 4,
seqNo: 2
},
// 获得学分--下载证书
getScore() {
let paramList = [
{
key: "className",
value: "com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView",
type: 4,
seqNo: 1
},
{
key: "url",
value: this.certificateUrl,
type: 4,
seqNo: 2
},
{
key: "navTitle",
value: "学分详情",
type: 4,
seqNo: 4
},
{
key: "isNotTab",
value: true,
type: 4,
seqNo: 5
},
{
key: "isShowDownload",
value: true,
type: 4,
seqNo: 6
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
{
key: "navTitle",
value: "学分详情",
type: 4,
seqNo: 4
},
{
key: "isNotTab",
value: true,
type: 4,
seqNo: 5
},
{
key: "isShowDownload",
value: true,
type: 4,
seqNo: 6
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M200",
jsonString: paramList
});
}
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.step-content {
position: relative;
height: px2rem(110px);
background:rgba(248,249,250,1);
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.step-item {
flex-grow: 1;
text-align: center;
padding-top: px2rem(20px);
line-height: px2rem(20px);
span {
display: inline-block;
width: px2rem(20px);
height: px2rem(20px);
line-height: px2rem(17px);
border-radius: 50%;
background: #676869;
border:2px solid rgba(255,255,255,1);
color: #fff;
font-size: px2rem(12px);
font-weight: 700;
}
span.actived {
background: #449284;
}
p {
font-size: px2rem(13px);
color: #373839;
}
p.actived {
color: #449284;
}
position: relative;
height: px2rem(110px);
background: rgba(248, 249, 250, 1);
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.step-item {
flex-grow: 1;
text-align: center;
padding-top: px2rem(20px);
line-height: px2rem(20px);
span {
display: inline-block;
width: px2rem(20px);
height: px2rem(20px);
line-height: px2rem(17px);
border-radius: 50%;
background: #676869;
border: 2px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: px2rem(12px);
font-weight: 700;
}
.step-line {
position: absolute;
top: px2rem(60px);
width: px2rem(75px);
height: px2rem(3px);
background: #DADDE1;
span.actived {
background: #449284;
}
.step-one-line {
left: px2rem(56px);
p {
font-size: px2rem(13px);
color: #373839;
}
.step-two-line {
left: px2rem(150px);
p.actived {
color: #449284;
}
.step-three-line {
right: px2rem(56px);
}
.step-one-line.actived, .step-two-line.actived, .step-three-line.actived{
background: #449284;
}
.step-text {
position: absolute;
top: px2rem(25px);
padding: px2rem(4px) px2rem(6px);
background: #449284;
border-radius: px2rem(10px);
font-size: px2rem(12px);
line-height: px2rem(12px);
color: #fff;
}
.step1-text {
left: px2rem(20px);
}
.step1-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(22px);
}
.step2-text {
left: px2rem(106px);
}
.step2-text:after, .step3-text:after{
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(30px);
}
.step3-text {
left: px2rem(207px);
}
.step-line {
position: absolute;
top: px2rem(60px);
width: px2rem(75px);
height: px2rem(3px);
background: #dadde1;
}
.step-one-line {
left: px2rem(56px);
}
.step-two-line {
left: px2rem(150px);
}
.step-three-line {
right: px2rem(56px);
}
.step-one-line.actived,
.step-two-line.actived,
.step-three-line.actived {
background: #449284;
}
.step-text {
position: absolute;
top: px2rem(25px);
padding: px2rem(4px) px2rem(6px);
background: #449284;
border-radius: px2rem(10px);
font-size: px2rem(12px);
line-height: px2rem(12px);
color: #fff;
}
.step1-text {
left: px2rem(20px);
}
.step1-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(22px);
}
.step2-text {
left: px2rem(106px);
}
.step2-text:after,
.step3-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(30px);
}
.step3-text {
left: px2rem(207px);
}
.step3-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(22px);
}
.step4-text {
right: px2rem(20px);
}
.step4-text:after {
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
right: px2rem(20px);
}
.apply-score-content {
display: flex;
position: absolute;
left: px2rem(105px);
top: px2rem(-42px);
background: #000;
opacity: 0.6;
width: px2rem(236px);
height: px2rem(51px);
border-radius: px2rem(6px);
.title {
font-size: px2rem(12px);
color: rgba(255, 255, 255, 1);
margin: px2rem(7px) px2rem(11px) 0 px2rem(0px);
width: px2rem(133px);
}
.step3-text:after{
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
left: px2rem(22px);
.lm {
width: px2rem(41px);
img {
display: inline-block;
width: px2rem(20px);
padding: 0 0 px2rem(7px) px2rem(15px);
}
}
.step4-text {
right: px2rem(20px);
.line {
width: px2rem(1px);
height: px2rem(51px);
background: #fff;
opacity: 0.18;
}
.step4-text:after{
content: "";
width: px2rem(0px);
height: px2rem(0px);
border-top: px2rem(5px) solid #449284;
border-left: px2rem(5px) solid transparent;
border-right: px2rem(5px) solid transparent;
position: absolute;
top: px2rem(20px);
right: px2rem(20px);
.rm {
width: px2rem(41px);
img {
display: inline-block;
width: px2rem(15px);
padding: 0 px2rem(15px) px2rem(7px);
}
}
}
}
</style>
\ No newline at end of file
......@@ -75,6 +75,7 @@
</div>
</div>
<Loading v-show="showLoading" />
<!-- 弹框 -->
<CommonDialog
:isShowDialog="isShowDialog"
:isSingle="isSingle"
......@@ -113,6 +114,7 @@ import vueFilters from "@/utils/filter";
export default {
data() {
return {
premissionFlag: false,
isSingle: false,
dialogContent: "", // 弹框内容
confirmBtnText: "", // 弹框按钮
......@@ -216,7 +218,6 @@ export default {
// _this.getProjectParticularsV2();
_this.getUserInfo();
};
_this.permission(); // 提示是否有机构和在申请范围内
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
......@@ -256,6 +257,26 @@ export default {
this.tabFlag = true;
}
},
// token是否失效校验
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
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;
......@@ -346,21 +367,6 @@ export default {
this.isBlack = true;
this.bgColor = "#fff";
},
// token是否失效校验
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code !== "000000") {
//未登录 跳转登录页
console.log("跳登录");
rocNative.gotoLogin();
}
});
},
// 获取项目详情
getProjectParticularsV2() {
let _this = this;
......@@ -387,10 +393,10 @@ export default {
_this.projectLeader = res.data.projectLeader;
_this.doctorList = res.data.doctorList;
if (_this.project.currentProgress == 2) {
this.dialogContent =
"恭喜您已经完成该项目学习及考试,快去申请学分吧";
this.confirmBtnText = "立即申请";
this.isShowDialog = true;
// this.dialogContent =
// "恭喜您已经完成该项目学习及考试,快去申请学分吧";
// this.confirmBtnText = "立即申请";
// this.isShowDialog = true;
}
//_this.projectStatus = res.data.projectStatus;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册