Merge remote-tracking branch 'aly/master'
BIN
public/ad/dlg(1).png
Normal file
|
After Width: | Height: | Size: 302 KiB |
BIN
public/ad/dlg.png
Normal file
|
After Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 93 KiB |
BIN
public/images/bgimg/wfl.png
Normal file
|
After Width: | Height: | Size: 233 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 26 KiB |
@@ -4,6 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="pragram" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
BIN
public/template/test-question-template.xls
Normal file
@@ -61,10 +61,20 @@ const delLearning = function(ms_timeline_kid) {
|
||||
return ajax.post('/b1/system/user/ms-timeline-delete',{ms_timeline_kid});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户的kid,获取用户的受众权限
|
||||
*
|
||||
* @param {Object} kid
|
||||
*/
|
||||
const audience = function(kid) {
|
||||
return ajax.get('/b1/system/user/audience-by-user?userId='+kid);
|
||||
}
|
||||
|
||||
export default {
|
||||
myLearning,
|
||||
cmtaskList,
|
||||
reportList,
|
||||
courseList,
|
||||
delLearning
|
||||
delLearning,
|
||||
audience
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import ajax from '@/utils/xajax.js'
|
||||
|
||||
/**首页查询
|
||||
* pageSize
|
||||
* orderField
|
||||
* orderField
|
||||
* orderAsc
|
||||
*/
|
||||
const indexList = function(query) {
|
||||
@@ -12,7 +12,7 @@ const indexList = function(query) {
|
||||
/*
|
||||
*案例分页搜索查询 是否推荐
|
||||
*@param(String) keyWord 关键词
|
||||
*@param(String) orderField 需要排序的字段 不传默认是最新
|
||||
*@param(String) orderField 需要排序的字段 不传默认是最新
|
||||
*@param (boolean) orderAsc 升序还是倒叙
|
||||
*@param(Boolean) breCommend 是否推荐 true或者false
|
||||
*@param(String) orgDomain 组织机构
|
||||
@@ -80,19 +80,35 @@ const usernameList= function(pageSize){
|
||||
}
|
||||
/*
|
||||
人气榜
|
||||
@param pageSize 长度
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryPraises=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
|
||||
}
|
||||
/*
|
||||
好评榜
|
||||
@param pageSize 长度
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryComments=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业分类
|
||||
* */
|
||||
const majorTypes=function (){
|
||||
return ajax.get('/xboe/m/boe/cases/majorTypes');
|
||||
}
|
||||
/**
|
||||
* 详情新*/
|
||||
const details = function (id, addView) {
|
||||
let pars = 'id=' + id;
|
||||
if (addView) {
|
||||
pars += '&addView=' + addView
|
||||
}
|
||||
return ajax.get('/xboe/m/boe/cases/details?' + pars);
|
||||
}
|
||||
|
||||
export default {
|
||||
indexList,
|
||||
queryList,
|
||||
@@ -104,5 +120,7 @@ export default {
|
||||
query,
|
||||
usernameList,
|
||||
queryPraises,
|
||||
queryComments
|
||||
queryComments,
|
||||
majorTypes,
|
||||
details
|
||||
}
|
||||
|
||||
@@ -97,15 +97,14 @@ const delReply=function(data){
|
||||
return ajax.post('/xboe/m/comment/delete-reply',data);
|
||||
}
|
||||
|
||||
|
||||
export default{
|
||||
del,
|
||||
update,
|
||||
add,
|
||||
pagelist,
|
||||
pageQuery,
|
||||
reply,
|
||||
replyList,
|
||||
userReplyList,
|
||||
delReply
|
||||
reply,
|
||||
replyList,
|
||||
userReplyList,
|
||||
delReply,
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
/**
|
||||
* 查询指定条数的课程,用于首页提取
|
||||
* post 请求 查询指定条数的课程,用于首页提取
|
||||
* @param {Object} query
|
||||
* num:多少条记录
|
||||
* orderType:排序方式,1表最新,3表最热
|
||||
@@ -33,15 +33,15 @@ const list = function(query) {
|
||||
topOrder:true,置顶排序
|
||||
*/
|
||||
const pageList = function(query) {
|
||||
return ajax.post('/xboe/m/course/portal/pagelist', query);
|
||||
return ajax.post('/xboe/m/course/portal/pagelist-new', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 课程的详细信息
|
||||
* @param {String} id
|
||||
*/
|
||||
const detail = function(id) {
|
||||
return ajax.get('/xboe/m/course/portal/detail?id=' + id);
|
||||
const detail = function(id,preview) {
|
||||
return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,7 +78,9 @@ const getTeacherByCourseIDs = function(ids){
|
||||
const studyCounts=function(num){
|
||||
return ajax.get('/xboe/school/study/course/studyCounts?num='+num);
|
||||
}
|
||||
|
||||
const courseSearch=function(query){
|
||||
return ajax.post('/xboe/m/course/fulltext/search',query);
|
||||
}
|
||||
export default {
|
||||
list,
|
||||
pageList,
|
||||
@@ -86,5 +88,6 @@ export default {
|
||||
ranking,
|
||||
scorelist,
|
||||
getTeacherByCourseIDs,
|
||||
studyCounts
|
||||
studyCounts,
|
||||
courseSearch
|
||||
}
|
||||
|
||||
@@ -129,6 +129,11 @@ const downloadTemplate=function(){
|
||||
return ajax.get(requestParam);
|
||||
}
|
||||
|
||||
const userGroupIds=function() {
|
||||
return ajax.get('/xboe/usergroup/user-group-ids');
|
||||
}
|
||||
|
||||
|
||||
export default{
|
||||
list,
|
||||
findByName,
|
||||
@@ -139,5 +144,6 @@ export default{
|
||||
publish,
|
||||
del,
|
||||
downloadTemplate,
|
||||
userOrgs
|
||||
userOrgs,
|
||||
userGroupIds
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<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 || item.publishTime | timeFilter }}</span>
|
||||
<span>发布时间:{{ item.sysCreateTime || item.publishTime || item.favoritesTime | 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>
|
||||
|
||||
@@ -89,6 +89,8 @@ export default {
|
||||
apiArticle.detail(id,false).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.addForm = res.result;
|
||||
// this.addForm.content = res.result.content.trim();
|
||||
// console.log(this.addForm.content)
|
||||
if(this.addForm.coverurl){
|
||||
this.converImage = this.fileBaseUrl + this.addForm.coverurl;
|
||||
}
|
||||
@@ -137,6 +139,15 @@ export default {
|
||||
}
|
||||
this.loading=true;
|
||||
this.addForm.status = 2;
|
||||
// let content= this.addForm.content.replace(/<.*?>/ig,"");
|
||||
// let content= this.addForm.content.replace(/[^\u4E00-\u9FA5|\d|\a-zA-Z|\r\n\s,.?!,。?!<>…—&$=()-+/*{}[\]]|\r\n\s/g,"");
|
||||
if(this.addForm.content.trim() == ''){
|
||||
this.$message('您输入的内容为空,无法发布')
|
||||
type: 'warning'
|
||||
this.loading=false
|
||||
return
|
||||
}
|
||||
this.addForm.content=this.addForm.content.trim()
|
||||
apiArticle.save(this.addForm).then(res => {
|
||||
if (res.status == 200) {
|
||||
if(res.message=='服务处理成功'){
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="article-info-date" v-if="item.enabled == true">
|
||||
<div class="article-info-date">
|
||||
<el-button class="edit" @click.stop="editItem(item.id)" type="text" icon="el-icon-edit">编辑</el-button>
|
||||
<el-button class="del" @click.stop="delItem(item)" type="text" icon="el-icon-delete">删除</el-button>
|
||||
</div>
|
||||
@@ -78,12 +78,14 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
filters:{
|
||||
sysCreateTimeFilter(item){
|
||||
return item.split(' ')[0]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.items)
|
||||
},
|
||||
methods: {
|
||||
classFilter(status){
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<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>
|
||||
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"></authorInfo>
|
||||
<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> -->
|
||||
|
||||
@@ -567,7 +567,7 @@ export default {
|
||||
},
|
||||
getDetail() {
|
||||
let $this = this;
|
||||
apiCoursePortal.detail(this.id).then(rs => {
|
||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
this.teacherList = rs.result.teachers;
|
||||
|
||||
@@ -607,7 +607,7 @@ export default {
|
||||
this.courseInfo.coverImg = "";
|
||||
},
|
||||
getDetail() {
|
||||
apiCoursePortal.detail(this.id).then(rs => {
|
||||
apiCoursePortal.detail(this.id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
if(rs.result.course.coverImg !== '') {
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
import courseHomework from '@/components/Course/courseHomework.vue'
|
||||
import courseExam from '@/components/Course/courseExam.vue'
|
||||
import simplePaper from "@/components/Course/simpleTestPaper.vue";
|
||||
import WxEditor from "@/components/Editor/index.vue";
|
||||
import WxEditor from "@/components/Editor/indexCourse.vue";
|
||||
import fileUpload from '@/components/FileUpload/index.vue';
|
||||
import apiCourse from '../../api/modules/course.js';
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
@@ -547,7 +547,7 @@
|
||||
apiCourse.updateContentName({id:this.content.id,name:value}).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.log('更新名称失败:'+rs.message);
|
||||
}saveData
|
||||
}
|
||||
})
|
||||
},
|
||||
// 作业上传
|
||||
|
||||
143
src/components/Course/choice.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<div class="choice">
|
||||
<el-tag type="info"
|
||||
closable
|
||||
v-for="(item,index) in teacherValueList"
|
||||
:key="item.teacherId"
|
||||
@close="handleClose(item,index)">{{item.teacherName}}</el-tag>
|
||||
<el-input
|
||||
placeholder="请输入授课教师姓名"
|
||||
v-model="teacherValues"
|
||||
clearable>
|
||||
<el-button :loading="loading" slot="append" icon="el-icon-search" @click="remoteFindTeacher()"></el-button>
|
||||
</el-input>
|
||||
<div class="choice-box" v-if="teacherDownList.length>0">
|
||||
<ul>
|
||||
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + te.teacherCode}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <el-select
|
||||
style="width: 100%;"
|
||||
v-model="teacherValues"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
value-key="teacherId"
|
||||
ref="elSelect"
|
||||
reserve-keyword
|
||||
placeholder="请输入授课教师姓名"
|
||||
@change="changeTeachers"
|
||||
:remote-method="remoteFindTeacher"
|
||||
:loading="loading">
|
||||
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
|
||||
</el-select> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import apiTeacher from '../../api/modules/teacher.js';
|
||||
export default{
|
||||
name: 'choice',
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
props: {
|
||||
teacherValue:{
|
||||
type:Array,
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
teacherValueList:[],
|
||||
teacherValues:'',
|
||||
loading:false,
|
||||
teacherDownList:[],
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
teacherValue(val) {
|
||||
this.teacherValueList = val;
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods:{
|
||||
handleClose(item,index){
|
||||
this.teacherValueList.splice(index, 1);
|
||||
this.$emit('getTeacherList',this.teacherValueList);
|
||||
},
|
||||
changeTeachers(t) {
|
||||
if(t) {
|
||||
let isCan = this.teacherValueList.some(it=>it.teacherId == t.teacherId);
|
||||
if(isCan){
|
||||
this.teacherValues = '';
|
||||
this.teacherDownList = [];
|
||||
this.$message.warning('教师重复,请重新选择!')
|
||||
return;
|
||||
}
|
||||
this.teacherValueList.push(t);
|
||||
this.teacherDownList = [];
|
||||
this.teacherValues = '';
|
||||
this.$emit('getTeacherList',this.teacherValueList);
|
||||
}
|
||||
},
|
||||
// 教师列标,远程查询
|
||||
async remoteFindTeacher() {
|
||||
console.log("2222");
|
||||
if (this.teacherValues !== '') {
|
||||
this.loading = true;
|
||||
try {
|
||||
const { result, message, status } = await apiTeacher.findByName(this.teacherValues);
|
||||
this.loading = false;
|
||||
if (status === 200) {
|
||||
let list = [];
|
||||
result.forEach(item => {
|
||||
list.push({
|
||||
teacherId: item.id,
|
||||
teacherName: item.name,
|
||||
teacherCode: item.code
|
||||
});
|
||||
});
|
||||
this.teacherDownList = list;
|
||||
} else {
|
||||
this.$message.error('查询教师信息失败:' + message);
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
}
|
||||
} else {
|
||||
this.teacherDownList = [];
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.choice{
|
||||
position: relative;
|
||||
.el-tag--info{
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.choice-box{
|
||||
position: absolute;
|
||||
// top: 40px;
|
||||
width: 280px;
|
||||
z-index: 999;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
box-shadow: 3px 3px 3px 3px #eee;
|
||||
ul{
|
||||
margin: 0;
|
||||
padding:0 10px;
|
||||
}
|
||||
li{
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -90,20 +90,22 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="授课教师" required>
|
||||
<!--授课老师默认是当前操作人-->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
style="width: 100%;"
|
||||
v-model="teacherValues"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
value-key="teacherId"
|
||||
ref="elSelect"
|
||||
reserve-keyword
|
||||
placeholder="请输入授课教师姓名"
|
||||
@change="changeTeachers"
|
||||
:remote-method="remoteFindTeacher"
|
||||
:loading="loading">
|
||||
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标人群" required>
|
||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||
@@ -233,20 +235,22 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="授课教师" required>
|
||||
<!--授课老师默认是当前操作人-->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
style="width: 100%;"
|
||||
v-model="teacherValues"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
value-key="teacherId"
|
||||
ref="elSelect"
|
||||
reserve-keyword
|
||||
placeholder="请输入授课教师姓名"
|
||||
@change="changeTeachers"
|
||||
:remote-method="remoteFindTeacher"
|
||||
:loading="loading">
|
||||
<el-option v-for="item in teacherDownList" :key="item.teacherId" :label="item.teacherName + item.teacherCode" :value="item"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
@@ -377,7 +381,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import agreement from '@/components/Portal/agreement.vue'
|
||||
import choice from '@/components/Course/choice.vue';
|
||||
import agreement from '@/components/Portal/agreement.vue';
|
||||
import weikeContent from '@/components/Course/weikeContent.vue';
|
||||
import catalogCourseware from '@/components/Course/catalogCourseware.vue';
|
||||
import imageUpload from '@/components/ImageUpload/index.vue';
|
||||
@@ -394,7 +399,7 @@ import { mapGetters, mapActions } from 'vuex';
|
||||
import filecloud from '@/components/FileCloud/index.vue';
|
||||
export default {
|
||||
props: {},
|
||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud},
|
||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice},
|
||||
data() {
|
||||
return {
|
||||
checked:false,
|
||||
@@ -528,6 +533,9 @@ export default {
|
||||
this.loadUserGroup();
|
||||
},
|
||||
methods: {
|
||||
getTeacherList(res) {
|
||||
this.teacherValues = res;
|
||||
},
|
||||
chooseFile(){
|
||||
this.dlgFileChoose.show=true;
|
||||
},
|
||||
@@ -538,7 +546,6 @@ export default {
|
||||
if(!img.path){
|
||||
return;
|
||||
}
|
||||
//console.log(img);
|
||||
this.dlgFileChoose.show=false;
|
||||
this.courseInfo.coverImg = img.path;
|
||||
this.courseCoverurl = this.fileUrl+img.path;
|
||||
@@ -800,8 +807,8 @@ export default {
|
||||
},
|
||||
changeTeachers(t) {
|
||||
//用于监听教师列表的选择变化
|
||||
//console.log(t);
|
||||
this.requireSaveCourse = true;
|
||||
this.$refs.elSelect.query = '';
|
||||
},
|
||||
formartTeacher() {},
|
||||
addNewSection() {
|
||||
@@ -1205,7 +1212,8 @@ export default {
|
||||
if (index == -1) {
|
||||
this.contentInfo.list.push(cc);
|
||||
} else {
|
||||
this.contentInfo.list[index] = cc;
|
||||
// this.contentInfo.list[index] = cc;
|
||||
this.contentInfo.list.splice(index,1,cc);
|
||||
}
|
||||
//计算顺序值
|
||||
},
|
||||
|
||||
@@ -521,7 +521,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import WxEditor from "@/components/Editor/index.vue";
|
||||
import WxEditor from "@/components/Editor/indexCourse.vue";
|
||||
import simplePaper from "@/components/Course/simpleTestPaper.vue";
|
||||
import FileUpload from '@/components/FileUpload/index.vue';
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
change(e) {
|
||||
let file = e.target.files[0]
|
||||
const formData = new FormData()
|
||||
console.log(file,'file');
|
||||
formData.append('file', file)
|
||||
upload(formData)
|
||||
.then(res => {
|
||||
@@ -185,6 +186,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.editor{
|
||||
min-height: 250px !important;
|
||||
}
|
||||
.ql-editor{
|
||||
min-height: 250px !important;
|
||||
}
|
||||
.ql-container{
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
420
src/components/Editor/indexCourse.vue
Normal file
@@ -0,0 +1,420 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="editor" ref="editor" :style="styles"></div>
|
||||
<input type="file" @change="change" id="upload" style="display:none;" />
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px">
|
||||
<div style="padding-top: 10px;min-height: 500px;">
|
||||
<div style="display: flex;justify-content: flex-start;">
|
||||
<div>
|
||||
<el-input maxlength="50" v-model="hasCWare.keyword" placeholder="名称"></el-input>
|
||||
</div>
|
||||
<div style="padding-left: 10px;">
|
||||
<el-button @click="getCoursewareList()" type="primary">搜索</el-button>
|
||||
<el-button @click="closeCWareFind()" type="primary">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;padding-top: 10px;">
|
||||
<el-table style="100%" :data="hasCWare.list" border stripe>
|
||||
<el-table-column label="类型" width="60" prop="author"><template slot-scope="scope">{{getType(scope.row.resType)}}</template></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="创建" prop="sysCreateBy" width="100"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="sysCreateTime" width="160"></el-table-column>
|
||||
<el-table-column label="选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="chooseHasCWare(scope.row)" type="primary">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="hasCWare.pageIndex"
|
||||
:page-sizes="[5, 10]"
|
||||
:page-size="hasCWare.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="hasCWare.count"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
import {getType} from '../../utils/tools.js';
|
||||
import { upload } from "@/api/tools.js"; //上传接口
|
||||
import Quill from "quill";
|
||||
import "quill/dist/quill.core.css";
|
||||
import "quill/dist/quill.snow.css";
|
||||
import "quill/dist/quill.bubble.css";
|
||||
import { ImageDrop } from 'quill-image-drop-module' // 图片拖动组件引用
|
||||
import ImageResize from 'quill-image-resize-module' // 图片缩放组件引用
|
||||
Quill.register('modules/imageDrop', ImageDrop) // 注册
|
||||
Quill.register('modules/imageResize', ImageResize) // 注册
|
||||
const Size = Quill.import('attributors/style/size')
|
||||
Size.whitelist = ['15px', '18px']
|
||||
Quill.register(Size, true);
|
||||
const Parchment = Quill.import("parchment");
|
||||
class lineHeightAttributor extends Parchment.Attributor.Style { }
|
||||
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"],
|
||||
["selectPicture"],
|
||||
]
|
||||
Quill.register({ 'formats/lineHeight': lineHeightStyle }, true)
|
||||
export default {
|
||||
name: "Editor",
|
||||
props: {
|
||||
/* 编辑器的内容 */
|
||||
value: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
toobar:{
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请输入长度大于100个字符的内容",
|
||||
},
|
||||
/* 高度 */
|
||||
height: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/* 最小高度 */
|
||||
minHeight: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
getType,
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
hasCWare:{
|
||||
list:[],
|
||||
keyword:'',
|
||||
pageSize:10,
|
||||
pageIndex:1,
|
||||
count:0,
|
||||
},
|
||||
dialogVisible:false,
|
||||
QuillObj: null,
|
||||
currentValue: "",
|
||||
options: {
|
||||
theme: "snow",
|
||||
bounds: document.body,
|
||||
debug: "warn",
|
||||
modules: {
|
||||
imageDrop: true, //图片拖拽
|
||||
imageResize: { //放大缩小
|
||||
displayStyles: {
|
||||
backgroundColor: "black",
|
||||
border: "none",
|
||||
color: "white"
|
||||
},
|
||||
modules: ["Resize", "DisplaySize", "Toolbar"]
|
||||
},
|
||||
// 工具栏配置
|
||||
toolbar: {
|
||||
container:this.toobar? toolbarOptions:[],
|
||||
handlers: {
|
||||
image: function(value) {
|
||||
if (value) {
|
||||
document.querySelector('#upload').click() // 劫持原来的图片点击按钮事件
|
||||
} else {
|
||||
this.QuillObj.format('image', false)
|
||||
}
|
||||
},
|
||||
lineheight: (value) => {
|
||||
if (value) {
|
||||
this.QuillObj.format("lineHeight", value)
|
||||
}
|
||||
},
|
||||
selectPicture: this.showHandle
|
||||
}
|
||||
}
|
||||
},
|
||||
placeholder: this.placeholder,
|
||||
readOnly: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
let style = {};
|
||||
if (this.minHeight) {
|
||||
style.minHeight = `${this.minHeight}px`;
|
||||
}
|
||||
if (this.height) {
|
||||
style.height = `${this.height}px`;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (val !== this.currentValue) {
|
||||
this.currentValue = val === null ? "" : val;
|
||||
if (this.QuillObj) {
|
||||
this.QuillObj.pasteHTML(this.currentValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.QuillObj = null;
|
||||
},
|
||||
methods: {
|
||||
closeCWareFind(){
|
||||
this.hasCWare.keyword = '';
|
||||
this.hasCWare.pageIndex = 1;
|
||||
this.getCoursewareList();
|
||||
},
|
||||
chooseHasCWare(row){// 选中图片
|
||||
let length = this.QuillObj.getSelection().index//光标位置
|
||||
// 插入图片 图片地址
|
||||
this.QuillObj.insertEmbed(length, 'image', this.fileBaseUrl + row.filePath)
|
||||
// 调整光标到最后
|
||||
this.QuillObj.setSelection(length + 1)//光标后移一位
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
showHandle(){
|
||||
this.getCoursewareList();
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
initButton(){
|
||||
const editorButton = document.querySelector('.ql-selectPicture')
|
||||
// editorButton.innerHTML = '<i class="el-icon-picture-outline" style="font-size:16px;height:14px"></i>'
|
||||
editorButton.innerHTML = '选择已有图片'
|
||||
|
||||
},
|
||||
getCoursewareList() {
|
||||
// resType: 文件类型,10视频,20音频,30图片, 40 文档,41表图文,50表scrom包,90表其它 图文41,连接52,作业60,考试61,评估62
|
||||
let data = {
|
||||
name: this.hasCWare.keyword,
|
||||
resType:30,
|
||||
pageSize: this.hasCWare.pageSize,
|
||||
pageIndex: this.hasCWare.pageIndex,
|
||||
self:true
|
||||
}
|
||||
apiCourseFile.pageList(data).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.hasCWare.list = res.result.list;
|
||||
this.hasCWare.count = res.result.count;
|
||||
if(res.result.count==0){
|
||||
this.$message.error("未找到符合条件的数据");
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.hasCWare.pageSize = val;
|
||||
this.hasCWare.pageIndex = 1;
|
||||
this.getCoursewareList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.hasCWare.pageIndex = val;
|
||||
this.getCoursewareList();
|
||||
},
|
||||
init() {
|
||||
const editor = this.$refs.editor;
|
||||
this.QuillObj = new Quill(editor, this.options);
|
||||
this.QuillObj.pasteHTML(this.currentValue);
|
||||
this.QuillObj.on("text-change", (delta, oldDelta, source) => {
|
||||
const html = this.$refs.editor.children[0].innerHTML;
|
||||
const text = this.QuillObj.getText();
|
||||
const quill = this.QuillObj;
|
||||
this.currentValue = html;
|
||||
this.$emit("input", html);
|
||||
this.$emit("on-change", { html, text, quill });
|
||||
});
|
||||
this.QuillObj.on("text-change", (delta, oldDelta, source) => {
|
||||
this.$emit("on-text-change", delta, oldDelta, source);
|
||||
});
|
||||
this.QuillObj.on("selection-change", (range, oldRange, source) => {
|
||||
this.$emit("on-selection-change", range, oldRange, source);
|
||||
});
|
||||
this.QuillObj.on("editor-change", (eventName, ...args) => {
|
||||
this.$emit("on-editor-change", eventName, ...args);
|
||||
});
|
||||
this.initButton();
|
||||
},
|
||||
change(e) {
|
||||
let file = e.target.files[0]
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
upload(formData)
|
||||
.then(res => {
|
||||
if (res.status === 200) {
|
||||
// const formdata = _.extend({}, this.formdata)
|
||||
let length = this.QuillObj.getSelection().index//光标位置
|
||||
// 插入图片 图片地址
|
||||
this.QuillObj.insertEmbed(length, 'image', res.result.httpPath)
|
||||
// 调整光标到最后
|
||||
this.QuillObj.setSelection(length + 1)//光标后移一位
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.editor{
|
||||
min-height: 250px !important;
|
||||
}
|
||||
.ql-editor{
|
||||
min-height: 250px !important;
|
||||
}
|
||||
.ql-selectPicture{
|
||||
width:90px !important;
|
||||
background:#ecf5ff !important;
|
||||
color:#588afc !important;
|
||||
font-size:12px !important;
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
.ql-container{
|
||||
font-size: 15px;
|
||||
}
|
||||
.editor, .ql-toolbar {
|
||||
white-space: pre-wrap!important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
.quill-img {
|
||||
display: none;
|
||||
}
|
||||
.ql-snow .ql-tooltip[data-mode="link"]::before {
|
||||
content: "请输入链接地址:";
|
||||
}
|
||||
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
||||
border-right: 0px;
|
||||
content: "保存";
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.ql-snow .ql-tooltip[data-mode="video"]::before {
|
||||
content: "请输入视频地址:";
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
||||
content: "15px";
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="15px"]::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="15px"]::before {
|
||||
content:"15px";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before {
|
||||
content: "18px";
|
||||
}
|
||||
|
||||
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
||||
content: "文本";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
|
||||
content: "标题1";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
|
||||
content: "标题2";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
|
||||
content: "标题3";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
|
||||
content: "标题4";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
|
||||
content: "标题5";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
|
||||
content: "标题6";
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
||||
content: "标准字体";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
|
||||
content: "衬线字体";
|
||||
}
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
|
||||
content: "等宽字体";
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label::before {
|
||||
content: '行高';
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
}
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="1"]::before,
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value="1"]::before {
|
||||
content: '1';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="1.5"]::before,
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value='1.5']::before {
|
||||
content: '1.5';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="2"]::before,
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value='2']::before {
|
||||
content: '2';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="3"]::before,
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value='3']::before {
|
||||
content: '3';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="4"]::before,
|
||||
.ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value='4']::before {
|
||||
content: '4';
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template><!--pdf连接分页处理-->
|
||||
<div class="pdf-perView" id="pdf-perView">
|
||||
<div class="pdf-perView" id="pdf-perView" v-loading="loading" element-loading-text="加载中">
|
||||
<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>
|
||||
@@ -26,23 +26,10 @@
|
||||
@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 v-if="totalPages>initNum && moreState == 1" class="pagination-div" style="margin-bottom: 20px;">
|
||||
<!-- <el-button type="primary" @click="clickMore()" >加载更多</el-button> -->
|
||||
<span class="pag-text" @click="clickMore()" style="cursor: pointer;">加载更多</span>
|
||||
</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>
|
||||
|
||||
@@ -67,6 +54,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
src: "",
|
||||
showPages: undefined,
|
||||
totalPages:0,
|
||||
@@ -82,6 +70,7 @@ export default {
|
||||
mounted() {
|
||||
// /case/demo.pdf
|
||||
if(this.filePath){
|
||||
this.loading = true;
|
||||
this.loadInitPdf(this.filePath);
|
||||
}
|
||||
window.addEventListener(
|
||||
@@ -132,6 +121,7 @@ export default {
|
||||
let loadingTask = pdf.createLoadingTask(url);
|
||||
this.src=loadingTask;
|
||||
loadingTask.promise.then((pdf) =>{
|
||||
this.loading = false;
|
||||
this.totalPages=pdf.numPages;
|
||||
if(pdf.numPages>this.initNum){
|
||||
this.showPages = this.initNum;
|
||||
@@ -139,6 +129,7 @@ export default {
|
||||
this.showPages =pdf.numPages;
|
||||
}
|
||||
}).catch((err) =>{
|
||||
this.loading = false;
|
||||
this.$message.error("加载内容失败,请联系管理员");
|
||||
});
|
||||
},
|
||||
@@ -160,15 +151,7 @@ export default {
|
||||
if(this.isscroll){
|
||||
this.showPages++
|
||||
this.moreState = 2;
|
||||
// this.debounce(this.loadInitPdf($this.filePath),5000);
|
||||
// this.debounce(,200000);
|
||||
}
|
||||
|
||||
// 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;
|
||||
@@ -254,7 +237,7 @@ export default {
|
||||
//border: 1px solid #dfdfdf;
|
||||
//background: #dfdfdf;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
|
||||
}
|
||||
/* ------------------- 进度条 ------------------- */
|
||||
//类名:隐藏到显示过程所需要的时间
|
||||
|
||||
@@ -15,14 +15,11 @@
|
||||
<div v-if="!onlyAvatar" style="padding-left: 5px;padding-top: 6px;font-size: 14px;color: #666666;">
|
||||
<span>{{userName}}</span>
|
||||
<span class="author-text" v-if="userInfo && userInfo!=''">({{userInfo}})</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
userAvatarText
|
||||
} from "@/utils/tools.js";
|
||||
import { userAvatarText } from "@/utils/tools.js";
|
||||
export default {
|
||||
props:{
|
||||
avatar:{
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
class="reference-tag"
|
||||
v-for="item in toUsers"
|
||||
:key="item.aid"
|
||||
:label="item.aid">{{ item.name }}</el-radio-button
|
||||
>
|
||||
:label="item.aid">{{ item.name }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +67,7 @@
|
||||
type="textarea"
|
||||
class="hideControl"
|
||||
show-word-limit
|
||||
v-model.trim="inputValue"
|
||||
v-model="inputValue"
|
||||
maxlength="800"
|
||||
placeholder="写下您的评论(800字以内),可以@案主哦~"
|
||||
></el-input>
|
||||
@@ -97,7 +96,7 @@
|
||||
<div class="comment-body" >
|
||||
<div class="comment-info" @mouseover="showButtons(com.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
{{displayAll(com)}}
|
||||
<span style="color: #303133" v-html="displayAll(com)"></span>
|
||||
<span v-if="com.content.length>170" @click="changeIsAll(com)">
|
||||
{{com.isAll?'收起':'全文'}}
|
||||
</span>
|
||||
@@ -138,7 +137,7 @@
|
||||
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-info" >
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
{{displayAll(reply)}}
|
||||
<span style="color: #303133" v-html="displayAll(reply)"></span>
|
||||
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
|
||||
{{reply.isAll?'收起':'全文'}}
|
||||
</span>
|
||||
@@ -488,7 +487,7 @@
|
||||
objType:this.objType,
|
||||
objId:this.objId,
|
||||
parentId:'-1',
|
||||
content:this.inputValue,
|
||||
content:this.inputValue.trim(),
|
||||
clevel:1,
|
||||
toAid:'',
|
||||
toAname:'',
|
||||
@@ -533,7 +532,9 @@
|
||||
},
|
||||
//展示全部
|
||||
displayAll(item) {
|
||||
//console.log(item,'item');
|
||||
let content = '';
|
||||
content = item.content.replace(/(\n){2,}/,'<br>');
|
||||
item.content = content;
|
||||
if(!item.isAll && item.content && item.content.length > 170) {
|
||||
return item.content.slice(0, 170) + "...";
|
||||
}
|
||||
@@ -554,6 +555,7 @@
|
||||
this.replyInfo.parentId='';
|
||||
},
|
||||
submitReply(comment){
|
||||
this.replyInfo.content = this.replyInfo.content.trim();
|
||||
if(this.replyInfo.content==''){
|
||||
return;
|
||||
}
|
||||
@@ -660,6 +662,7 @@
|
||||
this.replyShow=true;
|
||||
},
|
||||
submitDlgReply(){
|
||||
this.replyInfo.content = this.replyInfo.content.trim();
|
||||
if(this.replyInfo.content==''){
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,33 +7,33 @@
|
||||
</div>
|
||||
<div v-show="theme==1" class="interact-bar-btns" :style="{'justify-content':showAlign}">
|
||||
<div v-if="answers" @click="addAnswers()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly || clickAnswer}">
|
||||
<el-tooltip effect="light" content="回答" placement="left">
|
||||
<el-tooltip effect="light" content="回答" placement="left" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<!-- <svg-icon style="margin-right: 0;" icon-class="comment"></svg-icon> -->
|
||||
<img style="width:16px;height:16px;vertical-align: middle;" :src="require('@/assets/images/icon/answers.png')">
|
||||
</el-tooltip>
|
||||
<span class="interact-bar-value"> {{ data.answers}}</span>
|
||||
</div>
|
||||
<div v-if="comments" class="interact-bar-btn" :style="`min-width: ${nodeWidth};`" :class="{cursor:!readonly}">
|
||||
<el-tooltip effect="light" content="评论" placement="left">
|
||||
<el-tooltip effect="light" content="评论" placement="left" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<svg-icon style="margin-right: 0;font-size: 16px;" icon-class="comment"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="interact-bar-value"> {{data.comments}}</span>
|
||||
</div>
|
||||
<div v-if="shares" @click="addShare()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
||||
<el-tooltip effect="light" content="分享" placement="top">
|
||||
<el-tooltip effect="light" content="分享" placement="top" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<svg-icon icon-class="share" style="margin-right: 0;font-size: 16px;"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="interact-bar-value"> {{data.shares}}</span>
|
||||
</div>
|
||||
<div v-if="praises" @click="addPraise()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
||||
<el-tooltip effect="light" content="点赞" placement="top">
|
||||
<el-tooltip effect="light" content="点赞" placement="top" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<svg-icon style="margin-right: 0;font-size: 20px;" :icon-class="isPraise?'praised':'like'"></svg-icon>
|
||||
</el-tooltip>
|
||||
<span class="interact-bar-value"> {{ data.praises}}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="favorites" @click="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
||||
<el-tooltip effect="light" content="收藏" placement="top">
|
||||
<el-tooltip effect="light" content="收藏" placement="top" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<svg-icon style="font-size: 16px;margin-right: 0;" :icon-class="isFavorite?'collected':'collection'"></svg-icon>
|
||||
<!-- <svg-icon :icon-class="isFavorite?'collected':'dropdown_collected'"></svg-icon> -->
|
||||
<!-- dropdown_collected -->
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<el-tooltip effect="light" content="浏览量" placement="top" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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>
|
||||
@@ -181,10 +181,9 @@ export default {
|
||||
this.isFavorite = newVal;
|
||||
},
|
||||
data(newVal,oldVal){
|
||||
// console.log(newVal,'newVal');
|
||||
// if(newVal && newVal.id!=''){
|
||||
// this.checkHas();
|
||||
// }
|
||||
if(newVal && newVal.id!=''){
|
||||
this.checkHas();
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
@@ -459,7 +458,6 @@ export default {
|
||||
}
|
||||
},
|
||||
submitShare(){
|
||||
|
||||
if(this.shareUsers.length==0){
|
||||
this.$message.error('请选择分享人');
|
||||
return;
|
||||
@@ -472,7 +470,7 @@ export default {
|
||||
let postData={
|
||||
objType:this.type,
|
||||
objId:this.data.id,
|
||||
content:'',
|
||||
content:this.data.title,
|
||||
isRead:false,
|
||||
toAid:'',
|
||||
toAname:'',
|
||||
|
||||
@@ -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" v-if="caseShow" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
|
||||
<div class="top-nav" :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="50" 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 v-if="caseShow" label="案例" value="2"></el-option>
|
||||
<el-option 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> -->
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="person-action" >
|
||||
<!-- 消息 -->
|
||||
<el-badge :value="userMsg" :hidden="userMsg == 0" class="message-count">
|
||||
<el-tooltip content="消息" placement="bottom" effect="light">
|
||||
<el-tooltip content="消息" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false"></el-link>
|
||||
</el-tooltip>
|
||||
</el-badge>
|
||||
@@ -51,39 +51,12 @@
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link>
|
||||
<!-- <el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button> -->
|
||||
<el-link type="primary" @click="logout()" icon="el-icon-switch-button" :underline="false">退出</el-link>
|
||||
</div>
|
||||
<!-- <div style="margin-left: 60px;margin-right: 30px"> -->
|
||||
<!-- <el-badge :value="userMsg" :hidden="userMsg == 0" class="message-count"> -->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false">消息</el-link> -->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false"></el-link> -->
|
||||
<!-- </el-badge> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div style="margin-left: 20px;"><el-avatar :src="userInfo.avatar" style="vertical-align: middle;width:28px;height:28px;margin-right:2px;"></el-avatar></div> -->
|
||||
<!-- <div style="margin-left: 5px;"> -->
|
||||
<!-- <el-dropdown @command="handleUcCommand">
|
||||
<span class="el-dropdown-link">
|
||||
{{ userInfo.name }}
|
||||
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="uc">个人中心</el-dropdown-item>
|
||||
<el-dropdown-item command="logout" divided>退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
<!--管理员-->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/course/manage`" :underline="false">个人中心</el-link> -->
|
||||
<!--学员-->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div style="margin-left: 20px;"><el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,7 +86,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg','caseShow']),
|
||||
...mapGetters(['userInfo', 'userMsg']),
|
||||
|
||||
avatarText(){
|
||||
return userAvatarText(this.userInfo.name);
|
||||
@@ -145,14 +118,11 @@ export default {
|
||||
// cmtask_name:this.cmtask_name,
|
||||
};
|
||||
apiBoeCourse.cmtaskList(params).then(res => {
|
||||
if (res.result.count > 0) {
|
||||
if (res.status == 200 && res.result.count > 0) {
|
||||
this.isTiao = true;
|
||||
// this.$router.push('/uc/study/task');// 学习任务
|
||||
} else {
|
||||
this.isTiao = false;
|
||||
// this.$router.push('/uc/study/courses')// 自主学习
|
||||
}
|
||||
// this.pageData.list = res.result.list;
|
||||
});
|
||||
},
|
||||
handleCommand(val) {
|
||||
@@ -355,21 +325,16 @@ export default {
|
||||
div{
|
||||
border-radius: 50%;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
// border: 1px solid #73adfe;
|
||||
// color: #73adfe;
|
||||
// text-align: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
margin-right: 8px;
|
||||
border-radius: 50%;
|
||||
// background: #d9e9ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-form-item label="回答内容">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model.trim="editData.content"
|
||||
v-model="editData.content"
|
||||
placeholder="请输入详细描述"
|
||||
rows="8"
|
||||
minlength="1"
|
||||
@@ -45,6 +45,7 @@
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
this.editData.content = this.editData.content.trim();
|
||||
// if(this.editData.content.length<0||this.editData.content.length>255){
|
||||
// return this.$message({
|
||||
// message: '回复内容为0-800个字',
|
||||
|
||||
@@ -443,7 +443,7 @@ export default {
|
||||
}
|
||||
},
|
||||
getDetail() {
|
||||
apiCoursePortal.detail(this.manageStudyData.id).then(rs => {
|
||||
apiCoursePortal.detail(this.manageStudyData.id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
let treeList = [];
|
||||
if (rs.result.sections.length > 0) {
|
||||
@@ -523,7 +523,7 @@ export default {
|
||||
});
|
||||
},
|
||||
getRecordDetail(id) {
|
||||
apiCoursePortal.detail(id).then(rs => {
|
||||
apiCoursePortal.detail(id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
let treeList = [];
|
||||
if (rs.result.sections.length > 0) {
|
||||
|
||||
@@ -81,7 +81,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
mounted() {
|
||||
this.sex = this.userInfo.sex;
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/study/index'){
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
}
|
||||
//let testName='京东方科技集团股份有限公司/北京中祥英科技有限公司/技术中心';
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
<span slot="title" class="textl">课件管理</span>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="exam" v-show="curIdentity == 3">
|
||||
<template slot="title">
|
||||
<svg-icon icon-class="exam" style="font-size:14px"></svg-icon>
|
||||
@@ -96,10 +95,8 @@
|
||||
</el-menu-item>
|
||||
<el-menu-item v-show="curIdentity == 3">
|
||||
<template slot="title">
|
||||
<!-- <i class="el-icon-s-grid"></i> -->
|
||||
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
||||
<span><a href="/resource/index.html" target="_blank">旧版管理员界面</a></span>
|
||||
<!-- <span>我的学习</span> -->
|
||||
</template>
|
||||
<!-- <i class="el-icon-menu"></i> -->
|
||||
</el-menu-item>
|
||||
@@ -320,7 +317,7 @@
|
||||
<span v-if="lastStudy.contentType=='face-course'" class="course-type-title course-type">线下课</span>
|
||||
<span v-if="lastStudy.contentType=='project'" class="course-type-title course-type">学习项目</span>
|
||||
</div>
|
||||
<el-tooltip :content="lastStudy.courseName" placement="bottom-start" effect="light">
|
||||
<el-tooltip :content="lastStudy.courseName" placement="bottom-start" effect="light" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<div class="course-title two-line-ellipsis">{{lastStudy.courseName}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@@ -345,6 +342,9 @@ export default {
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const { meta, path } = route;
|
||||
if(meta.title == '添加受众' || meta.title == '查看受众'){
|
||||
meta.activeMenu = '/manage/ugroups'
|
||||
}
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="xtop-nav">
|
||||
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
|
||||
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
|
||||
<div v-if="caseShow"><a :href="`${webBaseUrl}/case`">案例</a></div>
|
||||
<div><a :href="`${webBaseUrl}/case`">案例</a></div>
|
||||
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
|
||||
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
|
||||
<div>
|
||||
@@ -79,32 +79,15 @@
|
||||
<el-button type="primary" @click="submitPwd">提交修改</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
class="dialog-signin"
|
||||
:show-close="false"
|
||||
:visible.sync="signInShow"
|
||||
:close-on-click-modal="false"
|
||||
width="30%">
|
||||
<!-- <span>这是一段信息</span> -->
|
||||
<div style="background-color: #99beff;padding-bottom: 20px;">
|
||||
<div class="signin-bg">
|
||||
<img style="width:100%" :src="`${this.webBaseUrl}/images/newtip/bg.png`" alt="" srcset="">
|
||||
<i @click="toExperience()" class="el-icon-close" style="cursor: pointer;"></i>
|
||||
<el-dialog custom-class="dialog-signin" :show-close="false" :visible.sync="signInShow" :close-on-click-modal="false" width="520px" top="8vh">
|
||||
<div>
|
||||
<img usemap="#HotMap" src="/pc/ad/dlg.png" style="width:416px;height: 576px;">
|
||||
<map name="HotMap" id="HotMap">
|
||||
<area shape="circle" name="link1" coords="380,40,30" @click="closeSignDlg" href="javascript:;" />
|
||||
<area shape="rectangle" name="link2" coords="150,400,300,500" target="_blank" href="https://boehrsurvey.wjx.cn/vm/PmreuFN.aspx" />
|
||||
</map>
|
||||
</div>
|
||||
<!-- <div class="signin-box">
|
||||
<p class="signin-text"><span>更多彩蛋</span> <span class="ti-yan" @click="toExperience()">即刻体验>>> </span></p>
|
||||
<p class="signin-a"><span><a href="https://u.boe.com/upload/video/originfile/50/50d84b41d7e4c29b20e73215b5117fb5.mp4" target="_blank">点击小视频了解更多</a></span></p>
|
||||
<p class="signin-b"><el-checkbox v-model="checked"></el-checkbox> <span>一天之内不再提示</span></p>
|
||||
</div> -->
|
||||
<div class="signin-box2">
|
||||
<div class="signin-checkbox"><el-checkbox v-model="checked"></el-checkbox>一天之内不再提示</div>
|
||||
<!-- <div class="signin-text" @click="toExperience()">点击小视频了解更多</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer dialog-footer-signin">
|
||||
<!-- <el-checkbox v-model="checked">一天之内不在提示</el-checkbox> -->
|
||||
<!-- <el-button type="primary" @click="toExperience()">去体验</el-button> -->
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -118,23 +101,19 @@ export default {
|
||||
return {
|
||||
checked:true,
|
||||
signInShow: false,
|
||||
signLocalTimesKey:'xboe_sign_dlg_times',
|
||||
keyword: '',
|
||||
findType: '1',
|
||||
mouseIndex: 0,
|
||||
activeIndex: '',
|
||||
oneSignIn:'boe_new',
|
||||
msg: {
|
||||
num: 0
|
||||
},
|
||||
user: {
|
||||
name: ''
|
||||
},
|
||||
msg: { num: 0 },
|
||||
user: { name: '' },
|
||||
pwdDlg: { show: false, newPwd: '', nowPwd: '', rePwd: '' },
|
||||
current:1
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg','caseShow']),
|
||||
...mapGetters(['userInfo', 'userMsg']),
|
||||
showName: function() {
|
||||
//console.log('name='+this.name);
|
||||
//console.log('loginName='+this.loginName);
|
||||
@@ -146,48 +125,51 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if(this.getCookies() == null) {
|
||||
this.signInShow = true;
|
||||
//控制弹出窗口的代码
|
||||
let now = new Date() //当前时间
|
||||
let end = new Date('2022/08/14 00:00:00') //对比时间
|
||||
if(now.getTime() < end.getTime()){
|
||||
let times = localStorage.getItem(this.signLocalTimesKey);
|
||||
let isNewLogin=localStorage.getItem(this.$Constants.newLoginKey);
|
||||
//let isNewLogin='1';
|
||||
if(isNewLogin && isNewLogin=='1'){
|
||||
if(!times){
|
||||
this.signInShow = true;//显示
|
||||
localStorage.setItem(this.signLocalTimesKey,1);
|
||||
}else{
|
||||
let intTimes=parseInt(times);
|
||||
if(intTimes<2){
|
||||
this.signInShow = true;//显示
|
||||
intTimes++;
|
||||
localStorage.setItem(this.signLocalTimesKey,intTimes);
|
||||
}
|
||||
}
|
||||
localStorage.setItem(this.$Constants.newLoginKey,0);
|
||||
}
|
||||
|
||||
}
|
||||
this.$store.dispatch('refrashMsg');
|
||||
},
|
||||
methods: {
|
||||
getCookies() {
|
||||
return Cookies.get(this.oneSignIn)
|
||||
closeSignDlg(){
|
||||
this.signInShow=false;
|
||||
},
|
||||
setCookies(token,expiresTime) {
|
||||
//console.log(token,expiresTime,'token,expiresTime');
|
||||
return Cookies.set(this.oneSignIn, token,expiresTime)
|
||||
},
|
||||
removeCookies(){
|
||||
return Cookies.remove(this.oneSignIn)
|
||||
},
|
||||
toExperience() {
|
||||
this.signInShow = false;
|
||||
if(this.checked) {
|
||||
this.setCookies('new',60*60*24)
|
||||
} else {
|
||||
this.removeCookies();
|
||||
}
|
||||
},
|
||||
// searchJump() {
|
||||
// if(this.findType == '1') {// 课程
|
||||
// window.open(`/course?keyword=${this.keyword}`);
|
||||
// } else if(this.findType == '2'){ // 案例
|
||||
// window.open(`/case?keyword=${this.keyword}`);
|
||||
// } else if(this.findType == '3'){ //文章
|
||||
// window.open(`/article?keyword=${this.keyword}`);
|
||||
// } else if(this.findType == '4'){ // 问答
|
||||
// window.open(`/qa?keyword=${this.keyword}`);
|
||||
// }
|
||||
// },
|
||||
handleCommand(val) {
|
||||
// let obj = {
|
||||
// one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
||||
// two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
||||
// three: this.webBaseUrl + '/study/index',
|
||||
// four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
||||
// five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
||||
// };
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
// process.env.VUE_APP_BOE_WEB_URL
|
||||
let obj = {
|
||||
one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
||||
two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
||||
three: this.webBaseUrl + '/study/index',
|
||||
one: urlPre+'/web/teacherLesson',
|
||||
two: urlPre+'/grow180/login',
|
||||
three: this.webBaseUrl + '/study/index?study=1',
|
||||
four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
||||
five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
||||
five: urlPre+'/boe/new-employee/index.html'
|
||||
};
|
||||
window.open(obj[val]);
|
||||
},
|
||||
@@ -238,6 +220,8 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .dialog-signin{
|
||||
background: transparent;
|
||||
box-shadow:none;
|
||||
.el-dialog__header{
|
||||
padding: 0;
|
||||
}
|
||||
@@ -343,7 +327,7 @@ export default {
|
||||
z-index: 9999;
|
||||
.xtop-content{
|
||||
//width: 1500px;
|
||||
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
@@ -21,7 +21,7 @@ router.beforeEach((to, from, next) => {
|
||||
}else{
|
||||
constants.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NProgress.start();
|
||||
|
||||
@@ -66,7 +66,12 @@ router.beforeEach((to, from, next) => {
|
||||
}else{
|
||||
|
||||
//next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
location.href=process.env.VUE_APP_LOGIN_URL;
|
||||
//设置之前的路径
|
||||
//store.commit('portal/SetBackUrl',location.href);
|
||||
//console.log(location.href,'location.href');
|
||||
//let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
//let backUrl=location.href.substring(urlPre.length);
|
||||
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+location.href;
|
||||
NProgress.done()
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ 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,
|
||||
@@ -17,6 +16,7 @@ const getters = {
|
||||
sidebarRouters: state => state.permission.sidebarRouters,
|
||||
portalCase: state => state.portal.case,
|
||||
portalLoginRememberMe: state => state.portal.loginRememberMe,
|
||||
portalBackUrl: state => state.portal.backUrl,
|
||||
resOwnerMap:state => state.resOwner.resOwnerMap,
|
||||
sysTypeMap:state => state.sysType.sysTypeMap,
|
||||
userMsg:state => state.user.msg,
|
||||
|
||||
@@ -2,7 +2,8 @@ const state = {
|
||||
case: {
|
||||
readProtocol: sessionStorage.getItem("readProtocol") == null ? false : JSON.parse(sessionStorage.getItem("readProtocol"))
|
||||
},
|
||||
loginRememberMe: sessionStorage.getItem("loginRememberMe") == null ? {} : JSON.parse(sessionStorage.getItem("loginRememberMe"))
|
||||
loginRememberMe: sessionStorage.getItem("loginRememberMe") == null ? {} : JSON.parse(sessionStorage.getItem("loginRememberMe")),
|
||||
backUrl:''
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
@@ -13,7 +14,10 @@ const mutations = {
|
||||
SET_LoginRememberMe: (state, iden) => {
|
||||
state.loginRememberMe = iden;
|
||||
sessionStorage.setItem("loginRememberMe", JSON.stringify(iden));
|
||||
}
|
||||
},
|
||||
SET_BackUrl: (state, u) => {
|
||||
state.backUrl = u;
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -34,6 +38,13 @@ const actions = {
|
||||
commit('SET_LoginRememberMe', iden);
|
||||
resolve();
|
||||
})
|
||||
},
|
||||
//设置登录返回的地址
|
||||
SetBackUrl({commit}, url) {
|
||||
return new Promise((resolve) => {
|
||||
commit('SET_BackUrl', url);
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ 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: {
|
||||
@@ -16,7 +15,6 @@ const user = {
|
||||
studyTaskCount:0,//学习任务数
|
||||
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
|
||||
permissions: [],
|
||||
caseShow:false,
|
||||
},
|
||||
mutations: {
|
||||
SET_Identity: (state, iden) => {
|
||||
@@ -41,9 +39,6 @@ const user = {
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
},
|
||||
SET_caseShow:(state, iden) => {
|
||||
state.caseShow = iden
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
refrashMsg({ commit }) {
|
||||
@@ -133,13 +128,6 @@ 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,
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/**页面设置的一些常量*/
|
||||
const caseUser={
|
||||
'00004409': '李玉冰',
|
||||
'101215': '徐涛',
|
||||
'00005011': '邱炜玮',
|
||||
'107863': '苗怡',
|
||||
'00004928': '夏辉',
|
||||
'110858': '毛继禹',
|
||||
'10726944': '王芮',
|
||||
'boeutest': '测试小助手',
|
||||
'boeuadmin': '运营小助手',
|
||||
'10181457': '董瑞华',
|
||||
}
|
||||
|
||||
export default caseUser;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/**页面设置的一些常量*/
|
||||
const constants={
|
||||
fileBaseUrl:'http://127.0.0.1/pc/cdn/upload'
|
||||
fileBaseUrl:'http://127.0.0.1/pc/cdn/upload',
|
||||
newLoginKey:'boe_new_login'
|
||||
}
|
||||
|
||||
export default constants
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<el-image class="course-image" style="height: 130px;" :src="this.webBaseUrl+'/ad/index_course.png'" fit="fit"></el-image>
|
||||
<span class="course-type">录播课</span>
|
||||
</div>
|
||||
<el-tooltip class="item" content="高效谈判系列课" placement="bottom" effect="light">
|
||||
<div class="course-title one-line-ellipsis">高效谈判系列课</div>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip class="item" content="高效谈判系列课" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div title="高效谈判系列课" class="course-title one-line-ellipsis">高效谈判系列课</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<div class="course-author">
|
||||
<div class="course-author-left" > </div>
|
||||
<div style="flex:1; text-align: center; ">
|
||||
@@ -62,9 +62,9 @@
|
||||
<span v-if="course.type == 20 || 10" class="course-type">录播课</span>
|
||||
</div>
|
||||
|
||||
<el-tooltip class="item" :content="course.name" placement="bottom" effect="light">
|
||||
<div class="course-title one-line-ellipsis" >{{ course.name }}</div>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip class="item" :content="course.name" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="course.name" class="course-title one-line-ellipsis" >{{ course.name }}</div>
|
||||
<!-- </el-tooltip> -->
|
||||
|
||||
<div class="course-author">
|
||||
<!-- <div class="course-author-left"><authorInfo :avatar="course.authorInfo.avatar" :name="course.authorInfo.name"></authorInfo></div> -->
|
||||
@@ -107,7 +107,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 推荐案例2版 -->
|
||||
<div class="modules" v-if="caseShow">
|
||||
<div class="modules">
|
||||
<div class="modules-title">
|
||||
|
||||
<span class="modules-text">推荐案例</span>
|
||||
@@ -117,7 +117,7 @@
|
||||
</span>
|
||||
<span class="more"><router-link to="/case">更多 ></router-link></span>
|
||||
</div>
|
||||
<div class="modules-list xrow" style="height: 235px;overflow: hidden;">
|
||||
<div class="modules-list xrow" style="height: 255px;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> -->
|
||||
@@ -126,9 +126,12 @@
|
||||
{{ca.sysCreateTime.substring(0,10)}}
|
||||
</div> -->
|
||||
<a :href="'case/detail?id='+ca.id" >
|
||||
<span class="case-title one-line-ellipsis">
|
||||
<!-- <el-tooltip class="item" :content="ca.title" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<span :title="ca.title" class="case-title one-line-ellipsis">
|
||||
{{ca.title}}
|
||||
</span>
|
||||
<!-- </el-tooltip> -->
|
||||
|
||||
<div class="case-text three-line-ellipsis">
|
||||
{{ca.summary}}
|
||||
</div>
|
||||
@@ -136,7 +139,7 @@
|
||||
<div class="case-inter">
|
||||
<interactBar :type="3" :readonly="true" :data="ca" :shares="false" :views="false"></interactBar>
|
||||
</div>
|
||||
<div style="height:40px;margin-top:10px">
|
||||
<div class="case-orginfo" style="margin-top:18px">
|
||||
<authorInfo :avatar="ca.authorInfo.avatar" :info="ca.authorInfo.orgInfo" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex"></authorInfo></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -336,7 +339,7 @@ export default {
|
||||
name: 'index',
|
||||
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
|
||||
computed: {
|
||||
...mapGetters(['userInfo','caseShow'])
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -369,7 +372,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
||||
this.getCourseData(1);
|
||||
this.getCaseData();
|
||||
this.getArticleData();
|
||||
@@ -380,7 +382,6 @@ export default {
|
||||
window.open('https://m.qingxuetang.com/x/?appId=qxtcorp306130','_blank');
|
||||
},
|
||||
toCourseDetail(item) {
|
||||
|
||||
if (item.type == 10) {
|
||||
return this.webBaseUrl + '/course/micro?id=' + item.id;
|
||||
} else if (item.type == 20) {
|
||||
@@ -579,6 +580,9 @@ export default {
|
||||
userIds.push(courseTeahcer.teacherIds[0]);
|
||||
item.authorInfo.aid = courseTeahcer.teacherIds[0];
|
||||
item.authorInfo.name = courseTeahcer.names[0];
|
||||
if(item.authorInfo.name=='BOE教师'){
|
||||
item.authorInfo.name='';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -648,6 +652,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.case-orginfo{
|
||||
// line-height: 25px;
|
||||
height: 45px;
|
||||
}
|
||||
.three-line-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -660,7 +668,7 @@ export default {
|
||||
.casetwo{
|
||||
border: 1px solid #F0F0F0;
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
height: 245px;
|
||||
margin-bottom:15px;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
@@ -671,12 +679,9 @@ export default {
|
||||
.case-conent{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// box-shadow: 1px 1px 15px #ccc;
|
||||
// position: absolute;
|
||||
// top: 5%;
|
||||
background-color: #fff;
|
||||
// left: 4%;
|
||||
padding: 16px;
|
||||
padding: 15px;
|
||||
.case-time{
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
@@ -684,17 +689,18 @@ export default {
|
||||
}
|
||||
.case-title{
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom:10px;
|
||||
margin-bottom:8px;
|
||||
}
|
||||
.case-text{
|
||||
height: 55px;
|
||||
height: 57px;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
color: #888888;
|
||||
line-height: 18px;
|
||||
margin-bottom:12px;
|
||||
// line-height: 18px;
|
||||
margin-bottom:8px;
|
||||
}
|
||||
::v-deep .case-inter{
|
||||
width: 100%;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
apiLogin.boeLogin(this.curToken).then(rs=>{
|
||||
if(rs.status==200){
|
||||
//setToken(rs.result.access_token);
|
||||
localStorage.setItem(this.$Constants.newLoginKey,1);
|
||||
if(this.toUrl){
|
||||
location.href=this.toUrl;
|
||||
}else{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
import loginApi from "@/api/login";
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['portalLoginRememberMe'])
|
||||
...mapGetters(['portalLoginRememberMe','portalBackUrl'])
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
@@ -99,6 +99,7 @@
|
||||
this.$store.dispatch("Login", this.form).then(rs => {
|
||||
if(rs.status == 200){
|
||||
// 记住密码
|
||||
localStorage.setItem(this.$Constants.newLoginKey,1);
|
||||
if(this.rememberMe){
|
||||
let rememberMeOjb = {rememberMe:true,loginName:this.form.loginName,password:this.form.password};
|
||||
this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb)
|
||||
|
||||
@@ -96,8 +96,8 @@ export default {
|
||||
},
|
||||
saveSuccess(data){
|
||||
this.diagSync=false;
|
||||
this.articleList.pageIndex = 1;
|
||||
this.articleList.list = [];
|
||||
this.pageData.pageIndex = 1;
|
||||
this.pageData.list = [];
|
||||
this.getArticleList();
|
||||
},
|
||||
//获取文章列表数据
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div style="padding: 10px 22px 10px 23px;">
|
||||
<el-select v-model="dataList.type" style="margin-right: 10px" placeholder="类型">
|
||||
<!-- <el-option label="全部" :value="0"></el-option> -->
|
||||
<el-option label="全部" :value="null"></el-option>
|
||||
<el-option label="文章" :value="2"></el-option>
|
||||
<!-- <el-option label="课程" :value="1"></el-option> -->
|
||||
<el-option label="案例" :value="3"></el-option>
|
||||
@@ -42,13 +42,11 @@
|
||||
<span style="font-size: 16px; color: #666666; line-height:30px">
|
||||
<!-- <i class="el-icon-time"> -->
|
||||
{{item.sysCreateBy}}@我
|
||||
|
||||
</span>
|
||||
<span style="margin-left:5px; font-size: 16px; color: #666666; line-height:25px ">
|
||||
{{ item.content }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- <el-button type="primary" v-if="!item.isread" size="mini">标记已读</el-button> -->
|
||||
</div>
|
||||
<div style="margin-top:10px; position: relative;">
|
||||
@@ -121,7 +119,7 @@ export default {
|
||||
type:0,
|
||||
dataList: {
|
||||
pageIndex:1,
|
||||
type:4,
|
||||
type:'',
|
||||
pageSize:10,
|
||||
count:0,
|
||||
list:[],
|
||||
@@ -149,13 +147,13 @@ export default {
|
||||
// let routeData = this.$router.resolve({ path:'/article/detail?id='+item.objId}); // , query: { id: 1 }
|
||||
// window.open(routeData.href, '_blank');
|
||||
// this.$router.push({path:'/article/detail',query:{id:item.objId}})
|
||||
if(this.dataList.type == 2){
|
||||
if(item.objType == 2){
|
||||
this.$router.push({path:'/article/detail',query:{id:item.objId}})
|
||||
}else if(this.dataList.type == 1){
|
||||
}else if(item.objType == 1){
|
||||
|
||||
}else if(this.dataList.type == 4){
|
||||
}else if(item.objType == 4){
|
||||
this.$router.push({ path: '/qa/answer', query: { id: item.objId } });
|
||||
} else if(this.dataList.type == 3){
|
||||
} else if(item.objType == 3){
|
||||
this.$router.push({ path: '/case/detail', query: { id: item.objId } });
|
||||
}
|
||||
},
|
||||
@@ -189,9 +187,10 @@ export default {
|
||||
this.$message.error("数据搜索失败")
|
||||
})
|
||||
},
|
||||
reset(){
|
||||
reset(){
|
||||
this.dataList.pageIndex = 1;
|
||||
this.dataList.send = '',
|
||||
this.dataList.type = '',
|
||||
this.type = 0;
|
||||
this.getData();
|
||||
this.isSearh = false;
|
||||
|
||||
@@ -351,7 +351,7 @@ export default {
|
||||
};
|
||||
},
|
||||
viewTopic(data) {
|
||||
window.open(this.webBaseUrl+'/case/detail?id='+data.id, '_blank');
|
||||
this.$router.push({path:'/case/detail',query:{id:data.id}})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</el-col> -->
|
||||
<!-- </el-row> -->
|
||||
<el-row :gutter="20">
|
||||
|
||||
|
||||
<!-- <el-col :span="6">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-cascader style="margin-left: 0px" placeholder="资源归属" :options="resOwnerListMap" :props="defaultProps" v-model="resOwner" clearable></el-cascader>
|
||||
@@ -36,10 +36,10 @@
|
||||
<el-button type="primary" style="margin-left: 0px" @click="search()" icon="el-icon-search">搜索</el-button>
|
||||
<el-button @click="reset()" style="margin-left: 20pxpx" type="primary" icon="el-icon-refresh-right">重置</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row :gutter="20" style="margin-top:15px;margin-bottom:15px">
|
||||
<el-col :span="4" style="margin-left:0%;">
|
||||
<div class="grid-content bg-purple">
|
||||
@@ -51,11 +51,11 @@
|
||||
<el-checkbox v-model="params.self" @change="getSearch()">仅显示我上传的</el-checkbox>
|
||||
<!-- <el-checkbox v-model="params.self" label="只看自己" border></el-checkbox> -->
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6">
|
||||
|
||||
|
||||
</el-col> -->
|
||||
|
||||
|
||||
</el-row>
|
||||
<!-- <div><el-button @click="addFile()" type="primary">上传课件</el-button></div> -->
|
||||
<!-- <el-cascader style="margin-left: 10px" placeholder="资源归属" :options="resOwnerList" :props="defaultProps" v-model="resOwner" clearable></el-cascader> -->
|
||||
@@ -346,18 +346,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSearch();
|
||||
},
|
||||
mounted() {
|
||||
this.loadResOwners();
|
||||
this.getResOwnerTree().then(rs => {
|
||||
this.resOwnerListMap = rs;
|
||||
});
|
||||
this.search();
|
||||
},
|
||||
methods: {
|
||||
search(){
|
||||
this.params.pageIndex = 1;
|
||||
//this.params.pageIndex = 1;
|
||||
this.page.pageIndex=1;
|
||||
this.getSearch();
|
||||
},
|
||||
reset() {
|
||||
@@ -369,7 +368,8 @@ export default {
|
||||
this.params.resOwner1 = '';
|
||||
this.params.resOwner2 = '';
|
||||
this.params.resOwner3 = '';
|
||||
this.params.pageIndex = 1;
|
||||
//this.params.pageIndex = 1;
|
||||
this.page.pageIndex=1;
|
||||
this.getSearch();
|
||||
},
|
||||
...mapActions({
|
||||
|
||||
@@ -203,8 +203,8 @@
|
||||
<el-dialog title="二维码" center :visible.sync="qrcodeShow" @close="closeCode" width="500px">
|
||||
<div style="height:250px;display: flex;flex-direction:column;justify-content: space-evenly;align-items: center;">
|
||||
<div id="qrcode" ref="qrcode"></div>
|
||||
<el-input v-model="qrcode"></el-input>
|
||||
<el-button type="primary" size="mini">复制链接</el-button>
|
||||
<el-input v-model="pcDetailUrl" id="text"></el-input>
|
||||
<el-button type="primary" size="mini" @click="myCopy()">复制链接</el-button>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -330,6 +330,7 @@ export default {
|
||||
manageStudyData: {},
|
||||
expandDetails: true,
|
||||
qrcode: '',
|
||||
pcDetailUrl:'',
|
||||
isExamine: 1,
|
||||
auditInfo: {
|
||||
pass: true,
|
||||
@@ -397,6 +398,11 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
myCopy(){
|
||||
var ele = document.getElementById("text");
|
||||
ele.select();
|
||||
document.execCommand("Copy");
|
||||
},
|
||||
inputOn() {
|
||||
this.$forceUpdate();
|
||||
},
|
||||
@@ -519,7 +525,7 @@ export default {
|
||||
this.params.sysType1 = '';
|
||||
this.params.sysType2 = '';
|
||||
this.params.sysType3 = '';
|
||||
|
||||
|
||||
this.searchData(true);
|
||||
},
|
||||
...mapActions({
|
||||
@@ -661,11 +667,18 @@ export default {
|
||||
},
|
||||
showQrimage(row) {
|
||||
this.qrcodeShow = true;
|
||||
|
||||
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
this.qrcode = urlPre+'/mobile/pages/resource/microDetail?id='+row.id;
|
||||
|
||||
//动态的地址
|
||||
//urlPre=urlPre+'/m?returnUrl='+urlPre+'/mobile/pages/login/loading?returnUrl=';
|
||||
//固定的地址
|
||||
let mobilePre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||
this.qrcode = mobilePre+'/pages/resource/microDetail?id='+row.id;
|
||||
this.pcDetailUrl=urlPre+this.webBaseUrl+'/course/micro?id='+row.id;
|
||||
if(row.type==20){
|
||||
this.qrcode = urlPre+'/mobile/pages/resource/courseDetail?id='+row.id;
|
||||
this.qrcode = mobilePre+'/pages/resource/courseDetail?id='+row.id;
|
||||
this.pcDetailUrl=urlPre+this.webBaseUrl+'/course/detail?id='+row.id;
|
||||
}
|
||||
|
||||
// 使用$nextTick确保数据渲染
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #eee; background-color: #eee; padding: 10px 20px;margin-top: 10px;">
|
||||
<div v-if="audit.length > 0" 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>
|
||||
@@ -444,7 +444,9 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
apiCourse.getAuditInfo({courseId:row.id}).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.audit = res.result[0];
|
||||
if(res.result.length > 0) {
|
||||
this.audit = res.result[0];
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ export default {
|
||||
isEdit: false,
|
||||
viewUserPapereShow: false,
|
||||
viewResultsShow: false,
|
||||
params: { pageIndex: 1, pageSize: 10 },
|
||||
params: {published:null,keyWord:'', pageIndex: 1, pageSize: 10 },
|
||||
// data: resourceAttribution,
|
||||
pageData: {
|
||||
list: [],
|
||||
@@ -1057,7 +1057,9 @@ export default {
|
||||
this.$refs.qrcode.innerHTML = ''
|
||||
},
|
||||
viewExamInfo(data) {
|
||||
this.examInfoShow = true
|
||||
if(this.questDirOptions.length==0){
|
||||
this.findPapers();
|
||||
}
|
||||
apiTest.detail(data.id).then(res=>{
|
||||
if (res.status === 200) {
|
||||
this.detailInfo = res.result;
|
||||
@@ -1065,6 +1067,7 @@ export default {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
this.examInfoShow = true
|
||||
},
|
||||
loadData() {
|
||||
this.params.resOwner1 = this.ownership[0]
|
||||
|
||||
@@ -28,23 +28,25 @@
|
||||
placeholder="题干"
|
||||
clearable></el-input>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-button type="primary" @click="getsearch(1)" style="margin-left: 20px" icon="el-icon-search" >搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset"> 重置 </el-button>
|
||||
<el-button type="primary" @click="addQuestion(1)" style="margin-left: 10px" icon="el-icon-plus"> 添加 </el-button>
|
||||
<div style="display: inline-block;margin-left: 10px;">
|
||||
|
||||
<file-upload
|
||||
dir="files"
|
||||
text="导入"
|
||||
:loading="true"
|
||||
size="medium"
|
||||
url="/xboe/m/exam/question/import"
|
||||
:isShowTip="false"
|
||||
@success="uploadFile"
|
||||
@remove="removeFile" >
|
||||
</file-upload>
|
||||
<el-col :span="17" style="display:flex;justify-content: space-between;">
|
||||
<div style="flex: 1;">
|
||||
<el-button type="primary" @click="getsearch(1)" style="margin-left: 20px" icon="el-icon-search" >搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset"> 重置 </el-button>
|
||||
<el-button type="primary" @click="addQuestion(1)" style="margin-left: 10px" icon="el-icon-plus"> 添加 </el-button>
|
||||
<div style="display: inline-block;margin-left: 10px;">
|
||||
<file-upload
|
||||
dir="files"
|
||||
text="导入"
|
||||
:loading="true"
|
||||
size="medium"
|
||||
url="/xboe/m/exam/question/import"
|
||||
:isShowTip="false"
|
||||
@success="uploadFile"
|
||||
@remove="removeFile" >
|
||||
</file-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: inline-block;margin-top: 10px;"><el-link @click="downloadTemplate">下载模板文件</el-link></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-header>
|
||||
@@ -380,6 +382,18 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
downloadTemplate(){
|
||||
let fileName = "试题导入模板.xls";
|
||||
let link = document.createElement('a'); //创建a标签
|
||||
link.style.display = 'none'; //使其隐藏
|
||||
link.download = this.webBaseUrl+'/template/test-question-template.xls';
|
||||
link.setAttribute('target', '_blank');
|
||||
link.href = this.webBaseUrl+'/template/test-question-template.xls'; //赋予文件下载地址
|
||||
link.setAttribute('download', fileName); //设置下载属性 以及文件名
|
||||
document.body.appendChild(link); //a标签插至页面中
|
||||
link.click(); //强制触发a标签事件
|
||||
document.body.removeChild(link);
|
||||
},
|
||||
uploadFile(file) {
|
||||
this.loadData(1);
|
||||
setTimeout(this.$message.warning('请耐心等待片刻,正在导入'), 2000 );
|
||||
|
||||
@@ -33,11 +33,14 @@
|
||||
<div v-if="examStatus==2" style="text-align: center;color:#6d6d6d; ">考试已结束</div>
|
||||
</div>
|
||||
<div v-else class="no-text">
|
||||
<span>您没有需要的考试</span>
|
||||
<span v-if="noExam">您没有需要的考试</span>
|
||||
</div>
|
||||
<div class="re-list" v-if="canExam">
|
||||
<p>历史记录</p>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<div style="height:300px" v-if="loading == 1" v-loading="loading == 1">
|
||||
|
||||
</div>
|
||||
<el-table :data="tableData" style="width: 100%" v-if="loading == 2">
|
||||
<el-table-column prop="startTime" label="完成时间" width="180"></el-table-column>
|
||||
<el-table-column prop="score" align="center" label="成绩">
|
||||
<template slot-scope="scope">
|
||||
@@ -235,11 +238,13 @@ import { formatSeconds } from '@/utils/datetime.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading:0,
|
||||
toScoreTow,
|
||||
examId:'',//考试的id
|
||||
taskId:'',//考试任务的id
|
||||
lastId:'',//最后一次提交的答卷
|
||||
canExam:false,//能否参加考试
|
||||
noExam:false,//不能参加考试
|
||||
tipText:'',//提示信息
|
||||
examStatus:0,//0表无,1表考试中,2表已结束
|
||||
btnText:'开始考试',
|
||||
@@ -301,6 +306,9 @@ export default {
|
||||
apiTestPaper.getTestInfo(this.examId).then(res=>{
|
||||
if(res.status==200){
|
||||
this.canExam = res.result.hasTask;
|
||||
if(!this.canExam) {
|
||||
this.noExam = true;
|
||||
}
|
||||
this.examStatus=res.result.examStatus;
|
||||
this.testPaper = res.result.exam;
|
||||
this.taskId=res.result.taskId;
|
||||
@@ -400,8 +408,10 @@ export default {
|
||||
})
|
||||
},
|
||||
testAnswers(){ //获取当前考试的历史记录
|
||||
this.loading = 1;
|
||||
apiTestPaper.myTestAnswers(this.examId).then(res=>{
|
||||
if(res.status ==200) {
|
||||
this.loading = 2;
|
||||
this.tableData = res.result;
|
||||
let len=res.result.length;
|
||||
let times=this.testPaper.times? this.testPaper.times:0;
|
||||
@@ -410,6 +420,7 @@ export default {
|
||||
this.tipText='已达到允许考试次数上限';
|
||||
}
|
||||
}else{
|
||||
this.loading = 2;
|
||||
this.$message.error('加载考试记录失败');
|
||||
}
|
||||
})
|
||||
@@ -498,7 +509,7 @@ export default {
|
||||
data.arrange = this.testPaper.arrange;
|
||||
data.passLine = this.testPaper.passLine;
|
||||
data.ucode = this.userInfo.userNo;
|
||||
data.paperJson = JSON.stringify(this.paperQuestion);
|
||||
data.paperJson = this.clearPagerJson();
|
||||
data.answerJson=strAnswer;
|
||||
data.totalScore=total;
|
||||
//计算出当前的成绩
|
||||
@@ -513,6 +524,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
clearPagerJson(){
|
||||
let paperJson = [];
|
||||
this.paperQuestion.forEach((item,index) => {
|
||||
let option = {
|
||||
id:item.id,
|
||||
optionList:[]
|
||||
};
|
||||
item.optionList.forEach(it=>{
|
||||
option.optionList.push({id:it.id})
|
||||
})
|
||||
paperJson.push(option);
|
||||
})
|
||||
return JSON.stringify(paperJson);
|
||||
},
|
||||
countScore(){
|
||||
let total=0;
|
||||
if(this.judge.length > 0){
|
||||
@@ -673,7 +698,9 @@ export default {
|
||||
stopReckon:function(){
|
||||
window.clearInterval(this.reckonTimeer)
|
||||
},
|
||||
// 开始提交答案
|
||||
/**
|
||||
* 开始提交答案
|
||||
*/
|
||||
startUpdateAnswer:function(){
|
||||
if(this.paperQuestion.length==0){
|
||||
return;
|
||||
@@ -684,7 +711,7 @@ export default {
|
||||
let that = this;
|
||||
this.updateAnswerTimeer =window.setInterval(function(){
|
||||
that.updateAnswer();
|
||||
},60000);//测试时可以修改的变小了
|
||||
},10000);//测试时可以修改的变小了
|
||||
},
|
||||
// 停止提交答案
|
||||
stopUpdateAnswer(){
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="paper-box">
|
||||
<div v-for="(item, idx) in paper.data" :key="idx">
|
||||
<div v-if="paper.data.length>0" v-for="(item,idx) in paper.data" :key="idx">
|
||||
<div v-if="item.type < 900">
|
||||
<div style="display: flex;justify-content: space-between;background-color: #dcf1ff;padding: 5px;">
|
||||
<div>
|
||||
@@ -182,10 +182,8 @@
|
||||
<!-- <span style="padding-left: 5px;">知识点[{{item.analysis}}]</span> -->
|
||||
</div>
|
||||
<div>
|
||||
<el-input style="width: 120px;" size="mini" v-model="item.defaultScore" placeholder="分数" @blur="paperCalculation()">
|
||||
<template slot="append">
|
||||
分
|
||||
</template>
|
||||
<el-input @input="changeInput($event)" v-model="item.defaultScore" style="width: 120px;" size="mini" placeholder="分数" @blur="paperCalculation()">
|
||||
<template slot="append">分</template>
|
||||
</el-input>
|
||||
<el-button icon="el-icon-delete" @click="checkDelete(idx)" size="mini"></el-button>
|
||||
</div>
|
||||
@@ -341,7 +339,7 @@ export default {
|
||||
value: [1, 4],
|
||||
type: '',
|
||||
defaultProps: { children: 'children', label: 'label' },
|
||||
params: {pageIndex:1,pageSize: 10 },
|
||||
params: {keyWord:'',pageIndex:1,pageSize: 10 },
|
||||
typeList: [],
|
||||
pageData: {
|
||||
count: 0,
|
||||
@@ -370,7 +368,7 @@ export default {
|
||||
testName: '',
|
||||
remark: '',
|
||||
difficulty: '',
|
||||
data: []
|
||||
data: []
|
||||
},
|
||||
showCompilerDialog: false,
|
||||
checkQuest: [],
|
||||
@@ -413,6 +411,9 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
changeInput(e){
|
||||
this.$forceUpdate();
|
||||
},
|
||||
currentChange(val) {
|
||||
this.qlib.pageIndex = val;
|
||||
this.questionList();
|
||||
@@ -459,7 +460,7 @@ export default {
|
||||
this.qlib.type= '';
|
||||
this.qlib.title= '';
|
||||
this.paperLength=0;
|
||||
this.question.all =
|
||||
this.question.all = false;
|
||||
this.question.list =[];
|
||||
this.question.checkQuest = [];
|
||||
},
|
||||
@@ -725,6 +726,11 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-input{
|
||||
.el-input__inner{
|
||||
padding: 0px 5px;
|
||||
}
|
||||
}
|
||||
.test-input {
|
||||
width: 60px;
|
||||
margin: 0 5px;
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog center custom-class="g-dialog" title="导入人员数据" :close-on-click-modal="false" :visible.sync="importUserShow">
|
||||
<div style="padding: 10px 0px;color: #009ae7; ">注:单个导入文件受众成员请勿超过200条记录,以员工号为准。必须是本系统人员</div>
|
||||
<div style="padding: 10px 0px;color: #009ae7; ">注:单个导入文件受众成员请勿超过5000条记录,以员工号为准。必须是本系统人员</div>
|
||||
<el-row type="flex" align="middle" justify="start" style="margin-bottom: 10px;">
|
||||
文件名称:<el-input style="width: 200px;" disabled v-model="selectFile"></el-input>
|
||||
<el-upload
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
},
|
||||
viewDetail(row){
|
||||
this.$router.push({path:'/manage/viewugroup', query: {id: row.id}})
|
||||
// this.$router.push({path:'/manage/addaudiences', query: {id: row.id}})
|
||||
},
|
||||
jumpRouter(type){
|
||||
if(type==1){
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
</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 style="color:#2974D6;font-weight: 450;" v-if="caseDetail.orgDomain" class="item">{{ orgDomainTranslate(caseDetail.orgDomain) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" class="item" v-if="caseDetail.orgDomain == '' && caseDetail.orgDomainParent">{{ orgDomainTranslate(caseDetail.orgDomainParent) }}</div>
|
||||
<!-- <div style="color:#2974D6;font-weight: 450;" v-if="caseDetail.majorType" class="item">{{ majorTypeTranslate(caseDetail.majorType) }}</div> -->
|
||||
<div class="item" style="color:#2974D6;font-weight: 450;" v-for="item,idx in caseDetail.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</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>
|
||||
@@ -43,12 +44,28 @@
|
||||
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card :body-style="{ padding: '0px' }" class="jianjie" id="pdfPreview">
|
||||
<el-card v-if="Internet == 1" :body-style="{ padding: '0px' }" class="jianjie" id="pdfPreview">
|
||||
<!-- <div class="content">
|
||||
{{ caseDetail.content }}
|
||||
</div> -->
|
||||
<pdfPreview v-if="pdfPath" :filePath="pdfPath"></pdfPreview>
|
||||
</el-card>
|
||||
<el-card v-if="Internet == 2" style="background-color:#eee" class="jianjie pdftext" id="pdfPreview">
|
||||
<div style="margin-top:40px">
|
||||
<span>十分抱歉,您当前的网络环境不符合观看要求。<br/>
|
||||
为了保障案例信息的安全,您需要接入公司内网才能观看。</span>
|
||||
</div>
|
||||
<div style="margin-top:20px" @click="retest">
|
||||
<el-button type="primary">重新检测</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-else-if="Internet == 3" style="background-color:#eee" class="jianjie pdftext" id="pdfPreview">
|
||||
<div style="margin-top:40px">
|
||||
<span>网络安全检测中...</span>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<div class="postfixt-bot">
|
||||
<div class="postfixt-bot-box" id="pdfTopBox">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
@@ -82,15 +99,13 @@
|
||||
<div style="width: 245px;margin-left: 5px;" :class="zoomShow?'':'fixd-box-show'">
|
||||
<div>
|
||||
<div id="fixd-box">
|
||||
<el-card class="ranking-card" >
|
||||
<!-- <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>
|
||||
<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`"/>
|
||||
@@ -98,14 +113,11 @@
|
||||
<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="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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> -->
|
||||
<!-- <div style="height: 10px;"></div> -->
|
||||
<el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
||||
@@ -120,11 +132,15 @@
|
||||
<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`"/>
|
||||
<div v-if="item.title">
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title + '(' + item.authorName+ ')'" @click="jumpRouter(item)">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -144,11 +160,16 @@
|
||||
<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>
|
||||
<div v-if="item.title">
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title + '(' + item.authorName+ ')'" @click="jumpRouter(item)">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -187,6 +208,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Internet:3,//1是成功 2是是失败 3是检测中
|
||||
noData:true,
|
||||
zoomShow:true,
|
||||
isTopBoxShow:true,
|
||||
@@ -209,7 +231,10 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//this.pdfPath=this.basePath+'/case/demo1.pdf';
|
||||
let $this = this;
|
||||
this.Intsucc();
|
||||
this.retest();
|
||||
|
||||
this.resolveId = this.$route.query.id;
|
||||
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
|
||||
if (this.resolveId) {
|
||||
@@ -226,6 +251,53 @@ export default {
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
retest(){
|
||||
this.Internet=3;
|
||||
let $this=this;
|
||||
let xmlhttp=this.getXmlHttpRequest();
|
||||
let timedOut = false;
|
||||
let timer = setTimeout(function(){
|
||||
timedOut = true;
|
||||
xmlhttp.abort();
|
||||
}, 5000);
|
||||
xmlhttp.open("HEAD", window.location.protocol+"//uapi.boe.com.cn",true);
|
||||
xmlhttp.send();
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4) {
|
||||
if (xmlhttp.status==200){
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 1;
|
||||
}else{
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 2;
|
||||
}
|
||||
}else{
|
||||
if(timedOut) return;//忽略中止请求
|
||||
clearTimeout(timer);//取消等待的超时
|
||||
}
|
||||
}
|
||||
},
|
||||
getXmlHttpRequest() {
|
||||
if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
else if (window.ActiveXObject) {
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
},
|
||||
Intsucc(){
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在进行安全检测',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
loading.close();
|
||||
}, 2000);
|
||||
|
||||
},
|
||||
|
||||
getdomain() {
|
||||
let key = "org_domain";
|
||||
apiDict.items(key).then(res => {
|
||||
@@ -242,6 +314,7 @@ export default {
|
||||
apiDict.items(key).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Profess = res.result;
|
||||
// this.Profess = this.Profess.split(",")
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -325,7 +398,7 @@ export default {
|
||||
}
|
||||
if(scrollTop > 630) {
|
||||
this.isTopBoxShow = true;
|
||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -500px;width:245.5px";
|
||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -250px;width:245.5px";
|
||||
} else {
|
||||
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||
}
|
||||
@@ -341,22 +414,47 @@ export default {
|
||||
getPopularity(){
|
||||
apiCase.queryPraises(5).then(res=>{
|
||||
if(res.status==200){
|
||||
this.Popularity=res.result
|
||||
this.Popularity=res.result;
|
||||
if(res.result.length < 5){
|
||||
for(let i=0;i=(5-res.result.length);i++){
|
||||
this.Popularity.push({
|
||||
authorName:'',
|
||||
count:1,
|
||||
id:'',
|
||||
title:'',
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getPositive(){
|
||||
apiCase.queryComments(5).then(res=>{
|
||||
if(res.status==200){
|
||||
this.Positive=res.result
|
||||
this.Positive=res.result;
|
||||
if(res.result.length < 5){
|
||||
for(let i=0;i=(5-res.result.length);i++){
|
||||
this.Positive.push({
|
||||
authorName:'',
|
||||
count:1,
|
||||
id:'',
|
||||
title:'',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
// console.log(this.Positive);
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getCaseData() {
|
||||
apiCase.detail(this.resolveId,true).then(res => {
|
||||
apiCase.details(this.resolveId,true).then(res => {
|
||||
if (res.status == 200) {
|
||||
if (JSON.stringify(res.result) != '{}') {
|
||||
this.caseDetail = res.result;
|
||||
this.caseDetail = res.result.case;
|
||||
this.caseDetail.majorType = this.caseDetail.majorType.split(",")
|
||||
this.getCaseUserDetail();
|
||||
if(this.caseDetail.filePath){
|
||||
//this.pdfPath=this.basePath+this.caseDetail.filePath;
|
||||
@@ -406,6 +504,17 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pdftext{
|
||||
// padding: 0 20px;
|
||||
span{
|
||||
font-size: 22px;
|
||||
color: #ccc;
|
||||
font-weight: bold;
|
||||
line-height: 40px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
.fixd-box-show{
|
||||
display: none;
|
||||
}
|
||||
@@ -419,7 +528,7 @@ export default {
|
||||
}
|
||||
.postfixt-bot{
|
||||
height: 60px;
|
||||
margin-top: 10px;
|
||||
//margin-top: 10px;
|
||||
line-height: 60px;
|
||||
// background-color: #fff;
|
||||
// border: 1px solid #eee;
|
||||
@@ -523,15 +632,15 @@ export default {
|
||||
.item {
|
||||
float: left;
|
||||
margin: 7px 10px 0px 0px;
|
||||
border: 1px solid #c2c3c8;
|
||||
border: 1px solid #2974D6;
|
||||
padding: 0px 10px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
height: 24px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 2px;
|
||||
border-radius: 10px;
|
||||
font-size: 14px;
|
||||
color: #9c9c9c;
|
||||
color: #2974D6;
|
||||
}
|
||||
.item-right {
|
||||
float: right;
|
||||
@@ -542,7 +651,7 @@ export default {
|
||||
// margin: 15px 0;
|
||||
background-color: #f5f7fa;
|
||||
min-height: 300px;
|
||||
padding: 0px 0px 10px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
.content {
|
||||
padding: 10px 0;
|
||||
line-height: 25px;
|
||||
|
||||
@@ -25,13 +25,14 @@
|
||||
<el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;padding-right: 5px;">
|
||||
<div style="line-height: 25px;padding-right: 10px;">
|
||||
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1;">
|
||||
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
|
||||
<el-radio-button v-for="item in domain" :key="item.code" :label="item.code"> {{ item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@@ -40,16 +41,18 @@
|
||||
</el-row>
|
||||
<div class="search-div-collapse">
|
||||
<el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
<el-col :span="24" >
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;padding-right: 5px;">
|
||||
<div style="line-height: 25px;padding-right: 10px;">
|
||||
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1" id="searchBox">
|
||||
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-group style="display:flex;" v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.code" > {{ item.name }} </el-radio-button>
|
||||
<div>
|
||||
<el-radio-button v-for="item in speciData" :key="item.code" :label="item.code" > {{ item.name }} </el-radio-button>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,7 +70,7 @@
|
||||
</el-row>
|
||||
<el-row class="order-div" style="border: 1px solid #EBEEF5;border-bottom:none">
|
||||
<span class="quyer-tag">
|
||||
<el-button type="text" class="order-class" @click="searchData('comments')" :class="{ actice: queryCondition.orderField == 'comments' }">最热</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchData('views')" :class="{ actice: queryCondition.orderField == 'views' }">最热</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchData('')" :class="{ actice: queryCondition.orderField == '' }">最新</el-button>
|
||||
<!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
|
||||
</span>
|
||||
@@ -86,13 +89,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:32px; ">
|
||||
<div style="height:40px;padding-top:5px ">
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author>
|
||||
</div>
|
||||
<div class="keyword-text clearfix">
|
||||
<div style="color:#666" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div>
|
||||
<div style="color:#666" v-if="item.orgDomain == '' && item.orgDomainParent">{{ orgDomainTranslate(item.orgDomainParent) }}</div>
|
||||
<div style="color:#666" v-if="item.majorType">{{ majorTypeTranslate(item.majorType) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain == '' && item.orgDomainParent">{{ orgDomainTranslate(item.orgDomainParent) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-for="item,idx in item.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</div>
|
||||
|
||||
<div v-if="item.keyword1">{{ item.keyword1 }}</div>
|
||||
<div v-if="item.keyword2">{{ item.keyword2 }}</div>
|
||||
<div v-if="item.keyword3">{{ item.keyword3 }}</div>
|
||||
@@ -131,15 +135,12 @@
|
||||
<div style="width: 245px;margin-left: 5px;">
|
||||
<div>
|
||||
<div id="fixd-box">
|
||||
<el-card class="ranking-card" >
|
||||
<!-- <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"> </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`"/>
|
||||
@@ -147,14 +148,11 @@
|
||||
<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" :visible-arrow="false" popper-class="text-tooltip" placement="bottom">
|
||||
<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> -->
|
||||
<!-- <div style="height: 10px;"></div> -->
|
||||
<el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
||||
@@ -169,11 +167,15 @@
|
||||
<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`"/>
|
||||
<div v-if="item.title">
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title + '(' + item.authorName+ ')'" @click="jumpRouter(item)">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -193,11 +195,16 @@
|
||||
<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`"/>
|
||||
<div v-if="item.title">
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<!-- <el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title + '(' + item.authorName+ ')'" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<div :title="item.title+ '(' + item.authorName+ ')'" @click="jumpRouter(item)">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||
</el-tooltip>
|
||||
|
||||
</div>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -209,7 +216,7 @@
|
||||
<el-row :gutter="10">
|
||||
</el-row>
|
||||
<div style="height: 50px;"></div>
|
||||
<el-dialog class="protocol" :visible.sync="protocolDialogVisible" width="30%" :show-close="false">
|
||||
<el-dialog class="protocol" :close-on-click-modal="false" :visible.sync="protocolDialogVisible" width="30%" :show-close="false">
|
||||
<div class="protocol-title">案例查阅及使用用户协议</div>
|
||||
<div class="protocol-content">
|
||||
  本专区内案例为BOE各组织沉淀的通用案例、 组织案例、卓越绩效案例、管理案例、 职级晋升案例、企业文化案例等。 案例内容记录作者亲历的、真实的、已完成的、
|
||||
@@ -272,10 +279,12 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
speciData:[],
|
||||
moreState: 1, // 1 加载更多 2 加载中 3无数据
|
||||
isSeach: false,
|
||||
searchwd: true,
|
||||
searchwd: false,
|
||||
showAll: true, //是否展开全部
|
||||
initHeight:40,//原始 高度
|
||||
searchRecords: [],
|
||||
caseList: {
|
||||
count: 0,
|
||||
@@ -293,11 +302,11 @@ export default {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
isTop: true,
|
||||
orderField: "comments",
|
||||
orderField: "views",
|
||||
// breCommend:null,
|
||||
keyWord: "",
|
||||
majorType: "", //专业分类
|
||||
orgDomain: "", // 组织领域
|
||||
majorType:null, //专业分类
|
||||
orgDomain: null, // 组织领域
|
||||
orderAsc: false
|
||||
},
|
||||
keyWord: "",
|
||||
@@ -313,9 +322,14 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$nextTick(function() {
|
||||
this.closeSearch();
|
||||
});
|
||||
if(this.searchTags.length == 0){
|
||||
this.queryCondition.majorType = null;
|
||||
this.queryCondition.orgDomain = null;
|
||||
};
|
||||
this.specialized();
|
||||
// this.$nextTick(function() {
|
||||
// this.closeSearch();
|
||||
// });
|
||||
if (!this.portalCase.readProtocol) {
|
||||
this.protocolDialogVisible = true;
|
||||
}
|
||||
@@ -332,6 +346,7 @@ export default {
|
||||
// this.getCaseData();
|
||||
this.search();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -347,6 +362,20 @@ export default {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
specialized(){
|
||||
let $this=this;
|
||||
apiCase.majorTypes().then(res =>{
|
||||
if(res.status == 200){
|
||||
this.speciData = res.result;
|
||||
this.$nextTick(function() {
|
||||
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
||||
$this.closeSearch();
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
jumcasedet(item) {
|
||||
this.$router.push({path:'/case/detail',query:{id:item.id}});
|
||||
|
||||
@@ -376,17 +405,18 @@ export default {
|
||||
closeSearch() {
|
||||
this.showAll = !this.showAll;
|
||||
var searchBoxHeght = document.getElementById("searchBox");
|
||||
var searchBoxWidth = document.getElementById("searchBox");
|
||||
if (searchBoxWidth.clientWidth > 950) {
|
||||
this.searchwd = false;
|
||||
//console.log(this.initHeight,'this.initHeight');
|
||||
if(this.initHeight>80){
|
||||
this.searchwd = true;
|
||||
}
|
||||
if (this.showAll == false) {
|
||||
searchBoxHeght.style.height = 70 + "px";
|
||||
} else {
|
||||
searchBoxHeght.style.height = "auto";
|
||||
//console.log(het,'het');
|
||||
if(this.showAll){
|
||||
//searchBoxHeght.style.height = "auto";
|
||||
searchBoxHeght.style.maxHeight = this.initHeight + "px";
|
||||
}else{
|
||||
searchBoxHeght.style.maxHeight = 70 + "px";
|
||||
}
|
||||
},
|
||||
|
||||
getAnkingData() {
|
||||
apiCase.usernameList(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
@@ -487,7 +517,7 @@ export default {
|
||||
}
|
||||
if (scrollTop > 630) {
|
||||
document.querySelector("#fixd-box").style.cssText =
|
||||
"position: fixed;top: -500px;width:245.5px";
|
||||
"position: fixed;top: -250px;width:245.5px";
|
||||
} else {
|
||||
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||
}
|
||||
@@ -529,6 +559,14 @@ export default {
|
||||
if (this.keyWord != this.queryCondition.keyWord) {
|
||||
this.queryCondition.keyWord = this.keyWord;
|
||||
}
|
||||
if(this.queryCondition.orgDomain == 0){
|
||||
this.queryCondition.orgDomain = null
|
||||
}
|
||||
if(this.queryCondition.majorType == 0){
|
||||
this.queryCondition.majorType = null
|
||||
}
|
||||
|
||||
|
||||
this.getCaseData();
|
||||
},
|
||||
async getCaseData() {
|
||||
@@ -543,7 +581,9 @@ export default {
|
||||
if (res.status == 200) {
|
||||
if (res.result.list.length > 0) {
|
||||
this.isSeach = false;
|
||||
console.log(res.result.list)
|
||||
res.result.list.forEach(item => {
|
||||
item.majorType = item.majorType.split(",");
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
@@ -601,13 +641,15 @@ export default {
|
||||
}
|
||||
},
|
||||
tagsClose(tag, index) {
|
||||
|
||||
for (let i in this.queryCondition) {
|
||||
|
||||
if (tag.type === i) {
|
||||
if (i == "majorType") {
|
||||
this.queryCondition.majorType = null;
|
||||
this.queryCondition.majorType = '';
|
||||
}
|
||||
if (i == "orgDomain") {
|
||||
this.queryCondition.orgDomain = null;
|
||||
this.queryCondition.orgDomain = '';
|
||||
}
|
||||
if (i == "keyWord") {
|
||||
this.queryCondition.keyWord = "";
|
||||
@@ -615,9 +657,17 @@ export default {
|
||||
}
|
||||
this.queryCondition[i] = "";
|
||||
this.searchTags.splice(index, 1);
|
||||
if (i == "majorType") {
|
||||
this.queryCondition.majorType = null;
|
||||
}
|
||||
if (i == "orgDomain") {
|
||||
this.queryCondition.orgDomain = null;
|
||||
}
|
||||
|
||||
this.getCaseData();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getCaseUserData(caseList) {
|
||||
let ids = caseList.map((item, index) => {
|
||||
@@ -646,6 +696,17 @@ export default {
|
||||
apiCase.queryPraises(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Popularity = res.result;
|
||||
if(res.result.length < 5){
|
||||
for(let i=0;i=(5-res.result.length);i++){
|
||||
this.Popularity.push({
|
||||
authorName:'',
|
||||
count:1,
|
||||
id:'',
|
||||
title:'',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -653,6 +714,17 @@ export default {
|
||||
apiCase.queryComments(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Positive = res.result;
|
||||
if(res.result.length < 5){
|
||||
for(let i=0;i=(5-res.result.length);i++){
|
||||
this.Positive.push({
|
||||
authorName:'',
|
||||
count:1,
|
||||
id:'',
|
||||
title:'',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -666,11 +738,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
::v-deep .el-checkbox{
|
||||
.el-checkbox__input{
|
||||
.el-checkbox__inner{
|
||||
border: 1px solid #3e3c3c;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
::v-deep .el-radio-button{
|
||||
margin-right:-5px;
|
||||
}
|
||||
::v-deep .el-button {
|
||||
border-radius: 0px;
|
||||
}
|
||||
.case-titdiv {
|
||||
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
.case-tittext {
|
||||
@@ -690,24 +774,23 @@ export default {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.clearfix:after{
|
||||
content: "020";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
content: "020";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
.keyword-text {
|
||||
|
||||
|
||||
div {
|
||||
padding:0px 7px;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
height: 19px;
|
||||
line-height: 19px;
|
||||
font-size: 12px;
|
||||
color: #9c9c9c;
|
||||
border: 1px solid #c2c3c8;
|
||||
padding: 0px 5px;
|
||||
border-radius: 2px;
|
||||
line-height: 22px;
|
||||
font-size: 14px;
|
||||
color: #2974D6;
|
||||
border: 1px solid #2974D6;
|
||||
border-radius: 10px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
@@ -717,6 +800,7 @@ export default {
|
||||
}
|
||||
#searchBox {
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.ranking-title {
|
||||
line-height: 34px;
|
||||
@@ -900,7 +984,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.case-info-summary {
|
||||
margin-top:3px;
|
||||
margin-top:8px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 5px;
|
||||
word-break: break-all;
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<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.overview"></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">
|
||||
@@ -165,15 +165,15 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let id = this.$route.query.id;
|
||||
this.courseInfo.id=id;
|
||||
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
|
||||
//this.stuStusts=0;
|
||||
this.loadResOwners();
|
||||
let id = this.$route.query.id;
|
||||
this.courseInfo.id=id;
|
||||
|
||||
let $this=this;
|
||||
//页面只支取一次,所以先直接写在这里面
|
||||
apiCoursePortal.detail(id).then(rs=>{
|
||||
apiCoursePortal.detail(id,false).then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(rs.result.teachers && rs.result.teachers.length > 0){
|
||||
let userIds=[];
|
||||
@@ -213,10 +213,13 @@ export default {
|
||||
this.showQrimage();
|
||||
this.isSignUp();
|
||||
}else{
|
||||
if(rs.status==204){ //无查看此课程的权限
|
||||
this.courseInfo.name=rs.result.course.name;
|
||||
}
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// this.getResOwnerTree().then(rs=>{
|
||||
// this.resOwnerListMap=rs;
|
||||
// });
|
||||
@@ -231,18 +234,20 @@ export default {
|
||||
showQrimage(){
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/courseDetail?id='+this.courseInfo.id;
|
||||
this.qrcode = urlPre+'/mobile/pages/resource/courseDetail?id='+this.courseInfo.id;
|
||||
console.log(this.qrcode,'qrcode');
|
||||
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||
this.qrcode = urlPre+'/pages/resource/courseDetail?id='+this.courseInfo.id;
|
||||
//console.log(this.qrcode,'qrcode');
|
||||
this.$nextTick(() => {
|
||||
this.crateQrcode();
|
||||
});
|
||||
},
|
||||
crateQrcode(){
|
||||
this.qr = new QRCode('qrcode', {
|
||||
width: 80,
|
||||
height: 80, // 高度
|
||||
width: 150,
|
||||
height: 150, // 高度
|
||||
text: this.qrcode // 二维码内容
|
||||
});
|
||||
this.qr._el.title = '';
|
||||
},
|
||||
showCommentsTotal(total){
|
||||
this.commentsTtoal=total;
|
||||
@@ -312,7 +317,7 @@ export default {
|
||||
list.forEach((item,index)=>{
|
||||
res.result.some(author=>{
|
||||
if(author.aid==item.teacherId){
|
||||
|
||||
|
||||
if(author.avatar){
|
||||
item.avatar=this.fileBaseUrl + author.avatar;
|
||||
}
|
||||
@@ -370,7 +375,7 @@ export default {
|
||||
}
|
||||
|
||||
.course-title{
|
||||
height: 115px;
|
||||
height: 90px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.title {
|
||||
@@ -408,8 +413,8 @@ export default {
|
||||
}
|
||||
|
||||
.label-div {
|
||||
margin: 0px 0;
|
||||
// height: 80px;
|
||||
margin: 5px 0;
|
||||
min-height: 20px;
|
||||
.label-item {
|
||||
padding: 0 7px;
|
||||
margin-right: 8px;
|
||||
@@ -464,8 +469,8 @@ export default {
|
||||
vertical-align:bottom;
|
||||
}
|
||||
.qrcode{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: inline-block;
|
||||
margin: 1px;
|
||||
img {
|
||||
@@ -647,7 +652,7 @@ export default {
|
||||
height: 68px;
|
||||
text-align: center;
|
||||
line-height: 68px;
|
||||
|
||||
|
||||
div{
|
||||
img{
|
||||
width: 68px;
|
||||
|
||||
1401
src/views/portal/course/Index(1).vue
Normal file
@@ -16,7 +16,6 @@
|
||||
<div>
|
||||
<div class="courseware-div" v-if="enrollStutas == 1" style="max-height: 400px;">
|
||||
<course-image :course="courseInfo" class="courseware-img"></course-image>
|
||||
<!-- <el-button type="warning" @click="submitEnroll" class="courseware-enroll-btn">报名后即可开始学习!</el-button> -->
|
||||
</div>
|
||||
<div class="courseware-div" v-else>
|
||||
<div v-if="coursewareInfo.content.contentType == 10" style="position: relative;">
|
||||
@@ -29,19 +28,16 @@
|
||||
@onFullscreen="onFullscreen"
|
||||
@onPlayerEnded="onPlayerEnded">
|
||||
</videoPlayer>
|
||||
<!-- v-if="playerBoxShow" -->
|
||||
<div class="player-box" v-if="playerBoxShow">
|
||||
<div class="player-praise">
|
||||
<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/zhan.png')" />
|
||||
<!-- {{ courseInfo.praises }} -->
|
||||
<div style="color:#fff;cursor: pointer;">赞</div>
|
||||
</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/cai.png')" />
|
||||
<!-- {{ courseInfo.trampleCount }} -->
|
||||
<div style="color:#fff;cursor: pointer;">踩</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,7 +108,6 @@
|
||||
</el-tabs>
|
||||
<div style="display: flex;justify-content: space-between;padding: 10px;align-items: center;">
|
||||
<div class="score">
|
||||
<!-- <el-rate disabled v-model="courseInfo.score" :max="5" :allow-half="true" show-score score-template="{value}"></el-rate> -->
|
||||
<div v-if="enrollStutas == 1 && !scoreInfo.has">
|
||||
<div v-if="courseInfo.score">
|
||||
<el-rate disabled v-model="courseInfo.score"></el-rate>
|
||||
@@ -135,14 +130,14 @@
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;padding-top: 15px;">
|
||||
<div @click="praiseContent" style="cursor: pointer;">
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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">
|
||||
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
|
||||
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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>
|
||||
@@ -155,47 +150,22 @@
|
||||
<interactBar :readonly="enrollStutas==1" :type="1" :data="courseInfo" :views="false" :praises="false" :comments="false"></interactBar>
|
||||
<div class="title title-index">{{courseInfo.name}}</div>
|
||||
<div class="study-count"><span class="num">{{courseInfo.studys}}人学习</span></div>
|
||||
<!-- <div class="course-info-tools-btns">
|
||||
<span style="color: #f8a114;font-size: 36px;">{{toScore(courseInfo.score)}}</span>
|
||||
<span style="font-size: 14px;color: #787878;">分</span>
|
||||
</div> -->
|
||||
<!-- <div class="label"><el-tag class="label-item" effect="plain">了解公司</el-tag></div> -->
|
||||
<div class="label"><el-tag class="label-item" effect="plain">录播课</el-tag></div>
|
||||
<div class="label" v-if="tags.length >0">
|
||||
<el-tag class="label-item" effect="plain" v-for="(item, index) in tags" :key="index">{{item}}</el-tag>
|
||||
<!-- <el-tag class="label-item" effect="plain">中心长</el-tag> -->
|
||||
</div>
|
||||
<div v-if="enrollStutas != 2" class="score" style="padding-top: 135px;justify-content: flex-start;">
|
||||
<!-- <el-rate style="display: inline-block; " disabled v-model="courseInfo.score" score-template="{value}" show-score text-color="#ff8e00"></el-rate>
|
||||
<span style="font-size: 14px;color: #f7ba2a;">分</span> -->
|
||||
<div v-if="courseInfo.score">
|
||||
<el-rate disabled v-model="courseInfo.score"></el-rate>
|
||||
<span class="score-text">{{toScore(courseInfo.score)}}<span style="font-size: 14px;">分</span></span>
|
||||
</div>
|
||||
<div v-else class="score-no">未评分</div>
|
||||
<!-- <el-rate style="display: inline-block; " disabled v-model="courseInfo.score" text-color="#ff8e00"></el-rate>
|
||||
<span style="font-size: 14px;color: #f7ba2a;">{{courseInfo.score}}分</span> -->
|
||||
</div>
|
||||
<!-- <div class="keyword"><el-tag class="label-item" effect="plain">质量</el-tag></div> -->
|
||||
<!--资源归属是一共有三级,这里只显示三级-->
|
||||
<!-- <div class="study-count">资源归属:{{courseInfo.resOwner}}</div> -->
|
||||
<!-- <div class="btn-div" style="padding-top: 70px;">
|
||||
<el-button class="btn" type="primary" v-if="enrollStutas == 1" @click="submitEnroll">立即报名</el-button>
|
||||
</div> -->
|
||||
<!-- 二维码 -->
|
||||
<!-- <div class="qr-code" style="padding-top: 10px;">
|
||||
<div id="qrcode" ref="qrcode" class="qrcode" ></div>
|
||||
<div>手机扫码观看</div>
|
||||
</div> -->
|
||||
<!-- <div style="width: 100px;height:300px" v-if="courseInfo.device == 2 || courseInfo.device == 3"> -->
|
||||
<img class="detail-img" v-show="!showQrcode && (courseInfo.device == 2 || courseInfo.device == 3)" @click="showQrcode = true" src="../../../assets/images/qr.png" alt="" srcset="">
|
||||
<div class="qr-code" v-show="showQrcode && ((courseInfo.device == 2 || courseInfo.device == 3))" style="padding-top: 10px;">
|
||||
<div id="qrcode" ref="qrcode" class="qrcode" @click="showQrcode = false"></div>
|
||||
<!-- <div style="margin-left: 27px">手机扫码观看</div> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</el-col>
|
||||
<!-- 11 -->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row :gutter="10">
|
||||
@@ -233,12 +203,9 @@
|
||||
<div class="teacher" v-for="(item, idx) in teachers" :key="idx" >
|
||||
<div class="teacher-avator">
|
||||
<el-avatar v-if="item.avatar !== ''" :src="item.avatar" shape="circle" :size="50"></el-avatar>
|
||||
<!-- <div class="teacher-text" v-if="item.avatar !== '' "></div> -->
|
||||
<!-- <el-avatar v-if="item.avatar && item.avatar!=''" icon="el-icon-user" shape="square" :size="50"></el-avatar> -->
|
||||
<div class="teacher-text" v-else>
|
||||
<div v-if="sex === 1 "><img src="../../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="teacher-info">
|
||||
@@ -264,23 +231,13 @@ import portalHeader from "@/components/PortalHeader.vue";
|
||||
import comments from "@/components/Portal/comments.vue";
|
||||
import portalFooter from "@/components/PortalFooter.vue";
|
||||
import interactBar from "@/components/Portal/interactBar.vue";
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiCourseFile from "@/api/modules/courseFile.js";
|
||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||
import apiUser from '@/api/system/user.js';
|
||||
import exam from '@/components/Course/exam';
|
||||
import homework from '@/components/Course/homework';
|
||||
import assess from '@/components/Course/assess';
|
||||
import {
|
||||
formatDate,
|
||||
resListMap,
|
||||
toScore,
|
||||
courseType,
|
||||
getType,
|
||||
numberToLetter,
|
||||
correctJudgment,
|
||||
userAvatarText
|
||||
} from "@/utils/tools.js";
|
||||
import {toScore,courseType, getType, numberToLetter, correctJudgment,userAvatarText} from "@/utils/tools.js";
|
||||
import apicourseStudy from "@/api/modules/courseStudy.js";
|
||||
import apiVideoStudy from "@/api/modules/videoStudy.js";
|
||||
import apiCourseGrade from "@/api/modules/courseGrade.js";
|
||||
@@ -288,7 +245,6 @@ import apiPraises from "@/api/modules/praises.js";
|
||||
import apiTrample from "@/api/modules/trample.js";
|
||||
import FileUpload from "@/components/FileUpload/index.vue";
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
// import {resOwnerIndexName} from '@/utils/type.js';
|
||||
import { setTimeout } from "timers";
|
||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
@@ -330,7 +286,6 @@ export default {
|
||||
studyId: "",
|
||||
tags: [],
|
||||
numberToLetter: numberToLetter,
|
||||
// resOwnerListMap: resOwnerIndexName,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
blobUrl:'',//播放的文件地址,新添加,采用blob方式
|
||||
getType: getType,
|
||||
@@ -401,20 +356,18 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let id = this.$route.query.id;
|
||||
this.courseInfo.id = id;
|
||||
this.showQrimage();
|
||||
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
|
||||
this.loadResOwners();
|
||||
let id = this.$route.query.id;
|
||||
this.courseInfo.id = id;
|
||||
let $this = this;
|
||||
//页面只支取一次,所以先直接写在这里面
|
||||
apiCoursePortal.detail(id).then(rs => {
|
||||
apiCoursePortal.detail(id,false).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
// this.courseInfo.score = this.toScore(rs.result.course.score);
|
||||
if(rs.result.course.tags != '') this.tags = rs.result.course.tags.split(",");
|
||||
this.teachers = rs.result.teachers;
|
||||
|
||||
if(rs.result.teachers && rs.result.teachers.length > 0){
|
||||
let userIds=[];
|
||||
let ctoUsers=[];
|
||||
@@ -447,7 +400,6 @@ export default {
|
||||
}
|
||||
//对url进行加密处理
|
||||
$this.createPlayUrl(con.contentRefId,this.curriculumData.url);
|
||||
|
||||
} else if (con.contentType == 40) {
|
||||
//需要读取pdf的路径
|
||||
apiCourseFile.detail($this.coursewareInfo.content.contentRefId).then(cfrs=>{
|
||||
@@ -460,12 +412,10 @@ export default {
|
||||
$this.coursewareInfo.content.content=cfrs.result.filePath;
|
||||
$this.curCFile=2;
|
||||
}
|
||||
|
||||
}else{
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
//let url = this.fileBaseUrl + r.content;
|
||||
}else if(con.contentType ==52){
|
||||
if(con.content.startsWith('\{')){
|
||||
this.conLink=JSON.parse(con.content);
|
||||
@@ -497,6 +447,9 @@ export default {
|
||||
//study info
|
||||
this.loadStudyInfo();
|
||||
} else {
|
||||
if(rs.status==204){ //无查看此课程的权限
|
||||
this.courseInfo.name=rs.result.course.name;
|
||||
}
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
});
|
||||
@@ -506,9 +459,7 @@ export default {
|
||||
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'){
|
||||
@@ -521,21 +472,22 @@ export default {
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
// https://u.boe.com/mobile/pages/resource/microDetail?id=963456709515939840
|
||||
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
this.qrcode =urlPre+ '/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
//console.log(this.qrcode,'qrcode');
|
||||
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||
this.qrcode =urlPre+ '/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
this.$nextTick(() => {
|
||||
this.crateQrcode();
|
||||
});
|
||||
},
|
||||
crateQrcode(){
|
||||
this.qr = new QRCode('qrcode', {
|
||||
width: 80,
|
||||
height: 80, // 高度
|
||||
width: 150,
|
||||
height: 150, // 高度
|
||||
text: this.qrcode // 二维码内容
|
||||
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
|
||||
// background: '#f0f'
|
||||
// foreground: '#ff0'
|
||||
});
|
||||
this.qr._el.title = '';
|
||||
},
|
||||
...mapActions({
|
||||
getResOwnerTree:'resOwner/getResOwnerTree',
|
||||
@@ -630,11 +582,9 @@ export default {
|
||||
this.playerBoxShow = false;
|
||||
//console.log("开始播放");
|
||||
this.isAppendTime=false;
|
||||
|
||||
//视频类的内容,开始播放时才会记录完成情况
|
||||
//2022-05-24修改,判断播放的
|
||||
let $this=this;
|
||||
//console.log(this.curriculumData,'this.curriculumData');
|
||||
//完成类型 completeSetup 0表默认,打开后5秒算学完,1表按进度,2表按时间
|
||||
//完成值(非默认情况下起作用) setupTage
|
||||
if(!$this.coursewareInfo.finish){
|
||||
@@ -673,7 +623,6 @@ export default {
|
||||
if(!completeSecond){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
|
||||
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
@@ -687,7 +636,6 @@ export default {
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//以下是每10秒记录一次学习时长
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
@@ -708,14 +656,12 @@ export default {
|
||||
},
|
||||
audioPlaying(item,currentTime){
|
||||
let intTime=parseInt(currentTime);//秒
|
||||
//console.log("当前播放时间="+item+',currentTime='+intTime);
|
||||
//判断是否完成
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
let completeSecond=this.curriculumData.second;
|
||||
if(!completeSecond){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
|
||||
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
@@ -767,7 +713,6 @@ export default {
|
||||
},
|
||||
audioEnd(){
|
||||
// this.playerBoxShow = true;
|
||||
//console.log("播放结束");
|
||||
if(!this.coursewareInfo.finish){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
@@ -879,7 +824,6 @@ export default {
|
||||
|
||||
//首先从本地读取
|
||||
let duration=studyUtil.getStudyDuration();
|
||||
|
||||
//追加学习时间
|
||||
let $this = this;
|
||||
if(this.appendStartTime == null) {
|
||||
@@ -890,14 +834,10 @@ export default {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//当前进行的时间
|
||||
let now = new Date();
|
||||
let m = now.getTime() - this.appendStartTime.getTime(); //相差的毫秒数
|
||||
let sen = parseInt(m / 1000); //计算秒数
|
||||
|
||||
//console.log(duration,'duration')
|
||||
//console.log(sen,'sen')
|
||||
duration=duration+sen;
|
||||
if(flag){
|
||||
//这个时候才进行存储 ,否则只能是存储在本地
|
||||
@@ -940,14 +880,12 @@ export default {
|
||||
if(res.result.signup) {
|
||||
//this.bootTabActive = 'commnets';//系统自动报名,这里不进行切换了
|
||||
this.studyId = res.result.studyId; //设置学习id
|
||||
|
||||
//需要判断此内容是否已学习完成,如果已学习完成,不需要再请不说了
|
||||
res.result.contents.forEach(con => {
|
||||
if (con.contentId == $this.coursewareInfo.content.id) {
|
||||
$this.coursewareInfo.studyItemId=con.id;
|
||||
$this.coursewareInfo.status=con.status;
|
||||
$this.coursewareInfo.progress=con.progress;
|
||||
|
||||
if(con.contentType==10 || con.contentType==20){
|
||||
if(con.progress==100 || con.status==9){
|
||||
$this.coursewareInfo.finish = true;
|
||||
@@ -957,7 +895,6 @@ export default {
|
||||
}else{
|
||||
$this.coursewareInfo.finish = true; //课件已学习
|
||||
}
|
||||
|
||||
if(con.lastStudyTime){
|
||||
//如果上次课件已经播放完成,此处应该是$this.coursewareInfo.content.duration
|
||||
//也就是从头开开始
|
||||
@@ -1025,7 +962,6 @@ export default {
|
||||
if (rs.status == 200 && rs.result) {
|
||||
this.scoreInfo.has = true;
|
||||
}
|
||||
//console.log(rs.result,'rs.result');
|
||||
});
|
||||
//}
|
||||
apiPraises.has(1, this.courseInfo.id).then(rs => {
|
||||
@@ -1180,12 +1116,8 @@ export default {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.player-box{
|
||||
position: absolute;
|
||||
// top: 62px;
|
||||
// left: 184px;
|
||||
width: 300px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
@@ -1207,46 +1139,23 @@ export default {
|
||||
}
|
||||
}
|
||||
::v-deep .el-tabs__nav-wrap::after {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// bottom: 0;
|
||||
// width: 100%;
|
||||
// height: 2px;
|
||||
background-color: #fff;
|
||||
// z-index: 1;
|
||||
}
|
||||
::v-deep .el-tabs__nav-wrap::after {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// bottom: 0;
|
||||
// width: 100%;
|
||||
// height: 2px;
|
||||
background-color: #fff;
|
||||
// z-index: 1;
|
||||
}
|
||||
.qrcode{
|
||||
display: inline-block;
|
||||
img {
|
||||
width: 132px;
|
||||
height: 132px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-color: #fff; //设置白色背景色
|
||||
padding: 6px; // 利用padding的特性,挤出白边
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.ref-score{
|
||||
// background: #e4e4e4;
|
||||
// width: 64px;
|
||||
// height: 32px;
|
||||
// border-radius: 17px;
|
||||
// line-height: 32px;
|
||||
// // opacity: 0.24;
|
||||
// color: #000;
|
||||
// font-size: 14px;
|
||||
// border: none;
|
||||
// text-align: center;
|
||||
|
||||
}
|
||||
.portal-content ::v-deep .el-rate__icon{
|
||||
font-size: 24px !important;
|
||||
@@ -1389,13 +1298,6 @@ export default {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
// margin-bottom: 50px;
|
||||
// line-height: 20px;
|
||||
// .el-link{
|
||||
// font-size: 30px;
|
||||
// color: #70a5f4;
|
||||
// margin: 0 30px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1413,9 +1315,7 @@ export default {
|
||||
color: #FFB30F ;
|
||||
font-family: "Arial";
|
||||
margin-left: 23px;
|
||||
// font-weight: 600;
|
||||
}
|
||||
// margin-bottom: 19px;
|
||||
.score-no{
|
||||
color: #FFB30F;
|
||||
padding: 5px 0;
|
||||
|
||||
@@ -96,13 +96,10 @@
|
||||
<div v-if="homeworkInfo.info.submitMode==1 || homeworkInfo.info.submitMode==3">
|
||||
<div class="homework-title">上传作业</div>
|
||||
<div class="homework-content">
|
||||
<div v-if="homeworkInfo.filePath!=''">
|
||||
<el-tag closable type="success" @close="removeHomeworkFile">作业附件</el-tag><span style="margin-left: 10px;">请点击下面的提交</span>
|
||||
</div>
|
||||
<div v-else >
|
||||
|
||||
<!-- <div v-else >
|
||||
<el-button type="primary">选择文件并上传</el-button>
|
||||
<!-- <file-upload dir="files" :isShowTip="false" @success="uploadHomeworkFile" @remove="removeHomeworkFile"></file-upload> -->
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div style="text-align: center;padding-bottom: 10px;">
|
||||
@@ -208,7 +205,6 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div style="text-align: center; margin-bottom: 15px" v-if="assessInfo.allowSubmit"><el-button type="primary" @click="assessSubmitFun">提交</el-button></div> -->
|
||||
</div>
|
||||
<!-- <div v-else style="text-align: center;padding-top: 20px;color: red;">此课程无评估</div> -->
|
||||
</div>
|
||||
@@ -302,7 +298,7 @@
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="item.sex == 1 "><img src="../../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="teacher-info">
|
||||
@@ -481,13 +477,14 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.showQrimage();
|
||||
|
||||
this.loadResOwners();
|
||||
let id = this.$route.query.id;
|
||||
this.courseInfo.id = id;
|
||||
this.showQrimage();
|
||||
let $this = this;
|
||||
//页面只支取一次,所以先直接写在这里面
|
||||
apiCoursePortal.detail(id).then(rs => {
|
||||
apiCoursePortal.detail(id,true).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
console.log(rs,'2')
|
||||
this.courseInfo = rs.result.course;
|
||||
@@ -550,8 +547,7 @@ export default {
|
||||
$this.loadAssessInfo();
|
||||
}
|
||||
});
|
||||
//study info
|
||||
// this.loadStudyInfo();
|
||||
|
||||
} else {
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
@@ -561,7 +557,7 @@ export default {
|
||||
showQrimage(row){
|
||||
this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
this.$nextTick(() => {
|
||||
this.crateQrcode();
|
||||
//this.crateQrcode();
|
||||
});
|
||||
},
|
||||
crateQrcode(){
|
||||
@@ -605,21 +601,6 @@ export default {
|
||||
//console.log("当前播放11"+itme);
|
||||
let intTime=parseInt(itme);
|
||||
this.videoPlayingTime=intTime;
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
if(intTime>10 && saveTime==0 && this.coursewareInfo.studyItemId!=''){
|
||||
//记录播放时间
|
||||
//console.log('记录播放时间:'+intTime);
|
||||
let postData={
|
||||
itemId:this.coursewareInfo.studyItemId,
|
||||
videoTime:intTime
|
||||
}
|
||||
apicourseStudy.studyVideoTime(postData).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.log('记录播放时间错误');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
audioPlaying(item){
|
||||
//console.log("当前播放22"+item);
|
||||
@@ -651,11 +632,7 @@ export default {
|
||||
studyId: this.studyId,
|
||||
contentId: this.homeworkInfo.content.id
|
||||
};
|
||||
// apicourseStudy.myHomeworkList(params).then(rs => {
|
||||
// if (rs.status == 200) {
|
||||
// this.homeworkInfo.records = rs.result;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
} else if (tab.name == "test") {
|
||||
if (this.examInfo.records.length == 0) {
|
||||
@@ -663,17 +640,6 @@ export default {
|
||||
studyId: this.studyId,
|
||||
contentId: this.examInfo.content.id
|
||||
};
|
||||
apicourseStudy.myExamList2(params).then(examRs => {
|
||||
if (examRs.status == 200) {
|
||||
this.examInfo.records = examRs.result;
|
||||
let len = examRs.result.length;
|
||||
if (this.examInfo.info.times > len) {
|
||||
this.examInfo.allowSubmit = true;
|
||||
} else {
|
||||
this.examInfo.allowSubmit = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (tab.name == "assess") {
|
||||
//console.log('加载评估信息');,评估只会有一个,所以主直接取
|
||||
@@ -681,22 +647,8 @@ export default {
|
||||
studyId: this.studyId,
|
||||
contentId: this.assessInfo.content.id
|
||||
};
|
||||
// apicourseStudy.myAssessList(params).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// if (res.result.length > 0) {
|
||||
// this.assessInfo.allowSubmit = false;
|
||||
// this.assessInfo.info = JSON.parse(res.result[0].asContent);
|
||||
// }
|
||||
// } else {
|
||||
// this.$message.error(res.message);
|
||||
// }
|
||||
// });
|
||||
} else {
|
||||
//在课件页面,记录开始时间
|
||||
//console.log('记录课件学习信息');
|
||||
if(!this.coursewareInfo.finish){
|
||||
setTimeout(() => {$this.saveStudyInfo();}, 5000);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
saveStudyInfo() {
|
||||
@@ -708,102 +660,20 @@ export default {
|
||||
if (this.coursewareInfo.finish) {
|
||||
return;
|
||||
}
|
||||
// let params = {
|
||||
// studyId: this.studyId, //学习id,
|
||||
// courseId: this.coursewareInfo.content.courseId, //课程id,
|
||||
// contentId: this.coursewareInfo.content.id, //内容id,
|
||||
// contentName: this.coursewareInfo.content.contentName, //内容名称
|
||||
// progress: 100,
|
||||
// contentTotal: this.totalContent
|
||||
// };
|
||||
// apicourseStudy.studyContent(params).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// this.coursewareInfo.finish = true; //课件内容已学习,记录状态
|
||||
// } else {
|
||||
// console.log("记录学习失败:" + res.message + "," + res.error);
|
||||
// }
|
||||
// });
|
||||
|
||||
},
|
||||
startTest() {
|
||||
this.examInfo.startTime = new Date();
|
||||
this.testStart = true;
|
||||
},
|
||||
countTest() {
|
||||
//计算课程的分数
|
||||
let scoreNum = null;
|
||||
this.examInfo.paper.items.forEach(item => {
|
||||
let isFind = true;
|
||||
if (item.type != 102) {
|
||||
item.options.forEach(it => {
|
||||
if (it.answer == true && item.userAnswer == it.id) {
|
||||
scoreNum += item.score;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
item.options.forEach(it => {
|
||||
if (it.answer == false && it.isCheck && it.isCheck == true) {
|
||||
isFind = false;
|
||||
}
|
||||
if (it.answer == true && it.isCheck && it.isCheck == true) {
|
||||
if (isFind) {
|
||||
scoreNum += item.score;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (scoreNum === null) scoreNum = 0;
|
||||
return scoreNum;
|
||||
},
|
||||
// 提交考试
|
||||
submitTest() {
|
||||
let now = new Date();
|
||||
let testScore = this.countTest();
|
||||
let postData = {
|
||||
studyId: this.studyId, //这个哪传来的?
|
||||
studyItemId: this.examInfo.studyItemId, //前面已经给了
|
||||
courseId: this.examInfo.info.courseId,
|
||||
contentId: this.examInfo.info.contentId,
|
||||
testId: this.examInfo.info.id,
|
||||
testName: this.courseInfo.name, //应该是课程的名称 + 内容的名称
|
||||
testDuration: 0,
|
||||
score: testScore,
|
||||
arrange: this.examInfo.info.arrange,
|
||||
passLine: this.examInfo.info.passLine,
|
||||
randomMode: this.examInfo.info.randomMode,
|
||||
paperJson: JSON.stringify({ items: this.examInfo.paper.items }) //原来是对象,这里要也要对象
|
||||
//startTime:formatDate(this.examInfo.startTime),//此时间需要格式化,格式化时间可以放在util中
|
||||
//endTime:formatDate(now),
|
||||
};
|
||||
//计划考试的时长
|
||||
var dateDiff = now.getTime() - this.examInfo.startTime.getTime(); //时间差的毫秒数
|
||||
var minutes = Math.floor(dateDiff / 1000); //计算相差秒数,原来是分钟不行
|
||||
postData.testDuration = minutes;
|
||||
apicourseStudy.saveExam(postData).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.examInfo.records.push(res.result);
|
||||
this.examInfo.studyItemId = res.result.studyItemId; //设置考试的学习记录id
|
||||
this.testStart = false;
|
||||
let len = this.examInfo.records.length;
|
||||
|
||||
if (this.examInfo.info.times > len) {
|
||||
this.examInfo.allowSubmit = true;
|
||||
} else {
|
||||
this.examInfo.allowSubmit = false;
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
showExamAnswer(item) {
|
||||
//显示试卷的答卷信息
|
||||
this.examInfo.detailShow=true;
|
||||
apicourseStudy.myExamPaper(item.id).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.examInfo.detailItems=JSON.parse(rs.result.paper).items
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
testType(type) {
|
||||
//此方法移到tools中
|
||||
@@ -826,145 +696,9 @@ export default {
|
||||
this.homeworkInfo.filePath = res.result.filePath;
|
||||
},
|
||||
removeHomeworkFile() {
|
||||
this.$confirm("您确定要删除已上传的附件吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.homeworkInfo.filePath = "";
|
||||
//从服务器端删除
|
||||
this.$message({ type: "success", message: "删除成功!" });
|
||||
});
|
||||
|
||||
},
|
||||
submitHomework() {
|
||||
//提交作业
|
||||
if (this.homeworkInfo.content.submitMode == 1) {
|
||||
if (this.homeworkInfo.filePath == "") {
|
||||
this.$message.error("请上传作业内容");
|
||||
return;
|
||||
}
|
||||
} else if (this.homeworkInfo.content.submitMode == 2) {
|
||||
if (this.homeworkInfo.answer == "") {
|
||||
this.$message.error("请先填写作业内容");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
this.homeworkInfo.answer == "" &&
|
||||
this.homeworkInfo.filePath == ""
|
||||
) {
|
||||
this.$message.error("请填写或上传作业");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let pamars = {
|
||||
studyItemId: this.homeworkInfo.studyItemId, //学习内容记录id,
|
||||
studyId: this.studyId, //学习id,
|
||||
courseId: this.courseInfo.id, //课程id,
|
||||
contentId: this.homeworkInfo.content.id, //内容id,
|
||||
hwId: this.homeworkInfo.info.id, //作业的id
|
||||
hwName: this.homeworkInfo.info.name, //作业的名称
|
||||
//hwContent: this.homeworkInfo.info.content,//作业的内容,先不要此字段了
|
||||
filePath: this.homeworkInfo.filePath, //文件的路径,可以为空,
|
||||
hwAnswer: this.homeworkInfo.answer, //文本提交的信息
|
||||
score: 0
|
||||
};
|
||||
apicourseStudy.saveHomework(pamars).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$message.success("作业已提交");
|
||||
this.homeworkInfo.filePath = "";
|
||||
this.homeworkInfo.answer = "";
|
||||
this.homeworkInfo.records.push(res.result);
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
appendStudyTime() {
|
||||
if(this.studyId==''){
|
||||
return;
|
||||
}
|
||||
//追加学习时间
|
||||
let $this = this;
|
||||
if (this.appendStartTime == null) {
|
||||
this.appendStartTime = new Date();
|
||||
setTimeout(function() {
|
||||
$this.appendStudyTime();
|
||||
}, 60000);
|
||||
return;
|
||||
}
|
||||
|
||||
let now = new Date();
|
||||
let m = now.getTime() - this.appendStartTime.getTime(); //相差的毫秒数
|
||||
let sen = parseInt(m / 1000); //计算秒数
|
||||
if (sen > 0) {
|
||||
let postData = {
|
||||
studyId: this.studyId,
|
||||
courseId: this.courseInfo.id,
|
||||
contentId: this.coursewareInfo.content.id,
|
||||
studyInfo:
|
||||
this.courseInfo.name +
|
||||
"-" +
|
||||
this.coursewareInfo.content.contentName,
|
||||
duration: sen
|
||||
};
|
||||
apicourseStudy.appendStudyTime(postData).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
$this.appendStartTime = new Date(); //重置开始时间,10秒后再记录一次
|
||||
setTimeout(function() {
|
||||
$this.appendStudyTime();
|
||||
}, 60000);
|
||||
} else {
|
||||
console.log(rs.message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
$this.appendStudyTime();
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
loadStudyInfo() {
|
||||
//获取学习信息
|
||||
let $this = this;
|
||||
this.loadScorePraiseAndTrample();
|
||||
apicourseStudy.studyInfo(this.courseInfo.id).then(res => {
|
||||
if (res.status == 200) {
|
||||
res.result.signup ? (this.enrollStutas = 2) : (this.enrollStutas = 1);
|
||||
if(res.result.signup) {
|
||||
//this.loadScorePraiseAndTrample();
|
||||
this.appendStudyTime();
|
||||
this.studyId = res.result.studyId; //设置学习id
|
||||
//需要判断此内容是否已学习完成,如果已学习完成,不需要再请不说了
|
||||
res.result.contents.forEach(con => {
|
||||
if (con.contentId == $this.coursewareInfo.content.id) {
|
||||
$this.coursewareInfo.finish = true; //课件已学习
|
||||
$this.coursewareInfo.studyItemId=con.id;
|
||||
if(con.lastStudyTime!='' && con.lastStudyTime>0){
|
||||
//当前视频学习的时间
|
||||
$this.videoPlayingTime=con.lastStudyTime;
|
||||
//如果视频已经播放完了
|
||||
}
|
||||
//console.log()
|
||||
}else if (con.contentId == $this.homeworkInfo.content.id) {
|
||||
$this.homeworkInfo.studyItemId = con.id;
|
||||
}else if (con.contentId ==$this.examInfo.content.id) {
|
||||
$this.examInfo.studyItemId = con.id;
|
||||
}else if (con.contentId == $this.assessInfo.content.id) {
|
||||
$this.assessInfo.studyItemId = con.id;
|
||||
}
|
||||
});
|
||||
if (!$this.coursewareInfo.finish) {
|
||||
setTimeout(() => {
|
||||
$this.saveStudyInfo();
|
||||
}, 5000); //5秒后记录学习
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
loadHomeworkInfo() {
|
||||
apiCourse.getHomework(this.homeworkInfo.content.id).then(res => {
|
||||
@@ -1018,137 +752,19 @@ export default {
|
||||
signType: 1,
|
||||
signInfo: ""
|
||||
};
|
||||
let $this = this;
|
||||
// apicourseStudy.signup(pamars).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// this.$message({ type: "success", message: "报名成功" });
|
||||
// this.enrollStutas = 2;
|
||||
// this.appendStudyTime(); //报名成功记录开始时间
|
||||
// //报名成功后,就直接记录课件学习情况,5秋后
|
||||
// setTimeout(() => {
|
||||
// $this.saveStudyInfo();
|
||||
// }, 5000);
|
||||
// } else {
|
||||
// this.$message.error(res.message);
|
||||
// }
|
||||
// });
|
||||
},
|
||||
assessSubmitFun() {
|
||||
let dataJson = JSON.stringify(this.assessInfo.info);
|
||||
//计算评估得分
|
||||
let countStr = this.assessInfo.info.resultCount;
|
||||
let countScore = 0;
|
||||
let pass = true;
|
||||
this.assessInfo.info.items.forEach((item, idx) => {
|
||||
if (item.qType == 1) {
|
||||
if (item.answer == 0) {
|
||||
pass = false;
|
||||
}
|
||||
var str = "[q" + (idx + 1) + "]";
|
||||
countStr = countStr.replace(str, item.answer);
|
||||
}
|
||||
});
|
||||
if (!pass) {
|
||||
this.$message.error("请填写完整再提交");
|
||||
return;
|
||||
}
|
||||
//console.log(countStr);
|
||||
countScore = eval(countStr);
|
||||
//console.log(countScore,"countScore");
|
||||
let pamars = {
|
||||
studyItemId: this.assessInfo.studyItemId, //学习内容记录id,
|
||||
studyId: this.studyId, //学习id,
|
||||
courseId: this.courseInfo.id, //课程id,
|
||||
contentId: this.assessInfo.content.id, //内容id,
|
||||
asContent: dataJson, //内容
|
||||
asScore: countScore //评估得分
|
||||
};
|
||||
apicourseStudy.saveAssess(pamars).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.assessInfo.allowSubmit = false;
|
||||
this.$message.success("提交成功,谢谢您的评估");
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
this.enrollStutas = 2;
|
||||
},
|
||||
loadScorePraiseAndTrample() {
|
||||
//加载是否打过分
|
||||
//if(this.enrollStutas>1){
|
||||
apiCourseGrade.has(this.courseInfo.id).then(rs => {
|
||||
if (rs.status == 200 && rs.result) {
|
||||
this.scoreInfo.has = true;
|
||||
}
|
||||
});
|
||||
//}
|
||||
apiPraises.has(1, this.courseInfo.id).then(rs => {
|
||||
if (rs.status == 200 && rs.result) {
|
||||
this.isPraise = true;
|
||||
}
|
||||
});
|
||||
apiTrample.has(this.courseInfo.id).then(rs => {
|
||||
if (rs.status == 200 && rs.result) {
|
||||
this.isTrample = true;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
addScore() {
|
||||
let postData = {
|
||||
courseId: this.courseInfo.id,
|
||||
studyId: this.studyId,
|
||||
score: this.scoreInfo.score
|
||||
};
|
||||
if (this.scoreInfo.score > 0) {
|
||||
apiCourseGrade.grade(postData).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.$message.success("打分成功,谢谢您的打分");
|
||||
this.scoreInfo.has = true;
|
||||
} else {
|
||||
this.$message.error("打分处理失败,请稍后再试");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
praiseContent() {
|
||||
if(this.enrollStutas==1){
|
||||
this.$message.error("报名学习之后才可以点赞");
|
||||
return;
|
||||
}
|
||||
if(this.isTrample){
|
||||
this.$message.error("您已踩过了,不能再赞了");
|
||||
return;
|
||||
}
|
||||
let postData = {
|
||||
objType: 1,
|
||||
objId: this.courseInfo.id,
|
||||
title: this.courseInfo.name
|
||||
};
|
||||
apiPraises.save(postData).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.$message.success("点赞成功");
|
||||
this.isPraise = true;
|
||||
} else {
|
||||
this.$message.error("点赞失败,请稍后再试");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
treadContent() {
|
||||
if(this.enrollStutas==1){
|
||||
this.$message.error("只有报名学习后才可以踩");
|
||||
return;
|
||||
}
|
||||
if(this.isPraise){
|
||||
this.$message.error("您已赞过了,不能再踩了");
|
||||
return;
|
||||
}
|
||||
apiTrample.trample(this.courseInfo.id).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.$message.success("已踩");
|
||||
this.isTrample = true;
|
||||
} else {
|
||||
this.$message.error("踩失败,请稍后再试");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
loadAuthorInfo(list,ids){ //加载作者信息,头像,机构信息
|
||||
if(ids.length==0){
|
||||
@@ -1164,13 +780,13 @@ export default {
|
||||
// this.tearsex = item.sex;
|
||||
console.log(this.tearsex)
|
||||
console.log(author.sex,item.sex,'sexs')
|
||||
|
||||
|
||||
// console.log(item.sex)
|
||||
if(author.avatar){
|
||||
item.avatar=this.fileBaseUrl + author.avatar;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}else{
|
||||
@@ -1432,7 +1048,7 @@ export default {
|
||||
.num {
|
||||
color: #444444;
|
||||
font-size: 16px;
|
||||
|
||||
|
||||
}
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<el-button @click="widthOpen(contentData.content)" type="primary">新窗口打开</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="showiframe">
|
||||
<iframe :src="contentData.content" style="width: 100%;border:0px;min-height: 473px;" frameborder="0"></iframe>
|
||||
</div> -->
|
||||
@@ -265,26 +265,26 @@ export default {
|
||||
//console.log("播放结束");
|
||||
},
|
||||
onPlayerPlaying(itme){
|
||||
//console.log("当前播放"+itme);
|
||||
//console.log("当前播放11"+itme);
|
||||
if(this.contentData.contentType && this.contentData.contentType==10){
|
||||
let intTime=parseInt(itme);
|
||||
this.contentData.lastStudyTime=intTime;
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
if(intTime>10 && saveTime==0 && this.contentData.studyItemId!=''){
|
||||
//记录播放时间
|
||||
//console.log('记录播放时间:'+intTime);
|
||||
let postData={
|
||||
itemId:this.contentData.studyItemId,
|
||||
videoTime:intTime
|
||||
}
|
||||
apiStudy.studyVideoTime(postData).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.log('记录播放时间错误');
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// //console.log("当前播放"+itme);
|
||||
// //console.log("当前播放11"+itme);
|
||||
// if(this.contentData.contentType && this.contentData.contentType==10){
|
||||
// let intTime=parseInt(itme);
|
||||
// this.contentData.lastStudyTime=intTime;
|
||||
// let saveTime=Math.floor(intTime%10);
|
||||
// if(intTime>10 && saveTime==0 && this.contentData.studyItemId!=''){
|
||||
// //记录播放时间
|
||||
// //console.log('记录播放时间:'+intTime);
|
||||
// let postData={
|
||||
// itemId:this.contentData.studyItemId,
|
||||
// videoTime:intTime
|
||||
// }
|
||||
// apiStudy.studyVideoTime(postData).then(rs=>{
|
||||
// if(rs.status!=200){
|
||||
// console.log('记录播放时间错误');
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
},
|
||||
audioPlaying(item){
|
||||
@@ -300,7 +300,7 @@ export default {
|
||||
//console.log("播放结束");
|
||||
},
|
||||
loadData() {
|
||||
apiCoursePortal.detail(this.courseId).then(rs=>{
|
||||
apiCoursePortal.detail(this.courseId,true).then(rs=>{
|
||||
if(rs.status==200){
|
||||
//设置必须的字段
|
||||
rs.result.sections.forEach(sec=>{
|
||||
@@ -327,88 +327,12 @@ export default {
|
||||
}
|
||||
this.contentList=rs.result.contents;
|
||||
this.totalContent=rs.result.contents.length;
|
||||
//加载学习的数据
|
||||
this.loadStudyData();
|
||||
|
||||
}else{
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
loadStudyData() {
|
||||
let $this=this;
|
||||
apiStudy.studyInfo(this.courseId).then(res=>{
|
||||
if(res.status == 200) {
|
||||
if(res.result.signup){
|
||||
// this.loadScorePraiseAndTrample();
|
||||
this.studyId = res.result.studyId;
|
||||
//对已学习的内容进行比对,重要的字段, 学习内容id,在后缀的
|
||||
let playIndex=-1;
|
||||
this.contentList.forEach((con,conIdx)=>{
|
||||
res.result.contents.forEach((scon,sconIdx)=>{
|
||||
if(scon.contentId==con.id){
|
||||
//定位显示的内容
|
||||
if($this.initContentId!='' && $this.initContentId==scon.contentId){
|
||||
//定位当前学习的内容,是上一次学习的内容
|
||||
playIndex=conIdx;
|
||||
}else{
|
||||
if(sconIdx==0 && con.contentType<52){
|
||||
playIndex=conIdx;
|
||||
}
|
||||
}
|
||||
//console.log(scon.contentId,con.id);
|
||||
con.lastStudyTime=scon.lastStudyTime;
|
||||
con.status=9;//因为现在是只要有学习过的,就代表已学习完成,所以直接设置学习完成状态,
|
||||
con.studyItemId=scon.id;//这个就是学习内容(条目)的id
|
||||
//console.log(scon.id,"scon.id");
|
||||
//console.log(con,"scon.id");
|
||||
}
|
||||
})
|
||||
});
|
||||
//如果没有,就定位第一项内容
|
||||
if(playIndex==-1){
|
||||
this.showRes(this.contentList[0]);
|
||||
}else{
|
||||
this.showRes(this.contentList[playIndex]);
|
||||
}
|
||||
}else{
|
||||
// this.$message.error('您还未报名');
|
||||
// if(this.courseInfo.type==10){
|
||||
// location.href = this.webBaseUrl + "/course/micro?id="+this.courseId;
|
||||
// }else{
|
||||
// location.href = this.webBaseUrl + "/course/detail?id="+this.courseId;
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
saveStudyInfo() { //记录课件学习信息
|
||||
if(this.contentData.contentType>=60){
|
||||
//只有在课件页面停留超过5秒才会记录
|
||||
return;
|
||||
}
|
||||
if(this.contentData.status==9){
|
||||
//已学习完的,不用再添加
|
||||
return;
|
||||
}
|
||||
let params ={
|
||||
studyId: this.studyId,//学习id,
|
||||
courseId: this.courseId,//课程id,
|
||||
contentId: this.contentData.id,//内容id,
|
||||
contentName: this.contentData.contentName,//内容名称
|
||||
progress: 100,
|
||||
contentTotal:this.totalContent
|
||||
}
|
||||
apiStudy.studyContent(params).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.contentData.status=9;//完成
|
||||
this.contentData.studyItemId=res.result;//学习记录id
|
||||
}else{
|
||||
console.log('记录学习失败:'+res.message+','+res.error);
|
||||
}
|
||||
})
|
||||
},
|
||||
ctabChange(e) {
|
||||
console.log(e);
|
||||
},
|
||||
@@ -439,91 +363,21 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
// else if(r.contentType == 61) {// 考试
|
||||
|
||||
// }else if(r.contentType == 60) {// 作业
|
||||
|
||||
// }else if(r.contentType == 62) {// 评估
|
||||
// //评估不需要查找,因为内容就是content中
|
||||
// console.log('评估处理');
|
||||
// }
|
||||
this.contentData = r;
|
||||
// setTimeout(function(){$this.saveStudyInfo();},5000);//5秒后记录学习完成
|
||||
|
||||
this.contentData = r;
|
||||
},
|
||||
videoEnd() {
|
||||
//视频播放完成后的处理
|
||||
},
|
||||
handleChange(val) {
|
||||
console.log(val);
|
||||
},
|
||||
// loadScorePraiseAndTrample(){
|
||||
// //加载是否请过分
|
||||
// apiCourseGrade.has(this.courseId).then(rs=>{
|
||||
// if(rs.status==200 && rs.result){
|
||||
// this.scoreInfo.has=true;
|
||||
// }
|
||||
// });
|
||||
// apiPraises.has(1,this.courseId).then(rs=>{
|
||||
// if(rs.status==200 && rs.result){
|
||||
// this.isPraise=true;
|
||||
// }
|
||||
// });
|
||||
// apiTrample.has(this.courseId).then(rs=>{
|
||||
// if(rs.status==200 && rs.result){
|
||||
// this.isTrample=true;
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
addScore(){
|
||||
let postData={
|
||||
courseId:this.courseInfo.id,
|
||||
studyId:this.studyId,
|
||||
score:this.scoreInfo.score
|
||||
}
|
||||
if(this.scoreInfo.score>0){
|
||||
apiCourseGrade.grade(postData).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.$message.success('打分成功,谢谢您的打分');
|
||||
this.scoreInfo.has=true;
|
||||
}else{
|
||||
this.$message.error('打分处理失败,请稍后再试');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
praiseContent(){
|
||||
if(this.isTrample){
|
||||
this.$message.error("您已踩过了,不能再赞了");
|
||||
return;
|
||||
}
|
||||
let postData={
|
||||
objType:1,
|
||||
objId:this.courseId,
|
||||
title:this.courseInfo.name
|
||||
}
|
||||
apiPraises.save(postData).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.$message.success('点赞成功');
|
||||
this.isPraise=true;
|
||||
}else{
|
||||
this.$message.error('点赞失败,请稍后再试');
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
treadContent(){
|
||||
if(this.isPraise){
|
||||
this.$message.error("您已赞过了,不能再踩了");
|
||||
return;
|
||||
}
|
||||
apiTrample.trample(this.courseId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
this.$message.success('已踩');
|
||||
this.isTrample=true;
|
||||
}else{
|
||||
this.$message.error('踩失败,请稍后再试');
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
loadAuthorInfo(list,ids){ //加载作者信息,头像,机构信息
|
||||
if(ids.length==0){
|
||||
@@ -564,7 +418,7 @@ img{
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
// display: -webkit-box;
|
||||
// display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1; /* 这里是超出几行省略 */
|
||||
}
|
||||
@@ -615,7 +469,7 @@ word-break:break-all;
|
||||
}
|
||||
}
|
||||
.collapse-title {
|
||||
|
||||
|
||||
flex: 1 0 90%;
|
||||
order: 1;
|
||||
}
|
||||
@@ -746,7 +600,7 @@ justify-content: space-between;
|
||||
padding-left: 20px;
|
||||
color: #5c5c5c;
|
||||
span{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export default {
|
||||
apiQa
|
||||
.saveAnswer({
|
||||
qid: this.answer.id,
|
||||
content: this.answer.inputValue
|
||||
content: this.answer.inputValue.trim()
|
||||
})
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
|
||||
@@ -132,14 +132,14 @@
|
||||
</div>
|
||||
<div style="display: flex;justify-content: flex-end;cursor: pointer;">
|
||||
<div @click="praiseContent">
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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">
|
||||
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<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>
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
|
||||
<!-- 标题 -->
|
||||
<div style="flex:1;line-height:20px" class="mltit">
|
||||
<div style="flex:1;line-height:21px" class="mltit">
|
||||
<el-tooltip class="item" effect="light" :content="item.section.name" placement="top-start">
|
||||
<span style="font-size:16px;font-weight: 700;color: #343434;margin-left: 15px;">
|
||||
{{ item.section.name }}</span>
|
||||
@@ -300,7 +300,7 @@ export default {
|
||||
getType: getType,
|
||||
ctabName: 'catalog',
|
||||
resType: null,
|
||||
activeNames: [0, 1, 2, 3, 4],
|
||||
activeNames: [0, 1, 2, 3, 4,5,6,7,8,9],
|
||||
scoreInfo: {
|
||||
dlgShow: false,
|
||||
score: 5,
|
||||
@@ -313,7 +313,8 @@ export default {
|
||||
isAppendTime:false,//是否追加学习时长
|
||||
appentId:'',//当前追加的学习时长的id
|
||||
appentInterval:30000,//追加学习时间的间隔 30秒加一次
|
||||
handleTimeout:null
|
||||
handleTimeout:null,
|
||||
completed:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -325,6 +326,7 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
catalogTree() {
|
||||
let treeList = [];
|
||||
this.completed = [];
|
||||
let $this = this;
|
||||
$this.sectionList.forEach(sec => {
|
||||
let treeNode = { section: sec, children: [] };
|
||||
@@ -338,6 +340,9 @@ export default {
|
||||
finishCount++;
|
||||
}
|
||||
}
|
||||
if(c.status == 9) {
|
||||
$this.completed.push(c.id);
|
||||
}
|
||||
treeNode.children.push(c);
|
||||
}
|
||||
});
|
||||
@@ -364,7 +369,7 @@ export default {
|
||||
}else{
|
||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
||||
}
|
||||
console.log(this.blobUrl,'this.blobUrl');
|
||||
//console.log(this.blobUrl,'this.blobUrl');
|
||||
},
|
||||
widthOpen(url) {
|
||||
window.open(url, '_blank');
|
||||
@@ -449,17 +454,17 @@ export default {
|
||||
this.playerBoxShow = false;
|
||||
let $this=this;
|
||||
//console.log(this.contentData.status,'this.contentData.status');
|
||||
if(this.contentData.status<9){
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
//console.log(completeType,'completeType');
|
||||
if(completeType==0){
|
||||
//默认5秒后学习完成.
|
||||
$this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
|
||||
}else{
|
||||
//先记录进行中的学习内容
|
||||
this.saveStudyItem();
|
||||
}
|
||||
}
|
||||
// if(this.contentData.status<9){
|
||||
// let completeType=this.curriculumData.completeSetup;
|
||||
// //console.log(completeType,'completeType');
|
||||
// if(completeType==0){
|
||||
// //默认5秒后学习完成.
|
||||
// $this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
|
||||
// }else{
|
||||
// //先记录进行中的学习内容
|
||||
// this.saveStudyItem();
|
||||
// }
|
||||
// }
|
||||
},
|
||||
onPlayerPause() {
|
||||
//console.log("暂停");
|
||||
@@ -475,15 +480,15 @@ export default {
|
||||
this.appendStartTime=null;
|
||||
//console.log("当前播放"+itme);
|
||||
//console.log("当前播放11"+itme);
|
||||
if (this.contentData.contentType && this.contentData.contentType == 10) {
|
||||
if (this.contentData.contentType && this.contentData.contentType == 10){
|
||||
let intTime = parseInt(itme);
|
||||
//判断是否完成
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
let completeSecond=this.curriculumData.second;
|
||||
if(!completeSecond){
|
||||
if(!completeSecond || completeType==0){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
if(completeType>0 && this.contentData.status<9){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(this.contentData.status<9){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
let videDuration=this.contentData.duration;
|
||||
@@ -491,7 +496,7 @@ export default {
|
||||
if(percent>=finishPercent){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}else if(completeType==2){
|
||||
}else{
|
||||
if(intTime>=completeSecond){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
@@ -520,10 +525,10 @@ export default {
|
||||
//判断是否完成
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
let completeSecond=this.curriculumData.second;
|
||||
if(!completeSecond){
|
||||
if(!completeSecond || completeType==0){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
if(completeType>0 && this.contentData.status<9){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(this.contentData.status<9){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
let videDuration=this.contentData.duration;
|
||||
@@ -531,7 +536,7 @@ export default {
|
||||
if(percent>=finishPercent){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}else if(completeType==2){
|
||||
}else{
|
||||
if(intTime>=completeSecond){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
@@ -556,16 +561,16 @@ export default {
|
||||
audioPlay() {
|
||||
//console.log("开始播放");
|
||||
let $this=this;
|
||||
if(this.contentData.status!=9){
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
if(completeType==0){
|
||||
//默认5秒后学习完成.
|
||||
$this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
|
||||
}else{
|
||||
//先记录进行中的学习内容
|
||||
this.saveStudyItem();
|
||||
}
|
||||
}
|
||||
// if(this.contentData.status!=9){
|
||||
// let completeType=this.curriculumData.completeSetup;
|
||||
// if(completeType==0){
|
||||
// //默认5秒后学习完成.
|
||||
// $this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
|
||||
// }else{
|
||||
// //先记录进行中的学习内容
|
||||
// this.saveStudyItem();
|
||||
// }
|
||||
// }
|
||||
},
|
||||
audioPause() {
|
||||
//console.log("暂停");
|
||||
@@ -575,10 +580,9 @@ export default {
|
||||
if(this.contentData.status<9){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
|
||||
},
|
||||
loadData() {
|
||||
apiCoursePortal.detail(this.courseId).then(rs => {
|
||||
apiCoursePortal.detail(this.courseId,false).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
//设置必须的字段
|
||||
rs.result.sections.forEach(sec => {
|
||||
@@ -648,8 +652,9 @@ export default {
|
||||
});
|
||||
});
|
||||
//如果没有,就定位第一项内容
|
||||
if (playIndex == -1) {
|
||||
this.showRes(this.contentList[0]);
|
||||
if (playIndex === -1) {
|
||||
// this.showRes(this.contentList[0]);
|
||||
this.showRes(this.catalogTree[0].children[0])
|
||||
} else {
|
||||
this.showRes(this.contentList[playIndex]);
|
||||
}
|
||||
@@ -785,8 +790,9 @@ export default {
|
||||
//console.log(e);
|
||||
},
|
||||
showRes(r,i,index) {//i:子节下标,index:章下标
|
||||
if(i!=undefined && index!=undefined) {
|
||||
if(i!=undefined && index!=undefined && r.status<9) {
|
||||
if(this.courseInfo.orderStudy) {
|
||||
//判断上个是否学完
|
||||
if(i == 0) {
|
||||
if(index > 0) { //第一章 第一节
|
||||
let preCatalog=this.catalogTree[index-1];
|
||||
@@ -799,9 +805,31 @@ export default {
|
||||
}else{
|
||||
let pre=this.catalogTree[index].children[i-1];
|
||||
if(pre.status!=9){
|
||||
this.$message.warning('请按顺序学习!');
|
||||
this.$message.warning('请按顺序学习!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断是否是第一个未学完的
|
||||
let isAllow=false;
|
||||
let has=this.catalogTree.some(treeNode=>{
|
||||
let hasNo=treeNode.children.some(child=>{
|
||||
if(child.status<9){
|
||||
if(child.id==r.id){
|
||||
isAllow=true;
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
return hasNo;
|
||||
});
|
||||
if(has){
|
||||
if(!isAllow){
|
||||
this.$message.warning('请按顺序学习!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let protocol=window.location.protocol;
|
||||
let idx=this.fileBaseUrl.indexOf('://');
|
||||
if(!this.fileBaseUrl.startsWith(protocol)){
|
||||
this.fileBaseUrl=protocol+this.fileBaseUrl.substring(idx+1);
|
||||
}
|
||||
this.loadData();
|
||||
},
|
||||
methods:{
|
||||
|
||||
@@ -511,6 +511,9 @@ export default {
|
||||
return author.aid == item.question.sysCreateAid;
|
||||
});
|
||||
item = Object.assign(item, obj);
|
||||
if(item.orgInfo){
|
||||
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
@@ -597,6 +600,9 @@ export default {
|
||||
return author.aid == item.cases.authorId;
|
||||
});
|
||||
item = Object.assign(item, obj);
|
||||
if(item.orgInfo){
|
||||
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
@@ -636,6 +642,9 @@ export default {
|
||||
return author.aid == item.sysCreateAid;
|
||||
});
|
||||
item = Object.assign(item, obj);
|
||||
if(item.orgInfo){
|
||||
item.orgInfo=cutFullName(obj.orgInfo,1);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
|
||||