合并后提交

This commit is contained in:
daihh
2022-06-13 20:03:02 +08:00
74 changed files with 3082 additions and 939 deletions

View File

@@ -7,11 +7,11 @@
<div class="article-info-title one-line-ellipsis">
{{ item.title }}
</div>
<div class="article-info-summary two-line-ellipsis">{{ item.summary }}</div>
<div class="article-info-summary two-line-ellipsis">{{ item.summary || item.content}}</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"> </authorInfo>
<span>发布时间{{ item.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<span>发布时间{{ item.sysCreateTime || item.publishTime | timeFilter }}</span>
<span>收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<el-button @click.stop="delItem(item)" type="text" style="color: #8590A6" icon="el-icon-remove">取消收藏</el-button>
</div>
</div>
@@ -46,9 +46,7 @@ export default {
},
methods: {
jump(item) {
// let routeData = this.$router.resolve({ path: '/article/detail?id=' + item.articleId }); // , query: { id: 1 }
// window.open(routeData.href, '_blank');
this.$router.push({path:'/article/detail',query:{id:item.articleId}})
this.$router.push({path:'/article/detail',query:{id:item.articleId || item.id}})
},
delItem(item) {
this.$confirm('您确定要取消收藏所选文章吗?', '删除提示', {
@@ -61,10 +59,10 @@ export default {
})
.catch(() => {});
},
jump(item){
this.$router.push({path:'/article/detail',query:{id:item.articleId}})
// window.open('/article/detail?id=' + item.articleId)
}
// jump(item){
// this.$router.push({path:'/article/detail',query:{id:item.articleId}})
// // window.open('/article/detail?id=' + item.articleId)
// }
}
};
</script>

View File

@@ -6,9 +6,9 @@
<span v-if="item.isRead" class="readed">已查看</span>
<span class="noRead" v-else>未查看</span>
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.title,keyword)"></span>
</div>
<div v-html="$keywordActiveShow(item.summary,keyword)" class="article-info-summary two-line-ellipsis">
<div v-html="$keywordActiveShow(item.summary || item.content,keyword)" class="article-info-summary two-line-ellipsis">
</div>
<!-- v-html="$keywordActiveShow(item.summary,keyword)" -->
<div style="display:flex;justify-content: space-between;">
@@ -65,14 +65,25 @@ export default {
},
methods: {
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
this.$router.push({path:'/article/detail',query:{id:item.objId}})
}
this.$router.push({path:'/article/detail',query:{id:item.objId || item.id}})
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
},
deleteshares(item){
@@ -129,7 +140,7 @@ export default {
font-weight: 400;
display: flex;
justify-content: flex-start;
align-items: center;
.readed{
font-size: 18px;

View File

@@ -0,0 +1,188 @@
<template>
<div style="">
<div class="article-list" v-for="(item, idx) in items" :key="idx">
<div class="article-info" @click="jumpRouter(item)">
<div class="article-info-title">
<span v-if="item.isRead" class="readed">已查看</span>
<span v-else class="noRead" >未查看</span>
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.cases.title,keyword)"></span>
</div>
<div v-html="$keywordActiveShow(item.cases.summary,keyword)" class="article-info-summary two-line-ellipsis">
</div>
<!-- v-html="$keywordActiveShow(item.summary,keyword)" -->
<div style="display:flex;justify-content: space-between;">
<div class="article-info-tools">
<!-- <authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo> -->
<span style="color: #999999;">{{ item.time }}</span>
<span v-if="type=='myShare'" style="color: #999999;font-size: 14px;">分享给{{item.toAname}}</span>
<span v-else>{{item.sysCreateBy}}分享给我</span>
<!-- <interactBar ref="shareDialog" :type="0" :data="item" :shares="false" :views="false"></interactBar> -->
</div>
<div>
<el-button style="color: #8590A6;" v-if="!item.isRead&&type=='myShare'" type="text" icon="el-icon-refresh-right" @click.stop="deleteshares(item)">撤回</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import apiShares from '@/api/modules/shares.js';
export default {
name:'caseItems',
props:{
items: {
//name,
type: Array,
default: () => []
},
type:{
type:String,
default:()=>{
return 'myShare'
}
},
keyword:{
type:String,
default:()=>{
return ''
}
}
},
methods:{
jumpRouter(item){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}else{
this.$message({
type: 'error',
message: res.message,
});
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}else{
this.$message({
type: 'error',
message: res.message,
});
}
})
}
}
console.log(item)
this.$router.push({path:'/case/detail',query:{id:item.cases.id}})
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
},
deleteshares(item){
this.$emit('confirm',item)
},
},
created() {
},
}
</script>
<style lang="scss" scoped>
.article-status1 {
padding: 3px;
border: 1px dotted #1ea0fa;
color: #1ea0fa;
}
.article-status2 {
padding: 3px;
border: 1px dotted #00aa00;
color: #00aa00;
}
.article-status3 {
padding: 3px;
border: 1px dotted #ff0000;
color: #ff0000;
}
.article-list {
border-bottom: 1px solid #dddddd;
// padding: 10px;
padding-bottom: 20px;
margin-top: 20px;
border-bottom: 1px solid #e9e9e9;
cursor: pointer;
}
.article-info {
cursor: pointer;
.article-info-title {
font-size: 16px;
font-weight: 400;
display: flex;
justify-content: flex-start;
align-items: center;
.readed{
font-size: 18px;
color: #3e7fff;
// margin-bottom: 6px;
}
.noRead{
font-size: 18px;
color:#FF3E3E;
// margin-bottom: 6px;
}
.title{
line-height: 25px;
margin-left: 10px;
font-size: 18px;
flex-shrink: 10000;
font-weight: 500;
color: #333333;
}
.el-button{
margin-left: auto;
}
// .article-info-date {
// height: 40px;
// line-height: 40px;
// float: right;
// font-weight: 200;
// color: #999999;
// i {
// margin-right: 5px;
// }
// }
}
.article-info-summary {
height: 46px;
font-weight: 200;
font-size: 16px;
line-height: 1.5;
margin:7px 0;
}
.article-info-tools {
color: #999999;
display: flex;
justify-content: flex-start;
align-items: center;
>span{
font-size: 14px;
color: #747474;
// margin-top: -2px;
}
// >span:first-of-type{
// margin-left: 10px;
// }
// >span:last-of-type{
// margin-top: -4px;
// margin-right:auto;
// }
}
}
</style>

