lsc 2 gadi atpakaļ
vecāks
revīzija
97c297a71b

+ 1 - 1
dist/index.html

@@ -25,4 +25,4 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.07649c7c9c684fa737078e751c8df895.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.10e66e02479f48f0abf1.js></script><script type=text/javascript src=./static/js/app.01aa0d3a22ecc007df3f.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+    }</style><link href=./static/css/app.9f64085c7724d2e9001275d9af9e00a5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.10e66e02479f48f0abf1.js></script><script type=text/javascript src=./static/js/app.ee275f0245b04b8ae5c8.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.9f64085c7724d2e9001275d9af9e00a5.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.9f64085c7724d2e9001275d9af9e00a5.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.01aa0d3a22ecc007df3f.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.ee275f0245b04b8ae5c8.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.ee275f0245b04b8ae5c8.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.85f48b0184f614b2b8d9.js.map


+ 91 - 16
src/components/pages/liveRoom.vue

@@ -54,7 +54,11 @@
             class="video-player vjs-custom-skin"
             :playsinline="true"
             :options="playerO[0]"
-            @play="onPlayerPlay($event)"
+            @play="onPlayerPlayZ($event)"
+            @pause="onPlayerPause"
+            @ended="onPlayerEnded"
+            @playing="onPlayerPlaying"
+            @timeupdate="onPlayerTimeupdate"
             style="width: 100%; height: 100%"
           ></video-player>
         </div>
@@ -452,7 +456,7 @@
                   tools[steps].tools && tools[steps].tools.indexOf(29) != -1
                 "
                 :src="require('../../assets/icon/stuVedio.png')"
-                @click="lookvideo(w.upload)"
+                @click="lookvideo(w.upload, w.sName, w.rate, w.id)"
                 alt
               />
               <img
@@ -470,7 +474,9 @@
                 <div class="workName">{{ w.sName }}</div>
               </div>
               <div class="workRight">{{ w.time }}</div>
-              <!-- <div class="workBtn" @click="rateD(w.sName)">评价</div> -->
+              <div class="workBtn" @click="rateD(w.sName, w.rate, w.id)">
+                评价
+              </div>
             </div>
           </div>
         </div>
@@ -820,7 +826,8 @@
       >
         <div style="height: 70%; width: 100%">
           <div class="wheel">
-            <div style="height: 100%">
+            <div style="margin-bottom: 20px">{{ Sname }}</div>
+            <div>
               <video-player
                 class="video-player vjs-custom-skin"
                 :playsinline="true"
@@ -831,6 +838,9 @@
             </div>
           </div>
           <div class="nextStepBox" style="margin-top: 5%">
+            <div class="nextStepOne" @click="rateD(Sname, rateR, rateid)">
+              评价
+            </div>
             <div class="nextStepOne" @click="isBlock = 4">返回</div>
           </div>
         </div>
@@ -891,7 +901,7 @@
               <div
                 v-for="(item, index) in worksList"
                 :key="index"
-                @click="getAu(item.upload, item.sName, 2)"
+                @click="getAu(item.upload, item.sName, 2, item.rate, item.id)"
               >
                 {{ item.sName }}
               </div>
@@ -918,8 +928,9 @@
               >
                 Your browser does not support the audio element.
               </audio>
-              <!-- <el-button type="primary" @click="rateD(Sname)">评价</el-button> -->
-              
+              <el-button type="primary" @click="rateD(Sname, rateR, rateid)"
+                >评价</el-button
+              >
             </div>
           </div>
           <div class="nextStepBox" style="margin-top: 5%">
@@ -1115,7 +1126,7 @@
         </div>
       </div>
       <div slot="footer">
-        <el-button type="primary" @click="rateDialogVisible = false">确 定</el-button>
+        <el-button type="primary" @click="rateC">确 定</el-button>
         <el-button @click="rateDialogVisible = false">关 闭</el-button>
       </div>
     </el-dialog>
