123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- <template>
- <div id="rebuild-modal">
- <el-dialog
- width="800px"
- class="rebuild"
- :visible.sync="showRebuildDetailModal"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false"
- >
- <div class="rebuild__content">
- <div class="rebuild__close" @click="showRebuildDetailModal = false">
- X
- </div>
- <div class="rebuild__header">审核详情</div>
- <div class="rebuild__body">
- <div class="content">
- <div class="content__header">
- <div class="title">重要提示:</div>
- <div class="desc">
- 您的学时审核不通过,不通过原因如下,请查阅,并重学不通过的课程内容。
- </div>
- </div>
- <div class="content__body">
- <div class="list">
- <div
- class="list__item"
- v-for="(item, index) in rebuildItems"
- :key="index"
- >
- <div class="title">
- <span class="note" v-if="item.type == 0"> 测试 </span>
- <span class="note note--yellow" v-else-if="item.type == 1 && item.sectionType == 1"
- >视频</span
- >
- <span class="note note--yellow" v-else-if="item.type == 1 && item.sectionType == 2"
- >直播</span
- >
- <span class="note note--yellow" v-else-if="item.type == 1 && item.sectionType == 3"
- >回放</span
- >
- <span class="note note--yellow" v-else-if="item.type == 2"
- >试卷</span
- >
- {{ index + 1 }}、{{ item.name }}
- </div>
- <div class="desc">
- <!-- <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">
- 原因:
- <span class="note">{{ item.auditReason }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="rebuild__footer" v-if="rebuildShow">
- <el-button class="confirm" @click="rebuildSubmit" type="primary"
- >确认已阅读</el-button
- >
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { mapGetters } from "vuex";
- export default {
- name: "showRebuildDetailModal",
- computed: {
- ...mapGetters(["userInfo"]),
- },
- data() {
- return {
- showRebuildDetailModal: false,
- rebuildItem: {},
- rebuildItems: {},
- rebuildShow: false,
- };
- },
- mounted() {},
- methods: {
- showModal(item) {
- this.rebuildShow = false;
- this.rebuildItem = item;
- this.$request
- .getcourseperiodcheat({
- goodsId: item.goodsId,
- gradeId: item.gradeId,
- })
- .then((res) => {
- this.rebuildItems = res.rows;
- this.showRebuildDetailModal = true;
- let sysTime = this.$tools.timest();
- //学习服务期没过
- if (item.serviceEndTime && item.serviceEndTime > +sysTime) {
- console.log(1);
- this.rebuildShow = true;
- } else {
- //已过学习服务期
- console.log(2);
- this.rebuildShow = false;
- this.showRebuildDetailModal = true;
- return;
- }
- console.log(item.classEndTime, "item.classEndTime");
- console.log(sysTime, "sysTime");
- //有班级有效期
- if (item.classEndTime) {
- //班级有效期没过
- if (item.classEndTime > +sysTime) {
- console.log(3);
- this.rebuildShow = true;
- } else {
- //已过班级有效期
- this.rebuildShow = false;
- console.log(4);
- this.showRebuildDetailModal = true;
- return;
- }
- } else {
- }
- this.rebuildShow = true;
- this.showRebuildDetailModal = true;
- });
- },
- rebuildSubmit() {
- this.$request
- .courseperiodrebuild({
- goodsId: this.rebuildItem.goodsId,
- gradeId: this.rebuildItem.gradeId,
- orderGoodsId: this.rebuildItem.orderGoodsId,
- })
- .then((res) => {
- this.showRebuildDetailModal = false;
- this.$emit("rebuildSubmit", this.rebuildItem);
- // this.$router.push({
- // path: `/my-course-detail/${this.rebuildItem.goodsId}`,
- // query: {
- // gradeId: this.rebuildItem.gradeId,
- // orderGoodsId: this.rebuildItem.orderGoodsId,
- // },
- // });
- });
- // 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.$emit("rebuildSubmit", this.rebuildItem);
- // // this.$router.push({
- // // path: `/my-course-detail/${this.rebuildItem.goodsId}`,
- // // query: {
- // // gradeId: this.rebuildItem.gradeId,
- // // orderGoodsId: this.rebuildItem.orderGoodsId,
- // // },
- // // });
- // });
- // })
- // .catch((_) => {});
- },
- },
- };
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped lang="scss">
- .rebuild {
- /deep/ .el-dialog__header {
- display: none;
- }
- /deep/ .el-dialog__body {
- padding: 0;
- overflow: unset;
- }
- &__close {
- cursor: pointer;
- position: absolute;
- right: 0;
- top: -28px;
- width: 24px;
- height: 24px;
- line-height: 24px;
- text-align: center;
- color: #eee;
- border: 1px solid #eee;
- border-radius: 50%;
- }
- &__header {
- height: 40px;
- border-bottom: 1px solid #eee;
- line-height: 40px;
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #333333;
- padding-left: 24px;
- }
- &__body {
- height: 400px;
- padding: 0 24px;
- .content {
- height: 100%;
- overflow-y: auto;
- &__header {
- padding: 16px 0;
- border-bottom: 1px solid #eee;
- .title {
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #ff3b30;
- line-height: 24px;
- }
- .desc {
- margin-top: 10px;
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ff3b30;
- line-height: 24px;
- }
- }
- &__body {
- .list {
- &__item {
- padding: 16px 0;
- border-bottom: 1px solid #eee;
- .title {
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- .note {
- display: inline-block;
- text-align: center;
- line-height: 18px;
- width: 32px;
- height: 20px;
- border: 1px solid #3f8dfd;
- border-radius: 4px;
- color: #3f8dfd;
- font-size: 12px;
- &--yellow {
- border: 1px solid #ff9500;
- color: #ff9500;
- }
- }
- }
- .desc {
- margin-top: 10px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- .note {
- color: #ff3b30;
- line-height: 20px;
- }
- .img {
- width: 100px;
- height: 100px;
- display: inline-block;
- text-align: center;
- img {
- max-width: 100%;
- max-height: 100%;
- }
- }
- }
- }
- }
- }
- }
- }
- &__footer {
- height: 90px;
- border-top: 1px solid #eee;
- text-align: center;
- .confirm {
- width: 200px;
- height: 40px;
- padding: 0;
- border-radius: 20px;
- text-align: center;
- line-height: 40px;
- color: #fff;
- margin: 24px auto;
- }
- }
- }
- </style>
|