lsc 2 yıl önce
ebeveyn
işleme
27f9ad5418

+ 25 - 6
js/jietu2.js

@@ -78,13 +78,32 @@ function beforeUpload_shishi(nfile, uid, cid, stage, task, tool, loading, atool,
         //这里可以写进度条
         // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
       }).send(function (err, data) {
-        console.log(data.Location);
-        var a = {
-          name: file.name,
-          url: data.Location,
-          uid: file.uid,
+        if(data){
+          console.log(data.Location);
+          var a = {
+            name: file.name,
+            url: data.Location,
+            uid: file.uid,
+          }
+          addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading, atool, text)
+        }else{
+          var _a = document.getElementsByTagName("img")
+          for (var i = 0; i < _a.length; i++) {
+            _a[i].removeAttribute("crossorigin")
+          }
+          top.document.getElementById(loading).children[0].style.display = "none"
+          let _div = document.createElement('div')
+          _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+          let _inner = document.createElement('div')
+          _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+          _inner.innerHTML = "上传失败,网络错误"
+          _div.appendChild(_inner)
+          document.body.appendChild(_div)
+          setTimeout(() => {
+            document.body.removeChild(_div)
+          }, 1000);    
         }
-        addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading, atool, text)
+        
       });
   }
 }

+ 30 - 12
js/jietu4.js

@@ -1,6 +1,6 @@
 
 $jq = $
-var $180 = $.noConflict(); 
+var $180 = $.noConflict();
 function jietu_shishi(uid, cid, stage, task, tool) {
   html2canvas($jq("body")[0]).then(function (canvas) {
     //获取截取图片路径
@@ -66,18 +66,36 @@ function beforeUpload_shishi(nfile, uid, cid, stage, task, tool, loading, atool,
         //这里可以写进度条
         // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
       }).send(function (err, data) {
-        console.log(data.Location);
-        var a = {
-          name: file.name,
-          url: data.Location,
-          uid: file.uid,
+        if (data) {
+          console.log(data.Location);
+          var a = {
+            name: file.name,
+            url: data.Location,
+            uid: file.uid,
+          }
+          addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading, atool, text)
+        } else {
+          var _a = document.getElementsByTagName("img")
+          for (var i = 0; i < _a.length; i++) {
+            _a[i].removeAttribute("crossorigin")
+          }
+          top.document.getElementById(loading).children[0].style.display = "none"
+          let _div = document.createElement('div')
+          _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+          let _inner = document.createElement('div')
+          _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+          _inner.innerHTML = "上传失败,网络错误"
+          _div.appendChild(_inner)
+          document.body.appendChild(_div)
+          setTimeout(() => {
+            document.body.removeChild(_div)
+          }, 1000);
         }
-        addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading, atool, text)
       });
   }
 }
 
