|
@@ -257,7 +257,7 @@
|
|
|
>
|
|
|
<div class="title">查看文档</div>
|
|
|
<el-form class="textBox">
|
|
|
- <el-form-item label="文档标题" class="textTitle">
|
|
|
+ <el-form-item class="textTitle">
|
|
|
<div
|
|
|
style="
|
|
|
font-size: 22px;
|
|
@@ -268,7 +268,7 @@
|
|
|
{{ text.name }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <div style="color: #918f8f; width: 85%">文档内容</div>
|
|
|
+ <!-- <div style="color: #918f8f; width: 85%">文档内容</div> -->
|
|
|
<div v-html="text.url" class="textContent"></div>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -346,7 +346,7 @@
|
|
|
vedio[taskCount].length > 0
|
|
|
"
|
|
|
>
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="vedioNav"
|
|
|
style="
|
|
|
width: 80px;
|
|
@@ -358,12 +358,12 @@
|
|
|
"
|
|
|
>
|
|
|
视频
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div
|
|
|
class="vedioTimeBox"
|
|
|
v-for="(media, vedioIndex) in vedio[taskCount]"
|
|
|
:key="vedioIndex + '1'"
|
|
|
- @click="lookVedio(media.url)"
|
|
|
+ @click="lookVedio(media.url, vedioIndex)"
|
|
|
>
|
|
|
<div
|
|
|
class="media"
|
|
@@ -385,7 +385,12 @@
|
|
|
</div> -->
|
|
|
<!-- <div class="vedioName">{{ media.name }}</div> -->
|
|
|
</div>
|
|
|
- <div class="vedioName">{{ media.name }}</div>
|
|
|
+ <div
|
|
|
+ class="vedioName"
|
|
|
+ :class="isClickNav == vedioIndex ? 'isClickNav' : ''"
|
|
|
+ >
|
|
|
+ {{ media.name }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
@@ -399,7 +404,7 @@
|
|
|
:key="textIndex + '2'"
|
|
|
@click="lookText(taskCount, textIndex)"
|
|
|
>
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="vedioNav"
|
|
|
style="
|
|
|
width: 80px;
|
|
@@ -411,9 +416,12 @@
|
|
|
"
|
|
|
>
|
|
|
文档
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div style="width: calc(100% - 115px)">
|
|
|
- <div class="navText">
|
|
|
+ <div
|
|
|
+ class="navText"
|
|
|
+ :class="isClickNav == textIndex ? 'isClickNav' : ''"
|
|
|
+ >
|
|
|
{{
|
|
|
textList[taskCount].length > 0 ? text.name : ""
|
|
|
}}.doc
|
|
@@ -451,9 +459,9 @@
|
|
|
class="newNav"
|
|
|
v-for="(lines, lineIndex) in lineList[taskCount]"
|
|
|
:key="lineIndex + '4'"
|
|
|
- @click="doUrl(lines.url)"
|
|
|
+ @click="doUrl(lines.url, lineIndex)"
|
|
|
>
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="vedioNav"
|
|
|
style="
|
|
|
width: 80px;
|
|
@@ -465,9 +473,12 @@
|
|
|
"
|
|
|
>
|
|
|
链接
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div style="width: calc(100% - 115px)">
|
|
|
- <div class="navText">
|
|
|
+ <div
|
|
|
+ class="navText"
|
|
|
+ :class="isClickNav == lineIndex ? 'isClickNav' : ''"
|
|
|
+ >
|
|
|
<a
|
|
|
style="text-decoration: none; color: #000"
|
|
|
target="_Blank"
|
|
@@ -487,7 +498,7 @@
|
|
|
:key="fileIndex"
|
|
|
@click="downFile(f, fileIndex)"
|
|
|
>
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="vedioNav"
|
|
|
style="
|
|
|
width: 80px;
|
|
@@ -499,9 +510,12 @@
|
|
|
"
|
|
|
>
|
|
|
文档
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div style="width: calc(100% - 115px)">
|
|
|
- <div class="navText">
|
|
|
+ <div
|
|
|
+ class="navText"
|
|
|
+ :class="isClickNav == fileIndex ? 'isClickNav' : ''"
|
|
|
+ >
|
|
|
{{ f.name }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1302,13 +1316,22 @@
|
|
|
v-for="(w, wIndex) in worksStudent[toolIndex]"
|
|
|
:key="wIndex"
|
|
|
>
|
|
|
- <div class="workImg">
|
|
|
+ <div
|
|
|
+ class="workImg"
|
|
|
+ style="
|
|
|
+ border-radius: 15px;
|
|
|
+ box-shadow: 0px 0px 10px 10px #f2f2f2;
|
|
|
+ "
|
|
|
+ >
|
|
|
<!-- <img
|
|
|
src="../assets/icon/works/noImg.png"
|
|
|
@click="openTools(15, toolIndex, taskCount, w.works)"
|
|
|
alt=""
|
|
|
/>-->
|
|
|
- <div class="answerBg">
|
|
|
+ <div
|
|
|
+ class="answerBg"
|
|
|
+ style="border-radius: 15px 15px 0 0"
|
|
|
+ >
|
|
|
<div>{{ w.sName }}</div>
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
@@ -1321,6 +1344,31 @@
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
+ <div class="comment">
|
|
|
+ <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">
|
|
|
+ <div class="commentImg">
|
|
|
+ <img
|
|
|
+ src="../assets/icon/comment/comment.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div>{{ w.commentCount }}</div>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -2361,12 +2409,15 @@ export default {
|
|
|
],
|
|
|
mr: require("../assets/vedioPic.png"),
|
|
|
word: require("../assets/uploadMp4.png"),
|
|
|
+ noLikes: require("../assets/icon/comment/noLikes.png"),
|
|
|
+ likes: require("../assets/icon/comment/likes.png"),
|
|
|
courseDetail: {},
|
|
|
chapInfo: [],
|
|
|
chapInfoList: [],
|
|
|
taskCount: 0,
|
|
|
imgList: [],
|
|
|
noImgList: [],
|
|
|
+ isClickNav: "",
|
|
|
navId: "",
|
|
|
playerOptions: {
|
|
|
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
|
|
@@ -2629,6 +2680,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
selectStudent() {
|
|
|
+ //学生查看自己作业
|
|
|
let params = {
|
|
|
uid: this.userid,
|
|
|
cid: this.id,
|
|
@@ -2698,7 +2750,51 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ isLikes(wid, uid, t, c, isLikes) {
|
|
|
+ if (isLikes == false) {
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ wid: wid,
|
|
|
+ lid: uid,
|
|
|
+ t: t,
|
|
|
+ c: c,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "insertComment", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "点赞成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.selectSWorks();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("点赞失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ let params = {
|
|
|
+ wid: wid,
|
|
|
+ lid: uid,
|
|
|
+ type: 1,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "deleteComment", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "取消点赞成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.selectSWorks();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
selectSWorks() {
|
|
|
+ //教师查看全部作业
|
|
|
let params = {
|
|
|
cid: this.id,
|
|
|
s: this.courseType,
|
|
@@ -2713,12 +2809,17 @@ export default {
|
|
|
].toolChoose;
|
|
|
var b = res.data[0];
|
|
|
var c = ["PDF", "DOC", "DOCX", "PPT", "PPTX", "XLSX", "XLS"];
|
|
|
+ var d = res.data[1];
|
|
|
+ var e = res.data[2];
|
|
|
|
|
|
for (var i = 0; i < a.length; i++) {
|
|
|
this.worksStudent[i] = [];
|
|
|
this.isWorksS[i] = [];
|
|
|
this.checkJson[i] = [];
|
|
|
for (var j = 0; j < b.length; j++) {
|
|
|
+ var likesCount = 0;
|
|
|
+ var commentCount = 0;
|
|
|
+ var isLikes = false;
|
|
|
var data = b[j];
|
|
|
if (i == b[j].tool) {
|
|
|
if (data.type == 2 && a[i].tool[0] == 4) {
|
|
@@ -2742,6 +2843,22 @@ export default {
|
|
|
] = 1);
|
|
|
}
|
|
|
}
|
|
|
+ for (var k = 0; k < d.length; k++) {
|
|
|
+ //点赞
|
|
|
+ if (d[k].workId == b[j].id) {
|
|
|
+ likesCount++;
|
|
|
+
|
|
|
+ if (d[k].likesId == this.userid) {
|
|
|
+ isLikes = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (var l = 0; l < e.length; l++) {
|
|
|
+ //评论
|
|
|
+ if (d[k].workId == b[j].id) {
|
|
|
+ commentCount++;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (
|
|
|
(b[j].type == 1 || b[j].type == 4) &&
|
|
|
a[i].tool[0] != 15 &&
|
|
@@ -2755,32 +2872,48 @@ export default {
|
|
|
) != -1
|
|
|
) {
|
|
|
this.worksStudent[i].push({
|
|
|
+ wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
type: 1,
|
|
|
time: b[j].time,
|
|
|
+ likesCount: likesCount,
|
|
|
+ commentCount: commentCount,
|
|
|
+ isLikes: isLikes,
|
|
|
});
|
|
|
} else {
|
|
|
this.worksStudent[i].push({
|
|
|
+ wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
type: 0,
|
|
|
time: b[j].time,
|
|
|
+ likesCount: likesCount,
|
|
|
+ commentCount: commentCount,
|
|
|
+ isLikes: isLikes,
|
|
|
});
|
|
|
}
|
|
|
} else if (b[j].type == 3 && a[i].tool[0] == 15) {
|
|
|
this.worksStudent[i].push({
|
|
|
+ wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
+ likesCount: likesCount,
|
|
|
+ commentCount: commentCount,
|
|
|
+ isLikes: isLikes,
|
|
|
});
|
|
|
} else if (b[j].type == 2 && a[i].tool[0] == 4) {
|
|
|
this.worksStudent[i].push({
|
|
|
+ wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
+ likesCount: likesCount,
|
|
|
+ commentCount: commentCount,
|
|
|
+ isLikes: isLikes,
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -3331,11 +3464,6 @@ export default {
|
|
|
this.text = this.textList[this.taskCount][0];
|
|
|
}
|
|
|
} else {
|
|
|
- console.log(
|
|
|
- this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
|
|
|
- this.taskCount
|
|
|
- ].chapterData
|
|
|
- );
|
|
|
for (
|
|
|
var y = 0;
|
|
|
y <
|
|
@@ -3504,18 +3632,22 @@ export default {
|
|
|
this.playerO = this.playerOptions;
|
|
|
},
|
|
|
onPlayerPlay() {},
|
|
|
- lookVedio(u) {
|
|
|
+ lookVedio(u, i) {
|
|
|
+ this.isClickNav = "";
|
|
|
// this.playerOptions.sources[0].src = u;
|
|
|
var d = JSON.parse(JSON.stringify(this.playerOptions));
|
|
|
d.sources[0].src = u;
|
|
|
this.playerO[this.taskCount] = d;
|
|
|
this.showType = 0;
|
|
|
+ this.isClickNav = i;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
lookText(i, t) {
|
|
|
+ this.isClickNav = "";
|
|
|
this.text = this.textList[i][t];
|
|
|
// this.dialogVisible1 = true;
|
|
|
this.showType = 1;
|
|
|
+ this.isClickNav = t;
|
|
|
},
|
|
|
lookTools(i, t) {
|
|
|
this.chapTools = this.chapToolList[i][t];
|
|
@@ -3541,6 +3673,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
downFile(f, i) {
|
|
|
+ this.isClickNav = "";
|
|
|
this.pptImgUrl1 = "";
|
|
|
var a = ["PPT", "PPTX", "XLSX", "XLS", "DOC", "DOCX"]; //"PDF",
|
|
|
if (
|
|
@@ -3569,6 +3702,7 @@ export default {
|
|
|
} else {
|
|
|
window.open(this.file[i].url);
|
|
|
}
|
|
|
+ this.isClickNav = i;
|
|
|
},
|
|
|
downFileList(i) {
|
|
|
window.open(this.noImgList[i].url);
|
|
@@ -3743,11 +3877,13 @@ export default {
|
|
|
// this.answerDialogVisible = true;
|
|
|
// }
|
|
|
},
|
|
|
- doUrl(url) {
|
|
|
+ doUrl(url, i) {
|
|
|
+ this.isClickNav = "";
|
|
|
if (url.indexOf("https://") == -1 && url.indexOf("http://") == -1) {
|
|
|
url = "https://" + url;
|
|
|
}
|
|
|
window.open(url);
|
|
|
+ this.isClickNav = i;
|
|
|
},
|
|
|
addTools(t, i, index) {
|
|
|
var a = 0;
|
|
@@ -5291,7 +5427,7 @@ export default {
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
.answerBg {
|
|
|
- background: url("../assets/icon/answerBg.png") no-repeat;
|
|
|
+ background: url("../assets/icon/answerBgNew.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -5653,4 +5789,36 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
+.isClickNav {
|
|
|
+ color: #499eef;
|
|
|
+}
|
|
|
+.commentImg {
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.commentImg > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.comment {
|
|
|
+ background: #f9f9f9;
|
|
|
+ border-radius: 0 0 15px 15px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ height: 35px;
|
|
|
+ padding-right: 15px;
|
|
|
+}
|
|
|
+.commentList {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ align-content: center;
|
|
|
+ margin-left: 15px;
|
|
|
+}
|
|
|
</style>
|