lsc 2 years ago
parent
commit
1a3629a90f
1 changed files with 108 additions and 275 deletions
  1. 108 275
      src/components/pages/liveRoom.vue

+ 108 - 275
src/components/pages/liveRoom.vue

@@ -23,17 +23,11 @@
         <div class="logoLive">
           <img src="../../assets/icon/logo.png" alt />
         </div>
-        <div style="color: #fff; line-height: 45px; padding-left: 15px">
-          introduce a festival (Final)
-        </div>
+        <div style="color: #fff; line-height: 45px; padding-left: 15px">introduce a festival (Final)</div>
       </div>
     </div>
     <div class="isNoOther">
-      <div
-        class="imgMiddle"
-        :class="isBlock > 0 ? 'imghalf' : 'imgMiddle'"
-        v-show="!full"
-      >
+      <div class="imgMiddle" :class="isBlock > 0 ? 'imghalf' : 'imgMiddle'" v-show="!full">
         <!-- <img src="../../assets/icon/kc1.png" alt /> -->
         <!-- <iframe
           style="width: 100%; height: 100%; border: none"
@@ -45,11 +39,7 @@
           :getPage="getPage"
           @getWidth="getWidth"
         ></pdf>
-        <div
-          class="workd_media"
-          v-if="videoBlock == 9"
-          :style="{ width: Vwidth }"
-        >
+        <div class="workd_media" v-if="videoBlock == 9" :style="{ width: Vwidth }">
           <video-player
             class="video-player vjs-custom-skin"
             :playsinline="true"
@@ -70,14 +60,8 @@
         "
         v-if="isBlock == 1 || isBlock == 6"
       >
-        <div
-          style="background: #fff; height: 92%; width: 96%; margin: 10px auto"
-        >
-          <div
-            style="color: #bfbfbf; padding: 15px 0 20px 25px; font-size: 20px"
-          >
-            答题查看
-          </div>
+        <div style="background: #fff; height: 92%; width: 96%; margin: 10px auto">
+          <div style="color: #bfbfbf; padding: 15px 0 20px 25px; font-size: 20px">答题查看</div>
           <div class="answerBox" v-if="isBlock == 1 || isBlock == 6">
             <div class="memberBox" v-if="isBlock == 1">
               <div
@@ -85,9 +69,7 @@
                 v-for="(item, index) in studentArray"
                 @click="getOAnswer(item.answer, item.name)"
                 :key="index"
-              >
-                {{ item.name }}
-              </div>
+              >{{ item.name }}</div>
             </div>
             <div class="memberBox" v-if="isBlock == 6">
               <div
@@ -96,9 +78,7 @@
                 v-for="(item, index) in studentArray2"
                 :key="index"
                 @click="whoAnswer(item, index)"
-              >
-                {{ item.name }}
-              </div>
+              >{{ item.name }}</div>
               <div v-if="studentArray2.length == 0">暂无学生</div>
             </div>
             <!-- <div style="color: #948bdc; padding-top: 15px" v-if="isBlock == 1">
@@ -112,9 +92,7 @@
                 tools[steps].tools &&
                 tools[steps].tools.indexOf(9) != -1
               "
-            >
-              查看数据统计
-            </div>
+            >查看数据统计</div>
             <div
               class="viewSta"
               @click="isBlock = 14"
@@ -123,14 +101,8 @@
                 tools[steps].tools &&
                 tools[steps].tools.indexOf(27) != -1
               "
-            >
-              查看所有学生答题情况
-            </div>
-            <span
-              slot="footer"
-              class="dialog-footer sztFooter"
-              v-if="isBlock == 6"
-            >
+            >查看所有学生答题情况</div>
+            <span slot="footer" class="dialog-footer sztFooter" v-if="isBlock == 6">
               <el-button type="primary" @click="isBlock = 0">结束</el-button>
               <!-- <el-button type="primary" @click="isBlock = 2">返回</el-button> -->
             </span>
@@ -176,11 +148,7 @@
           </span>
         </div>
       </div>
-      <div
-        class="answerBox tools_box"
-        v-if="isBlock == 2"
-        style="padding: 10px 0 0 25px"
-      >
+      <div class="answerBox tools_box" v-if="isBlock == 2" style="padding: 10px 0 0 25px">
         <div style="color: #d1d1d1; font-size: 24px">课堂实践</div>
         <div
           style="
@@ -190,9 +158,7 @@
             text-align: center;
             padding-bottom: 3px;
           "
-        >
-          选择工具
-        </div>
+        >选择工具</div>
         <div
           style="
             display: flex;
