|
@@ -2,58 +2,77 @@
|
|
|
<div class="goods-item">
|
|
<div class="goods-item">
|
|
|
<div class="goods-item-top">
|
|
<div class="goods-item-top">
|
|
|
<img :src="backImg" alt="" />
|
|
<img :src="backImg" alt="" />
|
|
|
- <p v-html="backLearnStatus(goodsInfo)"></p>
|
|
|
|
|
|
|
+ <p v-html="backLearnStatus()"></p>
|
|
|
<p class="l_1" style="width: 70%">上次观看:节名称节名称</p>
|
|
<p class="l_1" style="width: 70%">上次观看:节名称节名称</p>
|
|
|
- <!-- <p>{{ goodsInfo.studyCount }}学时</p> -->
|
|
|
|
|
|
|
+ <p v-if="goodsType == 2">{{ goodsInfo.studyCount }}学时</p>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="goods-item-main">
|
|
<div class="goods-item-main">
|
|
|
<h2>{{ goodsInfo.goodsName }}</h2>
|
|
<h2>{{ goodsInfo.goodsName }}</h2>
|
|
|
- <div>
|
|
|
|
|
- 周期:
|
|
|
|
|
- <p>
|
|
|
|
|
- {{ $tools.timestampToTime(goodsInfo.serviceStartTime) }} -
|
|
|
|
|
- {{ $tools.timestampToTime(goodsInfo.serviceEndTime) }}
|
|
|
|
|
- </p>
|
|
|
|
|
- <p style="margin: 0 8px">|</p>
|
|
|
|
|
- <p>
|
|
|
|
|
- {{ goodsInfo.courseNum }}课程
|
|
|
|
|
- {{ goodsInfo.secAllNum + goodsInfo.examNum }}节
|
|
|
|
|
- {{ goodsInfo.classHours }}学时
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- 学习进度:
|
|
|
|
|
- <p style="width: 40px">{{ progressText() }}</p>
|
|
|
|
|
- <el-progress
|
|
|
|
|
- style="width: 65%"
|
|
|
|
|
- :show-text="false"
|
|
|
|
|
- :stroke-width="8"
|
|
|
|
|
- :format="() => {}"
|
|
|
|
|
- :percentage="
|
|
|
|
|
- ((goodsInfo.stuAllNum + goodsInfo.recordNum) /
|
|
|
|
|
- (goodsInfo.secAllNum + goodsInfo.examNum) || 0) * 100
|
|
|
|
|
- "
|
|
|
|
|
- ></el-progress>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- 班级状态:
|
|
|
|
|
- <p>{{ backClassStatus() }}</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- 班级有效期:
|
|
|
|
|
- <p>{{ goodsInfo.classStartTime }}-{{ goodsInfo.classEndTime }}</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="goods-item-main-tips">
|
|
|
|
|
- 温馨提示:本课程有效期至{{
|
|
|
|
|
- $tools.timestampToTime(goodsInfo.validityEndTime, true, true)
|
|
|
|
|
- }},超期学时无效,为防审核异常请于{{
|
|
|
|
|
- $tools.timestampToTime(goodsInfo.validityEndTime, true, true)
|
|
|
|
|
- }}
|
|
|
|
|
- 00:00:00前完成学习,当前剩余有效学习时间为200天
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <!-- 视频 -->
|
|
|
|
|
+ <template v-if="goodsType == 1">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 周期:
|
|
|
|
|
+ <p>
|
|
|
|
|
+ {{ $tools.timestampToTime(goodsInfo.serviceStartTime) }} -
|
|
|
|
|
+ {{ $tools.timestampToTime(goodsInfo.serviceEndTime) }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p style="margin: 0 8px">|</p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ {{ goodsInfo.courseNum }}课程
|
|
|
|
|
+ {{ goodsInfo.secAllNum + goodsInfo.examNum }}节
|
|
|
|
|
+ {{ goodsInfo.classHours }}学时
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 学习进度:
|
|
|
|
|
+ <p style="width: 40px">{{ progressText() }}</p>
|
|
|
|
|
+ <el-progress
|
|
|
|
|
+ style="width: 65%"
|
|
|
|
|
+ :show-text="false"
|
|
|
|
|
+ :stroke-width="8"
|
|
|
|
|
+ :format="() => {}"
|
|
|
|
|
+ :percentage="
|
|
|
|
|
+ ((goodsInfo.stuAllNum + goodsInfo.recordNum) /
|
|
|
|
|
+ (goodsInfo.secAllNum + goodsInfo.examNum) || 0) * 100
|
|
|
|
|
+ "
|
|
|
|
|
+ ></el-progress>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template v-if="!is2Education">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 班级状态:
|
|
|
|
|
+ <p>{{ backClassStatus() }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 班级有效期:
|
|
|
|
|
+ <p>{{ goodsInfo.classStartTime }}-{{ goodsInfo.classEndTime }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="goods-item-main-tips">
|
|
|
|
|
+ 温馨提示:本课程有效期至{{
|
|
|
|
|
+ $tools.timestampToTime(goodsInfo.validityEndTime, true, true)
|
|
|
|
|
+ }},超期学时无效,为防审核异常请于{{
|
|
|
|
|
+ $tools.timestampToTime(goodsInfo.validityEndTime, true, true)
|
|
|
|
|
+ }}
|
|
|
|
|
+ 00:00:00前完成学习,当前剩余有效学习时间为200天
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 直播进度:
|
|
|
|
|
+ <p>{{ backClassStatus() }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 当前回放:
|
|
|
|
|
+ <p>{{ backClassStatus() }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 直播时间:
|
|
|
|
|
+ <p>{{ backClassStatus() }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="goods-item-bom">
|
|
<div class="goods-item-bom">
|
|
|
- <el-button type="text" :disabled="checkCanLearn != -1">{{
|
|
|
|
|
|
|
+ <el-button type="text" @click="goto" :disabled="checkCanLearn != -1">{{
|
|
|
checkCanLearn == -1 ? "进入学习" : "已过期"
|
|
checkCanLearn == -1 ? "进入学习" : "已过期"
|
|
|
}}</el-button>
|
|
}}</el-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -85,7 +104,7 @@ export default {
|
|
|
item.stuAllNum + item.recordNum + "/" + (item.secAllNum + item.examNum)
|
|
item.stuAllNum + item.recordNum + "/" + (item.secAllNum + item.examNum)
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
- backLearnStatus(data) {
|
|
|
|
|
|
|
+ backLearnStatus() {
|
|
|
let {
|
|
let {
|
|
|
stuAllNum,
|
|
stuAllNum,
|
|
|
recordNum,
|
|
recordNum,
|
|
@@ -94,7 +113,7 @@ export default {
|
|
|
rebuild,
|
|
rebuild,
|
|
|
goodsType,
|
|
goodsType,
|
|
|
liveStatus,
|
|
liveStatus,
|
|
|
- } = data;
|
|
|
|
|
|
|
+ } = this.goodsInfo;
|
|
|
if (goodsType == 1) {
|
|
if (goodsType == 1) {
|
|
|
let stuNum = stuAllNum + recordNum;
|
|
let stuNum = stuAllNum + recordNum;
|
|
|
let type = [
|
|
let type = [
|
|
@@ -126,6 +145,106 @@ export default {
|
|
|
}
|
|
}
|
|
|
return ["未开班", "已开班"][classStatus] || "-";
|
|
return ["未开班", "已开班"][classStatus] || "-";
|
|
|
},
|
|
},
|
|
|
|
|
+ goto() {
|
|
|
|
|
+ if (this.goodsType == 1) {
|
|
|
|
|
+ this.toCourse();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async toCourse() {
|
|
|
|
|
+ let item = this.goodsInfo;
|
|
|
|
|
+ if (!(await this.lockLockStatus())) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 二建继教
|
|
|
|
|
+ if (this.is2Education && !(await this.userConfirmInfoDetail())) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ // if (item.rebuild == 0) {
|
|
|
|
|
+ // return this.$emit("openRebuld", item);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // let rebuildStatus = await this.courseGoodsRebuildStatus(
|
|
|
|
|
+ // item.goodsId,
|
|
|
|
|
+ // item.gradeId
|
|
|
|
|
+ // );
|
|
|
|
|
+
|
|
|
|
|
+ // if (rebuildStatus == 0) {
|
|
|
|
|
+ // this.$refs.rebuildModal.showModal(item);
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ return;
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ gradeId: item.gradeId,
|
|
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
|
|
+ rebuild: item.rebuild,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ toExam() {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/bank-exam/" + this.goodsId,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
|
+ number: this.activeNum,
|
|
|
|
|
+ moduleId: 0,
|
|
|
|
|
+ chapterId: 0,
|
|
|
|
|
+ examId: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ userConfirmInfoDetail() {
|
|
|
|
|
+ let { orderGoodsId } = this.goodsInfo;
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ this.$request
|
|
|
|
|
+ .userConfirmInfoDetail({
|
|
|
|
|
+ orderGoodsId,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (!res.data) {
|
|
|
|
|
+ this.$emit("openRealNameCheck", orderGoodsId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (res.data.pushInfo) {
|
|
|
|
|
+ resolve(true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ "开通信息推送不成功,无法进入学习,请联系020-87085982!",
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ closeOnClickModal: false,
|
|
|
|
|
+ closeOnPressEscape: false,
|
|
|
|
|
+ distinguishCancelAndClose: false,
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then((_) => {})
|
|
|
|
|
+ .catch((_) => {});
|
|
|
|
|
+ resolve(false);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ lockLockStatus() {
|
|
|
|
|
+ return this.$request
|
|
|
|
|
+ .lockLockStatus({
|
|
|
|
|
+ action: "jxjy",
|
|
|
|
|
+ uuid: sessionStorage.getItem("uuid"),
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ //有其他端在操作,不能学习
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ });
|
|
|
|
|
+ return Promise.resolve(false);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ return Promise.resolve(true);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
goodsType() {
|
|
goodsType() {
|
|
@@ -156,6 +275,16 @@ export default {
|
|
|
backImg() {
|
|
backImg() {
|
|
|
return require("@/assets/" + mapImg[this.goodsType]);
|
|
return require("@/assets/" + mapImg[this.goodsType]);
|
|
|
},
|
|
},
|
|
|
|
|
+ is2Education() {
|
|
|
|
|
+ let { educationName, officialName, businessName, projectName } =
|
|
|
|
|
+ this.goodsInfo;
|
|
|
|
|
+ return (
|
|
|
|
|
+ educationName == "继续教育" &&
|
|
|
|
|
+ officialName &&
|
|
|
|
|
+ businessName == "二级" &&
|
|
|
|
|
+ projectName == "建造师"
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
@@ -184,7 +313,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.goods-item-main {
|
|
.goods-item-main {
|
|
|
- padding: 0 16px;
|
|
|
|
|
|
|
+ padding: 0 16px 26px;
|
|
|
h2 {
|
|
h2 {
|
|
|
margin: 10px 0;
|
|
margin: 10px 0;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
@@ -205,7 +334,7 @@ export default {
|
|
|
background: #fffaf2;
|
|
background: #fffaf2;
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
color: #494339;
|
|
color: #494339;
|
|
|
- margin: 8px 0 24px;
|
|
|
|
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.goods-item-bom {
|
|
.goods-item-bom {
|