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

详情页面接口调试

上级 ffa57138
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
v-for="(component , index) in projectComponent" v-for="(component , index) in projectComponent"
:key="index"> :key="index">
<!-- <CommonTitle :fontWeight="500" :title="component.name" :isShowCert="true" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></CommonTitle> --> <!-- <CommonTitle :fontWeight="500" :title="component.name" :isShowCert="true" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></CommonTitle> -->
<MergeTitle :fontWeight="500" :title="component.name" :isShowCert="component.status" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></MergeTitle> <!-- <MergeTitle :fontWeight="500" :title="component.name" :isShowCert="component.status" :isShowExplain="true" @showDialog="showDialog(component.introduce)"></MergeTitle> -->
<van-collapse v-model="activeNames" @change="changeCollapse"> <van-collapse v-model="activeNames" @change="changeCollapse">
<van-collapse-item <van-collapse-item
v-for="(portalModule , index) in component.portalModuleDTOS" v-for="(portalModule, index) in component.portalModuleDTOS"
:key="index" :key="index"
:title="portalModule.moduleName | shortName(19)" :title="(parseInt(index) + 1) + '.' + portalModule.moduleName | shortName(19)"
:name="portalModule.expandKey" :name="portalModule.expandKey"
:value="portalModule.value" :value="portalModule.value"
:disabled="portalModule.disabled" :disabled="portalModule.disabled"
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<!-- <img v-show="item.status == 13" class="text-action-dh" src="../../images/icon-dh.png"> --> <!-- <img v-show="item.status == 13" class="text-action-dh" src="../../images/icon-dh.png"> -->
{{getActionText(item.status)}} {{getActionText(item.status)}}
</span> </span>
<div class="connect-line" <!-- <div class="connect-line"
:class="{'len1': item.height === 1, 'len2': item.height === '1','len3': item.height === 2, 'len4': item.height === '2', 'line-complete': index+1 < portalModule.contentList.length && portalModule.contentList[index+1].useFlag == 1}" :class="{'len1': item.height === 1, 'len2': item.height === '1','len3': item.height === 2, 'len4': item.height === '2', 'line-complete': index+1 < portalModule.contentList.length && portalModule.contentList[index+1].useFlag == 1}"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId"> v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> </div> -->
<div class="foot-line" <div class="foot-line"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId"> v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> </div>
...@@ -451,7 +451,7 @@ export default { ...@@ -451,7 +451,7 @@ export default {
.cell-container { .cell-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: px2rem(20px) px2rem(15px) px2rem(-28px) px2rem(15px); margin: px2rem(20px) px2rem(0px) px2rem(-28px) px2rem(0px);
&-item { &-item {
position: relative; position: relative;
display: flex; display: flex;
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
</div> </div>
<div class="content"> <div class="content">
<span>学习收获</span> <span>学习收获</span>
<span>{{level}} {{credit}}学分</span> <span>{{level}} {{credit}}</span>
</div> </div>
<div class="content"> <div class="content">
<span>申请范围</span> <span>申请范围</span>
<span>{{scope}}</span> <span>{{scope}}</span>
</div> </div>
<div class="content remind" v-if="remind"> <div class="remind" v-if="remind">
<span>{{remind}}</span> <span>{{remind}}</span>
</div> </div>
<div class="content"> <div class="content">
...@@ -30,27 +30,35 @@ ...@@ -30,27 +30,35 @@
export default { export default {
props: { props: {
projectNo: { projectNo: {
type: String,
default: "GWKX-20180326-42843" default: "GWKX-20180326-42843"
}, },
credit: { credit: {
default: "3" type: String,
default: ""
}, },
level: { level: {
default: "国家级Ⅰ类" type: String,
default: ""
}, },
scope: { scope: {
default: "河北省 石家庄" type: String,
default: ""
}, },
startDate: { startDate: {
default: "2020.03.01" type: String,
default: ""
}, },
endDate: { endDate: {
default: "2020.12.3" type: String,
default: ""
}, },
organName: { organName: {
default: "云鹊医" type: String,
default: ""
}, },
remind: { remind: {
type: String,
default: "" default: ""
} }
} }
...@@ -70,7 +78,8 @@ export default { ...@@ -70,7 +78,8 @@ export default {
} }
.content { .content {
margin-top: px2rem(16px); margin-top: px2rem(16px);
line-height: px2rem(14px); height: px2rem(16px);
line-height: px2rem(0px);
span { span {
display: inline-block; display: inline-block;
font-size: px2rem(14px); font-size: px2rem(14px);
...@@ -83,8 +92,11 @@ export default { ...@@ -83,8 +92,11 @@ export default {
color: #676869; color: #676869;
} }
} }
.content.remind { .remind {
line-height: px2rem(14px);
margin-top: px2rem(10px);
span { span {
position: relative;
display: inline-block; display: inline-block;
padding: px2rem(5px) px2rem(10px); padding: px2rem(5px) px2rem(10px);
margin-left: px2rem(78px); margin-left: px2rem(78px);
...@@ -96,8 +108,8 @@ export default { ...@@ -96,8 +108,8 @@ export default {
span:after { span:after {
content: ""; content: "";
position: absolute; position: absolute;
left: px2rem(105px); left: px2rem(10px);
bottom: px2rem(70px); bottom: px2rem(20px);
width: 0; width: 0;
height: 0; height: 0;
border-width: 0 px2rem(8px) px2rem(8px); border-width: 0 px2rem(8px) px2rem(8px);
......
<template> <template>
<div class="step-content"> <div class="step-content">
<p class="step-text step1-text" v-if="step1">学习进度10%</p> <p class="step-text step1-text" v-if="step1">学习进度{{studyProgress}}</p>
<div class="step-item"> <div class="step-item">
<span :class="{'actived': step1 || step2 || step3 || step4}">1</span> <span :class="{'actived': step1 || step2 || step3 || step4}">1</span>
<p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p> <p :class="{'actived': step1 || step2 || step3 || step4}">项目学习</p>
...@@ -31,6 +31,10 @@ export default { ...@@ -31,6 +31,10 @@ export default {
currentProgress: { currentProgress: {
type: Number, type: Number,
default: 0 default: 0
},
studyProgress: {
type: String,
default: "0%"
} }
}, },
data() { data() {
...@@ -67,7 +71,7 @@ export default { ...@@ -67,7 +71,7 @@ export default {
methods: { methods: {
// 立即申请 // 立即申请
applyFor() { applyFor() {
this.$emit("applicationCredit");
}, },
verifyResult() { verifyResult() {
......
...@@ -21,14 +21,13 @@ export default { ...@@ -21,14 +21,13 @@ export default {
}, },
data() { data() {
return { return {
newText: '',
btnText: '详情', btnText: '详情',
allTextFlag: false allTextFlag: false
} }
}, },
mounted() { computed: {
if(this.textContent.length > 69) { newText: function () {
this.newText = this.textContent.slice(0,69) + "..."; return this.textContent.length > 69 ? this.textContent.slice(0,69) + "..." : this.textContent;
} }
}, },
methods: { methods: {
...@@ -38,7 +37,7 @@ export default { ...@@ -38,7 +37,7 @@ export default {
this.btnText = '收起'; this.btnText = '收起';
this.allTextFlag = true; this.allTextFlag = true;
}else { }else {
this.newText = this.textContent.slice(0,69) + "..."; this.newText = this.textContent.length > 69 ? this.textContent.slice(0,69) + "..." : this.textContent;
this.btnText = '详情'; this.btnText = '详情';
this.allTextFlag = false; this.allTextFlag = false;
} }
......
...@@ -29,19 +29,15 @@ export default { ...@@ -29,19 +29,15 @@ export default {
}, },
data() { data() {
return { return {
newText: '',
btnText: '详情', btnText: '详情',
allTextFlag: false allTextFlag: false
} }
}, },
created() { computed: {
newText: function () {
}, if(this.projectLeader.info) {
mounted() { return this.projectLeader.info.length > 66 ? this.projectLeader.info.slice(0,66) + "..." : this.projectLeader.info;
if(this.projectLeader.info.length > 66) { }
this.newText = this.projectLeader.info.slice(0,66) + "...";
}else {
this.newText = this.projectLeader.info;
} }
}, },
methods: { methods: {
...@@ -51,7 +47,7 @@ export default { ...@@ -51,7 +47,7 @@ export default {
this.btnText = '收起'; this.btnText = '收起';
this.allTextFlag = true; this.allTextFlag = true;
}else { }else {
this.newText = this.projectLeader.info.slice(0,66) + "...";; this.newText =this.projectLeader.info.length > 66 ? this.projectLeader.info.slice(0,66) + "..." : this.projectLeader.info;
this.btnText = '详情'; this.btnText = '详情';
this.allTextFlag = false; this.allTextFlag = false;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span>{{projectName}}</span> <span>{{projectName}}</span>
</div> </div>
<div class="desc-detail"> <div class="desc-detail">
<span class="desc_text" v-if="studyNum && subject">{{studyNum}}人已学/{{subject}}</span> <span class="desc_text" v-if="studyNum && subject">{{newStudyNum}}人已学/{{subject}}</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -20,24 +20,29 @@ export default { ...@@ -20,24 +20,29 @@ export default {
props: { props: {
projectName: { projectName: {
type: String, type: String,
default: "全科医学诊疗思维与实务项目" default: ""
}, },
studyNum: { studyNum: {
type: Number, type: Number,
default: 28000 default: 0
}, },
subject: { subject: {
type: String, type: String,
default: "全科医学" default: ""
} }
}, },
created() {}, computed: {
mounted() { newStudyNum: function() {
if(this.studyNum > 1000 && this.studyNum < 10000) { if(this.studyNum > 1000 && this.studyNum < 10000) {
this.studyNum = this.studyNum / 1000 + 'k'; return (this.studyNum / 1000 + 'k');
}else if(this.studyNum > 10000) { }else if(this.studyNum > 10000) {
this.studyNum = this.studyNum / 10000 + 'w'; return (this.studyNum / 10000 + 'w');
} }
}
},
created() {},
mounted() {
}, },
methods: { methods: {
......
...@@ -152,7 +152,7 @@ module.exports = { ...@@ -152,7 +152,7 @@ module.exports = {
}, },
// 通用POST请求 // 通用POST请求
NEW_POST(api, para, callback) { NEW_POST(api, para,callback) {
// para.token = para.token || this.token || '00175A13D70D4234822D90AC3C74202C' // para.token = para.token || this.token || '00175A13D70D4234822D90AC3C74202C'
return fetch({ return fetch({
url: getBaseUrl(api), url: getBaseUrl(api),
......
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
:studyNum="project.studyNum" :studyNum="project.studyNum"
:subject="project.subject"/> :subject="project.subject"/>
<!-- 步骤条 --> <!-- 步骤条 -->
<CmeStep :currentProgress="project.currentProgress"></CmeStep> <CmeStep
:currentProgress="project.currentProgress"
:studyProgress="project.studyProgress"
@applicationCredit="applicationCredit"/>
<!-- 简介和目录 --> <!-- 简介和目录 -->
<div class="intro-catalogue-container"> <div class="intro-catalogue-container">
<div id="content-title" class="title" :class="{'fixed-title': fixedFlag}"> <div id="content-title" class="title" :class="{'fixed-title': fixedFlag}">
...@@ -65,6 +68,10 @@ ...@@ -65,6 +68,10 @@
</div> </div>
</div> </div>
<Loading v-show="showLoading"/> <Loading v-show="showLoading"/>
<CommonDialog
:isShowDialog="isShowDialog"
:confirmBtnText="confirmBtnText"
:content="dialogContent"></CommonDialog>
</div> </div>
</template> </template>
...@@ -87,6 +94,7 @@ import LearnKnow from "@/components/cme/learn-know"; ...@@ -87,6 +94,7 @@ import LearnKnow from "@/components/cme/learn-know";
import ItemIntro from "@/components/cme/item-intro"; import ItemIntro from "@/components/cme/item-intro";
import ItemLeader from "@/components/cme/item-leader"; import ItemLeader from "@/components/cme/item-leader";
import TeacterIntro from "@/components/cme/teacter-intro"; import TeacterIntro from "@/components/cme/teacter-intro";
import CommonDialog from "@/components/cme/common-dialog";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import vueFilters from '@/utils/filter'; import vueFilters from '@/utils/filter';
...@@ -94,10 +102,14 @@ import vueFilters from '@/utils/filter'; ...@@ -94,10 +102,14 @@ import vueFilters from '@/utils/filter';
export default { export default {
data() { data() {
return { return {
dialogContent: "", // 弹框内容
confirmBtnText: "", // 弹框按钮
isShowDialog: false,
tabFlag: true, // 显示目录还是简介 tabFlag: true, // 显示目录还是简介
fixedFlag: false, // 目录和简介是否固定 fixedFlag: false, // 目录和简介是否固定
project: { project: {
credit: "", // 学分 credit: "", // 学分
creditId: 0, // 学分Id
level: "", // 项目等级 level: "", // 项目等级
scope: "", // 申请范围 scope: "", // 申请范围
remind: "", // 在不在范围提醒 remind: "", // 在不在范围提醒
...@@ -110,7 +122,7 @@ export default { ...@@ -110,7 +122,7 @@ export default {
projectIntro: "", // 项目介绍 projectIntro: "", // 项目介绍
mustKnow: '', // 学习须知 mustKnow: '', // 学习须知
studyNum: 0, // 学习人数 studyNum: 0, // 学习人数
studyProgress: 0, // 学习进度 studyProgress: "0%", // 学习进度
subject: "", // 学科 subject: "", // 学科
status: 0, // 项目状态 1是参加中 5是进行中 10是已结束 status: 0, // 项目状态 1是参加中 5是进行中 10是已结束
}, },
...@@ -127,10 +139,6 @@ export default { ...@@ -127,10 +139,6 @@ export default {
bannerType: 1, // 1 图片 2视频 bannerType: 1, // 1 图片 2视频
videoOptions: { videoOptions: {
mp4: "", mp4: "",
// mp4: "https://pica-pro.oss-cn-shanghai.aliyuncs.com/2019/03/05/movie.mp4",
// "mp4": "http://1258717429.vod2.myqcloud.com/24a74910vodcq1258717429/7c37c18f5285890786204547811/9BFIyaoXYAcA.mp4",
// "m3u8": "http://2157.liveplay.myqcloud.com/2157_358535a.m3u8",
// "flv": "http://2157.liveplay.myqcloud.com/live/2157_358535a.flv", //增加了一个flv的播放地址,用于PC平台的播放 请替换成实际可用的播放地址
autoplay: false, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的 autoplay: false, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的
coverpic: require("../images/video-cover.png"), coverpic: require("../images/video-cover.png"),
width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度 width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度
...@@ -155,12 +163,7 @@ export default { ...@@ -155,12 +163,7 @@ export default {
CommonNavbar, CommonNavbar,
CommonDescription, CommonDescription,
CommonSpliteLine, CommonSpliteLine,
// CommonTitle,
// CertShow,
// CellListItem,
CellListDetail, CellListDetail,
// NoPermContent,
// CommonBannerVideo,
Loading, Loading,
CommonTcPlayer, CommonTcPlayer,
CmeStep, CmeStep,
...@@ -168,7 +171,8 @@ export default { ...@@ -168,7 +171,8 @@ export default {
LearnKnow, LearnKnow,
ItemIntro, ItemIntro,
ItemLeader, ItemLeader,
TeacterIntro TeacterIntro,
CommonDialog
}, },
computed: { computed: {
...mapGetters(["userInfo"]) ...mapGetters(["userInfo"])
...@@ -176,15 +180,13 @@ export default { ...@@ -176,15 +180,13 @@ export default {
created() { created() {
let _this = this; let _this = this;
this.from = this.$route.query.from || this.from || "native"; this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.id; this.projectId = this.$route.query.id || 1;
//this.componentId = this.$route.query.componentId; //this.componentId = this.$route.query.componentId;
this.moduleId = this.$route.query.moduleId; this.moduleId = this.$route.query.moduleId;
this.moduleName = this.$route.query.moduleName; this.moduleName = this.$route.query.moduleName;
this.courseRequire = this.$route.query.courseRequire; this.courseRequire = this.$route.query.courseRequire;
window.__getUserInfo64Comp = function(param) { window.__getUserInfo64Comp = function(param) {
// alert('__getUserInfo64Comp');
// console.log('__getUserInfo64Comp');
_this.token = param.userToken; _this.token = param.userToken;
_this.setUserInfo(param); _this.setUserInfo(param);
_this.checkToken(); _this.checkToken();
...@@ -197,8 +199,6 @@ export default { ...@@ -197,8 +199,6 @@ export default {
} }
// alert('mounted __before'); // alert('mounted __before');
window.__refresh = function() { window.__refresh = function() {
// alert('mounted __refresh');
// console.log('mounted __refresh');
// _this.getProjectParticularsV2(); // _this.getProjectParticularsV2();
_this.getUserInfo(); _this.getUserInfo();
}; };
...@@ -240,6 +240,35 @@ export default { ...@@ -240,6 +240,35 @@ export default {
this.tabFlag = true; this.tabFlag = true;
} }
}, },
// 立即申请学分(判断是否加入机构,是否为认证用户,是否在申请范围内)
applicationCredit() {
let _this = this;
let param = {
id: _this.projectId,
creditId: _this.project.creditId || 1,
token: _this.userInfo.userToken || 'AAA613F74B7A4746AEE8354458FF4896',
setEntry: true
};
_this.NEW_POST("cme/credit/applyCheck", param).then(res => {
if (res.code == "000000") {
if(res.data == "219004") { // 未加入机构
this.dialogContent = "您暂未加入机构,加入机构后且认证身份后可申请学分";
this.confirmBtnText = "加入机构";
this.isShowDialog = true;
}else if(res.data == "219005") { // 未身份认证
this.dialogContent = "您暂未认证身份,完成认证身份后可申请学分";
this.confirmBtnText = "去认证";
this.isShowDialog = true;
}else if(res.data == "219006") { // 不在申请范围
this.dialogContent = "您的所属机构不在可申请范围(河北石家庄内)";
this.confirmBtnText = "我知道了";
this.isShowDialog = true;
}else {
}
}
});
},
// 锚点到简介 // 锚点到简介
jumpIntro() { jumpIntro() {
this.tabFlag = true; this.tabFlag = true;
...@@ -301,6 +330,11 @@ export default { ...@@ -301,6 +330,11 @@ export default {
_this.project = res.data; _this.project = res.data;
_this.projectLeader = res.data.projectLeader; _this.projectLeader = res.data.projectLeader;
_this.doctorList = res.data.doctorList; _this.doctorList = res.data.doctorList;
if(_this.project.currentProgress == 2) {
this.dialogContent = "恭喜您已经完成该项目学习及考试,快去申请学分吧";
this.confirmBtnText = "立即申请";
this.isShowDialog = true;
}
//_this.projectStatus = res.data.projectStatus; //_this.projectStatus = res.data.projectStatus;
_this.projectComponentDTOS = _this.setListData(res.data.projectComponentDTOS); _this.projectComponentDTOS = _this.setListData(res.data.projectComponentDTOS);
...@@ -486,19 +520,19 @@ export default { ...@@ -486,19 +520,19 @@ export default {
padding-right: px2rem(35px); padding-right: px2rem(35px);
} }
span.focus { span.focus {
color: #373839;
position: relative; position: relative;
color: #373839;
} }
span.focus:after { span.focus:after {
content: ""; content: "";
position: absolute; position: absolute;
left: px2rem(7px); left: px2rem(7px);
bottom: px2rem(-10px); bottom: px2rem(-14px);
background: #449284; background: #449284;
border: 1px solid #449284; // border-bottom: px2rem(1px) solid #449284;
width: px2rem(10px); width: px2rem(10px);
height: px2rem(2px); height: px2rem(3px);
border-radius: px2rem(3px);
} }
} }
.title.fixed-title { .title.fixed-title {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册