lsc 2 years ago
parent
commit
a4cd3b9d5f
1 changed files with 129 additions and 121 deletions
  1. 129 121
      src/components/courseDetail.vue

+ 129 - 121
src/components/courseDetail.vue

@@ -3,42 +3,35 @@
     <div class="pb_content_body" style="height: 100%">
       <div class="body_student">
         <div class="student_head">
-          <div
-            class="return"
-            @click.stop="
-              goTo(
-                '/index?userid=' +
-                  userid +
-                  '&oid=' +
-                  oid +
-                  '&org='+
-                      org +
-                  '&cid=' +
-                  classId +
-                  '&tType=' +
-                  tType +
-                  '&screenType=' +
-                  screenType
-              )
-            "
-          >
+          <div v-if="tType != 4" class="return" @click.stop="
+            goTo(
+              '/index?userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org='+
+                    org +
+                '&cid=' +
+                classId +
+                '&tType=' +
+                tType +
+                '&screenType=' +
+                screenType
+            )
+          ">
             返回
             <!-- <img src="../assets/icon/return.png" alt="" /> -->
           </div>
           <div class="box_course">
             <div class="wheel">
-              <img
-                style="object-fit: contain"
-                :src="
-                  this.courseDetail.cover != null &&
-                  this.courseDetail.cover != ''
-                    ? JSON.parse(this.courseDetail.cover).length > 0
-                      ? JSON.parse(this.courseDetail.cover)[0].url
-                      : mr
+              <img style="object-fit: contain" :src="
+                this.courseDetail.cover != null &&
+                this.courseDetail.cover != ''
+                  ? JSON.parse(this.courseDetail.cover).length > 0
+                    ? JSON.parse(this.courseDetail.cover)[0].url
                     : mr
-                "
-                alt
-              />
+                  : mr
+              " alt />
             </div>
             <div class="right_box">
               <div class="rightT">
@@ -47,33 +40,21 @@
                 <div class="jd">{{ rw }}任务</div>
               </div>
               <div class="cType">
-                <div
-                  class="all_choose"
-                  v-for="(item, index) in courseType"
-                  :key="index"
-                >
+                <div class="all_choose" v-for="(item, index) in courseType" :key="index">
                   <span style="color: #6c6c6c">{{ item + ":" }}</span>
-                  <span
-                    class="type_children"
-                    v-for="(item2, index2) in courseTypeJson[item]"
-                    :key="index2"
-                    >{{ item2 }}</span
-                  >
+                  <span class="type_children" v-for="(item2, index2) in courseTypeJson[item]" :key="index2">{{ item2
+                  }}</span>
                 </div>
               </div>
               <div class="cType" style="font-size: 18px; color: #6c6c6c">
                 <div>
                   创建者:<span style="color: #000">{{
-                    courseDetail.username
+                  courseDetail.username
                   }}</span>
                 </div>
                 <div class="Tname" v-if="Tname.length > 0">
-                  协同人员:<span
-                    v-for="(tname, tIndex) in Tname"
-                    :key="tIndex"
-                    style="margin: 0 5px; color: #000"
-                    >{{ tname }}</span
-                  >
+                  协同人员:<span v-for="(tname, tIndex) in Tname" :key="tIndex" style="margin: 0 5px; color: #000">{{ tname
+                  }}</span>
                 </div>
               </div>
               <div class="people">
@@ -97,12 +78,7 @@
             <div class="courseTd">{{ courseDetail.brief }}</div>
           </div>
           <div :class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'">
-            <div
-              class="blue_box_one"
-              v-for="(item, index) in chapInfo"
-              :key="index"
-              @click="addUserRate(index)"
-            >
+            <div class="blue_box_one" v-for="(item, index) in chapInfo" :key="index" @click="addUserRate(index)">
               <div>第{{ index + 1 }}阶段</div>
               <div :title="item.dyName">{{ item.dyName }}</div>
               <div>{{ item.chapterInfo[0].taskJson.length }}个任务</div>
@@ -119,29 +95,16 @@
         >
           此处滚动加载..
         </div>-->
-        <el-dialog
-          title="阶段选择"
-          :visible.sync="dialogVisible"
-          :append-to-body="true"
-          width="700px"
-          :before-close="handleClose"
-          class="dialog_change"
-        >
+        <el-dialog title="阶段选择" :visible.sync="dialogVisible" :append-to-body="true" width="700px"
+          :before-close="handleClose" class="dialog_change">
           <div style="font-size: 20px">请选择阶段</div>
