合并后提交

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

@@ -1,5 +1,7 @@
# 开发环境配置
NODE_ENV = 'development'
ENV = 'development'
BASE_URL = '/pc/'
# 管理系统/开发环境
VUE_APP_BASE_API = '/systemapi'
@@ -16,6 +18,9 @@ VUE_APP_BOE_MOBILE_URL = 'http://192.168.0.10:8082/mobile'
# File路径的基础url
VUE_APP_FILE_BASE_URL = 'http://192.168.0.10:9090/cdn/upload'
# File路径的基础url的相对路径加此项是为了不影响之前的路径配置
VUE_APP_FILE_RELATIVE_PATH = '/upload'
# 登录地址
VUE_APP_LOGIN_URL='/pc/login'

28
.env.preview Normal file
View File

@@ -0,0 +1,28 @@
# 生产环境配置
ENV = 'preview'
NODE_ENV= 'preview'
BASE_URL= '/pc/'
# 管理系统/生产环境
VUE_APP_BASE_API = '/systemapi-release'
# BOE管理系统/开发环境
VUE_APP_BOE_BASE_API = '/uboeApi-release'
# BOE系统网址已经不再使用
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/preview'
# BOE 移动端url
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
# File路径的基础url
VUE_APP_FILE_BASE_URL='http://u.boe.com/upload'
# File路径的基础url的相对路径加此项是为了不影响之前的路径配置
VUE_APP_FILE_RELATIVE_PATH = '/upload'
# 虚拟目录的变量,结尾的/在vue.config.js中添加
VUE_APP_PUBLIC_PATH='/pc-release'
# 登录地址
VUE_APP_LOGIN_URL='https://u.boe.com/web-release/'

View File

@@ -1,5 +1,7 @@
# 生产环境配置
ENV = 'production'
NODE_ENV = 'production'
BASE_URL = '/pc/'
# 管理系统/生产环境
VUE_APP_BASE_API = '/systemapi'
@@ -8,7 +10,7 @@ VUE_APP_BASE_API = '/systemapi'
VUE_APP_BOE_BASE_API = '/uboeApi'
# BOE系统网址
VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/production'
# BOE 移动端url
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
@@ -16,6 +18,9 @@ VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
# File路径的基础url
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
# File路径的基础url的相对路径加此项是为了不影响之前的路径配置
VUE_APP_FILE_RELATIVE_PATH = '/upload'
# 虚拟目录的变量,结尾的/在vue.config.js中添加
VUE_APP_PUBLIC_PATH='/pc'

28
.env.testing Normal file
View File

@@ -0,0 +1,28 @@
# 生产环境配置
ENV = 'testing'
NODE_ENV = 'testing'
BASE_URL = '/pc/'
# 管理系统/生产环境
VUE_APP_BASE_API = '/systemapi'
# BOE管理系统/开发环境
VUE_APP_BOE_BASE_API = '/uboeApi'
# BOE系统网址
VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com/testing'
# BOE 移动端url
VUE_APP_BOE_MOBILE_URL = 'http://u-pre.boe.com'
# File路径的基础url
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
# File路径的基础url的相对路径加此项是为了不影响之前的路径配置
VUE_APP_FILE_RELATIVE_PATH = '/upload'
# 虚拟目录的变量,结尾的/在vue.config.js中添加
VUE_APP_PUBLIC_PATH='/pc'
# 登录地址
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'

3
.gitignore vendored
View File

@@ -1,2 +1 @@
node_modules
node_modules
/node_modules

View File

