合并分支

This commit is contained in:
nisen
2023-08-01 17:37:08 +08:00
parent adc5ed7afb
commit cf5a7ee4f8
22 changed files with 3525 additions and 2139 deletions

BIN
public/images/courseBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -6,8 +6,8 @@ import ajax from '@/utils/xajax.js'
* orderField
* orderAsc
*/
const indexList = function(query) {
return ajax.post('/xboe/m/boe/cases/case-random', query);
const indexList = function (query) {
return ajax.post('/xboe/m/boe/cases/case-random', query);
}
/*
*案例分页搜索查询 是否推荐
@@ -19,9 +19,12 @@ const indexList = function(query) {
*@param(String) majorType 专业分类
* @param(String) majorDomain 专业领域
*/
const queryList = function(query) {
return ajax.post('/xboe/m/boe/cases/queryList', query);
}
const queryList = function (query) {
return ajax.post('/xboe/m/boe/cases/queryList', query);
}
const queryListV2 = function (query) {
return ajax.postJson('/xboe/m/boe/cases/queryListV2', query);
}
/* 案例分页搜索查询 是否置顶
*@param(String) keyWord 关键词
@param(Boolean) isTop 是否置顶 true或false
@@ -29,74 +32,74 @@ const queryList = function(query) {
*@param(String) majorType 专业分类
* @param(String) majorDomain 专业领域
*/
const isTopList = function(query) {
return ajax.post('/xboe/m/boe/cases/isTopList', query);
}
/* 设置置顶 取消置顶
@param(String) id
@param(Integer) isTop 是否置顶 0未置顶1已置顶
*/
const updateTop = function(id, isTop) {
return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`);
}
/* 删除案例
*param(String) id 案例的id
*/
const del = function(id) {
return ajax.get('/xboe/m/boe/cases/delete?id=' + id);
}
/*案例详情
@param(String) id 案例的id
@param(Boolean) addView 是否增加浏览量
*/
const detail = function(id,addView) {
let pars='id=' + id;
if(addView){
pars+='&addView='+addView
}
return ajax.get('/xboe/m/boe/cases/detail?'+pars);
}
/*推荐
*@param (String) id 案例的id
*@param (String) title 案例的标题
*@param (String) acceptAid 受众id
*@param (String) recommentThat 推荐说明
*/
const savaRecommend = function(data) {
return ajax.post('/xboe/m/boe/recommend/save', data);
}
/* 推荐列表
*没有参数
*/
const query = function() {
return ajax.get('/xboe/m/boe/recommend/query');
const isTopList = function (query) {
return ajax.post('/xboe/m/boe/cases/isTopList', query);
}
/* 设置置顶 取消置顶
@param(String) id
@param(Integer) isTop 是否置顶 0未置顶1已置顶
*/
const updateTop = function (id, isTop) {
return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`);
}
/* 删除案例
*param(String) id 案例的id
*/
const del = function (id) {
return ajax.get('/xboe/m/boe/cases/delete?id=' + id);
}
/*案例详情
@param(String) id 案例的id
@param(Boolean) addView 是否增加浏览量
*/
const detail = function (id, addView) {
let pars = 'id=' + id;
if (addView) {
pars += '&addView=' + addView
}
return ajax.get('/xboe/m/boe/cases/detail?' + pars);
}
/*推荐
*@param (String) id 案例的id
*@param (String) title 案例的标题
*@param (String) acceptAid 受众id
*@param (String) recommentThat 推荐说明
*/
const savaRecommend = function (data) {
return ajax.post('/xboe/m/boe/recommend/save', data);
}
/* 推荐列表
*没有参数
*/
const query = function () {
return ajax.get('/xboe/m/boe/recommend/query');
}
/*
*作者排行榜
@param pageSize 长度
*/
const usernameList= function(pageSize){
return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`);
const usernameList = function (pageSize) {
return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`);
}
/*
人气榜
@param pageSize 长度
*/
const queryPraises=function(pageSize){
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
const queryPraises = function (pageSize) {
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
}
/*
好评榜
@param pageSize 长度
*/
const queryComments=function(pageSize){
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
const queryComments = function (pageSize) {
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
}
/**
* 专业分类
* */
const majorTypes=function (){
const majorTypes = function () {
return ajax.get('/xboe/m/boe/cases/majorTypes');
}
/**
@@ -115,8 +118,8 @@ const details = function (id, addView) {
* ids
* }
* */
const ids=function (data){
return ajax.postJson('/xboe/m/boe/cases/ids',data);
const ids = function (data) {
return ajax.postJson('/xboe/m/boe/cases/ids', data);
}
/**
@@ -126,8 +129,8 @@ const ids=function (data){
* excellent true、设置 false 取消
* }
* */
const excellent=function(data){
return ajax.post('/xboe/m/boe/cases/excellent',data)
const excellent = function (data) {
return ajax.post('/xboe/m/boe/cases/excellent', data)
}
@@ -138,8 +141,8 @@ const excellent=function(data){
* pageSize
* }
* */
const mylist=function (query){
return ajax.post('/xboe/m/boe/cases/mylist',query);
const mylist = function (query) {
return ajax.post('/xboe/m/boe/cases/mylist', query);
}
/**
@@ -149,26 +152,56 @@ const mylist=function (query){
* pageSize
* }
* */
const exportCases=function (query){
return ajax.post('/xboe/m/boe/cases/export',query);
const exportCases = function (query) {
return ajax.post('/xboe/m/boe/cases/export', query);
}
/**
* 导出案例后加的
* */
const exports = function (query) {
return ajax.post('/xboe/m/boe/cases/exportCase', query, { responseType: 'blob' });
}
/**
* @param
* 记录查看开始时间
* caseRecommendId读取的案例的id
*/
const startReadTimer = (caseRecommendId) => ajax.get(`/xboe/m/boe/cases/recommend/startRead?caseRecommendId=${caseRecommendId}`);
/**
* @param
* 记录查看结束时间
* data{
* caseId [案例id]
* browseDuration [浏览时间秒]
* }
*/
const endReadTimer = (data)=> ajax.postJson('/xboe/m/boe/cases/recommend/recordBrowseDuration',data)
export default {
indexList,
queryList,
isTopList,
updateTop,
del,
detail,
savaRecommend,
query,
usernameList,
queryPraises,
queryComments,
indexList,
queryList,
queryListV2,
isTopList,
updateTop,
del,
detail,
savaRecommend,
query,
usernameList,
queryPraises,
queryComments,
majorTypes,
details,
ids,
excellent,
mylist,
exportCases
exportCases,
exports,
startReadTimer,
endReadTimer
}

View File

@@ -40,8 +40,8 @@ const pageList = function(query) {
* 课程的详细信息
* @param {String} id
*/
const detail = function(id,preview) {
return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}`);
const detail = function(id,preview,course=false) {
return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}&course=${course}`);
}
/**

View File

@@ -8,6 +8,12 @@ import ajax from '@/utils/xajax.js'
const cases=function (type){
return ajax.get('/xboe/portal/index/cases?type='+type);
}
/**
* 首页新改的推荐案例
* */
const newCases=function (){
return ajax.get('/xboe/portal/index/casesV2');
}
/**
* 首页文章排行榜
@@ -45,5 +51,6 @@ export default {
articleViews,
qaAnswers,
articlelist,
courselist
courselist,
newCases
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

View File

@@ -341,6 +341,54 @@ body {margin: 0px;padding: 0px;}
width: 400px;
}
//课程三级弹窗popperClass的样式
.coursePopperClass{
padding: 0;
margin-left: 0 !important;
box-shadow: 1px 1px 35px 1px rgba(118,136,166,0.21);
border-radius: 4px;
.course-three-box{
min-height: 268px;
.course-three-box-title{
font-size: 16px;
font-weight: 600;
height: 68px;
line-height: 80px;
background: linear-gradient(180deg, rgba(78,166,255,0.2) 0%,
rgba(78,166,255,0) 100%);padding-left: 40px;
}
.course-three{
border-radius: 6px;
border: 1px solid #C7CBD2;display: inline-block;
height: 40px;
line-height: 40px;
padding: 0 20px;
margin-right: 20px;
cursor: pointer;
&:hover{
color: #387DF7;
border: 1px solid #387DF7 !important;
}
}
.threeActive{
color: #387DF7;
border: 1px solid #387DF7 !important;
}
}
}
// 标题提示
.keywordInfo-class{
background-color: #F2F5F7 !important;
min-width: 54px;
padding: 0 10px;
line-height: 26px;
text-align: center;
border: 1px solid #387DF7;
color: #387DF7 !important;
}
//以下是多分辨率的控制,注意,只是一些样式的高度,宽度,大小控制,非大小控制不要在这里写
@media screen and (max-width: 1366px){
@@ -384,11 +432,18 @@ body {margin: 0px;padding: 0px;}
position: absolute;
right:20px;
bottom: 78px;
}
}
.course-image-box {
width:218;
height: 122px;
}
.course-img-box{
height: 122px;
}
.keywordInfo{
width: 40px !important;
margin-right: 2px;
}
}
.course-tit{
float: none !important;
@@ -401,6 +456,13 @@ body {margin: 0px;padding: 0px;}
height: 45px !important;
}
// 课程导航
.nav{
width: 478px;
}
.upload{
width: 300px;
}
}
@media screen and (max-width: 1680px) and (min-width:1367px){
@@ -429,7 +491,21 @@ body {margin: 0px;padding: 0px;}
width: 278px;
height: 156px;
}
.course-img-box{
height: 156px;
}
.keywordInfo{
width: 45px !important;
margin-right: 13px;
}
}
// 课程导航
.nav{
width: 654px;
}
.upload{
width: 350px;
}
}
@media screen and (max-width: 1920px) and (min-width: 1681px){
@@ -458,6 +534,19 @@ body {margin: 0px;padding: 0px;}
width: 346px;
height: 192px;
}
.course-img-box{
height: 191px;
}
.keywordInfo{
margin-right: 20px;
}
}
// 课程导航
.nav{
width: 828px;
}
.upload{
width: 400px;
}
}
@@ -488,6 +577,19 @@ body {margin: 0px;padding: 0px;}
width: 340px;
height: 191px;
}
.course-img-box{
height: 191px;
}
.keywordInfo{
margin-right: 33px;
}
}
// 课程导航
.nav{
width: 974px;
}
.upload{
width: 410px;
}
}

View File

@@ -132,8 +132,10 @@
<el-option v-for="item in tagList" :key="item.id" :label="item.name" :value="item.name"> </el-option>
</el-select>
</el-form-item> -->
<el-form-item v-if="!weike.onlyRequired" label="关键字">
<el-input v-model="courseInfo.keywords" maxlength="100" show-word-limit placeholder="请输入关键字(限100字以内)"></el-input>
<el-form-item v-if="!weike.onlyRequired" label="关键字">
<!-- <el-input v-model="courseInfo.keywords" maxlength="100" show-word-limit placeholder="请输入关键字(限100字以内)"></el-input> -->
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">{{ tag }}</el-tag>
</el-form-item>
<el-form-item v-if="!weike.onlyRequired" label="观看设置">
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="1">PC端可见</el-radio>
@@ -251,6 +253,12 @@
</el-select> -->
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">
{{ tag }}
</el-tag>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="资源归属" required>
@@ -421,6 +429,8 @@ export default {
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
data() {
return {
keywords:'',//关键字的定义
tips:[],
addOrder:1,
checked:false,
courseInfoFormCheckedShow:false,
@@ -571,6 +581,17 @@ export default {
this.loadUserGroup();
},
methods: {
// 关键字的更改
changeKeywords(option){
if(option.target.value){
this.tips.push(option.target.value)
}
this.keywords = ''
},
//关闭关键字
closeKeywordsTag(item,index){
this.tips.splice(index, 1);
},
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;
},
@@ -744,6 +765,8 @@ export default {
this.teacherValues = [];
this.courseCrowds=[];
this.courseCoverurl = '';
// 关键字的清空
this.tips=[];
if (!editData) {
//console.log("新建课程?");
@@ -862,6 +885,7 @@ export default {
this.courseCoverurl = '';
this.courseInfo.coverImg = '';
},
//获取课程信息
async getDetail(id) {
this.curCourseId = id;
this.orgName='';
@@ -873,6 +897,10 @@ export default {
if(result.course.visible==''){
result.course.visible=true;
}
// 给关键字赋值
if(result.course.keywords){
this.tips = result.course.keywords.split(',') || []
}
this.courseInfo = result.course;
this.checked = false;
this.contentInfo.list = result.contents;
@@ -1156,6 +1184,7 @@ export default {
if (this.showTags.length > 0) {
this.courseInfo.tags = this.showTags.join();
}
this.courseInfo.keywords = this.tips.join(',') || ''
//检查输入是否合法
//if(!this.requireSaveCourse){
// this.curStepIndex=2;//转到第二步处理

View File

@@ -16,6 +16,7 @@
<span style="color: #333333;font-weight: 600;font-size: 16px;">{{userName}}</span>
<span class="author-text" v-if="userInfo && userInfo!=''"> {{userInfo}} </span>
</div>
<slot />
</div>
</template>
<script>

View File

@@ -35,7 +35,7 @@
<span class="interact-bar-value"> {{ data.praises? data.praises:0}}</span>
</div>
<div v-if="favorites" @click="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<div v-if="favorites" @click.stop="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="收藏" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon v-if="courseExclusive" style="font-size: 32px;margin-right: 0;" :icon-class="isFavorite?'collectedCourse':'collectionCourse'"></svg-icon>
<svg-icon v-else style="margin-right: 0;" :style="{'font-size':(size+2)+'px'}" :icon-class="isFavorite?'scactive2':'xihuan'"></svg-icon>

View File

@@ -76,9 +76,11 @@
<div class="person-action-item">
<el-badge class="person-action-index" :value="userMsg" :hidden="userMsg == 0">
<el-tooltip content="消息" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip">
<el-link type="primary" :href="`${webBaseUrl}/message/center/index`" :underline="false">
<svg-icon :style="{color:textColor}" style="margin-right: 0;font-size:22px;" icon-class="messfff"></svg-icon>
</el-link>
<!-- <el-link type="primary" :href="`${webBaseUrl}/message/center/index`" :underline="false"> -->
<router-link to="/message/center/index">
<svg-icon :style="{color:textColor}" style="margin-right: 0;font-size:22px;" icon-class="messfff"></svg-icon>
</router-link>
<!-- </el-link> -->
</el-tooltip>
</el-badge>
</div>
@@ -91,7 +93,7 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item><router-link to="/index">学员</router-link></el-dropdown-item>
<el-dropdown-item v-if="identity == 2 || identity == 5" @click.native="setCurIdentity(2)"><router-link to="/need/waitaudit">教师</router-link></el-dropdown-item>
<el-dropdown-item v-if="identity == 3 || identity == 5" ><a :href="managerPath+'/learningpath'">管理员</a></el-dropdown-item>
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><router-link to="/course/manage">管理员</router-link></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -274,7 +276,8 @@ export default {
} else if (this.goSearch == 2) {
if(this.keyword==''){return;}
// 案例
location.href=`${this.webBaseUrl}/case?keyword=${this.keyword}`;
// location.href=`${this.webBaseUrl}/case?keyword=${this.keyword}`;
this.$router.push(`/case?keyword=${this.keyword}`)
//window.open(`${this.webBaseUrl}/case?keyword=${this.keyword}`);
} else if (this.goSearch == 3) {
if(this.keyword==''){return;}
@@ -301,7 +304,7 @@ export default {
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
//location.href = this.webBaseUrl + '/login';
sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存
sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存
location.href = process.env.VUE_APP_LOGIN_URL;
});
})

View File

@@ -38,11 +38,11 @@
:biBarrageXml="biBarrageXml"
/>
<!-- 加载动画 -->
<div v-show="isShowLoading" class="player-loading" @click="videoDom.focus({preventScroll: true})">
<div v-show="isShowLoading && isCrowd" class="player-loading" @click="videoDom.focus({preventScroll: true})">
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
</div>
<!-- 控制栏 -->
<div v-show="!isShowLoading" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
<div v-show="!isShowLoading && isCrowd" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
<div v-show="isShowVolumeHint" class="player-volumeHint">
<span class="player-volumeHint-text">当前音量:{{volumePercent}}%</span>
</div>
@@ -264,6 +264,10 @@ export default {
isDrag:{
type: Boolean,
default: null,
},
isCrowd:{
type: Boolean,
default: true,
}
},
data() {

View File

@@ -23,7 +23,7 @@ export const cutFullName = (fullName,num) => {
};
/**截取机构名称路径namePath最后两段不包含第一个 */
export const cutOrgNamePath = (namePath) => {
export const cutOrgNamePath = (namePath,firstOrder = -1) => {
let newName=namePath;
//debugger
if(newName){
@@ -36,6 +36,9 @@ export const cutOrgNamePath = (namePath) => {
if(!newName){
newName=names[0]
}
if(firstOrder == 0){
newName=names[0]
}
}
// if(names.length>1){

View File

@@ -324,7 +324,7 @@
<div class="xcontent2-main xindex-main">
<div class="modules-title">
<span class="modules-text">推荐案例</span>
<span class="quyer-tag">
<!-- <span class="quyer-tag">
<a
:class="caseList.orderType == 2 ? 'current' : ''"
@click="changeCaseOrder(2)"
@@ -335,7 +335,7 @@
@click="changeCaseOrder(1)"
>最新</a
>
</span>
</span> -->
<span class="more">
<router-link to="/case">查看更多>></router-link>
</span>
@@ -1337,12 +1337,15 @@ export default {
// }
// })
},
changeCaseOrder(val) {
this.caseList.orderType = val;
this.getCaseData();
},
// 去掉案例的推荐课程
// changeCaseOrder(val) {
// this.caseList.orderType = val;
// this.getCaseData();
// },
//案例的参数等着需要改
getCaseData() {
apiIndex.cases(this.caseList.orderType).then((res) => {
apiIndex.newCases().then((res) => {
if (res.status == 200) {
if (res.result.length > 0) {
let userIds = [];

View File

@@ -9,18 +9,27 @@
<div style="display: flex;justify-content:flex-start;">
<!-- <div style="padding: 0px 5px;"><el-cascader placeholder="资源归属" clearable v-model="params.type" :options="typeList"></el-cascader></div> -->
<div style="padding: 0px 5px;">
<el-select v-model="queryObj.isTop" style="width: 110px;" clearable placeholder="置顶">
<el-select v-model="queryObj.isTop" style="width: 110px;" clearable placeholder="全部">
<el-option label="已置顶" :value="true"></el-option>
<el-option label="未置顶" :value="false"></el-option>
</el-select>
</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(1)" icon="el-icon-search" type="primary" >搜索</el-button>
<el-select v-model="queryObj.excellent" style="width: 120px;" clearable placeholder="全部">
<el-option label="最佳案例" :value="true"></el-option>
<el-option label="非最佳案例" :value="false"></el-option>
</el-select>
</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;flex: 1;display: flex;align-items: center;">
<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>
<el-checkbox style="margin-left:10px" v-model="queryObj.excellent" @change="getData()">优秀案例</el-checkbox>
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
<!-- <el-checkbox style="margin-left:10px" v-model="queryObj.excellent" @change="getData()">优秀案例</el-checkbox> -->
<div style="flex: 1; display: flex; justify-content: flex-end;align-items:baseline;">
<el-button type="primary" icon="el-icon-document" @click="importList">导出</el-button>
</div>
</div>
</div>
</div>
@@ -34,60 +43,61 @@
</el-table-column> -->
<el-table-column label="作者" width="80px" prop="authorName"></el-table-column>
<el-table-column label="密级" width="80px" prop="confidentialityLevel"></el-table-column>
<el-table-column label="浏览次数" width="80px" prop="views"></el-table-column>
<el-table-column label="导入时间" prop="sysCreateTime"></el-table-column>
<el-table-column label="设置优秀时间" prop="excellentTime"></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 && scope.row.confidentialityLevel=='内部'" type="text" @click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>
<el-button style="margin:0 5px" v-if="scope.row.isTop && scope.row.confidentialityLevel=='内部'" type="text" @click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
<el-button type="text" icon="el-icon-medal" v-if="scope.row.filePath && scope.row.confidentialityLevel=='内部'" ><span @click="cancal(scope.row)" v-if="scope.row.excellent">取消优秀</span><span @click="open(scope.row)" v-else>设为优秀</span></el-button>
<el-button style="margin:0 5px" type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
<el-button style="margin:0 5px" v-if="!scope.row.isTop && scope.row.confidentialityLevel == '内部'" type="text"
@click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>
<el-button style="margin:0 5px" v-if="scope.row.isTop && scope.row.confidentialityLevel == '内部'" type="text"
@click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
<el-button type="text" icon="el-icon-medal"
v-if="scope.row.filePath && scope.row.confidentialityLevel == '内部'"><span @click="cancal(scope.row)"
v-if="scope.row.excellent">取消最佳</span><span @click="open(scope.row)" v-else>最佳案例</span></el-button>
<el-button style="margin:0 5px" type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 50px;">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryObj.pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="queryObj.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="count"
></el-pagination>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="queryObj.pageIndex" :page-sizes="[10, 20, 30, 40]" :page-size="queryObj.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="count"></el-pagination>
</div>
<div style="height: 100px;"></div>
<el-dialog title="推荐案例" :visible.sync="shareShow" :close-on-click-modal="false" width="500px" custom-class="g-dialog">
<div style="padding-right: 30px;">
<el-form label-width="100px" @submit.native.prevent >
<el-form-item label="推荐案例">{{shareItemData.title}}</el-form-item>
<el-form-item label="姓名或工号">
<el-input v-model="shareInfo.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-item>
<el-checkbox-group v-model="shareUsers">
<el-checkbox v-for="(u,uidx) in shareInfo.list" :key="uidx" :label="u.aid">{{u.name+'('+u.orgInfo+')'}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- <div style="padding: 0 20px 20px 20px;">
<el-form label-width="100px" @submit.native.prevent>
<el-form-item label="推荐案例">{{ shareItemData.title }}</el-form-item>
<el-form-item label="姓名或工号">
<el-input v-model="shareInfo.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-item>
<el-checkbox-group v-model="shareUsers">
<el-checkbox v-for="(u, uidx) in shareInfo.list" :key="uidx" :label="u.aid">{{ u.name + '(' + u.orgInfo +
')' }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- <div style="padding: 0 20px 20px 20px;">
</div> -->
<el-form-item label="推荐说明"><el-input type="textarea" :rows="3" v-model="shareItemData.recommentThat" placeholder="备注说明"></el-input></el-form-item>
</el-form>
<el-form-item label="推荐说明"><el-input type="textarea" :rows="3" v-model="shareItemData.recommentThat"
placeholder="备注说明"></el-input></el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="shareShow = false"> </el-button>
<el-button @click="submitWork" type="primary">提交推荐任务</el-button>
</span>
</el-dialog>
<el-dialog title="推荐记录" :visible.sync="recommend.dlgShow" :close-on-click-modal="false" width="900px" custom-class="g-dialog">
<el-dialog title="推荐记录" :visible.sync="recommend.dlgShow" :close-on-click-modal="false" width="900px"
custom-class="g-dialog">
<div>
<el-table stripe style="width: 100%" :data="recommend.records">
<el-table-column prop="caseName" label="案例名称"></el-table-column>
@@ -121,27 +131,27 @@ export default {
name: 'articleItems',
data() {
return {
excellent:false,
excellent: false,
queryObj: {
pageIndex:1,
pageSize:10,
isTop:'',
excellent:'',
pageIndex: 1,
pageSize: 10,
isTop: '',
excellent: '',
}, //查询对象
caseList: [], //案例列表
count:0,
count: 0,
recommend: {
dlgShow: false,
records: []
},
shareInfo:{
name:'',
load:false,
list:[]
shareInfo: {
name: '',
load: false,
list: []
},
shareShow: false,
shareUsers:[],
shareItemData:{},
shareUsers: [],
shareItemData: {},
timeout: null,
params: { name: '', type: '' },
typeList: [],
@@ -163,66 +173,81 @@ export default {
this.getData();
},
methods: {
// 导出
importList() {
apiCase.exports(this.queryObj).then(res => {
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res], { type: 'application/vnd.ms-excel;charset=UTF-8' }); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
console.log(link.href);
link.setAttribute("download", "案例.xls");
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href)
document.body.removeChild(link);
})
},
// getSearch(){
// this.queryObj.excellent = !this.queryObj.excellent;
// this.getData();
// },
cancal(item){
this.$confirm('是否取消该案例为优秀案例?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.excellent = false;
let data = {
id:item.id,
excellent:this.excellent
cancal(item) {
this.$confirm('确定要取消设置为最佳案例?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.excellent = false;
let data = {
id: item.id,
excellent: this.excellent
}
console.log(data)
apiCase.excellent(data).then(res => {
if (res.status == 200) {
this.$message({
type: 'success',
message: '取消成功!'
});
this.getData()
}
console.log(data)
apiCase.excellent(data).then(res => {
if(res.status == 200){
this.$message({
type: 'success',
message: '取消成功!'
});
this.getData()
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已撤回取消推荐'
});
})
}).catch(() => {
this.$message({
type: 'info',
message: '已撤回取消推荐'
});
});
},
open(item) {
this.$confirm('是否设置此案例为优秀案例吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.excellent = true;
let data = {
id:item.id,
excellent:this.excellent
this.$confirm('你确认要设置为最佳案例吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.excellent = true;
let data = {
id: item.id,
excellent: this.excellent
}
console.log(data)
apiCase.excellent(data).then(res => {
if (res.status == 200) {
this.$message({
type: 'success',
message: '设置优秀案例成功!'
});
this.getData()
}
console.log(data)
apiCase.excellent(data).then(res => {
if(res.status == 200){
this.$message({
type: 'success',
message: '设置优秀案例成功!'
});
this.getData()
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消优秀案例设置'
});
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消优秀案例设置'
});
},
});
},
inputOn() {
this.$forceUpdate();
},
@@ -235,20 +260,20 @@ export default {
},
//获取案例列表数据
getData(num) {
if(num === 1) {
this.queryObj.pageIndex = 1;
}
if(!this.queryObj.excellent){
this.queryObj.excellent='';
if (num === 1) {
this.queryObj.pageIndex = 1;
}
// if (!this.queryObj.excellent) {
// this.queryObj.excellent = '';
// }
apiCase.isTopList(this.queryObj).then(res => {
if (res.status == 200) {
this.count=res.result.count
this.caseList = res.result.list;
} else {
this.$message({type: 'error', message: '查询数据失败'});
}
})
if (res.status == 200) {
this.count = res.result.count
this.caseList = res.result.list;
} else {
this.$message({ type: 'error', message: '查询数据失败' });
}
})
.catch(err => {
this.$message({
type: 'error',
@@ -257,54 +282,69 @@ export default {
});
},
handleSizeChange(val) {
this.queryObj.pageSize=val;
this.queryObj.pageSize = val;
this.getData(1);
},
handleCurrentChange(val) {
this.queryObj.pageIndex=val;
this.queryObj.pageIndex = val;
this.getData();
},
//暂时因为没数据,先做添加
showRecords() {
this.recommend.dlgShow = true;
apiCase.query().then(res=>{
if(res.status==200){
this.recommend.records=res.result
apiCase.query().then(res => {
if (res.status == 200) {
this.recommend.records = res.result
}
}).catch(err=>{
}).catch(err => {
this.$message({
type:'error',
message:'获取数据失败'
type: 'error',
message: '获取数据失败'
})
})
},
setTop(item) {
let msg,isTop;
if (item.isTop==1) {
msg = '取消置顶';
isTop=0
let msg, isTop, btnMsg;
if (item.isTop == 1) {
msg = '确认要取消置顶此案例吗?';
btnMsg = "取消成功"
isTop = 0
} else {
msg = '置顶成功';
isTop=1
msg = '你确认要置顶此案例吗?';
btnMsg = "设置置顶成功"
isTop = 1
}
apiCase.updateTop(item.id,isTop).then(res=>{
if(res.status==200){
this.$message.success(msg);
this.getData()
}else{
this.$message.error("操作失败")
}
})
},
delItem(item) {
this.$confirm('您确定要删除所选内容吗?', '删除提示', {
this.$confirm(msg, '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
apiCase.del(item.id).then(res=>{
if(res.status==200){
apiCase.updateTop(item.id, isTop).then(res => {
if (res.status == 200) {
this.$message({
type: 'success',
message: btnMsg
});
this.getData()
} else {
this.$message.error("操作失败")
}
})
})
.catch(() => {
this.$message({ type: 'info', message: '取消操作', offset: 50 });
});
},
delItem(item) {
this.$confirm('您确定要删除这条案例吗?', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
apiCase.del(item.id).then(res => {
if (res.status == 200) {
this.$message.success("删除成功");
this.getData()
}
@@ -316,67 +356,67 @@ export default {
},
//添加推荐
shareItem(item) {
this.shareItemData={...item}
this.shareItemData = { ...item }
this.shareShow = true;
},
submitWork(){
if(this.shareUsers.length==0){
submitWork() {
if (this.shareUsers.length == 0) {
this.$message.error('请选择分享人');
return;
}
let {title,recommentThat,id}=this.shareItemData
let {aid:acceptAid}=this.shareInfo.list[0]
let queryData={
title,recommentThat,acceptAid,id
let { title, recommentThat, id } = this.shareItemData
let { aid: acceptAid } = this.shareInfo.list[0]
let queryData = {
title, recommentThat, acceptAid, id
}
//暂时只针对个人分享,所以暂时只传一条,没有传数组
apiCase.savaRecommend(queryData).then(res=>{
if(res.status==200){
apiCase.savaRecommend(queryData).then(res => {
if (res.status == 200) {
this.$message.success("分享成功")
this.shareShow = false;
}else{
this.shareShow = false;
} else {
this.$message.error("分享失败")
}
}).catch(err=>{
}).catch(err => {
this.$message.error("分享失败")
})
// let {id,title,acceptAid,recommentThat}=item
// apiCase.savaRecommend()
},
keyupEnter(){
this.findUser();
return false;
keyupEnter() {
this.findUser();
return false;
},
findUser(){
this.shareInfo.load=false;
this.shareInfo.list=[];
this.shareUsers=[];
var name=this.shareInfo.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.shareInfo.list.push(rs.result);
}
this.shareInfo.load=true;
}else{
this.$message.error('查询用户失败');
}
})
}else{
// console.log("非数字");
apiUser.findByName(name).then(rs=>{
if(rs.status==200){
this.shareInfo.list=rs.result;
this.shareInfo.load=true;
}else{
this.$message.error('查询用户失败');
}
})
}
findUser() {
this.shareInfo.load = false;
this.shareInfo.list = [];
this.shareUsers = [];
var name = this.shareInfo.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.shareInfo.list.push(rs.result);
}
this.shareInfo.load = true;
} else {
this.$message.error('查询用户失败');
}
})
} else {
// console.log("非数字");
apiUser.findByName(name).then(rs => {
if (rs.status == 200) {
this.shareInfo.list = rs.result;
this.shareInfo.load = true;
} else {
this.$message.error('查询用户失败');
}
})
}
},
setEssence(item, idx) {
@@ -415,12 +455,12 @@ export default {
};
},
viewTopic(data) {
if(data.confidentialityLevel=='内部'){
this.$router.push({path:'/case/detail',query:{id:data.id}})
}else{
if (data.confidentialityLevel == '内部') {
this.$router.push({ path: '/case/detail', query: { id: data.id } })
} else {
this.$message.warning("非内部密级案例不能查看");
}
}
}
};
@@ -432,16 +472,19 @@ export default {
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 {
margin: 5px 0;
border: 1px solid #dddddd;
@@ -454,6 +497,7 @@ export default {
font-weight: 400;
height: 40px;
line-height: 40px;
.article-info-date {
width: 150px;
height: 40px;
@@ -461,21 +505,26 @@ export default {
float: right;
font-weight: 200;
color: #999999;
i {
margin-right: 5px;
}
}
}
.article-info-summary {
height: 65px;
color: #999999;
}
.article-info-tools {
height: 30px;
.article-info-tools-auth {
float: left;
font-size: 13px;
color: #999999;
img {
margin-right: 10px;
width: 30px;
@@ -484,14 +533,17 @@ export default {
vertical-align: middle;
}
}
.article-info-tools-btns {
float: right;
.article-info-tools-btn {
margin: 0 0 0 15px;
}
}
}
}
.case-row-btn {
line-height: 25px;
@@ -500,8 +552,9 @@ export default {
padding: 3px 20px;
}
}
.el-form{
.el-form-item{
.el-form {
.el-form-item {
margin-bottom: 10px;
}
}

View File

@@ -90,6 +90,11 @@
<span v-if="scope.row.sysType3 !=''">/{{sysTypeName(scope.row.sysType3)}}</span>
</template>
</el-table-column>
<el-table-column label="关键字" :show-overflow-tooltip="true" prop="name" width="200px">
<template slot-scope="scope">
{{ scope.row.keywords }}
</template>
</el-table-column>
<!-- <el-table-column label="资源归属" sortable prop="author" width="240px">
<template slot-scope="scope">
<span>{{resOwnerName(scope.row.resOwner1)}}</span>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@
</div>
<div v-else class="score-no">未评分</div>
</div>
<div class="btn-div" style="height:30px;margin-top: 15px;">
<div class="btn-div" v-if="isCrowd" style="height:30px;margin-top: 15px;">
<el-button v-if="stuStusts == 0" type="primary" @click="startSigningUp()" >开始学习</el-button>
<el-button v-if="stuStusts == 1" type="primary" @click="jumpJearning">{{btnName}}</el-button>
</div>
@@ -69,14 +69,14 @@
<el-col :span="18">
<el-card :body-style="{ padding: '0px' }" class="info" style="margin-top: 10px;">
<el-tabs v-model="activeName">
<el-tab-pane label="课程简介" name="first">
<el-tab-pane label="内容简介" name="first">
<div>
<div class="content"><img src="@/assets/images/icon/remark-iocn.png" alt="" srcset="">目标人群<div class="content-text">{{courseInfo.forUsers}}</div></div>
<div class="content"><img src="@/assets/images/icon/remark-iocn.png" alt="" srcset="">课程价值<div class="content-text">{{courseInfo.value}}</div></div>
<div class="content"><img src="@/assets/images/icon/remark-iocn.png" alt="" srcset="">详细介绍<div class="content-text" v-html="courseInfo.summary"></div></div>
</div>
</el-tab-pane>
<el-tab-pane label="大纲" name="second" v-if="courseInfo.type==20">
<el-tab-pane label="课程速览" name="second" v-if="courseInfo.type==20">
<div class="category" v-for="(item) in catalogTree" :key="item.id">
<div class="node">
<div class="title">{{item.section.name}}</div>
@@ -92,7 +92,7 @@
</div>
<div style="height: 30px;"></div>
</el-tab-pane>
<el-tab-pane label="大纲" name="second" v-if="courseInfo.type==10">
<el-tab-pane label="课程速览" name="second" v-if="courseInfo.type==10">
<div class="category" v-for="(item) in contentList" :key="item.id">
<div class="node">
<div class="title">{{item.contentName}}</div>
@@ -120,7 +120,8 @@
</div>
<div class="teacher-info">
<div class="teacher-name">{{ item.teacherName }}</div>
<div class="teacher-remark" v-html="item.remark"></div>
<!-- <div class="teacher-remark" v-html="item.remark"></div> -->
<div class="teacher-remark">{{ cutOrgNamePath(item.orgInfo,0) }} </div>
</div>
</div>
</div>
@@ -144,7 +145,7 @@ import apiCourse from '@/api/modules/course.js';
import apiUser from '@/api/system/user.js';
import courseStudy from '@/api/modules/courseStudy.js';
import apiCoursePortal from '@/api/modules/coursePortal.js';
import { courseType,getType,toScore,userAvatarText} from '@/utils/tools.js';
import { courseType,getType,toScore,userAvatarText,cutOrgNamePath } from '@/utils/tools.js';
import courseImage from "@/components/Course/courseImage.vue"
export default {
name: "atticle",
@@ -154,6 +155,7 @@ export default {
},
data() {
return {
cutOrgNamePath,
userAvatarText,
getType,
showQrcode: false,
@@ -174,6 +176,7 @@ export default {
commentsTtoal:0,
toUsers:[],//可以@的用户列表
btnName:'开始学习',
isCrowd:false, //根据受众展示不展示
};
},
mounted() {
@@ -185,13 +188,17 @@ export default {
let $this=this;
//页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id,false).then(rs=>{
apiCoursePortal.detail(id,false,true).then(rs=>{
if(rs.status==200){
if(!rs.result.course.enabled || rs.result.course.deleted){
$this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
return;
}
if(!rs.result.isCrowd){
$this.$message.error('您没有查看该课程的权限');
}
this.isCrowd = rs.result.isCrowd
if(rs.result.teachers && rs.result.teachers.length > 0){
let userIds=[];
@@ -347,6 +354,7 @@ export default {
item.avatar=this.fileBaseUrl + author.avatar;
}
item.sex = author.sex;
item.orgInfo = author.orgInfo
return true;
}else{
return false;
@@ -363,7 +371,7 @@ export default {
};
</script>
<style scoped lang="scss" scoped>
<style scoped lang="scss">
::v-deep .teacher .teacher-avator .teacher-text {
background: none;
border: none;
@@ -400,6 +408,7 @@ export default {
}
.course-title{
position: relative;
height: 90px;
display: flex;
justify-content: space-between;
@@ -411,7 +420,6 @@ export default {
margin-bottom: 10px;
word-break:break-all;
}
position: relative;
// .course-title-right{
// position: absolute;
// right: 0;

File diff suppressed because it is too large Load Diff

View File

@@ -17,15 +17,16 @@
</el-radio-group> -->
</div>
<div>
<el-button style="margin-left: 25px;" :disabled="disabledReadAll" :class="{navbut:!disabledReadAll}" type="text" @click="isReadChooseList">设置已读</el-button>
<el-button style="margin-left: 25px;" :disabled="disabledReadAll" :class="{ navbut: !disabledReadAll }"
type="text" @click="isReadChooseList">设置已读</el-button>
<el-button class="navbut" type="text" @click="delChooseList">删除所选</el-button>
</div>
</div>
<div style="background-color: #FFFFFF;min-height: 600px;">
<p style="line-height:30px;text-align: center;">{{showMessage}}</p>
<p style="line-height:30px;text-align: center;">{{ showMessage }}</p>
<!-- 临时增加上线一段时间后删除 开始
<!-- 临时增加上线一段时间后删除 开始
<div class="msg-list">
<a href="javascript:void(0);">
<div class="msg-top">
@@ -45,16 +46,16 @@
<div class="msg-list">
<a href="javascript:void(0);">
<div class="msg-top">
<div>
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
<span @click="showMsgDg()">系统消息</span>
<div class="msg-top">
<div>
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
<span @click="showMsgDg()">系统消息</span>
</div>
</div>
</div>
<div class="msg-body" @click="dialogMsgVisible=true">
<div class="msg-body-content">新功能说明</div>
</div>
<div class="msg-time">2022-12-30 11:23:33</div>
<div class="msg-body" @click="dialogMsgVisible = true">
<div class="msg-body-content">新功能说明</div>
</div>
<div class="msg-time">2022-12-30 11:23:33</div>
</a>
</div>
@@ -78,40 +79,43 @@
<div class="msg-list" v-for="(item, index) in data" :key="index">
<div class="msg-list" v-for="(item, index) in data" :key="index">
<div class="msg-top">
<div>
<span style="padding-right: 10px;"><el-checkbox v-model="item.checked" @change="setCheckAll(item)"></el-checkbox></span>
<span v-if="!item.isRead" style="font-size:12px;padding:5px 7px; border-radius: 2px;background: #FF6562;color: #fff;margin-right: 5px">未读</span>
<span v-else style="font-size:14px;padding:5px 7px; background: #eee; border-radius: 2px; color: #666666;margin-right: 5px">已读</span>
<span style="padding-right: 10px;"><el-checkbox v-model="item.checked"
@change="setCheckAll(item)"></el-checkbox></span>
<span v-if="!item.isRead"
style="font-size:12px;padding:5px 7px; border-radius: 2px;background: #FF6562;color: #fff;margin-right: 5px">未读</span>
<span v-else
style="font-size:14px;padding:5px 7px; background: #eee; border-radius: 2px; color: #666666;margin-right: 5px">已读</span>
<!-- <a :href="returnRouter(item)"> -->
<span style="cursor: pointer;" @click="returnRouter(item)">{{ item.title }}</span>
<span style="cursor: pointer;" @click="returnRouter(item)">{{ item.title }}</span>
</div>
</div>
<div class="msg-body">
<!-- <a :href="returnRouter(item)"> -->
<div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
<div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-else>{{item.tip}}</div>
<!-- </a> -->
<div class="msg-body-but">
<el-button type="danger" plain @click="delItem(item)">删除</el-button>
<!-- <a :href="returnRouter(item)"> -->
<div v-if="item.refType !== '99'">
<div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-if="item.content">
{{ item.tip }}-{{ item.content }}</div>
<div style="cursor: pointer;" @click="returnRouter(item)" class="msg-body-content" v-else>{{ item.tip }}
</div>
</div>
<div v-else :class="!item.isRead ? 'infoActive' : ''" style="cursor: pointer;" @click="goRouter(item)"
class="msg-body-content">管理员{{ item.acceptName }}向您推荐了案例{{ item.content }}点击查看>>>
</div>
<!-- </a> -->
<div v-if="item.refType !== '99'" class="msg-body-but">
<el-button type="danger" plain @click="delItem(item)">删除</el-button>
</div>
</div>
<div class="msg-time">{{ item.msgTime }}</div>
</div>
</div>
<div style="text-align: center;margin-top: 50px" v-if="total > queryData.pageSize">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryData.pageIndex"
:page-sizes="[2, 4, 6, 8]"
:page-size="queryData.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="queryData.pageIndex" :page-sizes="[2, 4, 6, 8]" :page-size="queryData.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
<!-- <div class="pagination-div" v-if="queryData.pageIndex < totalPages"><span class="pag-text" @click="loadMore()">加载更多</span></div> -->
</div>
@@ -122,21 +126,21 @@
<!-- 对话框 -->
<el-dialog :visible.sync="dialogMsgVisible" title="新功能说明" width="30%" append-to-body>
<div>
教师端<br/>
1支持个人授课记录/案例记录查询<br/>
2支持个人修改/完善教师介绍并在个人主页中展示<br/>
<br/>
<br/>
管理员端<br/>
1新增学习路径图功能<br/>
2新增学习项目功能<br/>
3新增课程库功能<br/>
4升级案例管理设置优秀案例等<br/>
5升级考试功能试题及提干支持图片修改已发布考试的部分信息等)<br/>
6课件支持 Scorm 格式<br/>
及上述功能配套的学员端功能<br/>
<br/>
<br/>
教师端<br />
1支持个人授课记录/案例记录查询<br />
2支持个人修改/完善教师介绍并在个人主页中展示<br />
<br />
<br />
管理员端<br />
1新增学习路径图功能<br />
2新增学习项目功能<br />
3新增课程库功能<br />
4升级案例管理设置优秀案例等<br />
5升级考试功能试题及提干支持图片修改已发布考试的部分信息等)<br />
6课件支持 Scorm 格式<br />
及上述功能配套的学员端功能<br />
<br />
<br />
我们会在1月份提供线上操作培训及详细的使用手册便于大家熟悉和使用新增功能
</div>
<template #footer>
@@ -147,13 +151,6 @@
</el-dialog>
</div>
</template>
<script>
@@ -162,6 +159,7 @@ import portalHeader from '@/components/PortalHeader.vue';
import portalFooter from '@/components/PortalFooter.vue';
import GuideBox from '@/components/Portal/guideBox.vue'
import apiMessage from '@/api/system/message.js';
import apiCase from '@/api/modules/cases.js';
export default {
name: 'answer',
components: {
@@ -174,21 +172,21 @@ export default {
},
data() {
return {
dialogMsgVisible:false,
dialogMsgVisible: false,
queryData: {
pageIndex: 1,
pageSize: 6,
isRead: null
},
disabledReadAll:false,
disabledReadAll: false,
total: 0,
checkAll: false,
data: [],
totalPages: '',
checkedIds:[],
checkedIds: [],
isIndeterminate: false,
url: '',
showMessage:'暂无消息'
showMessage: '暂无消息'
};
},
mounted() {
@@ -209,10 +207,10 @@ export default {
this.isReadChooseList();
},
methods: {
showMsgDg(){
showMsgDg() {
this.dialogMsgVisible = true;
},
jumResearch(){
jumResearch() {
this.$router.push('/user/research');
// return this.webBaseUrl + '/src/views/user/myResearch.vue';
},
@@ -223,27 +221,27 @@ export default {
this.checkAll = false;
this.isIndeterminate = false;
}
this.disabledReadAll=false;
this.disabledReadAll = false;
apiMessage.list(this.queryData).then(res => {
if (res.status == 200) {
this.totalPages = res.result.totalPages;
this.total = res.result.count;
let allRead=true;
let allRead = true;
res.result.list.forEach(item => {
let name = this.filterContent(item.content);
let num = name.slice(1,name.length);
let num = name.slice(1, name.length);
item.tip = name[0];
item.content = num.join('-');
item.checked = false;
if(!item.isRead){
allRead=false;
if (!item.isRead) {
allRead = false;
}
this.data.push(item);
});
if(allRead){
this.disabledReadAll=true;
if (allRead) {
this.disabledReadAll = true;
}
if(this.total == 0){this.showMessage = '暂无消息';}
if (this.total == 0) { this.showMessage = '暂无消息'; }
this.showMessage = this.total <= 0 ? '暂无消息' : '';
} else {
this.$message.error('获取数据失败');
@@ -275,9 +273,9 @@ export default {
// }
// },
setCheckAll(item) {
if(item.checked){
if (item.checked) {
this.checkedIds.push(item.id);
}else{
} else {
let obj = this.checkedIds.indexOf(item.id);
this.checkedIds.splice(obj, 1)
}
@@ -293,6 +291,7 @@ export default {
this.checkAll = item.checked;
}
},
//改变已读状态的操作
isReadChooseList() {
if (this.data.length == 0) return;
@@ -302,8 +301,8 @@ export default {
ids.push(this.data[i].id);
}
}
if(this.checkedIds.length>0){
apiMessage.updateIsRead(this.checkedIds).then(res => {
if (this.checkedIds.length > 0) {
apiMessage.updateIsRead(this.checkedIds).then(res => {
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
this.queryMessage(true)
@@ -313,7 +312,7 @@ export default {
return;
}
if(this.checkAll){
if (this.checkAll) {
apiMessage.updateIsRead(ids).then(res => {
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
@@ -324,11 +323,17 @@ export default {
}
},
delChooseList() {
// 全选的时候不能删除案例
if (this.data.some((item) => item.refType == '99' && item.checked)) {
this.$message.error('推荐案例不能删除,请重新选择');
return;
}
let list = this.data.filter(item => item.checked).map(v => v.id);
if (list.length == 0) {
this.$message.error('请先选择要删除的消息');
return;
}
this.$confirm('您确定要删除所选消息吗?', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -367,42 +372,59 @@ export default {
},
// 弹出新功能引导页弹窗事件(临时)
showGuideDialog(){
showGuideDialog() {
this.$refs.guide.guideCollection = true;
},
// 点击案例
async goRouter(item) {
console.log(item);
apiMessage.updateIsRead([item.id]).then(res => {
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
item.isRead = true;
}
});
//需要跳转
if (item.pageUrl && item.pageUrl.length > 10) {
await apiCase.startReadTimer(item.refId)
this.$router.push('/case/detail?id=' + item.pageParams);
} else {
this.$router.push('/case?recommendId=' + item.refId);
}
},
// 跳转详情事件11
returnRouter(item) {
apiMessage.updateIsRead([item.id]).then(res => {
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
// this.queryMessage(true)
item.isRead = true;
}
if (res.status == 200) {
this.$store.dispatch('refrashMsg');
// this.queryMessage(true)
item.isRead = true;
}
});
if(item.pageUrl && item.pageUrl.length>10){
if (item.pageUrl && item.pageUrl.length > 10) {
location.href = item.pageUrl;
}else{
if(item.pageType && item.pageParams){
if(item.pageType==1){
this.$router.push('/course/studyindex?id='+ item.pageParams);
}else if(item.pageType==2){
this.$router.push('/article/detail?id='+ item.pageParams);
}else if(item.pageType==3){
this.$router.push('/case/detail?id='+ item.pageParams);
}else if(item.pageType==4){
this.$router.push('/qa/answer?id='+ item.pageParams);
}
}else{
if (item.refType == 2) {
this.$router.push('/article/detail?id='+ item.refId);
}else if(item.refType==3){
this.$router.push('/case/detail?id='+ item.refId);
}else if (item.refType == 4||item.refType == 5) {
this.$router.push('/qa/answer?id='+ item.refId);
} else if (item.refType == 1){
this.$router.push('/course/studyindex?id='+ item.refId);
}
} else {
if (item.pageType && item.pageParams) {
if (item.pageType == 1) {
this.$router.push('/course/studyindex?id=' + item.pageParams);
} else if (item.pageType == 2) {
this.$router.push('/article/detail?id=' + item.pageParams);
} else if (item.pageType == 3) {
this.$router.push('/case/detail?id=' + item.pageParams);
} else if (item.pageType == 4) {
this.$router.push('/qa/answer?id=' + item.pageParams);
}
} else {
if (item.refType == 2) {
this.$router.push('/article/detail?id=' + item.refId);
} else if (item.refType == 3) {
this.$router.push('/case/detail?id=' + item.refId);
} else if (item.refType == 4 || item.refType == 5) {
this.$router.push('/qa/answer?id=' + item.refId);
} else if (item.refType == 1) {
this.$router.push('/course/studyindex?id=' + item.refId);
}
}
}
@@ -413,7 +435,11 @@ export default {
</script>
<style lang="scss" scoped>
.navbut{
.infoActive {
color: #0078FC !important;
}
.navbut {
width: 110px;
height: 30px;
border-radius: 2px;
@@ -421,8 +447,9 @@ export default {
text-align: center;
border: 1px solid #0078FC;
padding: 0;
color: #0078FC ;
color: #0078FC;
}
.msg-nav {
display: flex;
// justify-content: space-between;
@@ -431,62 +458,72 @@ export default {
background-color: #ffffff;
padding: 5px 10px;
}
.msg-list {
border-bottom: 1px solid rgb(237, 237, 237);
margin-top: 10px;
line-height: 26px;
background-color: #ffffff;
padding: 5px 10px;
&:first-of-type {
padding-top: 15px;
}
.msg-top {
display: flex;
justify-content: space-between;
line-height: 30px;
}
.msg-body {
padding: 10px 10px 10px 25px;
display: flex;
width: 100%;
.msg-body-content{
.msg-body-content {
flex: 1;
word-break:break-all;
word-break: break-all;
color: #727272;
a:hover {
color: #409eff;
}
}
.msg-body-but{
.msg-body-but {
margin-left: auto;
button{
width: 88px;
height: 32px;
background-color: #fff;
border-radius: 16px;
padding: 0;
color: #F52F3E;
line-height: 32px;
text-align: center;
border: 1px solid #F52F3E;
button {
width: 88px;
height: 32px;
background-color: #fff;
border-radius: 16px;
padding: 0;
color: #F52F3E;
line-height: 32px;
text-align: center;
border: 1px solid #F52F3E;
}
button:hover{
background-color: rgba(255,101,98,0.13);
color: #F52F3E;
button:hover {
background-color: rgba(255, 101, 98, 0.13);
color: #F52F3E;
}
}
}
.msg-time {
color: #a5a5a5;
font-size: 14px;
padding-left: 25px;
}
}
.messageList {
> p {
>p {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgb(219, 219, 219);
@@ -494,9 +531,11 @@ export default {
margin: 0;
align-items: center;
}
.messageItem:not(:first-child) {
padding-top: 10px;
}
.messageItem {
// width: 100%;
padding-bottom: 10px;
@@ -504,12 +543,15 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.el-checkbox {
margin-right: 5px;
}
.el-button {
margin-left: auto;
}
// margin-bottom: 10px;
p {
margin: 0;
@@ -517,24 +559,29 @@ export default {
justify-content: space-between;
align-items: center;
}
p:first-of-type {
> span {
>span {
display: flex;
justify-content: flex-start;
align-items: center;
span:first-of-type {
font-size: 12px;
}
}
> span:last-of-type {
>span:last-of-type {
font-size: 14px;
color: #b7b7b7;
margin-left: 5px;
}
}
p:last-of-type {
font-size: 14px;
text-indent: 3em;
span:last-of-type {
font-size: 14px;
color: #b7b7b7;
@@ -542,6 +589,7 @@ export default {
}
}
}
.pagination-div {
cursor: pointer;
}

View File

@@ -30,7 +30,7 @@
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" :src="blobUrl" @onPlayerPlaying="onPlayerPlaying"
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
@onPlayerEnded="onPlayerEnded"></videoPlayer>
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd"></videoPlayer>
<div class="player-box" v-if="playerBoxShow">
<div class="player-praise" style="cursor: pointer;">
<div @click="praiseContent">
@@ -200,7 +200,7 @@
<div class="course-info">
<div style="background-color: #fff;">
<div class="course-info-tab">
<div @click="coutab(1)" :class="courestab == 1? 'course-info-tab-active' : ''">课程介绍<span class=""></span> </div>
<div @click="coutab(1)" :class="courestab == 1? 'course-info-tab-active' : ''">内容简介<span class=""></span> </div>
<div @click="coutab(2)" :class="courestab == 2? 'course-info-tab-active' : ''">课程评论<span class=""></span> </div>
<div @click="coutab(3)" :class="courestab == 3? 'course-info-tab-active' : ''">课程笔记<span class=""></span> </div>
</div>
@@ -240,9 +240,10 @@
<div class="teacher-info">
<div class="teacher-name">
<span> {{ item.teacherName }}</span>
<span style="font-size: 12px; color:#666666 ;">( {{cutOrgNamePath(item.authorInfo.orgInfo)}} )</span>
<!-- <span style="font-size: 12px; color:#666666 ;">( {{cutOrgNamePath(item.authorInfo.orgInfo)}} )</span> -->
</div>
<div class="teacher-remark" v-html="item.authorInfo.sign"></div>
<!-- <div class="teacher-remark" v-html="item.authorInfo.sign"></div> -->
<div class="teacher-remark">{{cutOrgNamePath(item.authorInfo.orgInfo,0)}}</div>
</div>
<div style="padding-top:15px;width:70px;">
<followButton :auto="true" size="small" :aid="item.teacherId"></followButton>
@@ -319,6 +320,7 @@
},
data() {
return {
isCrowd:false,
cutOrgNamePath,
scormUrl:'',//当前播放的scormUrl
loading:false,
@@ -692,6 +694,10 @@
})
},
showRes(r, i, index) { //i:子节下标index:章下标
// 无权限查看不能点击
if(!this.isCrowd){
return
}
if (i != undefined && i!=-1 && index != undefined && r.status < 9) {
if (this.courseInfo.orderStudy) {
//判断上个是否学完
@@ -1132,6 +1138,7 @@
this.finishStudyItem();
}
},
// 获取数据信息
loadData() {
let $this=this;
apiStudy.studyIndex(this.courseId).then(rs => {
@@ -1149,6 +1156,11 @@
$this.tab=2;
//console.log('内容只有一个');
}
if(!rs.result.isCrowd){
$this.$message.error('您没有查看该课程的权限');
}
// 是否播放
this.isCrowd = rs.result.isCrowd
if (rs.result.course.type == 20) { //有目录课程
rs.result.sections.forEach(sec => {