|
@@ -584,6 +584,11 @@
|
|
|
src="../assets/icon/thirdToolList/work.png" alt />
|
|
|
<div style="margin: 5px 0">作业提交</div>
|
|
|
</div>
|
|
|
+ <div v-if="tooC == 50">
|
|
|
+ <img @click="addTools(tooC, toolIndex, taskCount)"
|
|
|
+ src="../assets/icon/thirdToolList/plwork.png" alt />
|
|
|
+ <div style="margin: 5px 0">批量上传</div>
|
|
|
+ </div>
|
|
|
<div v-if="tooC == 21">
|
|
|
<img @click="addTools(tooC, toolIndex, taskCount)"
|
|
|
src="../assets/icon/fourthToolList/program.png" alt />
|
|
@@ -1144,6 +1149,105 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="
|
|
|
+ tool.tool.indexOf(50) != -1
|
|
|
+ " class="worksBox">
|
|
|
+ <div class="zuoyeYulan" v-if="
|
|
|
+ worksStudent.length &&
|
|
|
+ worksStudent[toolIndex].length > 0
|
|
|
+ ">
|
|
|
+ <span>作业预览</span>
|
|
|
+ <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="worksDetailBox" v-if="
|
|
|
+ worksStudent.length &&
|
|
|
+ worksStudent[toolIndex].length > 0
|
|
|
+ ">
|
|
|
+ <div class="works" style="
|
|
|
+ width: 200px;
|
|
|
+ height: 140px;
|
|
|
+ margin: 10px 10px 10px 0;
|
|
|
+ border-radius: 15px;
|
|
|
+ box-shadow: 0 0 6px 1px #dfdada;
|
|
|
+ " v-for="(w, wIndex) in worksStudent[toolIndex]" :key="wIndex"
|
|
|
+ :class="w.type == 1 ? 'isTypeOne' : ''">
|
|
|
+ <div class="workImg" v-if="w.type == 0">
|
|
|
+ <!-- @click="commentOther(w, toolIndex, wIndex)" -->
|
|
|
+ <img :src="w.works" @click="previewImg(w.works)" alt />
|
|
|
+ <div class="answerScore" v-if="w.score" @click.stop="openScore(w)"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div class="answerScore" @click.stop="openScore(w)" v-else-if="courseDetail.userid == userid"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
+ <img class="deleteImg" src="../assets/deleteworks.png"
|
|
|
+ v-if="w.userid == userid || tType == 1 || tType == 4" @click.stop="deleteWorks(w.wid)"
|
|
|
+ alt />
|
|
|
+ </div>
|
|
|
+ <div class="workImg" v-if="w.type == 1">
|
|
|
+ <img :src="word" @click="commentOther(w, toolIndex, wIndex)" alt />
|
|
|
+ <!-- @click="openFile(w.works)" -->
|
|
|
+ <div class="answerScore" v-if="w.score" @click.stop="openScore(w)"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div class="answerScore" @click.stop="openScore(w)" v-else-if="courseDetail.userid == userid"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
+ <img class="deleteImg" src="../assets/deleteworks.png"
|
|
|
+ v-if="w.userid == userid || tType == 1 || tType == 4" @click.stop="deleteWorks(w.wid)"
|
|
|
+ alt />
|
|
|
+ </div>
|
|
|
+ <div class="workImg" v-if="w.type == 3">
|
|
|
+ <img style="cursor: pointer" :src="video" @click="commentOther(w, toolIndex, wIndex)" alt />
|
|
|
+ <!-- @click="openVideo(w.works)" -->
|
|
|
+ <div class="answerScore" v-if="w.score" @click.stop="openScore(w)"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div class="answerScore" @click.stop="openScore(w)" v-else-if="courseDetail.userid == userid"
|
|
|
+ :class="{ rightW: w.userid == userid || tType == 1 || tType == 4 || w.ateacher == userid }">
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
+ <img class="deleteImg" src="../assets/deleteworks.png"
|
|
|
+ v-if="w.userid == userid || tType == 1 || tType == 4" @click.stop="deleteWorks(w.wid)"
|
|
|
+ alt />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="comment" style="min-width: 200px">
|
|
|
+ <div class="worksName">
|
|
|
+ <div>{{ w.sName }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="commentList">
|
|
|
+ <div class="commentList">
|
|
|
+ <div class="commentImg" @click="
|
|
|
+ isLikes(w.wid, userid, 1, null, w.isLikes)
|
|
|
+ ">
|
|
|
+ <img :src="w.isLikes == true ? likes : noLikes" alt="" />
|
|
|
+ </div>
|
|
|
+ <div>{{ w.likesCount }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="commentList" style="margin-right: 15px">
|
|
|
+ <div class="commentImg" @click="commentOther(w, toolIndex, wIndex)">
|
|
|
+ <img src="../assets/icon/comment/comment.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div>{{ w.commentCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="font-size: 18px">未提交</div>
|
|
|
+ <div class="noWorksS">
|
|
|
+ <div v-for="(s, sIndex) in noWorksS[toolIndex]" :key="sIndex" class="noWorksName"
|
|
|
+ @click="teacherWorkSubmit(16, toolIndex, taskCount, s)">
|
|
|
+ {{ s.student }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div v-if="
|
|
|
tType &&
|
|
|
((tType == 2 && sIsOpen == true) ||
|
|
@@ -3549,6 +3653,44 @@
|
|
|
<el-button type="primary" @click="deleteChair">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="批量上传" :visible.sync="dialogVisiblePl" :append-to-body="true" width="700px"
|
|
|
+ :before-close="handleClose" class="dialog_change">
|
|
|
+ <div class="marginT">
|
|
|
+ <div>上传文件</div>
|
|
|
+ <div class="plworkBox">
|
|
|
+ <div class="chapter_add" style="
|
|
|
+ display: flex;
|
|
|
+ width: 150px;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin: 0 10px 10px 0;
|
|
|
+ " v-for="(item, index) in plworkFile" :key="index">
|
|
|
+ <div class="upCover2">
|
|
|
+ <img :src="item.url" alt v-if="item.fileType == 1" />
|
|
|
+ <img :src="word" alt v-else-if="item.fileType == 4" />
|
|
|
+ <img :src="video" alt v-else />
|
|
|
+ <!-- <span class="picName">{{ item.name }}</span> -->
|
|
|
+ <el-input v-model="item.username" placeholder="请输入学生名字" style="margin-top:10px"></el-input>
|
|
|
+
|
|
|
+ <div class="deleteWord" @click="clean2(index)">
|
|
|
+ <img src="../assets/icon/deleteWorks.png" alt />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="chapter_add" style="width:auto" @click="addImg($event)">
|
|
|
+ <div class="up_photo2">
|
|
|
+ <img src="../assets/icon/plwork.png" alt />
|
|
|
+ <span>点击批量上传文件</span>
|
|
|
+ </div>
|
|
|
+ <input type="file"
|
|
|
+ accept="video/mp4, video/quicktime, video/x-msvideo,application/pdf, application/.ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/*"
|
|
|
+ capture="camera" style="display: none" @change="beforeUpload1($event, 6)" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="upload_send" @click="addCourseWorksPl(taskCount)" v-if="!proVisible">提交</div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -3593,6 +3735,7 @@ export default {
|
|
|
bg: null,
|
|
|
drawShow: false,
|
|
|
dialogVisible: false,
|
|
|
+ dialogVisiblePl: false,
|
|
|
commentDialogVisible: false,
|
|
|
videoVisible: false,
|
|
|
isStar: false,
|
|
@@ -3657,6 +3800,7 @@ export default {
|
|
|
upFile: [],
|
|
|
},
|
|
|
],
|
|
|
+ plworkFile: [],
|
|
|
mr: require("../assets/vedioPic.png"),
|
|
|
word: require("../assets/icon/isWord.png"),
|
|
|
video: require("../assets/icon/isVideo.png"),
|
|
@@ -3863,6 +4007,9 @@ export default {
|
|
|
this.studyJuri[0].upFile.splice(0, 1);
|
|
|
}
|
|
|
},
|
|
|
+ clean2(index) {
|
|
|
+ this.plworkFile.splice(index, 1);
|
|
|
+ },
|
|
|
handleClose(done) {
|
|
|
if (this.videoDetail.sources && this.videoDetail.sources[0]) {
|
|
|
this.videoDetail.sources[0].src = "";
|
|
@@ -4068,6 +4215,44 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ addCourseWorksPl(i) {
|
|
|
+ let _files = this.plworkFile
|
|
|
+ var c = 1
|
|
|
+ for(var k=0;k<_files.length;k++){
|
|
|
+ if(!_files[k].username){
|
|
|
+ c = 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(c == 2){
|
|
|
+ this.$message.error("请填写学生姓名");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ ateacher: this.userid,
|
|
|
+ cid: this.id,
|
|
|
+ stage: this.courseType,
|
|
|
+ task: i,
|
|
|
+ tool: this.toolindex,
|
|
|
+ content: JSON.stringify(_files).replaceAll(/%/g, "%25"),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "addCourseWorksPl", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "提交成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.plworkFile = [];
|
|
|
+ this.dialogVisiblePl = false;
|
|
|
+ this.getCourseDetail();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("提交失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
addCourseWorks2(i) {
|
|
|
var typesql;
|
|
|
if (this.fileType === 0) {
|
|
@@ -4304,7 +4489,8 @@ export default {
|
|
|
b[j].type == 7) &&
|
|
|
a[i].tool[0] != 15 &&
|
|
|
a[i].tool[0] != 4 &&
|
|
|
- a[i].tool[0] != 45
|
|
|
+ a[i].tool[0] != 45 &&
|
|
|
+ a[i].tool[0] != 50
|
|
|
) {
|
|
|
if (
|
|
|
c.indexOf(
|
|
@@ -4444,7 +4630,7 @@ export default {
|
|
|
userid: b[j].userid,
|
|
|
wid: b[j].id,
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4963,7 +5149,8 @@ export default {
|
|
|
b[j].type == 7) &&
|
|
|
a[i].tool[0] != 15 &&
|
|
|
a[i].tool[0] != 4 &&
|
|
|
- a[i].tool[0] != 45
|
|
|
+ a[i].tool[0] != 45 &&
|
|
|
+ a[i].tool[0] != 50
|
|
|
) {
|
|
|
if (
|
|
|
c.indexOf(
|
|
@@ -5177,10 +5364,27 @@ export default {
|
|
|
commentJson: commentJson,
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
+ }else if( a[i].tool[0] == 50 && b[j].atool == 50) {
|
|
|
+ this.worksStudent[i].push({
|
|
|
+ userid: b[j].userid,
|
|
|
+ ateacher: b[j].ateacher,
|
|
|
+ wid: b[j].id,
|
|
|
+ works: b[j].content,
|
|
|
+ sName: b[j].userid,
|
|
|
+ type: b[j].type == 1 ? 0 : b[j].type == 4 ? 1 : 3,
|
|
|
+ time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
+ img: b[j].img,
|
|
|
+ likesCount: likesCount,
|
|
|
+ commentCount: commentCount,
|
|
|
+ isLikes: isLikes,
|
|
|
+ commentJson: commentJson,
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
|
|
|
}
|
|
|
+ console.log(this.worksStudent);
|
|
|
}
|
|
|
if (this.worksStudent[i] && this.worksStudent[i].length) {
|
|
|
this.worksStudent[i] = this.worksStudent[i].sort(function (a, b) {
|
|
@@ -5195,7 +5399,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
for (var i = 0; i < a.length; i++) {
|
|
|
for (var j = 0; j < b.length; j++) {
|
|
|
var data = b[j];
|
|
@@ -5484,6 +5687,38 @@ export default {
|
|
|
_this.addPz("3", data.Location);
|
|
|
} else if (type == 5) {
|
|
|
_this.addImgDrawImG(data.Location);
|
|
|
+ } else if (type == 6) {
|
|
|
+ var _ftype = 1
|
|
|
+ if (
|
|
|
+ c.indexOf(
|
|
|
+ data.Location
|
|
|
+ .split(".")
|
|
|
+ [
|
|
|
+ data.Location.split(".").length - 1
|
|
|
+ ].toLocaleUpperCase()
|
|
|
+ ) != -1
|
|
|
+ ) {
|
|
|
+ _ftype = 5;
|
|
|
+ } else if (
|
|
|
+ b.indexOf(
|
|
|
+ data.Location
|
|
|
+ .split(".")
|
|
|
+ [
|
|
|
+ data.Location.split(".").length - 1
|
|
|
+ ].toLocaleUpperCase()
|
|
|
+ ) != -1
|
|
|
+ ) {
|
|
|
+ _ftype = 4;
|
|
|
+ } else {
|
|
|
+ _ftype = 1;
|
|
|
+ }
|
|
|
+ _this.plworkFile.push({
|
|
|
+ name: file.name,
|
|
|
+ url: data.Location,
|
|
|
+ uid: file.uid,
|
|
|
+ fileType: _ftype,
|
|
|
+ username: '',
|
|
|
+ })
|
|
|
}
|
|
|
_this.imgChange(null, null, type);
|
|
|
console.log(data.Location);
|
|
@@ -6955,6 +7190,13 @@ export default {
|
|
|
this.toolsCount(a, t);
|
|
|
}
|
|
|
this.dialogVisible = true;
|
|
|
+ } else if (t == 50) {
|
|
|
+ if (this.tType == 2) {
|
|
|
+ this.$message.error('不支持学生使用')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.plworkFile = []
|
|
|
+ this.dialogVisiblePl = true;
|
|
|
} else if (t == 8) {
|
|
|
if (this.libraryCount > 0) {
|
|
|
this.updateCount(this.libraryCount, t);
|
|
@@ -7923,6 +8165,24 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
+.upCover2 {
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ margin: 0 15px 10px 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ justify-content: center;
|
|
|
+ align-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.upCover2>img {
|
|
|
+ width: 100%;
|
|
|
+ height: 90px;
|
|
|
+ object-fit: contain;
|
|
|
+}
|
|
|
+
|
|
|
.chapter_add {
|
|
|
width: 120px;
|
|
|
position: relative;
|
|
@@ -8176,6 +8436,33 @@ export default {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
|
|
|
+.up_photo2 {
|
|
|
+ width: 120px;
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: rgb(242, 246, 255);
|
|
|
+ padding: 25px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.up_photo2 img {
|
|
|
+ width: 60%;
|
|
|
+}
|
|
|
+
|
|
|
+.up_photo2 span {
|
|
|
+ color: #898989;
|
|
|
+}
|
|
|
+
|
|
|
+.plworkBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+
|
|
|
.upload_send {
|
|
|
margin: 30px auto 30px;
|
|
|
width: 60%;
|