mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
个人中心我的笔记bug修改
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
:limit="limit">
|
:limit="limit">
|
||||||
<svg-icon style="font-size:52px;margin-right:5px;margin-top:20px" icon-class="up-char"></svg-icon>
|
<svg-icon style="font-size:52px;margin-right:5px;margin-top:20px" icon-class="up-char"></svg-icon>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<div class="el-upload__tip" slot="tip">支持拓展名:支持扩展名:.txt/.dox/.docx/.png/.jpg, 图片支持批量上传,最多9张</div>
|
<div class="el-upload__tip" slot="tip">支持拓展名:支持扩展名:<span v-for="ty in fileType">{{ty}},</span> 图片支持批量上传,最多9张</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
<!-- 文件列表 -->
|
<!-- 文件列表 -->
|
||||||
|
|||||||
@@ -466,7 +466,6 @@ export default {
|
|||||||
if (rs.status === 200) {
|
if (rs.status === 200) {
|
||||||
let type = toContentType(rs.result.fileType);
|
let type = toContentType(rs.result.fileType);
|
||||||
// ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"]
|
// ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"]
|
||||||
console.log(type, 'type');
|
|
||||||
if(rs.result.displayName.length > 100){
|
if(rs.result.displayName.length > 100){
|
||||||
this.$message.error('文件名称请不要超过100个字符');
|
this.$message.error('文件名称请不要超过100个字符');
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
全部课程<i class="el-icon-arrow-down el-icon--right"></i>
|
全部课程<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown" style="height: 150px;overflow-y: auto !important;">
|
<el-dropdown-menu slot="dropdown" style="height: 150px;overflow-y: auto !important;">
|
||||||
|
<el-dropdown-item command="">全部</el-dropdown-item>
|
||||||
<el-dropdown-item v-for="cou in couresna" :command="cou.courseId">{{cou.courseName}}</el-dropdown-item>
|
<el-dropdown-item v-for="cou in couresna" :command="cou.courseId">{{cou.courseName}}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -131,45 +132,46 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="860px"
|
width="860px"
|
||||||
title="王明"
|
class="export-dialog"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="dialogVisible">
|
:visible.sync="dialogVisible">
|
||||||
<div class="Exportbox">
|
<div class="Exportbox">
|
||||||
<div class="Export-info" style="border-bottom: 1px solid #ddd;padding-bottom:30px;margin-bottom:35px">
|
<div class="export-dialog-top">
|
||||||
|
<div class="export-dialog-left">
|
||||||
|
<author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img>
|
||||||
|
<div class="userInfo-info">
|
||||||
|
<p><span style="font-weight: 500;font-size: 22px;">{{userInfo.name}}</span><span style="font-size: 12px;margin-left:10px">{{userInfo.departFullName}}</span></p>
|
||||||
|
<p>{{userInfo.sign}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="export-dialog-right">
|
||||||
|
<p>累计导出{{datalist.length}}条</p>
|
||||||
|
<p style="margin-top:10px">导出时间:{{formatDate(new Date())}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="export-dialog-body">
|
||||||
|
<div class="Export-info" style="" v-for="(item,idx) in datalist" :key="idx">
|
||||||
<div class="all-title">
|
<div class="all-title">
|
||||||
<h3> 《高效能人士的7个习惯》</h3>
|
<h3> {{item.courseName}}</h3>
|
||||||
<div><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
<div v-if="item.playTime != ''"><img src="../../../public/images/coteplay.png" alt="">{{item.playTime}}</div>
|
||||||
<h6>2022/05/21 16:28</h6>
|
<h6>{{item.sysCreateTime}}</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-content">
|
<div class="all-content">
|
||||||
我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。
|
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||||
|
<div v-else>
|
||||||
|
<template v-for="img in item.content">
|
||||||
|
<img style="max-height:145px;max-width:140px" :src="fileBaseUrl + img" alt=""/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="Export-info" style="border-bottom: 1px solid #ddd;padding-bottom:30px;margin-bottom:35px">
|
|
||||||
<div class="all-title">
|
|
||||||
<h3> 《高效能人士的7个习惯》</h3>
|
|
||||||
<div><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
|
||||||
<h6>2022/05/21 16:28</h6>
|
|
||||||
</div>
|
|
||||||
<div class="all-content">
|
|
||||||
我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Export-info" style="border-bottom: 1px solid #ddd;padding-bottom:30px;margin-bottom:35px">
|
|
||||||
<div class="all-title">
|
|
||||||
<h3> 《高效能人士的7个习惯》</h3>
|
|
||||||
<div><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
|
||||||
<h6>2022/05/21 16:28</h6>
|
|
||||||
</div>
|
|
||||||
<div class="all-content">
|
|
||||||
我见过的策划们,不管是甲方企业的,还是广告代理都经常犯三大错误:找一个营销理论,做策略时直接向上套。不管是什么行业、企业处在什么发展阶段,都要照着这个理论的要求,做策略时直接向上套。不管是什么行业、企业处在什么来实。不管是么行业、企业处在什什么行业、企业处在发展发发发施营销传播,写PPT时 也要照着这个理论的框架来写。施营销传播,写PPT时 也要照着这个理论的框架来写施营销传播,写PPT时 也要照论。
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button class="footer-btn" style="color: #387DF7;" plain @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button @click="dialogVisible = false">打 印</el-button>
|
<!-- <el-button @click="dialogVisible = false">打 印</el-button> -->
|
||||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
<el-button class="footer-btn" style="margin-right:36px" type="primary" @click="exportStart()">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -180,14 +182,17 @@
|
|||||||
import apiNote from '@/api/phase2/note.js';
|
import apiNote from '@/api/phase2/note.js';
|
||||||
import interactBar from '@/components/Portal/interactBar.vue';
|
import interactBar from '@/components/Portal/interactBar.vue';
|
||||||
import FileUpload from '@/components/NoteUpload/index.vue';
|
import FileUpload from '@/components/NoteUpload/index.vue';
|
||||||
|
import AuthorImg from '@/components/Portal/authorImg.vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import {formatDate} from '@/utils/tools.js'
|
||||||
export default {
|
export default {
|
||||||
components:{interactBar,FileUpload},
|
components:{interactBar,FileUpload,AuthorImg},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo'])
|
...mapGetters(['userInfo'])
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
formatDate,
|
||||||
noteFile:{
|
noteFile:{
|
||||||
contentType:null,
|
contentType:null,
|
||||||
type:2,
|
type:2,
|
||||||
@@ -243,23 +248,43 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportCommand(e) {
|
exportCommand(e) {
|
||||||
|
this.exportType = e;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
exportStart(){
|
||||||
let ids = this.datalist.map(item=>{
|
let ids = this.datalist.map(item=>{
|
||||||
if(item.contentType !=3) {
|
if(item.contentType !=3) {
|
||||||
return item.id;
|
return item.id;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
// name:this.userInfo.name,
|
name:this.userInfo.name,
|
||||||
// sign:'abcd',
|
sign:'abcd',
|
||||||
ids:["1017809571512426496","1017807633689452544"],
|
ids:ids,
|
||||||
// author:'/upload/2022/5/979502964375564288.png',//this.userInfo.avatar,
|
author:this.userInfo.avatar,//this.userInfo.avatar,
|
||||||
}
|
}
|
||||||
if(e == '1') {
|
if(this.exportType == '1') {
|
||||||
apiNote.exportPdf(data).then(res=>{
|
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 {
|
} else {
|
||||||
apiNote.exportExcel(ids).then(res=>{
|
apiNote.exportExcel(ids).then(res=>{
|
||||||
|
if(res.status) {
|
||||||
|
this.$message.error('导出失败');
|
||||||
|
} else {
|
||||||
const link = document.createElement('a');// 创建a标签
|
const link = document.createElement('a');// 创建a标签
|
||||||
let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型
|
let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型
|
||||||
link.style.display = "none";
|
link.style.display = "none";
|
||||||
@@ -268,6 +293,9 @@ export default {
|
|||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
|
this.dialogVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -299,6 +327,9 @@ export default {
|
|||||||
importCommand(e){
|
importCommand(e){
|
||||||
this.importDialogVisible = true;
|
this.importDialogVisible = true;
|
||||||
this.upNoteFile.contentType = e;
|
this.upNoteFile.contentType = e;
|
||||||
|
this.noteFile.filePath = '';
|
||||||
|
this.noteFile.fileName = '';
|
||||||
|
this.upNoteFile.content = [];
|
||||||
if(e == '3') {
|
if(e == '3') {
|
||||||
this.upNoteFile.limit = 9;
|
this.upNoteFile.limit = 9;
|
||||||
this.upNoteFile.fileType = ["png","jpg"];
|
this.upNoteFile.fileType = ["png","jpg"];
|
||||||
@@ -336,9 +367,14 @@ export default {
|
|||||||
this.courseId = e;
|
this.courseId = e;
|
||||||
this.noteData(this.num);
|
this.noteData(this.num);
|
||||||
},
|
},
|
||||||
Time(){
|
Time(val){
|
||||||
|
if(this.Filtertime && this.Filtertime.length > 0) {
|
||||||
this.startTime = this.Filtertime[0];
|
this.startTime = this.Filtertime[0];
|
||||||
this.endTime = this.Filtertime[1];
|
this.endTime = this.Filtertime[1];
|
||||||
|
} else {
|
||||||
|
this.startTime ='';
|
||||||
|
this.endTime = '';
|
||||||
|
}
|
||||||
this.noteData(this.num);
|
this.noteData(this.num);
|
||||||
},
|
},
|
||||||
open(item) {
|
open(item) {
|
||||||
@@ -417,19 +453,16 @@ export default {
|
|||||||
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
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 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)
|
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
|
return hour + ':' + min + ':' + sec
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.paegSize = val;
|
this.paegSize = val;
|
||||||
this.pageIndex = 1;
|
this.pageIndex = 1;
|
||||||
this.noteData(this.num);
|
this.noteData(this.num);
|
||||||
console.log(`每页 ${val} 条`);
|
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.pageIndex = val;
|
this.pageIndex = val;
|
||||||
this.noteData(this.num);
|
this.noteData(this.num);
|
||||||
console.log(`当前页: ${val}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -437,12 +470,57 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.footer-btn{
|
||||||
|
width: 140px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #387DF7;
|
||||||
|
}
|
||||||
::v-deep .note-sift{
|
::v-deep .note-sift{
|
||||||
.el-dropdown-menu{
|
.el-dropdown-menu{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .export-dialog{
|
||||||
|
.el-dialog__header{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.el-dialog__body{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.export-dialog-top{
|
||||||
|
height: 90px;
|
||||||
|
background: linear-gradient(128deg, #70B0FF 0%, #4B7CFF 15%, #4678FF 39%, #7599FF 76%, rgba(1,72,228,0.85) 100%);
|
||||||
|
box-shadow: 14px 12px 14px 2px rgba(0,0,0,0.03);
|
||||||
|
padding: 16px 46px 16px 56px;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.export-dialog-left{
|
||||||
|
display: flex;
|
||||||
|
// ::v-deep .item-author .el-avatar{
|
||||||
|
// width: 60px !important;
|
||||||
|
// height: 60px !important;
|
||||||
|
// }
|
||||||
|
.el-avatar{
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
.userInfo-info{
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.export-dialog-right{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.export-dialog-body{
|
||||||
|
margin: 40px 13px 0 53px;
|
||||||
|
padding-right: 36px;
|
||||||
|
height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
.note-info-index{
|
.note-info-index{
|
||||||
::v-deep .el-upload-dragger{
|
::v-deep .el-upload-dragger{
|
||||||
width: 500px;
|
width: 500px;
|
||||||
@@ -497,9 +575,14 @@ export default {
|
|||||||
.el-popper{
|
.el-popper{
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
.Export-info{
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
padding-bottom:30px;
|
||||||
|
margin-bottom:35px
|
||||||
|
}
|
||||||
.Export-info:last-child{
|
.Export-info:last-child{
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep.dr-dialog{
|
::v-deep.dr-dialog{
|
||||||
max-width: 870px !important;
|
max-width: 870px !important;
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
this.notedetail();
|
this.notedetail();
|
||||||
this.timer = setInterval(()=>{
|
this.timer = setInterval(()=>{
|
||||||
this.savedata(1);
|
this.savedata(1);
|
||||||
},30000 *10);
|
},30000);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
imgDel(index) {
|
imgDel(index) {
|
||||||
@@ -93,6 +93,8 @@ export default {
|
|||||||
},
|
},
|
||||||
comeback(){
|
comeback(){
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
clearImmediate(this.timer);
|
||||||
|
this.timer = null;
|
||||||
},
|
},
|
||||||
notedetail(){
|
notedetail(){
|
||||||
apiNote.detail(this.id).then(res=>{
|
apiNote.detail(this.id).then(res=>{
|
||||||
@@ -112,7 +114,11 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
if(this.editdata.contentType == 3) {
|
||||||
this.imgContent = item.beforeContent;
|
this.imgContent = item.beforeContent;
|
||||||
|
} else {
|
||||||
|
this.editdata.content = item.beforeContent;
|
||||||
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
@@ -158,6 +164,7 @@ export default {
|
|||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
sessionStorage.setItem('isShowTip','');
|
sessionStorage.setItem('isShowTip','');
|
||||||
if(num ==1) {//自动保存
|
if(num ==1) {//自动保存
|
||||||
|
this.editdata.sysVersion +=1;
|
||||||
this.isShowTip = '笔记自动保存成功';
|
this.isShowTip = '笔记自动保存成功';
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.isShowTip = '';
|
this.isShowTip = '';
|
||||||
@@ -181,6 +188,7 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearImmediate(this.timer);
|
clearImmediate(this.timer);
|
||||||
|
this.timer = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user