zengyicheng 2 years ago
parent
commit
d04e655b7c
1 changed files with 216 additions and 50 deletions
  1. 216 50
      src/components/liveProjectDetail.vue

+ 216 - 50
src/components/liveProjectDetail.vue

@@ -25,15 +25,15 @@
           湖心亭看雪可可乐博模拟展示课件
         </div>
       </div>
-      <div
+      <!-- <div
         style="display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center"
       >
         <div class="blackButton" @click="answerWork" v-if="steps == 0">下一步</div>
         <div class="blackButton" @click="steps = 3" v-if="steps != 3">提交作业</div>
-      </div>
+      </div> -->
     </div>
     <div class="isNoOther">
-      <div class="imgMiddle" :class="steps > 0 ? 'imghalf' : 'imgMiddle'">
+      <div class="imgMiddle" :class="isBlock > 0 ? 'imghalf' : 'imgMiddle'">
         <!-- <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"
@@ -46,7 +46,6 @@
         ></pdf>
       </div>
       <div
-        v-if="steps > 0 && steps < 3"
         style="
           background: #d0d6e4;
           width: 40%;
@@ -54,6 +53,7 @@
           max-width: 40%;
           overflow: auto;
         "
+        v-if="isBlock > 0"
       >
         <div
           style="
@@ -63,14 +63,12 @@
             height: 96%;
             position: relative;
           "
-          v-if="steps < 3"
         >
-          <div
+          <!-- <div
             style="color: #bfbfbf; padding: 15px 0 20px 25px; font-size: 20px"
-            v-if="steps != 2"
           >
             课堂实践
-          </div>
+          </div> -->
           <div
             style="
               margin-left: 25px;
@@ -79,7 +77,7 @@
               padding-bottom: 3px;
               text-align: center;
             "
-            v-if="steps == 1"
+            v-if="isBlock == 1"
           >
             开始答题
           </div>
@@ -95,7 +93,7 @@
           >
             选择工具
           </div>-->
-          <div class="answerBox" v-if="steps == 1">
+          <div class="answerBox" v-if="isBlock == 1">
             <!-- <div>
               <span class="timuButton">题目</span>
               <span style="letter-spacing: 3px; line-height: 35px"
@@ -111,7 +109,7 @@
               <el-button type="primary" @click="answerQue">确定</el-button>
             </span>
             <div class="nextStepOne" @click="answerWork">下一步</div>-->
-            <div class="answerBox" v-if="steps == 1">
+            <div class="answerBox">
               <div
                 style="
                   display: flex;
@@ -154,8 +152,128 @@
               </div>
             </div>
           </div>
-          <div class="answerBox" v-if="steps == 2" style="height: 90%">
-            <div v-if="toolCount == 0" style="height: 100%">
+          <div class="answerBox" style="height: 90%" v-if="isBlock == 2">
+            <div
+              v-if="toolsList[0].tools.length == 1"
+              style="height: 100%; width: 100%"
+            >
+              <div
+                v-if="toolsList[0].tools[0] == 9"
+                style="height: 90%; width: 100%"
+              >
+                选择题
+              </div>
+              <div
+                v-if="toolsList[0].tools[0] == 10"
+                style="height: 90%; width: 100%"
+              >
+                倒计时
+              </div>
+              <div
+                v-if="toolsList[0].tools[0] == 11"
+                style="height: 90%; width: 100%"
+              >
+                问答题
+              </div>
+              <div
+                v-if="toolsList[0].tools[0] == 12"
+                style="height: 90%; width: 100%"
+              >
+                选人回答
+              </div>
+              <div
+                v-if="toolsList[0].tools[0] == 13"
+                style="height: 90%; width: 100%"
+              >
+                分小组
+              </div>
+              <div
+                v-if="toolsList[0].tools[0] == 14"
+                style="height: 90%; width: 100%"
+              >
+                作业评价
+              </div>
+              <div class="nextStepOne" @click="isBlock = 0">关闭</div>
+            </div>
+            <div v-else style="height: 100%; width: 100%">
+              <div
+                v-if="toolsList[0].tools[howTools] == 1"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://iwb.cocorobo.cn/"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 2"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 3"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://cloud.cocorobo.cn/kityminder-editor/dist/index.html"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 4"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 6"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://cloud.cocorobo.cn/Office/Word/WordEditArea.htm"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 7"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 8"
+                style="height: 90%; width: 100%"
+              >
+                <iframe
+                  style="width: 100%; height: 100%; border: none"
+                  src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library"
+                ></iframe>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 10"
+                style="height: 90%; width: 100%"
+              >
+                <div>倒计时</div>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 13"
+                style="height: 90%; width: 100%"
+              >
+                <div>分小组</div>
+              </div>
+              <div class="nextStepOne" @click="nextTool">下一步</div>
+            </div>
+            <!-- <div v-if="toolCount == 0" style="height: 100%">
               <iframe
                 style="width: 100%; height: 100%; border: none"
                 src="https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid"
