Browse Source

修改编辑和视频样式

zengyicheng 2 years ago
parent
commit
6028f87cde
2 changed files with 130 additions and 66 deletions
  1. 81 46
      src/components/study.vue
  2. 49 20
      src/components/studyStudent.vue

+ 81 - 46
src/components/study.vue

@@ -1708,43 +1708,49 @@
                           :key="wIndex"
                         >
                           <div class="workImg">
-                          <img
-                            src="../assets/icon/works/noImg.png"
-                            @click="openPj(w.works)"
-                            alt
-                          />
-                        </div>
-                        <div class="comment" style="min-width: 200px">
-                          <div class="worksName">
-                            <div>{{ w.sName }}</div>
+                            <img
+                              src="../assets/icon/works/noImg.png"
+                              @click="openPj(w.works)"
+                              alt
+                            />
                           </div>
-                          <div class="commentList">
+                          <div class="comment" style="min-width: 200px">
+                            <div class="worksName">
+                              <div>{{ w.sName }}</div>
+                            </div>
                             <div class="commentList">
+                              <div class="commentList">
+                                <div
+                                  class="commentImg"
+                                  @click="
+                                    isLikes(w.wid, userid, 1, null, w.isLikes)
+                                  "
+                                >
+                                  <img
+                                    :src="w.isLikes == true ? likes : noLikes"
+                                    alt=""
+                                  />
+                                </div>
+                                <div>{{ w.likesCount }}</div>
+                              </div>
                               <div
-                                class="commentImg"
-                                @click="
-                                  isLikes(w.wid, userid, 1, null, w.isLikes)
-                                "
+                                class="commentList"
+                                style="margin-right: 15px"
                               >
-                                <img
-                                  :src="w.isLikes == true ? likes : noLikes"
-                                  alt=""
-                                />
-                              </div>
-                              <div>{{ w.likesCount }}</div>
-                            </div>
-                            <div class="commentList" style="margin-right: 15px">
-                              <div class="commentImg" @click="commentOther(w)">
-                                <img
-                                  src="../assets/icon/comment/comment.png"
-                                  alt=""
-                                />
+                                <div
+                                  class="commentImg"
+                                  @click="commentOther(w)"
+                                >
+                                  <img
+                                    src="../assets/icon/comment/comment.png"
+                                    alt=""
+                                  />
+                                </div>
+                                <div>{{ w.commentCount }}</div>
                               </div>
-                              <div>{{ w.commentCount }}</div>
                             </div>
                           </div>
                         </div>
-                        </div>
                       </div>
                       <div style="padding-top: 15px; font-size: 18px">
                         未提交
@@ -2396,9 +2402,9 @@
       title="查看视频"
       :visible.sync="videoVisible"
       :append-to-body="true"
-      width="1000px"
+      width="1200px"
       :before-close="handleClose"
-      class="dialog_diy"
+      class="dialog_diy1"
     >
       <div class="workd_media" style="height: 100%" v-if="videoDetail.sources">
         <video-player
@@ -2406,7 +2412,7 @@
           :playsinline="true"
           :options="videoDetail"
           @play="onPlayerPlay($event)"
-          style="width: 90%; height: 100%; margin: 0 0 0 30px"
+          style="width: 100%; height: 100%;"
         ></video-player>
       </div>
       <div slot="footer">
@@ -2490,7 +2496,7 @@
               <div class="pfBox" v-for="(e, eIndex) in rateJson" :key="eIndex">
                 <div class="nameAndrate">
                   <div>{{ e.value }}</div>
-                  <el-rate v-model="eScore.eStar[eIndex]"></el-rate>
+                  <el-rate v-model="eScore.eStar[eIndex]" disabled></el-rate>
                 </div>
                 <div>{{ e.detail }}</div>
               </div>
@@ -2655,7 +2661,8 @@
           <div class="pfBox" v-for="(e, eIndex) in rateJson" :key="eIndex">
             <div class="nameAndrate">
               <div>{{ e.value }}</div>
-              <el-rate v-model="eScore.eStar[eIndex]" disabled></el-rate>
+              <el-rate v-model="eScore.eStar[eIndex]" v-if="isStar = true" disabled></el-rate>
+              <el-rate v-model="eScore.eStar[eIndex]" v-else></el-rate>
             </div>
             <div>{{ e.detail }}</div>
           </div>
