|
@@ -902,6 +902,34 @@
|
|
添加链接
|
|
添加链接
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].proVisible
|
|
|
|
+ "
|
|
|
|
+ class="mask"
|
|
|
|
+ >
|
|
|
|
+ <div class="progressBox">
|
|
|
|
+ <div class="lbox">
|
|
|
|
+ <img src="../../assets/loading.gif" />上传中,请稍后
|
|
|
|
+ </div>
|
|
|
|
+ <el-progress
|
|
|
|
+ :text-inside="true"
|
|
|
|
+ :stroke-width="20"
|
|
|
|
+ :percentage="
|
|
|
|
+ unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].progress
|
|
|
|
+ ? unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].progress
|
|
|
|
+ : 0
|
|
|
|
+ "
|
|
|
|
+ style="width: 80%"
|
|
|
|
+ ></el-progress>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
style="
|
|
style="
|
|
@@ -3941,7 +3969,7 @@ export default {
|
|
this.$message.error("项目封面仅支持上传一张,请删除后再进行上传");
|
|
this.$message.error("项目封面仅支持上传一张,请删除后再进行上传");
|
|
},
|
|
},
|
|
beforeUpload2(event, unitIndex, type, itemTaskIndex) {
|
|
beforeUpload2(event, unitIndex, type, itemTaskIndex) {
|
|
- const loading = this.openLoading();
|
|
|
|
|
|
+ // const loading = this.openLoading();
|
|
var file = event.target.files[0];
|
|
var file = event.target.files[0];
|
|
this.inputShow = false;
|
|
this.inputShow = false;
|
|
var credentials = {
|
|
var credentials = {
|
|
@@ -3981,7 +4009,7 @@ export default {
|
|
this.$message.error("上传文件大于10兆,请重新选择文件!");
|
|
this.$message.error("上传文件大于10兆,请重新选择文件!");
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
a.splice(a.length - 1, a.length);
|
|
a.splice(a.length - 1, a.length);
|
|
- loading.close();
|
|
|
|
|
|
+ // loading.close();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
} else if (
|
|
} else if (
|
|
@@ -3993,12 +4021,18 @@ export default {
|
|
this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
|
|
this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
a.splice(a.length - 1, a.length);
|
|
a.splice(a.length - 1, a.length);
|
|
- loading.close();
|
|
|
|
|
|
+ // loading.close();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].progress = 0;
|
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].proVisible = true;
|
|
if (file) {
|
|
if (file) {
|
|
var params = {
|
|
var params = {
|
|
Key:
|
|
Key:
|
|
@@ -4021,9 +4055,20 @@ export default {
|
|
.on("httpUploadProgress", function (evt) {
|
|
.on("httpUploadProgress", function (evt) {
|
|
//这里可以写进度条
|
|
//这里可以写进度条
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].progress = parseInt((evt.loaded * 80) / evt.total);
|
|
})
|
|
})
|
|
.send(function (err, data) {
|
|
.send(function (err, data) {
|
|
- loading.close();
|
|
|
|
|
|
+ // loading.close();
|
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].progress = 100;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
|
+ itemTaskIndex
|
|
|
|
+ ].proVisible = false;
|
|
|
|
+ }, 1000);
|
|
_this.inputShow = true;
|
|
_this.inputShow = true;
|
|
if (err) {
|
|
if (err) {
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
var a = _this.$refs.upload1.uploadFiles;
|
|
@@ -4330,7 +4375,7 @@ export default {
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|
|
uid: this.userid,
|
|
uid: this.userid,
|
|
- title: this.courseName,
|
|
|
|
|
|
+ title: this.courseName.replace(/%/g, "%25"),
|
|
brief: this.courseText.replace(/%/g, "%25"),
|
|
brief: this.courseText.replace(/%/g, "%25"),
|
|
cover:
|
|
cover:
|
|
this.cover.length > 0
|
|
this.cover.length > 0
|
|
@@ -4488,7 +4533,7 @@ export default {
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|
|
cid: this.cid,
|
|
cid: this.cid,
|
|
- title: this.courseName,
|
|
|
|
|
|
+ title: this.courseName.replace(/%/g, "%25"),
|
|
brief: this.courseText.replace(/%/g, "%25"),
|
|
brief: this.courseText.replace(/%/g, "%25"),
|
|
cover:
|
|
cover:
|
|
this.cover.length > 0
|
|
this.cover.length > 0
|
|
@@ -5257,7 +5302,10 @@ export default {
|
|
this.$message.error("填写了的题目,选项至少要有两项!");
|
|
this.$message.error("填写了的题目,选项至少要有两项!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if ((aj[i].type == '2' && !aj[i].answer.length) || (aj[i].type == '1' && aj[i].answer !== 0 && !aj[i].answer)) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ (aj[i].type == "2" && !aj[i].answer.length) ||
|
|
|
|
+ (aj[i].type == "1" && aj[i].answer !== 0 && !aj[i].answer)
|
|
|
|
+ ) {
|
|
this.$message.error("有题目未选择答案请选择答案");
|
|
this.$message.error("有题目未选择答案请选择答案");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -8033,4 +8081,58 @@ ol {
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
color: #8e8e8e;
|
|
color: #8e8e8e;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.mask {
|
|
|
|
+ background-color: rgb(0 0 0 / 30%);
|
|
|
|
+ /* position: fixed; */
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ z-index: 20000;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox {
|
|
|
|
+ width: 300px;
|
|
|
|
+ height: 150px;
|
|
|
|
+ background: #fff;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ box-shadow: 0 0 6px 1px #bfbfbf;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox .lbox {
|
|
|
|
+ height: 100px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox .lbox img {
|
|
|
|
+ width: 40px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox >>> .el-progress-bar__outer {
|
|
|
|
+ background-color: #d1dfff !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox .lbox {
|
|
|
|
+ height: 100px;
|
|
|
|
+ font-size: 19px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.progressBox .lbox img {
|
|
|
|
+ width: 40px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|