|
@@ -106,7 +106,7 @@
|
|
|
<div v-else><img src="../assets/icon/all.png" alt="" /></div>
|
|
|
全部
|
|
|
</div>
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="check"
|
|
|
:class="{ checked: type == 2 }"
|
|
|
@click="type = 2"
|
|
@@ -150,11 +150,11 @@
|
|
|
</div>
|
|
|
<div v-else><img src="../assets/icon/tool.png" alt="" /></div>
|
|
|
工具
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="student_body">
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="videoTop"
|
|
|
v-if="chapInfoList[courseType - 0].question != undefined"
|
|
|
>
|
|
@@ -162,22 +162,16 @@
|
|
|
<div v-if="type == 3">{{ chapInfo.dyName }}</div>
|
|
|
<div v-if="type == 5">工具</div>
|
|
|
<div v-else></div>
|
|
|
- <!-- <div
|
|
|
+ <div
|
|
|
@click="openAddWork"
|
|
|
class="upbtn"
|
|
|
v-if="type == 1 || type == 2"
|
|
|
>
|
|
|
提交实践作业
|
|
|
- </div> -->
|
|
|
- </div>
|
|
|
- <div class="project_box" v-if="type == 2">
|
|
|
- <div class="detail_content_top">
|
|
|
- <div class="detail_title">{{ chapInfo.dyName }}</div>
|
|
|
- <div class="detail_time">{{ courseDetail.time }}</div>
|
|
|
</div>
|
|
|
- <div class="detail_content" v-html="courseDetail.template"></div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <!-- <div
|
|
|
class="project_box"
|
|
|
style="padding-bottom: 40px"
|
|
|
v-if="
|
|
@@ -216,7 +210,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div
|
|
|
class="project_box"
|
|
|
style="margin-top: 15px; padding-bottom: 30px"
|
|
@@ -244,7 +238,7 @@
|
|
|
class="addEditor"
|
|
|
style="margin-top: 23px"
|
|
|
@click="openAddWork"
|
|
|
- v-if="isAddWork == false"
|
|
|
+ v-if="studyJuri.length == 0"
|
|
|
>
|
|
|
选择文件
|
|
|
</div>
|
|
@@ -259,7 +253,30 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="project_box" v-if="type == 3">
|
|
|
+ <div class="project_box" v-if="type == 1">
|
|
|
+ <div class="queTop">
|
|
|
+ <div class="question" style="width: 35px">
|
|
|
+ <img src="../assets/icon/wordMessageIcon.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="queTitle">
|
|
|
+ <div>文档资料</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="detail_content_top">
|
|
|
+ <div class="detail_title">{{ chapInfo.dyName }}</div>
|
|
|
+ <div class="detail_time">{{ courseDetail.time }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="detail_content" v-html="courseDetail.template"></div>
|
|
|
+ </div>
|
|
|
+ <div class="project_box" v-if="type == 1">
|
|
|
+ <div class="queTop">
|
|
|
+ <div class="question" style="width: 30px">
|
|
|
+ <img src="../assets/icon/fileIcon.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="queTitle">
|
|
|
+ <div>附件</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="filebox">
|
|
|
<div class="file" v-for="(f, index) in file" :key="index">
|
|
|
<img :src="require('../assets/file.png')" alt="" />
|
|
@@ -268,7 +285,15 @@
|
|
|
</div>
|
|
|
<div class="upFile" v-if="type == 3">提交</div>
|
|
|
</div>
|
|
|
- <div class="project_box" v-if="type == 4">
|
|
|
+ <div class="project_box" v-if="type == 1">
|
|
|
+ <div class="queTop">
|
|
|
+ <div class="question" style="width: 30px">
|
|
|
+ <img src="../assets/icon/homeWorkIcon.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="queTitle">
|
|
|
+ <div>作业与测试</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="homebox">
|
|
|
<div class="homework" v-for="(h, index) in imgList" :key="index">
|
|
|
<img
|
|
@@ -314,7 +339,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="project_box" v-if="type == 5">
|
|
|
+ <div class="project_box" v-if="type == 1">
|
|
|
+ <div class="queTop">
|
|
|
+ <div class="question" style="width: 30px">
|
|
|
+ <img src="../assets/icon/toolIcon.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="queTitle">
|
|
|
+ <div>工具</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="filebox" v-if="!chapInfo.chapterInfo[0].toolChoose">
|
|
|
暂无数据
|
|
|
</div>
|
|
@@ -350,7 +383,7 @@
|
|
|
"
|
|
|
>
|
|
|
<div
|
|
|
- class="addPoint"
|
|
|
+ class="addPoint"
|
|
|
v-for="(itemTool, indexTool) in toolTypeList"
|
|
|
:key="indexTool"
|
|
|
>
|
|
@@ -360,51 +393,56 @@
|
|
|
alt=""
|
|
|
@click="addTools(itemTool)"
|
|
|
/>
|
|
|
+ <div v-if="itemTool == 8" style="margin: 5px 0">素材库</div>
|
|
|
<img
|
|
|
v-if="itemTool == 1"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/secondToolList/whiteBoard.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
+ <div v-if="itemTool == 1" style="margin: 5px 0">电子白板</div>
|
|
|
<img
|
|
|
v-if="itemTool == 2"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/secondToolList/note.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
+ <div v-if="itemTool == 2" style="margin: 5px 0">便签</div>
|
|
|
<img
|
|
|
v-if="itemTool == 3"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/secondToolList/mindMapping.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
+ <div v-if="itemTool == 3" style="margin: 5px 0">思维网图</div>
|
|
|
<img
|
|
|
v-if="itemTool == 6"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/secondToolList/doc.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
-
|
|
|
+ <div v-if="itemTool == 6" style="margin: 5px 0">协同文档</div>
|
|
|
<img
|
|
|
v-else-if="itemTool == 7"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/secondToolList/mindNetwork.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
-
|
|
|
+ <div v-if="itemTool == 7" style="margin: 5px 0">思维网格</div>
|
|
|
<img
|
|
|
v-if="itemTool == 4"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/thirdToolList/ask.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
-
|
|
|
+ <div v-if="itemTool == 4" style="margin: 5px 0">问卷调查</div>
|
|
|
<img
|
|
|
v-else-if="itemTool == 5"
|
|
|
@click="addTools(itemTool)"
|
|
|
src="../assets/icon/thirdToolList/score.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
+ <div v-if="itemTool == 5" style="margin: 5px 0">量规评分</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -542,6 +580,17 @@
|
|
|
<el-dialog :visible.sync="pictureDialog" size="tiny">
|
|
|
<img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="dialogVisible4"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="800px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="dialog_diy notice"
|
|
|
+ >
|
|
|
+ <div>此功能暂未开放!</div>
|
|
|
+ <el-button type="primary" @click="dialogVisible4 = false">确定</el-button>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -617,11 +666,11 @@ export default {
|
|
|
// scoreCount: 0,
|
|
|
mindNetWorkCount: 0,
|
|
|
libraryCount: 0,
|
|
|
- isAddWork: false,
|
|
|
dialogImageUrl: "",
|
|
|
pictureDialog: false,
|
|
|
toolType: 0,
|
|
|
toolTypeList: [],
|
|
|
+ dialogVisible4: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -928,6 +977,21 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ getHomeWork() {
|
|
|
+ let params = {
|
|
|
+ cid: this.id,
|
|
|
+ stage: this.courseType,
|
|
|
+ uid: this.userid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectWork", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.studyJuri = JSON.parse(res.data[0][0].content);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
isAssetTypeAnImage(ext) {
|
|
|
return (
|
|
|
[
|
|
@@ -962,46 +1026,58 @@ export default {
|
|
|
},
|
|
|
openAddWork() {
|
|
|
this.dialogVisible = true;
|
|
|
- this.studyJuri = [
|
|
|
- {
|
|
|
- content: "",
|
|
|
- cover: [],
|
|
|
- upVedio: [],
|
|
|
- upFile: [],
|
|
|
- },
|
|
|
- ];
|
|
|
+ this.getHomeWork();
|
|
|
+ // this.studyJuri = [
|
|
|
+ // {
|
|
|
+ // content: "",
|
|
|
+ // cover: [],
|
|
|
+ // upVedio: [],
|
|
|
+ // upFile: [],
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
},
|
|
|
addWork() {
|
|
|
- let params = [
|
|
|
+ this.$confirm(
|
|
|
+ "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
|
|
|
+ "提示",
|
|
|
{
|
|
|
- uid: this.userid,
|
|
|
- cid: this.id,
|
|
|
- stage: this.courseType,
|
|
|
- content: JSON.stringify(this.studyJuri),
|
|
|
- },
|
|
|
- ];
|
|
|
- this.ajax
|
|
|
- .post(this.$store.state.api + "addWorks", params)
|
|
|
- .then((res) => {
|
|
|
- this.isAddWork = true;
|
|
|
- this.$message({
|
|
|
- message: "提交成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogVisible = false;
|
|
|
- // this.studyJuri.push([
|
|
|
- // {
|
|
|
- // content: "",
|
|
|
- // cover: [],
|
|
|
- // upVedio: [],
|
|
|
- // upFile: [],
|
|
|
- // },
|
|
|
- // ]);
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ uid: this.userid,
|
|
|
+ cid: this.id,
|
|
|
+ stage: this.courseType,
|
|
|
+ content: JSON.stringify(this.studyJuri),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "addWorks", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "提交成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ // this.studyJuri.push([
|
|
|
+ // {
|
|
|
+ // content: "",
|
|
|
+ // cover: [],
|
|
|
+ // upVedio: [],
|
|
|
+ // upFile: [],
|
|
|
+ // },
|
|
|
+ // ]);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("提交失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
- this.$message.error("提交失败");
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
selectCount() {
|
|
|
let params = {
|
|
@@ -1098,18 +1174,17 @@ export default {
|
|
|
this.toolsCount(a, t);
|
|
|
}
|
|
|
window.parent.postMessage({ tools: "4" }, "*");
|
|
|
- }
|
|
|
- // else if (t == 5) {
|
|
|
- // if (this.scoreCount > 0) {
|
|
|
- // this.updateCount(this.scoreCount, t);
|
|
|
- // } else {
|
|
|
- // this.scoreCount++;
|
|
|
- // a = this.scoreCount;
|
|
|
- // this.toolsCount(a, t);
|
|
|
- // }
|
|
|
- // window.parent.postMessage({ tools: "5" }, "*");
|
|
|
- // }
|
|
|
- else if (t == 6) {
|
|
|
+ } else if (t == 5) {
|
|
|
+ if (this.scoreCount > 0) {
|
|
|
+ this.updateCount(this.scoreCount, t);
|
|
|
+ } else {
|
|
|
+ this.scoreCount++;
|
|
|
+ a = this.scoreCount;
|
|
|
+ this.toolsCount(a, t);
|
|
|
+ }
|
|
|
+ this.dialogVisible4 = true;
|
|
|
+ // window.parent.postMessage({ tools: "5" }, "*");
|
|
|
+ } else if (t == 6) {
|
|
|
if (this.noteCount > 0) {
|
|
|
this.updateCount(this.noteCount, t);
|
|
|
} else {
|
|
@@ -1182,6 +1257,7 @@ export default {
|
|
|
created() {
|
|
|
this.getCourseDetail();
|
|
|
this.selectCount();
|
|
|
+ this.getHomeWork();
|
|
|
document.scrollingElement.scrollTop = 0;
|
|
|
|
|
|
window.onresize = function () {
|
|
@@ -1328,11 +1404,13 @@ export default {
|
|
|
.project_box {
|
|
|
padding: 0 30px 10px 21px;
|
|
|
background: #fff;
|
|
|
+ margin: 15px 0;
|
|
|
}
|
|
|
|
|
|
.filebox {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
+ padding: 15px 0;
|
|
|
}
|
|
|
|
|
|
.file {
|
|
@@ -1409,6 +1487,8 @@ export default {
|
|
|
margin: 0 auto;
|
|
|
padding-top: 30px;
|
|
|
text-indent: 30px;
|
|
|
+ overflow: auto;
|
|
|
+ height: 200px;
|
|
|
}
|
|
|
.score_box >>> .el-rate {
|
|
|
margin-left: 10px;
|
|
@@ -1702,10 +1782,11 @@ export default {
|
|
|
}
|
|
|
.queTop {
|
|
|
display: flex;
|
|
|
- padding: 10px 0;
|
|
|
+ padding: 20px 0;
|
|
|
flex-direction: row;
|
|
|
justify-content: flex-start;
|
|
|
align-items: center;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
}
|
|
|
.question {
|
|
|
width: 40px;
|
|
@@ -1772,8 +1853,14 @@ export default {
|
|
|
cursor: pointer;
|
|
|
padding-bottom: 10px;
|
|
|
}
|
|
|
-.addPoint > img{
|
|
|
+.addPoint > img {
|
|
|
cursor: pointer;
|
|
|
margin: 0 20px;
|
|
|
}
|
|
|
+.addPoint {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
</style>
|