@@ -2701,6 +2708,7 @@ export default {
     return {
       dialogVisible: false,
       commentDialogVisible: false,
+      isStar: false,
       videoVisible: false,
       studentEvalDialogVisible: false,
       videoDetail: {},
@@ -2866,7 +2874,7 @@ export default {
       noteName: "",
       evaJuri: [],
       evalua: "",
-      bzText:"",
+      bzText: "",
       eTitle: "",
       eName: "",
       eJson: {},
@@ -3318,7 +3326,7 @@ export default {
 
                     if (b[j].stage == q && b[j].task == w) {
                       // 1、电子白板,3、思维导图,6协同文档,7思维网格 16、作业提交
-                      let _toolsAarry1 = [1, 3, 6, 7, 16,40];
+                      let _toolsAarry1 = [1, 3, 6, 7, 16, 40];
                       let _toolsAarry2 = [4];
                       let _toolsAarry3 = [15];
                       for (var k = 0; k < p.length; k++) {
@@ -3361,6 +3369,7 @@ export default {
                           ) != -1
                         ) {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -3381,6 +3390,7 @@ export default {
                           ) != -1
                         ) {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -3393,6 +3403,7 @@ export default {
                           });
                         } else if (b[j].type == 6) {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -3405,6 +3416,7 @@ export default {
                           });
                         } else {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -3422,6 +3434,7 @@ export default {
                           _toolsAarry2.indexOf(e[i].tool[0]) != -1
                         ) {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -3439,6 +3452,7 @@ export default {
                           _toolsAarry3.indexOf(e[i].tool[0]) != -1
                         ) {
                           this.worksStudent[q][w][i].push({
+                            userid:b[j].userid,
                             wid: b[j].id,
                             works: b[j].content,
                             sName: b[j].name,
@@ -4722,14 +4736,26 @@ export default {
           a = this.evalCount;
           this.toolsCount(a, t);
         }
-        this.rateJson =
-          this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
-            index
-          ].toolChoose[i].rateJson;
+        for (var k = 0; k < this.worksStudent[this.courseType][index][i].length; k++) {
+          if (this.userid == this.worksStudent[this.courseType][index][i][k].userid) {
+            this.eScore = JSON.parse(this.worksStudent[this.courseType][index][i][k].works);
+            this.rateJson =
+              this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                index
+              ].toolChoose[i].rateJson;
+          } else {
+            this.rateJson =
+              this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+                index
+              ].toolChoose[i].rateJson;
+          }
+        }
+        this.isStar = false;
         this.studentEvalDialogVisible = true;
       }
     },
     openPj(w) {
+      this.isStar = true;
       this.eScore = JSON.parse(w);
       this.rateJson =
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
@@ -5692,24 +5718,33 @@ export default {
 .binfo_input:focus-visible {
   border: 1px solid rgba(61, 103, 188);
 }
-.dialog_diy >>> .el-dialog__header {
+.dialog_diy >>> .el-dialog__header,
+.dialog_diy1 >>> .el-dialog__header {
   background: #002e81 !important;
   padding: 15px 20px;
 }
-.dialog_diy >>> .el-dialog__title {
+.dialog_diy >>> .el-dialog__title,
+.dialog_diy1 >>> .el-dialog__title {
   color: #fff;
 }
-.dialog_diy >>> .el-dialog__headerbtn {
+.dialog_diy >>> .el-dialog__headerbtn,
+.dialog_diy1 >>> .el-dialog__headerbtn{
   top: 19px;
 }
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close {
   color: #fff;
 }
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
+.dialog_diy1 >>> .el-dialog__body{
+  padding:0;
+}
 .dialog_diy >>> .el-dialog__body,
-.dialog_diy >>> .el-dialog__footer {
+.dialog_diy >>> .el-dialog__footer,
+.dialog_diy1 >>> .el-dialog__footer {
   background: #fafafa;
 }
 .a_addBox {

+ 49 - 20
src/components/studyStudent.vue

@@ -1226,7 +1226,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -1412,7 +1412,7 @@
                           class="workImg"
                           style="
                             border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                           "
                         >
                           <!-- <img
@@ -1506,7 +1506,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -1593,7 +1593,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -1680,7 +1680,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -1767,7 +1767,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -1915,7 +1915,7 @@
                           height: 140px;
                           margin: 10px 10px 10px 0;
                           border-radius: 15px;
-                            box-shadow: 0px 0px 10px 10px #f2f2f2;
+                            box-shadow: #eee 0px 0px 5px 5px;
                         "
                         v-for="(w, wIndex) in worksStudent[toolIndex]"
                         :key="wIndex"
@@ -2641,9 +2641,9 @@
       title="查看视频"
       :visible.sync="videoVisible"
       :append-to-body="true"
-      width="1000px"
+      width="1200px"
       :before-close="handleClose"
-      class="dialog_diy"
+      class="dialog_diy1"
     >
       <div class="workd_media" style="height: 100%" v-if="videoDetail.sources">
         <video-player
@@ -2651,7 +2651,7 @@
           :playsinline="true"
           :options="videoDetail"
           @play="onPlayerPlay($event)"
-          style="width: 90%; height: 100%; margin: 0 0 0 30px"
+          style="width: 100%; height: 100%;"
         ></video-player>
       </div>
       <div slot="footer">
@@ -2666,7 +2666,7 @@
       title="查看详情"
       :visible.sync="commentDialogVisible"
       :append-to-body="true"
-      width="600px"
+      width="800px"
       :before-close="handleClose"
       class="dialog_diy"
     >
@@ -2735,7 +2735,7 @@
               <div class="pfBox" v-for="(e, eIndex) in rateJson" :key="eIndex">
                 <div class="nameAndrate">
                   <div>{{ e.value }}</div>
-                  <el-rate v-model="eScore.eStar[eIndex]"></el-rate>
+                  <el-rate v-model="eScore.eStar[eIndex]" disabled></el-rate>
                 </div>
                 <div>{{ e.detail }}</div>
               </div>
@@ -2916,7 +2916,8 @@
           <div class="pfBox" v-for="(e, eIndex) in rateJson" :key="eIndex">
             <div class="nameAndrate">
               <div>{{ e.value }}</div>
-              <el-rate v-model="eScore.eStar[eIndex]"></el-rate>
+              <el-rate v-model="eScore.eStar[eIndex]" v-if="isStar = true" disabled></el-rate>
+              <el-rate v-model="eScore.eStar[eIndex]" v-else></el-rate>
             </div>
             <div>{{ e.detail }}</div>
           </div>
@@ -2963,6 +2964,7 @@ export default {
       dialogVisible: false,
       commentDialogVisible: false,
       videoVisible: false,
+      isStar:false,
       studentEvalDialogVisible: false,
       bzText: "",
       commentDetail: [],
@@ -3493,6 +3495,7 @@ export default {
         });
     },
     openPj(w) {
+      this.isStar = true;
       this.eScore = JSON.parse(w);
       this.rateJson =
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
@@ -3622,6 +3625,7 @@ export default {
                     ) != -1
                   ) {
                     this.worksStudent[i].push({
+                      userid:b[j].userid,
                       wid: b[j].id,
                       works: b[j].content,
                       sName: b[j].name,
@@ -3640,6 +3644,7 @@ export default {
                     ) != -1
                   ) {
                     this.worksStudent[i].push({
+                      userid:b[j].userid,
                       wid: b[j].id,
                       works: b[j].content,
                       sName: b[j].name,
@@ -3652,6 +3657,7 @@ export default {
                     });
                   } else if (b[j].type == 6) {
                     this.worksStudent[i].push({
+                      userid:b[j].userid,
                       wid: b[j].id,
                       works: b[j].content,
                       sName: b[j].name,
@@ -3664,6 +3670,7 @@ export default {
                     });
                   } else {
                     this.worksStudent[i].push({
+                      userid:b[j].userid,
                       wid: b[j].id,
                       works: b[j].content,
                       sName: b[j].name,
@@ -3677,6 +3684,7 @@ export default {
                   }
                 } else if (b[j].type == 3 && a[i].tool[0] == 15) {
                   this.worksStudent[i].push({
+                    userid:b[j].userid,
                     wid: b[j].id,
                     works: b[j].content,
                     sName: b[j].name,
@@ -3689,6 +3697,7 @@ export default {
                   });
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                   this.worksStudent[i].push({
+                    userid:b[j].userid,
                     wid: b[j].id,
                     works: b[j].content,
                     sName: b[j].name,
@@ -4980,10 +4989,21 @@ export default {
           a = this.evalCount;
           this.toolsCount(a, t);
         }
-        this.rateJson =
+        for(var k = 0;k<this.worksStudent[i].length;k++){
+          if(this.userid == this.worksStudent[i][k].userid){
+            this.eScore = JSON.parse(this.worksStudent[i][k].works);
+            this.rateJson =
+          this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+            index
+          ].toolChoose[i].rateJson;
+          }else{
+            this.rateJson =
           this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
             index
           ].toolChoose[i].rateJson;
+          }
+        }
+        this.isStar = false;
         this.studentEvalDialogVisible = true;
       }
     },
@@ -5889,24 +5909,33 @@ export default {
 .binfo_input:focus-visible {
   border: 1px solid rgba(61, 103, 188);
 }
-.dialog_diy >>> .el-dialog__header {
+.dialog_diy >>> .el-dialog__header,
+.dialog_diy1 >>> .el-dialog__header {
   background: #002e81 !important;
   padding: 15px 20px;
 }
-.dialog_diy >>> .el-dialog__title {
+.dialog_diy >>> .el-dialog__title,
+.dialog_diy1 >>> .el-dialog__title {
   color: #fff;
 }
-.dialog_diy >>> .el-dialog__headerbtn {
+.dialog_diy >>> .el-dialog__headerbtn,
+.dialog_diy1 >>> .el-dialog__headerbtn {
   top: 19px;
 }
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close {
   color: #fff;
 }
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover,
+.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
+.dialog_diy1 >>> .el-dialog__body{
+  padding:0;
+}
 .dialog_diy >>> .el-dialog__body,
-.dialog_diy >>> .el-dialog__footer {
+.dialog_diy >>> .el-dialog__footer,
+.dialog_diy1 >>> .el-dialog__footer  {
   background: #fafafa;
 }
 .a_addBox {