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

进度组件添加范围判断

上级 151912a5
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!-- <span v-else <!-- <span v-else
class="coop-item-right-other" class="coop-item-right-other"
>起止日期 {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}</span>--> >起止日期 {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}</span>-->
<span class="coop-item-right-other">{{item.startDate}}{{item.endTime}}</span> <span class="coop-item-right-other">{{item.startDate | formatTime('{y}.{m}.{d}')}}{{item.endDate | formatTime('{y}.{m}.{d}')}}</span>
</div> </div>
</div> </div>
<NoMoreContent v-show="paramData.length > 9"></NoMoreContent> <NoMoreContent v-show="paramData.length > 9"></NoMoreContent>
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "pageUrl",
value: getWebPageUrl(`cme/#/coop?id=${item.id}`), value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}`),
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="content"> <div class="content">
<span>起止时间</span> <span>起止时间</span>
<span>{{startDate}}{{endDate}}</span> <span>{{startDate | formatTime('{y}.{m}.{d}')}}{{endDate | formatTime('{y}.{m}.{d}')}}</span>
</div> </div>
<div class="content"> <div class="content">
<span>发起机构</span> <span>发起机构</span>
......
...@@ -6,19 +6,28 @@ ...@@ -6,19 +6,28 @@
<p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p> <p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p>
</div> </div>
<div class="step-line step-one-line" :class="{'actived': step2 || step3 || step4}"></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">立即申请<img src="../../images/cme/step-right-arrow.png"></p> <p class="step-text step2-text" v-if="step2" @click="applyFor">
立即申请
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item"> <div class="step-item">
<span :class="{'actived': step2 || step3 || step4}">2</span> <span :class="{'actived': step2 || step3 || step4}">2</span>
<p :class="{'actived': step2 || step3 || step4}">申请学分</p> <p :class="{'actived': step2 || step3 || step4}">申请学分</p>
</div> </div>
<div class="step-line step-two-line" :class="{'actived': step3 || step4}"></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}}<img src="../../images/cme/step-right-arrow.png"></p> <p class="step-text step3-text" v-if="step3" @click="verifyResult">
{{progressText}}
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item"> <div class="step-item">
<span :class="{'actived': step3 || step4}">3</span> <span :class="{'actived': step3 || step4}">3</span>
<p :class="{'actived': step3 || step4}">学分审核</p> <p :class="{'actived': step3 || step4}">学分审核</p>
</div> </div>
<div class="step-line step-three-line" :class="{'actived': step4}"></div> <div class="step-line step-three-line" :class="{'actived': step4}"></div>
<p class="step-text step4-text" v-if="step4" @click="getScore">获得{{credit}}<img src="../../images/cme/step-right-arrow.png"></p> <p class="step-text step4-text" v-if="step4" @click="getScore">
获得{{credit}}
<img src="../../images/cme/step-right-arrow.png"/>
</p>
<div class="step-item"> <div class="step-item">
<span :class="{'actived': step4}">4</span> <span :class="{'actived': step4}">4</span>
<p :class="{'actived': step4}">申请成功</p> <p :class="{'actived': step4}">申请成功</p>
...@@ -63,6 +72,10 @@ export default { ...@@ -63,6 +72,10 @@ export default {
projectId: { projectId: {
type: String, type: String,
default: "1" default: "1"
},
inScope: {
type: Number,
default: 0
} }
}, },
data() { data() {
...@@ -72,42 +85,44 @@ export default { ...@@ -72,42 +85,44 @@ export default {
step3: false, step3: false,
step4: false, step4: false,
progressText: "", progressText: "",
showTip: false showTip: false,
btnDisabled: true
}; };
}, },
watch: { watch: {
// currentProgress(n,o) { // currentProgress(n,o) {
// let _this = this;
// if(n == 1) { // 项目学习 // if(n == 1) { // 项目学习
// this.step1 = true; // _this.step1 = true;
// this.step2 = false; // _this.step2 = false;
// this.step3 = false; // _this.step3 = false;
// this.step4 = false; // _this.step4 = false;
// }else if(n == 2) { // 申请学分 // }else if(n == 2) { // 申请学分
// this.step1 = false; // _this.step1 = false;
// this.step2 = true; // _this.step2 = true;
// this.step3 = false; // _this.step3 = false;
// this.step4 = false; // _this.step4 = false;
// this.showTip = true; // _this.showTip = true;
// setInterval(() => { // setInterval(() => {
// this.showTip = false; // _this.showTip = false;
// },5000) // },5000)
// }else if(n == 3) { // 学分审核 // }else if(n == 3) { // 学分审核
// this.step1 = false; // _this.step1 = false;
// this.step2 = false; // _this.step2 = false;
// this.step3 = true; // _this.step3 = true;
// this.step4 = false; // _this.step4 = false;
// this.progressText = "审核中"; // _this.progressText = "审核中";
// }else if(n == 4) { // 审核失败 // }else if(n == 4) { // 审核失败
// this.step1 = false; // _this.step1 = false;
// this.step2 = false; // _this.step2 = false;
// this.step3 = true; // _this.step3 = true;
// this.step4 = false; // _this.step4 = false;
// this.progressText = "审核失败"; // _this.progressText = "审核失败";
// }else if(n == 5) { // 申请成功 // }else if(n == 5) { // 申请成功
// this.step1 = false; // _this.step1 = false;
// this.step2 = false; // _this.step2 = false;
// this.step3 = false; // _this.step3 = false;
// this.step4 = true; // _this.step4 = true;
// } // }
// } // }
}, },
...@@ -115,10 +130,14 @@ export default { ...@@ -115,10 +130,14 @@ export default {
methods: { methods: {
// 立即申请 // 立即申请
applyFor() { applyFor() {
this.$sendBuriedData({ if(this.inScope) {
component_tag: `211#211001#${this.projectId}` this.$sendBuriedData({
}); component_tag: `211#211001#${this.projectId}`
this.$emit("applicationCredit"); });
this.$emit("applicationCredit");
}else {
this.$toast({message: '您不在可申请范围内', duration: 3000 });
}
}, },
// 关闭提示 // 关闭提示
closeTip() { closeTip() {
...@@ -126,6 +145,7 @@ export default { ...@@ -126,6 +145,7 @@ export default {
}, },
// 审核 // 审核
verifyResult() { verifyResult() {
if(this.inScope) {
if(this.currentProgress == 3) { if(this.currentProgress == 3) {
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `211#211003#${this.projectId}` component_tag: `211#211003#${this.projectId}`
...@@ -135,50 +155,57 @@ export default { ...@@ -135,50 +155,57 @@ export default {
component_tag: `211#211005#${this.projectId}` component_tag: `211#211005#${this.projectId}`
}); });
} }
gotoPage(this,`cme/#/credit-detail?creditId=${this.creditId}&projectId=${this.projectId}`) gotoPage(this,`cme/#/credit-detail?creditId=${this.creditId}&projectId=${this.projectId}`);
}else {
this.$toast({message: '您不在可申请范围内', duration: 3000 });
}
}, },
// 获得学分--下载证书 // 获得学分--下载证书
getScore() { getScore() {
let paramList = [ if(this.inScope) {
{ let paramList = [
key: "className", {
value: key: "className",
"com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView", value:
type: 4, "com.picahealth.yunque.activitys.honor.CheckCertificatesActivity###YQWebView",
seqNo: 1 type: 4,
}, seqNo: 1
{ },
key: "url", {
value: this.certificateUrl, key: "url",
type: 4, value: this.certificateUrl,
seqNo: 2 type: 4,
}, seqNo: 2
{ },
key: "navTitle", {
value: "学分详情", key: "navTitle",
type: 4, value: "学分详情",
seqNo: 4 type: 4,
}, seqNo: 4
{ },
key: "isNotTab", {
value: true, key: "isNotTab",
type: 4, value: true,
seqNo: 5 type: 4,
}, seqNo: 5
{ },
key: "isShowDownload", {
value: true, key: "isShowDownload",
type: 4, value: true,
seqNo: 6 type: 4,
} seqNo: 6
]; }
rocNative.dispatchEventByModuleCode({ ];
modeCode: "M200", rocNative.dispatchEventByModuleCode({
jsonString: paramList modeCode: "M200",
}); jsonString: paramList
this.$sendBuriedData({ });
component_tag: `211#211004#${this.projectId}` this.$sendBuriedData({
}); component_tag: `211#211004#${this.projectId}`
});
}else {
this.$toast({message: '您不在可申请范围内', duration: 3000 });
}
} }
} }
}; };
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
:credit="project.credit" :credit="project.credit"
:creditId="project.creditId" :creditId="project.creditId"
:certificateUrl="project.certificateUrl" :certificateUrl="project.certificateUrl"
:inScope="project.inScope"
:projectId="projectId" :projectId="projectId"
@applicationCredit="applicationCredit" @applicationCredit="applicationCredit"
/> />
...@@ -150,7 +151,8 @@ export default { ...@@ -150,7 +151,8 @@ export default {
studyProgress: "0%", // 学习进度 studyProgress: "0%", // 学习进度
subject: "", // 学科 subject: "", // 学科
status: 0, // 项目状态 1是参加中 5是进行中 10是已结束 status: 0, // 项目状态 1是参加中 5是进行中 10是已结束
certificateUrl: "" // 证书url certificateUrl: "", // 证书url
inScope: 0 // 是否在范围内判断
}, },
projectLeader: {}, projectLeader: {},
doctorList: [], doctorList: [],
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册