diff --git a/src/components/NoteUpload/index.vue b/src/components/NoteUpload/index.vue index 438679aa..84bcfe18 100644 --- a/src/components/NoteUpload/index.vue +++ b/src/components/NoteUpload/index.vue @@ -39,7 +39,7 @@ :limit="limit">
将文件拖到此处,或点击上传
-
支持拓展名:支持扩展名:.txt/.dox/.docx/.png/.jpg, 图片支持批量上传,最多9张
+
支持拓展名:支持扩展名:{{ty}}, 图片支持批量上传,最多9张
diff --git a/src/views/course/Courseware.vue b/src/views/course/Courseware.vue index 5f7e2e63..49ef34bc 100644 --- a/src/views/course/Courseware.vue +++ b/src/views/course/Courseware.vue @@ -466,7 +466,6 @@ export default { if (rs.status === 200) { let type = toContentType(rs.result.fileType); // ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"] - console.log(type, 'type'); if(rs.result.displayName.length > 100){ this.$message.error('文件名称请不要超过100个字符'); return; diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index de325ea6..8acc505f 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -40,6 +40,7 @@ 全部课程 + 全部 {{cou.courseName}} @@ -131,45 +132,46 @@
-
-
-

《高效能人士的7个习惯》

-
8:40
-
2022/05/21 16:28
-
-
- 我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。 -
+
+
+ +
+

{{userInfo.name}}{{userInfo.departFullName}}

+

{{userInfo.sign}}

+
+
+
+

累计导出{{datalist.length}}条

+

导出时间:{{formatDate(new Date())}}

+
+ +
+
+
+
+

{{item.courseName}}

+
{{item.playTime}}
+
{{item.sysCreateTime}}
+
+
+ {{ item.content }} +
+ +
+
+
+
-
-
-

《高效能人士的7个习惯》

-
8:40
-
2022/05/21 16:28
-
-
- 我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。 -
-
-
-
-

《高效能人士的7个习惯》

-
8:40
-
2022/05/21 16:28
-
-
- 我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。 -
-
-
- 取 消 - 打 印 - 确 定 + 取 消 + + 确 定
@@ -180,14 +182,17 @@ import apiNote from '@/api/phase2/note.js'; import interactBar from '@/components/Portal/interactBar.vue'; import FileUpload from '@/components/NoteUpload/index.vue'; +import AuthorImg from '@/components/Portal/authorImg.vue'; import { mapGetters } from 'vuex'; +import {formatDate} from '@/utils/tools.js' export default { - components:{interactBar,FileUpload}, + components:{interactBar,FileUpload,AuthorImg}, computed: { ...mapGetters(['userInfo']) }, data(){ return{ + formatDate, noteFile:{ contentType:null, type:2, @@ -243,31 +248,54 @@ export default { }, methods: { exportCommand(e) { + this.exportType = e; + this.dialogVisible = true; + }, + exportStart(){ let ids = this.datalist.map(item=>{ if(item.contentType !=3) { return item.id; } }) let data = { - // name:this.userInfo.name, - // sign:'abcd', - ids:["1017809571512426496","1017807633689452544"], - // author:'/upload/2022/5/979502964375564288.png',//this.userInfo.avatar, + name:this.userInfo.name, + sign:'abcd', + ids:ids, + author:this.userInfo.avatar,//this.userInfo.avatar, } - if(e == '1') { + if(this.exportType == '1') { apiNote.exportPdf(data).then(res=>{ - + if(res.status) { + this.$message.error('导出失败'); + } else { + const link = document.createElement('a');// 创建a标签 + let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型 + link.style.display = "none"; + link.href = URL.createObjectURL(blob); // 创建URL + link.setAttribute("download", "我的笔记.xls"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + this.dialogVisible = false; + } + }) } else { apiNote.exportExcel(ids).then(res=>{ - const link = document.createElement('a');// 创建a标签 - let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型 - link.style.display = "none"; - link.href = URL.createObjectURL(blob); // 创建URL - link.setAttribute("download", "我的笔记.xls"); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); + if(res.status) { + this.$message.error('导出失败'); + } else { + const link = document.createElement('a');// 创建a标签 + let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型 + link.style.display = "none"; + link.href = URL.createObjectURL(blob); // 创建URL + link.setAttribute("download", "我的笔记.xls"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + this.dialogVisible = false; + } + }) } }, @@ -299,6 +327,9 @@ export default { importCommand(e){ this.importDialogVisible = true; this.upNoteFile.contentType = e; + this.noteFile.filePath = ''; + this.noteFile.fileName = ''; + this.upNoteFile.content = []; if(e == '3') { this.upNoteFile.limit = 9; this.upNoteFile.fileType = ["png","jpg"]; @@ -336,9 +367,14 @@ export default { this.courseId = e; this.noteData(this.num); }, - Time(){ - this.startTime = this.Filtertime[0]; - this.endTime = this.Filtertime[1]; + Time(val){ + if(this.Filtertime && this.Filtertime.length > 0) { + this.startTime = this.Filtertime[0]; + this.endTime = this.Filtertime[1]; + } else { + this.startTime =''; + this.endTime = ''; + } this.noteData(this.num); }, open(item) { @@ -417,19 +453,16 @@ export default { const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600) const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60) const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60) - // console.log(hour + ':' + min + ':' + sec) return hour + ':' + min + ':' + sec }, handleSizeChange(val) { this.paegSize = val; this.pageIndex = 1; this.noteData(this.num); - console.log(`每页 ${val} 条`); }, handleCurrentChange(val) { this.pageIndex = val; this.noteData(this.num); - console.log(`当前页: ${val}`); } } @@ -437,12 +470,57 @@ export default {