@@ -172,7 +290,7 @@
                 style="width: 100%; height: 100%; border: none"
                 src="https://cloud.cocorobo.cn/kityminder-editor/dist/index.html"
               ></iframe>
-            </div>
+            </div> -->
             <!-- <div class="toolList">
               <div class="tools">
                 <div>
@@ -205,11 +323,11 @@
                 <div>思维导图</div>
               </div>
             </div>-->
-            <div class="nextStepOne" @click="nextTool">下一步</div>
+            <!-- <div class="nextStepOne" @click="nextTool">下一步</div> -->
           </div>
         </div>
       </div>
-      <div v-if="steps == 3" style="width: 40%; height: 96%">
+      <!-- <div v-if="steps == 3" style="width: 40%; height: 96%">
         <div
           style="
             box-sizing: border-box;
@@ -265,8 +383,8 @@
                 上传截图
               </div>
             </div>
-          </div>
-          <!-- <div
+          </div> -->
+      <!-- <div
             style="
               display: flex;
               flex-direction: row;
@@ -308,7 +426,7 @@
               </div>
             </div>
           </div>-->
-          <div style="padding-left: 25px"><span style="color: red">*</span> 简要描述</div>
+      <!-- <div style="padding-left: 25px"><span style="color: red">*</span> 简要描述</div>
           <div style="padding: 10px 0 0 25px">
             <textarea
               rows="6"
@@ -327,13 +445,15 @@
             <el-button type="primary" @click="addWork">确定</el-button>
           </span>
         </div>
-      </div>
+      </div> -->
     </div>
 
     <div class="blackBottomB"></div>
     <div v-if="proVisible" class="mask">
       <div class="progressBox">
-        <div class="lbox"><img src="../assets/loading.gif" />上传中,请稍后</div>
+        <div class="lbox">
+          <img src="../assets/loading.gif" />上传中,请稍后
+        </div>
         <el-progress
           :text-inside="true"
           :stroke-width="20"
@@ -384,6 +504,8 @@ export 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",
       ppage: 2,
       pageTotal: 0,
+      howTools: 0,
+      toolsList: [],
       timer: null,
       isLoading: false,
       formLabelWidth: "100px",
@@ -402,6 +524,8 @@ export default {
         { name: "D.480" },
       ],
       steps: 0,
