|
@@ -926,9 +926,37 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="workImg" v-if="w.type == 1">
|
|
|
<img :src="word" @click="openFile(w.works)" alt />
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="workImg" v-if="w.type == 3">
|
|
|
<img
|
|
@@ -937,6 +965,20 @@
|
|
|
@click="openVideo(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="worksName">
|
|
|
<div>{{ w.sName }}</div>
|
|
@@ -1053,6 +1095,20 @@
|
|
|
{{ JSON.parse(w.works)[0].answer }}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1096,6 +1152,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="worksName">
|
|
|
<div>{{ w.sName }}</div>
|
|
@@ -1141,6 +1211,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="worksName">
|
|
|
<div>{{ w.sName }}</div>
|
|
@@ -1186,6 +1270,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="worksName">
|
|
|
<div>{{ w.sName }}</div>
|
|
@@ -1231,6 +1329,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="worksName">
|
|
|
<div>{{ w.sName }}</div>
|
|
@@ -1335,9 +1447,37 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="workImg" v-if="w.type == 1">
|
|
|
<img :src="word" @click="openFile(w.works)" alt />
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="workImg" v-if="w.type == 3">
|
|
|
<img
|
|
@@ -1346,6 +1486,20 @@
|
|
|
@click="openVideo(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="comment" style="min-width: 200px">
|
|
@@ -1599,6 +1753,20 @@
|
|
|
{{ JSON.parse(w.works)[0].answer }}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="comment">
|
|
|
<div class="commentList">
|
|
@@ -1694,6 +1862,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="comment" style="min-width: 200px">
|
|
|
<div class="worksName">
|
|
@@ -1793,6 +1975,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="comment" style="min-width: 200px">
|
|
|
<div class="worksName">
|
|
@@ -1892,6 +2088,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="comment" style="min-width: 200px">
|
|
|
<div class="worksName">
|
|
@@ -1991,6 +2201,20 @@
|
|
|
@click="previewImg(w.works)"
|
|
|
alt
|
|
|
/>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ v-if="w.score"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(w.score).wScore }}分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="answerScore"
|
|
|
+ @click.stop="openScore(w)"
|
|
|
+ v-else-if="courseDetail.userid == userid"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="comment" style="min-width: 200px">
|
|
|
<div class="worksName">
|
|
@@ -3570,6 +3794,102 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="教师评分"
|
|
|
+ :visible.sync="dialogVisibleScore"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="800px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="dialog_diy"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div class="studentDetail">
|
|
|
+ <div class="tx"><img src="../assets/avatar.png" alt="" /></div>
|
|
|
+ <div class="nameAndTime">
|
|
|
+ <div style="margin-bottom: 5px">{{ commentDetail.sName }}</div>
|
|
|
+ <div>{{ commentDetail.time }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="worksAnswer"
|
|
|
+ v-if="commentDetail.works && commentDetail.type == 2"
|
|
|
+ >
|
|
|
+ {{ JSON.parse(commentDetail.works)[0].answer }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="worksAnswer"
|
|
|
+ v-if="commentDetail.works && commentDetail.type == 1"
|
|
|
+ >
|
|
|
+ <pdf
|
|
|
+ v-if="showPDF"
|
|
|
+ :pdfUrl="pptImgUrl"
|
|
|
+ style="width: 100%; height: 520px; overflow: auto"
|
|
|
+ :class="{ fullStyle: full }"
|
|
|
+ ></pdf>
|
|
|
+ <iframe
|
|
|
+ v-else
|
|
|
+ :src="pptImgUrl"
|
|
|
+ frameborder="0"
|
|
|
+ width="100%"
|
|
|
+ height="600"
|
|
|
+ :class="{ fullStyle: full }"
|
|
|
+ ></iframe>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="worksAnswer"
|
|
|
+ v-if="commentDetail.works && commentDetail.type == 0"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="commentDetail.works"
|
|
|
+ alt=""
|
|
|
+ @click="previewImg(commentDetail.works)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="worksAnswer"
|
|
|
+ v-if="commentDetail.works && commentDetail.type == 3"
|
|
|
+ >
|
|
|
+ <video-player
|
|
|
+ class="video-player vjs-custom-skin"
|
|
|
+ :playsinline="true"
|
|
|
+ :options="videoDetail"
|
|
|
+ @play="onPlayerPlay($event)"
|
|
|
+ style="width: 90%; height: 100%; margin: 0 0 0 30px"
|
|
|
+ ></video-player>
|
|
|
+ </div>
|
|
|
+ <div class="scoreBox">
|
|
|
+ <span class="t">请输入分数</span
|
|
|
+ ><el-input-number
|
|
|
+ :disabled="courseDetail.userid != userid"
|
|
|
+ v-model="wScore"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ :max="100"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ <div class="scoreDetailBox">
|
|
|
+ <span class="t">评分评论</span>
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ :disabled="courseDetail.userid != userid"
|
|
|
+ resize="none"
|
|
|
+ v-model="scoreDetail"
|
|
|
+ placeholder="请输入对学生的评价"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button
|
|
|
+ @click="(dialogVisibleScore = false), (this.commentIndexJson = {})"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" v-if="courseDetail.userid == userid" @click="scoreWork(commentDetail.wid)"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -3606,6 +3926,7 @@ export default {
|
|
|
isStar: false,
|
|
|
studentEvalDialogVisible: false,
|
|
|
dialogVisibleSelect: false,
|
|
|
+ dialogVisibleScore: false,
|
|
|
bzText: "",
|
|
|
commentDetail: [],
|
|
|
selectAnswer: [],
|
|
@@ -3656,6 +3977,7 @@ export default {
|
|
|
video: require("../assets/icon/isVideo.png"),
|
|
|
noLikes: require("../assets/icon/comment/noLikes.png"),
|
|
|
likes: require("../assets/icon/comment/likes.png"),
|
|
|
+ scoreImg: require("../assets/score.png"),
|
|
|
courseDetail: {},
|
|
|
isSelect: false,
|
|
|
chapInfo: [],
|
|
@@ -3809,6 +4131,8 @@ export default {
|
|
|
commentIndexJson: {},
|
|
|
Stbodywidth: 0,
|
|
|
pzType: 1,
|
|
|
+ wScore: 0,
|
|
|
+ scoreDetail: "",
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -3997,7 +4321,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
- if (Object.keys(this.commentIndexJson).length) {
|
|
|
+ if (
|
|
|
+ Object.keys(this.commentIndexJson).length &&
|
|
|
+ !this.dialogVisibleScore
|
|
|
+ ) {
|
|
|
this.commentOther(
|
|
|
this.worksStudent[this.commentIndexJson.toolIndex][
|
|
|
this.commentIndexJson.wIndex
|
|
@@ -4083,6 +4410,7 @@ export default {
|
|
|
this.workStudent[i].push({
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 1,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4098,6 +4426,7 @@ export default {
|
|
|
wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 3,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4107,6 +4436,7 @@ export default {
|
|
|
wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 4,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4116,6 +4446,7 @@ export default {
|
|
|
wid: b[j].id,
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 5,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4123,6 +4454,7 @@ export default {
|
|
|
this.workStudent[i].push({
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 0,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4131,6 +4463,7 @@ export default {
|
|
|
this.workStudent[i].push({
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4138,6 +4471,7 @@ export default {
|
|
|
this.workStudent[i].push({
|
|
|
works: b[j].content,
|
|
|
sName: b[j].name,
|
|
|
+ score: b[j].score,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
});
|
|
@@ -4243,6 +4577,43 @@ export default {
|
|
|
this.commentDetail = w;
|
|
|
}
|
|
|
},
|
|
|
+ openScore(w) {
|
|
|
+ this.wScore = 0;
|
|
|
+ this.wScore = w.score ? JSON.parse(w.score).wScore : 0;
|
|
|
+ this.scoreDetail = w.score ? JSON.parse(w.score).detail : "";
|
|
|
+ this.commentDetail = [];
|
|
|
+ this.dialogVisibleScore = true;
|
|
|
+ if (w.works && w.type == 1) {
|
|
|
+ this.commentDetail = w;
|
|
|
+ this.pptImgUrl = "";
|
|
|
+ var a = ["PPT", "PPTX", "XLSX", "XLS", "DOC", "DOCX"];
|
|
|
+ if (
|
|
|
+ a.indexOf(
|
|
|
+ w.works
|
|
|
+ .split(".")
|
|
|
+ [w.works.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) != -1
|
|
|
+ ) {
|
|
|
+ this.pptImgUrl =
|
|
|
+ "https://view.officeapps.live.com/op/view.aspx?src=" + w.works;
|
|
|
+ this.showPDF = false;
|
|
|
+ } else if (
|
|
|
+ w.works
|
|
|
+ .split(".")
|
|
|
+ [w.works.split(".").length - 1].toLocaleUpperCase() == "PDF"
|
|
|
+ ) {
|
|
|
+ this.pptImgUrl = w.works;
|
|
|
+ this.showPDF = true;
|
|
|
+ }
|
|
|
+ } else if (w.works && w.type == 3 && this.dialogVisibleScore == false) {
|
|
|
+ this.videoDetail = {};
|
|
|
+ this.playerOptions1.sources[0].src = w.works;
|
|
|
+ this.videoDetail = this.playerOptions1;
|
|
|
+ this.videoVisible = true;
|
|
|
+ } else {
|
|
|
+ this.commentDetail = w;
|
|
|
+ }
|
|
|
+ },
|
|
|
addComment(wid, uid, t) {
|
|
|
if (this.commentText == "") {
|
|
|
this.$message.error("请输入对该学生的评价");
|
|
@@ -4272,6 +4643,38 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ scoreWork(wid) {
|
|
|
+ if (this.wScore == 0) {
|
|
|
+ this.$message.error("请评分");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ wid: wid,
|
|
|
+ score: JSON.stringify({
|
|
|
+ wScore: this.wScore,
|
|
|
+ detail: this.scoreDetail,
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "scoreWork", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "评分成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.wScore = 0;
|
|
|
+ this.scoreDetail = "";
|
|
|
+ this.dialogVisibleScore = false;
|
|
|
+ this.selectSWorks();
|
|
|
+ this.selectStudent();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("评分失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
openXz(w, i) {
|
|
|
this.selectJson = this.chapInfoList[this.courseType].chapterInfo[0]
|
|
|
.taskJson[this.taskCount].toolChoose[i].selectJson
|
|
@@ -4438,6 +4841,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 1,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4457,6 +4861,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 3,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4470,6 +4875,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 4,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4483,6 +4889,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 5,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4496,6 +4903,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 0,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4510,6 +4918,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4523,6 +4932,7 @@ export default {
|
|
|
sName: b[j].name,
|
|
|
type: 2,
|
|
|
time: b[j].time,
|
|
|
+ score: b[j].score,
|
|
|
likesCount: likesCount,
|
|
|
commentCount: commentCount,
|
|
|
isLikes: isLikes,
|
|
@@ -4535,7 +4945,14 @@ export default {
|
|
|
}
|
|
|
if (this.worksStudent[i] && this.worksStudent[i].length) {
|
|
|
this.worksStudent[i] = this.worksStudent[i].sort(function (a, b) {
|
|
|
- return b.likesCount - a.likesCount;
|
|
|
+ let jscoreA = a.score ? JSON.parse(a.score).wScore : 0
|
|
|
+ let jscoreB = b.score ? JSON.parse(b.score).wScore : 0
|
|
|
+ var scoreA = parseInt(jscoreA);
|
|
|
+ var scoreB = parseInt(jscoreB);
|
|
|
+ if (scoreA == scoreB) {
|
|
|
+ return b.likesCount - a.likesCount;
|
|
|
+ }
|
|
|
+ return scoreB - scoreA;
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -4571,6 +4988,47 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ pngToWhiteBg(file) {
|
|
|
+ const _file = file;
|
|
|
+ let read = new FileReader();
|
|
|
+ read.readAsDataURL(file); // 文件转base64
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ read.onload = (e) => {
|
|
|
+ let img = new Image();
|
|
|
+ img.src = e.target.result;
|
|
|
+ img.onload = async () => {
|
|
|
+ // 生成canvas
|
|
|
+ let canvas = document.createElement("canvas");
|
|
|
+ let context = canvas.getContext("2d");
|
|
|
+ // 绘制图片到canvas上
|
|
|
+ canvas.width = img.width;
|
|
|
+ canvas.height = img.height;
|
|
|
+
|
|
|
+ // 在canvas绘制前填充白色背景
|
|
|
+ context.fillStyle = "#fff";
|
|
|
+ context.fillRect(0, 0, canvas.width, canvas.height);
|
|
|
+ context.drawImage(img, 0, 0);
|
|
|
+ let base64 = canvas.toDataURL(file["type"], 1);
|
|
|
+ let newFile = this.dataUrlToFile(base64, _file);
|
|
|
+ resolve(newFile);
|
|
|
+ };
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
+ dataUrlToFile(dataurl, file) {
|
|
|
+ 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 Blob([u8arr], { type: mime });
|
|
|
+ return new File([new Blob([u8arr], { type: mime })], file.name, {
|
|
|
+ type: mime,
|
|
|
+ });
|
|
|
+ },
|
|
|
async beforeUpload1(event, type, i) {
|
|
|
// this.$message.success('进入上传')
|
|
|
|
|
@@ -4648,7 +5106,9 @@ export default {
|
|
|
type != 4
|
|
|
) {
|
|
|
// const blob = await imageConversion.compress(file, 0.8)
|
|
|
- const blob = await imageConversion.compressAccurately(file, 32);
|
|
|
+ file = await this.pngToWhiteBg(file);
|
|
|
+ const blob = await imageConversion.compressAccurately(file, 64);
|
|
|
+ // const blob = await imageConversion.compressAccurately(file, {type:file.type});
|
|
|
file = new File([blob], file.name, { type: file.type });
|
|
|
}
|
|
|
_this.progress = 0;
|
|
@@ -6125,7 +6585,7 @@ export default {
|
|
|
window.open(url);
|
|
|
},
|
|
|
resize() {
|
|
|
- if (document.getElementsByClassName("box_course")) {
|
|
|
+ if (document.getElementsByClassName("box_course").length) {
|
|
|
var a = document.getElementsByClassName("box_course")[0].offsetHeight;
|
|
|
document.getElementsByClassName("vedioList")[0].style.height = a + "px";
|
|
|
document.getElementsByClassName("navBox")[0].style.height =
|
|
@@ -7491,6 +7951,7 @@ export default {
|
|
|
width: 100%;
|
|
|
/* height: calc(100% - 40px); */
|
|
|
height: 105px;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.workImg > img {
|
|
@@ -7593,6 +8054,7 @@ export default {
|
|
|
flex-direction: column;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.answerBg > div:nth-child(1) {
|
|
@@ -8023,9 +8485,13 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
- margin-left: 15px;
|
|
|
+ /* margin-left: 15px; */
|
|
|
+ margin-left: 8px;
|
|
|
+}
|
|
|
+.scoreImg {
|
|
|
+ width: 17px;
|
|
|
+ height: 17px;
|
|
|
}
|
|
|
-
|
|
|
.studentDetail {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
@@ -8704,4 +9170,47 @@ export default {
|
|
|
ol {
|
|
|
margin: 10px 0 10px 20px;
|
|
|
}
|
|
|
+
|
|
|
+.scoreBox,
|
|
|
+.scoreDetailBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin-top: 20px;
|
|
|
+ font-size: 18px;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.scoreBox .t,
|
|
|
+.scoreDetailBox .t {
|
|
|
+ margin-right: 10px;
|
|
|
+ width: 100px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+.scoreDetailBox {
|
|
|
+ align-items: flex-start;
|
|
|
+}
|
|
|
+.scoreDetailBox >>> .el-textarea {
|
|
|
+ width: calc(100% - 200px);
|
|
|
+}
|
|
|
+
|
|
|
+.scoreBox >>> .el-input {
|
|
|
+ width: 130px;
|
|
|
+ font-size: 38px;
|
|
|
+}
|
|
|
+
|
|
|
+.scoreBox >>> .el-input__inner {
|
|
|
+ height: 60px;
|
|
|
+}
|
|
|
+
|
|
|
+.answerScore {
|
|
|
+ position: absolute;
|
|
|
+ top: 10px;
|
|
|
+ right: 10px;
|
|
|
+ background: #0000008f;
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 3px 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|