|
@@ -1020,7 +1020,7 @@
|
|
|
@click="addTools(tooC, toolIndex, taskCount)"
|
|
|
/>
|
|
|
<div style="margin: 5px 0">电子白板</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,1)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,1)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1032,7 +1032,7 @@
|
|
|
@click="addTools(tooC, toolIndex, taskCount)"
|
|
|
/>
|
|
|
<div style="margin: 5px 0">思维导图</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,3)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,3)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1053,7 +1053,7 @@
|
|
|
/>
|
|
|
<div style="margin: 5px 0">思维网格</div>
|
|
|
<!-- && worksStudent[toolIndex].length>0 -->
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,7)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,7)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1089,7 +1089,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">问卷调查</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,4)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,4)"
|
|
|
style="position: absolute;right: 153px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1118,7 +1118,7 @@
|
|
|
<div style="margin: 5px 0">选择题</div>
|
|
|
<div
|
|
|
class="upload_toolBtn"
|
|
|
-
|
|
|
+ v-if="tType == 1"
|
|
|
@click="
|
|
|
openChoseWorksDetailDialog(
|
|
|
tooC,
|
|
@@ -1155,7 +1155,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">问答</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,15)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,15)"
|
|
|
style="position: absolute;right: 135px;top: -45px;height: 40px;display: flex;align-items: center;justify-content: center;background: #409EFF;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1175,7 +1175,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">训练服务器</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,18)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,18)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1203,7 +1203,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">AIoT Blockly</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,21)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,21)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1223,7 +1223,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">AI Python</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,23)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,23)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1235,7 +1235,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">AI Blockly</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,24)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,24)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1255,7 +1255,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">数学画板</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,31)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,31)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1267,7 +1267,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">翻译</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,28)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,28)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1295,7 +1295,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">GeoGebra</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,39)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,39)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1307,7 +1307,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">源码编辑</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,32)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,32)"
|
|
|
style="position: absolute;right: 153px;top: -42px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1325,7 +1325,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">个人评价</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,40)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,40)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1337,7 +1337,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">选择匹配</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,41)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,41)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1357,7 +1357,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">排序</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,47)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,47)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1369,7 +1369,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">表格</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,48)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,48)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1381,7 +1381,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">文档</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,52)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,52)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1393,7 +1393,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">学生分组</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,49)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,49)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1405,7 +1405,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">CocoPi</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,57)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,57)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1457,7 +1457,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">海龟编程</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,63)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,63)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1469,7 +1469,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">AI智能体</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,71)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,71)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1494,7 +1494,7 @@
|
|
|
{{tool.appJson && tool.appJson.name ? tool.appJson.name : '应用中心'}}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,72)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,72)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1514,7 +1514,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">公式编辑</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,66)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,66)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1546,7 +1546,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">英语写作</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1558,7 +1558,7 @@
|
|
|
alt
|
|
|
/>
|
|
|
<div style="margin: 5px 0">英语口语</div>
|
|
|
- <div class="upload_toolBtn" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,70)"
|
|
|
+ <div class="upload_toolBtn" v-if="tType == 1" @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,70)"
|
|
|
style="position: absolute;right: 33px;top: -30px;">
|
|
|
分析
|
|
|
</div>
|
|
@@ -1968,7 +1968,7 @@
|
|
|
<img
|
|
|
style="cursor: pointer"
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<div
|
|
@@ -2106,7 +2106,7 @@
|
|
|
<div class="workImg">
|
|
|
<img
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<div
|
|
@@ -2180,7 +2180,7 @@
|
|
|
<div class="workImg">
|
|
|
<img
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
v-if="w.type == 12"
|
|
|
alt
|
|
|
/>
|
|
@@ -3447,7 +3447,7 @@
|
|
|
<img
|
|
|
style="cursor: pointer"
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<!-- @click="openVideo(w.works)" -->
|
|
@@ -3991,7 +3991,7 @@
|
|
|
<img
|
|
|
style="cursor: pointer"
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<!-- @click="openVideo(w.works)" -->
|
|
@@ -4431,7 +4431,7 @@
|
|
|
<div class="workImg">
|
|
|
<img
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<div
|
|
@@ -4609,7 +4609,7 @@
|
|
|
<div class="workImg">
|
|
|
<img
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
v-if="w.type == 12"
|
|
|
alt
|
|
|
/>
|
|
@@ -10664,7 +10664,7 @@
|
|
|
<img
|
|
|
style="cursor: pointer"
|
|
|
:src="word2"
|
|
|
- @click="downloadFile(w.works)"
|
|
|
+ @click="downloadFile(w.works,w.userid)"
|
|
|
alt
|
|
|
/>
|
|
|
<!-- @click="openVideo(w.works)" -->
|
|
@@ -14333,7 +14333,7 @@
|
|
|
<div
|
|
|
class="worksAnswer codeFileBox"
|
|
|
v-if="commentDetail.works && commentDetail.type == 12"
|
|
|
- @click="downloadFile(commentDetail.works)"
|
|
|
+ @click="downloadFile(commentDetail.works,w.userid)"
|
|
|
>
|
|
|
<img src="../../assets/icon/codeFile.png" />
|
|
|
<div>点击下载文件</div>
|
|
@@ -24616,59 +24616,60 @@ export default {
|
|
|
};
|
|
|
x.send();
|
|
|
},
|
|
|
- downloadFile(url) {
|
|
|
- let hz = url.substring(url.lastIndexOf(".") + 1);
|
|
|
+ downloadFile(url,uid) {
|
|
|
+ if (this.tType == 1 || this.userid == uid) {
|
|
|
+ let hz = url.substring(url.lastIndexOf(".") + 1);
|
|
|
|
|
|
- if (hz == "txt" || hz == "md") {
|
|
|
- this.lookTxt(url);
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (hz == "txt" || hz == "md") {
|
|
|
+ this.lookTxt(url);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- var credentials = {
|
|
|
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
- secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR"
|
|
|
- }; //秘钥形式的登录上传
|
|
|
- window.AWS.config.update(credentials);
|
|
|
- window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
- let url2 = url;
|
|
|
- let _url2 = "";
|
|
|
- if (
|
|
|
- url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
- ) {
|
|
|
- _url2 = url2.split(
|
|
|
- "https://view.officeapps.live.com/op/view.aspx?src="
|
|
|
- )[1];
|
|
|
- } else {
|
|
|
- _url2 = url2;
|
|
|
+ var credentials = {
|
|
|
+ accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
+ secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR"
|
|
|
+ }; //秘钥形式的登录上传
|
|
|
+ window.AWS.config.update(credentials);
|
|
|
+ window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
+ let url2 = url;
|
|
|
+ let _url2 = "";
|
|
|
+ if (
|
|
|
+ url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
+ ) {
|
|
|
+ _url2 = url2.split(
|
|
|
+ "https://view.officeapps.live.com/op/view.aspx?src="
|
|
|
+ )[1];
|
|
|
+ } else {
|
|
|
+ _url2 = url2;
|
|
|
+ }
|
|
|
+ const loading2 = this.$loading.service({
|
|
|
+ background: "rgba(255, 255, 255, 0.7)",
|
|
|
+ target: document.body,
|
|
|
+ text: "文件加载中..."
|
|
|
+ });
|
|
|
+ var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
+ let name = decodeURIComponent(
|
|
|
+ _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
|
|
|
+ );
|
|
|
+ var params = {
|
|
|
+ Bucket: "ccrb",
|
|
|
+ Key: name
|
|
|
+ };
|
|
|
+ s3.getObject(params, function(err, data) {
|
|
|
+ loading2.close();
|
|
|
+ if (err) console.log(err, err.stack);
|
|
|
+ // an error occurred
|
|
|
+ else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data.Body]));
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.name = name;
|
|
|
+ a.href = url;
|
|
|
+ a.download = name;
|
|
|
+ a.click();
|
|
|
+ console.log(data);
|
|
|
+ } // sxuccessful response
|
|
|
+ });
|
|
|
}
|
|
|
- const loading2 = this.$loading.service({
|
|
|
- background: "rgba(255, 255, 255, 0.7)",
|
|
|
- target: document.body,
|
|
|
- text: "文件加载中..."
|
|
|
- });
|
|
|
- var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
- let name = decodeURIComponent(
|
|
|
- _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
|
|
|
- );
|
|
|
- var params = {
|
|
|
- Bucket: "ccrb",
|
|
|
- Key: name
|
|
|
- };
|
|
|
- s3.getObject(params, function(err, data) {
|
|
|
- loading2.close();
|
|
|
- if (err) console.log(err, err.stack);
|
|
|
- // an error occurred
|
|
|
- else {
|
|
|
- let url = window.URL.createObjectURL(new Blob([data.Body]));
|
|
|
- let a = document.createElement("a");
|
|
|
- a.name = name;
|
|
|
- a.href = url;
|
|
|
- a.download = name;
|
|
|
- a.click();
|
|
|
- console.log(data);
|
|
|
- } // sxuccessful response
|
|
|
- });
|
|
|
-
|
|
|
return;
|
|
|
let _this = this;
|
|
|
let _url = "";
|