|
@@ -1192,11 +1192,17 @@ export default {
|
|
|
worksStudentData: {
|
|
|
handler(newValue) {
|
|
|
|
|
|
+
|
|
|
+ if (this.showType != 2) return
|
|
|
+
|
|
|
let workSData = []
|
|
|
+
|
|
|
+ // 工具几的学生作业
|
|
|
let zjm = JSON.parse(
|
|
|
JSON.stringify(newValue[this.toolIndex])
|
|
|
);
|
|
|
- // 判断是否开启学生查看作业
|
|
|
+
|
|
|
+ // 判断是否开启学生查看作业(是否隐藏其他同学作业)
|
|
|
if (this.tType == 2 && !this.sIsOpen) {
|
|
|
workSData = zjm.filter( e =>{
|
|
|
return this.userId == e.userid
|
|
@@ -1207,15 +1213,13 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ // 新增作业时进入这个,和上方代码一样,都是为了筛选作业
|
|
|
if (
|
|
|
this.show &&
|
|
|
this.toolIndex !== null &&
|
|
|
JSON.stringify(this.worksStudent) !==
|
|
|
JSON.stringify(workSData)
|
|
|
) {
|
|
|
- console.log('6666');
|
|
|
-
|
|
|
- // if (newValue[this.toolIndex].length) {
|
|
|
let yym = JSON.parse(
|
|
|
JSON.stringify(newValue[this.toolIndex])
|
|
|
);
|
|
@@ -1233,56 +1237,6 @@ export default {
|
|
|
this.testJsonCopy = yym.filter( e =>{
|
|
|
return this.userId == e.userid
|
|
|
})
|
|
|
- // }
|
|
|
- // console.log('this.testData222',this.testData);
|
|
|
- // console.log('this.testJsonCopy222',this.testJsonCopy);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // // 获取学生上传作业的格式
|
|
|
- // if (this.toolType == 45 ) { //选择题
|
|
|
- // this.testJson.forEach(e=>{
|
|
|
- // if (e.type == '2') {
|
|
|
- // this.radioS.push([])
|
|
|
- // }else{
|
|
|
- // this.radioS.push('')
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.testJsonCopy = [{answer:[],testJson:this.testJson ? this.testData.testJson : null}]
|
|
|
- // }else if(this.toolType == 52 ) { //文本
|
|
|
- // if (this.testJsonCopy && this.testJsonCopy.length) {
|
|
|
- // this.questionsData = JSON.parse(this.testJsonCopy[0].works).text
|
|
|
- // }else{
|
|
|
- // this.questionsData = this.testData.wordJson.text
|
|
|
- // }
|
|
|
- // }else if(this.toolType == 48) { //表格
|
|
|
- // if (this.testJsonCopy && this.testJsonCopy.length) {
|
|
|
- // this.questionsData = JSON.parse(this.testJsonCopy[0].works).text
|
|
|
- // }else if(this.testData && this.testData.tableJson && this.testData.tableJson.text){
|
|
|
- // this.questionsData = this.testData.tableJson.text
|
|
|
- // }else{
|
|
|
- // this.questionsData = ''
|
|
|
- // }
|
|
|
- // }else if(this.toolType == 47) { //排序
|
|
|
-
|
|
|
- // // 把正确答案的数组先创建好
|
|
|
- // this.testData.sentenceList.forEach((e,i)=>{
|
|
|
- // this.radioS.push([])
|
|
|
- // e.addSentence.forEach((k,l)=>{
|
|
|
- // this.radioS[i].push('')
|
|
|
- // })
|
|
|
- // })
|
|
|
- // console.log('this.testData.sentenceList',this.testData.sentenceList);
|
|
|
-
|
|
|
- // //把题目选项点击隐藏写好
|
|
|
- // this.testData.sentenceList.forEach((e,i)=>{
|
|
|
- // this.isShowList.push([])
|
|
|
- // e.addSentence.forEach((k,l)=>{
|
|
|
- // this.isShowList[i].push(true)
|
|
|
- // })
|
|
|
- // })
|
|
|
- // }
|
|
|
-
|
|
|
|
|
|
this.dialogTypeList[2].loading = false;
|
|
|
}
|
|
@@ -1454,7 +1408,7 @@ export default {
|
|
|
'console.log(_js);\n' +
|
|
|
"document.head.appendChild(_js);\n";
|
|
|
iframeWindow.document.head.appendChild(_ajs);
|
|
|
- this.$message.success('上传成功')
|
|
|
+ // this.$message.success('上传成功')
|
|
|
},
|
|
|
getEditorContent(iframe) {
|
|
|
return new Promise((resolve, reject) => {
|