@@ -263,10 +229,7 @@
               <div>思维网格</div>
             </div>
           </div>
-          <div
-            v-if="tools[steps].tools && tools[steps].tools.indexOf(10) != -1"
-            class="toolCss"
-          >
+          <div v-if="tools[steps].tools && tools[steps].tools.indexOf(10) != -1" class="toolCss">
             <div class="toolImg" @click="timeDialogVisible = true">
               <img src="../../assets/icon/thirdToolList/time.png" alt />
               <div>倒计时</div>
@@ -277,32 +240,20 @@
           <div class="nextStepOne" @click="isBlock = 0">关闭</div>
         </div>
       </div>
-      <div
-        class="answerBox tools_box"
-        :class="{ fullStyle: full }"
-        v-if="isBlock == 5"
-      >
+      <div class="answerBox tools_box" :class="{ fullStyle: full }" v-if="isBlock == 5">
         <div style="height: 100%; width: 100%">
           <div v-if="toolCount == 1" class="tools_child_box">
             <div class="tools_title">
               <span>电子白板</span>
               <div>
-                <img
-                  src="../../assets/full.png"
-                  class="full"
-                  @click="fullTools"
-                />
-                <img
-                  src="../../assets/close1.png"
-                  class="closeImg"
-                  @click="closeTools"
-                />
+                <img src="../../assets/full.png" class="full" @click="fullTools" />
+                <img src="../../assets/close1.png" class="closeImg" @click="closeTools" />
               </div>
             </div>
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               src="https://iwb.cocorobo.cn/"
             ></iframe>
@@ -311,22 +262,14 @@
             <div class="tools_title">
               <span>思维导图</span>
               <div>
-                <img
-                  src="../../assets/full.png"
-                  class="full"
-                  @click="fullTools"
-                />
-                <img
-                  src="../../assets/close1.png"
-                  class="closeImg"
-                  @click="closeTools"
-                />
+                <img src="../../assets/full.png" class="full" @click="fullTools" />
+                <img src="../../assets/close1.png" class="closeImg" @click="closeTools" />
               </div>
             </div>
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               src="//cloud.cocorobo.cn/mind/"
             ></iframe>
@@ -335,22 +278,14 @@
             <div class="tools_title">
               <span>翻译</span>
               <div>
-                <img
-                  src="../../assets/full.png"
-                  class="full"
-                  @click="fullTools"
-                />
-                <img
-                  src="../../assets/close1.png"
-                  class="closeImg"
-                  @click="closeTools"
-                />
+                <img src="../../assets/full.png" class="full" @click="fullTools" />
+                <img src="../../assets/close1.png" class="closeImg" @click="closeTools" />
               </div>
             </div>
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               src="//dict.youdao.com/"
             ></iframe>
@@ -359,22 +294,14 @@
             <div class="tools_title">
               <span>协同文档</span>
               <div>
-                <img
-                  src="../../assets/full.png"
-                  class="full"
-                  @click="fullTools"
-                />
-                <img
-                  src="../../assets/close1.png"
-                  class="closeImg"
-                  @click="closeTools"
-                />
+                <img src="../../assets/full.png" class="full" @click="fullTools" />
+                <img src="../../assets/close1.png" class="closeImg" @click="closeTools" />
               </div>
             </div>
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               src="https://cloud.cocorobo.cn/Office/Word/WordEditArea.htm"
             ></iframe>
@@ -383,30 +310,20 @@
             <div class="tools_title">
               <span>思维网格</span>
               <div>
-                <img
-                  src="../../assets/full.png"
-                  class="full"
-                  @click="fullTools"
-                />
-                <img
-                  src="../../assets/close1.png"
-                  class="closeImg"
-                  @click="closeTools"
-                />
+                <img src="../../assets/full.png" class="full" @click="fullTools" />
+                <img src="../../assets/close1.png" class="closeImg" @click="closeTools" />
               </div>
             </div>
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
             ></iframe>
           </div>
           <div class="nextStepBox">
-            <div class="nextStepOne" @click="(isBlock = 2), (full = false)">
-              返回
-            </div>
+            <div class="nextStepOne" @click="(isBlock = 2), (full = false)">返回</div>
           </div>
         </div>
       </div>
@@ -431,9 +348,7 @@
             height: 25px;
             line-height: 25px;
           "
-        >
-          查看作业
-        </div>
+        >查看作业</div>
         <div class="workBox">
           <div class="works" v-for="(w, wIndex) in worksList" :key="wIndex">
             <div class="workImg">