View File

@@ -1,21 +1,24 @@
<template>
<div style="">
<div class="article-list" v-for="(item,idx) in items" :key="idx">
<div class="article-info">
<div class="article-info-title">
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" style="padding-left: 5px;">{{item.cases.title}}</router-link>
<div class="article-info ">
<div class="article-info-title " >
<div style="width:85%" class="title-line-ellipsis">
<router-link :to="'/case/detail?id='+item.cases.id" >{{item.cases.title}}</router-link>
</div>
<div class="article-info-date">
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
<el-button @click="delItem(item)" type="text" style="color: #8590A6" icon="el-icon-remove">取消收藏</el-button>
</div>
</div>
<div class="article-info-summary">
{{item.cases.summary}}
<div class="article-info-summary three-line-ellipsis">
<router-link :to="'/case/detail?id='+item.cases.id" > {{item.cases.summary}}</router-link>
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
<span>发布时间{{ item.cases.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar>
<span style="margin-top:2px">发布时间{{ item.cases.sysCreateTime || item.publishTime | timeFilter }}</span>
<span style="margin-top:2px">收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<!-- <interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar> -->
</div>
</div>
</div>
@@ -58,6 +61,25 @@
</script>
<style lang="scss" scoped>
.title-line-ellipsis{
display: -webkit-box;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
box-sizing: border-box;
word-break:break-all;
}
.three-line-ellipsis{
width: 100%;
display: -webkit-box;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
box-sizing: border-box;
word-break:break-all;
}
.article-status1{
padding: 3px;
border: 1px dotted #1EA0FA;
@@ -75,20 +97,24 @@
}
.article-list {
margin: 5px 0;
border: 1px solid #dddddd;
padding: 10px;
border-bottom: 1px solid #dddddd;
padding: 0px;
}
.article-info {
.article-info-title {
font-size: 16px;
font-weight: 400;
height: 40px;
line-height: 40px;
display: flex;
// width: 80%;
.article-info-date {
flex: 1;
height: 40px;
text-align: right;
line-height: 40px;
float: right;
font-weight: 200;
color: #999999;
i {
@@ -97,10 +123,12 @@
}
}
.article-info-summary {
height: 65px;
line-height: 25px;
color: #999999;
}
.article-info-tools {
height: 45px;
color: #999999;
display: flex;
justify-content: flex-start;

View File

@@ -285,7 +285,7 @@ export default {
homeworkInfo: {},
examInfo: {},
assessInfo: {},
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl: this.$Constants.fileBaseUrl,
btnLoading: false,
curCFile:{},//课件内容
coursewareInfo: {

View File

@@ -323,7 +323,7 @@ export default {
},
contentDataShow:true,//预览页面和课程内容的切换
isEdit: true,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl: this.$Constants.fileBaseUrl,
contentData: {},
curCFile:{},//课件内容
getType: getType,

View File

@@ -361,7 +361,7 @@
data(){
return {
converStatus:4,
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl:this.$Constants.fileBaseUrl,
curPdfPath:'',
curCFile:{},//当前课件的内容
comTypes:[

View File

@@ -12,7 +12,7 @@
<span>{{ item.title }}</span>
</div>
<div class="uc-course-text">讲师{{ item.authorName}}</div>
<div class="uc-course-text">收藏日期{{ item.time }}</div>
<div class="uc-course-text">收藏时间{{ item.time || item.favoritesTime}}</div>
</div>
<div class="flex-between">
<el-button v-if="remove" @click.stop="delItem(item)" type="text" icon="el-icon-remove" style="color:#8590A6;font-size:14px;">
@@ -75,7 +75,12 @@ export default {
coudetail(item) {
// let routeData = this.$router.resolve({ path: '/course/detail?id=' + item.objId });
// window.open(routeData.href, '_blank');
this.$router.push({path:'/course/detail',query:{id:item.objId}})
if(item.contentType == '20') {
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
} else {
this.$router.push({path:'/course/micro',query:{id:item.objId || item.id}})
}
},
delItem(item) {
this.$confirm('您确定要删除所选收藏吗?', '删除提示', {

View File

@@ -106,14 +106,30 @@ export default {
return obj;
},
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
this.$router.push({path:'/course/detail',query:{id:item.objId}})
}
if(item.contentType == 20) {
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
} else {
this.$router.push({path:'/course/micro',query:{id:item.objId || item.id}})
}
// window.open(`${this.webBaseUrl}/course/detail?id=${item.objId}`)
},
},

View File

@@ -562,7 +562,7 @@
courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
curCFile:{},//当前课件的内容
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl:this.$Constants.fileBaseUrl,
imageShowUrl: '',
activeName: 'courseware',
getType: getType,

View File

@@ -24,6 +24,19 @@ const lineHeightStyle = new lineHeightAttributor("lineHeight", "line-height", {
scope: Parchment.Scope.INLINE,
whitelist: ["1", "1.5", "2", "3", "4"]
});
const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
["blockquote", "code-block"], // 引用 代码块
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
[{ indent: "-1" }, { indent: "+1" }], // 缩进
[{ size: [false,"18px"] }], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
[{ align: [] }], // 对齐方式
[{ lineheight: ['initial', '1', '1.5', '2', '3', '4'] }],
["clean"], // 清除文本格式
["link", "image"]
]
Quill.register({ 'formats/lineHeight': lineHeightStyle }, true)
export default {
name: "Editor",
@@ -33,6 +46,10 @@ export default {
type: String,
default: "",
},
toobar:{
type: Boolean,
default: true
},
placeholder: {
type: String,
default: "请输入长度大于100个字符的内容",
@@ -68,19 +85,7 @@ export default {
},
// 工具栏配置
toolbar: {
container:[
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
["blockquote", "code-block"], // 引用 代码块
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
[{ indent: "-1" }, { indent: "+1" }], // 缩进
[{ size: [false,"18px"] }], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
[{ align: [] }], // 对齐方式
[{ lineheight: ['initial', '1', '1.5', '2', '3', '4'] }],
["clean"], // 清除文本格式
["link", "image"] // 链接、图片、视频, "video"
],
container:this.toobar? toolbarOptions:[],
handlers: {
image: function(value) {
if (value) {

View File

@@ -0,0 +1,281 @@
<template><!--pdf连接分页处理-->
<div class="pdf-perView" id="pdf-perView">
<div class="pdf-box">
<transition name="progress">
<el-progress v-if="showProgress" :percentage="Math.floor(loadedRatio * 100)" :text-inside="true" :show-text="false"></el-progress>
</transition>
<pdf
v-for="i in showPages"
:key="i"
:src="src"
:page="i"
@progress="loadedRatio = $event"
@page-loaded="loadedPageHandle"
@loaded="loadPdfHandle"
style="display: inline-block; width:100%;">
<div>每行的间隔内容</div>
</pdf>
<!-- <pdf
ref="pdf"
:src="pdfUrl"
:page="currentPage"
@progress="loadedRatio = $event"
@num-pages="pageCount = $event"
@page-loaded="currentPage = $event"
@loaded="loadPdfHandler"
@link-clicked="currentPage = $event">
</pdf> -->
</div>
<div v-if="totalPages>initNum" class="pdf-footer pagination-div" >
<!-- <el-button icon="el-icon-arrow-left" @click="prePage('footer')" :disabled="loadedRatio !== 1"></el-button>
<span v-if="loadedRatio !== 1" style="margin:0 10px;">0 / 0</span>
<span v-else style="margin:0 10px;">{{ currentPage }} / {{ pageCount }}</span>
<el-button @click="nextPage('footer')" :disabled="loadedRatio !== 1" icon="el-icon-arrow-right"></el-button> -->
<el-button type="primary" @click="clickMore()" v-if="moreState == 1">加载更多</el-button>
</div>
<!-- <div v-if="likeBox" class="xcontent postfixt-bot">
<div class="postfixt-bot-box">
<div style="display:inline-block">
<interactBar :data="data" :type="3" :comments="false" :shares="true"></interactBar>
</div>
<div style="display:inline-block;margin: 0 20px;">
<el-button type="primary" @click="goTop()">返回顶部</el-button>
</div>
</div>
</div> -->
</div>
</template>
<script >
import interactBar from '@/components/Portal/interactBar.vue';
import pdf from "vue-pdf";
export default {
components: { pdf,interactBar },
props: {
filePath: {
type: String,
default: "",
},
scrollToID: {
type: String,
default: "pdf-perView",
},
autoScroll: {
type: Boolean,
default: false,
},
boxShow:{
type: Boolean,
default: true,
}
},
data() {
return {
likeBox:false,
src: "",
showPages: undefined,
totalPages:0,
initNum:3,
scale: 100, //放大系数
loadedRatio:0,// 加载进度
showProgress:true,
moreState:1,// 1 加载更多 2 加载中 3无数据
isscroll:false,
pdfpage:0,
};
},
mounted() {
// /case/demo.pdf
if(this.filePath){
this.loadInitPdf(this.filePath);
}
window.addEventListener(
"scroll",
this.handleScroll
);
},
beforeDestroy(){
window.removeEventListener("scroll",this.handleScroll);
},
watch:{
filePath(newVal){
if(newVal){
this.loadInitPdf(newVal);
}
},
boxShow(newVal){
if(newVal){
this.likeBox = true;
} else {
this.likeBox = false;
}
},
loadedRatio(newVal){
// 直接使用loadedRatio控制进度条没有加载效果
if(newVal == 1){
let that = this;
setTimeout(function(){
that.showProgress = false;
}, 500)
}
}
},
methods: {
goTop() {
document.documentElement.scrollTop = 0;
this.likeBox = false;
},
loadProgress(e){
console.log(e,'loadProgress');
},
loadedPageHandle(e){
this.pdfpage = e;
},
loadPdfHandle(e){
console.log(e,'loadPdfHandle');
},
clickMore(){
if(this.totalPages>this.showPages){
this.showPages++;
}
this.isscroll = true;
this.likeBox = true;
},
//加载页面
loadInitPdf(url) {
let loadingTask = pdf.createLoadingTask(url);
this.src=loadingTask;
loadingTask.promise.then((pdf) =>{
this.totalPages=pdf.numPages;
if(pdf.numPages>this.initNum){
this.showPages = this.initNum;
} else{
this.showPages =pdf.numPages;
}
}).catch((err) =>{
this.$message.error("加载内容失败,请联系管理员");
});
},
handleScroll() {
let el_anking = document.querySelector('#case-list-content');
let innerHeight = document.querySelector('#pdf-perView').clientHeight
let outerHeight = document.documentElement.clientHeight
let scrollTop = document.documentElement.scrollTop
if(this.isscroll){
this.showPages++;
this.moreState = 2;
this.debounce(this.loadInitPdf(),5000);
}
if(this.pdfpage >= this.totalPages){
this.isscroll = false;
this.moreState = 3;
}
if(this.pdfpage < 4){
this.likeBox = false;
}
// if(scrollTop > 400) {
// document.querySelector('#articleAnking').style.cssText = "position: fixed;top: 0;width:242.5px";
// } else {
// document.querySelector('#articleAnking').style.cssText = "position: static";
// }
},
debounce(func, wait) {// 非立即执行
let timeout;
return function () {
let context = this;
let args = arguments;
if (timeout) clearTimeout(timeout);
timeout = setTimeout(() => {
func.apply(context, args)
}, wait);
}
},
prePage(type) {
if (this.currentPage > 1) {
this.currentPage--;
if(type === 'footer'){
this.scrollTo();
}
}
},
nextPage(type) {
if (this.currentPage < this.pageCount) {
this.currentPage++;
if(type === 'footer'){
this.scrollTo();
}
}
},
scrollTo(){
if(!this.autoScroll){
return;
}
document.getElementById(this.scrollToID).scrollIntoView({ block: 'start', behavior: 'smooth' })
},
//放大
scaleD() {
if (this.scale == 200) {
return;
}
this.scale += 5;
this.$refs.pdf.$el.style.width = parseInt(this.scale) + "%";
},
//缩小
scaleX() {
if (this.scale == 50) {
return;
}
this.scale += -5;
this.$refs.pdf.$el.style.width = parseInt(this.scale) + "%";
}
},
};
</script>
<style scoped lang="scss">
// .postfixt-bot{
// height: 60px;
// line-height: 60px;
// width: 750px;
// position: fixed;
// bottom: 0;
// background-color: #fff;
// border: 1px solid #eee;
// z-index: 999;
// .postfixt-bot-box{
// text-align: right;
// }
// }
.pdf-perView {
.pdf-box {
min-height: 300px;
width: 100%;
//border: 1px solid #dfdfdf;
overflow-y: hidden;
overflow-x: hidden;
>span{
margin-bottom: 20px;
}
}
.pdf-header,.pdf-footer {
//border: 1px solid #dfdfdf;
//background: #dfdfdf;
text-align: center;
line-height: 40px;
}
/* ------------------- 进度条 ------------------- */
//类名:隐藏到显示过程所需要的时间
.progress-leave-active{
transition: opacity 2s;
}
.progress-leave-to{
opacity: 0;
}
.el-progress .el-progress-bar .el-progress-bar__outer{
background-color: #FFFFFF;
}
}
</style>

View File

@@ -4,12 +4,19 @@
<div v-if="showTop" class="comments-top">
<div class="comments-top-left">评论 <span style="color: #797979;">{{total}}</span>
<el-checkbox v-if="objType ==2" class="btn" v-model="value" type="primary">只看作者</el-checkbox>
<el-checkbox v-if="objType ==3" class="btn" v-model="value" type="primary">{{value?'查看所有':'只看案主'}}</el-checkbox>
<!-- <el-checkbox v-if="objType ==3" class="btn" v-model="value" type="primary">{{value?'查看所有':'只看案主 @案主可以给他发私信哦'}}</el-checkbox> -->
<!-- <el-radio-group class="btn" v-if="objType ==3" v-model="radio">
<el-radio v-show="radio == 2" :label="1">查看所有</el-radio>
<el-radio v-show="radio == 1" :label="2">只看案主 @案主可以给他发私信哦</el-radio>
</el-radio-group> -->
<el-checkbox v-if="objType ==3" class="btn" v-model="value" type="primary">{{'只看案主'}}</el-checkbox>
<span v-if="objType ==3" class="anzhu"> @案主可以给他发私信哦</span>
<!-- <span v-if="objType ==3"><span v-if="value" @click="value = true">查看所有</span><span v-if="!value" @click="value = false">只看案主 @案主可以给他发私信哦</span></span> -->
</div>
<div class="comments-top-right" v-if="objType !==2">
<!-- <div class="comments-top-right" v-if="objType !==2">
<span @click="showList(false)" v-if="listShow">收起<i class="el-icon-arrow-down"></i></span>
<span @click="showList(true)" v-else >打开<i class="el-icon-arrow-up"></i></span>
</div>
</div> -->
</div>
<div class="comments-input" v-if="!readonly">
<div class="grid-content bg-purple">
@@ -22,6 +29,7 @@
</el-popover> -->
<el-popover placement="top-start" width="160" v-model="visible">
<p style="margin-bottom: 10px">请选择要@的老师</p>
<div>
<el-radio-group v-model="toUserId" @change="confirmTeacher()">
<el-radio-button
@@ -32,6 +40,7 @@
>
</el-radio-group>
</div>
<!-- <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="cancelTeacher()">取消</el-button>
<el-button type="primary" >确定</el-button>
@@ -44,6 +53,7 @@
<!-- type="textarea"
:row="1" -->
<el-input
v-if="objType !==3"
:autosize="{ minRows: 2, maxRows: 2 }"
type="textarea"
class="hideControl"
@@ -52,6 +62,18 @@
maxlength="800"
placeholder="写下您的评论(800字以内),可以@作者哦~"
></el-input>
<el-input
v-if="objType ==3"
:autosize="{ minRows: 2, maxRows: 2 }"
type="textarea"
class="hideControl"
show-word-limit
v-model="inputValue"
maxlength="800"
placeholder="写下您的评论(800字以内),可以@案主哦~"
></el-input>
</div>
<div style="width: 90px;display: flex;justify-content: flex-end;">
<el-button @click="submit()" style="height: 48px" type="primary">发布</el-button>
@@ -264,6 +286,7 @@
},
data() {
return {
radio:1,
value:false,
sex:null,
author:'',
@@ -319,6 +342,14 @@
}
this.loadData();
},
radio(newVal){
if(newVal == 2){
this.author = this.authorId;
} else {
this.author = '';
}
this.loadData();
},
inputValue(val,oldVal) {
let fu = val.substr(-1);
if(fu == '@'&&!oldVal) {
@@ -732,6 +763,10 @@
</script>
<style lang="scss" scoped>
.anzhu{
font-size: 14px;
color: #999;
}
::v-deep .el-input--medium .el-input__inner {
height: 48px;
}
@@ -797,6 +832,9 @@
font-size: 12px;
padding: 10px;
margin-left: 24px;
::v-deep .el-radio__inner{
border-radius: 0 !important;
}
}
}
.comments-top-center{

View File

@@ -43,12 +43,12 @@
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="浏览量" placement="top">
<svg-icon style="margin-right: 0;font-size: 16px;" icon-class="views"></svg-icon>
<svg-icon style="margin-right: 0;font-size:20.5px;" icon-class="eyes"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.views}}</span>
</div>
</div>
<el-dialog title="分享" :visible.sync="shareShow" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
<el-dialog title="分享" :visible.sync="shareShow" :close-on-click-modal="false" :append-to-body="true" width="500px" custom-class="g-dialog">
<div style="height: 200px;padding-right: 30px;">
<el-form label-width="100px" @submit.native.prevent >
<el-form-item label="姓名或工号">
@@ -141,6 +141,10 @@ export default {
theme:{
type:Number,
default:1
},
unicom:{
type:Boolean,
default:false
}
},
data(){
@@ -159,7 +163,7 @@ export default {
},
computed:{
...mapGetters(['userInfo']),
...mapGetters(['userInfo','praisesUnicom','favoritesUnicom']),
showAlign(){
if(this.align=='left'){
@@ -170,6 +174,12 @@ export default {
}
},
watch:{
praisesUnicom(newVal){
this.isPraise = newVal;
},
favoritesUnicom(newVal){
this.isFavorite = newVal;
},
data(newVal,oldVal){
// console.log(newVal,'newVal');
// if(newVal && newVal.id!=''){
@@ -178,7 +188,6 @@ export default {
}
},
created(){
},
mounted() {
if(this.data && this.data.id && !this.readonly){
@@ -266,7 +275,6 @@ export default {
this.shareShow=true;
},
addPraise(){
if(this.type==0){
console.log('未设置type值,1表课程,2表文章3表案例4表问答')
return;
@@ -296,6 +304,9 @@ export default {
this.data.praises--;
}
this.isPraise=false;
if(this.unicom) {
this.$store.dispatch("unicomPraises",false)
}
this.$message({message:'取消点赞',type:'success'})
}else{
console.log('取消失败:'+res.message);
@@ -308,6 +319,9 @@ export default {
if(res.result){
this.data.praises++;
}
if(this.unicom) {
this.$store.dispatch("unicomPraises",true)
}
if(this.type!=1&&this.type!=5){
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'点赞了我的');
}
@@ -356,6 +370,9 @@ export default {
if(res.result){
this.data.favorites--;
}
if(this.unicom) {
this.$store.dispatch("unicomFavorites",false)
}
this.$message({message:'已取消收藏',type:'success'});
//this.$emit('addFavorite',res.result);//添加收藏,如果是true代表添加成功false代表已存在
}else{
@@ -370,6 +387,9 @@ export default {
if(res.result){
this.data.favorites++;
}
if(this.unicom) {
this.$store.dispatch("unicomFavorites",true)
}
if(this.type===2||this.type===4){
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'收藏了我发布的');
}
@@ -477,11 +497,11 @@ export default {
}
apiShares.save(postData).then(rs=>{
$this.shareShow=false;
$this.data.shares++;
if(rs.status!=200){
this.$message.error("分享失败")
}else{
if(rs.result){
$this.data.shares++;
this.$message.success("分享成功")
if(this.type!=3){
if(this.type==1){
@@ -505,6 +525,13 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .g-dialog .el-dialog__header{
text-align: left !important;
}
::v-deep .g-dialog .el-dialog__body{
text-align: left !important;
}
.interact-bar{
// height: 30px;
.interact-bar-btns {

View File

@@ -1,5 +1,5 @@
<template>
<div class="portal-footer">
<div class="portal-footer" :style="`background-image:url(${this.webBaseUrl}/images/bg_foot.png)`">
<div class="center">
<div class="center-img1" style="margin-left: 100px;"><img :src="`${this.webBaseUrl}/images/foot_center.png`"/> </div>
<div class="center-img2"><img :src="`${this.webBaseUrl}/images/foot_code.png`"/> </div>
@@ -47,7 +47,7 @@ export default {
margin-top: 30px;
box-sizing: border-box;
height: 300px;
background-image: url(/pc/images/bg_foot.png);
//background-image: url(/pc/images/bg_foot.png);
background-position: center;
background-repeat: no-repeat;
background-size:cover;

View File

@@ -7,7 +7,7 @@
<div style="display: flex;justify-content: space-around;margin-left: 20px;">
<div class="top-nav" :class="current == 'index' ? 'current-nav' : ''"><router-link to="/index">首页</router-link></div>
<div class="top-nav" :class="current == 'course' ? 'current-nav' : ''"><router-link to="/course">课程</router-link></div>
<!-- <div class="top-nav" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div> -->
<div class="top-nav" v-if="caseShow" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
<div class="top-nav" :class="current == 'article' ? 'current-nav' : ''"><router-link to="/article">文章</router-link></div>
<div class="top-nav" :class="current == 'qa' ? 'current-nav' : ''"><router-link to="/qa">问答</router-link></div>
<div class="top-nav">
@@ -26,10 +26,10 @@
</div>
<div style="display: flex;justify-content: flex-end;align-items: center;">
<div v-if="goSearch !=10">
<el-input v-show="!hideSearch" placeholder="请输入关键词搜索" style="width: 260px;" @keyup.enter.native="searchJump()" clearable maxlength="20" v-model="keyword" class="input-with-select">
<el-input v-show="!hideSearch" placeholder="请输入标题搜索" style="width: 260px;" @keyup.enter.native="searchJump()" clearable maxlength="20" v-model="keyword" class="input-with-select">
<el-select v-if="current == 'index'" v-model="findType" style="width: 75px;" slot="prepend" placeholder="请选择">
<el-option label="课程" value="1"></el-option>
<!-- <el-option label="案例" value="2"></el-option> -->
<el-option v-if="caseShow" label="案例" value="2"></el-option>
<el-option label="文章" value="3"></el-option>
<el-option label="问答" value="4"></el-option>
<!-- <el-option label="专区" value="5"></el-option> -->
@@ -51,7 +51,7 @@
<div v-else class="uavatar">
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
<div v-else><img src="../../public/images/Avatarwoman.png" alt=""></div>
</div>
</a>
@@ -113,8 +113,8 @@ export default {
},
computed: {
...mapGetters(['userInfo', 'userMsg']),
...mapGetters(['userInfo', 'userMsg','caseShow']),
avatarText(){
return userAvatarText(this.userInfo.name);
}
@@ -128,7 +128,6 @@ export default {
};
},
mounted() {
//console.log(this.userInfo,'111');
this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg');
this.loadBoeData();
@@ -335,7 +334,7 @@ export default {
font-size: 25px !important;
margin: 0 !important;
padding: 0 !important
}
}
.message-count a {
color: #858d99;
font-size: 24px;
@@ -357,7 +356,7 @@ export default {
border-radius: 50%;
img{
border-radius: 50%;
width: 40px;
height: 40px;
}

View File

@@ -16,8 +16,8 @@
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"></authorInfo>
<span>发布时间{{ item.question.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<span>发布时间{{ item.question.sysCreateTime || item.publishTime | timeFilter }}</span>
<span>收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<el-button @click.stop="delCollectItem(item)" type="text" icon="el-icon-remove" style="color:#8590A6">取消收藏</el-button>
</div>
</div>

View File

@@ -73,13 +73,24 @@ export default {
},
methods: {
jumpRouter(item){
if(this.type!='myShare'){
if(item.type){
if(this.type!='myShare'){
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}else{
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
}
this.$router.push({path:'/qa/answer',query:{id:item.question.id}})
// window.open(`${this.webBaseUrl}/qa/answer?id=${item.question.id}`)
},

View File

@@ -16,7 +16,7 @@
<el-tabs v-model="tabName" @tab-click="handleTabClick">
<el-tab-pane label="报名管理" name="second">
<div>已报名{{study.list.length}}共有0人报名未成功共有{{study.list.length}}人通过审核</div>
<el-row style="margin: 20px 0;">
<el-row style="margin: 20px 0;" :gutter="20">
<!-- <el-col :span="4">
<div class="grid-content bg-purple"><el-input v-model="input" placeholder="手动添加:姓名/工号" /></div>
</el-col>
@@ -30,7 +30,7 @@
<el-button type="primary" >导入学员</el-button>
</div>
</el-col> -->
<el-col :offset="16" :span="3">
<el-col :offset="13" :span="4">
<div class="grid-content bg-purple">
<el-select v-model="signup.status" placeholder="状态" clearable>
<el-option label="未审核" :value="1"></el-option>
@@ -39,12 +39,12 @@
</el-select>
</div>
</el-col>
<el-col :span="3">
<el-col :span="4">
<div class="grid-content bg-purple"><el-input v-model="signup.name" clearable placeholder="姓名" /></div>
</el-col>
<el-col :span="2">
<div class="grid-content bg-purple">
<el-button type="primary" style="margin-left: 20px;" @click="getSignupList()" >ssz</el-button>
<el-button type="primary" @click="getSignupList()" > </el-button>
</div>
</el-col>
<!-- <el-col :span="2"> -->
@@ -55,7 +55,7 @@
</el-row>
<div class="tab-content">
<!-- @selection-change="handleSelectionChange" -->
<el-table max-height="500" border :data="study.list" style="width: 100%">
<el-table max-height="400" border :data="study.list" style="width: 100%">
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="code" label="工号">
@@ -78,7 +78,7 @@
<!-- <el-button type="primary" >发送邮件</el-button>
<el-button type="primary" >群发邮件</el-button>
<el-button type="primary" >存为受众</el-button> -->
<div style="float:right">
<div style="text-align:center">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@@ -714,7 +714,7 @@ export default {
line-height: 30px;
}
.tab-content {
min-height: 500px;
height: 450px;
overflow: auto;
}
</style>

View File

@@ -7,7 +7,7 @@
<div v-else class="uavatar">
<div v-if="sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
<div v-else><img src="../../../public/images/Avatarwoman.png" alt=""></div>
</div>
</div>
<div style="padding-left: 15px;">
@@ -60,9 +60,7 @@
</template>
<script>
import {
userAvatarText
} from "@/utils/tools.js";
import {userAvatarText,cutFullName} from "@/utils/tools.js";
import { mapGetters } from 'vuex'
export default {
name: 'UcHeader',
@@ -86,16 +84,9 @@ import {
if(this.$route.path == '/study/index'){
this.setCurIdentity(1);
}
this.orgInfo=this.userInfo.departFullName;
//console.log(this.orgInfo,'转化前的名称')
//this.orgInfo='京东方科技集团/显示事业/技术开发部';
if(this.orgInfo){
let idx=this.orgInfo.indexOf('/');
if(idx>-1){
this.orgInfo=this.orgInfo.substring(idx+1);
}
}
//console.log(this.orgInfo,'转化后的名称')
//let testName='京东方科技集团股份有限公司/北京中祥英科技有限公司/技术中心';
//this.orgInfo=cutFullName(testName,1);
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
},
methods:{
setCurIdentity(iden){

View File

@@ -74,14 +74,14 @@
</el-menu-item>
</el-submenu>
<!--增加一个说明-->
<!-- <el-menu-item index="/manage/teachers" v-show="curIdentity == 3">
<el-menu-item index="/manage/teachers" v-show="curIdentity == 3">
<svg-icon icon-class="teather"></svg-icon>
<span slot="title">教师管理</span>
</el-menu-item> -->
<!-- <el-menu-item index="/case/manage" v-show="curIdentity == 3">
</el-menu-item>
<el-menu-item index="/case/manage" v-show="curIdentity == 3">
<svg-icon icon-class="case"></svg-icon>
<span slot="title">案例管理</span>
</el-menu-item> -->
</el-menu-item>
<el-menu-item index="/manage/ugroups" v-show="curIdentity == 3">
<svg-icon icon-class="audience" style="font-size:16px"></svg-icon>
<span slot="title">受众管理</span>