123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878 |
- <template>
- <div class="my-classhour">
- <div class="my-classhour__body">
- <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 == '2'">
- <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 listData"
- :key="index"
- >
- <div class="classhour-item__header">
- <div class="state">
- 学时审核状态:
- <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">
- 机构审核不通过,有{{ item.rebuild }}节需要重修
- </div>
- </div>
- </div>
- <div class="classhour-item__body clearfix">
- <!-- <div class="img"></div> -->
- <div class="text">
- <div class="title">{{ item.goodsName }}</div>
- <div class="desc desc--black" v-if="item.periodStatus === 1">
- <template
- v-if="
- item.educationName == '继续教育' &&
- item.businessName == '二级' &&
- item.projectName == '建造师'
- "
- >
- 机构已审核通过,需等待信息中心复审后即可获得继续教育学时。审核时间约15个工作日,届时请前往官网申请证书延期。
- <div class="copy-btn">
- <a @click="copy">复制官网链接</a>
- </div>
- </template>
- </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" v-if="item.periodStatus !== 2">
- <el-button
- type="primary"
- class="btn"
- v-if="
- item.periodStatus === -1 &&
- !(
- sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime &&
- sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart)
- )
- "
- @click="goCourseDetail(item)"
- >
- 课程学习
- </el-button>
- <el-button
- type="primary"
- class="btn"
- v-if="
- item.periodStatus === 1 &&
- item.applyStatus === 1 &&
- !(
- sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime &&
- sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart)
- )
- "
- @click="appointment(item)"
- >
- 预约考试
- </el-button>
- <el-button
- type="primary"
- class="btn"
- v-if="
- item.periodStatus === 1 &&
- item.beforeStatus === 1 &&
- !(
- sysTime <= item.serviceStartTime ||
- sysTime >= item.serviceEndTime ||
- (item.classStartTime &&
- sysTime <= item.classStartTime) ||
- (item.classEndTime &&
- sysTime >= item.classEndTime) ||
- item.learningStatus == 2 ||
- item.classStatus == 0 ||
- (item.learningStatus == 3 &&
- sysTime < item.learningTimeStart)
- )
- "
- @click="appBeforeAddress(item)"
- >
- 进入刷题
- </el-button>
- <el-button
- type="primary"
- class="btn"
- v-if="item.periodStatus === 0 && item.rebuildStatus === 0"
- @click="getcourseperiodcheat(item)"
- >
- 查看详情
- </el-button>
- <div
- class="btn"
- v-if="item.periodStatus === 0 && item.rebuildStatus === 1"
- @click="goCourseDetail(item)"
- >
- 重修目录
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="pagination">
- <el-pagination
- @current-change="currentChange"
- background
- layout="prev, pager, next"
- :total="total"
- :pager-count="5"
- :page-size="param.pageSize"
- >
- </el-pagination>
- </div>
- </template>
- </template>
- <template v-if="activeName == '1'">
- <div class="no-data" v-if="listData1.length == 0">
- 您暂无相关学习凭证记录哦
- </div>
- <template v-else>
- <div class="certificate-list">
- <div
- class="certificate-item"
- v-for="(item, index) in listData1"
- :key="index"
- >
- <div class="certificate-item__header">
- <div class="title">证书名称:</div>
- <div class="desc">{{ item.title }}</div>
- </div>
- <div class="certificate-item__body">
- <div class="title">证书编号</div>
- <div class="desc">{{ item.certificateCode }}</div>
- </div>
- <div class="certificate-item__footer">
- <div class="btn" @click="preview(item)">查看</div>
- <div class="btn" @click="download(item)">下载</div>
- </div>
- </div>
- </div>
- <div class="pagination">
- <el-pagination
- @current-change="currentChange"
- background
- layout="prev, pager, next"
- :total="total"
- :pager-count="5"
- :page-size="param.pageSize"
- >
- </el-pagination>
- </div>
- </template>
- </template>
- </div>
- <el-dialog
- title="预约考试"
- :visible.sync="appointModal"
- width="600px"
- class="appoint-modal"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- >
- <div class="appoint-modal__content">
- <el-radio
- v-for="(appointChild, appointIndex) in appointItem.applyList"
- v-model="applyId"
- :key="appointIndex"
- :label="appointChild.applyId"
- >{{ appointChild.applyName }}</el-radio
- >
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="appointModal = false">取 消</el-button>
- <el-button type="primary" @click="confirmAppoint">立即预约</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="实名验证确认"
- :visible.sync="showConfirm"
- width="600px"
- class="showconfirm"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false"
- >
- <div class="showconfirm__content">
- <div class="text">
- 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
- </div>
- <el-descriptions :column="1">
- <el-descriptions-item label="姓名">{{
- userInfo && userInfo.realname
- }}</el-descriptions-item>
- <el-descriptions-item label="手机号">{{
- userInfo && userInfo.telphone
- }}</el-descriptions-item>
- <el-descriptions-item label="身份证号">{{
- userInfo && userInfo.idCard
- }}</el-descriptions-item>
- </el-descriptions>
- <div class="">
- <el-checkbox v-model="confirmChecked">确认个人信息无误</el-checkbox>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showConfirm = false">取 消</el-button>
- <el-button
- type="primary"
- @click="confirmUser"
- :disabled="confirmCount > 0"
- :loading="confirmLoading"
- >{{
- confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
- }}</el-button
- >
- </span>
- </el-dialog>
- <RebuildModal
- ref="rebuildModal"
- @rebuildSubmit="rebuildSubmit($event)"
- ></RebuildModal>
- <ExercisesModal ref="exercisesModal"></ExercisesModal>
- <el-image-viewer
- v-if="showViewer"
- :on-close="closeViewer"
- :url-list="[url]"
- />
- </div>
- </template>
- <script>
- import ElImageViewer from "element-ui/packages/image/src/image-viewer";
- import RebuildModal from "@/components/rebuildModal";
- import ExercisesModal from "@/components/exercisesModal";
- import { mapGetters, mapActions } from "vuex";
- export default {
- name: "MyClasshour",
- components: {
- RebuildModal,
- ElImageViewer,
- ExercisesModal
- },
- computed: {
- ...mapGetters(["sysTime", "userInfo"])
- },
- data() {
- return {
- appointItem: {},
- applyId: "",
- appointModal: false,
- copyUrl: "http://gdzczx.gdcic.net/",
- showViewer: false,
- rebuildShow: false,
- showDetailModal: false,
- confirmChecked: false,
- confirmTimer: null,
- confirmLoading: false,
- confirmCount: 10,
- showConfirm: false,
- activeName: "1",
- activeItem: {},
- listData: [],
- listData1: [],
- rebuildItems: [],
- rebuildItem: {},
- param: {
- pageNum: 1,
- pageSize: 10
- },
- url: "",
- total: 0
- };
- },
- mounted() {
- this.setSystemTime();
- this.getUserCertificateList();
- },
- methods: {
- ...mapActions(["setSystemTime"]),
- appBeforeAddress(item) {
- console.log(this.$refs.exercisesModal);
- this.$refs.exercisesModal.showModal(item);
- },
- closeViewer() {
- this.showViewer = false;
- },
- async goCourseDetail(item) {
- if (item.externalLinkStatus) {
- window.open(item.externalLink, "_blank");
- return
- }
- this.activeItem = item;
- var confirmDetail = true;
- if (item.educationName == "继续教育") {
- if (
- item.officialName &&
- item.businessName == "二级" &&
- item.projectName == "建造师"
- ) {
- confirmDetail = await this.userConfirmInfoDetail(item);
- }
- }
- if (!confirmDetail) {
- return;
- }
- this.$router.push({
- path: `/my-course-detail/${item.goodsId}`,
- query: {
- gradeId: item.gradeId,
- orderGoodsId: item.orderGoodsId
- }
- });
- },
- confirmUser() {
- if (!this.confirmChecked) {
- this.$message.warning("请勾选确认个人信息无误");
- return;
- }
- this.confirmLoading = true;
- let infoJson = {
- realname: this.userInfo.realname,
- idCard: this.userInfo.idCard,
- telphone: this.userInfo.telphone
- };
- this.$request
- .userConfirminfo({
- infoJson: JSON.stringify(infoJson),
- orderGoodsId: this.activeItem.orderGoodsId
- })
- .then(res => {
- if (res.data.pushInfo) {
- this.$message.success("提交成功");
- } else {
- this.$confirm(
- "您的信息正在推送中,请稍后再进入学习!",
- "提示",
- {
- confirmButtonText: "确定",
- closeOnClickModal: false,
- closeOnPressEscape: false,
- distinguishCancelAndClose: false,
- showClose: false,
- showCancelButton: false
- }
- )
- .then(_ => {})
- .catch(_ => {});
- }
- this.showConfirm = false;
- this.confirmLoading = false;
- });
- },
- userConfirmInfoDetail(item) {
- return new Promise(resolve => {
- this.$request
- .userConfirmInfoDetail({
- orderGoodsId: this.activeItem.orderGoodsId
- })
- .then(res => {
- if (!res.data) {
- clearInterval(this.confirmTimer);
- this.confirmCount = 10;
- this.showConfirm = true;
- this.confirmTimer = setInterval(() => {
- if (this.confirmCount > 0) {
- this.confirmCount--;
- } else {
- clearInterval(this.confirmTimer);
- }
- }, 1000);
- } else {
- if (res.data.pushInfo) {
- resolve(true);
- } else {
- this.$confirm(
- "您的信息正在推送中,请稍后再进入学习!",
- "提示",
- {
- confirmButtonText: "确定",
- closeOnClickModal: false,
- closeOnPressEscape: false,
- distinguishCancelAndClose: false,
- showClose: false,
- showCancelButton: false
- }
- )
- .then(_ => {})
- .catch(_ => {});
- resolve(false);
- }
- }
- });
- });
- },
- 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.getUserCertificateList();
- } else {
- this.getcourseperiodlistGoods();
- }
- },
- currentChange(e) {
- this.param.pageNum = e;
- if (this.activeName == "1") {
- this.getUserCertificateList();
- } else {
- this.getcourseperiodlistGoods();
- }
- },
- appointment(item) {
- this.applyId = "";
- this.appointItem = item;
- this.appointModal = true;
- // 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,
- // });
- // });
- },
- confirmAppoint() {
- if (!this.applyId) {
- this.$message.warning("请选择要预约的考试");
- return;
- }
- var data = {
- goodsId: this.appointItem.goodsId,
- gradeId: this.appointItem.gradeId,
- applyId: this.applyId,
- orderGoodsId: this.appointItem.orderGoodsId
- };
- this.$request
- .getApplysubscribe(data)
- .then(res => {
- this.$router.push({
- path: "/person-center/my-examination/appointment",
- query: {
- goodsId: this.appointItem.goodsId,
- gradeId: this.appointItem.gradeId,
- orderGoodsId: this.appointItem.orderGoodsId,
- applyId: this.applyId
- }
- });
- })
- .catch(err => {
- this.$message({
- type: "warning",
- message: err.msg
- });
- });
- },
- rebuildSubmit() {
- this.$router.push({
- path: `/my-course-detail/${item.goodsId}`,
- query: {
- gradeId: item.gradeId,
- orderGoodsId: item.orderGoodsId
- }
- });
- },
- 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.listData1 = [...res.rows];
- this.total = res.total;
- })
- .catch(err => {});
- },
- getcourseperiodcheat(item) {
- this.$refs.rebuildModal.showModal(item);
- },
- preview(item) {
- this.url = this.$tools.splitImgHost(item.certificatePath);
- this.showViewer = true;
- },
- download(item) {
- var url = this.$tools.splitImgHost(item.certificatePath);
- var a = document.createElement("a");
- var event = new MouseEvent("click");
- a.download = "img";
- a.href = url;
- a.dispatchEvent(event);
- },
- copy() {
- var copyInput = document.createElement("input");
- //val是要复制的内容
- copyInput.setAttribute("value", this.copyUrl);
- document.body.appendChild(copyInput);
- copyInput.select();
- try {
- var copyed = document.execCommand("copy");
- if (copyed) {
- document.body.removeChild(copyInput);
- this.$message.success("复制成功");
- }
- } catch (err) {
- this.$message.error("复制失败,请检查浏览器兼容");
- }
- }
- }
- };
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped lang="scss">
- .my-classhour {
- &__body {
- /deep/ .el-tabs__header {
- margin-bottom: 0;
- }
- .learn-list {
- .classhour-item {
- margin-top: 24px;
- background: #fafbfc;
- border-radius: 8px;
- overflow: hidden;
- &__header {
- height: 40px;
- border-bottom: 1px solid #eee;
- padding: 0 18px;
- .state {
- margin-top: 8px;
- float: left;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- .note {
- vertical-align: middle;
- display: inline-block;
- padding: 0 20px;
- height: 24px;
- background: #ffeceb;
- border: 1px solid #ff3b30;
- border-radius: 12px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- 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);
- }
- }
- }
- .time {
- float: right;
- line-height: 40px;
- text-align: right;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- }
- }
- &__body {
- padding-bottom: 20px;
- .img {
- float: left;
- width: 160px;
- height: 90px;
- background: #3f8dfd;
- }
- .text {
- width: 700px;
- float: left;
- margin-left: 12px;
- .title {
- margin-top: 10px;
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- .note {
- display: inline-block;
- vertical-align: middle;
- border: 1px solid #333333;
- border-radius: 4px;
- font-size: 12px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- padding: 2px 5px;
- margin-left: 12px;
- }
- }
- .desc {
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ff3b30;
- margin-top: 20px;
- .copy-btn {
- text-decoration: underline;
- padding-top: 10px;
- color: #007aff;
- }
- &--black {
- color: #333;
- }
- }
- }
- .btns-wrap {
- display: table;
- float: right;
- height: 90px;
- width: 130px;
- .btns {
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- .btn {
- cursor: pointer;
- margin: 2px 0;
- width: 122px;
- height: 32px;
- padding: 0;
- border-radius: 16px;
- display: inline-block;
- text-align: center;
- line-height: 32px;
- color: #fff;
- &--warm {
- background: #ff3b30;
- }
- }
- }
- }
- }
- }
- }
- .certificate-list {
- font-size: 0;
- .certificate-item {
- display: inline-block;
- margin-top: 24px;
- margin-right: 24px;
- width: 354px;
- height: 240px;
- background: linear-gradient(0deg, #ffffff, #e7f1ff);
- border: 1px solid #eeeeee;
- box-shadow: 0px 0px 7px 1px rgba(0, 0, 0, 0.04);
- border-radius: 10px;
- &:nth-of-type(3n) {
- margin: 0;
- }
- &__header {
- padding-left: 18px;
- overflow: hidden;
- border-bottom: 1px solid #fff;
- height: 95px;
- .title {
- margin-top: 16px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- }
- .desc {
- margin-top: 14px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- }
- }
- &__body {
- padding-left: 18px;
- overflow: hidden;
- border-bottom: 1px solid #fff;
- height: 80px;
- .title {
- margin-top: 16px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- }
- .desc {
- margin-top: 14px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #666666;
- }
- }
- &__footer {
- height: 65px;
- padding-top: 16px;
- text-align: center;
- .btn {
- cursor: pointer;
- margin: 0 12px;
- display: inline-block;
- width: 122px;
- height: 32px;
- border: 1px solid #3f8dfd;
- border-radius: 16px;
- text-align: center;
- line-height: 30px;
- color: #3f8dfd;
- font-size: 16px;
- }
- }
- }
- }
- .no-data {
- text-align: center;
- padding: 50px 0;
- color: #666;
- font-size: 16px;
- }
- .pagination {
- padding: 30px 0;
- text-align: center;
- }
- }
- .appoint-modal {
- &__content {
- .el-radio {
- display: block;
- margin: 10px 30px 10px 0;
- }
- }
- }
- }
- </style>
|