浏览代码

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table

zengyicheng 2 年之前
父节点
当前提交
314d06bd7b
共有 1 个文件被更改,包括 63 次插入1 次删除
  1. 63 1
      src/components/pages/liveRoom.vue

+ 63 - 1
src/components/pages/liveRoom.vue

@@ -813,6 +813,49 @@
           </div>
         </div>
       </div>
+      <div class="answerBox tools_box" v-if="isBlock == 17">
+        <div style="height: 100%; width: 100%">
+          <div class="wheel" style="height: 80%; width: 100%">
+            <div
+              class="memberBox"
+              style="max-height: 100%"
+              v-if="worksList.length"
+            >
+              <div
+                v-for="(item, index) in worksList"
+                :key="index"
+                @click="getAu(item.upload, item.sName)"
+              >
+                {{ item.sName }}
+              </div>
+            </div>
+            <div v-else>暂无学生提交</div>
+          </div>
+          <div class="nextStepBox" style="margin-top: 5%">
+            <div class="nextStepOne" @click="isBlock = 0">关闭</div>
+          </div>
+        </div>
+      </div>
+      <div class="answerBox tools_box" v-if="isBlock == 18">
+        <div style="height: 100%; width: 100%">
+          <div class="wheel" style="height: 80%; width: 100%">
+            <div style="height: 100%; overflow: auto">
+              <div style="margin-bottom: 20px">{{ Sname }}</div>
+              <audio
+                style="margin: 0 auto; display: block"
+                :src="LuAudioUrl"
+                controls="controls"
+                ref="audio"
+              >
+                Your browser does not support the audio element.
+              </audio>
+            </div>
+          </div>
+          <div class="nextStepBox" style="margin-top: 5%">
+            <div class="nextStepOne" @click="isBlock = 17">返回</div>
+          </div>
+        </div>
+      </div>
     </div>
 
     <div class="blackBottomB">
@@ -871,6 +914,13 @@
         >
           查看评价
         </div>
+        <div
+          class="blackButton"
+          @click="selectSWork2(8)"
+          v-if="tools[steps].tools && tools[steps].tools.indexOf(30) != -1"
+        >
+          查看作业
+        </div>
         <!-- <div
           class="blackButton"
           @click="selectFile"
@@ -1040,7 +1090,7 @@ export default {
       //   ],
       // }
       tools: [
-        "",
+        {tools:[30]},
         //  {
         //   file: [
         //     {
@@ -1159,6 +1209,7 @@ export default {
       videoBlock: 0,
       Vwidth: 0,
       tiankongAnswer: [],
+      LuAudioUrl:""
     };
   },
   methods: {
@@ -1278,6 +1329,8 @@ export default {
           _type = 6;
         } else if (this.tools[this.steps].tools.indexOf(29) != -1) {
           _type = 7;
+        } else if (this.tools[this.steps].tools.indexOf(30) != -1) {
+          _type = 8;
         }
       }
       let params = {
@@ -1471,6 +1524,8 @@ export default {
       }, 5000);
       if (_type == 4) {
         this.isBlock = 4;
+      }else if(_type == 8){
+        this.isBlock = 17;
       } else {
         this.isBlock = 11;
       }
@@ -1496,6 +1551,8 @@ export default {
           _type = 6;
         } else if (this.tools[this.steps].tools.indexOf(29) != -1) {
           _type = 7;
+        } else if (this.tools[this.steps].tools.indexOf(30) != -1) {
+          _type = 8;
         }
       }
       this.worksList = [];
@@ -1527,6 +1584,11 @@ export default {
       this.Sname = name;
       this.isBlock = 12;
     },
+    getAu(rate, name) {
+      this.LuAudioUrl = rate;
+      this.Sname = name;
+      this.isBlock = 18;
+    },
     selectFile() {
       this.fileList = [];
       this.videoList = [];