|
@@ -144,6 +144,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="width: 95%; padding: 15px 0px 15px 20px">
|
|
|
+ <el-switch v-model="isTeacherSee" active-text="是否公开此课程" style="padding-bottom: 30px"></el-switch>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px" v-if="false">
|
|
@@ -215,8 +218,8 @@
|
|
|
item.taskJson[0].chapterData.length == 0
|
|
|
" style="height: 185px"></div>
|
|
|
<div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
|
|
|
- <div class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData" :key="item1.id"
|
|
|
- @click="getChapterData(
|
|
|
+ <div class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
|
|
|
+ :key="item1.id" @click="getChapterData(
|
|
|
$event,
|
|
|
unitIndex,
|
|
|
index,
|
|
@@ -322,8 +325,12 @@
|
|
|
</div>
|
|
|
<div class="add_info_box">
|
|
|
<button class="info_btn" @click="addImg($event)">
|
|
|
+ 添加文件
|
|
|
+ <input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 13, 0)
|
|
|
+ " />
|
|
|
+ </button>
|
|
|
+ <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
添加视频
|
|
|
- <!-- capture="camera" -->
|
|
|
<input type="file" accept="video/mp4, video/quicktime, video/x-msvideo" style="display: none"
|
|
|
v-if="inputShow" @change="beforeUpload2($event, unitIndex, 2, 0)
|
|
|
" />
|
|
@@ -334,7 +341,7 @@
|
|
|
accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
|
style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 3, 0)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
<button class="info_btn" @click="addAttText(0)">
|
|
|
添加图文
|
|
|
</button>
|
|
@@ -347,11 +354,11 @@
|
|
|
<button class="info_btn" @click="openSource(0)">
|
|
|
添加资源
|
|
|
</button>
|
|
|
- <button class="info_btn" @click="addImg($event)">
|
|
|
+ <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
其他附件
|
|
|
<input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 12, itemTaskIndex)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
</div>
|
|
|
<div v-if="unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
0
|
|
@@ -434,18 +441,11 @@
|
|
|
itemTaskIndex
|
|
|
].taskDetail
|
|
|
" @change="change"></editor-bar> -->
|
|
|
- <textarea
|
|
|
- rows="2"
|
|
|
- class="binfo_input"
|
|
|
- placeholder="请输入任务描述"
|
|
|
- cols
|
|
|
- style="width: 90% !important; resize:none"
|
|
|
- v-model="
|
|
|
- unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
+ <textarea rows="2" class="binfo_input" placeholder="请输入任务描述" cols
|
|
|
+ style="width: 90% !important; resize:none" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
].taskDetail
|
|
|
- "
|
|
|
- ></textarea>
|
|
|
+ "></textarea>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="addTaskBorder" @click="addTaskBorder" v-if="!unitJson[unitIndex].easy">
|
|
@@ -819,8 +819,12 @@
|
|
|
</div>
|
|
|
<div class="add_info_box">
|
|
|
<button class="info_btn" @click="addImg($event)">
|
|
|
+ 添加文件
|
|
|
+ <input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 13, itemTaskIndex)
|
|
|
+ " />
|
|
|
+ </button>
|
|
|
+ <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
添加视频
|
|
|
- <!-- capture="camera" -->
|
|
|
<input type="file" accept="video/mp4, video/quicktime, video/x-msvideo" style="display: none"
|
|
|
v-if="inputShow" @change="beforeUpload2($event, unitIndex, 2, itemTaskIndex)
|
|
|
" />
|
|
@@ -831,24 +835,24 @@
|
|
|
accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
|
style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 3, itemTaskIndex)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
<button class="info_btn" @click="addAttText(itemTaskIndex)">
|
|
|
添加图文
|
|
|
</button>
|
|
|
<button class="info_btn" @click="openLine(itemTaskIndex)">
|
|
|
添加链接
|
|
|
</button>
|
|
|
- <button class="info_btn" @click="pasteLine(itemTaskIndex)">
|
|
|
- 嵌入代码
|
|
|
- </button>
|
|
|
<button class="info_btn" @click="openSource(itemTaskIndex)">
|
|
|
添加资源
|
|
|
</button>
|
|
|
- <button class="info_btn" @click="addImg($event)">
|
|
|
+ <button class="info_btn" @click="pasteLine(itemTaskIndex)">
|
|
|
+ 嵌入代码
|
|
|
+ </button>
|
|
|
+ <!-- <button class="info_btn" @click="addImg($event)">
|
|
|
其他附件
|
|
|
<input type="file" accept="*" style="display: none" v-if="inputShow" @change="beforeUpload2($event, unitIndex, 12, itemTaskIndex)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
</div>
|
|
|
<div v-if="unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
@@ -3744,14 +3748,14 @@ export default {
|
|
|
var _this = this;
|
|
|
//((_this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length - 1) == i) ? "确定删除此任务吗?" : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?"
|
|
|
_this
|
|
|
- .$confirm("确定删除此任务吗?" , "提示", {
|
|
|
+ .$confirm("确定删除此任务吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if(i == 0){
|
|
|
- _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i+1].chapterData = JSON.parse(JSON.stringify(_this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i].chapterData))
|
|
|
+ if (i == 0) {
|
|
|
+ _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i + 1].chapterData = JSON.parse(JSON.stringify(_this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i].chapterData))
|
|
|
}
|
|
|
_this.$forceUpdate();
|
|
|
_this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
|
|
@@ -4292,7 +4296,82 @@ export default {
|
|
|
// a.splice(a.length - 1, a.length);
|
|
|
_this.$message.error("上传失败");
|
|
|
} else {
|
|
|
- if (type == 2 || type == 3 || type == 12) {
|
|
|
+ if (type == 13) {
|
|
|
+ let _type = 2
|
|
|
+ var fileA = [
|
|
|
+ "PDF",
|
|
|
+ "DOC",
|
|
|
+ "DOCX",
|
|
|
+ "DOCM",
|
|
|
+ "DOTM",
|
|
|
+ "DOTX",
|
|
|
+ "PPTX",
|
|
|
+ "PPSX",
|
|
|
+ "PPT",
|
|
|
+ "PPS",
|
|
|
+ "PPTM",
|
|
|
+ "POTM",
|
|
|
+ "PPAM",
|
|
|
+ "POTX",
|
|
|
+ "PPSM",
|
|
|
+ ];
|
|
|
+ var videoA = [
|
|
|
+ "AVI",
|
|
|
+ "NAVI",
|
|
|
+ "MPEG",
|
|
|
+ "ASF",
|
|
|
+ "MOV",
|
|
|
+ "WMV",
|
|
|
+ "3GP",
|
|
|
+ "RM",
|
|
|
+ "RMVB",
|
|
|
+ "FLV",
|
|
|
+ "F4V",
|
|
|
+ "H.264",
|
|
|
+ "H.265",
|
|
|
+ "REAL VIDEO",
|
|
|
+ "MKV",
|
|
|
+ "WebM",
|
|
|
+ "HDDVD",
|
|
|
+ "MP4",
|
|
|
+ "MPG",
|
|
|
+ "M4V",
|
|
|
+ "MGV",
|
|
|
+ "OGV",
|
|
|
+ "QTM",
|
|
|
+ "STR",
|
|
|
+ "AMC",
|
|
|
+ "DVX",
|
|
|
+ "EVO",
|
|
|
+ "DAT",
|
|
|
+ "OGG",
|
|
|
+ "OGM",
|
|
|
+ ];
|
|
|
+ if (fileA.indexOf(
|
|
|
+ data.Location
|
|
|
+ .split(".")
|
|
|
+ [data.Location.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) != -1) {
|
|
|
+ _type = 3
|
|
|
+ } else if (videoA.indexOf(
|
|
|
+ data.Location
|
|
|
+ .split(".")
|
|
|
+ [data.Location.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) != -1) {
|
|
|
+ _type = 2
|
|
|
+ } else {
|
|
|
+ _type = 12
|
|
|
+ }
|
|
|
+ _this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
+ itemTaskIndex
|
|
|
+ ].chapterData.push({
|
|
|
+ name: file.name,
|
|
|
+ url: data.Location,
|
|
|
+ uid: file.uid,
|
|
|
+ type: _type,
|
|
|
+ });
|
|
|
+ _this.imgChange1(null, null, _type, itemTaskIndex);
|
|
|
+ } else if (type == 2 || type == 3 || type == 12) {
|
|
|
_this.unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
].chapterData.push({
|
|
@@ -7186,37 +7265,37 @@ export default {
|
|
|
// type: "warning",
|
|
|
// })
|
|
|
// .then(() => {
|
|
|
- if (type == 1) {
|
|
|
- if (index > 0) {
|
|
|
- let a = JSON.parse(
|
|
|
- JSON.stringify(
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1]
|
|
|
- )
|
|
|
- );
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (
|
|
|
- index <
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
|
|
|
- ) {
|
|
|
- let a = JSON.parse(
|
|
|
- JSON.stringify(
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1]
|
|
|
- )
|
|
|
- );
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
|
|
|
- this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
|
|
|
- }
|
|
|
- }
|
|
|
- this.$forceUpdate();
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // return;
|
|
|
- // })
|
|
|
+ if (type == 1) {
|
|
|
+ if (index > 0) {
|
|
|
+ let a = JSON.parse(
|
|
|
+ JSON.stringify(
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ index <
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
|
|
|
+ ) {
|
|
|
+ let a = JSON.parse(
|
|
|
+ JSON.stringify(
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
|
|
|
+ this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // return;
|
|
|
+ // })
|
|
|
},
|
|
|
addGroup(i) {
|
|
|
// this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
|