Browse Source

上一步下一步

zengyicheng 2 years ago
parent
commit
16431f91ec
1 changed files with 213 additions and 62 deletions
  1. 213 62
      src/components/liveProjectDetail.vue

+ 213 - 62
src/components/liveProjectDetail.vue

@@ -160,33 +160,19 @@
             </div>
           </div>
           <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" class="tools_child_box">
+            <div style="height: 100%; width: 100%">
+              <div
+                v-if="toolsList[0].tools[howTools] == 1"
+                class="tools_child_box"
+              >
                 <div class="tools_title">
                   <span>电子白板</span>
                   <div>
-                    <img src="../assets/full.png" class="full" @click="fullTools" />
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
                   </div>
                 </div>
                 <iframe
@@ -194,52 +180,200 @@
                   src="https://iwb.cocorobo.cn/"
                 ></iframe>
               </div>
-              <div v-if="toolsList[0].tools[howTools] == 2" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 2"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>便签</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 3"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>思维导图</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 4"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>问卷调查</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 6"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>协同文档</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 7"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>思维网格</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 8"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>素材库</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <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" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 9"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>选择题</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
+                <div>选择题</div>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 10"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>倒计时</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <div>倒计时</div>
               </div>
-              <div v-if="toolsList[0].tools[howTools] == 13" class="tools_child_box">
+              <div
+                v-if="toolsList[0].tools[howTools] == 11"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>问答题</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
+                <div>问答题</div>
+              </div>
+              <div
+                v-if="toolsList[0].tools[howTools] == 13"
+                class="tools_child_box"
+              >
+                <div class="tools_title">
+                  <span>分小组</span>
+                  <div>
+                    <img
+                      src="../assets/full.png"
+                      class="full"
+                      @click="fullTools"
+                    />
+                  </div>
+                </div>
                 <div>分小组</div>
               </div>
-              <div class="nextStepOne" @click="nextTool" v-if="isNext == true">
-                上一步
+              <div class="nextStepBox" v-if="toolsList[0].tools.length > 1">
+                <div
+                  class="nextStepOne"
+                  @click="howTools--"
+                  v-if="howTools != 0"
+                >
+                  上一步
+                </div>
+                <div
+                  class="nextStepOne"
+                  @click="howTools++"
+                  v-if="howTools != toolsList[0].tools.length - 1"
+                >
+                  下一步
+                </div>
               </div>
-              <div class="nextStepOne" @click="nextTool" v-else>下一步</div>
             </div>
             <!-- <div v-if="toolCount == 0" style="height: 100%">
               <iframe
@@ -293,7 +427,11 @@
             </div>-->
             <!-- <div class="nextStepOne" @click="nextTool">下一步</div> -->
           </div>
-          <div class="answerBox" v-if="isBlock == 3" style="padding: 0 0 0 25px">
+          <div
+            class="answerBox"
+            v-if="isBlock == 3"
+            style="padding: 0 0 0 25px"
+          >
             <div>
               <div class="score_box">
                 <span>自我评价</span>
@@ -319,7 +457,12 @@
             <span
               slot="footer"
               class="dialog-footer sztFooter"
-              style="padding: 0 0 30px 0px; position: absolute; right: 20px; bottom: 0"
+              style="
+                padding: 0 0 30px 0px;
+                position: absolute;
+                right: 20px;
+                bottom: 0;
+              "
             >
               <el-button>取消</el-button>
               <el-button type="primary">确定</el-button>
@@ -451,7 +594,9 @@
     <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"
@@ -594,11 +739,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) {
@@ -626,24 +774,6 @@ export default {
         window.parent.postMessage({ tools: "7" }, "*");
       }
     },
-    nextTool() {
-      if (this.howTools < this.toolsList[0].tools.length - 1) {
-        this.howTools++;
-        if (this.howTools == this.toolsList[0].tools.length - 1) {
-          this.isNext = true;
-        }
-      } else if (this.howTools == this.toolsList[0].tools.length - 1) {
-        if (this.isNext == true) {
-          this.howTools = this.howTools - 1;
-          this.isNext = false;
-        }
-      }
-      // if (this.toolCount < 2) {
-      //   this.toolCount++;
-      // } else {
-      //   this.toolCount = 0;
-      // }
-    },
     answerQue() {
       this.dialogVisible = true;
     },
@@ -844,7 +974,7 @@ export default {
         } else {
           this.toolsList.push({ tools: this.tools[page - 1].tools });
         }
-        if (this.toolsList[0].tools[0] == 14) {
+        if (this.toolsList[0].tools[0] == 14 || this.toolsList[0].tools[0] == 12) {
           this.isBlock = 0;
         }
       }
@@ -1314,4 +1444,25 @@ img {
   width: 100% !important;
   max-width: 100% !important;
 }
+.nextStepBox {
+  display: flex;
+  justify-content: center;
+  margin-top: 10px;
+}
+.nextStepOne {
+  background: #6b92c9;
+  color: #fff;
+  width: 110px;
+  text-align: center;
+  height: 35px;
+  line-height: 35px;
+  font-size: 14px;
+  border-radius: 5px;
+  cursor: pointer;
+}
+
+.nextStepOne,
+.nextStepOne {
+  margin-left: 10px;
+}
 </style>