|
@@ -1,58 +1,152 @@
|
|
|
<template>
|
|
|
<div class="my-classhour">
|
|
|
<div class="my-classhour__body">
|
|
|
- <el-tabs v-model="activeName">
|
|
|
- <el-tab-pane label="学时审核" name="1">
|
|
|
+ <el-tabs :value="activeName" @tab-click="tabChange">
|
|
|
+ <el-tab-pane label="学时审核" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="学习凭证" name="2"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ <template v-if="activeName == '1'">
|
|
|
+ <div class="no-data" v-if="listData.length == 0">
|
|
|
+ 您暂无相关学时审核记录哦
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
<div class="learn-list">
|
|
|
- <div class="classhour-item" v-for="(item, index) in 5" :key="index">
|
|
|
+ <div
|
|
|
+ class="classhour-item"
|
|
|
+ v-for="(item, index) in listData"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<div class="classhour-item__header">
|
|
|
<div class="state">
|
|
|
学时审核状态:
|
|
|
- <div class="note">不可审核</div>
|
|
|
+ <div class="note" v-if="item.periodStatus === -1">
|
|
|
+ 不可审核
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="note note--success"
|
|
|
+ v-if="item.periodStatus === 1"
|
|
|
+ >
|
|
|
+ 机构审核通过
|
|
|
+ </div>
|
|
|
+ <div class="note note--wait" v-if="item.periodStatus === 2">
|
|
|
+ 等待审核
|
|
|
+ </div>
|
|
|
+ <div class="note note--wait" v-if="item.periodStatus === 3">
|
|
|
+ 审核中
|
|
|
+ </div>
|
|
|
+ <div class="note" v-if="item.periodStatus === 0">
|
|
|
+ 机构审核不通过
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="classhour-item__body">
|
|
|
- <div class="img"></div>
|
|
|
+ <div class="classhour-item__body clearfix">
|
|
|
+ <!-- <div class="img"></div> -->
|
|
|
<div class="text">
|
|
|
- <div class="title">二级建造师建设工程施工管理</div>
|
|
|
- <div class="desc">您的学时还未修完,请尽快完成课程学习</div>
|
|
|
+ <div class="title">{{ item.goodsName }}</div>
|
|
|
+ <div class="desc desc--black" v-if="item.periodStatus === 1">
|
|
|
+ 机构已审核通过,需等待注册中心复审后即可获得继续教育学时。审核时间约15个工作日,届时请前往官网申请证书延期。
|
|
|
+ </div>
|
|
|
+ <div class="desc" v-if="item.periodStatus === -1">
|
|
|
+ 您的学时还未修完,请尽快完成课程学习
|
|
|
+ </div>
|
|
|
+ <div class="desc" v-if="item.periodStatus === 2">
|
|
|
+ 学习完成后7-15个工作日完成学时审核。
|
|
|
+ </div>
|
|
|
+ <div class="desc" v-if="item.periodStatus === 0">
|
|
|
+ 请查看需重学记录,并及时重学对应课程,以免延误学时审核进度。
|
|
|
+ </div>
|
|
|
+ <div class="desc" v-if="item.periodStatus === 3">
|
|
|
+ 会在7-15个工作日左右完成学时审核
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="btns-wrap">
|
|
|
- <div class="btns">
|
|
|
- <div class="btn">课程学习</div>
|
|
|
- <div class="btn" @click="appointment">预约考试</div>
|
|
|
- <div class="btn" @click="showDetailModal = true">
|
|
|
+ <div class="btns" v-if="item.periodStatus !== 2">
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ v-if="item.periodStatus === -1"
|
|
|
+ @click="goCourseDetail(item)"
|
|
|
+ >
|
|
|
+ 课程学习
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ v-if="item.periodStatus === 1 && item.applyStatus === 1"
|
|
|
+ @click="appointment(item)"
|
|
|
+ >
|
|
|
+ 预约考试
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ v-if="item.periodStatus === 0 && item.rebuildStatus === 0"
|
|
|
+ @click="getcourseperiodcheat(item)"
|
|
|
+ >
|
|
|
查看详情
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ v-if="item.periodStatus === 0 && item.rebuildStatus === 1"
|
|
|
+ @click="goCourseDetail(item)"
|
|
|
+ >
|
|
|
+ 重修目录
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="学习凭证" name="2">
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="currentChange"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ :pager-count="5"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="activeName == '2'">
|
|
|
+ <div class="no-data" v-if="listData.length == 0">
|
|
|
+ 您暂无相关学习凭证记录哦
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
<div class="certificate-list">
|
|
|
<div
|
|
|
class="certificate-item"
|
|
|
- v-for="(item, index) in 6"
|
|
|
+ v-for="(item, index) in listData"
|
|
|
:key="index"
|
|
|
>
|
|
|
<div class="certificate-item__header">
|
|
|
<div class="title">证书名称:</div>
|
|
|
- <div class="desc">一级建造师</div>
|
|
|
+ <div class="desc">{{ item.title }}</div>
|
|
|
</div>
|
|
|
<div class="certificate-item__body">
|
|
|
- <div class="title">生成时间:</div>
|
|
|
- <div class="desc">2022-12-31 00:00:00</div>
|
|
|
+ <div class="title">证书编号</div>
|
|
|
+ <div class="desc">{{ item.certificateCode }}</div>
|
|
|
</div>
|
|
|
<div class="certificate-item__footer">
|
|
|
- <div class="btn">查看</div>
|
|
|
- <div class="btn">下载</div>
|
|
|
+ <div class="btn" @click="preview(item)">查看</div>
|
|
|
+ <div class="btn" @click="download(item)">下载</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="currentChange"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ :pager-count="5"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog
|
|
@@ -77,20 +171,37 @@
|
|
|
|
|
|
<div class="content__body">
|
|
|
<div class="list">
|
|
|
- <div class="list__item">
|
|
|
+ <div
|
|
|
+ class="list__item"
|
|
|
+ v-for="(item, index) in rebuildItems"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<div class="title">
|
|
|
- <span class="note">录播</span>
|
|
|
- 1、这是一个节的标题
|
|
|
+ <span class="note" v-if="item.type == 0"> 测试 </span>
|
|
|
+ <span class="note note--yellow" v-if="item.type == 1"
|
|
|
+ >录播</span
|
|
|
+ >
|
|
|
+ <span class="note note--yellow" v-if="item.type == 2"
|
|
|
+ >直播</span
|
|
|
+ >
|
|
|
+ <span class="note note--yellow" v-if="item.type == 3"
|
|
|
+ >回放</span
|
|
|
+ >
|
|
|
+ {{ index + 1 }}、{{ item.name }}
|
|
|
</div>
|
|
|
<div class="desc">
|
|
|
- 原因:
|
|
|
- <span class="note">拍照异常/时间异常</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="list__item">
|
|
|
- <div class="title">
|
|
|
- <span class="note note--yellow">直播</span>
|
|
|
- 1、这是一个节的标题
|
|
|
+ <div class="imgs">
|
|
|
+ <div
|
|
|
+ class="img"
|
|
|
+ v-for="(items, indexs) in item.userStudyRecordPhoto"
|
|
|
+ :key="indexs"
|
|
|
+ >
|
|
|
+ <img :src="$tools.splitImgHost(items.photo)" />
|
|
|
+ <div class="note">
|
|
|
+ {{ $tools.timestampToTime(items.createTime, false) }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="desc">
|
|
|
原因:
|
|
@@ -102,7 +213,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="rebuild__footer">
|
|
|
- <div class="confirm">确认重学</div>
|
|
|
+ <el-button class="confirm" @click="rebuildSubmit" type="primary"
|
|
|
+ >确认重学</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -114,17 +227,156 @@ export default {
|
|
|
name: "MyClasshour",
|
|
|
data() {
|
|
|
return {
|
|
|
- showDetailModal: true,
|
|
|
+ showDetailModal: false,
|
|
|
activeName: "1",
|
|
|
+ listData: [],
|
|
|
+ rebuildItems: [],
|
|
|
+ rebuildItem: {},
|
|
|
+ param: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
};
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ this.getcourseperiodlistGoods();
|
|
|
+ },
|
|
|
methods: {
|
|
|
- appointment() {
|
|
|
+ goCourseDetail(item) {
|
|
|
this.$router.push({
|
|
|
- path: "/person-center/my-classhour/appointment",
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
+ query: {
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
+ tabChange(e) {
|
|
|
+ console.log(e.name);
|
|
|
+ if (this.activeName == e.name) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.activeName = e.name;
|
|
|
+ this.param.pageNum = 1;
|
|
|
+
|
|
|
+ if (this.activeName == "1") {
|
|
|
+ this.getcourseperiodlistGoods();
|
|
|
+ } else {
|
|
|
+ this.getUserCertificateList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ currentChange(e) {
|
|
|
+ this.param.pageNum = e;
|
|
|
+
|
|
|
+ if (this.activeName == "1") {
|
|
|
+ this.getcourseperiodlistGoods();
|
|
|
+ } else {
|
|
|
+ this.getUserCertificateList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ appointment(item) {
|
|
|
+ var data = {
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ };
|
|
|
+ this.$request
|
|
|
+ .getApplysubscribe(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/person-center/my-classhour/appointment",
|
|
|
+ query: {
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: err.msg,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ rebuildSubmit() {
|
|
|
+ this.$confirm(
|
|
|
+ "如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询",
|
|
|
+ "注意",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确认重学",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ closeOnClickModal: false,
|
|
|
+ closeOnPressEscape: false,
|
|
|
+ distinguishCancelAndClose: false,
|
|
|
+ showClose: false,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then((_) => {
|
|
|
+ this.$request
|
|
|
+ .courseperiodrebuild({
|
|
|
+ goodsId: this.rebuildItem.goodsId,
|
|
|
+ gradeId: this.rebuildItem.gradeId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.showRebuildDetailModal = false;
|
|
|
+ this.$router.push({
|
|
|
+ path: `/my-course-detail/${this.rebuildItem.goodsId}`,
|
|
|
+ query: {
|
|
|
+ gradeId: this.rebuildItem.gradeId,
|
|
|
+ orderGoodsId: this.rebuildItem.orderGoodsId,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((_) => {});
|
|
|
+ },
|
|
|
+ getcourseperiodlistGoods() {
|
|
|
+ this.$request
|
|
|
+ .getcourseperiodlistGoods(this.param)
|
|
|
+ .then((res) => {
|
|
|
+ this.listData = [...res.rows];
|
|
|
+ this.total = res.total;
|
|
|
+ })
|
|
|
+ .catch((err) => {});
|
|
|
+ },
|
|
|
+
|
|
|
+ getUserCertificateList() {
|
|
|
+ this.$request
|
|
|
+ .getUserCertificateList(this.param)
|
|
|
+ .then((res) => {
|
|
|
+ this.listData = [...res.rows];
|
|
|
+ this.total = res.total;
|
|
|
+ })
|
|
|
+ .catch((err) => {});
|
|
|
+ },
|
|
|
+
|
|
|
+ getcourseperiodcheat(item) {
|
|
|
+ this.rebuildItem = item;
|
|
|
+ this.$request
|
|
|
+ .getcourseperiodcheat({
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.rebuildItems = res.rows;
|
|
|
+ });
|
|
|
+ this.showDetailModal = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ preview(item) {
|
|
|
+ let url = this.$tools.splitImgHost(item.certificatePath, true);
|
|
|
+ },
|
|
|
+ download(item) {
|
|
|
+ var url = this.$tools.splitImgHost(item.certificatePath, true);
|
|
|
+ var a = document.createElement("a");
|
|
|
+ var event = new MouseEvent("click");
|
|
|
+ a.download = "img";
|
|
|
+ a.href = url;
|
|
|
+ a.dispatchEvent(event);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -160,7 +412,7 @@ export default {
|
|
|
.note {
|
|
|
vertical-align: middle;
|
|
|
display: inline-block;
|
|
|
- width: 66px;
|
|
|
+ padding: 0 20px;
|
|
|
height: 24px;
|
|
|
background: #ffeceb;
|
|
|
border: 1px solid #ff3b30;
|
|
@@ -171,6 +423,18 @@ export default {
|
|
|
color: #ff3b30;
|
|
|
text-align: center;
|
|
|
line-height: 24px;
|
|
|
+
|
|
|
+ &--success {
|
|
|
+ color: #34c759;
|
|
|
+ border: 1px solid #34c759;
|
|
|
+ background: #e6feea;
|
|
|
+ }
|
|
|
+
|
|
|
+ &--wait {
|
|
|
+ color: #007aff;
|
|
|
+ border: 1px solid #007aff;
|
|
|
+ background: rgba(247, 250, 255, 1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -186,6 +450,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
&__body {
|
|
|
+ padding-bottom: 20px;
|
|
|
.img {
|
|
|
float: left;
|
|
|
width: 160px;
|
|
@@ -194,6 +459,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
+ width: 700px;
|
|
|
float: left;
|
|
|
margin-left: 12px;
|
|
|
.title {
|
|
@@ -221,7 +487,11 @@ export default {
|
|
|
font-family: Microsoft YaHei;
|
|
|
font-weight: 400;
|
|
|
color: #ff3b30;
|
|
|
- margin-top: 30px;
|
|
|
+ margin-top: 20px;
|
|
|
+
|
|
|
+ &--black {
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -342,6 +612,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .no-data {
|
|
|
+ text-align: center;
|
|
|
+ padding: 50px 0;
|
|
|
+ color: #666;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pagination {
|
|
|
+ padding: 30px 0;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.rebuild {
|
|
@@ -444,6 +726,19 @@ export default {
|
|
|
|
|
|
.note {
|
|
|
color: #ff3b30;
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .img {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ img {
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -455,11 +750,11 @@ export default {
|
|
|
&__footer {
|
|
|
height: 90px;
|
|
|
border-top: 1px solid #eee;
|
|
|
+ text-align: center;
|
|
|
.confirm {
|
|
|
- cursor: pointer;
|
|
|
width: 200px;
|
|
|
height: 40px;
|
|
|
- background: #3f8dfd;
|
|
|
+ padding: 0;
|
|
|
border-radius: 20px;
|
|
|
text-align: center;
|
|
|
line-height: 40px;
|