@@ -6,8 +6,12 @@
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"serve:testing": "vue-cli-service serve --mode testing",
"serve:preview": "vue-cli-service serve --mode preview",
"build": "vue-cli-service build",
"build:development": "vue-cli-service build --mode development",
"build:preview": "vue-cli-service build --mode preview",
"build:testing": "vue-cli-service build --mode testing",
"lint": "vue-cli-service lint"
},
"dependencies": {

View File

@@ -26,6 +26,13 @@ import ajax from '@/api/boe/boeApiAjax.js'
const editTeacher = function(data) {
return ajax.postJson('/b1/system/teacher/add-and-edit-teacher',data);
}
// api
/**
* 发薪地接口
*/
const getPayrollPlace = function(id) {
return ajax.get('/b1/system/teacher/payroll-place');
}
/**
* 教师体系和级别接口
* @param {
@@ -141,5 +148,6 @@ export default {
getCourseInfo,
teacherUpgradePrecess,
deleteModelTeacher,
editModelTeacher
editModelTeacher,
getPayrollPlace
}

View File

@@ -274,12 +274,41 @@ const countWaitAudit = function() {
}
/**
* 当前用户需要审核的课程列表
* @param {Object} query 同pageList
*/
const auditList = function(query) {
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
}
/**
* 指定审核人,转审核人
* 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口
* @param {Object} data
* {courseId:课程id,teacherId:指定的审核人教师的id,teacherName:教师名称,remark:备注}
*/
const auditAppoint = function(data) {
return ajax.post('/xboe/m/course/audit/appoint', data);
}
/**
* 获取审核信息,上面教师点击审核课程时,用于查询,上面“转审”时,用户填写的备注信息
* @param {courseId:'课程id',teacherId:'可以不填写,系统会查询当前人'} data
*/
const getAuditInfo = function(data) {
return ajax.post('/xboe/m/course/audit/infos', data);
}
/**
* 获取审核日志,此功能是为了管理员查看课程的审核日志。
* 为后续查看增加的接口
* @param {courseId:'课程ID',teacherId:'可以不填写,系统会查询当前人'} data
*/
const getAuditLogs = function(data) {
return ajax.post('/xboe/m/course/audit/logs', data);
}
/**
* 管理员的课程审核处理
* @param {Object} query {id:课程id,title:课程的名称, Boolean pass 是否通过,remark 备注}
@@ -401,6 +430,9 @@ export default {
getHomework,
countWaitAudit,
auditList,
auditAppoint,
getAuditInfo,
getAuditLogs,
audit,
auditAndPublish,
getAssess,

View File

@@ -95,6 +95,13 @@ const findAll=function(query){
const queryAll=function(query){
return ajax.post('/xboe/m/favorite/queryAll',query);
}
/**
* 查看是否已收藏 批量
* @param {问答或者文章或者课程的id数组} data
* */
const isNoFavorite=function(date){
return ajax.postJson('/xboe/m/favorite/isNoFavorite',data);
}
export default{
has,
@@ -107,5 +114,6 @@ export default{
articlePageList,
coursePageList,
findAll,
queryAll
queryAll,
isNoFavorite
}

View File

@@ -33,7 +33,7 @@ const remove=function(objId,objType){
// toAname 分享给人的名称
//
const querylist=function(query){
return ajax.post('/xboe/m/share/list',data);
return ajax.post('/xboe/m/share/list',query);
}
// 当前用户是否已分享
// // objType点赞对象类型 1课程 2文章,3案例, 4问答
@@ -121,6 +121,49 @@ const updateIsRead=function(id){
const deleteshares=function(id){
return ajax.get(`/xboe/m/share/delete-shares?id=${id}`);
}
/**
* 我分享的全部
* @param pageIndex 第几页
* @param pageSize 每页多少行
* @param keyword 关键字搜索
* @param isRead 是否已读
* */
const findMeShare=function (query){
return ajax.post('/xboe/m/share/findMeShare',query);
}
/**
* 分享给我的全部
* @param pageIndex 第几页
* @param pageSize 每页多少行
* @param keyword 关键字搜索
* @param isRead 是否已读
* */
const findShareMe=function (query){
return ajax.post('/xboe/m/share/findShareMe',query);
}
/**
* 我分享的案例
* @param pageIndex 第几页
* @param pageSize 每页多少行
* @param isRead 是否已读
* @param keyword 关键字搜索
* */
const myCaseList=function (query){
return ajax.post('/xboe/m/share/myCaseList',query);
}
/**
* 分享给我的案例
* @param pageIndex 第几页
* @param pageSize 每页多少行
* @param isRead 是否已读
* @param keyword 关键字搜索
* */
const myMeCaseList=function (query){
return ajax.post('/xboe/m/share/myMeCaseList',query);
}
/**
* */
export default{
save,
has,
@@ -134,5 +177,9 @@ const deleteshares=function(id){
mymecourselist,
mymearticlelist,
updateIsRead,
deleteshares
deleteshares,
findMeShare,
findShareMe,
myCaseList,
myMeCaseList
}

View File

@@ -23,6 +23,10 @@ const getInfoById = function(id) {
* pageIndex 起始页
* pageSize 每页条数
* name 姓名
* tlevelId级别
* salaryId发薪地
* tsystemId
* } query
* @returns
*/
@@ -104,7 +108,7 @@ const save = function(data) {
* @param {teacherId->sysId : 原系统的id,接口返回} sysId
*/
const updateSysId = function(id,sysId) {
return ajax.postJson('/xboe/teacher/update-sysid',{id,sysId});
return ajax.post('/xboe/teacher/update-sysid',{id,sysId});
}
@@ -183,6 +187,17 @@ const exports=function(query){
const findAllCourses=function(query){
return ajax.post('/xboe/teacher/compose/find/courses',query);
}
/**
* 内部讲师-删除模块讲师接口
* @param {
courseId // 课程id
modId // 模块id
teacherId // 教师id
remark // 备注
*/
const syncUpdate = function(data) {
return ajax.postJson('/xboe/teacher/update-sync',data);
}
export default {
findByName,
@@ -197,5 +212,6 @@ export default {
has,
start,
end,
exports
exports,
syncUpdate
}

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

@@ -8,7 +8,7 @@
<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){

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> -->
@@ -113,7 +113,7 @@ 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();

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

@@ -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>

1
src/icons/svg/browse.svg Normal file
View File

@@ -0,0 +1 @@
<svg t="1654588163796" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2388" width="200" height="200"><path d="M512.00085 738.377c-121.05 0-219.428-98.377-219.428-219.428S390.95085 299.52 512.00185 299.52s219.428 98.377 219.428 219.429-98.377 219.428-219.428 219.428M0.00085 517.413c0 24.502 8.923 48.53 25.636 66.486 325.779 350.647 693.614 350.501 977.225-1.316 13.934-17.189 21.139-39.132 21.139-61.294v-3.072c0-23.15-7.936-45.934-23.004-63.561C690.03085 90.88 321.72085 93.513 22.05385 455.022A98.011 98.011 0 0 0 0.00185 517.376" p-id="2389" fill="#A3B1CC"></path><path d="M658.28685 518.949c0 80.932-65.353 146.285-146.285 146.285S365.71585 599.881 365.71585 518.95s65.353-146.286 146.286-146.286 146.285 65.353 146.285 146.286" p-id="2390" fill="#A3B1CC"></path></svg>

After

Width:  |  Height:  |  Size: 819 B

1
src/icons/svg/eyes.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" fill="white" fill-opacity="0.01"/><path d="M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z" fill="#a4b0cc" stroke="#a4b0cc" stroke-width="4" stroke-linejoin="round"/><path d="M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z" fill="#FFF" stroke="#FFF" stroke-width="4" stroke-linejoin="round"/></svg>

After

Width:  |  Height:  |  Size: 581 B

View File

@@ -9,7 +9,7 @@
<div class="xtop-nav">
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
<!-- <div><a :href="`${webBaseUrl}/case`" target="_blank">案例</a></div> -->
<div v-if="caseShow"><a :href="`${webBaseUrl}/case`">案例</a></div>
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
<div>
@@ -134,7 +134,7 @@ export default {
};
},
computed: {
...mapGetters(['userInfo', 'userMsg']),
...mapGetters(['userInfo', 'userMsg','caseShow']),
showName: function() {
//console.log('name='+this.name);
//console.log('loginName='+this.loginName);

View File

@@ -28,6 +28,7 @@ Vue.config.productionTip = false
Vue.prototype.$Constants = constants;
Vue.prototype.msgSuccess = function(msg) {
this.$message({ showClose: true, message: msg, type: "success", offset: 50 });
}

View File

@@ -6,6 +6,7 @@ import 'nprogress/nprogress.css'
import { getToken } from '@/utils/token'
import { routers } from "@/data/pages"
import watermark from './utils/warterMark.js'
import constants from '@/utils/constants'
NProgress.configure({ showSpinner: false })
@@ -13,14 +14,24 @@ const whiteList = ['/login','/logout','/loading','/pc/loading','/500','/auth-red
router.beforeEach((to, from, next) => {
watermark.set("");
//动态计算文件的路径
let configPath=process.env.VUE_APP_FILE_RELATIVE_PATH;
if(configPath.startsWith('http')){
constants.fileBaseUrl=configPath;
}else{
constants.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath;
}
NProgress.start();
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next()
}else{
if(getToken()){
if(to.path === '/login'){
next({ path: '/pc/index' })
next({ path: process.env.VUE_APP_PUBLIC_PATH+'/index' })
NProgress.done();
} else {
//后续这里需要增加一定的控制

View File

@@ -7,6 +7,7 @@ const getters = {
cachedViews: state => state.tagsView.cachedViews,
avatar: state => state.user.info.avatar,
userInfo: state => state.user.info,
caseShow: state => state.user.caseShow,
newslist: state => state.user.newslist,
orgId: state => state.user.orgId,
permissions: state => state.user.permissions,
@@ -21,5 +22,7 @@ const getters = {
userMsg:state => state.user.msg,
messagesBeReviewed:state => state.user.messagesBeReviewed,
studyTaskCount:state => state.user.studyTaskCount,
praisesUnicom:state =>state.pdf.praisesUnicom,
favoritesUnicom:state =>state.pdf.favoritesUnicom,
}
export default getters

View File

@@ -9,6 +9,7 @@ import portal from './modules/portal'
import getters from './getters'
import sysType from './modules/sysType'
import resOwner from './modules/resOwner'
import pdf from './modules/pdf'
Vue.use(Vuex)
@@ -21,7 +22,8 @@ const store = new Vuex.Store({
settings,
portal,
sysType,
resOwner
resOwner,
pdf
},
getters
})

30
src/store/modules/pdf.js Normal file
View File

@@ -0,0 +1,30 @@
const state = {
praisesUnicom: false,
favoritesUnicom: false,
}
const mutations = {
SET_praisesUnicom: (state, iden) => {
state.praisesUnicom = iden
},
SET_favoritesUnicom: (state, iden) => {
state.favoritesUnicom = iden
},
}
const actions = {
unicomPraises({ commit }, data) {
commit('SET_praisesUnicom', data)
},
unicomFavorites({ commit }, data) {
commit('SET_favoritesUnicom', data)
}
}
export default {
state,
mutations,
actions
}

View File

@@ -5,6 +5,7 @@ import apiMessage from '@/api/system/message.js'
import apiCourse from "@/api/modules/course.js";
import apiBoeCourse from "@/api/boe/course.js";
import apiBoeLogout from "@/api/boe/login.js";
import caseUser from "@/utils/caseShow.js"
const user = {
state: {
@@ -14,7 +15,8 @@ const user = {
messagesBeReviewed: 0,//待审核的消息
studyTaskCount:0,//学习任务数
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
permissions: []
permissions: [],
caseShow:false,
},
mutations: {
SET_Identity: (state, iden) => {
@@ -28,7 +30,6 @@ const user = {
},
SET_StudyTaskCount: (state, m) => {
state.studyTaskCount = m
//console.log(state)
},
SET_CurIdentity: (state, iden) => {
state.curIdentity = iden
@@ -39,7 +40,10 @@ const user = {
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
}
},
SET_caseShow:(state, iden) => {
state.caseShow = iden
},
},
actions: {
refrashMsg({ commit }) {
@@ -112,7 +116,6 @@ const user = {
InitData({ commit, state }) {
let token = getToken();
return new Promise((resolve, reject) => {
//console.log(token);
app.initData().then(res =>{
let studyTotalH = 0;// 小时显示
let t1=parseFloat(res.result.studyTotal);
@@ -130,6 +133,13 @@ const user = {
dfn = res.result.departFullName;
}
}
if (res.result.userNo != '') {
for(let key in caseUser){
if(res.result.userNo == key) {
commit('SET_caseShow',true);
}
}
}
const user = {
aid: res.result.aid,
sysId:res.result.sysId,

16
src/utils/caseShow.js Normal file
View File

@@ -0,0 +1,16 @@
/**页面设置的一些常量*/
const caseUser={
'00004409': '李玉冰',
'101215': '徐涛',
'00005011': '邱炜玮',
'107863': '苗怡',
'00004928': '夏辉',
'110858': '毛继禹',
'10726944': '王芮',
'boeutest': '测试小助手',
'boeuadmin': '运营小助手',
'10181457': '董瑞华',
}
export default caseUser;

View File

@@ -1,10 +1,6 @@
/**页面设置的一些常量*/
const constants={
Cookies:{
name:'login_name',
password:'login_password',
rememberMe:'login_rememberMe',
}
fileBaseUrl:'http://127.0.0.1/pc/cdn/upload'
}
export default constants

View File

@@ -70,11 +70,16 @@ export function formatDate(date){
// 秒转时分秒
export function formatSeconds(value) {
let result = parseInt(value)
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
let d= Math.floor(result / (3600*24));
let last=Math.floor(result % (3600*24));
let h = Math.floor(last / 3600) < 10 ? '0' + Math.floor(last / 3600) : Math.floor(last / 3600);
let m = Math.floor((last / 60 % 60)) < 10 ? '0' + Math.floor((last / 60 % 60)) : Math.floor((last / 60 % 60));
let s = Math.floor((last % 60)) < 10 ? '0' + Math.floor((last % 60)) : Math.floor((last % 60));
let res = '';
if(d>0){
res += `${d}`;
}
if(h !== '00'){
res += `${h}小时`;
}

View File

@@ -5,6 +5,25 @@ export const deepCopy = (obj) => {
return JSON.parse(JSON.stringify(obj));
};
/**截取名称部分,以/划分 */
export const cutFullName = (fullName,num) => {
let newName=fullName;
if(newName){
let names=newName.split('/');
if(names.length>1){
newName=names[1];
if(num==2){
if(names.length>2){
newName+="/"+names[2];
}
}
}
}
return newName;
};
/**
* 获取url协议
* @param {Object} type

View File

@@ -105,6 +105,43 @@
</el-card>
</div>
</div>
</div>
<!-- 推荐案例2版 -->
<div class="modules" v-if="caseShow">
<div class="modules-title">
<span class="modules-text">推荐案例</span>
<span class="quyer-tag">
<a :class="caseList.orderType==2?'current':''" @click="changeCaseOrder(2)">最热</a>
<a :class="caseList.orderType==1?'current':''" @click="changeCaseOrder(1)">最新</a>
</span>
<span class="more"><router-link to="/case">更多&nbsp;></router-link></span>
</div>
<div class="modules-list xrow" style="height: 235px;overflow: hidden;">
<div class="index-course xrow-course" v-for="ca in caseList.list" :key="ca.id">
<div class="casetwo" :body-style="{ padding: '0px' }">
<!-- <div class="case-top"></div> -->
<div class="case-conent">
<!-- <div class="case-time">
{{ca.sysCreateTime.substring(0,10)}}
</div> -->
<a :href="'case/detail?id='+ca.id" >
<span class="case-title one-line-ellipsis">
{{ca.title}}
</span>
<div class="case-text three-line-ellipsis">
{{ca.summary}}
</div>
</a>
<div class="case-inter">
<interactBar :type="3" :readonly="true" :data="ca" :shares="false" :views="false"></interactBar>
</div>
<div style="height:40px;margin-top:10px">
<authorInfo :avatar="ca.authorInfo.avatar" :info="ca.authorInfo.orgInfo" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex"></authorInfo></div>
</div>
</div>
</div>
</div>
</div>
<!-- 推荐案例 -->
<!-- <div class="modules">
@@ -153,6 +190,7 @@
</el-col>
</el-row>
</div> -->
<!-- 推荐文章 -->
<div class="modules">
<!--内容块-->
@@ -293,12 +331,12 @@ import ad from '@/components/Portal/adFloat.vue';
import interactRowBar from '@/components/Portal/interactRowBar.vue';
import courseImage from '@/components/Course/courseImage.vue';
import articleImage from '@/components/Article/articleImage.vue';
import { toScore } from '@/utils/tools.js';
import { toScore,cutFullName} from '@/utils/tools.js';
export default {
name: 'index',
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
computed: {
...mapGetters(['userInfo'])
...mapGetters(['userInfo','caseShow'])
},
data() {
return {
@@ -313,7 +351,7 @@ export default {
list: []
},
caseList: {
num: 4,
num: 6,
orderType: 2,
list: []
},
@@ -331,6 +369,7 @@ export default {
};
},
mounted() {
//console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
this.getCourseData(1);
this.getCaseData();
this.getArticleData();
@@ -429,19 +468,46 @@ export default {
let userIds = [];
res.result.forEach(item => {
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null };
if (item.authorId && item.authorId != '') {
userIds.push(item.authorId);
}
});
this.caseList.list = res.result;
this.loadAuthorInfo(res.result, userIds);
this.loadCaseAuthorInfo(res.result, userIds);
}
this.caseList.list = res.result;
// this.caseList.list = res.result;
} else {
console.log('加载案例错误:' + res.error);
}
});
},
loadCaseAuthorInfo(list, ids) {
//加载作者信息,头像,机构信息
if (ids.length == 0) {
return;
}
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(ids).then(res => {
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.authorId) {
author.orgInfo=cutFullName(author.orgInfo,1);
item.authorInfo = author;
return true;
} else {
return false;
}
});
});
} else {
console.log('加载用户信息失败:' + res.error);
//this.$message.error(res.message);
}
});
},
getArticleData() {
let $this = this;
this.articleList.list = [];
@@ -582,6 +648,69 @@ export default {
</script>
<style scoped lang="scss">
.three-line-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
-webkit-line-clamp: 3;
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.casetwo{
border: 1px solid #F0F0F0;
width: 100%;
height: 220px;
margin-bottom:15px;
position: relative;
background-color: #fff;
.case-top{
height: 70px;
background-image: linear-gradient(to right , #b8c7e2, #d0dcf3);
}
.case-conent{
width: 100%;
height: 100%;
// box-shadow: 1px 1px 15px #ccc;
// position: absolute;
// top: 5%;
background-color: #fff;
// left: 4%;
padding: 16px;
.case-time{
font-size: 12px;
color: #999999;
text-align: right;
}
.case-title{
margin-top: 10px;
font-size: 16px;
color: #333;
font-weight: bold;
margin-bottom:10px;
}
.case-text{
height: 55px;
font-size: 14px;
color: #888888;
line-height: 18px;
margin-bottom:12px;
}
::v-deep .case-inter{
width: 100%;
padding-bottom: 10px;
border-bottom: 1px solid #f3f3f3;
.interact-bar-btns{
justify-content: space-between !important;
.interact-bar-btn{
margin: 0 0 0 0;
}
}
}
}
}
// .qa-dai{
// color: #5da1ff;
// }

View File

@@ -48,7 +48,7 @@
}
//this.$router.push({ path: "/index" })
}else{
this.$message.error("转化token失败");
this.$message.error("登录失败:"+rs.message);
}
})
}

View File

@@ -67,6 +67,7 @@
}
},
mounted() {
//console.log(process.env,'process.env');
this.refreshCode();
if(this.portalLoginRememberMe && this.portalLoginRememberMe.rememberMe){
this.rememberMe = true;

View File

@@ -11,7 +11,7 @@
<!-- <el-option label="全部" :value="0"></el-option> -->
<el-option label="文章" :value="2"></el-option>
<!-- <el-option label="课程" :value="1"></el-option> -->
<!-- <el-option label="问答" :value="4"></el-option> -->
<el-option label="案例" :value="3"></el-option>
<el-option label="问答" :value="4"></el-option>
</el-select>
<!-- <el-input style="width: 200px;margin-right: 10px" placeholder="请选择来源"></el-input> -->
@@ -155,6 +155,8 @@ export default {
}else if(this.dataList.type == 4){
this.$router.push({ path: '/qa/answer', query: { id: item.objId } });
} else if(this.dataList.type == 3){
this.$router.push({ path: '/case/detail', query: { id: item.objId } });
}
},
@@ -268,12 +270,11 @@ export default {
toAname:this.replayContent.sysCreateBy,
parentRead:true
}
if(this.dataList.type == 2) {
apiComment.reply(replayInfo).then(res=>{
if(this.dataList.type == 2 || this.dataList.type == 3) {
apiComment.reply(replayInfo).then(res=>{
if(res.status==200){
this.$message.success("回复成功");
this.shareShow = false;
//this.getData();
if(!this.replyItem.replys){
this.replyItem.replys=[];
}

View File

@@ -14,10 +14,10 @@
<el-option label="未置顶" :value="false"></el-option>
</el-select>
</div>
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" clearable></el-input></div>
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" @input="inputOn($event)" clearable></el-input></div>
<div style="padding: 0px 5px;">
<el-button @click="getData" icon="el-icon-search" type="primary" >搜索</el-button>
<el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button>
<el-button @click="getData(1)" icon="el-icon-search" type="primary" >搜索</el-button>
<!-- <el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button> -->
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
</div>
</div>
@@ -28,16 +28,16 @@
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column label="摘要" show-overflow-tooltip prop="content">
</el-table-column>
<el-table-column label="作者" width="80px" prop="sysCreateBy"></el-table-column>
<!-- <el-table-column label="摘要" show-overflow-tooltip prop="content">
</el-table-column> -->
<el-table-column label="作者" width="80px" prop="authorName"></el-table-column>
<el-table-column label="导入时间" prop="sysCreateTime"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button-group>
<el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button>
<el-button style="margin:0 5px" v-if="scope.row.isTop==0" type="text" @click="setTop(scope.row)" :icon="scope.row.isTop==1 ? 'el-icon-bottom' : 'el-icon-top'">置顶</el-button>
<el-button style="margin:0 5px" v-else type="text" @click="setTop(scope.row)" :icon="scope.row.isTop==1 ? 'el-icon-bottom' : 'el-icon-top'">取消置顶</el-button>
<!-- <el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button> -->
<el-button style="margin:0 5px" v-if="!scope.row.isTop" type="text" @click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>
<el-button style="margin:0 5px" v-if="scope.row.isTop" type="text" @click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
<el-button type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
</el-button-group>
</template>
@@ -45,10 +45,10 @@
</el-table>
<div style="text-align: center;margin-top: 50px;">
<el-pagination
background
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryObj.pagelIndex"
:current-page="queryObj.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="queryObj.pageSize"
layout="total, sizes, prev, pager, next, jumper"
@@ -117,8 +117,9 @@ export default {
data() {
return {
queryObj: {
pagelIndex:1,
pageIndex:1,
pageSize:10,
isTop:''
}, //查询对象
caseList: [], //案例列表
count:0,
@@ -157,13 +158,20 @@ export default {
this.getData();
},
methods: {
inputOn() {
this.$forceUpdate();
},
reset() {
this.queryObj.isTop = ''
this.queryObj.keyWord = ''
this.queryObj.isTop = '';
this.queryObj.keyWord = '';
this.queryObj.pageIndex = 1;
this.getData()
},
//获取案例列表数据
getData() {
getData(num) {
if(num === 1) {
this.queryObj.pageIndex = 1;
}
apiCase
.isTopList(this.queryObj)
.then(res => {
@@ -186,10 +194,10 @@ export default {
},
handleSizeChange(val) {
this.queryObj.pageSize=val;
this.getData();
this.getData(1);
},
handleCurrentChange(val) {
this.queryObj.pagelIndex=val;
this.queryObj.pageIndex=val;
this.getData();
},
//暂时因为没数据,先做添加
@@ -225,7 +233,7 @@ export default {
})
},
delItem(item) {
this.$confirm('您确定要删除所选文章吗?', '删除提示', {
this.$confirm('您确定要删除所选内容吗?', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

View File

@@ -194,7 +194,7 @@
</template>
</el-dialog>
<!--课程管理-->
<el-dialog custom-class="g-dialog" title="课程学习管理" width="80%" :visible.sync="manageStudy.dlgShow">
<el-dialog custom-class="g-dialog" title="课程学习管理" width="900px" :visible.sync="manageStudy.dlgShow" :close-on-click-modal="false">
<manager :manageStudyData="manageStudyData"></manager>
<template #footer>
<el-button @click="manageStudy.dlgShow = false">关闭</el-button>

View File

@@ -73,6 +73,11 @@
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="邀请人" prop="auditInfo" width="150px">
<template slot-scope="scope">
{{remarksInterception(scope.row.auditInfo)}}
</template>
</el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template slot-scope="scope">
<el-button @click="toExamine(scope.row)" type="text" >审核</el-button>
@@ -168,6 +173,15 @@
</div>
</div>
</div>
<div style="border-top: 1px solid #eee; background-color: #eee; padding: 10px 20px;margin-top: 10px;">
<div style="line-height: 36px;">
<div style="display:flex;">
<div style="flex:1;"><span class="audit-text">邀请人</span>{{audit.sysCreateBy}}</div>
<div style="flex:1;"><span class="audit-text">邀请时间</span>{{audit.sysCreateTime}}</div>
</div>
<p><span class="audit-text">邀请说明</span>{{audit.auditRemark}}</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false;examin={}"> </el-button>
<el-button type="primary" @click="examineData(true)">提交</el-button>
@@ -211,6 +225,7 @@ export default {
sysTypeListMap:[],
resOwnerListMap:[],
showDetails:false,
audit:{},
examin:{
detailType: '',
examineId: '',
@@ -289,6 +304,15 @@ export default {
this.loadSysTypes();
},
methods: {
remarksInterception(info){
let name = '';
if(info == '' || info == null || info == undefined) {
name = '--';
} else {
name = info.split('请')[0];
}
return name;
},
getseatch(){
this.params.pageIndex= 1;
this.searchData();
@@ -412,11 +436,19 @@ export default {
window.open(this.webBaseUrl+routeData.href, '_blank');
},
toExamine(row) {
this.audit = {};
this.examin.detailType = row.type;
this.examin.examineId = row.id;
this.examin.examineName = row.name;
this.auditInfo.remark = '';
this.dialogVisible = true;
apiCourse.getAuditInfo({courseId:row.id}).then(res=>{
if(res.status == 200) {
this.audit = res.result[0];
} else {
this.$message.error(res.message);
}
})
},
enSure() {
// 确认事件
@@ -561,6 +593,11 @@ export default {
</script>
<style lang="scss" scoped>
.audit-text{
font-size: 14px;
color: #606266;
font-weight: 700;
}
.course-types {
display: flex;
justify-content: center;

View File

@@ -8,12 +8,12 @@
<!-- <el-cascader :options="resOwnerListMap" v-model="ownership" placeholder="资源归属" clearable :props="resourceProps"></el-cascader> -->
<div style="display: flex;justify-content:flex-start;">
<div style="padding-right: 5px;">
<!-- <div style="padding-right: 5px;">
<el-select placeholder="试卷类型" v-model="params.paperType" style="width: 110px;" clearable>
<el-option label="考试卷" :value="1"></el-option>
<el-option label="测试卷" :value="2"></el-option>
</el-select>
</div>
</div> -->
<div style="padding: 0px 5px;"><el-input placeholder="关键词" v-model="params.keyWord" clearable></el-input></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" @click="getsearch" type="primary" >搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div>
@@ -39,7 +39,7 @@
{{resOwnerName(scope.row.resOwner1)}}/{{resOwnerName(scope.row.resOwner2)}}{{scope.row.resOwner3? '/' : ''}}{{resOwnerName(scope.row.resOwner3)}}
</template>
</el-table-column> -->
<el-table-column label="最后更新" prop="sysCreateTime" width="150px"></el-table-column>
<el-table-column label="最后更新" prop="sysCreateTime" width="160px"></el-table-column>
<!-- <el-table-column label="试卷类型" prop="content">
<template slot-scope="scope">
{{scope.row.paperType == 1? '考试卷':'测试卷'}}

View File

@@ -75,10 +75,11 @@
</el-table-column>
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<el-table-column label="操作" width="180px" fixed="right">
<template slot-scope="scope">
<el-button @click="toExamine(scope.row)" type="text" >审核</el-button>
<el-button @click="toPreview(scope.row)" type="text" >预览</el-button>
<el-button @click="toExamine(scope.row)" type="text">审核</el-button>
<el-button @click="toReferral(scope.row)" type="text">邀请审核</el-button>
<el-button @click="toPreview(scope.row)" type="text">预览</el-button>
</template>
</el-table-column>
</el-table>
@@ -176,15 +177,37 @@
</span>
</el-dialog>
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
<!-- <div v-show="expandDetails"> -->
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
<!-- </div> -->
<span slot="footer" class="dialog-footer">
<el-button @click="showDetails = false;examin = {};"> </el-button>
</span>
</el-dialog>
<el-dialog title="请选择教师" :visible.sync="teacherInfo.show" :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="姓名或工号">
<el-input v-model="teacherInfo.name" maxlength="10" placeholder="请输入教师姓名或工号" @keyup.enter.native="keyupEnter">
<el-button @click="findUser" slot="append" icon="el-icon-search">搜索</el-button>
</el-input>
</el-form-item>
</el-form>
<div style="padding: 0px 20px 0 100px;margin-bottom: 20px;">
<el-radio-group v-model="selectedTeacher" v-if="teacherInfo.list.length > 0">
<el-radio v-for="(u,uidx) in teacherInfo.list" :key="uidx" :label="u.aid">{{u.name+'('+u.code+')'}}</el-radio>
</el-radio-group>
<span v-else>请先搜索教师,再选择</span>
</div>
<div style="padding-left: 20px;display:flex;">
<div style="width:84px;font-size: 14px;color: #606266;font-weight: 700;text-align: right;margin-right: 12px;margin-top: 10px;">邀请说明</div>
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="referralData.remark" maxlength="200" show-word-limit></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="teacherInfo.show= false"> </el-button>
<el-button @click="submitReferral()" type="primary" >转审</el-button>
</span>
</el-dialog>
</div>
</template>
@@ -196,8 +219,8 @@ import auditCourse1 from '@/components/Course/auditCourse1.vue';
import auditCourse2 from '@/components/Course/auditCourse2.vue';
import adminPage from '@/components/Administration/adminPage.vue';
import {courseType} from '../../utils/tools.js';
import apiType from '../../api/modules/type.js';
import apiCourse from '../../api/modules/course.js';
import apiUser from '@/api/system/user.js'
import { mapGetters,mapActions} from 'vuex';
export default {
name: 'manageCourse',
@@ -207,6 +230,19 @@ export default {
},
data() {
return {
selectedTeacher:'',
teacherInfo:{
show:false,
list:[],
load:false,
name:'',
},
referralData:{
teacherId:'',
teacherName:'',
remark:'',
courseId:'',
},
sysTypeList: [],
sysTypeListMap:[],
resOwnerListMap:[],
@@ -289,6 +325,76 @@ export default {
this.loadSysTypes();
},
methods: {
submitReferral(){ // 转审
if(this.selectedTeacher == '') {
this.$message.warning('请选择教师!')
return
}
let teacherData = this.teacherInfo.list.find(item => item.aid == this.selectedTeacher);
this.referralData.teacherId = teacherData.aid;
this.referralData.teacherName=teacherData.name;
apiCourse.auditAppoint(this.referralData).then(res=>{
if(res.status == 200) {
this.$message.success('转审成功!');
this.searchData();
this.teacherInfo.show= false;
} else {
this.$message.error(res.message);
}
})
},
toReferral(row){
this.teacherInfo.list = [];
this.referralData={
teacherId:'',
teacherName:'',
remark:'',
};
this.selectedTeacher = '';
this.teacherInfo.name = '';
this.referralData.courseId = row.id;
this.teacherInfo.show = true;
},
keyupEnter(){ // 转审选择教师
this.findUser();
return false;
},
findUser(){
this.teacherInfo.load=false;
this.teacherInfo.list=[];
this.selectedTeacher=[];
var name=this.teacherInfo.name;
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
if(regPos.test(name)){
//console.log("数字");
apiUser.getByLoginName(name).then(rs=>{
if(rs.status==200){
//因为根据工号查询只会是一个人所有会有null情况而json会返回空字符串
if(rs.result!=''){
this.teacherInfo.list.push(rs.result);
}else{
this.$message.error("查无此用户")
}
this.teacherInfo.load=true;
}else{
this.$message.error(rs.message);
}
})
}else{
// console.log("非数字");
apiUser.findByName(name).then(rs=>{
if(rs.status==200){
if(rs.result.length==0){
return this.$message.error(rs.message);
}
this.teacherInfo.list=rs.result;
this.teacherInfo.load=true;
}else{
this.$message.error(rs.message);
}
})
}
},
getsearch(){
this.params.pageIndex= 1;
this.searchData();

View File

@@ -1,33 +1,40 @@
<template>
<div class="u-page">
<div style="padding-bottom: 10px;">
<div style="display: flex;justify-content:flex-start;">
<div style="padding: 0px 5px;">
<el-select v-model="tSystemData" value-key="id" clearable @change="changeSystem" placeholder="请选择教师体系">
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</div>
<!-- 要在换一个变量与新建区别开 -->
<div style="padding: 0px 5px;">
<el-select v-model="tLevelData" clearable value-key="id" placeholder="请选择教师级别">
<el-option v-for="item in levelData" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</div>
<div style="padding: 0px 5px;"><el-input placeholder="请输入姓名" v-model="queryName" clearable></el-input></div>
<div style="padding: 0px 5px;">
<el-select v-model="tLevelData" clearable value-key="id" placeholder="请选择发薪地">
<el-option v-for="item in levelData" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</div>
</div>
<div style="margin-top:10px;padding: 0px 5px;">
<el-button icon="el-icon-search" type="primary" @click="getsearch()">搜索</el-button>
<div>
<el-row :gutter="5">
<el-col :span="4">
<el-select style="width: 100%" v-model="query.tsystemId" value-key="id" clearable @change="queryChangeSystem" placeholder="教师体系">
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-select style="width: 100%" v-model="query.tlevelId" clearable value-key="id" placeholder="教师级别">
<el-option v-for="item in queryLevelData" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-input style="width: 100%" placeholder="姓名" v-model="query.name" clearable></el-input>
</el-col>
<!-- <el-col :span="4">
<el-select style="width: 100%" v-model="query.salaryId" clearable value-key="id" placeholder="发薪地">
<el-option v-for="item in placeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-col> -->
<el-col :span="8">
<el-button icon="el-icon-search" type="primary" @click="loadData(1)">搜索</el-button>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
<el-button icon="el-icon-circle-plus-outline" type="primary" @click="openDialog">新建教师</el-button>
<el-button icon="el-icon-folder-opened" type="primary" @click="exportsExcel">导出</el-button>
</div>
</el-col>
</el-row>
</div>
<div style="margin-top:10px;padding: 0px 5px;">
<el-button icon="el-icon-circle-plus-outline" type="primary" @click="openDialog">新建教师</el-button>
<el-button icon="el-icon-folder-opened" type="primary" @click="exportsExcel">导出</el-button>
</div>
</div>
<el-table ref="teacherTable" style="100%" :data="tableData" border stripe @selection-change="handleSelectionChange">
<el-table ref="teacherTable" style="100%" :data="tableData" @filter-change="filterChange" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection"></el-table-column>
<el-table-column label="姓名" prop="name" fixed>
<template slot-scope="scope">
@@ -39,19 +46,22 @@
<!-- <el-table-column label="创建时间" sortable prop="sysCreateTime"></el-table-column> -->
<el-table-column label="修改时间" sortable width="155" prop="sysUpdateTime"></el-table-column>
<el-table-column label="授课时长" prop="teaching"></el-table-column>
<el-table-column label="在职状态" width="90" :filters="[{ text: '在职', value: '0'}, { text: '离职', value: '1' }]"
<el-table-column label="教师体系" prop="tsystemName"></el-table-column>
<el-table-column label="教师级别" prop="tlevelName"></el-table-column>
<!-- <el-table-column label="发薪地" prop="salaryName"></el-table-column> -->
<el-table-column label="在职状态" column-key="waitStatus" width="90" :filters="[{ text: '在职', value: '0'}, { text: '离职', value: '1' }]"
:filter-method="filterWork">
<template slot-scope="scope">
{{scope.row.waitStatus=='0'?'在职': scope.row.waitStatus=='1' ? '离职' :''}}
</template>
</el-table-column>
<el-table-column label="认证状态" width="90" :filters="[{ text: '未认证', value: '0'}, { text: '已认证', value: '1' }]"
<el-table-column label="认证状态" column-key="certStatus" width="90" :filters="[{ text: '未认证', value: 0}, { text: '已认证', value: 1 }]"
:filter-method="filterCertification">
<template slot-scope="scope">
{{scope.row.certStatus==0 ?'未认证': scope.row.certStatus==1 ? '已认证' :''}}
</template>
</el-table-column>
<el-table-column label="账号状态" width="90"
<el-table-column label="账号状态" column-key="status" width="90"
:filters="[{ text: '停用', value: 2}, { text: '启用', value: 1 }]"
:filter-method="filterStatus">
<template slot-scope="scope">
@@ -69,24 +79,24 @@
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 70px;">
<div style="text-align: center;margin-top: 50px;">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageIndex"
:current-page="query.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:page-size="query.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="count">
</el-pagination>
</div>
<div style="height: 100px;"></div>
<div style="height: 50px;"></div>
<el-dialog :title="newOrEdit" custom-class="g-dialog" width="900px" :visible.sync="dialogVisible" :close-on-click-modal='false' >
<el-form label-width="100px" :model="form" ref="form" :rules="rules">
<el-form-item>
<div class="avator">
<imageUpload dir="avatar" :value="fileBaseUrl + form.account.avatar" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
<imageUpload dir="avatar" :value="coverImage" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
<div class="avatorText">
<p>上传头像</p>
<p>图片尺寸建议在宽100px,高100px</p>
@@ -136,14 +146,27 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="认证状态">
<el-radio-group v-model="form.certStatus">
<el-radio :label="0">未认证</el-radio>
<el-radio :label="1">已认证</el-radio>
</el-radio-group>
</el-form-item>
<el-row>
<el-col :span='11'>
<el-form-item label="认证状态">
<el-radio-group v-model="form.certStatus">
<el-radio :label="0">未认证</el-radio>
<el-radio :label="1">已认证</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span='11' :offset="2">
<el-form-item label="在职状态">
<el-radio-group v-model="form.waitStatus">
<el-radio :label="0">在职</el-radio>
<el-radio :label="1">离职</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注">
<el-input v-model="form.description" clearable type="textarea" :autosize='{ minRows: 3, maxRows: 6 }'></el-input>
<!--<WxEditor :toobar="false" v-model="form.description" :minHeight="50"></WxEditor>-->
</el-form-item>
<el-form-item label="擅长课程">
<el-input v-model="form.courses" clearable placeholder="请输入"></el-input>
@@ -154,14 +177,10 @@
<el-button :loading="saveLoading" type="primary" @click="saveHandle"> </el-button>
</span>
</el-dialog>
<el-dialog
title="教师详情"
:close-on-click-modal="false"
:visible.sync="showTeacherDetails"
width="800px">
<teacher-details v-if="teacherDetailsId != ''" :id="teacherDetailsId" :newId="teacherDetailId"></teacher-details>
<el-dialog title="教师详情" :close-on-click-modal="false" :visible.sync="showTeacherDetails" width="800px">
<teacher-details v-if="teacherDetailId != ''" :id="teacherDetailsId" :newId="teacherDetailId"></teacher-details>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseOne()"> </el-button>
<el-button @click="handleCloseOne()"> </el-button>
<!-- <el-button type="primary" @click="showTeacherDetails = false"> </el-button> -->
</span>
</el-dialog>
@@ -169,6 +188,7 @@
</template>
<script>
import WxEditor from '@/components/Editor/index.vue';
import teacherApi from "@/api/modules/teacher";
import teacherBoeApi from "@/api/boe/teacher";
import userApi from "@/api/system/user";
@@ -177,9 +197,21 @@
import { mapGetters } from 'vuex';
export default {
name: 'teacher',
components:{imageUpload,teacherDetails},
components:{imageUpload,teacherDetails,WxEditor},
data(){
return {
query:{
tsystemId:'',
tsystemIds:'',
tlevelId:'',
name:'',
salaryId:'',
waitStatus:0,
status:'',
certStatus:'',
pageIndex: 1,
pageSize: 10,
},
teacherDetailId:'',//新数据id
teacherDetailsId: '',// sid
showTeacherDetails:false,
@@ -218,7 +250,6 @@
]
},
selectList:[],
queryName:"",
dialogVisible:false,
tableData:[],
searchName:null,
@@ -239,23 +270,40 @@
systemLevelTree:[],
systemData:[],//体系数组{id,name}
levelData:[],//级别数组{id,name}
queryLevelData:[],
teacherSystemids:[],
coverImage:'',
placeList:[],
}
},
watch:{
showTeacherDetails(val) {
if(!val) {
this.teacherDetailsId = '';
this.teacherDetailId = '';
}
}
},
mounted() {
this.loadData(1);
this.getTeachersystem();
mounted() {
this.getTeachersystem();
this.getPayrollPlace();
},
computed: {
...mapGetters(['userInfo'])
},
methods:{
getPayrollPlace(){
teacherBoeApi.getPayrollPlace().then(res=>{
if(res.status == '200') {
for(let i in res.result){
this.placeList.push({
value:i,
label:res.result[i]
})
}
}
})
},
handleCloseOne() {
// this.teacherDetailsId = '';
this.showTeacherDetails = false;
@@ -267,23 +315,45 @@
// this.teacherDetailsId = '13BEBDBD-3D28-244D-648D-0CBD6796717C'
},
getTeachersystem() {
this.systemData=[];
teacherBoeApi.teacherSystem(this.userInfo.sysId).then(res=>{
if(res.status == 200) {
this.systemLevelTree=res.result;
this.systemData=[];
res.result.forEach(item => {
this.teacherSystemids.push(item.teacher_system_id);
this.systemData.push({
id:item.teacher_system_id,
name:item.system_name
})
});
this.loadData(1);
} else {
this.$message.error('教师体系数据获取失败!')
this.loadData(1);
}
})
},
queryChangeSystem(val) {
this.query.tlevelId = '';
let array=[];
this.systemLevelTree.forEach(sl=>{
if(sl.teacher_system_id==val){
sl.teacher_level.forEach(lev=>{
array.push({
id:lev.teacher_level_id,
name:lev.level_name
})
})
}
});
this.queryLevelData=array;
},
changeSystem(val){
//console.log(val,'val');
this.tLevelData = {};
this.form.tlevelId = '';
this.form.tlevelName='';
let array=[];
this.systemLevelTree.forEach(sl=>{
if(sl.teacher_system_id==val.id){
@@ -297,14 +367,17 @@
});
this.levelData=array;
},
getsearch(){
this.pageIndex = 1;
this.loadData(1);
},
reset (){
this.queryName = '';
this.query.name = '';
this.query.tsystemId='',
this.query.tlevelId='',
this.query.salaryId='',
this.query.pageIndex= 1,
this.query.pageSize= 10,
this.query.waitStatus='';
this.query.certStatus='';
this.query.status='';
this.$refs.teacherTable.clearFilter();
this.pageIndex = 1;
this.loadData(1);
},
openDialog(){
@@ -321,18 +394,40 @@
waitStatus:0,//在职
certStatus:0,//未认证
}
this.tSystemData = {};
this.tLevelData= {};
this.coverImage = '';
this.dialogVisible=true
},
filterChange(e){
if(e.waitStatus){
if(e.waitStatus.length==0 || e.waitStatus.length==2){
this.query.waitStatus='';
}
}
if(e.certStatus){
if(e.certStatus.length==0 || e.certStatus.length==2){
this.query.certStatus='';
}
}
if(e.status){
if(e.status.length==0 || e.status.length==2){
this.query.status='';
}
}
this.loadData(1);
},
filterWork(value,row){
this.query.waitStatus=value;
return row.waitStatus==value
},
filterCertification(value,row){
// console.log(row.certificationStatus,value)
this.query.certStatus=value;
return row.certStatus==value
},
filterStatus(value,row){
//console.log(row.status,value,"qwerqw");
return row.status==value
this.query.status=value;
return row.status==value
},
shareItem(item){
this.shareShow=true;
@@ -389,8 +484,9 @@
if (res.status == 200 && res.result != null) {
this.havaInfo = true;
this.form.account = res.result.account;
// this.fileBaseUrl +
this.form.account.avatar = this.fileBaseUrl + res.result.account.avatar;
if(res.result.account.avatar != '') {
this.coverImage = this.fileBaseUrl+res.result.account.avatar;
}
this.form.user = res.result;
} else {
this.havaInfo = false;
@@ -403,13 +499,15 @@
},
removeHandle(){
this.form.account.avatar = '';
this.coverImage = '';
this.form.photo = '';
},
handleUploadSuccess(res){
this.coverImage = this.fileBaseUrl + res.result.filePath;
this.form.account.avatar = res.result.filePath;
this.form.photo = res.result.filePath;
},
saveHandle(){
//console.log(this.tSystemData,'tSystemData');
//console.log(this.tLevelData,'tLevelData');
this.form.tsystemId = this.tSystemData.id;
this.form.tsystemName=this.tSystemData.name;
this.form.tlevelId = this.tLevelData.id;
@@ -424,10 +522,12 @@
this.saveBoe();
this.dialogVisible = false;
this.loadData(1);
this.saveLoading = false;
}else{
this.$message({ type: "error", message: res.message });
}
}).catch(err => {
this.saveLoading = false;
this.$message({ type: "error", message: err });
});
}else{
@@ -438,9 +538,11 @@
this.dialogVisible = false;
this.loadData(1);
}else{
this.saveLoading = false;
this.$message({ type: "error", message: res.message });
}
}).catch(err => {
this.saveLoading = false;
this.$message({ type: "error", message: err });
});
}
@@ -469,7 +571,7 @@
teacherBoeApi.editTeacher(data).then(res=>{
this.saveLoading=false;
if(res.status == 200) {
this.updateSysId(this.form.user.id,res.result.sysId);
this.updateSysId(this.form.user.id,res.result.teacher_id);
this.$message({ type: "success", message: "保存成功" });
}else{
this.$message({ type: "warning", message: "同步失败,本地已保存" });
@@ -477,7 +579,7 @@
})
},
updateSysId(id,sysId) {
teacherBoeApi.updateSysId(id,sysId).then(res=>{
teacherApi.updateSysId(id,sysId).then(res=>{
if(res.status == 200) {
this.$message.success('教师同步成功!')
} else {
@@ -486,6 +588,7 @@
})
},
updateHandle(data){
this.coverImage = '';
this.saveLoading=false;
this.newOrEdit='编辑教师';
this.allowInput=true;
@@ -493,19 +596,44 @@
if (res.status == 200) {
const result = res.result;
this.form = result;
this.dialogVisible = true;
this.tSystemData = {
id:result.tsystemId,
name:result.tlevelName
};
this.tLevelData = {
id:result.tlevelId,
name: result.tlevelName
};
if(res.result.photo != '') {
this.coverImage = this.fileBaseUrl+res.result.photo;
}
this.updateSystem(result.tsystemId)
this.dialogVisible = true;
}
})
},
updateSystem(val) {
let array=[];
this.systemLevelTree.forEach(sl=>{
if(sl.teacher_system_id==val){
sl.teacher_level.forEach(lev=>{
array.push({
id:lev.teacher_level_id,
name:lev.level_name
})
})
}
});
this.levelData=array;
},
loadData(pageIndex) {
this.pageIndex = pageIndex;
teacherApi
.page({
pageIndex: this.pageIndex,
pageSize: this.pageSize,
name: this.queryName ,
})
.then((res) => {
if(this.systemData.length==0){
this.$message({ type: "error", message: "您当前没有可管理的教师"});
return;
}
this.query.pageIndex = pageIndex;
this.query.tsystemIds = this.query.tsystemId || this.teacherSystemids.join();
teacherApi.page(this.query).then((res) => {
if (res.status == 200) {
const result = res.result;
this.tableData = result.list;
@@ -576,33 +704,44 @@
})
ids = ids.join();
}
//如果是勾选的那需要传id的值使用逗号分隔
//get请求
// var eleLink = document.createElement('a');
// eleLink.download = '教师列表';
// eleLink.style.display = 'none';
// eleLink.href = `${process.env.VUE_APP_BASE_API}/xboe/teacher/export?name=${this.queryName}`;
// document.body.appendChild(eleLink);
// eleLink.click();
// 然后移除
// document.body.removeChild(eleLink);
//post请求
var eleForm=document.createElement('form');
eleForm.style="display:none;";
eleForm.method='post';
eleForm.action=`${process.env.VUE_APP_BASE_API}/xboe/teacher/export?name=${this.queryName}`;
eleForm.action=`${process.env.VUE_APP_BASE_API}/xboe/teacher/export`;
//添加ids条件
var hdnFilePath = document.createElement('input');
hdnFilePath.type = 'hidden';
hdnFilePath.name = 'ids';
hdnFilePath.value = ids;
eleForm.appendChild(hdnFilePath);
//添加查询姓名
var hdnName = document.createElement('input');
hdnName.type = 'hidden';
hdnName.name = 'name';
hdnName.value = this.query.name;
eleForm.appendChild(hdnName);
//组织体系
var hdnSystemIds = document.createElement('input');
hdnSystemIds.type = 'hidden';
hdnSystemIds.name = 'tsystemIds';
hdnSystemIds.value = this.query.tsystemIds;
eleForm.appendChild(hdnSystemIds);
var hdnLevelId = document.createElement('input');
hdnLevelId.type = 'hidden';
hdnLevelId.name = 'tlevelId';
hdnLevelId.value = this.query.tlevelId;
eleForm.appendChild(hdnLevelId);
document.body.appendChild(eleForm);
eleForm.submit();
document.body.removeChild(eleForm);
},
exportCourse(row){
if(!row.sysId){
this.$message({message:'无原系统教师关联,只导出新系统的教师课程',type:'warning'});
}
var eleLink = document.createElement('a');
eleLink.download = '教师授课信息';
eleLink.style.display = 'none';
@@ -613,13 +752,13 @@
document.body.removeChild(eleLink);
},
handleSizeChange(val) {
this.pageSize = val
this.pageIndex = 1
this.loadData(this.pageIndex)
this.query.pageSize = val
this.query.pageIndex = 1
this.loadData(this.query.pageIndex)
},
handleCurrentChange(val) {
this.pageIndex = val
this.loadData(this.pageIndex)
this.query.pageIndex = val
this.loadData(this.query.pageIndex)
},
}
}

View File

@@ -3,16 +3,16 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="个人详情" name="first">
<div class="one">
<el-row :gutter="10">
<el-row :gutter="10" style="width:720px">
<el-col :span="24">
<el-form label-width="120px" size="mini">
<el-form-item label="头像:">
<div style="width: 90px;height: 90px" v-if="newForm && newForm.account && newForm.account.avatar == ''">
<div style="width: 90px;height: 90px" v-if="newForm && newForm.photo == ''">
<img style="width:100%;height:100%" v-if="newForm.gender == 1" :src="webBaseUrl + '/images/Avatarman.png'" alt="" srcset="">
<img style="width:100%;height:100%" v-else :src="webBaseUrl + '/images/Avatarwoman.png'" alt="" srcset="">
</div>
<div style="width: 90px;height: 90px" v-else>
<img style="width:100%;height:100%" :src="newForm && newForm.account && newForm.account.avatar" alt="" srcset="">
<img style="width:100%;height:100%" :src="fileBaseUrl + newForm.photo" alt="" srcset="">
</div>
</el-form-item>
<el-form-item label="讲师账号:">
@@ -22,21 +22,21 @@
</el-col>
</el-form-item>
<el-form-item label="讲师组织:" >
<el-col :span="12">{{form.company_name}}</el-col>
<el-col :span="12">{{form.company_name? form.company_name:'--'}}</el-col>
<el-col :span="12">
<el-form-item label="初始授课时长:">{{formatSeconds(form.default_teaching_time)}}</el-form-item></el-col>
<el-form-item label="初始授课时长:">{{form.default_teaching_time? formatSeconds(form.default_teaching_time):'--'}}</el-form-item></el-col>
</el-form-item>
<el-form-item label="讲师体系:">
<el-col :span="12">{{form.system_name}}</el-col>
<el-col :span="12">{{newForm.tsystemName? newForm.tsystemName:'--'}}</el-col>
<el-col :span="12">
<el-form-item label="讲师级别:">
{{form.level_name}}
{{newForm.tlevelName? newForm.tlevelName:'--'}}
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="总计授课时长:">
<el-col :span="12">{{formatSeconds(form.teaching_time)}}</el-col>
<el-col :span="12">{{form.teaching_time? formatSeconds(form.teaching_time):'--'}}</el-col>
<el-col :span="12">
<el-form-item label="认证状态:">
{{form.is_certify == 1? '已认证':'未认证'}}
@@ -44,10 +44,11 @@
</el-col>
</el-form-item>
<el-form-item label="认证时间:">
<el-col :span="12">{{formatsec(form.certify_at *1000)}}</el-col>
<el-col :span="12">{{form.certify_at? formatsec(form.certify_at *1000):'--'}}</el-col>
<el-col :span="12">
<el-form-item label="认证资料:">
<!-- <a href="http://" target="_blank" rel="noopener noreferrer"></a> -->
<i style="color:blue" v-if="form.certification" title="点击下载" @click="downloadActioon(form.certification)" class="el-icon-download"></i>
<span v-else>--</span>
</el-form-item>
</el-col>
</el-form-item>
@@ -57,12 +58,12 @@
<!-- <el-col :span="12">--</el-col> -->
<!-- <el-col :span="12"> -->
<el-form-item label="讲师介绍:">
<div v-html="form.description"></div>
<div v-html="newForm.description"></div>
</el-form-item>
<!-- </el-col>
</el-form-item> -->
<el-form-item label="讲师备注:">
{{form.remark}}
{{newForm.remark}}
</el-form-item>
</el-form>
</el-col>
@@ -81,51 +82,29 @@
</el-option>
</el-select></div>
</div>
<el-table height="430"
:data="records.list"
style="width: 100%;margin-top:10px">
<el-table-column
prop="courseCode" width="120"
label="班级编号">
<el-table height="430" :data="records.list" style="width: 100%;margin-top:10px">
<el-table-column prop="courseCode" width="120" label="班级编号">
</el-table-column>
<el-table-column
prop="courseType"
label="类型">
<el-table-column prop="courseType" label="类型">
<template slot-scope="scope">
<span v-if="scope.row.courseType == '1'">面授班</span>
<span v-if="scope.row.courseType == '2'">训练班</span>
<span v-if="scope.row.courseType == '0'">在线班</span>
</template>
</el-table-column>
<el-table-column
prop="courseName" show-overflow-tooltip
label="班级名称" width="180">
<el-table-column prop="courseName" show-overflow-tooltip label="班级名称" width="180">
</el-table-column>
<el-table-column
prop="modName" show-overflow-tooltip
label="模块名称"
width="100">
<el-table-column prop="modName" show-overflow-tooltip label="模块名称" width="100">
</el-table-column>
<el-table-column
prop="teachingTime"
label="授课时长(min)" width="120">
<el-table-column prop="teachingTime" label="授课时长(min)" width="120">
</el-table-column>
<el-table-column
prop="openStartTime"
label="开班时间" width="140">
<el-table-column prop="openStartTime" label="开班时间" width="140">
</el-table-column>
<el-table-column
prop="courseStatus"
label="班级状态"
width="100">
<el-table-column prop="courseStatus" label="班级状态" width="100">
</el-table-column>
<el-table-column
prop="teacherScore"
label="评分">
<el-table-column prop="teacherScore" label="评分">
</el-table-column>
<el-table-column
label="操作"
width="120">
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click="recordsUpdate(scope.row)">修改</el-button>
<el-button type="text" @click="recordsDel(scope.row)">删除</el-button>
@@ -146,30 +125,13 @@
</div> -->
</el-tab-pane>
<el-tab-pane label="授课资格" name="third">
<el-table height="430"
:data="qualify.list"
style="width: 100%">
<el-table-column
prop="courseCode"
label="课程编号"
width="180">
</el-table-column>
<el-table-column
prop="courseName" show-overflow-tooltip
label="课程名称"
width="250">
</el-table-column>
<el-table-column
prop="dictionaryName"
label="课程分类"
width="180">
</el-table-column>
<el-table-column
prop="courseType"
label="课程类型"
width="100">
<el-table height="430" :data="qualify.list" style="width: 100%">
<el-table-column prop="courseCode" label="课程编号" width="180"> </el-table-column>
<el-table-column prop="courseName" show-overflow-tooltip label="课程名称" width="250"> </el-table-column>
<el-table-column prop="dictionaryName" label="课程分类" width="180"> </el-table-column>
<el-table-column prop="courseType" label="课程类型" width="100">
<template slot-scope="scope">
<span v-if="scope.row.courseType == '0'">在线班</span>
<span v-if="scope.row.courseType == '0'">录播</span>
<span v-if="scope.row.courseType == '1'">面授</span>
<span v-if="scope.row.courseType == '2'">线下课</span>
</template>
@@ -189,55 +151,30 @@
</div> -->
</el-tab-pane>
<el-tab-pane label="未开班资源" name="fourth">
<el-table height="430"
:data="courseInfoList"
style="width: 100%">
<el-table-column
prop="courseCode"
label="班级编号"
width="120">
<el-table height="430" :data="courseInfoList" style="width: 100%">
<el-table-column prop="courseCode" label="班级编号" width="120">
</el-table-column>
<el-table-column
prop="courseName" show-overflow-tooltip
label="班级名称"
width="200">
<el-table-column prop="courseName" show-overflow-tooltip label="班级名称" width="200">
</el-table-column>
<el-table-column
prop="modName" width="150" show-overflow-tooltip
label="模块名称">
<el-table-column prop="modName" width="150" show-overflow-tooltip label="模块名称">
</el-table-column>
<el-table-column
prop="teachingTime"
label="授课时长"
width="100">
<el-table-column prop="teachingTime" label="授课时长" width="100">
</el-table-column>
<el-table-column
prop="openStartTime"
label="开班时间"
width="180">
<el-table-column prop="openStartTime" label="开班时间" width="180">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="晋级过程" name="five">
<el-table height="370"
:data="precessList"
style="width: 100%">
<el-table-column
prop="operatorTime"
label="变更时间"
width="180">
<el-table height="370" :data="precessList" style="width: 100%">
<el-table-column prop="operatorTime" label="变更时间" width="180">
</el-table-column>
<el-table-column
prop="type"
label="变更方式">
<template slot-scope="scope">
<el-table-column prop="type" label="变更方式">
<template slot-scope="scope">
<span v-if="scope.row.type == '0'">手动</span>
<span v-if="scope.row.type == '1'">自动</span>
</template>
</el-table-column>
<el-table-column
prop="afterLevelName"
label="变更结果">
<el-table-column prop="afterLevelName" label="变更结果">
</el-table-column>
<el-table-column
prop="operatorName"
@@ -274,10 +211,10 @@ export default {
name: "teacherDetails",
components: { imageUpload },
props: {
id:{
id:{// sysId
type: String,
},
newId:{
newId:{// id
type: String,
}
},
@@ -286,9 +223,11 @@ export default {
formatsec,
formatSeconds,
baseUrl: process.env.VUE_APP_BASE_API,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
newForm:{
account:{},
user:{},
photo:''
},
dialogVisible:false,
activeName: "first",
@@ -325,21 +264,43 @@ export default {
};
},
mounted() {
this.getDetail(this.id);
this.getAvatar();
if(this.id) {
this.getDetail();
}
},
watch:{
id(newVal){
if(newVal){
this.getDetail(newVal);
}
}
},
computed: {
...mapGetters(["userInfo"])
},
methods: {
downloadActioon(filePath) {
if (!filePath) return;
let link = document.createElement('a'); //创建a标签
link.style.display = 'none'; //使其隐藏
link.download = this.fileBaseUrl + filePath;
link.setAttribute('target', '_blank');
link.href = this.fileBaseUrl + filePath; //赋予文件下载地址
link.setAttribute('download', '资料'); //设置下载属性 以及文件名
document.body.appendChild(link); //a标签插至页面中
link.click(); //强制触发a标签事件
document.body.removeChild(link);
},
getAvatar(){
teacherApi.detail(this.newId).then(res => {
if (res.status == 200) {
// const result = res.result;
this.newForm = res.result;
if(res.result.account.avatar != '') {
this.newForm.account.avatar = this.baseUrl + res.result.account.avatar;
}
// if(res.result.account.avatar != '') {
// this.newForm.account.avatar = this.baseUrl + res.result.account.avatar;
// }
}
})
},
@@ -481,15 +442,58 @@ export default {
this.getCourseScore()
},
getDetail() {
//应该是自己系统的教师信息呀
// teacherApi.detail(this.newId).then(rs=>{
// if(rs.status==200){
// }
// });
teacherBoeApi.teacherInfo(this.id).then(res => {
if (res.status == 200) {
const result = res.result;
this.form = result;
this.synchronization(res.result);
} else {
this.$message.error(res.message);
}
});
},
synchronization(result) {
let param = {
id: this.newId,//当前老师记录的id
/**因为有可能部分老师没有这个字段,对应返回的teacher_id*/
sysId: result.teacher_id,
/**因为有可能部分老师没有这个字段*/
companyId: result.company_id,
companyName: result.company_name,
teacherCode: result.teacher_code,
/**返回的字段,不知道什么意义*/
teacherType: result.teacher_type,
userId: result.user_id,
userNo: result.user_no,
gender: result.gender,
teachingTime: result.teaching_time,
certification: result.certification,
language: result.language,
timezone: result.timezone,
tsystemId: result.system_id,
tsystemName: result.system_name,
tlevelId: result.level_id,
tlevelName: result.level_name,
/**认证人*/
certifyby: result.certify_by,
/**状态0临时1正式2停用*/
pstatus: result.status,
/**员工状态 2正常 3离职*/
pemployeeStatus: result.employee_status,
}
teacherApi.syncUpdate(param).then(res=>{
if(res.status != 200) {
console.log(res)
}
})
}
}
};
</script>

View File

@@ -7,7 +7,7 @@
<el-breadcrumb-item>文章详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div">
<el-row >
<div>
<!-- <div v-else>我四娘娘</div> -->
@@ -28,7 +28,7 @@
</div>
<div class="content ql-container">
<div class="ql-editor">
<div class="qltext" style="word-break:break-all;" v-html="articleDetailData.content"></div>
<div class="qltext" style="word-break:break-all; color:#121212" v-html="articleDetailData.content"></div>
</div>
<!-- html内容 -->
<!-- <img v-if="$route.query.id==1" style="width: 100%;" :src="`${webBaseUrl}/temp/articleOne.png`"/> -->
@@ -257,7 +257,6 @@ export default {
.qltext{
font-size: 15px;
font-weight: normal;
line-height: 50px;
color: #454545;
line-height: 24px;
::v-deep img{

View File

@@ -49,9 +49,11 @@
</router-link>
<!--body-->
<div class="article-body" style="display: flex;justify-content: space-between;">
<router-link :to="'article/detail?id=' + article.id">
<div class="article-image" v-if="article.coverurl">
<article-image :article="article"></article-image>
</div>
</router-link>
<div style="flex: 1;">
<router-link :to="'article/detail?id=' + article.id">
<div style="padding-top: 5px;">

View File

@@ -1,5 +1,5 @@
<template>
<div>
<div id="case-list-content">
<portal-header current="case" :goSearch="2"></portal-header>
<div class="portal-content xcontent" style="margin-top: 30px;">
<el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb-nav">
@@ -7,62 +7,156 @@
<el-breadcrumb-item>案例详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div" id="content-div">
<el-row :gutter="10">
<el-col :span="24">
<el-card :body-style="{ padding: '0px' }" class="detail">
<div class="title">{{ caseDetail.title }}</div>
<div class="label">
<author :onlyAvatar="true" :avatar="authorInfo.avatar" ></author>
<span>作者{{ authorInfo.name }}</span>
<author :onlyAvatar="true" :avatar="authorInfo.avatar" :sex="authorInfo.sex" ></author>
<span>案主{{ authorInfo.name }}</span>
<span>工号{{ authorInfo.code }}</span>
<span>部门{{ authorInfo.orgInfo }}</span>
<span>案例编号{{ caseDetail.id }}</span>
<span>发布时间{{ caseDetail.sysCreateTime }}</span>
<interactBar :views="false" :data="caseDetail" :type="3" :comments="false" :shares="false"></interactBar>
<span>组织{{ authorInfo.orgInfo }}</span>
<span style="text-align: right;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
</div>
<div class="btn-div">
<span class="item">角色认知</span>
<span class="item">角色转变</span>
<span class="item">团队管理</span>
<!-- <div class="label">
<span style="margin-left:0px;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true"></interactBar>
</div> -->
<!-- <div class="case-summary"><span>{{ caseDetail.summary }}</span></div> -->
<div class="btn-div clearfix" >
<div style="color:#666" v-if="caseDetail.orgDomain" class="item">{{ orgDomainTranslate(caseDetail.orgDomain) }}</div>
<div style="color:#666" class="item" v-if="caseDetail.orgDomain == '' && caseDetail.orgDomainParent">{{ orgDomainTranslate(caseDetail.orgDomainParent) }}</div>
<div style="color:#666" v-if="caseDetail.majorType" class="item">{{ majorTypeTranslate(caseDetail.majorType) }}</div>
<div v-if="caseDetail.keyword1" class="item">{{ caseDetail.keyword1 }}</div>
<div v-if="caseDetail.keyword2" class="item">{{ caseDetail.keyword2 }}</div>
<div v-if="caseDetail.keyword3" class="item">{{ caseDetail.keyword3 }}</div>
<div v-if="caseDetail.keyword4" class="item">{{ caseDetail.keyword4 }}</div>
<div v-if="caseDetail.keyword5" class="item">{{ caseDetail.keyword5 }}</div>
<!-- <span v-if="caseDetail.caseType" class="item">{{ caseDetail.caseType }}</span>
<span v-if="caseDetail.caseType1" class="item">{{ caseDetail.caseType1 }}</span>
<span v-if="caseDetail.caseType2" class="item">{{ caseDetail.caseType2 }}</span> -->
</div>
<div class="case-summary"><span>{{ caseDetail.summary }}</span></div>
<div class="label" style="margin-top:10px">
<!-- <span style="margin-left:0px;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span> -->
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
</div>
</el-card>
<el-card :body-style="{ padding: '0px' }" class="jianjie">
<el-card :body-style="{ padding: '0px' }" class="jianjie" id="pdfPreview">
<!-- <div class="content">
{{ caseDetail.content }}
</div> -->
<pdfPreview :filePath="basePath+caseDetail.filePath"></pdfPreview>
<pdfPreview v-if="pdfPath" :filePath="pdfPath"></pdfPreview>
</el-card>
<div class="postfixt-bot">
<div class="postfixt-bot-box" id="pdfTopBox">
<div style="display: flex;justify-content: space-between;">
<div style="margin-left:20px">
<div style="margin-top:3px">
<i style="font-size:22px;color:#a3b1cc" v-show="zoomShow" @click="zoomBox()" class="el-icon-zoom-in"></i>
<i style="font-size:22px;color:#a3b1cc" v-show="!zoomShow" @click="zoomBox()" class="el-icon-zoom-out"></i>
</div>
</div>
<div>
<div style="display:inline-block;">
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
</div>
<div style="display:inline-block;margin: 0 20px;">
<el-button type="primary" @click="goTop()">返回顶部</el-button>
</div>
</div>
</div>
</div>
</div>
<!-- :authorId="articleDetailData.sysCreateAid" -->
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.sysCreateAid"></comments></el-row>
<div id="comments-box">
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.authorId" :toUsers="toUsers"></comments></el-row>
</div>
</el-col>
</el-row>
</div>
<div style="width: 245px;margin-left: 10px;"><!--排行榜-->
<div id="fixd-box">
<el-card class="ranking-card">
<div slot="header">
<span>排行榜</span>
</div>
<div>
<el-row class="ranking-title" v-for="(item,index) in ankingList" :key="index">
<el-col :span="6">
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
</el-col>
<el-col class="center" :span="18">{{item.sysCreateUname}}</el-col>
<!-- <el-col class="center" :span="7">{{''}}</el-col>
<el-col class="center" :span="7">{{item.counts}}</el-col> -->
</el-row>
</div>
</el-card>
</div>
</div>
<div style="width: 245px;margin-left: 5px;" :class="zoomShow?'':'fixd-box-show'">
<div>
<div id="fixd-box">
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">贡献榜</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
</el-row>
<el-row class="ranking-title bacolor" v-for="(item, index) in ankingList" :key="index" >
<el-col :span="6" style="height:34px">
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
</el-col>
<el-tooltip :enterable="false" effect="light" :content="item.sysCreateUname" placement="top-start">
<el-col :span="15" class="title-line-ellipsis"> {{ item.sysCreateUname }}</el-col>
</el-tooltip>
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
</el-row>
</div>
</el-card>
<div style="height: 10px;"></div>
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
</el-row>
<el-row class="ranking-title bacolor" v-for="(item, index) in Popularity" :key="index" >
<el-col :span="6" style="height:34px">
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
</el-col>
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="top-start">
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
</el-tooltip>
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
</el-row>
</div>
</el-card>
<div style="height: 10px;"></div>
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评榜</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
</el-row>
<el-row class="ranking-title bacolor" v-for="(item, index) in Positive" :key="index" >
<el-col :span="6" style="height:34px">
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
</el-col>
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="top-start">
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
</el-tooltip>
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
</el-row>
</div>
</el-card>
</div>
</div>
</div>
</div>
</div>
<portal-footer></portal-footer>
<portalFloatTools></portalFloatTools>
</div>
</template>
@@ -70,62 +164,219 @@
import { mapGetters } from 'vuex';
import portalHeader from '@/components/PortalHeader.vue';
import portalFooter from '@/components/PortalFooter.vue';
import pdfPreview from '@/components/PdfPreview/index.vue';
import pdfPreview from '@/components/PdfPreview/view.vue';
import interactBar from '@/components/Portal/interactBar.vue';
import comments from '@/components/Portal/comments.vue';
import apiCase from '@/api/modules/cases.js';
import apiUser from '@/api/system/user.js';
import author from '@/components/Portal/authorInfo.vue';
import apiMessage from '@/api/system/message.js'
import apiMessage from '@/api/system/message.js';
import apiDict from "@/api/modules/dict.js"
import {encrypt} from '@/utils/jsencrypt.js';
import cookies from 'vue-cookies'
import {cutFullName} from "@/utils/tools.js";
import portalFloatTools from "@/components/PortalFloatTools.vue";
export default {
name: 'atticle',
components: { portalHeader, portalFooter, interactBar, author, comments,pdfPreview },
components: { portalHeader,portalFloatTools, portalFooter, interactBar, author, comments,pdfPreview },
computed: {
...mapGetters(['userInfo'])
},
data() {
return {
zoomShow:true,
isTopBoxShow:true,
toUsers:[],
ankingList:[],
Popularity:[],
Positive:[],
resolveId: '',
basePath:process.env.VUE_APP_FILE_BASE_URL,
pdfPath:'',
caseDetail: {
id:'',
filePath:''
},
ankingList:[],
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '' }
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null},
domain: [],
Profess: [],
orgData: [],
};
},
mounted() {
//this.pdfPath=this.basePath+'/case/demo1.pdf';
this.resolveId = this.$route.query.id;
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
if (this.resolveId) {
this.getCaseData();
}
this.getdomain();
this.getProfess();
this.getAnkingData();
this.getPopularity();
this.getPositive();
window.addEventListener(
"scroll",
this.handleScroll
);
},
methods: {
getAnkingData(){
apiCase.usernameList(10).then(res=>{
getdomain() {
let key = "org_domain";
apiDict.items(key).then(res => {
if (res.status == 200) {
this.domain = res.result;
if(res.result.length > 0) {
this.orgDomainLevel(res.result)
}
}
});
},
getProfess() {
let key = "major_type";
apiDict.items(key).then(res => {
if (res.status == 200) {
this.Profess = res.result;
}
});
},
orgDomainLevel(organization) {
this.orgData = [];
organization.forEach(item=>{
this.orgData.push(item);
if(item.list && item.list != "" && item.list.length > 0){
item.list.forEach(it =>{
this.orgData.push(it);
})
}
})
},
orgDomainTranslate(code){ // 组织领域翻译
if(code == '') {
return
}
let name = '';
let data = this.orgData.find(item => item.code == code);
if(data == undefined){
name = '';
} else {
name = data.name;
}
return name;
},
majorTypeTranslate(code){ // 专业分类翻译
let name = '';
let data = this.Profess.find(item => item.code == code);
if(data == undefined){
name = '';
} else {
name = data.name;
}
return name;
},
zoomBox(){
this.zoomShow = !this.zoomShow;
},
jumpRouter(item) {
// console.log(item)
location.href =`${this.webBaseUrl}/case/detail?id=${item.id}`
// this.$router.push(`/case/detail?id=${item.id}`);
},
goTop() {
document.documentElement.scrollTop = 0;
},
createPlayUrl(u){
let nowDate=new Date();
let ctime=parseInt(nowDate.getTime()/1000);
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+u;
let urlSign=encodeURIComponent(encrypt(beforeUrl));
cookies.set('CASE_TIME', ctime);//写客户端的cookie保存
//以下判断是为了区分本地环境和服务器环境
if(process.env.NODE_ENV == 'development'){
this.pdfPath=process.env.VUE_APP_FILE_BASE_URL+u;
}else{
this.pdfPath=process.env.VUE_APP_BASE_API+'/xboe/m/case/content/resource?sign='+urlSign;
}
},
handleScroll() {
let innerHeight = document.querySelector('#case-list-content').clientHeight
let pdfTopBox = document.querySelector('#comments-box')
let pdfPreview = document.querySelector('#pdfPreview') //pdf盒子距离顶部的高度
let contentDiv = document.querySelector('#content-div').clientWidth;
let outerHeight = document.documentElement.clientHeight
let scrollTop = document.documentElement.scrollTop
if ((outerHeight + scrollTop + 350) >= innerHeight) {
if(this.moreState == 1 && this.course.pageIndex < 4) {
this.loadMore();
}
}
if(pdfPreview.getBoundingClientRect().top < 0) {
document.querySelector('#pdfTopBox').style.cssText = `position: fixed;bottom:0;box-shadow: -3px 3px 10px 10px rgba(90, 119, 186, .1);width:${contentDiv-9}px;`;
} else {
document.querySelector('#pdfTopBox').style.cssText = "position:static";
}
if(pdfTopBox.getBoundingClientRect().top < 1000) {
document.querySelector('#pdfTopBox').style.cssText = "position:static";
}
if(scrollTop > 630) {
this.isTopBoxShow = true;
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -500px;width:245.5px";
} else {
document.querySelector('#fixd-box').style.cssText = "position: static";
}
},
getAnkingData(){
apiCase.usernameList(5).then(res=>{
if(res.status==200){
this.ankingList=res.result
}
})
},
getPopularity(){
apiCase.queryPraises(5).then(res=>{
if(res.status==200){
this.Popularity=res.result
}
})
},
getPositive(){
apiCase.queryComments(5).then(res=>{
if(res.status==200){
this.Positive=res.result
}
})
},
getCaseData() {
apiCase.detail(this.resolveId,true).then(res => {
if (res.status == 200) {
if (JSON.stringify(res.result) != '{}') {
this.caseDetail = res.result;
this.getCaseUserDetail();
if(this.caseDetail.filePath){
//this.pdfPath=this.basePath+this.caseDetail.filePath;
this.createPlayUrl(this.caseDetail.filePath);
}else{
this.$message.error('内容文件不存在或已被删除,请与管理员联系');
}
}
}else{
this.$message.error(res.message)
}
});
},
getCaseUserDetail() {
apiUser.getByIds([this.caseDetail.sysCreateAid]).then(res => {
if (res.status == 200) {
apiUser.getByIds([this.caseDetail.authorId]).then(res => {
if (res.status == 200 && res.result.length>0) {
this.authorInfo = res.result[0];
this.authorInfo.orgInfo=cutFullName(this.authorInfo.orgInfo,1);
this.toUsers = [
{name: res.result[0].name, aid:res.result[0].aid ,sex:res.result[0].sex}
];
//console.log(res.result,'res.result');
}
});
},
@@ -150,6 +401,77 @@ export default {
</script>
<style scoped lang="scss">
.fixd-box-show{
display: none;
}
::v-deep .interact-bar .interact-bar-btns {
justify-content: flex-start!important;
}
::v-deep .interact-bar-btn{
margin-left:0px!important;
margin-right:15px!important;
}
.postfixt-bot{
height: 60px;
margin-top: 10px;
line-height: 60px;
// background-color: #fff;
// border: 1px solid #eee;
// z-index: 999;
.postfixt-bot-box{
// text-align: right;
background-color: #fff;
// border: 1px solid #eee;
}
}
.el-card{
border:none;
}
.case-summary{
font-size: 15px;
color: #454545;
word-break:break-all;
line-height: 25px;
}
::v-deep .el-card__body{
padding: 0;
}
::v-deep .bacolor:nth-child(odd){
background-color: #f6f6f6;
padding: 0 5px;
}
::v-deep .bacolor:nth-child(even){
background-color: #fff;
padding: 0 5px;
}
.ranking-title {
line-height: 34px;
font-size: 15px;
color: #333333;
.center-titlt{
font-size: 15px;
color: #333333;
}
.center{
text-align: right;
}
img{
margin-top: 5px;
}
}
::v-deep .title-line-ellipsis{
// width: 100%;
display: -webkit-box;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
box-sizing: border-box;
word-break:break-all;
}
.nav {
margin-bottom: 10px;
}
@@ -160,6 +482,7 @@ export default {
font-size: 20px;
line-height: 45px;
font-weight: 600;
word-break:break-all;
}
.label {
font-size: 15px;
@@ -170,22 +493,40 @@ export default {
span {
margin-left: 10px;
&:last-of-type {
margin-right: auto;
flex: 1;
}
}
}
.type {
color: #0079fe;
}
.clearfix:after{
content: "020";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.btn-div {
margin: 8px 0;
padding-bottom: 10px;
color: #666;
margin: 0px 0 5px 0;
padding-bottom: 5px;
padding-top:5px;
height: 100%;
width: 100%;
.item {
margin: 0 8px 0 15px;
border: 1px solid #9e9e9e;
padding: 3px 10px;
border-radius: 8px;
float: left;
margin: 7px 10px 0px 0px;
border: 1px solid #c2c3c8;
padding: 0px 10px;
line-height: 24px;
text-align: center;
height: 24px;
box-sizing: border-box;
border-radius: 2px;
font-size: 14px;
color: #9c9c9c;
}
.item-right {
float: right;
@@ -193,9 +534,10 @@ export default {
}
}
.jianjie {
margin: 15px 0;
// margin: 15px 0;
background-color: #fff;
padding: 20px 100px 10px 100px;
min-height: 300px;
padding: 0px 0px 10px 0px;
.content {
padding: 10px 0;
line-height: 25px;

File diff suppressed because it is too large Load Diff

View File

@@ -135,12 +135,18 @@
</div>
<div style="display: flex;align-items: center;padding-top: 15px;">
<div @click="praiseContent" style="cursor: pointer;">
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')">
</el-tooltip>
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
</div>
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')">
</el-tooltip>
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
</div>
</div>
</div>
@@ -325,7 +331,7 @@ export default {
tags: [],
numberToLetter: numberToLetter,
// resOwnerListMap: resOwnerIndexName,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl: this.$Constants.fileBaseUrl,
blobUrl:'',//播放的文件地址新添加采用blob方式
getType: getType,
courseType,
@@ -459,7 +465,6 @@ export default {
$this.$message.error('加载pdf课件文件失败');
}
});
//let url = this.fileBaseUrl + r.content;
}else if(con.contentType ==52){
if(con.content.startsWith('\{')){
@@ -500,32 +505,17 @@ export default {
createPlayUrl(fid,u){
let nowDate=new Date();
let ctime=parseInt(nowDate.getTime()/1000);
let beforeUrl=parseInt(nowDate.getTime()/1000)+u;
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
//console.log(beforeUrl,'beforeUrl');
let urlSign=encodeURIComponent(encrypt(beforeUrl));
//console.log(urlSign,'urlSign');
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
//this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/play/resource?sign='+urlSign;
//this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/course/resource?fid='+fid;
//this.blobUrl='http://localhost:9090/xboe/course/resource?fid='+fid;
this.blobUrl=this.fileBaseUrl+u;
},
createVideoBlob(url){
let $this=this;
let xhr = new XMLHttpRequest;
xhr.open("GET",url,true);
xhr.responseType = 'blob';
//xhr.onload只有 4 状态会触发
xhr.onreadystatechange = function() {
if (xhr.readyState==4 && xhr.status == 200) {//请求成功
//获取blob对象
let blob = xhr.response;
//获取blob对象地址并把值赋给容器
let urlObj = window.URL.createObjectURL(blob);
$this.blobUrl=urlObj;
}
};
xhr.send();
//以下判断是为了区分本地环境和服务器环境
if(process.env.NODE_ENV == 'development'){
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
}else{
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
}
},
showQrimage(row){
let urlPre=window.location.protocol+'//'+window.location.host;

View File

@@ -7,7 +7,7 @@
<el-breadcrumb-item>问答详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div">
<el-row>
<el-card :body-style="{ padding: '0px' }" class="detail">
<div class="title" >

View File

@@ -65,7 +65,7 @@
</div>
<div style="display: flex;">
<div style="flex: 83%" class="qa-info-summary two-line-ellipsis" @click="jumpDetail(qa)" v-html="$keywordActiveShow(qa.content,queryKeyWord)"></div>
<div style="flex: 17% ;text-align: right;" v-if="qa.images!==''">
<div style="flex: 17% ; cursor: pointer; text-align: right;cursor: pointer;" v-if="qa.images!==''" @click="jumpDetail(qa)">
<img style="width: 156px;height: 105px;" :src="fileBaseUrl + qa.images" alt="">
</div>
</div>

View File

@@ -264,6 +264,7 @@ export default {
line-height: 30px;
}
.msg-body {
word-break:break-all;
padding: 10px 10px 10px 25px;
color: #727272;
a:hover {

View File

@@ -42,7 +42,7 @@
<el-button style="margin-left:0px" type="success" @click="setEssence('set')" >设置精华</el-button>
<el-button type="warning" @click="setEssence('cancel')" >取消精华</el-button>
<div style="padding-left:10px"><el-checkbox v-model="queryObj.isEssence">精华问题</el-checkbox></div>
<div style="padding-left:10px"><el-checkbox v-model="queryObj.isEssence" @change="isEssenceChange()">精华问题</el-checkbox></div>
</div>
</div>
@@ -52,34 +52,34 @@
border stripe
@selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column label="标题" width="200px" show-overflow-tooltip prop="title" :reserve-selection="true">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="标题" width="200px" show-overflow-tooltip prop="title">
<template slot-scope="scope">
<span @click="viewTopic(scope.row)" :class="scope.row.isEssence ? 'isSelect' : 'previewStyle'">{{ scope.row.title }}</span>
<!-- <a :style="cursor:pointer;" target="_blank" :href="`${webBaseUrl}/qa/answer`">{{scope.row.name}}</a> -->
</template>
</el-table-column>
<el-table-column label="浏览" width="60px" prop="views" :reserve-selection="true"></el-table-column>
<el-table-column label="点赞" width="60px" prop="praises" :reserve-selection="true"></el-table-column>
<el-table-column label="收藏" width="60px" prop="favorites" :reserve-selection="true"></el-table-column>
<el-table-column label="回复" width="60px" prop="answers" :reserve-selection="true"></el-table-column>
<el-table-column width="100px" label="发布时间" prop="sysCreateTime" :reserve-selection="true">
<el-table-column label="浏览" width="60px" prop="views"></el-table-column>
<el-table-column label="点赞" width="60px" prop="praises"></el-table-column>
<el-table-column label="收藏" width="60px" prop="favorites"></el-table-column>
<el-table-column label="回复" width="60px" prop="answers"></el-table-column>
<el-table-column width="100px" label="发布时间" prop="sysCreateTime">
<template slot-scope="scope">
{{ scope.row.sysCreateTime | sysCreateTimeFilter }}
</template>
</el-table-column>
<el-table-column label="作者" prop="sysCreateBy" :reserve-selection="true"></el-table-column>
<el-table-column label="状态" prop="status" :reserve-selection="true">
<el-table-column label="作者" prop="sysCreateBy"></el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
{{ scope.row.isResolve ? '已解决' : '待解决' }}
</template>
</el-table-column>
<el-table-column label="审核状态" prop="status" :reserve-selection="true">
<el-table-column label="审核状态" prop="status">
<template slot-scope="scope">
{{ scope.row.status === 0 ? '待审核' : scope.row.status === 1 ? '已通过' : scope.row.status === 2 ? '未通过' : '已撤销' }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="120px" :reserve-selection="true">
<el-table-column label="操作" fixed="right" width="120px">
<template slot-scope="scope">
<el-button-group>
<el-button type="text" v-if="scope.row.status==0" icon="el-icon-s-check" @click="aduit(scope.row)" size="small">审核</el-button>
@@ -163,6 +163,9 @@ export default {
}
},
methods: {
isEssenceChange(){
this.getQaList();
},
search(){
this.queryObj.pageIndex = 1;
this.getQaList();

View File

@@ -1,8 +1,7 @@
<template>
<div>
<Remark>
1.我分享出去的,没有案例案例是管理员推送给受众的分享时间倒叙<br/>
2.www
</Remark>
<div style="position: relative;" class="my-list">
<el-row :gutter="20">
@@ -21,10 +20,42 @@
<el-button type="primary" @click="resData" icon="el-icon-refresh-right" style="padding: 10px 15px;">重置</el-button>
</el-col>
</el-row>
<el-tabs v-model="tabName" @tab-click="changeTab" style="margin-top:14px">
<!-- 全部 -->
<el-tab-pane label="全部" name="all">
<div v-for="(item, index) in dataList.list">
<course-items type="myShare" v-if="item.type==1" :items="[item]" @confirm="confirm"></course-items>
<case-items type="myShare" v-if="item.type==3" :items="[item]" @confirm="confirm" ></case-items>
<article-items type="myShare" v-if="item.type==2" @confirm="confirm" :items="[item]"></article-items>
<qa-items type="myShare" v-if="item.type==4" :items="[item]" @confirm="confirm" :collect="true" :share="false" :remove="false" :edit="false"></qa-items>
</div>
<div style="text-align: center;margin-top:57px" v-if="dataList.list.length > 0">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="dataList.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="dataList.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="dataList.count"
></el-pagination>
</div>
<div v-else>
<div v-if="dataList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="课程" name="course">
<div style="min-height: 500px;">
<course-items @confirm="confirm" :items="courseList.list"></course-items>
<course-items @confirm="confirm" type="myShare" :items="courseList.list"></course-items>
<!-- v-if="courseList.count>courseList.pageSize" -->
<div v-if="courseList.list.length > 0" style="text-align: center;margin-top:57px">
<el-pagination
@@ -42,15 +73,38 @@
<div v-else>
<div v-if="caseList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="案例" name="case">
<div style="min-height: 500px;">
<case-items @confirm="confirm" type="myShare" :items="caseList.list"></case-items>
<div v-if="caseList.list.length > 0" style="text-align: center;margin-top:57px;">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="caseList.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="articleList.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="caseList.count"
></el-pagination>
</div>
<div v-else>
<div v-if="caseList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="文章" name="article">
<div style="min-height: 500px;">
<article-items @confirm="confirm" :items="articleList.list"></article-items>
<article-items @confirm="confirm" type="myShare" :items="articleList.list"></article-items>
<!-- v-if="articleList.count>articleList.pageSize" -->
<div v-if="articleList.list.length > 0" style="text-align: center;margin-top:57px;">
<el-pagination
@@ -74,7 +128,7 @@
</el-tab-pane>
<el-tab-pane label="问答" name="qa">
<div>
<qa-items @confirm="confirm" :items="qaList.list"></qa-items>
<qa-items @confirm="confirm" type="myShare" :items="qaList.list"></qa-items>
<!-- v-if="qaList.count>qaList.pageSize" -->
<div v-if="qaList.list.length > 0" style="text-align: center;margin-top:57px;">
<el-pagination
@@ -109,13 +163,14 @@
import qaItems from '@/components/Qa/shareList.vue'
import apiShares from '@/api/modules/shares.js';
import apiUser from '@/api/system/user.js';
import caseItems from '@/components/Case/caseItems.vue'
export default {
name: 'myShareIndex',
components:{articleItems,courseItems,qaItems},
components:{articleItems,courseItems,qaItems,caseItems},
data(){
return {
isRead: '',
tabName:'course',
tabName:'all',
keyword:'',
courseIndex:null,
qaIndex:null,
@@ -144,10 +199,49 @@
count: 0,
list: []
},
dataList: {
pageIndex: 1,
pageSize: 10,
keyword: '',
count: 0,
list: []
},
isSearh:false,
}
},
methods:{
findAll(){
let { pageIndex, pageSize } = this.dataList;
let query = { pageIndex, pageSize, keyword: this.keyword, isRead: this.isRead };
apiShares.findMeShare(query).then(res=>{
if(res.status == 200){
this.dataList.count = res.result.count;
res.result.list.forEach(item => {
if(item.type == 4) {
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
item.question.isResolve=item.isResolve;
item.question.title=item.title;
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
item.cases.title=item.title;
item.cases.summary=item.content;
item.cases.id=item.id;
}
});
this.dataList.list = res.result.list;
}else {
this.$message.error(res.message);
}
})
},
queryData(){
this.qaList.pageIndex = 1;
this.articleList.pageIndex = 1;
@@ -156,12 +250,19 @@
if (this.tabName == 'qa') {
this.findQa();
}
if (this.tabName == 'case') {
this.findCase();
}
if (this.tabName == 'article') {
this.findArticle();
}
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'all') {
this.findAll();
}
},
resData() {
this.qaList.pageIndex = 1;
@@ -172,20 +273,21 @@
this.queryData();
this.isSearh = false;
},
changeIndex(value){
if(this.tabName=='qa'){
this.qaIndex=value
this.findQa();
}
if(this.tabName=='article'){
this.articleIndex=value
this.findArticle();
}
if(this.tabName=='course'){
this.courseIndex=value
this.findCourse();
}
},
// changeIndex(value){
// if(this.tabName=='qa'){
// this.qaIndex=value
// this.findQa();
// }
// if(this.tabName=='article'){
// this.articleIndex=value
// this.findArticle();
// }
// if(this.tabName=='course'){
// this.courseIndex=value
// this.findCourse();
// }
// },
changeTab(tab) {
if (tab.name == 'qa') {
this.findQa();
@@ -196,6 +298,13 @@
if (tab.name == 'course') {
this.findCourse();
}
console.log(tab.name,'tab.name');
if (tab.name == 'case') {
this.findCase();
}
if (tab.name == 'all') {
this.findAll();
}
},
//分页点击事件
handleSizeChange(value) {
@@ -211,6 +320,14 @@
this.courseList.pageSize = value;
this.findCourse();
}
if (this.tabName == 'case') {
this.caseList.pageSize = value;
this.findCase();
}
if (this.tabName == 'all') {
this.dataList.pageSize = value;
this.findAll()
}
},
//分页点击事件
handleCurrentChange(value) {
@@ -226,6 +343,28 @@
this.courseList.pageIndex = value;
this.findCourse();
}
if (this.tabName == 'case') {
this.caseList.pageIndex = value;
this.findCase();
}
if (this.tabName == 'all') {
this.dataList.pageIndex = value;
this.findAll();
}
},
// 案例数据查询
findCase() {
let { pageIndex, pageSize } = this.caseList;
let query = { pageIndex, pageSize,keyword:this.keyword,isRead: this.isRead,objType:3};
apiShares.myCaseList(query).then(res=>{
console.log(res,'res');
if(res.status == 200) {
this.caseList.count = res.result.count;
this.caseList.list = res.result.list;
}else {
this.$message.error(res.message);
}
})
},
//问答数据查询
findQa() {
@@ -312,18 +451,35 @@
});
},
confirm(item) {
apiShares.deleteshares(item.id).then(res=>{
let id = '';
if (this.tabName == 'all') {
id = item.shareId;
} else {
id = item.id;
}
apiShares.deleteshares(id).then(res=>{
if(res.status == 200){
this.$message.success('撤回成功');
if (this.tabName == 'qa') {
this.findQa();
}
if (this.tabName == 'article') {
this.findArticle();
}
if (this.tabName == 'course') {
this.findCourse();
if(res.result) {
this.$message.success('撤回成功');
if (this.tabName == 'qa') {
this.findQa();
}
if (this.tabName == 'article') {
this.findArticle();
}
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'case') {
this.findCase();
}
if (this.tabName == 'all') {
this.findAll();
}
} else {
this.$message.warning(res.message);
}
}else{
this.$message.error('撤回失败');
}
@@ -340,6 +496,10 @@
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'all') {
this.findAll();
}
},
}
</script>

View File

@@ -18,14 +18,15 @@
</el-row>
<el-tabs v-model="tabName" @tab-click="changeTab" style="margin-top:14px">
<!-- 全部 -->
<!-- <el-tab-pane label="全部" name="all">
<el-tab-pane label="全部" name="all">
<div v-for="(item, index) in dataList.list">
<course-items v-if="item.objType==1" :items="[item]" @confirm="confirm"></course-items>
<article-items v-if="item.objType==2" @confirm="confirm" :items="[item]"></article-items>
<qa-items v-if="item.objType==4" :items="[item]" @confirm="confirm" :collect="true" :share="false" :remove="false" :edit="false"></qa-items>
<course-items type="toMy" v-if="item.type==1" :items="[item]" @confirm="confirm"></course-items>
<case-items type="toMy" v-if="item.type==3" :items="[item]" @confirm="confirm" ></case-items>
<article-items type="toMy" v-if="item.type==2" @confirm="confirm" :items="[item]"></article-items>
<qa-items type="toMy" v-if="item.type==4" :items="[item]" @confirm="confirm" :collect="true" :share="false" :remove="false" :edit="false"></qa-items>
</div>
v-if="courseList.count>courseList.pageSize"
<div style="text-align: center;margin-top:57px">
<div style="text-align: center;margin-top:57px" v-if="dataList.list.length > 0">
<el-pagination
background
@size-change="handleSizeChange"
@@ -37,9 +38,13 @@
:total="dataList.count"
></el-pagination>
</div>
</el-tab-pane> -->
<div v-else>
<div v-if="dataList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="课程" name="course">
<div style="min-height: 500px;">
<course-items :keyword="keyword" type="toMy" @confirm="confirm" :items="courseList.list"></course-items>
@@ -64,6 +69,30 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="案例" name="case">
<div style="min-height: 500px;">
<case-items :keyword="keyword" type="toMy" @confirm="confirm" :items="caseList.list"></case-items>
<!-- v-if="articleList.count>articleList.pageSize" -->
<div v-if="caseList.list.length > 0" style="text-align: center; margin-top:57px">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="caseList.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="caseList.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="caseList.count"
></el-pagination>
</div>
<div v-else>
<div v-if="caseList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="文章" name="article">
<div style="min-height: 500px;">
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="articleList.list"></article-items>
@@ -118,6 +147,7 @@
</template>
<script>
import caseItems from '@/components/Case/caseItems.vue'
import articleItems from '@/components/Article/shareItems.vue';
import courseItems from '@/components/Course/shareItem.vue';
import qaItems from '@/components/Qa/shareList.vue';
@@ -125,12 +155,12 @@ import apiShares from '@/api/modules/shares.js';
import apiUser from '@/api/system/user.js';
export default {
name: 'myShareIndex',
components: { articleItems, courseItems, qaItems },
components: { articleItems, courseItems, qaItems,caseItems },
data() {
return {
isSearh:false,
isRead: '',
tabName: 'course',
tabName: 'all',
keyword: '',
courseIndex: null,
qaIndex: null,
@@ -173,6 +203,7 @@ export default {
this.qaList.pageIndex = 1;
this.articleList.pageIndex = 1;
this.courseList.pageIndex = 1;
this.dataList.pageIndex = 1;
this.isSearh= true;
if (this.tabName == 'qa') {
this.findQa();
@@ -183,6 +214,12 @@ export default {
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'case') {
this.findCase();
}
if (this.tabName == 'all') {
this.findAll();
}
},
resData() {
@@ -191,6 +228,7 @@ export default {
this.qaList.pageIndex = 1;
this.articleList.pageIndex = 1;
this.courseList.pageIndex = 1;
this.dataList.pageIndex = 1;
this.queryData();
this.isSearh= false;
},
@@ -218,6 +256,12 @@ export default {
if (tab.name == 'course') {
this.findCourse();
}
if (tab.name == 'case') {
this.findCase();
}
if (tab.name == 'all') {
this.findAll();
}
},
//分页点击事件
handleSizeChange(value) {
@@ -233,7 +277,14 @@ export default {
this.courseList.pageSize = value;
this.findCourse();
}
if (this.tabName == 'case') {
this.caseList.pageSize = value;
this.findCase()
}
if (this.tabName == 'all') {
this.dataList.pageSize = value;
this.findAll()
}
},
//分页点击事件
handleCurrentChange(value) {
@@ -249,8 +300,58 @@ export default {
this.courseList.pageIndex = value;
this.findCourse();
}
if (this.tabName == 'case') {
this.caseList.pageIndex = value;
this.findCase();
}
if (this.tabName == 'all') {
this.dataList.pageIndex = value;
this.findAll();
}
},
findAll(){
let { pageIndex, pageSize } = this.dataList;
let query = { pageIndex, pageSize, keyword: this.keyword, isRead: this.isRead };
apiShares.findShareMe(query).then(res=>{
if(res.status == 200) {
this.dataList.count = res.result.count;
res.result.list.forEach(item => {
if(item.type == 4) {
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
item.question.isResolve=item.isResolve;
item.question.title=item.title;
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
item.cases.title=item.title;
item.cases.summary=item.content;
item.cases.id=item.id;
}
});
this.dataList.list = res.result.list;
} else {
this.$message.error(res.message);
}
})
},
// 案例
findCase(){
let { pageIndex, pageSize } = this.caseList;
let query = { pageIndex, pageSize, keyword: this.keyword, isRead: this.isRead };
apiShares.myMeCaseList(query).then(res=>{
if(res.status == 200) {
this.caseList.count = res.result.count;
this.caseList.list = res.result.list;
} else {
this.$message.error(res.message);
}
})
},
//问答数据查询
findQa() {
let { pageIndex, pageSize } = this.qaList;
@@ -345,6 +446,12 @@ export default {
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'case') {
this.findCase();
}
if (this.tabName == 'all') {
this.findAll();
}
}
},
mounted() {
@@ -357,6 +464,12 @@ export default {
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'case') {
this.findCase();
}
if (this.tabName == 'all') {
this.findAll();
}
}
};

View File

@@ -290,30 +290,15 @@ computed: {
},
jumpRouter(item) {
if(item.isOld){
// this.$router.push({path:'/course/boeframe',query:{id:item.id,type:item.courseType}})
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.courseType}`,'_self' )
} else {
if(item.courseType==10){
// let routeData = this.$router.resolve({ path: '/course/micro?id='+item.courseId}); // , query: { id: 1 }
// console.log(routeData,'routeData');
// window.open(this.webBaseUrl+routeData.href, '_blank');
// window.open('/pc/course/micro?id='+item.courseId,'_blank')
this.$router.push({path:'/course/micro',query:{id:item.courseId}})
}
if(item.courseType==20){
if(item.progress>0 && item.progress<100) {
//let routeData = this.$router.resolve({ path: '/course/studyindex?id='+item.courseId}); // , query: { id: 1 }
// console.log(routeData,'routeData');
//window.open(this.webBaseUrl+routeData.href, '_blank');
// window.open('/pc/course/studyindex?id='+item.courseId,'_blank')
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
} else {
//let routeData = this.$router.resolve({ path: '/course/detail?id='+item.courseId}); // , query: { id: 1 }
// console.log(routeData,'routeData');
// window.open(this.webBaseUrl+routeData.href, '_blank');
// window.open('/pc/course/detail?id='+item.courseId,'_blank')
this.$router.push({path:'/course/detail',query:{id:item.courseId}})
}
}

View File

@@ -26,7 +26,7 @@
</div>
<div v-if="resType == 10" style="position: relative;">
<videoPlayer id="myVideoPlayer" v-if="resType == 10"
:src="fileBaseUrl+curriculumData.url"
:src="blobUrl"
@onPlayerPlaying="onPlayerPlaying"
:initTime="contentData.lastStudyTime"
@onPlayerPlay="onPlayerPlay"
@@ -132,13 +132,17 @@
</div>
<div style="display: flex;justify-content: flex-end;cursor: pointer;">
<div @click="praiseContent">
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
</el-tooltip>
{{ courseInfo.praises }}
</div>
<div style="margin-left: 15px;" @click="treadContent">
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')" />
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')" />
</el-tooltip>
{{ courseInfo.trampleCount }}
</div>
</div>
@@ -258,6 +262,8 @@ import audioPlayer from '@/components/AudioPlayer/index.vue';
import videoPlayer from '@/components/VideoPlayer/index.vue';
import hyperLink from '@/components/Course/hyperLink.vue';
import studyUtil from '@/utils/study.js';
import {encrypt} from '@/utils/jsencrypt.js';
import cookies from 'vue-cookies'
export default {
name: 'ucStudyIndex',
components: { courseImage, portalHeader, portalFooter, hyperLink, comments, homework, exam, interactBar, assess, pdfPreview, audioPlayer, videoPlayer },
@@ -286,7 +292,7 @@ export default {
totalContent: 0, //课程内容数量
pageCount: 0,
currentPage: 0,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl: this.$Constants.fileBaseUrl,
contentList: [],
sectionList: [],
teachers: [],
@@ -344,22 +350,21 @@ export default {
}
},
methods: {
createVideoBlob(url){
let $this=this;
let xhr = new XMLHttpRequest;
xhr.open("GET",url,true);
xhr.responseType = 'blob';
//xhr.onload只有 4 状态会触发
xhr.onreadystatechange = function() {
if (xhr.readyState==4 && xhr.status == 200) {//请求成功
//获取blob对象
let blob = xhr.response;
//获取blob对象地址并把值赋给容器
let urlObj = window.URL.createObjectURL(blob);
$this.blobUrl=urlObj;
}
};
xhr.send();
createPlayUrl(fid,u){
let nowDate=new Date();
let ctime=parseInt(nowDate.getTime()/1000);
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
//console.log(beforeUrl,'beforeUrl');
let urlSign=encodeURIComponent(encrypt(beforeUrl));
//console.log(urlSign,'urlSign');
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
//以下判断是为了区分本地环境和服务器环境
if(process.env.NODE_ENV == 'development'){
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
}else{
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
}
console.log(this.blobUrl,'this.blobUrl');
},
widthOpen(url) {
window.open(url, '_blank');
@@ -815,8 +820,8 @@ export default {
this.curriculumData.url = r.content;
}
//let url=process.env.VUE_APP_BASE_API+'/xboe/m/course/file/show?cf='+this.curriculumData.url;
let url=this.fileBaseUrl+this.curriculumData.url;
//this.createVideoBlob(url);
//let url=this.fileBaseUrl+this.curriculumData.url;
this.createPlayUrl(r.contentRefId,this.curriculumData.url);
} else if (r.contentType == 40) {
// if (r.content != '' && r.content.indexOf('.pdf') == -1) {
apiCourseFile.detail(r.contentRefId).then(cfrs => {

View File

@@ -36,9 +36,7 @@
<div class="uc-course-time">推送时间{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
</div>
<div class="uc-course-btns">
<!-- <a :href="item.type == 1 ? '/pc/course/recorded' : '/pc/course/micro'" target="_blank"> -->
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
<!-- </a> -->
</div>
</div>
<div style="height:150px; text-align: center; margin-top:57px;" >

View File

@@ -35,9 +35,10 @@
</el-tab-pane> -->
<el-tab-pane label="全部" name="all">
<div v-for="(item, index) in dataList.list">
<course-items v-if="item.objType==1" :items="[item]" @confirm="confirm"></course-items>
<article-items v-if="item.objType==2" @confirm="confirm" :items="[item]"></article-items>
<qa-items v-if="item.objType==4" :items="[item]" @confirm="confirm" :collect="true" :share="false" :remove="false" :edit="false"></qa-items>
<course-items v-if="item.type==1" :items="[item]" @confirm="confirm"></course-items>
<case-items v-if="item.type==3" @confirm="confirm" :items="[item]"></case-items>
<article-items v-if="item.type==2" @confirm="confirm" :items="[item]"></article-items>
<qa-items v-if="item.type==4" :items="[item]" @confirm="confirm" :collect="true" :share="false" :remove="false" :edit="false"></qa-items>
</div>
<!-- v-if="courseList.count>courseList.pageSize" -->
<div v-if="dataList.list.length > 0" style="text-align: center;margin-top:57px">
@@ -98,28 +99,30 @@
</div>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="案例" name="case">
<el-tab-pane label="案例" name="case">
<div>
<div style="padding-bottom: 10px;">
<div style="display: flex;justify-content:flex-start;">
<div style="padding: 0px 5px;"><el-input placeholder="关键词查询" v-model="caseList.title"></el-input></div>
<div style="padding: 0px 5px;"><el-button @click="findCase" icon="el-icon-search" type="primary" size="small">查询</el-button></div>
</div>
</div>
<case-items @confirm="confirm" :items="caseList.list"></case-items>
</div>
<div style="text-align: center;" v-if="caseList.count>caseList.pageSize">
<div style="text-align: center;margin-top:50px;" v-if="caseList.list.length > 0">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="caseList.pageIndex"
:page-sizes="[2, 4, 6, 8]"
:page-sizes="[10, 20, 30, 40]"
:page-size="caseList.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="caseList.count"
></el-pagination>
</div>
</el-tab-pane> -->
<div v-else>
<div v-if="caseList.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="文章" name="article">
<div>
<!-- <div style="padding-bottom: 10px;">
@@ -195,15 +198,16 @@
<script>
import articleItems from '@/components/Article/collectList.vue';
import courseItems from '@/components/Course/collectItem.vue';
// import caseItems from '@/components/Case/collectList.vue';
import caseItems from '@/components/Case/collectList.vue';
import qaItems from '@/components/Qa/favoritesQaList.vue';
import apiFavorite from '@/api/modules/favorites.js';
import apiUser from '@/api/system/user.js';
import apiCourse from "@/api/modules/coursePortal.js";
import courseImage from '@/components/Course/courseImage.vue';
import {cutFullName} from "@/utils/tools.js";
export default {
name: 'myShareIndex',
components: { articleItems, courseItems, qaItems, courseImage },
components: { articleItems, courseItems, qaItems, courseImage,caseItems },
data() {
return {
isSearh:false,
@@ -282,6 +286,7 @@ export default {
this.articleList.pageIndex = 1;
this.courseList.pageIndex = 1;
this.dataList.pageIndex = 1;
this.caseList.pageIndex = 1;
this.isSearh = true;
if (this.tabName == 'qa') {
this.findQa();
@@ -304,6 +309,7 @@ export default {
this.articleList.pageIndex = 1;
this.courseList.pageIndex = 1;
this.dataList.pageIndex = 1;
this.caseList.pageIndex = 1;
this.keyword = '';
this.isRead = '';
this.courseList.type = '';
@@ -313,7 +319,6 @@ export default {
},
//tab切换
changeTab(tab) {
if (tab.name == 'qa') {
this.findQa();
}
@@ -382,7 +387,7 @@ export default {
pageSize: this.dataList.pageSize,
keyword: this.keyword.trim()
};
apiFavorite.findAll(query).then(res=>{
apiFavorite.queryAll(query).then(res=>{
if(res.status==200){
this.dataList.count=res.result.count
if(res.result.length!=0){
@@ -391,7 +396,22 @@ export default {
item.avatar=''
item.name=''
item.orgInfo=''
courseIds.push(item.objId);
item.sex= null
courseIds.push(item.id);
if(item.type == 4) {
item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
item.question.isResolve=item.isResolve;
item.question.title=item.title;
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
item.cases.title=item.title;
item.cases.summary=item.content;
item.cases.id=item.id;
}
})
this.loadCouserTeacher(res.result.list,courseIds);
this.dataList.list = res.result.list;
@@ -411,6 +431,9 @@ export default {
if(item.objType==4){
ids.push(item.question.sysCreateAid)
}
if(item.type){
ids.push(item.authorId)
}
})
let noRepeatIds = [...new Set(ids)];
apiUser.getByIds(noRepeatIds).then(res => {
@@ -419,14 +442,22 @@ export default {
let obj={}
if(item.objType==2){
obj=res.result.find(author=>{
author.orgInfo=cutFullName(author.orgInfo,1);
return author.aid == item.sysCreateAid;
})
}
if(item.objType==4){
obj=res.result.find(author=>{
author.orgInfo=cutFullName(author.orgInfo,1);
return author.aid == item.question.sysCreateAid;
})
}
if(item.type != 1){
obj=res.result.find(author=>{
author.orgInfo=cutFullName(author.orgInfo,1);
return author.aid == item.authorId;
})
}
item=Object.assign(item, obj);
})
// this.dataList.list = list.map(item => {
@@ -490,9 +521,7 @@ export default {
findCase() {
let { pageIndex, pageSize } = this.caseList;
let query = { pageIndex, pageSize };
if (this.caseList.title) {
query.keyword = this.keyword.trim();
}
query.keyword = this.keyword.trim();
query.resolve = this.isRead;
apiFavorite.casePageList(query).then(res => {
if (res.status == 200) {
@@ -558,14 +587,14 @@ export default {
let ids;
ids = list.map((item, index) => {
// item.authorInfo = { aid: '', name: '', orgInfo: '', avater: '' };
return item.cases.sysCreateAid;
return item.cases.authorId;
});
let noRepeatIds = [...new Set(ids)];
apiUser.getByIds(noRepeatIds).then(res => {
if (res.status == 200) {
this.caseList.list = list.map(item => {
let obj = res.result.find(author => {
return author.aid == item.cases.sysCreateAid;
return author.aid == item.cases.authorId;
});
item = Object.assign(item, obj);
return item;
@@ -639,45 +668,13 @@ export default {
});
},
confirm(item) {
// let type;
// let id;
// console.log(item,"数据佛海")
// switch (this.tabName) {
// case 'course': {
// type = 1;
// id = item.objId;
// break;
// }
// case 'qa': {
// type = 4;
// id = item.question.id;
// break;
// }
// case 'case': {
// type = 3;
// id = item.cases.id;
// break;
// }
// case 'article': {
// type = 2;
// id = item.articleId;
// break;
// }
// case 'all': {
// type = item.objType;
// if(type==1){
// id = item.objId;
// }
// if(type==2){
// id = item.articleId;
// }
// if(type==4){
// id = item.question.id;
// }
// break;
// }
// }
apiFavorite.del(item.id).then(res => {
let id = '';
if(item.type){
id = item.favoriteId;
} else {
id = item.id;
}
apiFavorite.del(id).then(res => {
if (res.status == 200) {
this.$message.success('取消收藏成功');
if (this.tabName == 'qa') {

View File

@@ -110,10 +110,11 @@ module.exports = {
// 使用代理
// 172.16.6.175
// 114.115.162.187 测试环境
// 192.168.0.107 晋宇
proxy: {
'/systemapi': {
// 目标代理服务器地址
target: 'http://192.168.0.10:9090',
target: 'http://localhost:9090',
changeOrigin: true,
logLevel:'debug',
secure: false,