|
@@ -494,7 +494,7 @@
|
|
|
class="student_head"
|
|
|
v-if="vChapterData[0].length > 0 || fileC[0].length > 0"
|
|
|
>
|
|
|
- <div class="vedioTaskBox">
|
|
|
+ <div class="vedioTaskBox" v-loading="downLoading">
|
|
|
<div
|
|
|
:class="
|
|
|
contentDialog == false
|
|
@@ -11461,18 +11461,51 @@ import englishEva from "../components/englishEva";
|
|
|
|
|
|
const getFile = (url) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- axios({
|
|
|
- method: "get",
|
|
|
- url,
|
|
|
- responseType: "blob",
|
|
|
- })
|
|
|
- .then((data) => {
|
|
|
- resolve({ data: data.data });
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- resolve({ data: 1 });
|
|
|
- // reject(error.toString());
|
|
|
+ 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 s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
+ let name = decodeURI(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
|
|
|
+ var params = {
|
|
|
+ Bucket: "ccrb",
|
|
|
+ Key: name
|
|
|
+ };
|
|
|
+ s3.getObject(params, function (err, data) {
|
|
|
+ if (err) {
|
|
|
+ console.log(err, err.stack)
|
|
|
+ resolve({ data: 1 });
|
|
|
+ }else {
|
|
|
+ resolve({ data: data.Body });
|
|
|
+ console.log(data);
|
|
|
+ } // sxuccessful response
|
|
|
+
|
|
|
});
|
|
|
+ // axios({
|
|
|
+ // method: "get",
|
|
|
+ // url,
|
|
|
+ // responseType: "blob",
|
|
|
+ // })
|
|
|
+ // .then((data) => {
|
|
|
+ // resolve({ data: data.data });
|
|
|
+ // })
|
|
|
+ // .catch((error) => {
|
|
|
+ // resolve({ data: 1 });
|
|
|
+ // // reject(error.toString());
|
|
|
+ // });
|
|
|
});
|
|
|
};
|
|
|
export default {
|
|
@@ -11847,6 +11880,7 @@ export default {
|
|
|
isPickStudent: [],
|
|
|
pzStype: 1,
|
|
|
myAnList: {},
|
|
|
+ downLoading: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -15218,7 +15252,8 @@ export default {
|
|
|
!this.navList[b].task[this.navList[b].task.length - 1].isLook
|
|
|
) {
|
|
|
if (
|
|
|
- this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.course_teacher &&
|
|
|
this.courseDetail.course_teacher.indexOf(this.userid) == -1
|
|
|
) {
|
|
|
this.$message.error("任务未解锁");
|
|
@@ -15265,7 +15300,8 @@ export default {
|
|
|
if (
|
|
|
!this.chapInfoList[this.courseType].chapterInfo[0].taskJson[bbb]
|
|
|
.isLook &&
|
|
|
- this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.course_teacher &&
|
|
|
this.courseDetail.course_teacher.indexOf(this.userid) == -1 &&
|
|
|
this.IsLookOpen
|
|
|
) {
|
|
@@ -15289,7 +15325,8 @@ export default {
|
|
|
var bbb = parseInt(this.courseType) + 1;
|
|
|
if (
|
|
|
!this.chapInfoList[bbb].chapterInfo[0].taskJson[0].isLook &&
|
|
|
- this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.course_teacher &&
|
|
|
this.courseDetail.course_teacher.indexOf(this.userid) == -1 &&
|
|
|
this.IsLookOpen
|
|
|
) {
|
|
@@ -15305,7 +15342,8 @@ export default {
|
|
|
if (
|
|
|
!this.chapInfoList[this.courseType].chapterInfo[0].taskJson[bbb]
|
|
|
.isLook &&
|
|
|
- this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.course_teacher &&
|
|
|
this.courseDetail.course_teacher.indexOf(this.userid) == -1 &&
|
|
|
this.IsLookOpen
|
|
|
) {
|
|
@@ -15369,7 +15407,8 @@ export default {
|
|
|
if (this.IsLookOpen) {
|
|
|
if (
|
|
|
!this.chapInfoList[s].chapterInfo[0].taskJson[n].isLook &&
|
|
|
- this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.userid != this.userid &&
|
|
|
+ this.courseDetail.course_teacher &&
|
|
|
this.courseDetail.course_teacher.indexOf(this.userid) == -1
|
|
|
) {
|
|
|
this.$message.error("任务未解锁");
|
|
@@ -15549,6 +15588,7 @@ export default {
|
|
|
target: document.querySelector(".student_table"),
|
|
|
});
|
|
|
}
|
|
|
+ this.downLoading = false
|
|
|
// this.navList[0].isOpen = false;
|
|
|
// this.navList[this.courseType].isOpen = true;
|
|
|
// this.courseType = this.courseTypeLine;
|
|
@@ -18033,8 +18073,49 @@ export default {
|
|
|
// loading.close();
|
|
|
// console.error(err);
|
|
|
// });
|
|
|
- let url = f.url;
|
|
|
+ var credentials = {
|
|
|
+ accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
+ secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
|
+ }; //秘钥形式的登录上传
|
|
|
+ window.AWS.config.update(credentials);
|
|
|
+ window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
+ let url2 = f.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;
|
|
|
+ }
|
|
|
let _this = this;
|
|
|
+
|
|
|
+ _this.downLoading = true
|
|
|
+ var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
+ let name = decodeURI(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
|
|
|
+ var params = {
|
|
|
+ Bucket: "ccrb",
|
|
|
+ Key: name
|
|
|
+ };
|
|
|
+ s3.getObject(params, function (err, data) {
|
|
|
+ _this.downLoading = false
|
|
|
+ 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 = f.name;
|
|
|
+ a.href = url;
|
|
|
+ a.download = f.name;
|
|
|
+ a.click();
|
|
|
+ console.log(data);
|
|
|
+ } // sxuccessful response
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ return;
|
|
|
+ let url = f.url;
|
|
|
let _url = "";
|
|
|
if (
|
|
|
url.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
@@ -18045,16 +18126,18 @@ export default {
|
|
|
} else {
|
|
|
_url = url;
|
|
|
}
|
|
|
- const loading = _this.$loading.service({
|
|
|
- background: "rgba(255, 255, 255, 0.7)",
|
|
|
- target: document.body,
|
|
|
- text: "文件加载中...",
|
|
|
- });
|
|
|
+ _this.downLoading = true
|
|
|
+ // const loading = _this.$loading.service({
|
|
|
+ // background: "rgba(255, 255, 255, 0.7)",
|
|
|
+ // target: document.body,
|
|
|
+ // text: "文件加载中...",
|
|
|
+ // });
|
|
|
let x = new XMLHttpRequest();
|
|
|
x.open("GET", _url, true);
|
|
|
x.responseType = "blob";
|
|
|
x.onload = function () {
|
|
|
- loading.close();
|
|
|
+ _this.downLoading = false
|
|
|
+ // loading.close();
|
|
|
let url = window.URL.createObjectURL(new Blob([x.response]));
|
|
|
let a = document.createElement("a");
|
|
|
a.name = f.name;
|
|
@@ -18065,6 +18148,50 @@ export default {
|
|
|
x.send();
|
|
|
},
|
|
|
downloadFile(url) {
|
|
|
+ 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 = decodeURI(_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 = "";
|
|
|
if (
|
|
@@ -18079,6 +18206,7 @@ export default {
|
|
|
const x = new XMLHttpRequest();
|
|
|
x.open("GET", _url, true);
|
|
|
x.responseType = "blob";
|
|
|
+ // this.downLoading = true
|
|
|
const loading = _this.$loading.service({
|
|
|
background: "rgba(255, 255, 255, 0.7)",
|
|
|
target: document.body,
|
|
@@ -18086,6 +18214,7 @@ export default {
|
|
|
});
|
|
|
// _this.$message.success("文件下载中...");
|
|
|
x.onload = function (e) {
|
|
|
+ this.downLoading = false
|
|
|
loading.close();
|
|
|
let content = x.response;
|
|
|
let elink = document.createElement("a");
|
|
@@ -22893,12 +23022,17 @@ ol {
|
|
|
padding: 0 0 0 20px;
|
|
|
border-left: 1px solid #d7d7d7; */
|
|
|
}
|
|
|
+
|
|
|
+.toolChild > div + div{
|
|
|
+ margin-top:5px;
|
|
|
+}
|
|
|
+
|
|
|
.gjCss {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- padding: 15px 0 15px 40px;
|
|
|
+ padding: 10px 0 10px 40px;
|
|
|
box-sizing: border-box;
|
|
|
font-size: 14px;
|
|
|
cursor: pointer;
|
|
@@ -22923,8 +23057,10 @@ ol {
|
|
|
|
|
|
.isGjCss {
|
|
|
/* color: #0061ff; */
|
|
|
- color:#fff;
|
|
|
- background: rgb(55, 129, 252);
|
|
|
+ /* color:#fff;
|
|
|
+ background: rgb(55, 129, 252); */
|
|
|
+ background-color: #e0eafb !important;
|
|
|
+ color: #0061ff !important;
|
|
|
}
|
|
|
|
|
|
.navItem {
|