|
@@ -382,8 +382,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, itemTaskIndex)
|
|
|
" />
|
|
@@ -394,7 +398,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, itemTaskIndex)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
<button class="info_btn" @click="addAttText(itemTaskIndex)">
|
|
|
添加图文
|
|
|
</button>
|
|
@@ -407,11 +411,11 @@
|
|
|
<button class="info_btn" @click="openSource(itemTaskIndex)">
|
|
|
添加资源
|
|
|
</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[
|
|
|
itemTaskIndex
|
|
@@ -820,8 +824,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, itemTaskIndex)
|
|
|
" />
|
|
@@ -832,7 +840,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, itemTaskIndex)
|
|
|
" />
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
<button class="info_btn" @click="addAttText(itemTaskIndex)">
|
|
|
添加图文
|
|
|
</button>
|
|
@@ -845,11 +853,11 @@
|
|
|
<button class="info_btn" @click="openSource(itemTaskIndex)">
|
|
|
添加资源
|
|
|
</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[
|
|
|
itemTaskIndex
|
|
@@ -4289,7 +4297,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","XLSX", "XLS"
|
|
|
+ ];
|
|
|
+ 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({
|