+      isBlock: 0,
+      isAnswer: false,
       upload: [
         {
           upImg: [],
@@ -417,17 +541,18 @@ export default {
       tools: [
         "",
         "",
-        { tools: [""] }, //选择题
-        { tools: [""] }, //倒计时
-        { tools: [""] }, //问答题
-        { tools: [""] }, //问答题
-        { tools: [""] }, //思维导图/电子白板
-        { tools: [""] }, //选人回答
-        { tools: [""] }, //倒计时、分小组
-        { tools: [""] }, //思维导图/电子白板/思维网格
-        { tools: [""] }, //查看作业
-        { tools: [""] }, //查看作业
+        { tools: [9] }, //选择题
+        { tools: [10] }, //倒计时
+        { tools: [11] }, //问答题
+        { tools: [11] }, //问答题
+        { tools: [3, 1] }, //思维导图/电子白板
+        { tools: [12] }, //选人回答
+        { tools: [10, 13] }, //倒计时、分小组
+        { tools: [3, 1, 7] }, //思维导图/电子白板/思维网格
+        { tools: [14] }, //查看作业
+        { tools: [14] }, //查看作业
         "", //查看作业
+        //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价
       ],
     };
   },
@@ -464,11 +589,14 @@ 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) {
@@ -484,9 +612,9 @@ export default {
         }
       }
     },
-    answerWork() {
-      this.steps++;
-    },
+    // answerWork() {
+    //   this.steps++;
+    // },
     addTool(t) {
       if (t == 1) {
         window.parent.postMessage({ tools: "1" }, "*");
@@ -497,30 +625,39 @@ export default {
       }
     },
     nextTool() {
-      if (this.toolCount < 2) {
-        this.toolCount++;
-      } else {
-        this.steps = 3;
-        this.toolCount = 0;
+      if (this.howTools < this.toolsList[0].tools.length - 1) {
+        this.howTools++;
+      } else if (this.howTools == this.toolsList[0].tools.length - 1) {
+        this.isBlock = 0;
       }
+      // if (this.toolCount < 2) {
+      //   this.toolCount++;
+      // } else {
+      //   this.toolCount = 0;
+      // }
     },
     answerQue() {
       this.dialogVisible = true;
     },
     isChooseActive(t) {
-      if (this.typeC.length == 0) {
-        this.typeC.push(t);
+      if (this.isAnswer == true) {
+        return;
       } else {
-        if (this.typeC.indexOf(t) != -1) {
-          this.typeC.splice(this.typeC.indexOf(t), 1);
-        } else {
+        if (this.typeC.length == 0) {
           this.typeC.push(t);
+        } else {
+          if (this.typeC.indexOf(t) != -1) {
+            this.typeC.splice(this.typeC.indexOf(t), 1);
+          } else {
+            this.typeC.push(t);
+          }
         }
       }
     },
     showMember(i) {
       if (this.typeC.length > 0) {
-        this.steps = 2;
+        // this.steps = 2;
+        this.isAnswer = true;
       } else {
         this.$message.error("至少选择一个答案!");
       }
@@ -679,12 +816,41 @@ export default {
         });
     },
     search() {},
+    howPage(page) {
+      this.isBlock = 2;
+      this.howTools = 0;
+      if (this.toolsList.length > 0) {
+        this.toolsList = [];
+        this.toolsList.push({ tools: this.tools[page - 1].tools });
+      } else {
+        this.toolsList.push({ tools: this.tools[page - 1].tools });
+      }
+    },
     setPage() {
       this.ajax
         .get(this.$store.state.api + "selectPptPage", "")
         .then((res) => {
           if (res.data[0].length > 0) {
             this.ppage = res.data[0][0].page;
+            if (this.ppage == res.data[0][0].page) {
+              return;
+            } else {
+              if (this.ppage == 3) {
+                this.isBlock = 1;
+              } else if (this.ppage == 4) {
+                this.howPage(this.ppage);
+              } else if (this.ppage == 5) {
+                this.howPage(this.ppage);
+              } else if (this.ppage == 6) {
+                this.howPage(this.ppage);
+              } else if (this.ppage == 7) {
+                this.howPage(this.ppage);
+              } else if (this.ppage == 9) {
+                this.howPage(this.ppage);
+              } else if (this.ppage == 10) {
+                this.howPage(this.ppage);
+              }
+            }
           }
         })
         .catch((err) => {