Browse Source

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pbl-student-table

zengyicheng 2 years ago
parent
commit
407a214a83

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.cd15c37b4897a00c5a33044caa7c5757.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.58e4d5b3fd0c569e76aa.js></script><script type=text/javascript src=./static/js/app.e2ee357e90ab9916900e.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.16bc847a844b1a8e3d2355ba8ab67bbe.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.58e4d5b3fd0c569e76aa.js></script><script type=text/javascript src=./static/js/app.dcd515c613480d29e577.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.16bc847a844b1a8e3d2355ba8ab67bbe.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.16bc847a844b1a8e3d2355ba8ab67bbe.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.dcd515c613480d29e577.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.dcd515c613480d29e577.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.e2ee357e90ab9916900e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.e2ee357e90ab9916900e.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.58e4d5b3fd0c569e76aa.js.map


+ 113 - 110
src/common/jietu2.js

@@ -1,120 +1,123 @@
- let _loading = document.createElement('div')
- _loading.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 _lchild = document.createElement('div')
- let _limg = document.createElement('img')
- _limg.src = 'https://pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif'
- _limg.style = "width: 26px;margin-right: 10px;"
- _lchild.appendChild(_limg)
- let _lspan = document.createElement('span')
- _lspan.innerHTML = "上传中..."
- _lchild.appendChild(_lspan)
- _lchild.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;display:flex;align-items:center;"
- _loading.appendChild(_lchild)
- //  document.body.appendChild(_loading)
+//  let _loading = document.createElement('div')
+//  _loading.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 _lchild = document.createElement('div')
+//  let _limg = document.createElement('img')
+//  _limg.src = 'https://pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif'
+//  _limg.style = "width: 26px;margin-right: 10px;"
+//  _lchild.appendChild(_limg)
+//  let _lspan = document.createElement('span')
+//  _lspan.innerHTML = "上传中..."
+//  _lchild.appendChild(_lspan)
+//  _lchild.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;display:flex;align-items:center;"
+//  _loading.appendChild(_lchild)
+//  document.body.appendChild(_loading)
 
 
- function jietu_shishi(uid, cid, stage, task, tool) {
-   html2canvas($("body")[0]).then(function (canvas) {
-     //获取截取图片路径
+function jietu_shishi(uid, cid, stage, task, tool) {
+  html2canvas($("body")[0]).then(function (canvas) {
+    //获取截取图片路径
 
 
-     var base64Url = canvas.toDataURL('image/png');
-     //后台操作处理
+    var base64Url = canvas.toDataURL('image/png');
+    //后台操作处理
 
 
-     var base64 = "<img src=" + base64Url + " />"
-     var file = dataURLtoFile_shishi(base64Url, "截图")
-     beforeUpload_shishi(file, uid, cid, stage, task, tool)
-     // $("body")[0].innerHTML = base64
-   });
- }
+    var base64 = "<img src=" + base64Url + " />"
+    var file = dataURLtoFile_shishi(base64Url, "截图")
+    beforeUpload_shishi(file, uid, cid, stage, task, tool)
+    // $("body")[0].innerHTML = base64
+  });
+}
 
 
- function dataURLtoFile_shishi(dataurl, filename) {
-   let arr = dataurl.split(","),
-     mime = arr[0].match(/:(.*?);/)[1],
-     bstr = atob(arr[1]),
-     n = bstr.length,
-     u8arr = new Uint8Array(n);
-   while (n--) {
-     u8arr[n] = bstr.charCodeAt(n);
-   }
-   return new File([u8arr], filename, {
-     type: mime
-   });
- }
+function dataURLtoFile_shishi(dataurl, filename) {
+  let arr = dataurl.split(","),
+    mime = arr[0].match(/:(.*?);/)[1],
+    bstr = atob(arr[1]),
+    n = bstr.length,
+    u8arr = new Uint8Array(n);
+  while (n--) {
+    u8arr[n] = bstr.charCodeAt(n);
+  }
+  return new File([u8arr], filename, {
+    type: mime
+  });
+}
 
 
 
 
- function beforeUpload_shishi(nfile, uid, cid, stage, task, tool) {
+function beforeUpload_shishi(nfile, uid, cid, stage, task, tool, loading) {
+  // loading.style.display = 'flex'
+  // top.document.getElementById(loading);
   //  document.body.appendChild(_loading)
   //  document.body.appendChild(_loading)
-   var file = nfile;
-   var credentials = {
-     accessKeyId: "AKIATLPEDU37QV5CHLMH",
-     secretAccessKey: "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",
-   }; //秘钥形式的登录上传
-   window.AWS.config.update(credentials);
-   window.AWS.config.region = "cn-northwest-1"; //设置区域
+  var file = nfile;
+  var credentials = {
+    accessKeyId: "AKIATLPEDU37QV5CHLMH",
+    secretAccessKey: "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",
+  }; //秘钥形式的登录上传
+  window.AWS.config.update(credentials);
+  window.AWS.config.region = "cn-northwest-1"; //设置区域
 
 
-   var bucket = new window.AWS.S3({
-     params: {
-       Bucket: "ccrb"
-     }
-   }); //选择桶
+  var bucket = new window.AWS.S3({
+    params: {
+      Bucket: "ccrb"
+    }
+  }); //选择桶
 
 
-   if (file) {
-     var params = {
-       Key: file.name.split(".")[0] + new Date().getTime() + "." + "png",
-       ContentType: file.type,
-       Body: file,
-       "Access-Control-Allow-Credentials": "*",
-       ACL: "public-read",
-     }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
-     var options = {
-       partSize: 2048 * 1024 * 1024,
-       queueSize: 2,
-       leavePartsOnError: true,
-     };
-     bucket.upload(params, options)
-       .on("httpUploadProgress", function (evt) {
-         //这里可以写进度条
-         // 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,
-         }
-         addSWork_shishi(uid, cid, stage, task, tool, data.Location)
-       });
-   }
- }
+  if (file) {
+    var params = {
+      Key: file.name.split(".")[0] + new Date().getTime() + "." + "png",
+      ContentType: file.type,
+      Body: file,
+      "Access-Control-Allow-Credentials": "*",
+      ACL: "public-read",
+    }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+    var options = {
+      partSize: 2048 * 1024 * 1024,
+      queueSize: 2,
+      leavePartsOnError: true,
+    };
+    bucket.upload(params, options)
+      .on("httpUploadProgress", function (evt) {
+        //这里可以写进度条
+        // 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,
+        }
+        addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading)
+      });
+  }
+}
 
 
- function addSWork_shishi(uid, cid, stage, task, tool, a) {
-   let params = {
-     uid: uid,
-     cid: cid,
-     stage: stage,
-     task: task,
-     tool: tool,
-     content: a,
-     type: 1,
-     // upload: JSON.stringify(this.imgFileUp),
-   };
-   $.ajax({
-     type: 'GET',
-     url: 'https://pbl.cocorobo.cn/api/pbl/addCourseWorks2',
-     data: params,
-     dataType: "json",
-     success: (data) => {
-       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(_loading)
-         document.body.removeChild(_div)
-       }, 2000);
-       console.log("截图上传成功");
-     }
-   })
- }
+function addSWork_shishi(uid, cid, stage, task, tool, a, loading) {
+  let params = {
+    uid: uid,
+    cid: cid,
+    stage: stage,
+    task: task,
+    tool: tool,
+    content: a,
+    type: 1,
+    // upload: JSON.stringify(this.imgFileUp),
+  };
+  $.ajax({
+    type: 'GET',
+    url: 'https://pbl.cocorobo.cn/api/pbl/addCourseWorks2',
+    data: params,
+    dataType: "json",
+    success: (data) => {
+      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(_loading)
+        document.body.removeChild(_div)
+      }, 2000);
+      console.log("截图上传成功");
+    }
+  })
+}