@@ -1311,6 +1322,8 @@ export default {
       tiankongAnswer: [],
       LuAudioUrl: "",
       workRate: 0,
+      rateR: 0,
+      rateid: "",
     };
   },
   methods: {
@@ -1517,7 +1530,7 @@ export default {
                 upload: _res[i].upload,
                 id: _res[i].id,
                 sName: _res[i].username,
-                rate:_res[i].rate,
+                rate: _res[i].rate,
                 time: _res[i].time,
               });
             }
@@ -1589,6 +1602,7 @@ export default {
           } else {
             this.videoBlock = 0;
           }
+          this.playerH("");
         })
         .catch((err) => {
           console.error(err);
@@ -1707,7 +1721,7 @@ export default {
               upload: this.worksDetail[i].upload,
               id: this.worksDetail[i].id,
               sName: this.worksDetail[i].username,
-              rate:this.worksDetail[i].rate,
+              rate: this.worksDetail[i].rate,
               time: this.worksDetail[i].time,
             });
           }
@@ -1722,10 +1736,12 @@ export default {
       this.Sname = name;
       this.isBlock = 12;
     },
-    getAu(rate, name, type) {
+    getAu(rate, name, type, rateC, id) {
       this.LuAudioUrl = rate;
       this.Sname = name;
       if (type == 2) {
+        this.rateR = rateC;
+        this.rateid = id;
         this.isBlock = 20;
       } else {
         this.isBlock = 18;
@@ -1786,7 +1802,41 @@ export default {
       this.playerOptions.sources[0].src = media;
       this.playerO = this.playerOptions;
     },
+    playerH(handle) {
+      let params = [
+        {
+          h: handle,
+          cid: this.cid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updatePPTHandle", params)
+        .then((res) => {})
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     onPlayerPlay() {},
+    onPlayerPlayZ(player) {
+      console.log(player);
+      this.playerH(JSON.stringify({ type: 1, isPlay: 1 }));
+    }, // 暂停回调
+    onPlayerPause(player) {
+      console.log(player);
+      this.playerH(JSON.stringify({ type: 1, isPlay: 2 }));
+    },
+    // 视频播放结束回调
+    onPlayerEnded(player) {
+      //console.log(player)
+    },
+    // 已开始播放回调
+    onPlayerPlaying(player) {
+      console.log(player);
+    },
+    // 当前播放位置发生变化时触发。
+    onPlayerTimeupdate(player) {
+      console.log(player);
+    },
     previewImg(url) {
       // this.$hevueImgPreview(url);
       // this.$hevueImgPreview(url);
@@ -1799,11 +1849,14 @@ export default {
       //   });
       // });
     },
-    lookvideo(u) {
+    lookvideo(u, sname, rate, id) {
       var d = JSON.parse(JSON.stringify(this.playerOptions));
       d.sources[0].src = u;
       this.playerO[0] = d;
       this.isBlock = 16;
+      this.Sname = sname;
+      this.rateR = rate;
+      this.rateid = id;
     },
     closeDraw() {
       this.bg = null;
@@ -1844,10 +1897,33 @@ export default {
         // return base64
       };
     },
-    rateD(name) {
+    rateD(name, rate, id) {
+      this.workRate = rate;
+      this.rateid = id;
       this.Sname = name;
       this.rateDialogVisible = true;
     },
+    rateC() {
+      let params = [
+        {
+          r: this.workRate,
+          id: this.rateid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updateStudentWork", params)
+        .then((res) => {
+          this.rateR = this.workRate;
+          this.workRate = 0;
+          this.rateid = "";
+          this.$message.success("评价成功");
+          this.rateDialogVisible = false;
+          this.selectSWork();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
   },
   created() {},
 };
@@ -2385,10 +2461,9 @@ img {
 }
 
 .rateD_box >>> .el-rate__icon {
-    font-size: 25px;
+  font-size: 25px;
 }
-.rateD_box >>> .el-icon-star-off{
+.rateD_box >>> .el-icon-star-off {
   font-size: 22px;
 }
-
 </style>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels