|
@@ -384,6 +384,29 @@
|
|
</div>
|
|
</div>
|
|
<!-- 学生分组 -->
|
|
<!-- 学生分组 -->
|
|
<div v-if="[49].includes(toolType)" class="s_b_m_b_i_m_evaluation">
|
|
<div v-if="[49].includes(toolType)" class="s_b_m_b_i_m_evaluation">
|
|
|
|
+ <div v-if="courseDetail.userid == userId" class="g_d_btnBox">
|
|
|
|
+ <div style="color: rgb(171 171 171); margin: 0 10px 0 0">
|
|
|
|
+ 提示:开启【开放选座】,学生能够自由加入和退出小组。
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="group_switch">
|
|
|
|
+ <span>开放选座</span>
|
|
|
|
+ <el-switch
|
|
|
|
+ v-model="islock"
|
|
|
|
+ active-text=""
|
|
|
|
+ class="switchCss"
|
|
|
|
+ @change="lockChair"
|
|
|
|
+ ></el-switch>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="updateGroup"
|
|
|
|
+ class="returnBtn"
|
|
|
|
+ style="background-color: #225bc7"
|
|
|
|
+ >
|
|
|
|
+ 分组设置
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div>
|
|
<div>
|
|
<div
|
|
<div
|
|
class="g_d_box"
|
|
class="g_d_box"
|
|
@@ -744,6 +767,10 @@ export default {
|
|
type: Array,
|
|
type: Array,
|
|
default: () => []
|
|
default: () => []
|
|
},
|
|
},
|
|
|
|
+ groupStudent: {
|
|
|
|
+ type: Array,
|
|
|
|
+ default: () => []
|
|
|
|
+ },
|
|
courseDetail: {
|
|
courseDetail: {
|
|
type: Object
|
|
type: Object
|
|
},
|
|
},
|
|
@@ -1071,8 +1098,6 @@ export default {
|
|
JSON.stringify(newValue[this.toolIndex])
|
|
JSON.stringify(newValue[this.toolIndex])
|
|
);
|
|
);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
if (
|
|
if (
|
|
this.show &&
|
|
this.show &&
|
|
@@ -1194,12 +1219,16 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
lockChair(){
|
|
lockChair(){
|
|
- console.log('this.islock',this.islock);
|
|
|
|
- let a = this.islock ? false : true
|
|
|
|
|
|
+ let a = this.islock ? true : false
|
|
|
|
|
|
this.islock = JSON.parse(JSON.stringify(a))
|
|
this.islock = JSON.parse(JSON.stringify(a))
|
|
|
|
+ console.log('this.islock',this.islock);
|
|
|
|
+
|
|
},
|
|
},
|
|
updateGroup(){
|
|
updateGroup(){
|
|
|
|
+ console.log('testData estJson',this.testData);
|
|
|
|
+ console.log('groupStudent',this.groupStudent);
|
|
|
|
+
|
|
console.log('分组设置');
|
|
console.log('分组设置');
|
|
|
|
|
|
},
|
|
},
|
|
@@ -1207,26 +1236,30 @@ export default {
|
|
async captureScreenshot(){
|
|
async captureScreenshot(){
|
|
// this.$refs.iframeWhiteBoardRef.contentWindow;
|
|
// this.$refs.iframeWhiteBoardRef.contentWindow;
|
|
let iframeWindow = ''
|
|
let iframeWindow = ''
|
|
- if (this.toolType == 7) {
|
|
|
|
|
|
+ let str = ''
|
|
|
|
+ if (this.toolType == 7) { //思维网格
|
|
|
|
+ str = 'mindNetwork'
|
|
iframeWindow = this.$refs.iframeThoughtGridRef.contentWindow;
|
|
iframeWindow = this.$refs.iframeThoughtGridRef.contentWindow;
|
|
- }else if (this.toolType == 1) {
|
|
|
|
|
|
+ }else if (this.toolType == 1) {//电子白板
|
|
|
|
+ str = 'whiteboard'
|
|
iframeWindow = this.$refs.iframeWhiteBoardRef.contentWindow;
|
|
iframeWindow = this.$refs.iframeWhiteBoardRef.contentWindow;
|
|
- }else if (this.toolType == 3) {
|
|
|
|
|
|
+ }else if (this.toolType == 3) {//思维导图
|
|
|
|
+ str = 'mind'
|
|
iframeWindow = this.$refs.iframeMainMapRef.contentWindow;
|
|
iframeWindow = this.$refs.iframeMainMapRef.contentWindow;
|
|
}
|
|
}
|
|
console.log('iframeWindow',iframeWindow);
|
|
console.log('iframeWindow',iframeWindow);
|
|
|
|
|
|
let text = ''
|
|
let text = ''
|
|
if (this.toolType == 1) {
|
|
if (this.toolType == 1) {
|
|
- text = JSON.stringify(iframeWindow.contentWindow.h.app.scene.elements)
|
|
|
|
|
|
+ text = JSON.stringify(iframeWindow.h.app.scene.elements)
|
|
} else if (this.toolType == 3) {
|
|
} else if (this.toolType == 3) {
|
|
- text = iframeWindow.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
|
|
|
|
|
|
+ text = iframeWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
|
|
}
|
|
}
|
|
|
|
|
|
console.log('text',text);
|
|
console.log('text',text);
|
|
|
|
|
|
|
|
|
|
- var _ajs = iframeWindow.contentWindow.document.createElement("script");
|
|
|
|
|
|
+ var _ajs = iframeWindow.document.createElement("script");
|
|
_ajs.type = "text/javascript";
|
|
_ajs.type = "text/javascript";
|
|
_ajs.innerHTML =
|
|
_ajs.innerHTML =
|
|
// 'console.log(' + _loading + ');\n' +
|
|
// 'console.log(' + _loading + ');\n' +
|
|
@@ -1243,31 +1276,31 @@ export default {
|
|
'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
|
|
'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
|
|
"beforeUpload_shishi(file," +
|
|
"beforeUpload_shishi(file," +
|
|
"'" +
|
|
"'" +
|
|
- _userid +
|
|
|
|
|
|
+ this.userId +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- _cid +
|
|
|
|
|
|
+ this.courseId +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- _stage +
|
|
|
|
|
|
+ this.courseType +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- _task +
|
|
|
|
|
|
+ this.taskCount +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- _tool +
|
|
|
|
|
|
+ this.toolType +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- (str + '_loadLi_JieE' + cid + stage + task + tool + _userid) +
|
|
|
|
|
|
+ (str + '_loadLi_JieE' + this.courseId + this.courseType + this.taskCount + this.toolType + this.userId) +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"'" +
|
|
"'" +
|
|
- aTool +
|
|
|
|
|
|
+ this.toolType +
|
|
"'" +
|
|
"'" +
|
|
", " +
|
|
", " +
|
|
"`" +
|
|
"`" +
|
|
@@ -1277,155 +1310,110 @@ export default {
|
|
" });\n" +
|
|
" });\n" +
|
|
"}\n" +
|
|
"}\n" +
|
|
"document.head.appendChild(_js);\n";
|
|
"document.head.appendChild(_js);\n";
|
|
- iframeWindow.contentWindow.document.head.appendChild(_ajs);
|
|
|
|
-console.log('66666');
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-return
|
|
|
|
- const html2canvas = iframeWindow.html2canvas;
|
|
|
|
-
|
|
|
|
- if (html2canvas) {
|
|
|
|
- const canvas = await html2canvas(iframeWindow.document.body, { allowTaint: true, useCORS: true });
|
|
|
|
- const base64Url = canvas.toDataURL("image/png");
|
|
|
|
- const file = this.dataURLtoFile(base64Url, "截图");
|
|
|
|
- console.log('file',file);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // 在这里调用上传函数
|
|
|
|
- this.beforeUpload(file);
|
|
|
|
- } else {
|
|
|
|
- console.error('html2canvas未加载');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // html2canvas(document.body,{
|
|
|
|
- // allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight
|
|
|
|
- // }).then(canvas => {
|
|
|
|
- // // 从canvas提取Blob
|
|
|
|
- // canvas.toBlob(blob => {
|
|
|
|
- // // 创建FileList
|
|
|
|
- // let fileList = new DataTransfer();
|
|
|
|
- // fileList.items.add(new File([blob],"screenshot.jpg", { type: "image/jpeg" }));
|
|
|
|
-
|
|
|
|
- // console.log('fileList.files',fileList.files);
|
|
|
|
-
|
|
|
|
- // // 此时fileList就是包含截图的FileList对象
|
|
|
|
- // this.beforeUpload(fileList.files[0])
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- dataURLtoFile(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 });
|
|
|
|
|
|
+ iframeWindow.document.head.appendChild(_ajs);
|
|
|
|
+ console.log('66666');
|
|
},
|
|
},
|
|
- beforeUpload(event) {
|
|
|
|
|
|
+
|
|
|
|
+ // beforeUpload(event) {
|
|
|
|
|
|
- var file = event;
|
|
|
|
|
|
+ // var file = event;
|
|
|
|
|
|
- var credentials = {
|
|
|
|
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
|
- secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR"
|
|
|
|
- }; //秘钥形式的登录上传
|
|
|
|
- window.AWS.config.update(credentials);
|
|
|
|
- window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
|
-
|
|
|
|
- var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
|
|
|
|
- var imgA = [
|
|
|
|
- "png",
|
|
|
|
- "jpg",
|
|
|
|
- "jpeg",
|
|
|
|
- "bmp",
|
|
|
|
- "gif",
|
|
|
|
- "webp",
|
|
|
|
- "psd",
|
|
|
|
- "svg",
|
|
|
|
- "tiff"
|
|
|
|
- ];
|
|
|
|
- var _this = this;
|
|
|
|
|
|
+ // var credentials = {
|
|
|
|
+ // accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
|
+ // secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR"
|
|
|
|
+ // }; //秘钥形式的登录上传
|
|
|
|
+ // window.AWS.config.update(credentials);
|
|
|
|
+ // window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
|
+
|
|
|
|
+ // var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
|
|
|
|
+ // var imgA = [
|
|
|
|
+ // "png",
|
|
|
|
+ // "jpg",
|
|
|
|
+ // "jpeg",
|
|
|
|
+ // "bmp",
|
|
|
|
+ // "gif",
|
|
|
|
+ // "webp",
|
|
|
|
+ // "psd",
|
|
|
|
+ // "svg",
|
|
|
|
+ // "tiff"
|
|
|
|
+ // ];
|
|
|
|
+ // var _this = this;
|
|
|
|
|
|
- _this.$forceUpdate();
|
|
|
|
-
|
|
|
|
- if (file) {
|
|
|
|
- var params = {
|
|
|
|
- Key:
|
|
|
|
- file.name.split(".")[0] +
|
|
|
|
- new Date().getTime() +
|
|
|
|
- "." +
|
|
|
|
- file.name.split(".")[file.name.split(".").length - 1],
|
|
|
|
- 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) {
|
|
|
|
- //这里可以写进度条
|
|
|
|
- // _this.progress = parseInt((evt.loaded / evt.total) * 100);
|
|
|
|
- // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
|
|
|
|
- // _this.$forceUpdate();
|
|
|
|
- })
|
|
|
|
- .send(function(err, data) {
|
|
|
|
- console.log(data.Location);
|
|
|
|
-
|
|
|
|
- _this.questionsData = data.Location
|
|
|
|
- _this.submitWork2()
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // var file = event.target.files[0];
|
|
|
|
- },
|
|
|
|
- submitWork2(){
|
|
|
|
- let yym = ''
|
|
|
|
- if (this.toolType == 1) {
|
|
|
|
- yym = []
|
|
|
|
- }else if (this.toolType == 3) {
|
|
|
|
- yym = {}
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- uid: this.userId,
|
|
|
|
- cid: this.id,
|
|
|
|
- stage: this.courseType,
|
|
|
|
- task: this.taskCount,
|
|
|
|
- tool: this.toolIndex,
|
|
|
|
- content: this.questionsData,
|
|
|
|
- type: 1,
|
|
|
|
- atool: this.toolType,
|
|
|
|
- text: yym
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- this.ajax
|
|
|
|
- .post(this.$store.state.api + addCourseWorks4, params)
|
|
|
|
- .then((res) => {
|
|
|
|
- this.$message({
|
|
|
|
- message: "提交成功",
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- // this.askList = [];
|
|
|
|
- this.$emit("selectStudent")
|
|
|
|
- this.$emit("selectSWorks")
|
|
|
|
- this.$emit("selectSLook")
|
|
|
|
- })
|
|
|
|
- .catch((err) => {
|
|
|
|
- this.$message.error("提交失败");
|
|
|
|
- console.error(err);
|
|
|
|
- });
|
|
|
|
|
|
+ // _this.$forceUpdate();
|
|
|
|
+
|
|
|
|
+ // if (file) {
|
|
|
|
+ // var params = {
|
|
|
|
+ // Key:
|
|
|
|
+ // file.name.split(".")[0] +
|
|
|
|
+ // new Date().getTime() +
|
|
|
|
+ // "." +
|
|
|
|
+ // file.name.split(".")[file.name.split(".").length - 1],
|
|
|
|
+ // 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) {
|
|
|
|
+ // //这里可以写进度条
|
|
|
|
+ // // _this.progress = parseInt((evt.loaded / evt.total) * 100);
|
|
|
|
+ // // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
|
|
|
|
+ // // _this.$forceUpdate();
|
|
|
|
+ // })
|
|
|
|
+ // .send(function(err, data) {
|
|
|
|
+ // console.log(data.Location);
|
|
|
|
+
|
|
|
|
+ // _this.questionsData = data.Location
|
|
|
|
+ // _this.submitWork2()
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // // var file = event.target.files[0];
|
|
|
|
+ // },
|
|
|
|
+ // submitWork2(){
|
|
|
|
+ // let yym = ''
|
|
|
|
+ // if (this.toolType == 1) {
|
|
|
|
+ // yym = []
|
|
|
|
+ // }else if (this.toolType == 3) {
|
|
|
|
+ // yym = {}
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // let params = [
|
|
|
|
+ // {
|
|
|
|
+ // uid: this.userId,
|
|
|
|
+ // cid: this.id,
|
|
|
|
+ // stage: this.courseType,
|
|
|
|
+ // task: this.taskCount,
|
|
|
|
+ // tool: this.toolIndex,
|
|
|
|
+ // content: this.questionsData,
|
|
|
|
+ // type: 1,
|
|
|
|
+ // atool: this.toolType,
|
|
|
|
+ // text: yym
|
|
|
|
+ // },
|
|
|
|
+ // ];
|
|
|
|
+ // this.ajax
|
|
|
|
+ // .post(this.$store.state.api + addCourseWorks4, params)
|
|
|
|
+ // .then((res) => {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: "提交成功",
|
|
|
|
+ // type: "success",
|
|
|
|
+ // });
|
|
|
|
+ // // this.askList = [];
|
|
|
|
+ // this.$emit("selectStudent")
|
|
|
|
+ // this.$emit("selectSWorks")
|
|
|
|
+ // this.$emit("selectSLook")
|
|
|
|
+ // })
|
|
|
|
+ // .catch((err) => {
|
|
|
|
+ // this.$message.error("提交失败");
|
|
|
|
+ // console.error(err);
|
|
|
|
+ // });
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ // },
|
|
// 提交作业
|
|
// 提交作业
|
|
submitWork(){
|
|
submitWork(){
|
|
// 选择题提交
|
|
// 选择题提交
|