+ 3 - 7
src/components/study.vue

@@ -328,7 +328,7 @@
                     v-for="(f, fileIndex) in file[taskCount]"
                     v-for="(f, fileIndex) in file[taskCount]"
                     :key="fileIndex"
                     :key="fileIndex"
                   >
                   >
-                    <div class="vedioNav">附件</div>
+                    <div class="vedioNav">文档</div>
                     <div>
                     <div>
                       <div class="navText" @click="downFile(f, fileIndex)">
                       <div class="navText" @click="downFile(f, fileIndex)">
                         {{ f.name }}
                         {{ f.name }}
@@ -502,7 +502,7 @@
                     v-for="(f, fileIndex) in file[taskCount]"
                     v-for="(f, fileIndex) in file[taskCount]"
                     :key="fileIndex"
                     :key="fileIndex"
                   >
                   >
-                    <div class="vedioNav">附件</div>
+                    <div class="vedioNav">文档</div>
                     <div>
                     <div>
                       <div class="navText" @click="downFile(f, fileIndex)">
                       <div class="navText" @click="downFile(f, fileIndex)">
                         {{ f.name }}
                         {{ f.name }}
@@ -877,9 +877,7 @@
                         <div class="workImg">
                         <div class="workImg">
                           <!-- <img
                           <!-- <img
                             src="../assets/icon/works/noImg.png"
                             src="../assets/icon/works/noImg.png"
-                            @click="
-                              openTools(15, toolIndex, taskCount, w.works)
-                            "
+                            @click="openTools(15, toolIndex, taskCount, w.works)"
                             alt=""
                             alt=""
                           /> -->
                           /> -->
                           <div class="answerBg">
                           <div class="answerBg">
@@ -3436,8 +3434,6 @@ export default {
   display: flex;
   display: flex;
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
-.iframeBox {
-}
 .iframeBox iframe {
 .iframeBox iframe {
   width: 100%;
   width: 100%;
   height: 800px;
   height: 800px;

Some files were not shown because too many files changed in this diff