-          <div
-            style="
+          <div style="
               padding: 20px 30px;
               display: flex;
               flex-direction: row;
               flex-wrap: wrap;
-            "
-          >
-            <div
-              class="blue_box"
-              v-for="(item, index) in chapInfo"
-              :key="index"
-              @click="addUserRate(index)"
-            >
+            ">
+            <div class="blue_box" v-for="(item, index) in chapInfo" :key="index" @click="addUserRate(index)">
               <div>第{{ index + 1 }}阶段</div>
               <div>{{ item.dyName }}</div>
               <div>{{ item.chapterInfo[0].taskJson.length }}个任务</div>
@@ -162,7 +125,7 @@ export default {
       id: this.$route.query.courseId,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
-      org:this.$route.query.org,
+      org: this.$route.query.org,
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
       screenType: this.$route.query.screenType,
@@ -224,40 +187,40 @@ export default {
           if (this.tType == 1 || this.tType == 2 || this.tType == 4) {
             this.goTo(
               "/studyStudent?type=" +
-                i +
-                "&courseId=" +
-                this.id +
-                "&userid=" +
-                this.userid +
-                "&oid=" +
-                this.oid +
-                "&org=" +
-                this.org +
-                "&cid=" +
-                this.classId +
-                "&tType=" +
-                this.tType +
-                "&screenType=" +
-                this.screenType
+              i +
+              "&courseId=" +
+              this.id +
+              "&userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&cid=" +
+              this.classId +
+              "&tType=" +
+              this.tType +
+              "&screenType=" +
+              this.screenType
             );
-          }else {
+          } else {
             this.goTo(
               "/study?type=" +
-                i +
-                "&courseId=" +
-                this.id +
-                "&userid=" +
-                this.userid +
-                "&oid=" +
-                this.oid +
-                "&org=" +
-                this.org +
-                "&cid=" +
-                this.classId +
-                "&tType=" +
-                this.tType +
-                "&screenType=" +
-                this.screenType
+              i +
+              "&courseId=" +
+              this.id +
+              "&userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&cid=" +
+              this.classId +
+              "&tType=" +
+              this.tType +
+              "&screenType=" +
+              this.screenType
             );
           }
         })
@@ -367,29 +330,34 @@ export default {
     text-overflow: ellipsis;
   }
 }
+
 .body_student {
   margin: 10px auto;
   width: 98%;
   height: 100%;
 }
+
 .student_head {
   width: 100%;
   background: #fff;
   height: 30%;
   position: relative;
 }
+
 .wheel {
   width: 250px;
   max-height: 146px;
   display: flex;
   align-items: center;
 }
+
 .man {
   width: 16px;
   height: 16px;
 }
-.wheel > img,
-.man > img {
+
+.wheel>img,
+.man>img {
   width: 100%;
   height: 100%;
 }
@@ -398,6 +366,7 @@ export default {
   display: flex;
   padding: 25px 0 20px 60px;
 }
+
 .right_box {
   display: flex;
   flex-direction: column;
@@ -405,6 +374,7 @@ export default {
   align-items: flex-start;
   width: calc(100% - 350px);
 }
+
 .right_box_title {
   font-size: 23px;
   max-width: calc(100% - 190px);
@@ -412,14 +382,17 @@ export default {
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
 .people {
   display: flex;
   margin-top: 20px;
 }
+
 .person {
   margin-left: 10px;
   line-height: 18px;
 }
+
 .now_study {
   width: 150px;
   height: 35px;
@@ -432,36 +405,44 @@ export default {
   cursor: pointer;
   margin-top: 30px;
 }
+
 .choose_who {
   display: flex;
   margin: 15px 0 0 25px;
 }
+
 .who_choose {
   height: 28px;
   cursor: pointer;
 }
-.choose_who > div:nth-child(2) {
+
+.choose_who>div:nth-child(2) {
   margin-left: 35px;
 }
+
 .choose {
   border-bottom: 5px solid #4a9eed;
   color: #4a9eed;
 }
+
 .student_body {
   display: flex;
 }
+
 .student_body,
 .right {
   width: 100%;
   margin: 10px auto;
   min-height: 688px;
 }
+
 .nav {
   margin: auto 25px;
   width: 80%;
   padding-top: 5px;
   text-indent: 25px;
 }
+
 .pic {
   width: 100%;
   display: flex;
@@ -470,6 +451,7 @@ export default {
   height: 100%;
   justify-content: space-evenly;
 }
+
 .Img {
   /*width: 30%; */
   width: 300px;
@@ -479,10 +461,12 @@ export default {
   border-radius: 5px;
   overflow: hidden;
 }
-.Img > img {
+
+.Img>img {
   width: 100%;
   height: 100%;
 }
+
 .student_body_one,
 .right_one {
   width: 100%;
@@ -491,6 +475,7 @@ export default {
   margin-top: 10px;
   min-height: 688px;
 }
+
 .student {
   width: 85%;
   display: flex;
@@ -499,7 +484,8 @@ export default {
   justify-content: flex-start;
   margin: auto 10px;
 }
-.student > div {
+
+.student>div {
   width: 12%;
   height: 35px;
   background: #e3759a;
@@ -510,34 +496,41 @@ export default {
   line-height: 35px;
   margin: 10px;
 }
-.dialog_change >>> .el-dialog {
+
+.dialog_change>>>.el-dialog {
   border-radius: 5px;
 }
-.dialog_change >>> .el-dialog__header {
+
+.dialog_change>>>.el-dialog__header {
   background: #303030;
   height: 36px;
   line-height: 36px;
   padding-left: 10px;
   padding: 0px 10px 0px;
 }
-.dialog_change >>> .el-dialog__headerbtn {
+
+.dialog_change>>>.el-dialog__headerbtn {
   top: 10px !important;
   right: 10px !important;
 }
-.dialog_change >>> .el-dialog__title {
+
+.dialog_change>>>.el-dialog__title {
   color: #fff;
   font-size: 14px;
   line-height: 5px;
 }
-.dialog_change >>> .el-dialog__body {
+
+.dialog_change>>>.el-dialog__body {
   background: #f5f5f5;
 }
+
 .blue_box {
   align-items: center;
   display: flex;
   flex-direction: column;
   justify-content: center;
 }
+
 .blue_box,
 .blue_box_one {
   width: 30%;
@@ -549,6 +542,7 @@ export default {
   margin: 15px 0 15px 15px;
   cursor: pointer;
 }
+
 .blue_box_one {
   width: 200px;
   height: 200px;
@@ -559,18 +553,21 @@ export default {
   align-items: center;
   justify-content: center;
 }
-.blue_box_one > div {
+
+.blue_box_one>div {
   margin: 5px 0;
 }
-.blue_box_one > div:nth-child(1) {
+
+.blue_box_one>div:nth-child(1) {
   font-size: 20px;
   font-weight: bold;
 }
-.blue_box > div:nth-child(2) {
+
+.blue_box>div:nth-child(2) {
   margin-top: 10px;
 }
 
-.blue_box_one > div:nth-child(2) {
+.blue_box_one>div:nth-child(2) {
   white-space: nowrap;
   text-overflow: ellipsis;
   overflow: hidden;
@@ -580,6 +577,7 @@ export default {
   max-width: calc(100% - 85px);
   margin: 0 auto;
 }
+
 .return {
   background: #205cc6;
   width: 70px;
@@ -595,10 +593,12 @@ export default {
   top: 24px;
   font-size: 14px;
 }
-.return > img {
+
+.return>img {
   width: 100%;
   height: 100%;
 }
+
 .cType {
   display: flex;
   flex-direction: row;
@@ -606,13 +606,15 @@ export default {
   align-items: center;
   margin-top: 20px;
 }
-.cType > div > span {
+
+.cType>div>span {
   font-size: 18px;
 }
 
-.type_children + .type_children {
+.type_children+.type_children {
   margin-left: 10px;
 }
+
 .all_choose {
   margin-right: 10px;
   max-width: 250px;
@@ -639,6 +641,7 @@ export default {
   text-align: center;
   line-height: 25px;
 }
+
 .sLeft {
   width: 14%;
   margin-right: 10px;
@@ -646,12 +649,14 @@ export default {
   padding: 20px 0 0 15px;
   border-radius: 10px;
 }
+
 .courseT {
   border-left: 3px solid #2e66c9;
   padding-left: 5px;
   color: #2e66c9;
   font-weight: bold;
 }
+
 .courseTd {
   padding-top: 15px;
   height: 700px;
@@ -678,6 +683,7 @@ export default {
   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
   background-color: rgba(0, 0, 0, 0.1);
 }
+
 .rightTd,
 .noBRight {
   width: 84%;
@@ -689,9 +695,11 @@ export default {
   align-items: center;
   justify-content: flex-start;
 }
+
 .noBRight {
   width: 100%;
 }
+
 .Tname {
   margin-left: 40px;
 }