diff --git a/src/api/boe/course.js b/src/api/boe/course.js index cc5b16b8..680eee2d 100644 --- a/src/api/boe/course.js +++ b/src/api/boe/course.js @@ -53,10 +53,18 @@ const courseList = function(data) { return ajax.postJson('/b1/system/search/list',data); } +/** + * 删除课程 + * @param {Object} ms_timeline_kid + */ +const delLearning = function(ms_timeline_kid) { + return ajax.post('/b1/system/user/ms-timeline-delete',{ms_timeline_kid}); +} export default { myLearning, cmtaskList, reportList, - courseList + courseList, + delLearning } diff --git a/src/assets/styles/ellipsis.scss b/src/assets/styles/ellipsis.scss index b2c628da..f5aae67c 100644 --- a/src/assets/styles/ellipsis.scss +++ b/src/assets/styles/ellipsis.scss @@ -29,10 +29,5 @@ p{ margin-top: 70px; color: #ccc; } -.el-dialog__wrapper{ - background-color: rgba(128, 128, 128,.7) !important; -} -.el-message-box__wrapper{ - background-color: rgba(128, 128, 128,.7) !important; -} + diff --git a/src/components/Article/editItems.vue b/src/components/Article/editItems.vue index 4d2b72ad..24e4b068 100644 --- a/src/components/Article/editItems.vue +++ b/src/components/Article/editItems.vue @@ -31,16 +31,10 @@ - + - - 确 定 + 确 定 @@ -205,11 +199,17 @@ export default { .el-dialog__header{ padding:0; } + .el-dialog__body { + padding: 30px 20px; + // overflow-y: auto; +} .el-dialog__footer{ - border-top: 1px solid #F5F5F6; - background-color: #F5F5F6; + border-top: 1px solid #fff; + background-color: #fff; + padding: 10px 20px 20px; } } + .nav { margin-bottom: 10px; } diff --git a/src/components/Course/collectItem.vue b/src/components/Course/collectItem.vue index a4709389..21a6bf04 100644 --- a/src/components/Course/collectItem.vue +++ b/src/components/Course/collectItem.vue @@ -7,7 +7,7 @@
-
+
{{ contentTypeFilter(item.contentType).text }} {{ item.title }}
@@ -132,6 +132,16 @@ export default { diff --git a/src/components/Portal/comments.vue b/src/components/Portal/comments.vue index 4ad36e71..4c271309 100644 --- a/src/components/Portal/comments.vue +++ b/src/components/Portal/comments.vue @@ -65,7 +65,7 @@
暂无评论~
-
+
@@ -74,14 +74,19 @@
-
{{com.content}}
+
+ {{displayAll(com)}} + + {{com.isAll?'收起':'全文'}} + +
@@ -110,7 +115,12 @@
-
{{reply.content}}
+
+ {{displayAll(reply)}} + + {{reply.isAll?'收起':'全文'}} + +
@@ -405,7 +415,8 @@ res.result.list.forEach(item=>{ item.avatar=''; item.orgInfo=''; - // item.sex=null; + item.isAll=false; + //item.sex=null; allList.push(item); ids.push(item.sysCreateAid); if(item.replyList && item.replyList!=''){ @@ -413,6 +424,7 @@ reply.avatar=''; reply.orgInfo=''; reply.sex=null; + reply.isAll=false; allList.push(reply); ids.push(reply.sysCreateAid); }) @@ -457,13 +469,14 @@ } - apiComment.add(cdata).then(res=>{ + apiComment.add(cdata).then(res=>{ if(res.status==200){ // this.list.unshift(res.result); // this.sex = res.result.sex=null; + res.result.isAll=false; this.list.unshift(res.result); - this.loadAuthorInfo([res.result],[res.result.sysCreateAid]); + this.loadAuthorInfo([res.result],[res.result.sysCreateAid]); this.$message.success('发布成功'); // @@ -488,6 +501,17 @@ hideButtons(){ this.btnsShowRowId=''; }, + //展示全部 + displayAll(item) { + //console.log(item,'item'); + if(!item.isAll && item.content && item.content.length > 170) { + return item.content.slice(0, 170) + "..."; + } + return item.content; + }, + changeIsAll(item) { + item.isAll=!item.isAll; + }, showReply(item){ this.replyInfo.objType=this.objType; this.replyInfo.objId=this.objId; @@ -513,7 +537,8 @@ } apiComment.reply(this.replyInfo).then(res=>{ if(res.status==200){ - res.result.sex = null; + res.result.sex = null; + res.result.isAll=false; this.loadAuthorInfo([res.result],[res.result.sysCreateAid]); comment.replyList.push(res.result); this.replyInfo.parentId=''; @@ -617,6 +642,7 @@ apiComment.reply(this.replyInfo).then(res=>{ if(res.status==200){ res.result.sex = null; + res.result.isAll=false; this.loadAuthorInfo([res.result],[res.result.sysCreateAid]); this.replyDiaglog.list.push(res.result); this.replyInfo.parentId=''; @@ -820,7 +846,13 @@ padding-left: 40px; .comment-content{ padding-bottom: 0px; + white-space: pre-wrap; word-break:break-all; + span { + color: #409eff; + cursor: pointer; + margin-left: 5px; + } } .comment-btns{ // padding: 5px 10px 10px 0px; diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index c7a77c72..64933aca 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -178,7 +178,10 @@ export default { } }, created(){ - if(this.data && this.data.id!='' && !this.readonly){ + + }, + mounted() { + if(this.data && this.data.id && !this.readonly){ this.checkHas(); } }, diff --git a/src/components/PortalFloatTools.vue b/src/components/PortalFloatTools.vue index 14fdf3a7..e1c49cf0 100644 --- a/src/components/PortalFloatTools.vue +++ b/src/components/PortalFloatTools.vue @@ -106,7 +106,7 @@ - +
diff --git a/src/components/Qa/addQuestion.vue b/src/components/Qa/addQuestion.vue index 570a3ce8..b055d502 100644 --- a/src/components/Qa/addQuestion.vue +++ b/src/components/Qa/addQuestion.vue @@ -31,11 +31,11 @@ 取 消 我已阅读并遵守平台内容发布要求
- + - 确 定 + 确 定 @@ -117,9 +117,5 @@ .el-dialog__header{ padding:0; } - .el-dialog__footer{ - border-top: 1px solid #F5F5F6; - background-color: #F5F5F6; - } } diff --git a/src/views/article/MyList.vue b/src/views/article/MyList.vue index 20ad2660..df0e673e 100644 --- a/src/views/article/MyList.vue +++ b/src/views/article/MyList.vue @@ -103,7 +103,6 @@ export default { query.sysCreateAid = this.userInfo.aid; apiArticle.myPageList(query).then(res => { if (res.status == 200) { - console.log(res) this.total = res.result.count; this.pageData.list = res.result.list; if(this.pageData.list.length!=0){ diff --git a/src/views/article/contactMine.vue b/src/views/article/contactMine.vue index 6b386218..18874e52 100644 --- a/src/views/article/contactMine.vue +++ b/src/views/article/contactMine.vue @@ -283,11 +283,21 @@ export default { this.$message.error("回复失败"); }) } else { - apiQa.saveComment({ - parentId:this.replayContent.parentId, - content:this.replayContent.content, - commentId:this.replayContent.id - }).then(res=>{ + //默认是一级评论,2级数据 + let replyData={ + replayAid: this.replayContent.sysCreateAid, + replayName: this.replayContent.sysCreateBy, + content: this.replayContent.content, + parentId: this.replayContent.id, + commentId: "", + clevel: 2 + } + if(this.replayContent.clevel==2){ //当前是一级评论 + replyData.commentId=this.replayContent.id; + replyData.clevel=3; + } + + apiQa.saveComment(replyData).then(res=>{ if(res.status==200){ this.$message.success("回复成功"); this.shareShow = false; diff --git a/src/views/exam/Question.vue b/src/views/exam/Question.vue index 503ac741..0e76348d 100644 --- a/src/views/exam/Question.vue +++ b/src/views/exam/Question.vue @@ -13,11 +13,7 @@ --> - + - 搜索 - - 重置 - + 搜索 + 重置 添加
- - - + @remove="removeFile" >
@@ -96,7 +79,7 @@
- 正确 - 删除 + style="width: 80px; margin-right: 10px">正确 + 删除
- 添加选项 + 添加选项
- - - + :rules="questionRules"> + { this.$message({ type: "error", message: "查询数据错误:" + err }); diff --git a/src/views/manage/AddAudiences.vue b/src/views/manage/AddAudiences.vue index 538fbc04..5fa0c21c 100644 --- a/src/views/manage/AddAudiences.vue +++ b/src/views/manage/AddAudiences.vue @@ -46,7 +46,7 @@
- + 搜索 重置
diff --git a/src/views/portal/article/Detail.vue b/src/views/portal/article/Detail.vue index 51f40e26..2912171e 100644 --- a/src/views/portal/article/Detail.vue +++ b/src/views/portal/article/Detail.vue @@ -23,7 +23,7 @@
- +
diff --git a/src/views/portal/qa/Answer.vue b/src/views/portal/qa/Answer.vue index 589f4d7a..3f9b6b90 100644 --- a/src/views/portal/qa/Answer.vue +++ b/src/views/portal/qa/Answer.vue @@ -32,7 +32,7 @@ 写回答
共计{{detailData.answers}}条回答 - +
@@ -45,9 +45,7 @@ 我已阅读并遵守平台内容发布要求
- -
@@ -55,8 +53,7 @@
- 暂时还没有回答,开始 - 写第一个回答 + 暂时还没有回答,开始 写第一个回答
@@ -67,82 +64,122 @@ 发布 --> - -
-
- - - 最佳答案 + +
+
+
+
+ 最佳答案 + 设为最佳答案 +
-
{{ displayAll(item) }} - {{item.isAll?'收起':'全文'}}
- -
发布于
- -
-
- - - - - 设为最佳答案 -
-
- - 回复 -
-
-
-
- - 回复 - {{con.replayName}} -
-
- {{ displayAll(con) }} - - {{con.isAll?'收起':'全文'}} - -
- 发布于 -
- - - - -
-
- - 回复 -
- -
-
-
- - 回复 - {{row.replayName}} -
-
- {{ displayAll(row) }} - - {{row.isAll?'收起':'全文'}} - -
- 发布于 -
- - - - -
-
- - 回复 -
+
+
+
{{ displayAll(item) }} + {{item.isAll?'收起':'全文'}} +
+
+
回答于
+
+
+
+
+
+ 回复 + 编辑 + 删除 + +
+ +
+
+ +
+ + 发布回复 +
+
+ +
+
+
+
+ + 回复 + {{con.replayName}} +
+
+ +
+
+
+
+
+ {{ displayAll(con) }} + + {{con.isAll?'收起':'全文'}} + +
+
+
+ 回复 + 删除 +
+ +
+
+ + 发布回复 +
+
+ +
+
+
+
+ + 回复 + {{row.replayName}} +
+
+ +
+
+
+
+
+ {{ displayAll(row) }} + + {{row.isAll?'收起':'全文'}} + +
+
+
+ 回复 + 删除 +
+ + +
+
+
+ + 发布回复 +
+
+ + +
+
+
-
-
+
@@ -203,11 +240,11 @@
- + - 确 定 + 确 定
@@ -272,7 +309,18 @@ export default { controlListNew: [], //用来控制回复输入框的显示与否 curParent:{},//当前输入的上级的对象,用于往answers中追加回复的内容 curParentId:'',//当前回复的内容的id - replyContent: "" //回复的内容 + replyContent: "" ,//回复的内容 + readonly:false,//是否只读,用于预览 + btnsShowRowId:'',//显示的button的条目id + replyDiaglog:{ + show:false, + pageIndex:1, + pageSize:8, + pages:1, + count:0, + commentId:'', + list:[] + } }; }, watch: { @@ -601,6 +649,14 @@ export default { this.loadAnswer(); this.$off("ensure"); }, + showButtons(id){ + if(!this.readonly){ + this.btnsShowRowId=id; + } + }, + hideButtons(){ + this.btnsShowRowId=''; + }, //展示全部 displayAll(item) { if(!item.isAll && item.content.length > 170) { @@ -662,7 +718,51 @@ export default { this.$message.error("回复失败"); } }); - } + }, + showMoreReply(comment){ + this.replyDiaglog.pages=1; + this.replyDiaglog.count=0; + this.replyDiaglog.pageIndex=1; + this.replyDiaglog.list=[]; + this.replyDiaglog.show=true; + this.replyDiaglog.commentId=comment.id; + this.loadAllReplyData(false); + }, + loadMoreReply(){ + this.replyDiaglog.pageIndex++; + this.loadAllReplyData(true); + }, + loadAllReplyData(append){ + let params={ + pageIndex:this.replyDiaglog.pageIndex, + pageSize:this.replyDiaglog.pageSize, + commentId:this.replyDiaglog.commentId + } + let $this=this; + // apiComment.replyList(params).then(rs=>{ + // if(rs.status==200){ + // $this.replyDiaglog.count=rs.result.count; + // $this.replyDiaglog.pages=rs.result.totalPages; + // let ids=[]; + // if(append){ + // rs.result.list.forEach(item=>{ + // item.avatar=''; + // ids.push(item.sysCreateAid); + // $this.replyDiaglog.list.push(item); + // }) + // }else{ + // rs.result.list.forEach(item=>{ + // item.avatar=''; + // ids.push(item.sysCreateAid); + // }) + // $this.replyDiaglog.list=rs.result.list; + // } + // this.loadAuthorInfo(rs.result.list,ids); + // }else{ + // this.$message.error(rs.message); + // } + // }) + }, } }; @@ -672,10 +772,6 @@ export default { .el-dialog__header{ padding:0; } - .el-dialog__footer{ - border-top: 1px solid #F5F5F6; - background-color: #F5F5F6; - } } ::v-deep .el-card__body { padding: 0; @@ -764,8 +860,9 @@ export default { .answer { margin-top: 14px; background-color: #fff; + border-bottom: 1px solid #dddddd; // padding: 5px 20px 20px 20px; - .top { + .answer-top { font-size: 16px; font-weight: 600; display: flex; @@ -778,41 +875,6 @@ export default { border-radius: 50%; vertical-align: middle; } - } - .submit-div { - margin: 15px 0; - } - .bottom { - text-align: right; - } -} -.data { - margin-top: 10px; - background-color: #fff; - padding: 5px 20px 10px 20px; - .text { - margin: 21px 0; - line-height: 24px; - white-space: pre-wrap; - word-break: break-all; - - span { - color: #409eff; - cursor: pointer; - margin-left: 5px; - } - } - ::v-deep .tip { - color: #999999; - margin: 15px 0; - display: flex; - justify-content: flex-start; - align-items: center; - i { - color: #a3b1cc; - // margin-left: 10px; - cursor: pointer; - } .zuijia { width: 106px; height: 42px; @@ -826,77 +888,144 @@ export default { line-height: 42px; text-align: center; } - .interact-bar-btn { - margin: 0; - margin-right: 10px; - min-width: 0 !important; - span { - display: none; - } - } } - .data-item { + .answer-body{ + padding-left: 40px; + .answer-text{ + margin: 20px 0 15px; + line-height: 24px; + white-space: pre-wrap; + word-break: break-all; + span { + color: #409eff; + cursor: pointer; + margin-left: 5px; + } + } + .answer-time{ + font-size: 14px; + color: #8590a6; + display: flex; + justify-content: space-between; + align-items: center; + } + .answer-boot{ + height: 35px; + line-height: 35px; + display: flex; + justify-content: space-between; + .answer-boot-btns{ + a{ + margin-right:15px; + span{ + margin-left: 6px; + color: #8590A6; + font-size: 14px; + } + } + } + + } + .answer-reply { + display: flex; + margin-bottom: 10px; + .el-button { + margin-left: 10px; + } + } + } + // .bottom { + // text-align: right; + // } +} +.comment{ + margin-top: 10px; + background-color: #FFFFFF; border-bottom: 1px solid #dddddd; - .reply-box { - display: flex; - margin-bottom: 10px; - .el-button { - margin-left: 10px; - } - } - &:last-of-type { - border: 0; - } - .editTime { - font-size: 14px; - color: #8590a6; - display: flex; - justify-content: space-between; - align-items: center; - } - .answer-reply { - margin-left: 40px; - // margin-bottom: 20px; - padding: 10px 0; - border-bottom: 1px solid #dddddd; - &:last-of-type { - border: 0; - } - .answer-reply-first { + .comment-top{ + display: flex; + justify-content: space-between; + padding-bottom:10px; + font-weight: 500; + line-height: 30px; + font-size: 1.1em; + .comment-author{ display: flex; align-items: center; - .answer-reply-text { - margin: 0 10px; - color: #8590a6; - font-size: 14px; - font-weight: 500; + height: 30px; + line-height: 30px; + .comment-author-text{ + margin-left: 10px; + color: #8590A6; + font-size:14px; } } - .answer-reply-content { - line-height: 1.5; - margin: 21px 0; + .comment-time{ + color: #666666; + font-size: 12px; } + } + .comment-body{ + padding-left: 40px; + .comment-content{ + padding-bottom: 0px; + word-break:break-all; + span{ + cursor: pointer; + color: #409EFF + } + } + .comment-btns{ + // padding: 5px 10px 10px 0px; + height: 35px; + line-height: 35px; + a{ + margin-right:15px; + span{ + margin-left: 6px; + color: #8590A6; + font-size: 14px; + } + } + } + .comment-reply { + display: flex; + margin-bottom: 10px; + .el-button { + margin-left: 10px; + } + } + } + .comment-replys{ + padding-left: 40px; } } +.comment-last{ + border-bottom: none; } -::v-deep .publishAnswer { - padding: 24px 20px; - .el-card__body { - // display: flex; - // justify-content: space-between; - align-items: center; - .el-input__inner { - height: 48px; - } - .el-button { - margin-left: 20px; - // height: 48px; - // width: 78px; - color: #e8f3fa; - font-size: 16px; - } - } +.answer-reply-box { + margin-top: 10px; + background-color: #fff; + padding: 5px 20px 10px 20px; } +// ::v-deep .publishAnswer { +// padding: 24px 20px; +// .el-card__body { +// // display: flex; +// // justify-content: space-between; +// align-items: center; +// .el-input__inner { +// height: 48px; +// } +// .el-button { +// margin-left: 20px; +// // height: 48px; +// // width: 78px; +// color: #e8f3fa; +// font-size: 16px; +// } +// } +// } .box-card { text-align: center; font-size: 18px; diff --git a/src/views/study/Courses.vue b/src/views/study/Courses.vue index 2888ec80..4457d56a 100644 --- a/src/views/study/Courses.vue +++ b/src/views/study/Courses.vue @@ -48,7 +48,7 @@
- +
开始学习 @@ -142,24 +142,42 @@ computed: { this.getData(); }, methods: { - delItem(item) { + delItem(item,itemIdx) { this.$confirm('您确定要删除所选课程吗?', '删除提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() =>{ - apicourseStudy.deleteSignUp(item.id,item.courseId).then(res =>{ - if(res.status==200){ - this.$message({ type: 'success', message: '删除成功!' }); - this.couresList.forEach((element,i )=> { - if(element.id === item.id) { - this.couresList.splice(i,1); - } - }); - } else { - this.$message({ type: 'error', message: res.message }); - } - }) + if(item.isOld){ + apiBoeCourse.delLearning(item.kid).then(res=>{ + if(res.status==200){ + this.$message({ type: 'success', message: '删除成功!' }); + this.couresList.splice(itemIdx,1); + this.dataList.forEach((it,i)=>{ + if(item.id == it.id) { + this.dataList.splice(i,1); + } + }) + } else { + this.$message({ type: 'error', message: res.message }); + } + }); + }else{ + apicourseStudy.deleteSignUp(item.id,item.courseId).then(res =>{ + if(res.status==200){ + this.$message({ type: 'success', message: '删除成功!' }); + this.couresList.splice(itemIdx,1); + this.dataList.forEach((it,i)=>{ + if(item.id == it.id) { + this.dataList.splice(i,1); + } + }) + } else { + this.$message({ type: 'error', message: res.message }); + } + }) + } + }) }, async getData() { //当前方案,此处只是加载一次 @@ -256,6 +274,7 @@ computed: { progress: item.completeProgress, status: status, isOld: true, + kid:item.ms_timeline_kid }) }) return list; diff --git a/src/views/study/PortalIndex.vue b/src/views/study/PortalIndex.vue index faa43232..b5459e7b 100644 --- a/src/views/study/PortalIndex.vue +++ b/src/views/study/PortalIndex.vue @@ -296,8 +296,7 @@ export default { isAppendTime:false,//是否追加学习时长 appentId:'',//当前追加的学习时长的id appentInterval:30000,//追加学习时间的间隔 30秒加一次 - handleTimeout:null, - sonIndex: null + handleTimeout:null }; }, mounted() { @@ -791,7 +790,6 @@ export default { } } - this.sonIndex = i; this.playerBoxShow=false; //显示内容部分 let $this = this; diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 33d33ca6..66d04292 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -187,7 +187,7 @@ }); }, openAvatar(){ - // this.avatarUrl='' + //console.log(this.avatarUrl,'this.avatarUrl'); this.dialogVisibleAvatar=true }, openPassword(){