mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 13:56:43 +08:00
Compare commits
3 Commits
master_new
...
zcwy_0822_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b3064f2ab | ||
|
|
c5f6f5c83e | ||
|
|
45027ca77e |
Binary file not shown.
@@ -338,7 +338,7 @@ const myExamList = function(itemId) {
|
|||||||
contentId:''
|
contentId:''
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myExamList2 = function(data) {
|
const myExamList2 = function(data) {
|
||||||
return ajax.post('/xboe/school/study/exam/list-study',data);
|
return ajax.post('/xboe/school/study/exam/list-study',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,10 +389,7 @@ const followIds=function (data){
|
|||||||
const myStudysFromES=function (data){
|
const myStudysFromES=function (data){
|
||||||
return ajax.post('/xboe/school/study/es/search',data);
|
return ajax.post('/xboe/school/study/es/search',data);
|
||||||
}
|
}
|
||||||
//导出作业
|
|
||||||
const homeworkExport=function (data){
|
|
||||||
return ajax.get(`/xboe/m/course/portal/export?contentId=${data.contentId}&courseName=${data.courseName}`);
|
|
||||||
}
|
|
||||||
/**根据id集合查询,传入的是id数组*/
|
/**根据id集合查询,传入的是id数组*/
|
||||||
const findByIds=function (ids){
|
const findByIds=function (ids){
|
||||||
return ajax.postJson('/xboe/school/study/es/list-by-ids',ids);
|
return ajax.postJson('/xboe/school/study/es/list-by-ids',ids);
|
||||||
@@ -428,7 +425,6 @@ export default {
|
|||||||
myExamList2,
|
myExamList2,
|
||||||
myCourseStudy,
|
myCourseStudy,
|
||||||
myStudysFromES,
|
myStudysFromES,
|
||||||
homeworkExport,
|
|
||||||
findByIds,
|
findByIds,
|
||||||
deleteSignUp,
|
deleteSignUp,
|
||||||
ids,
|
ids,
|
||||||
|
|||||||
@@ -72,9 +72,6 @@ const querypaper = function(data) {
|
|||||||
const getPaperContent = function(id) {
|
const getPaperContent = function(id) {
|
||||||
return ajax.get('/xboe/m/exam/paper/paper-content?id=' + id);
|
return ajax.get('/xboe/m/exam/paper/paper-content?id=' + id);
|
||||||
}
|
}
|
||||||
const newPaperContent = function(id){
|
|
||||||
return ajax.get('/xboe/m/course/content/exam/paper-content?courseExamId='+id);
|
|
||||||
}
|
|
||||||
export default {
|
export default {
|
||||||
detail,
|
detail,
|
||||||
update,
|
update,
|
||||||
@@ -83,7 +80,6 @@ export default {
|
|||||||
querylist,
|
querylist,
|
||||||
querypaper,
|
querypaper,
|
||||||
getPaperContent,
|
getPaperContent,
|
||||||
newPaperContent,
|
|
||||||
batchImportCount,
|
batchImportCount,
|
||||||
batchImportData
|
batchImportData
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import ajax from '@/utils/xajax.js'
|
import ajax from '@/utils/xajax.js'
|
||||||
import ajax2 from '../unionAjax.js';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按名称查询
|
* 按名称查询
|
||||||
@@ -9,9 +9,7 @@ const findByName = function(name) {
|
|||||||
return ajax.get('/xboe/teacher/name?name=' + name);
|
return ajax.get('/xboe/teacher/name?name=' + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
const findByNameNew = function(name) {
|
|
||||||
return ajax2.get('/manageApi/admin/teacher/selectTeacher?name=' + name);
|
|
||||||
}
|
|
||||||
const updateTeacher=function(data){
|
const updateTeacher=function(data){
|
||||||
return ajax.postJson('/xboe/teacher/update-teacher',data);
|
return ajax.postJson('/xboe/teacher/update-teacher',data);
|
||||||
}
|
}
|
||||||
@@ -219,7 +217,7 @@ export default {
|
|||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
detail,
|
detail,
|
||||||
findByNameNew,
|
findByName,
|
||||||
updateSysId,
|
updateSysId,
|
||||||
has,
|
has,
|
||||||
start,
|
start,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 212 KiB |
BIN
src/assets/images/hotforum/04.png
Normal file
BIN
src/assets/images/hotforum/04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
@@ -110,7 +110,7 @@ body {margin: 0px;padding: 0px;}
|
|||||||
padding-bottom:12px
|
padding-bottom:12px
|
||||||
}
|
}
|
||||||
.ranking-data{
|
.ranking-data{
|
||||||
min-height: 246px;
|
min-height: 196px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ body {margin: 0px;padding: 0px;}
|
|||||||
padding-bottom:12px
|
padding-bottom:12px
|
||||||
}
|
}
|
||||||
.ranking-data{
|
.ranking-data{
|
||||||
min-height: 246px;
|
min-height: 196px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
// overflow-y: auto;
|
// overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--弹出窗口设置-->
|
<!--弹出窗口设置-->
|
||||||
<div>
|
<div>
|
||||||
<div v-for="pop in popupList" :key="pop.id">
|
<div v-for="pop in popupList" :key="pop.id">wwww
|
||||||
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="pop.show" :append-to-body="true" >
|
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="pop.show" :append-to-body="true" >
|
||||||
<div style="text-align: center;position: relative;">
|
<div style="text-align: center;position: relative;">
|
||||||
<!-- <span style="float: right;" @click="pop.show = false"><i style="font-size: 28px;color: #000000;" class="el-icon-close"></i></span> -->
|
<!-- <span style="float: right;" @click="pop.show = false"><i style="font-size: 28px;color: #000000;" class="el-icon-close"></i></span> -->
|
||||||
|
|||||||
@@ -637,9 +637,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.teacherList = rs.result.teachers;
|
this.teacherList = rs.result.teachers;
|
||||||
this.teacherName = rs.result.teachers;
|
this.teacherName = rs.result.teachers;
|
||||||
this.teacher = rs.result.teachers.map(item => {
|
this.teacher = rs.result.teachers.map(res => res.teacherName);
|
||||||
return `${item.teacherName}(${item.userNo})`
|
|
||||||
});
|
|
||||||
this.totalContent = rs.result.contents.length; //计算总内容数
|
this.totalContent = rs.result.contents.length; //计算总内容数
|
||||||
if (this.courseInfo.tags != "") {
|
if (this.courseInfo.tags != "") {
|
||||||
this.showTags = this.courseInfo.tags.split(",");
|
this.showTags = this.courseInfo.tags.split(",");
|
||||||
|
|||||||
@@ -681,9 +681,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.teacherList = rs.result.teachers;
|
this.teacherList = rs.result.teachers;
|
||||||
this.teacherName = rs.result.teachers;
|
this.teacherName = rs.result.teachers;
|
||||||
this.teacher = rs.result.teachers.map(item => {
|
this.teacher = rs.result.teachers.map(item => item.teacherName);
|
||||||
return `${item.teacherName}(${item.userNo})`
|
|
||||||
});
|
|
||||||
this.showTags = this.courseInfo.tags.split(",");
|
this.showTags = this.courseInfo.tags.split(",");
|
||||||
if (rs.result.course.resOwner3 == "") {
|
if (rs.result.course.resOwner3 == "") {
|
||||||
this.resOwnerArray = [
|
this.resOwnerArray = [
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<div class="choice-box" v-if="teacherDownList.length>0">
|
<div class="choice-box" v-if="teacherDownList.length>0">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + '(' + te.teacherCode + ')'}}</li>
|
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + te.teacherCode}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-select
|
<!-- <el-select
|
||||||
@@ -88,15 +88,15 @@
|
|||||||
if (this.teacherValues !== '') {
|
if (this.teacherValues !== '') {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const { data, message, code } = await apiTeacher.findByNameNew(this.teacherValues);
|
const { result, message, status } = await apiTeacher.findByName(this.teacherValues);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (code === 200) {
|
if (status === 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
data.forEach(item => {
|
result.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
teacherId: item.id,
|
teacherId: item.id,
|
||||||
teacherName: item.name,
|
teacherName: item.name,
|
||||||
teacherCode: item.mobile
|
teacherCode: item.code
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.teacherDownList = list;
|
this.teacherDownList = list;
|
||||||
|
|||||||
@@ -85,28 +85,6 @@
|
|||||||
<el-form-item label="考试说明">
|
<el-form-item label="考试说明">
|
||||||
<el-input type="textarea" show-word-limit v-model="examInfo.info" placeholder="关于考试的说明(限255字以内)" maxlength="255"></el-input>
|
<el-input type="textarea" show-word-limit v-model="examInfo.info" placeholder="关于考试的说明(限255字以内)" maxlength="255"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="随机模式">
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-radio-group v-model="examInfo.randomMode">
|
|
||||||
<el-radio :label="true">是</el-radio>
|
|
||||||
<el-radio :label="false">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20" v-if="examInfo.randomMode&&examInfo.paperType==1">
|
|
||||||
<el-form-item label="数量">
|
|
||||||
<el-input-number v-model="examInfo.qnum" :min="1" :max="examPaper.items.length" label="数量"></el-input-number>
|
|
||||||
<span style="margin-left:10px;" v-if="examPaper.items.length==0">先添加试题</span>
|
|
||||||
<span style="margin-left:10px;" v-if="examPaper.items.length>0">试卷有 {{examPaper.items.length}} 道试题</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20" v-if="examInfo.randomMode&&examInfo.paperType==2">
|
|
||||||
<el-form-item label="数量">
|
|
||||||
<el-input-number v-model="examInfo.qnum" :min="1" :max="usePaper.counts" label="数量"></el-input-number>
|
|
||||||
<span style="margin-left:10px;" v-if="usePaper.counts==0">先选择试卷</span>
|
|
||||||
<span style="margin-left:10px;" v-if="usePaper.counts>0">试卷有 {{usePaper.counts}} 道试题</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="examInfo.paperType==1">
|
<div v-if="examInfo.paperType==1">
|
||||||
@@ -307,9 +285,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!this.examInfo.randomMode){
|
|
||||||
this.examInfo.qnum = 0
|
|
||||||
}
|
|
||||||
this.$emit("save",this.examInfo);
|
this.$emit("save",this.examInfo);
|
||||||
},
|
},
|
||||||
deleteExam(){ //删除
|
deleteExam(){ //删除
|
||||||
@@ -318,8 +294,6 @@
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.examInfo.randomMode = false;
|
|
||||||
this.examInfo.qnum = 0;
|
|
||||||
this.$emit("remove",this.examInfo);
|
this.$emit("remove",this.examInfo);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
||||||
|
|||||||
@@ -326,10 +326,11 @@ export default {
|
|||||||
return qitems;
|
return qitems;
|
||||||
},
|
},
|
||||||
startTest(){
|
startTest(){
|
||||||
apiExamPaper.newPaperContent(this.info.id).then(res=>{
|
|
||||||
if(res.error == ''&&res.result != ''){
|
|
||||||
if(this.info.paperType==2){
|
if(this.info.paperType==2){
|
||||||
this.examPaper.json=res.result;
|
apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{
|
||||||
|
if(rs.status=200){
|
||||||
|
this.examPaper.json=JSON.parse(rs.result);
|
||||||
|
//console.log(this.examPaper.json,'this.examPaper.json');
|
||||||
let qitems=this.convertToItems(this.examPaper.json);
|
let qitems=this.convertToItems(this.examPaper.json);
|
||||||
this.paper ={items:qitems};
|
this.paper ={items:qitems};
|
||||||
this.total=qitems.length;
|
this.total=qitems.length;
|
||||||
@@ -339,8 +340,13 @@ export default {
|
|||||||
this.timer=setInterval(this.changeTimer,60000);
|
this.timer=setInterval(this.changeTimer,60000);
|
||||||
this.testStart=true;
|
this.testStart=true;
|
||||||
}else{
|
}else{
|
||||||
let paper= {items:res.result};
|
this.$message.error('加载试卷内容失败,请与管理员联系,试卷是否已删除');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
let paper= JSON.parse(this.info.paperContent);
|
||||||
paper.items.forEach(item=>{
|
paper.items.forEach(item=>{
|
||||||
|
//console.log(item);
|
||||||
if(item.type==101){
|
if(item.type==101){
|
||||||
item.userAnswer='';
|
item.userAnswer='';
|
||||||
}else if(item.type==102){
|
}else if(item.type==102){
|
||||||
@@ -354,6 +360,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.total=paper.items.length;
|
this.total=paper.items.length;
|
||||||
this.paper =paper;
|
this.paper =paper;
|
||||||
|
//console.log(this.paper);
|
||||||
|
|
||||||
this.curItem=paper.items[this.curIndex];
|
this.curItem=paper.items[this.curIndex];
|
||||||
this.startTime=new Date();//记录开始时间
|
this.startTime=new Date();//记录开始时间
|
||||||
@@ -361,52 +368,6 @@ export default {
|
|||||||
this.timer=setInterval(this.changeTimer,60000);
|
this.timer=setInterval(this.changeTimer,60000);
|
||||||
this.testStart=true;
|
this.testStart=true;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
this.$message.error('加载试卷内容失败,请与管理员联系,试卷是否已删除');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// if(this.info.paperType==2){
|
|
||||||
// apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{
|
|
||||||
// if(rs.status=200){
|
|
||||||
// this.examPaper.json=JSON.parse(rs.result);
|
|
||||||
// //console.log(this.examPaper.json,'this.examPaper.json');
|
|
||||||
// let qitems=this.convertToItems(this.examPaper.json);
|
|
||||||
// this.paper ={items:qitems};
|
|
||||||
// this.total=qitems.length;
|
|
||||||
// this.curItem=qitems[this.curIndex];
|
|
||||||
// this.startTime=new Date();//记录开始时间
|
|
||||||
// this.timerValue=this.info.testDuration;
|
|
||||||
// this.timer=setInterval(this.changeTimer,60000);
|
|
||||||
// this.testStart=true;
|
|
||||||
// }else{
|
|
||||||
// this.$message.error('加载试卷内容失败,请与管理员联系,试卷是否已删除');
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }else{
|
|
||||||
// let paper= JSON.parse(this.info.paperContent);
|
|
||||||
// paper.items.forEach(item=>{
|
|
||||||
// //console.log(item);
|
|
||||||
// if(item.type==101){
|
|
||||||
// item.userAnswer='';
|
|
||||||
// }else if(item.type==102){
|
|
||||||
// item.userAnswer=[];
|
|
||||||
// }else{
|
|
||||||
// item.userAnswer=''
|
|
||||||
// }
|
|
||||||
// item.options.forEach(opt=>{
|
|
||||||
// opt.checked=false;
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// this.total=paper.items.length;
|
|
||||||
// this.paper =paper;
|
|
||||||
// //console.log(this.paper);
|
|
||||||
|
|
||||||
// this.curItem=paper.items[this.curIndex];
|
|
||||||
// this.startTime=new Date();//记录开始时间
|
|
||||||
// this.timerValue=this.info.testDuration;
|
|
||||||
// this.timer=setInterval(this.changeTimer,60000);
|
|
||||||
// this.testStart=true;
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
chooseOption(opt){
|
chooseOption(opt){
|
||||||
if(this.curItem.type==101 || this.curItem.type==103){
|
if(this.curItem.type==101 || this.curItem.type==103){
|
||||||
@@ -571,7 +532,7 @@ export default {
|
|||||||
randomMode:this.info.randomMode,
|
randomMode:this.info.randomMode,
|
||||||
score:testScore,
|
score:testScore,
|
||||||
paperJson:JSON.stringify(this.paper),//原来是对象,这里要也要对象
|
paperJson:JSON.stringify(this.paper),//原来是对象,这里要也要对象
|
||||||
startTime:formatDate(this.startTime),//此时间需要格式化,格式化时间可以放在util中
|
//startTime:formatDate(this.startTime),//此时间需要格式化,格式化时间可以放在util中
|
||||||
//endTime:formatDate(now),
|
//endTime:formatDate(now),
|
||||||
}
|
}
|
||||||
//计划考试的时长
|
//计划考试的时长
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.homework-div {
|
.homework-div {
|
||||||
border: 1px solid #dadada;
|
border: 1px solid #dadada;
|
||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -232,5 +232,5 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -401,28 +401,6 @@
|
|||||||
<el-form-item label="考试说明">
|
<el-form-item label="考试说明">
|
||||||
<el-input type="textarea" show-word-limit v-model="exam.info.info" placeholder="关于考试的说明(限255字以内)" maxlength="255"></el-input>
|
<el-input type="textarea" show-word-limit v-model="exam.info.info" placeholder="关于考试的说明(限255字以内)" maxlength="255"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="随机模式">
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-radio-group v-model="exam.info.randomMode">
|
|
||||||
<el-radio :label="true">是</el-radio>
|
|
||||||
<el-radio :label="false">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20" v-if="exam.info.randomMode&&exam.info.paperType==1">
|
|
||||||
<el-form-item label="数量">
|
|
||||||
<el-input-number v-model="exam.info.qnum" :min="1" :max="exam.paperJson.items.length" label="数量"></el-input-number>
|
|
||||||
<span style="margin-left:10px;" v-if="exam.paperJson.items.length==0">先添加试题</span>
|
|
||||||
<span style="margin-left:10px;" v-if="exam.paperJson.items.length>0">试卷有 {{exam.paperJson.items.length}} 道试题</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20" v-if="exam.info.randomMode&&exam.info.paperType==2">
|
|
||||||
<el-form-item label="数量">
|
|
||||||
<el-input-number v-model="exam.info.qnum" :min="1" :max="usePaper.counts" label="数量"></el-input-number>
|
|
||||||
<span style="margin-left:10px;" v-if="usePaper.counts==0">先选择试卷</span>
|
|
||||||
<span style="margin-left:10px;" v-if="usePaper.counts>0">试卷有 {{usePaper.counts}} 道试题</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="exam.info.paperType==1">
|
<div v-if="exam.info.paperType==1">
|
||||||
@@ -1081,14 +1059,12 @@
|
|||||||
if(this.exam.info.paperType==2){
|
if(this.exam.info.paperType==2){
|
||||||
if(!this.exam.info.paperId){
|
if(!this.exam.info.paperId){
|
||||||
this.$message.error("您还未选择任何试卷");
|
this.$message.error("您还未选择任何试卷");
|
||||||
this.loading=false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//检查是不是所有的试题都有了答案
|
//检查是不是所有的试题都有了答案
|
||||||
if(this.exam.paperJson.items.length==0){
|
if(this.exam.paperJson.items.length==0){
|
||||||
this.$message.error("您还没有添加考试的试题");
|
this.$message.error("您还没有添加考试的试题");
|
||||||
this.loading=false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let pass=true;
|
let pass=true;
|
||||||
@@ -1111,9 +1087,6 @@
|
|||||||
}
|
}
|
||||||
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
||||||
}
|
}
|
||||||
if(!this.exam.info.randomMode){
|
|
||||||
this.exam.info.qnum = 0
|
|
||||||
}
|
|
||||||
postData.exam=this.exam.info;
|
postData.exam=this.exam.info;
|
||||||
postData.content.contentName='考试';
|
postData.content.contentName='考试';
|
||||||
this.examChange = deepClone(this.exam);
|
this.examChange = deepClone(this.exam);
|
||||||
@@ -1179,8 +1152,6 @@
|
|||||||
postData.id=this.exam.content.id;
|
postData.id=this.exam.content.id;
|
||||||
postData.ctype=this.exam.content.contentType;
|
postData.ctype=this.exam.content.contentType;
|
||||||
curContent=this.exam.content;
|
curContent=this.exam.content;
|
||||||
this.exam.info.randomMode = false;
|
|
||||||
this.exam.info.qnum = 0
|
|
||||||
}else if(index==4){
|
}else if(index==4){
|
||||||
postData.id=this.assess.content.id;
|
postData.id=this.assess.content.id;
|
||||||
postData.ctype=this.assess.content.contentType;
|
postData.ctype=this.assess.content.contentType;
|
||||||
|
|||||||
@@ -217,16 +217,13 @@ export default {
|
|||||||
if(delIdx>-1){
|
if(delIdx>-1){
|
||||||
fileList.splice(delIdx,1);
|
fileList.splice(delIdx,1);
|
||||||
}
|
}
|
||||||
this.$emit("success", res);
|
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
if(this.limit == 1){
|
//this.fileList = [];
|
||||||
this.fileList = [];
|
|
||||||
}
|
|
||||||
this.$message({message:"上传失败",type:'error',offset:100});
|
this.$message({message:"上传失败",type:'error',offset:100});
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.$emit("success", res);
|
this.$emit("success", res);
|
||||||
},
|
},
|
||||||
// 删除文件
|
// 删除文件
|
||||||
handleDelete(index) {
|
handleDelete(index) {
|
||||||
|
|||||||
@@ -51,7 +51,8 @@
|
|||||||
<el-dropdown placement="bottom" @command="handleContributor">
|
<el-dropdown placement="bottom" @command="handleContributor">
|
||||||
<span class="el-dropdown-link" style="font-size:16px;cursor: pointer;" :style="{color:textColor}">贡献者大会</span>
|
<span class="el-dropdown-link" style="font-size:16px;cursor: pointer;" :style="{color:textColor}">贡献者大会</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="one">2023</el-dropdown-item>
|
<el-dropdown-item command="three">2024</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="one" divided>2023</el-dropdown-item>
|
||||||
<el-dropdown-item command="two" divided>2022</el-dropdown-item>
|
<el-dropdown-item command="two" divided>2022</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -209,7 +210,7 @@ export default {
|
|||||||
this.sex = this.userInfo.sex;
|
this.sex = this.userInfo.sex;
|
||||||
this.$store.dispatch('refrashMsg');
|
this.$store.dispatch('refrashMsg');
|
||||||
this.loadBoeData();
|
this.loadBoeData();
|
||||||
// console.log('this.userInfo::',this.userInfo)
|
console.log('this.userInfo::',this.userInfo)
|
||||||
//this.loadPopupConfig();
|
//this.loadPopupConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -246,6 +247,7 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
one: urlPre + "/web/contributornew/index",
|
one: urlPre + "/web/contributornew/index",
|
||||||
two: urlPre + "/web/contributor/index",
|
two: urlPre + "/web/contributor/index",
|
||||||
|
three: urlPre + "/web/contributor_2024/index"
|
||||||
};
|
};
|
||||||
window.open(obj[val]);
|
window.open(obj[val]);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
</el-table-column>-->
|
</el-table-column>-->
|
||||||
<el-table-column label="学习人员" width="110">
|
<el-table-column label="学习人员" width="110">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="info" @click="getCatalogue(scope.row,scope.row.contentType)" >学习人员</el-button>
|
<el-button size="mini" type="info" @click="getCatalogue(scope.row,scope.row.contentName)" >学习人员</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -292,7 +292,6 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="studyContentRecordsSearch">搜索</el-button>
|
<el-button type="primary" @click="studyContentRecordsSearch">搜索</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button v-if="isHomeWork" :disabled="isTrue" style="padding:10px 15px;margin-bottom: 10px;" type="primary" @click="downLoad">导出全部作业</el-button>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table max-height="500" border :data="learningSituation.list" style="width: 100%">
|
<el-table max-height="500" border :data="learningSituation.list" style="width: 100%">
|
||||||
<el-table-column prop="aname" label="姓名" width="180"></el-table-column>
|
<el-table-column prop="aname" label="姓名" width="180"></el-table-column>
|
||||||
@@ -336,8 +335,6 @@ import apiCoursePortal from "@/api/modules/coursePortal.js";
|
|||||||
import { mapGetters,mapActions } from 'vuex';
|
import { mapGetters,mapActions } from 'vuex';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
import apiStudy from '@/api/modules/courseStudy.js';
|
import apiStudy from '@/api/modules/courseStudy.js';
|
||||||
import { getToken } from '@/utils/token'
|
|
||||||
import axios from 'axios'
|
|
||||||
export default {
|
export default {
|
||||||
components: {auditCourse1,auditCourse2},
|
components: {auditCourse1,auditCourse2},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -355,10 +352,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
downParams: {},
|
|
||||||
typePress: false,
|
typePress: false,
|
||||||
isHomeWork: false,
|
|
||||||
isTrue: false,
|
|
||||||
catalogRecordTree:[],
|
catalogRecordTree:[],
|
||||||
catalogRecordList:[],
|
catalogRecordList:[],
|
||||||
resOwnerListMap:[],
|
resOwnerListMap:[],
|
||||||
@@ -383,8 +377,8 @@ export default {
|
|||||||
count: 0,
|
count: 0,
|
||||||
type: "",
|
type: "",
|
||||||
list: [],
|
list: [],
|
||||||
status: '',
|
|
||||||
name: '',
|
name: '',
|
||||||
|
status: '',
|
||||||
},
|
},
|
||||||
learningRecords: {
|
learningRecords: {
|
||||||
pageIndex: 1, //第几页
|
pageIndex: 1, //第几页
|
||||||
@@ -521,7 +515,6 @@ export default {
|
|||||||
pageIndex: this.learningSituation.pageIndex,
|
pageIndex: this.learningSituation.pageIndex,
|
||||||
pageSize: this.learningSituation.pageSize
|
pageSize: this.learningSituation.pageSize
|
||||||
};
|
};
|
||||||
this.downParams = params;
|
|
||||||
apicourseStudy.studyContentRecords(params).then(res => {
|
apicourseStudy.studyContentRecords(params).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.learningSituation.list = res.result.list;
|
this.learningSituation.list = res.result.list;
|
||||||
@@ -531,77 +524,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
downLoad(){
|
|
||||||
if(this.learningSituation.list.length == 0){
|
|
||||||
this.$message.warning('暂无数据');
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.isTrue = true;
|
|
||||||
let params = {
|
|
||||||
courseName:this.manageStudyData.name,
|
|
||||||
courseId: this.manageStudyData.id,
|
|
||||||
status: this.downParams.status || '',
|
|
||||||
name: this.downParams.name || '',
|
|
||||||
contentId: this.contentId,
|
|
||||||
}
|
|
||||||
// window.open(`/systemapi/xboe/m/course/portal/export?contentId=${params.contentId}&courseName=${params.courseName}&courseId=${params.courseId}&status=${params.status}&name=${params.name}`)
|
|
||||||
const url = `/systemapi/xboe/m/course/portal/export?contentId=${params.contentId}&courseName=${params.courseName}&courseId=${params.courseId}&status=${params.status}&name=${params.name}`
|
|
||||||
axios({
|
|
||||||
method: 'get',
|
|
||||||
url: url,
|
|
||||||
// responseType: 'blob',
|
|
||||||
headers: { 'X-Access-Token': getToken() }
|
|
||||||
}).then((res) => {
|
|
||||||
this.isTrue = false;
|
|
||||||
if(res.data.status == 200){
|
|
||||||
if(res.data.result.includes('upload')){
|
|
||||||
window.open('/upload'+res.data.result.split('upload')[1])
|
|
||||||
}else{
|
|
||||||
this.$message.warning(res.data.result)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
|
||||||
this.isTrue = false;
|
|
||||||
this.$message.error(err.response.data.message)
|
|
||||||
})
|
|
||||||
// axios({
|
|
||||||
// method: 'get',
|
|
||||||
// url: url,
|
|
||||||
// responseType: 'blob',
|
|
||||||
// headers: { 'X-Access-Token': getToken() }
|
|
||||||
// }).then((response) => {
|
|
||||||
// if (response.status === 200) {
|
|
||||||
// this.isTrue = false;
|
|
||||||
// if (!(response.headers['content-type']).startsWith('application/json')) {
|
|
||||||
// this.resolveBlob(response, 'application/zip', `${params.courseName}【作业】`);
|
|
||||||
// } else {
|
|
||||||
// console.log(response,'response')
|
|
||||||
// const reader = new FileReader();
|
|
||||||
// reader.onload = (e) => {
|
|
||||||
// const errorData = JSON.parse(e.target.result)
|
|
||||||
// this.$message.error(errorData.result)
|
|
||||||
// };
|
|
||||||
// reader.readAsText(response.data);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }).catch((error) => {
|
|
||||||
// this.isTrue = false;
|
|
||||||
// // 错误处理
|
|
||||||
// console.log(error);
|
|
||||||
// this.$message.error(error.data ? error.data.message : error.toString());
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
resolveBlob(res, mimeType,filename) {
|
|
||||||
const link = document.createElement('a');// 创建a标签
|
|
||||||
let blob = new Blob([res.data], { type: mimeType }); // 设置文件类型
|
|
||||||
link.style.display = "none";
|
|
||||||
link.href = URL.createObjectURL(blob); // 创建URL
|
|
||||||
link.setAttribute("download", `${filename}`);
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
URL.revokeObjectURL(link.href);
|
|
||||||
document.body.removeChild(link);
|
|
||||||
},
|
|
||||||
handleSizeChangeSituation(val) {
|
handleSizeChangeSituation(val) {
|
||||||
this.learningSituation.pageSize = val;
|
this.learningSituation.pageSize = val;
|
||||||
this.learningSituation.pageIndex = 1;
|
this.learningSituation.pageIndex = 1;
|
||||||
@@ -800,16 +722,11 @@ export default {
|
|||||||
this.getSignupList();
|
this.getSignupList();
|
||||||
},
|
},
|
||||||
getCatalogue(row,type) {
|
getCatalogue(row,type) {
|
||||||
if(type==61){
|
if(type=='考试'){
|
||||||
this.typePress = true
|
this.typePress = true
|
||||||
}else{
|
}else{
|
||||||
this.typePress = true
|
this.typePress = true
|
||||||
}
|
}
|
||||||
if(type == 60){
|
|
||||||
this.isHomeWork = true
|
|
||||||
}else{
|
|
||||||
this.isHomeWork = false
|
|
||||||
}
|
|
||||||
this.contentId = row.id;
|
this.contentId = row.id;
|
||||||
this.study.catalogueShow = true;
|
this.study.catalogueShow = true;
|
||||||
this.learningSituation.pageIndex = 1;//重置为第一页
|
this.learningSituation.pageIndex = 1;//重置为第一页
|
||||||
|
|||||||
@@ -40,12 +40,12 @@
|
|||||||
:isPlaying="isPlaying"
|
:isPlaying="isPlaying"
|
||||||
:biBarrageXml="biBarrageXml"
|
:biBarrageXml="biBarrageXml"
|
||||||
/>
|
/>
|
||||||
<!-- 加载动画(应该当前视频没有缓存时显示加载动画) && isCrowd && isShowPlayer -->
|
<!-- 加载动画 -->
|
||||||
<div v-show="isShowLoading" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
<div v-show="isShowLoading && isCrowd && isShowPlayer" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
||||||
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 控制栏 -->
|
<!-- 控制栏 -->
|
||||||
<div v-show="isCrowd" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
|
<div v-show="!isShowLoading && isCrowd" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
|
||||||
<div v-show="isShowVolumeHint" class="player-volumeHint">
|
<div v-show="isShowVolumeHint" class="player-volumeHint">
|
||||||
<span class="player-volumeHint-text">当前音量:{{volumePercent}}%</span>
|
<span class="player-volumeHint-text">当前音量:{{volumePercent}}%</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,7 +71,6 @@
|
|||||||
<div :class="{'player-controls': true, 'cursor-lasting-static': isCursorStatic}">
|
<div :class="{'player-controls': true, 'cursor-lasting-static': isCursorStatic}">
|
||||||
<div class="player-progress-bar">
|
<div class="player-progress-bar">
|
||||||
<progressBar
|
<progressBar
|
||||||
:blobId="blobId"
|
|
||||||
:currentProgress="currentProgress"
|
:currentProgress="currentProgress"
|
||||||
v-on:updateProgress="updateProgressByClickBar"
|
v-on:updateProgress="updateProgressByClickBar"
|
||||||
v-on:getMouseDownStatus="getMouseDownStatusOfProgressBar"
|
v-on:getMouseDownStatus="getMouseDownStatusOfProgressBar"
|
||||||
@@ -242,11 +241,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
// 视频链接对应的content Id
|
|
||||||
blobId: {
|
|
||||||
type: String,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
// 主题色
|
// 主题色
|
||||||
primaryColor: {
|
primaryColor: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -318,17 +312,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
//console.log('this.currentProgress::',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.duration)
|
|
||||||
// 视频播放时本地记录视频实时播放时长,视频设置了禁止拖动时执行
|
|
||||||
if(!this.isDrag){
|
|
||||||
var time = localStorage.getItem('videoProgressData')
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
if(arr[this.blobId] < this.currentProgress || !arr[this.blobId]){
|
|
||||||
arr[this.blobId] = parseFloat((this.currentProgress).toFixed(8))
|
|
||||||
if(arr[this.blobId]) localStorage.setItem('videoProgressData',JSON.stringify(arr))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 定时更新进度条
|
// 定时更新进度条
|
||||||
if (this.isPlaying && !this.isMousedownProgress) {
|
if (this.isPlaying && !this.isMousedownProgress) {
|
||||||
this.currentProgress =
|
this.currentProgress =
|
||||||
@@ -373,17 +356,6 @@ export default {
|
|||||||
this.isCursorStatic = false;
|
this.isCursorStatic = false;
|
||||||
this.timeoutControlsHint = 2000;
|
this.timeoutControlsHint = 2000;
|
||||||
});
|
});
|
||||||
this.videoDom.addEventListener('loadstart', function(){
|
|
||||||
console.log('\x1b[34m%s\x1b[0m','*****************视频加载中**************')
|
|
||||||
})
|
|
||||||
|
|
||||||
this.videoDom.addEventListener('loadeddata', function(){
|
|
||||||
console.log('\x1b[32m%s\x1b[0m','*****************加载完毕*************')
|
|
||||||
})
|
|
||||||
|
|
||||||
this.videoDom.addEventListener('error', function(){
|
|
||||||
console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
|
||||||
})
|
|
||||||
// 监听全屏事件的变化,保存数据
|
// 监听全屏事件的变化,保存数据
|
||||||
window.addEventListener("fullscreenchange", () => {
|
window.addEventListener("fullscreenchange", () => {
|
||||||
this.isFullscreen = this.isFullScreen();
|
this.isFullscreen = this.isFullScreen();
|
||||||
@@ -393,13 +365,11 @@ export default {
|
|||||||
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
||||||
onWaiting(){
|
onWaiting(){
|
||||||
console.log('触发了onWairing');
|
console.log('触发了onWairing');
|
||||||
this.isShowLoading = true
|
|
||||||
this.$emit('onPlayerPause', {})
|
this.$emit('onPlayerPause', {})
|
||||||
},
|
},
|
||||||
//当音频/视频在已因缓冲而暂停或停止后已就绪时
|
//当音频/视频在已因缓冲而暂停或停止后已就绪时
|
||||||
onPlaying(){
|
onPlaying(){
|
||||||
console.log('触发缓存结束onPlaying');
|
console.log('触发缓存结束onPlaying');
|
||||||
this.isShowLoading = false
|
|
||||||
if(this.videoDom.paused){
|
if(this.videoDom.paused){
|
||||||
this.$emit('onPlayerPause', {})
|
this.$emit('onPlayerPause', {})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ export default {
|
|||||||
isDrag:{
|
isDrag:{
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
|
||||||
blobId:{
|
|
||||||
type: String,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -60,12 +57,10 @@ export default {
|
|||||||
window.addEventListener("mousemove", (e) => {
|
window.addEventListener("mousemove", (e) => {
|
||||||
if (this.is_mousedown_progress) {
|
if (this.is_mousedown_progress) {
|
||||||
this.move(e);
|
this.move(e);
|
||||||
e.preventDefault();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.addEventListener("mouseup", (e) => {
|
window.addEventListener("mouseup", (e) => {
|
||||||
this.up(e);
|
this.up(e);
|
||||||
e.preventDefault();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -73,7 +68,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
down(e) {
|
down(e) {
|
||||||
// if(this.isDrag) {
|
if(this.isDrag) {
|
||||||
this.$emit("getMouseDownStatus", true);
|
this.$emit("getMouseDownStatus", true);
|
||||||
this.is_mousedown_progress = true;
|
this.is_mousedown_progress = true;
|
||||||
// 获取完整进度条的clientX(dom左上角)
|
// 获取完整进度条的clientX(dom左上角)
|
||||||
@@ -81,50 +76,30 @@ export default {
|
|||||||
// 计算调整后的当前进度条的长度
|
// 计算调整后的当前进度条的长度
|
||||||
this.current_width_px = e.clientX - init_clientX;
|
this.current_width_px = e.clientX - init_clientX;
|
||||||
// 设置当前的播放进度(同时作用于当前进度条的样式)
|
// 设置当前的播放进度(同时作用于当前进度条的样式)
|
||||||
let current = (e.clientX - init_clientX) / this.dom_full.clientWidth;
|
let current =
|
||||||
if(current>1) current = 1;
|
(e.clientX - init_clientX) / this.dom_full.clientWidth;
|
||||||
if(current<0) current = 0;
|
|
||||||
var time = localStorage.getItem('videoProgressData');
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
//console.log('down arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
|
|
||||||
// 禁止拖动
|
|
||||||
if(!this.isDrag && time && arr[this.blobId] < current) return;
|
|
||||||
|
|
||||||
this.$emit("updateProgress", current);
|
this.$emit("updateProgress", current);
|
||||||
// }
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
move(e) {
|
move(e) {
|
||||||
if (this.is_mousedown_progress) {
|
if (this.is_mousedown_progress && this.isDrag) {
|
||||||
let init_clientX = this.dom_full.getBoundingClientRect().left;
|
let init_clientX = this.dom_full.getBoundingClientRect().left;
|
||||||
this.current_width_px = e.clientX - init_clientX;
|
this.current_width_px = e.clientX - init_clientX;
|
||||||
let current = (e.clientX - init_clientX) / this.dom_full.clientWidth;
|
let current =
|
||||||
if(current>1) current = 1;
|
(e.clientX - init_clientX) / this.dom_full.clientWidth;
|
||||||
if(current<0) current = 0;
|
|
||||||
var time = localStorage.getItem('videoProgressData');
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
//console.log('move arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
|
|
||||||
// 禁止拖动
|
|
||||||
if(!this.isDrag && time && arr[this.blobId] < current) return;
|
|
||||||
this.$emit("updateProgress", current);
|
this.$emit("updateProgress", current);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
up() {
|
up() {
|
||||||
if (this.is_mousedown_progress) {
|
if (this.is_mousedown_progress && this.isDrag) {
|
||||||
// 标记鼠标不处于按下的状态了
|
// 标记鼠标不处于按下的状态了
|
||||||
this.is_mousedown_progress = false;
|
this.is_mousedown_progress = false;
|
||||||
// 松开鼠标后,即调整进度条后,此时的进度(0-1)
|
// 松开鼠标后,即调整进度条后,此时的进度(0-1)
|
||||||
let current = this.current_width_px / this.dom_full.clientWidth;
|
let current =
|
||||||
if(current>1) current = 1;
|
this.current_width_px / this.dom_full.clientWidth;
|
||||||
if(current<0) current = 0;
|
|
||||||
var time = localStorage.getItem('videoProgressData');
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
//console.log('up arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
|
|
||||||
this.$emit("getMouseDownStatus", false);
|
|
||||||
// 禁止拖动
|
|
||||||
if(!this.isDrag && time && arr[this.blobId] < current) return;
|
|
||||||
this.$emit("updateProgress", current);
|
this.$emit("updateProgress", current);
|
||||||
|
this.$emit("getMouseDownStatus", false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -423,7 +423,6 @@ export function translate(field) {
|
|||||||
let name = '';
|
let name = '';
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case 'total':name = '累计'; break;
|
case 'total':name = '累计'; break;
|
||||||
case 'now':name = '当前'; break;
|
|
||||||
case 'weeks':name = '本周'; break;
|
case 'weeks':name = '本周'; break;
|
||||||
case 'months':name = '本月'; break;
|
case 'months':name = '本月'; break;
|
||||||
case 'years':name = '本年'; break;
|
case 'years':name = '本年'; break;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<li v-if="testPaper.deadlineTime">结束时间: {{ testPaper.deadlineTime }}</li>
|
<li v-if="testPaper.deadlineTime">结束时间: {{ testPaper.deadlineTime }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="testPaper.testFront && testPaper.testFront != 'null'" style="padding: 20px;text-align: center;" v-html="testPaper.testFront">
|
<div v-if="testPaper.testFront" style="padding: 20px;text-align: center;" v-html="testPaper.testFront">
|
||||||
<!--考前说明-->
|
<!--考前说明-->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="canExam" class="test-time" style="margin-top:20px" >
|
<div v-if="canExam" class="test-time" style="margin-top:20px" >
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
imgData:[
|
imgData:[
|
||||||
{img:'01',url:'1265897142383042560'},
|
{img:'01',url:'1265897142383042560'},
|
||||||
{img:'02',url:'1265697724606210048'},
|
{img:'02',url:'1265697724606210048'},
|
||||||
{img:'003',url:'1280185851054231552'},
|
{img:'03',url:''},
|
||||||
{img:'4',url:''},
|
{img:'04',url:'1321778585966247936'},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ export default {
|
|||||||
timedOut = true;
|
timedOut = true;
|
||||||
xmlhttp.abort();
|
xmlhttp.abort();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true);
|
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn", true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
xmlhttp.onreadystatechange = function () {
|
xmlhttp.onreadystatechange = function () {
|
||||||
if (xmlhttp.readyState == 4) {
|
if (xmlhttp.readyState == 4) {
|
||||||
|
|||||||
@@ -370,15 +370,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(r.content==''){
|
|
||||||
apiCourseFile.detail(r.contentRefId).then(cfrs=>{
|
|
||||||
if(cfrs.status==200){
|
|
||||||
r.content=cfrs.result.previewFilePath;
|
|
||||||
}else{
|
|
||||||
$this.$message.error('加载pdf课件文件失败');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.contentData = r;
|
this.contentData = r;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image>
|
<course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="resType == 10" style="position: relative;">
|
<div v-if="resType == 10" style="position: relative;">
|
||||||
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" @progress="progress" :src="blobUrl" :blobId="blobId" @onPlayerPlaying="onPlayerPlaying"
|
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" @progress="progress" :src="blobUrl" @onPlayerPlaying="onPlayerPlaying"
|
||||||
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
|
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
|
||||||
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
|
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
|
||||||
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd" @onTimeUpdate="handleAudioTimeUpdate"></videoPlayer>
|
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd" @onTimeUpdate="handleAudioTimeUpdate"></videoPlayer>
|
||||||
@@ -501,7 +501,7 @@
|
|||||||
}
|
}
|
||||||
treeList.push(treeNode);
|
treeList.push(treeNode);
|
||||||
});
|
});
|
||||||
// console.log(treeList,'treeList')
|
console.log(treeList,'treeList')
|
||||||
return treeList;
|
return treeList;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -652,8 +652,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
|
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
|
||||||
}
|
}
|
||||||
// console.log('this.contentData.id:',this.contentData.id)
|
|
||||||
this.blobId = this.contentData.id
|
|
||||||
//console.log(this.blobUrl,'this.blobUrl');
|
//console.log(this.blobUrl,'this.blobUrl');
|
||||||
},
|
},
|
||||||
widthOpen(url) {
|
widthOpen(url) {
|
||||||
@@ -816,28 +814,6 @@
|
|||||||
$this.controlHeight=h-95;
|
$this.controlHeight=h-95;
|
||||||
//console.log(h,$this.controlHeight,'$this.controlHeight');
|
//console.log(h,$this.controlHeight,'$this.controlHeight');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
//console.log('this.contentData11:',this.contentData,this.curriculumData)
|
|
||||||
// 视频设置禁用处理逻辑,如果用户已全部观看完该视频,则设置为能全部拖动的逻辑,把isDrag设置为true即可,同时删除本地存储的数据
|
|
||||||
if(this.contentData.progressVideo ===1){
|
|
||||||
var obj = JSON.parse(this.contentData.content)
|
|
||||||
obj.isDrag = true
|
|
||||||
this.contentData.content = JSON.stringify(obj)
|
|
||||||
this.curriculumData.isDrag = true
|
|
||||||
var time = localStorage.getItem('videoProgressData')
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
//alert(con.progressVideo+'--'+con.id + '--'+JSON.stringify(arr))
|
|
||||||
delete arr[this.contentData.id];
|
|
||||||
localStorage.setItem('videoProgressData',JSON.stringify(arr))
|
|
||||||
}
|
|
||||||
if(this.contentData.progressVideo>0 && this.contentData.progressVideo !==1){
|
|
||||||
var time = localStorage.getItem('videoProgressData')
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
arr[this.contentData.id] = this.contentData.progressVideo
|
|
||||||
localStorage.setItem('videoProgressData',JSON.stringify(arr))
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
isShowTime(){
|
isShowTime(){
|
||||||
if(this.isContentTypeTwo != this.contentData.contentType){
|
if(this.isContentTypeTwo != this.contentData.contentType){
|
||||||
@@ -1229,16 +1205,6 @@
|
|||||||
itemId: this.contentData.studyItemId,
|
itemId: this.contentData.studyItemId,
|
||||||
videoTime: intTime
|
videoTime: intTime
|
||||||
};
|
};
|
||||||
//console.log('this.courseInfo:',this.contentData)
|
|
||||||
if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){
|
|
||||||
var time = localStorage.getItem('videoProgressData')
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
if(arr[this.blobId] && this.contentData.progressVideo<arr[this.blobId]) {
|
|
||||||
postData.progressVideo = arr[this.blobId]
|
|
||||||
postData.contentId = this.contentData.id
|
|
||||||
postData.courseId = this.contentData.courseId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//console.log('记录播放时间')
|
//console.log('记录播放时间')
|
||||||
apiStudy.studyVideoTime(postData).then(rs => {
|
apiStudy.studyVideoTime(postData).then(rs => {
|
||||||
if (rs.status != 200) {
|
if (rs.status != 200) {
|
||||||
@@ -1281,16 +1247,6 @@
|
|||||||
itemId: this.contentData.studyItemId,
|
itemId: this.contentData.studyItemId,
|
||||||
videoTime: intTime
|
videoTime: intTime
|
||||||
};
|
};
|
||||||
//console.log('this.courseInfo:',this.contentData)
|
|
||||||
if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){
|
|
||||||
var time = localStorage.getItem('videoProgressData')
|
|
||||||
var arr = time&&JSON.parse(time) || {}
|
|
||||||
if(arr[this.blobId] && this.contentData.progressVideo<arr[this.blobId]) {
|
|
||||||
postData.progressVideo = arr[this.blobId]
|
|
||||||
postData.contentId = this.contentData.id
|
|
||||||
postData.courseId = this.contentData.courseId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//console.log('记录播放时间')
|
//console.log('记录播放时间')
|
||||||
apiStudy.studyVideoTime(postData).then(rs => {
|
apiStudy.studyVideoTime(postData).then(rs => {
|
||||||
if (rs.status != 200) {
|
if (rs.status != 200) {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||||
<el-dropdown-item command="now">当前</el-dropdown-item>
|
|
||||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||||
@@ -33,10 +32,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="myselftext">
|
<div class="myselftext">
|
||||||
<div class="myranking">
|
<div class="myranking">
|
||||||
{{isNow ? '当前' : '累计'}}排名 : <span> {{currentUserRankingTotalData.rankNo}}</span>
|
当前排名 : <span> {{currentUserRankingTotalData.rankNo}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="myexperience">
|
<div class="myexperience">
|
||||||
{{isNow ? '当前' : '累计'}}经验值 : <span>{{currentUserRankingTotalData.rankValue}}</span>
|
累计经验值 : <span>{{currentUserRankingTotalData.rankValue}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -117,7 +116,6 @@
|
|||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||||
<el-dropdown-item command="now">当前</el-dropdown-item>
|
|
||||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||||
@@ -127,10 +125,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="myselftext">
|
<div class="myselftext">
|
||||||
<div class="myranking">
|
<div class="myranking">
|
||||||
{{isStudyTime ? '当前' : '累计'}}排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
当前排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="myexperience">
|
<div class="myexperience">
|
||||||
{{isStudyTime ? '当前' : '累计'}}学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
|
累计学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="exp-table" style="margin-top:20px;">
|
<div class="exp-table" style="margin-top:20px;">
|
||||||
@@ -206,7 +204,6 @@
|
|||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="total">累计</el-dropdown-item>
|
<el-dropdown-item command="total">累计</el-dropdown-item>
|
||||||
<!-- <el-dropdown-item command="now">当前</el-dropdown-item> -->
|
|
||||||
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
<!-- <el-dropdown-item command="weeks">本周</el-dropdown-item>
|
||||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||||
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
<el-dropdown-item command="years">本年</el-dropdown-item> -->
|
||||||
@@ -216,10 +213,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="myselftext">
|
<div class="myselftext">
|
||||||
<div class="myranking">
|
<div class="myranking">
|
||||||
{{isStudyDay ? '当前' : '累计'}}排名 : <span> {{learningDaysTotalData.rankNo}}</span>
|
当前排名 : <span> {{learningDaysTotalData.rankNo}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="myexperience">
|
<div class="myexperience">
|
||||||
{{isStudyDay ? '当前' : '累计'}}学习天数 : <span>{{learningDaysTotalData.rankValue}}</span>
|
累计学习天数 : <span>{{learningDaysTotalData.rankValue}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="exp-table" style="margin-top:20px;">
|
<div class="exp-table" style="margin-top:20px;">
|
||||||
@@ -286,11 +283,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import apiUser from "@/api/system/user.js";
|
import apiUser from "@/api/system/user.js";
|
||||||
import apiStat from '@/api/phase2/stat.js';
|
import apiStat from '@/api/phase2/stat.js';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import authorImg from '@/components/Portal/authorImg.vue';
|
import authorImg from '@/components/Portal/authorImg.vue';
|
||||||
import {translate,experienceValue,formatSecondToHour,cutOrgNamePath} from "@/utils/tools.js";
|
import {translate,experienceValue,formatSecondToHour,cutOrgNamePath} from "@/utils/tools.js";
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
@@ -310,8 +307,8 @@ export default {
|
|||||||
translate,
|
translate,
|
||||||
formatSecondToHour:formatSecondToHour,
|
formatSecondToHour:formatSecondToHour,
|
||||||
experience:{
|
experience:{
|
||||||
field:'now',
|
field:'total',
|
||||||
name:'当前',
|
name:'累计',
|
||||||
data:{
|
data:{
|
||||||
rankingNo:0,
|
rankingNo:0,
|
||||||
total:0
|
total:0
|
||||||
@@ -319,8 +316,8 @@ export default {
|
|||||||
list:[],
|
list:[],
|
||||||
},
|
},
|
||||||
learningDuration:{
|
learningDuration:{
|
||||||
field:'now',
|
field:'total',
|
||||||
name:'当前',
|
name:'累计',
|
||||||
data:{
|
data:{
|
||||||
rankingNo:0,
|
rankingNo:0,
|
||||||
total:0
|
total:0
|
||||||
@@ -343,10 +340,7 @@ export default {
|
|||||||
total:0
|
total:0
|
||||||
},
|
},
|
||||||
list:[],
|
list:[],
|
||||||
},
|
}
|
||||||
isNow: false,
|
|
||||||
isStudyTime: false,
|
|
||||||
isStudyDay: false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -358,21 +352,18 @@ export default {
|
|||||||
|
|
||||||
// 经验值排行榜(下拉框事件)
|
// 经验值排行榜(下拉框事件)
|
||||||
experienceCommand(e) {
|
experienceCommand(e) {
|
||||||
this.isNow = false
|
|
||||||
this.experience.field = e;
|
this.experience.field = e;
|
||||||
this.experience.name = this.translate(e)
|
this.experience.name = this.translate(e)
|
||||||
this.getExperience();
|
this.getExperience();
|
||||||
},
|
},
|
||||||
// 学习时长(下拉框事件)
|
// 学习时长(下拉框事件)
|
||||||
durationCommand(e) {
|
durationCommand(e) {
|
||||||
this.isStudyTime = false
|
|
||||||
this.learningDuration.field = e;
|
this.learningDuration.field = e;
|
||||||
this.learningDuration.name = this.translate(e)
|
this.learningDuration.name = this.translate(e)
|
||||||
this.getDuration();
|
this.getDuration();
|
||||||
},
|
},
|
||||||
// 学习天数(下拉框事件)
|
// 学习天数(下拉框事件)
|
||||||
daysCommand(e) {
|
daysCommand(e) {
|
||||||
this.isStudyDay = false
|
|
||||||
this.learningDays.field = e;
|
this.learningDays.field = e;
|
||||||
this.learningDays.name = this.translate(e)
|
this.learningDays.name = this.translate(e)
|
||||||
this.getDays();
|
this.getDays();
|
||||||
@@ -380,15 +371,9 @@ export default {
|
|||||||
getExperience() {//经验值
|
getExperience() {//经验值
|
||||||
let data = {
|
let data = {
|
||||||
aid:this.userInfo.aid,// #用户id
|
aid:this.userInfo.aid,// #用户id
|
||||||
statType:21, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||||
field:this.experience.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
field:this.experience.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||||
num:10,// #显示的条数
|
num:5,// #显示的条数
|
||||||
}
|
|
||||||
if(data.field == 'now'){
|
|
||||||
data.statType = 20
|
|
||||||
data.field = 'total'
|
|
||||||
this.experience.field = 'total'
|
|
||||||
this.isNow = true
|
|
||||||
}
|
}
|
||||||
apiStat.getRanking(data).then(res=>{
|
apiStat.getRanking(data).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
@@ -421,41 +406,17 @@ export default {
|
|||||||
sex: null
|
sex: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.getUserData(ids,res.result.rankingData)
|
this.getUserData(ids,res.result.rankingData)
|
||||||
const noReapetIds = [...new Set(ids)];
|
this.experience.list = res.result.rankingData;
|
||||||
apiUser.getByIds(noReapetIds).then(rs => {
|
|
||||||
if (rs.status == 200) {
|
|
||||||
const listData = []
|
|
||||||
rs.result.forEach((item, index) => {
|
|
||||||
res.result.rankingData.forEach(author => {
|
|
||||||
if (author.aid == item.aid) {
|
|
||||||
author.authorInfo = item;
|
|
||||||
listData.push(author)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.experience.list = listData.sort((a,b)=>{
|
|
||||||
return b.total-a.total
|
|
||||||
}).slice(0,5);
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDuration() {//学习时长
|
getDuration() {//学习时长
|
||||||
let data = {
|
let data = {
|
||||||
aid:this.userInfo.aid,// #用户id
|
aid:this.userInfo.aid,// #用户id
|
||||||
statType:12, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||||
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||||
num:10,// #显示的条数
|
num:5,// #显示的条数
|
||||||
}
|
|
||||||
if(data.field == 'now'){
|
|
||||||
data.statType = 10
|
|
||||||
data.field = 'total'
|
|
||||||
this.learningDuration.field = 'total'
|
|
||||||
this.isStudyTime = true
|
|
||||||
}
|
}
|
||||||
apiStat.getRanking(data).then(res=>{
|
apiStat.getRanking(data).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
@@ -487,26 +448,8 @@ export default {
|
|||||||
sex: null
|
sex: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.getUserData(ids,res.result.rankingData)
|
this.getUserData(ids,res.result.rankingData)
|
||||||
const noReapetIds = [...new Set(ids)];
|
this.learningDuration.list = res.result.rankingData;
|
||||||
apiUser.getByIds(noReapetIds).then(rs => {
|
|
||||||
if (rs.status == 200) {
|
|
||||||
const listData = []
|
|
||||||
rs.result.forEach((item, index) => {
|
|
||||||
res.result.rankingData.forEach(author => {
|
|
||||||
if (author.aid == item.aid) {
|
|
||||||
author.authorInfo = item;
|
|
||||||
listData.push(author)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.learningDuration.list = listData.sort((a,b)=>{
|
|
||||||
return b.total-a.total
|
|
||||||
}).slice(0,5);
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -516,13 +459,7 @@ export default {
|
|||||||
aid:this.userInfo.aid,// #用户id
|
aid:this.userInfo.aid,// #用户id
|
||||||
statType:11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
statType:11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||||
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||||
num:10,// #显示的条数
|
num:5,// #显示的条数
|
||||||
}
|
|
||||||
if(data.field == 'now'){
|
|
||||||
data.statType = 13
|
|
||||||
data.field = 'total'
|
|
||||||
this.learningDays.field = 'total'
|
|
||||||
this.isStudyDay = true
|
|
||||||
}
|
}
|
||||||
apiStat.getRanking(data).then(res=>{
|
apiStat.getRanking(data).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
@@ -553,26 +490,8 @@ export default {
|
|||||||
sex: null
|
sex: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.getUserData(ids,res.result.rankingData)
|
this.getUserData(ids,res.result.rankingData)
|
||||||
const noReapetIds = [...new Set(ids)];
|
this.learningDays.list = res.result.rankingData;
|
||||||
apiUser.getByIds(noReapetIds).then(rs => {
|
|
||||||
if (rs.status == 200) {
|
|
||||||
const listData = []
|
|
||||||
rs.result.forEach((item, index) => {
|
|
||||||
res.result.rankingData.forEach(author => {
|
|
||||||
if (author.aid == item.aid) {
|
|
||||||
author.authorInfo = item;
|
|
||||||
listData.push(author)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.learningDays.list = listData.sort((a,b)=>{
|
|
||||||
return b.total-a.total
|
|
||||||
}).slice(0,5);
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -595,29 +514,29 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
//只是控制布局
|
//只是控制布局
|
||||||
.page-ranking{
|
.page-ranking{
|
||||||
padding:15px 18px;
|
padding:15px 18px;
|
||||||
display:flex;
|
display:flex;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
::v-deep .el-dropdown-menu__item:not(.is-disabled):hover{
|
::v-deep .el-dropdown-menu__item:not(.is-disabled):hover{
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
color: #0059FF !important;
|
color: #0059FF !important;
|
||||||
}
|
}
|
||||||
::v-deep.el-dropdown-menu {
|
::v-deep.el-dropdown-menu {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
.page-ranking-col{
|
.page-ranking-col{
|
||||||
min-width: 430px;
|
min-width: 430px;
|
||||||
//padding-right:30px;
|
//padding-right:30px;
|
||||||
padding-right: 5%;
|
padding-right: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.omit{
|
.omit{
|
||||||
padding-left: 13px;
|
padding-left: 13px;
|
||||||
@@ -654,8 +573,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.myselftext{
|
.myselftext{
|
||||||
height: 75px;
|
height: 75px;
|
||||||
padding: 0 25px;
|
padding: 0 25px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -686,7 +605,7 @@ export default {
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tab-jy{
|
.tab-jy{
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user