|
@@ -1320,7 +1320,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- v-if="worksStudent[toolIndex].length > 0"
|
|
|
+ v-if="tool.tool[0] == 16 && worksStudent[toolIndex].length > 0"
|
|
|
style="position: absolute; right: 30px; top: 30px"
|
|
|
@click="uploadWorks(toolIndex)"
|
|
|
>导出作业</el-button
|
|
@@ -18072,62 +18072,62 @@ export default {
|
|
|
url.push({ name: item.sName, url: item.works });
|
|
|
}
|
|
|
}
|
|
|
- var toolList = [
|
|
|
- { name: "电子白板", tool: 1 },
|
|
|
- { name: "思维导图", tool: 3 },
|
|
|
- { name: "协同文档", tool: 6 },
|
|
|
- { name: "思维网格", tool: 7 },
|
|
|
- { name: "素材库", tool: 8 },
|
|
|
- { name: "学习资料", tool: 17 },
|
|
|
- { name: "便签", tool: 2 },
|
|
|
- { name: "问卷调查", tool: 4 },
|
|
|
- { name: "选择题", tool: 45 },
|
|
|
- { name: "倒计时", tool: 10 },
|
|
|
- { name: "问答", tool: 15 },
|
|
|
- { name: "课程设计", tool: 26 },
|
|
|
- { name: "训练服务器", tool: 18 },
|
|
|
- { name: "作业提交", tool: 16 },
|
|
|
- { name: "批量上传", tool: 50 },
|
|
|
- { name: "AIoT Blockly", tool: 21 },
|
|
|
- { name: "AI Python", tool: 23 },
|
|
|
- { name: "AI Blockly", tool: 24 },
|
|
|
- { name: "目标管理", tool: 25 },
|
|
|
- { name: "数学画板", tool: 31 },
|
|
|
- { name: "翻译", tool: 28 },
|
|
|
- { name: "魔盒识字", tool: 37 },
|
|
|
- { name: "数学画板", tool: 31 },
|
|
|
- { name: "24点", tool: 38 },
|
|
|
- { name: "GeoGebra", tool: 39 },
|
|
|
- { name: "源码编辑", tool: 32 },
|
|
|
- { name: "个人评价", tool: 40 },
|
|
|
- { name: "选择匹配", tool: 41 },
|
|
|
- { name: "汉字宫", tool: 44 },
|
|
|
- { name: "排序", tool: 47 },
|
|
|
- { name: "表格", tool: 48 },
|
|
|
- { name: "文档", tool: 52 },
|
|
|
- { name: "学生分组", tool: 49 },
|
|
|
- { name: "CocoPi", tool: 57 },
|
|
|
- { name: "模拟驾驶", tool: 58 },
|
|
|
- { name: "路径搜索", tool: 59 },
|
|
|
- { name: "深度学习", tool: 60 },
|
|
|
- { name: "全历史", tool: 61 },
|
|
|
- { name: "交互视频", tool: 62 },
|
|
|
- { name: "海龟编程", tool: 63 },
|
|
|
- { name: "挑人", tool: 65 },
|
|
|
- { name: "公式编辑", tool: 66 },
|
|
|
- { name: "分子结构", tool: 67 },
|
|
|
- { name: "时间轴", tool: 68 },
|
|
|
- ];
|
|
|
- var toolName = "";
|
|
|
- for(var w = 0;w<toolList.length;w++){
|
|
|
- if(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose[i].tool[0] == toolList[w].tool){
|
|
|
- toolName = toolList[w].name;
|
|
|
- }
|
|
|
- }
|
|
|
+ // var toolList = [
|
|
|
+ // { name: "电子白板", tool: 1 },
|
|
|
+ // { name: "思维导图", tool: 3 },
|
|
|
+ // { name: "协同文档", tool: 6 },
|
|
|
+ // { name: "思维网格", tool: 7 },
|
|
|
+ // { name: "素材库", tool: 8 },
|
|
|
+ // { name: "学习资料", tool: 17 },
|
|
|
+ // { name: "便签", tool: 2 },
|
|
|
+ // { name: "问卷调查", tool: 4 },
|
|
|
+ // { name: "选择题", tool: 45 },
|
|
|
+ // { name: "倒计时", tool: 10 },
|
|
|
+ // { name: "问答", tool: 15 },
|
|
|
+ // { name: "课程设计", tool: 26 },
|
|
|
+ // { name: "训练服务器", tool: 18 },
|
|
|
+ // { name: "作业提交", tool: 16 },
|
|
|
+ // { name: "批量上传", tool: 50 },
|
|
|
+ // { name: "AIoT Blockly", tool: 21 },
|
|
|
+ // { name: "AI Python", tool: 23 },
|
|
|
+ // { name: "AI Blockly", tool: 24 },
|
|
|
+ // { name: "目标管理", tool: 25 },
|
|
|
+ // { name: "数学画板", tool: 31 },
|
|
|
+ // { name: "翻译", tool: 28 },
|
|
|
+ // { name: "魔盒识字", tool: 37 },
|
|
|
+ // { name: "数学画板", tool: 31 },
|
|
|
+ // { name: "24点", tool: 38 },
|
|
|
+ // { name: "GeoGebra", tool: 39 },
|
|
|
+ // { name: "源码编辑", tool: 32 },
|
|
|
+ // { name: "个人评价", tool: 40 },
|
|
|
+ // { name: "选择匹配", tool: 41 },
|
|
|
+ // { name: "汉字宫", tool: 44 },
|
|
|
+ // { name: "排序", tool: 47 },
|
|
|
+ // { name: "表格", tool: 48 },
|
|
|
+ // { name: "文档", tool: 52 },
|
|
|
+ // { name: "学生分组", tool: 49 },
|
|
|
+ // { name: "CocoPi", tool: 57 },
|
|
|
+ // { name: "模拟驾驶", tool: 58 },
|
|
|
+ // { name: "路径搜索", tool: 59 },
|
|
|
+ // { name: "深度学习", tool: 60 },
|
|
|
+ // { name: "全历史", tool: 61 },
|
|
|
+ // { name: "交互视频", tool: 62 },
|
|
|
+ // { name: "海龟编程", tool: 63 },
|
|
|
+ // { name: "挑人", tool: 65 },
|
|
|
+ // { name: "公式编辑", tool: 66 },
|
|
|
+ // { name: "分子结构", tool: 67 },
|
|
|
+ // { name: "时间轴", tool: 68 },
|
|
|
+ // ];
|
|
|
+ // var toolName = "";
|
|
|
+ // for(var w = 0;w<toolList.length;w++){
|
|
|
+ // if(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose[i].tool[0] == toolList[w].tool){
|
|
|
+ // toolName = toolList[w].name;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
console.log(url);
|
|
|
- this.downLoadAll(url, loading, toolName);
|
|
|
+ this.downLoadAll(url, loading);
|
|
|
},
|
|
|
- downLoadAll(url, loading, n) {
|
|
|
+ downLoadAll(url, loading) {
|
|
|
const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
|
|
|
const zip = new JSZip();
|
|
|
const cache = {};
|
|
@@ -18136,7 +18136,7 @@ export default {
|
|
|
const promise = getFile(item.url).then((data) => {
|
|
|
if (data.data != 1) {
|
|
|
// 下载文件, 并存成ArrayBuffer对象
|
|
|
- const file_name = item.name; // 获取文件名
|
|
|
+ const file_name = item.name + "." + url.split(".")[url.split(".").length - 1]; // 获取文件名
|
|
|
zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
|
|
|
cache[file_name] = data.data;
|
|
|
}
|
|
@@ -18146,7 +18146,7 @@ export default {
|
|
|
Promise.all(promises).then(() => {
|
|
|
zip.generateAsync({ type: "blob" }).then((content) => {
|
|
|
// 生成二进制流
|
|
|
- FileSaver.saveAs(content, n + "工具.zip"); // 利用file-saver保存文件 自定义文件名
|
|
|
+ FileSaver.saveAs(content, this.courseDetail.title + "-" + "作业提交工具.zip"); // 利用file-saver保存文件 自定义文件名
|
|
|
setTimeout(() => {
|
|
|
loading.close();
|
|
|
}, 2000);
|