lsc há 3 anos atrás
pai
commit
d6ec5ad3ea
2 ficheiros alterados com 80 adições e 98 exclusões
  1. 5 0
      src/components/pages/components/pdf.vue
  2. 75 98
      src/components/pages/liveRoom.vue

+ 5 - 0
src/components/pages/components/pdf.vue

@@ -45,6 +45,9 @@ export default {
       default:
         "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0629%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656920880446.pdf",
     },
+    getPage:{
+        type:Function
+    }
   },
   components: {
     pdf,
@@ -156,12 +159,14 @@ export default {
       var p = this.pageNum;
       p = p > 1 ? p - 1 : this.pageTotalNum;
       this.pageNum = p;
+      this.getPage(p)
     },
     // 切换下一页
     nextPage() {
       var p = this.pageNum;
       p = p < this.pageTotalNum ? p + 1 : 1;
       this.pageNum = p;
+      this.getPage(p)
     },
     // 顺时针选中角度
     clock() {

+ 75 - 98
src/components/pages/liveRoom.vue

@@ -15,22 +15,17 @@
         <div class="logoLive">
           <img src="../../assets/icon/logo.png" alt />
         </div>
-        <div style="color: #fff; line-height: 45px; padding-left: 15px">
-          湖心亭看雪可可乐博模拟展示课件
-        </div>
+        <div style="color: #fff; line-height: 45px; padding-left: 15px">湖心亭看雪可可乐博模拟展示课件</div>
       </div>
     </div>
     <div class="isNoOther">
-      <div
-        class="imgMiddle"
-        :class="type !== 0 || steps > 0 ? 'imghalf' : 'imgMiddle'"
-      >
+      <div class="imgMiddle" :class="type !== 0 || steps > 0 ? 'imghalf' : 'imgMiddle'">
         <!-- <img src="../../assets/icon/kc1.png" alt /> -->
         <!-- <iframe
           style="width: 100%; height: 100%; border: none"
           src="https://view.officeapps.live.com/op/view.aspx?src=https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0701%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656644341323.pptx"
-        ></iframe> -->
-        <pdf :pdfUrl="pdfUrl" style="width: 100%; height: 100%;"></pdf>
+        ></iframe>-->
+        <pdf :pdfUrl="pdfUrl" style="width: 100%; height: 100%;" :getPage="getPage"></pdf>
       </div>
       <div
         v-if="type == 1 || type == 2"
@@ -43,14 +38,8 @@
           padding: 0px 0 50px;
         "
       >
-        <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="type == 1">
             <div class="answerTimuBox" v-for="item in 1" :key="item">
@@ -63,9 +52,7 @@
                 <span>C</span>
                 <span>D</span>
               </div>
-              <el-button style="margin: 0 auto" @click="showMember(item)"
-                >开始答题</el-button
-              >
+              <el-button style="margin: 0 auto" @click="showMember(item)">开始答题</el-button>
             </div>
           </div>
           <div class="answerBox" v-else>
@@ -74,9 +61,7 @@
                 :class="{ pAnswer: item.is == 2 }"
                 v-for="(item, index) in studentArray"
                 :key="index"
-              >
-                {{ item.name }}
-              </div>
+              >{{ item.name }}</div>
             </div>
             <div class="memberBox" v-else>
               <div
@@ -84,19 +69,10 @@
                 v-for="(item, index) in studentArray2"
                 :key="index"
                 @click="whoAnswer(item, index)"
-              >
-                {{ item.name }}
-              </div>
-            </div>
-            <div
-              style="color: #948bdc; padding-top: 15px"
-              v-if="answerType == 1"
-            >
-              正在答题......
-            </div>
-            <div class="viewSta" @click="lookData" v-if="answerType == 1">
-              查看数据统计
+              >{{ item.name }}</div>
             </div>
+            <div style="color: #948bdc; padding-top: 15px" v-if="answerType == 1">正在答题......</div>
+            <div class="viewSta" @click="lookData" v-if="answerType == 1">查看数据统计</div>
           </div>
         </div>
       </div>
@@ -120,7 +96,7 @@
           "
         >
           <div class="close" @click="(steps = 0), (type = 0)">
-            <img src="../../assets/icon/close.png" alt="" />
+            <img src="../../assets/icon/close.png" alt />
           </div>
           <div style="color: #bfbfbf; padding: 15px 0 20px 25px">数据统计</div>
           <div style="padding-left: 25px">
@@ -163,7 +139,7 @@
           "
         >
           选择工具
-        </div> -->
+        </div>-->
         <div v-if="toolCount == 0" style="height: 90%">
           <iframe
             style="width: 100%; height: 100%; border: none"
@@ -171,10 +147,7 @@
           ></iframe>
         </div>
         <div v-if="toolCount == 1" style="height: 90%">
-          <iframe
-            style="width: 100%; height: 100%; border: none"
-            src="https://iwb.cocorobo.cn/"
-          ></iframe>
+          <iframe style="width: 100%; height: 100%; border: none" src="https://iwb.cocorobo.cn/"></iframe>
         </div>
         <div v-if="toolCount == 2" style="height: 90%">
           <iframe
@@ -188,14 +161,15 @@
       <div
         class="answerBox"
         style="
-          width: 62.5%;
+          width: 38.5%;
+          max-width: 38.5%;
           overflow: auto;
           background: rgb(255, 255, 255);
           height: 91.5%;
           position: relative;
           margin: 10px 15px;
         "
-        v-if="workSteps == 1"
+        v-if="steps == 2"
       >
         <div
           style="
@@ -205,16 +179,16 @@
             height: 25px;
             line-height: 25px;
           "
-        >
-          查看作业
-        </div>
+        >查看作业</div>
         <div class="workBox">
           <div class="works" v-for="w in 3" :key="w">
-            <div class="workImg"><img :src="mr" alt="" /></div>
+            <div class="workImg">
+              <img :src="mr" alt />
+            </div>
             <div class="workDetail">
               <div class="workLeft">
                 <div class="workTx">
-                  <img src="../../assets/avatar.png" alt="" />
+                  <img src="../../assets/avatar.png" alt />
                 </div>
                 <div class="workName">约翰强尼</div>
               </div>
@@ -222,31 +196,16 @@
             </div>
           </div>
         </div>
-        <div
-          class="returnButton"
-          @click="(workSteps = 0), (steps = 0), (type = 0)"
-        >
-          返回
-        </div>
+        <div class="returnButton" @click=" (steps = 0), (type = 0)">返回</div>
       </div>
     </div>
 
     <div class="blackBottomB">
       <div style="display: flex">
         <div class="blackButton" @click="answerWork">开始答题</div>
-        <div
-          class="blackButton"
-          @click="(steps = 1), (type = 0), (workSteps = 0)"
-        >
-          查看工具
-        </div>
+        <div class="blackButton" @click="(steps = 1), (type = 0)">查看工具</div>
         <div class="blackButton" @click="checkStudentAnswer">选择学生回答</div>
-        <div
-          class="blackButton"
-          @click="(workSteps = 1), (steps = 0), (type = 0)"
-        >
-          查看作业
-        </div>
+        <div class="blackButton" @click=" (steps = 2), (type = 0)">查看作业</div>
       </div>
       <!-- <div
         class="blackButton"
@@ -254,7 +213,7 @@
         @click="dialogVisible2 = true"
       >
         查看报告
-      </div> -->
+      </div>-->
     </div>
     <el-dialog
       title="选择答题"
@@ -264,9 +223,9 @@
       :before-close="handleClose"
       class="dialog_diy"
     >
-      <div style="text-align: center; padding: 20px 0 50px 0; font-size: 18px">
-        是否让“{{ answerStudent }}”同学进行单独答题?
-      </div>
+      <div
+        style="text-align: center; padding: 20px 0 50px 0; font-size: 18px"
+      >是否让“{{ answerStudent }}”同学进行单独答题?</div>
       <div
         style="
           width: 200px;
@@ -280,9 +239,7 @@
           cursor: pointer;
         "
         @click="dialogVisible = false"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisible1"
@@ -291,9 +248,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;
@@ -307,9 +262,7 @@
           cursor: pointer;
         "
         @click="dialogVisible1 = false"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisible2"
@@ -318,9 +271,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;
@@ -334,9 +285,7 @@
           cursor: pointer;
         "
         @click="dialogVisible2 = false"
-      >
-        确定
-      </div>
+      >确定</div>
     </el-dialog>
   </div>
 </template>
@@ -347,10 +296,11 @@ import EditorBar from "../../components/tools/wangEnduit";
 import AnswerData from "./components/answerData";
 import pdf from "./components/pdf";
 export default {
-  components: { EditorBar, AnswerData,pdf },
+  components: { EditorBar, AnswerData, pdf },
   data() {
     return {
-      pdfUrl:"https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0629%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656920880446.pdf",
+      pdfUrl:
+        "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0629%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656920880446.pdf",
       isLoading: false,
       formLabelWidth: "100px",
       userid: this.$route.query.userid,
@@ -367,7 +317,6 @@ export default {
       dialogVisible1: false,
       dialogVisible2: false,
       toolCount: 0,
-      workSteps: 0,
       answerBox: "",
       answer: [
         { name: "A.1568" },
@@ -427,6 +376,21 @@ export default {
         D: 0,
       },
       answerStudent: "",
+      tools: [
+        "",
+        "",
+        { tools: [""] }, //选择题
+        { tools: [""] }, //倒计时
+        { tools: [""] }, //问答题
+        { tools: [""] }, //问答题
+        { tools: [""] }, //思维导图/电子白板
+        { tools: [""] }, //选人回答
+        { tools: [""] }, //倒计时、分小组
+        { tools: [""] }, //思维导图/电子白板/思维网格
+        { tools: [""] }, //查看作业
+        { tools: [""] }, //查看作业
+        "", //查看作业
+      ],
     };
   },
   methods: {
@@ -456,14 +420,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) {
@@ -512,7 +475,6 @@ export default {
     },
     answerWork() {
       this.type = 1;
-      this.workSteps = 0;
       this.answerType = 1;
       this.steps = 0;
     },
@@ -522,7 +484,6 @@ export default {
       }
       this.steps = 0;
       this.type = 2;
-      this.workSteps = 0;
       this.answerType = 2;
     },
     showMember(i) {
@@ -574,6 +535,22 @@ export default {
     lookData() {
       this.type = 3;
     },
+    getPage(page) {
+      console.log(page);
+      let params = [
+        {
+          page: page,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updatePptPage", params)
+        .then((res) => {
+          
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
   },
   created() {},
 };