@@ -480,9 +395,7 @@
           margin: 10px 15px;
         "
       >
-        <div style="color: #bfbfbf; padding: 15px 0 15px 0; font-size: 20px">
-          课堂评价
-        </div>
+        <div style="color: #bfbfbf; padding: 15px 0 15px 0; font-size: 20px">课堂评价</div>
         <div>
           <div class="score_box">
             <span>自我评价</span>
@@ -519,11 +432,7 @@
         </span>
       </div>
 
-      <div
-        class="answerBox tools_box"
-        v-if="isBlock == 8"
-        style="padding: 10px 0 0 25px"
-      >
+      <div class="answerBox tools_box" v-if="isBlock == 8" style="padding: 10px 0 0 25px">
         <div style="color: #d1d1d1; font-size: 24px">课堂实践</div>
         <div
           style="
@@ -533,9 +442,7 @@
             text-align: center;
             padding-bottom: 3px;
           "
-        >
-          选择附件
-        </div>
+        >选择附件</div>
         <div
           style="
             display: flex;
@@ -546,35 +453,20 @@
             align-items: center;
           "
         >
-          <div
-            v-if="tools[steps].file && tools[steps].file.length"
-            class="fileBox"
-          >
-            <div
-              class="fileListCss"
-              v-for="(v, vIndex) in videoList"
-              :key="vIndex"
-            >
+          <div v-if="tools[steps].file && tools[steps].file.length" class="fileBox">
+            <div class="fileListCss" v-for="(v, vIndex) in videoList" :key="vIndex">
               <div class="fileCss" @click="playVideo(v.src, vIndex)">
                 <img src="../../assets/uploadMp4.png" alt />
               </div>
               <div>{{ v.name }}</div>
             </div>
-            <div
-              class="fileListCss"
-              v-for="(v, vIndex) in videoList2"
-              :key="vIndex"
-            >
+            <div class="fileListCss" v-for="(v, vIndex) in videoList2" :key="vIndex">
               <div class="fileCss" @click="playVideo2(v.src, vIndex)">
                 <img src="../../assets/uploadMp4.png" alt />
               </div>
               <div>{{ v.name }}</div>
             </div>
-            <div
-              class="fileListCss"
-              v-for="(f, fIndex) in fileList"
-              :key="fIndex"
-            >
+            <div class="fileListCss" v-for="(f, fIndex) in fileList" :key="fIndex">
               <div class="fileCss" @click="openFile(f.src)">
                 <img src="../../assets/file.png" alt />
               </div>
@@ -603,22 +495,15 @@
             <div class="nextStepOne" @click="isBlock = 8">返回</div>
           </div>
         </div>
-      </div> -->
+      </div>-->
 
-      <div
-        class="answerBox tools_box"
-        :class="{ fullStyle: full }"
-        v-if="isBlock == 10"
-      >
+      <div class="answerBox tools_box" :class="{ fullStyle: full }" v-if="isBlock == 10">
         <div style="height: 70%; width: 100%">
-          <div
-            class="wheel"
-            style="height: 520px; width: 100%; margin: 0 0 20px 30px"
-          >
+          <div class="wheel" style="height: 520px; width: 100%; margin: 0 0 20px 30px">
             <iframe
-              webkitallowfullscreen=""
-              mozallowfullscreen=""
-              allowfullscreen=""
+              webkitallowfullscreen
+              mozallowfullscreen
+              allowfullscreen
               style="width: 100%; height: 100%; border: none"
               :src="pptImgUrl"
             ></iframe>
@@ -631,18 +516,12 @@
       <div class="answerBox tools_box" v-if="isBlock == 11">
         <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 class="memberBox" style="max-height: 100%" v-if="worksList.length">
               <div
                 v-for="(item, index) in worksList"
                 :key="index"
                 @click="getEv(item.upload, item.sName)"
-              >
-                {{ item.sName }}
-              </div>
+              >{{ item.sName }}</div>
             </div>
             <div v-else>暂无学生评价</div>
           </div>
@@ -690,14 +569,8 @@
                 "
               >
                 <div v-for="(tk, tIndex) in 7" :key="tIndex" class="tkCss">
-                  <div style="margin-right: 10px; font-size: 18px">
-                    {{ tIndex + 1 }}、
-                  </div>
-                  <el-select
-                    v-model="tkAnswer[tIndex]"
-                    placeholder="请选择答案"
-                    disabled
-                  >
+                  <div style="margin-right: 10px; font-size: 18px">{{ tIndex + 1 }}、</div>
+                  <el-select v-model="tkAnswer[tIndex]" placeholder="请选择答案" disabled>
                     <el-option
                       v-for="(tkA, tkAIndex) in tkAnswerBox"
                       :key="tkAIndex"
@@ -707,30 +580,18 @@
                   </el-select>
                 </div>
               </div>
-              <div
-                v-if="tools[steps].tools && tools[steps].tools.indexOf(9) != -1"
-              >
+              <div v-if="tools[steps].tools && tools[steps].tools.indexOf(9) != -1">
                 <div class="choose_style">
-                  <span :class="tkAnswer.indexOf(1) != -1 ? 'isChoose' : ''"
-                    >A</span
-                  >
-                  <span :class="tkAnswer.indexOf(2) != -1 ? 'isChoose' : ''"
-                    >B</span
-                  >
-                  <span :class="tkAnswer.indexOf(3) != -1 ? 'isChoose' : ''"
-                    >C</span
-                  >
-                  <span :class="tkAnswer.indexOf(4) != -1 ? 'isChoose' : ''"
-                    >D</span
-                  >
+                  <span :class="tkAnswer.indexOf(1) != -1 ? 'isChoose' : ''">A</span>
+                  <span :class="tkAnswer.indexOf(2) != -1 ? 'isChoose' : ''">B</span>
+                  <span :class="tkAnswer.indexOf(3) != -1 ? 'isChoose' : ''">C</span>
+                  <span :class="tkAnswer.indexOf(4) != -1 ? 'isChoose' : ''">D</span>
                 </div>
               </div>
             </div>
           </div>
           <div class="nextStepBox" style="margin-top: 5%">
-            <div class="nextStepOne" @click="selectStudentByScoolPPt(1)">
-              返回
-            </div>
+            <div class="nextStepOne" @click="selectStudentByScoolPPt(1)">返回</div>
           </div>
         </div>
       </div>
@@ -738,24 +599,17 @@
         <div style="height: 100%; width: 100%">
           <div class="wheel" style="height: 80%; width: 100%">
             <div style="height: 100%; overflow: auto">
-              <div
-                v-for="(item, index) in worksList"
-                :key="index"
-                class="fill_box"
-              >
+              <div v-for="(item, index) in worksList" :key="index" class="fill_box">
                 <span>{{ index + 1 }}、{{ item.sName }}</span>
                 <span
                   v-for="(item, index) in JSON.parse(item.upload)"
                   :key="index"
-                  >{{ index + 1 }}、{{ item }}</span
-                >
+                >{{ index + 1 }}、{{ item }}</span>
               </div>
             </div>
           </div>
           <div class="nextStepBox" style="margin-top: 5%">
-            <div class="nextStepOne" @click="selectStudentByScoolPPt(1)">
-              返回
-            </div>
+            <div class="nextStepOne" @click="selectStudentByScoolPPt(1)">返回</div>
           </div>
         </div>
       </div>
@@ -768,9 +622,7 @@
                 :src="audioUrl"
                 controls="controls"
                 ref="audio"
-              >
-                Your browser does not support the audio element.
-              </audio>
+              >Your browser does not support the audio element.</audio>
             </div>
           </div>
           <div class="nextStepBox" style="margin-top: 5%">
@@ -778,11 +630,7 @@
           </div>
         </div>
       </div>
-      <div
-        class="answerBox tools_box"
-        :class="{ fullStyle: full }"
-        v-if="isBlock == 16"
-      >
+      <div class="answerBox tools_box" :class="{ fullStyle: full }" v-if="isBlock == 16">
         <div style="height: 70%; width: 100%">
           <div class="wheel">
             <div class="workd_media" style="height: 100%">
@@ -811,9 +659,7 @@
             (tools[steps].tools && tools[steps].tools.indexOf(9) != -1) ||
             (tools[steps].tools && tools[steps].tools.indexOf(27) != -1)
           "
-        >
-          查看学生答题情况
-        </div>
+        >查看学生答题情况</div>
         <div
           class="blackButton"
           @click="isBlock = 2"
@@ -825,16 +671,12 @@
             (tools[steps].tools && tools[steps].tools.indexOf(10) != -1) ||
             (tools[steps].tools && tools[steps].tools.indexOf(13) != -1)
           "
-        >
-          查看工具
-        </div>
+        >查看工具</div>
         <div
           class="blackButton"
           @click="selectStudentByScoolPPt(2)"
           v-if="tools[steps].tools && tools[steps].tools.indexOf(12) != -1"
-        >
-          选择学生回答
-        </div>
+        >选择学生回答</div>
         <div
           class="blackButton"
           @click="selectSWork2(4)"
@@ -848,21 +690,17 @@
             (tools[steps].tools && tools[steps].tools.indexOf(29) != -1) ||
             (tools[steps].tools && tools[steps].tools.indexOf(13) != -1)
           "
-        >
-          查看作业
-        </div>
+        >查看作业</div>
         <div
           class="blackButton"
           @click="selectSWork2(6)"
           v-if="tools[steps].tools && tools[steps].tools.indexOf(14) != -1"
-        >
-          查看评价
-        </div>
+        >查看评价</div>
         <!-- <div
           class="blackButton"
           @click="selectFile"
           v-if="tools[steps].file && tools[steps].file.length"
-        >查看附件</div> -->
+        >查看附件</div>-->
       </div>
     </div>
     <el-dialog
@@ -873,9 +711,9 @@
       :before-close="handleClose"
       class="dialog_diy"
     >
-      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
-        是否让“{{ answerStudent.name }}”同学进行单独答题?
-      </div>
+      <div
+        style="text-align: center; padding: 20px 0 50px 0; font-size: 18px"
+      >是否让“{{ answerStudent.name }}”同学进行单独答题?</div>
       <div
         style="
           width: 200px;
@@ -889,9 +727,7 @@
           cursor: pointer;
         "
         @click="pick"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisible1"
@@ -900,9 +736,7 @@
       :before-close="handleClose"
       class="dialog_diy"
     >
-      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
-        正在开发中!
-      </div>
+      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">正在开发中!</div>
       <div
         style="
           width: 200px;
@@ -916,9 +750,7 @@
           cursor: pointer;
         "
         @click="dialogVisible1 = false"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisible2"
@@ -927,9 +759,7 @@
       :before-close="handleClose"
       class="dialog_diy"
     >
-      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
-        课程结束后才有报告!
-      </div>
+      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">课程结束后才有报告!</div>
       <div
         style="
           width: 200px;
@@ -943,9 +773,7 @@
           cursor: pointer;
         "
         @click="dialogVisible2 = false"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
     <el-dialog
       title="倒计时"
@@ -1033,7 +861,8 @@ export default {
           file: [
             {
               name: "视频1.mp4",
-              src: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9311661413782505.mp4",
+              src:
+                "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9311661413782505.mp4",
             },
           ],
         },
@@ -1044,12 +873,24 @@ export default {
         { tools: [9] },
         { tools: [9] },
         { tools: [12] },
-        { tools: [27] },
+        {
+          tools: [27],
+          answer: [
+            "Feelings",
+            "Weather",
+            "Activities before the festival",
+            "Origin",
+            "Food",
+            "Time",
+            "ctivities during the festival",
+          ],
+        },
         {
           file: [
             {
               name: "视频2.mp4",
-              src: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9321661413797366.mp4",
+              src:
+                "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%AA%92%E4%BD%9321661413797366.mp4",
             },
           ],
         },
@@ -1151,14 +992,13 @@ export default {
     },
     //uuid生成
     guid() {
-      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
-        /[xy]/g,
-        function (c) {
-          var r = (Math.random() * 16) | 0,
-            v = c == "x" ? r : (r & 0x3) | 0x8;
-          return v.toString(16);
-        }
-      );
+      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (
+        c
+      ) {
+        var r = (Math.random() * 16) | 0,
+          v = c == "x" ? r : (r & 0x3) | 0x8;
+        return v.toString(16);
+      });
     },
     time() {
       if (!this.now) {
@@ -1320,12 +1160,6 @@ export default {
     },
     getWidth(total) {
       this.Vwidth = total;
-      if (this.videoBlock == 9) {
-        this.videoBlock = 0;
-        setTimeout(() => {
-          this.videoBlock = 9;
-        }, 1000);
-      }
     },
     getPage(page) {
       console.log(page);
@@ -1395,7 +1229,7 @@ export default {
           }
         })
         .catch((err) => {
-          this.$message.error("查询失败");
+          // this.$message.error("查询失败");
           console.error(err);
         });
     },
@@ -1458,7 +1292,7 @@ export default {
           }
         })
         .catch((err) => {
-          this.$message.error("查询失败");
+          // this.$message.error("查询失败");
           console.error(err);
         });
     },
@@ -2088,5 +1922,4 @@ img {
   left: 50%;
   transform: translateX(-50%);
 }
-
 </style>