-function addSWork_shishi(uid, cid, stage, task, tool, a, loading,atool, text) {
+function addSWork_shishi(uid, cid, stage, task, tool, a, loading, atool, text) {
   let params = {
     uid: uid,
     cid: cid,
@@ -86,8 +104,8 @@ function addSWork_shishi(uid, cid, stage, task, tool, a, loading,atool, text) {
     tool: tool,
     content: a,
     type: 1,
-    atool:atool,
-    text:text
+    atool: atool,
+    text: text
     // upload: JSON.stringify(this.imgFileUp),
   };
   $jq.ajax({
@@ -113,7 +131,7 @@ function addSWork_shishi(uid, cid, stage, task, tool, a, loading,atool, text) {
       }, 1000);
     },
     success: (data) => {
-      setTimeout(() =>{
+      setTimeout(() => {
         var _a = document.getElementsByTagName("img")
         for (var i = 0; i < _a.length; i++) {
           _a[i].removeAttribute("crossorigin")
@@ -131,7 +149,7 @@ function addSWork_shishi(uid, cid, stage, task, tool, a, loading,atool, text) {
           document.body.removeChild(_div)
         }, 1000);
         console.log("截图上传成功");
-      },3000)
+      }, 3000)
     }
   })
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 185 - 393
src/components/courseDetail.vue


+ 2 - 2
src/components/student/courseDetail.vue

@@ -72,9 +72,9 @@
                 </div> -->
               </div>
 
-              <div class="now_study" @click="dialogVisible = true">
+              <!-- <div class="now_study" @click="dialogVisible = true">
                 立即学习
-              </div>
+              </div> -->
             </div>
           </div>
         </div>

+ 19 - 17
src/components/student/studyStudent.vue

@@ -139,7 +139,7 @@
 }}</div>
                 <div class="task_pbox" style="color:#838383" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[
                   taskCount
-                ].time"><span>任务完成时间:</span>{{
+                ].time"><span>任务周期:</span>{{
   timeB(chapInfoList[courseType].chapterInfo[0].taskJson[
     taskCount
   ].time[0]) + '至' + timeB(chapInfoList[courseType].chapterInfo[0].taskJson[
@@ -233,7 +233,7 @@
                       <div class="vedioTimeBox" v-for="(chapter, cIndex) in chapterlist" :key="cIndex + '1'"
                         @click="setChapterIndex(cIndex)">
                         <div class="vedioName" :class="{ isClickNav: chapterIndex == cIndex }">
-                          {{ chapter.name }}
+                          {{ chapter.type == 8 ? chapter.title : chapter.name }}
                         </div>
                       </div>
                     </div>
@@ -241,12 +241,13 @@
                 </div>
               </div>
               <div style="padding: 10px 30px 0"
-                v-if="chapterlist[chapterIndex] && (chapterlist[chapterIndex].type == 3 || chapterlist[chapterIndex].type == 8 || chapterlist[chapterIndex].type == 9)">
+                v-if="chapterlist[chapterIndex] && (chapterlist[chapterIndex].type == 3 || chapterlist[chapterIndex].type == 9)">
                 <el-button type="primary"
                   @click="checkFileFull(chapterlist[chapterIndex].type, chapterlist[chapterIndex].src)">全屏查看</el-button>
-                <el-button type="primary" @click="downloadFile(chapterlist[chapterIndex].src)"
-                  v-if="chapterlist[chapterIndex].type != 8">文件下载</el-button>
-                <el-button v-if="chapterlist[chapterIndex].type == 8" type="primary"
+                <el-button type="primary" @click="downloadFile(chapterlist[chapterIndex].src)">文件下载</el-button>
+              </div>
+              <div style="padding: 10px 30px 0" v-if="chapterlist[chapterIndex].type == 8">
+                <el-button type="primary"
                   @click="openLine(chapterlist[chapterIndex].src)">打开链接
                 </el-button>
               </div>
@@ -447,13 +448,13 @@
                     </div>
                   </div>
                   <div class="homeWorkBox" v-if="tool.toolPhoto.length">
-                    <div class="htitle">作业预览</div>
+                    <!-- <div class="htitle">作业预览</div> -->
                     <div class="toolPhoto_box">
                       <div class="photo_box" v-for="(photo, pIndex) in tool.toolPhoto" :key="pIndex">
+                        <span>{{ photo.workContent }}</span>
                         <div class="toolPhoto">
                           <img :src="photo.content" @click="previewImg(photo.content)">
                         </div>
-                        <span>{{ photo.workContent }}</span>
                       </div>
                     </div>
                   </div>
@@ -478,7 +479,7 @@
           <img src="../assets/close1.png" alt="" />
         </div> -->
         <div class="checkbox">
-          <div class="check" style="font-size: 25px">评课笔记</div>
+          <div class="check" style="font-size: 25px">评</div>
           <img src="../../assets/pzBtn.png" @click="pzDialog = false" alt="" />
         </div>
       </div>
@@ -1305,11 +1306,11 @@ export default {
                     let _work = works[k]
                     if (_work.stage == i && _work.task == j && _work.tool == z && _work.atool == _tool.tool) {
                       if (_tool.tool == 1) {
-                        _work.workContent = `${_work.username}使用电子白板提交了作业`
+                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
                       } else if (_tool.tool == 3) {
-                        _work.workContent = `${_work.username}使用思维网格提交了作业`
+                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
                       } else if (_tool.tool == 6) {
-                        _work.workContent = `${_work.username}使用协同文档提交了作业`
+                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
                       }
                       _tool.toolPhoto.push(_work);
                     }
@@ -1336,11 +1337,11 @@ export default {
                     let _work = works[k]
                     if (_work.stage == i && _work.task == j && _work.tool == z && _work.atool == _tool.tool) {
                       if (_tool.tool == 1) {
-                        _work.workContent = `${_work.username}使用电子白板提交了作业`
+                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
                       } else if (_tool.tool == 3) {
-                        _work.workContent = `${_work.username}使用思维网格提交了作业`
+                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
                       } else if (_tool.tool == 6) {
-                        _work.workContent = `${_work.username}使用协同文档提交了作业`
+                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
                       }
                       _tool.toolPhoto.push(_work);
                     }
@@ -2696,7 +2697,8 @@ export default {
 }
 
 .vedioList {
-  background: #f2f2f2;
+  /* background: #f2f2f2; */
+  background: #fff;
   border: 1px solid #ececec;
   /* width: 38.8%; */
   width: calc(100% - 83%);
@@ -5133,7 +5135,7 @@ ol {
 }
 
 .photo_box > span{
-  margin-top: 10px;
+  margin-bottom: 10px;
 }
 
 .toolPhoto {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor