mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 23:06:45 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal into online
This commit is contained in:
@@ -41,15 +41,25 @@ const pulish = function(id, publish) {
|
|||||||
if (!publish) {
|
if (!publish) {
|
||||||
flag = publish;
|
flag = publish;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ajax.post('/xboe/m/exam/test/publish?id=' + id + '&publish=' + flag);
|
return ajax.post('/xboe/m/exam/test/publish?id=' + id + '&publish=' + flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@parma{
|
||||||
|
* testId 考试id
|
||||||
|
*}
|
||||||
|
*/
|
||||||
|
const exports=function (query){
|
||||||
|
return ajax.post('/xboe/m/exam/alone/answer/export',query,{responseType: 'blob'});
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
detail,
|
detail,
|
||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
save,
|
save,
|
||||||
querylist,
|
querylist,
|
||||||
pulish
|
pulish,
|
||||||
|
exports
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,11 +37,11 @@
|
|||||||
<div class="course-author">
|
<div class="course-author">
|
||||||
<div class="course-author-left" > </div>
|
<div class="course-author-left" > </div>
|
||||||
<div style="flex:1; text-align: center; ">
|
<div style="flex:1; text-align: center; ">
|
||||||
<span class="study-num">2324人学习</span>
|
<span class="study-num">2581人学习</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left:15px">
|
<div style="padding-left:15px">
|
||||||
<div >
|
<div >
|
||||||
<span class="course-score-value">5</span>
|
<span class="course-score-value">5.0</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -695,12 +695,12 @@ export default {
|
|||||||
margin-bottom:8px;
|
margin-bottom:8px;
|
||||||
}
|
}
|
||||||
.case-text{
|
.case-text{
|
||||||
height: 57px;
|
height: 56px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
// line-height: 18px;
|
// line-height: 18px;
|
||||||
margin-bottom:8px;
|
margin-bottom:8px;
|
||||||
}
|
}
|
||||||
::v-deep .case-inter{
|
::v-deep .case-inter{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -130,11 +130,15 @@
|
|||||||
// cmtask_status:this.cmtask_status,
|
// cmtask_status:this.cmtask_status,
|
||||||
// cmtask_name:this.cmtask_name,
|
// cmtask_name:this.cmtask_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.total = res.result.count
|
this.total = res.result.count
|
||||||
this.couresList = res.result.list;
|
this.couresList = res.result.list;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(res.result.count > 0) {
|
if(res.result.count > 0) {
|
||||||
this.$router.push('/uc/study/task')
|
this.$router.push('/uc/study/task')
|
||||||
} else {
|
} else {
|
||||||
@@ -147,8 +151,10 @@
|
|||||||
}else{
|
}else{
|
||||||
this.$router.push('/uc/study/courses')
|
this.$router.push('/uc/study/courses')
|
||||||
}
|
}
|
||||||
// this.pageData.list = res.result.list;
|
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
|
if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$router.push('/uc/study/courses');
|
this.$router.push('/uc/study/courses');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -470,6 +470,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="padding: 0px 5px">
|
<div style="padding: 0px 5px">
|
||||||
<el-button icon="el-icon-search" type="primary" @click="getResults()">搜索</el-button>
|
<el-button icon="el-icon-search" type="primary" @click="getResults()">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-download" type="primary" @click="exportsList()">导出成绩</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -500,7 +501,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成绩" prop="score">
|
<el-table-column label="成绩" prop="score">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.score }}
|
{{ toScoreTow(scope.row.score) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px">
|
<el-table-column label="操作" width="150px">
|
||||||
@@ -665,6 +666,7 @@ import { mapGetters,mapActions} from 'vuex';
|
|||||||
import {examType,numberToLetter} from '@/utils/tools.js';
|
import {examType,numberToLetter} from '@/utils/tools.js';
|
||||||
import usergroupApi from "@/api/modules/usergroup";
|
import usergroupApi from "@/api/modules/usergroup";
|
||||||
import pushRecordApi from "@/api/modules/pushRecord";
|
import pushRecordApi from "@/api/modules/pushRecord";
|
||||||
|
import {toScoreTow} from '@/utils/tools.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'articleItems',
|
name: 'articleItems',
|
||||||
computed: {
|
computed: {
|
||||||
@@ -672,6 +674,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
toScoreTow,
|
||||||
qnum:0,//这里默认是30吧
|
qnum:0,//这里默认是30吧
|
||||||
examDateTime:[],
|
examDateTime:[],
|
||||||
answerData:{
|
answerData:{
|
||||||
@@ -753,6 +756,25 @@ export default {
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
exportsList(){
|
||||||
|
if(this.answerData.data.length == 0){
|
||||||
|
return this.$message.warning('暂无导出数据!')
|
||||||
|
}
|
||||||
|
apiTest.exports({testId: this.answerData.row.id}).then(res=>{
|
||||||
|
if(res.status){
|
||||||
|
this.$message.error(res.message)
|
||||||
|
} else {
|
||||||
|
const link = document.createElement('a');// 创建a标签
|
||||||
|
let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型
|
||||||
|
link.style.display = "none";
|
||||||
|
link.href = URL.createObjectURL(blob); // 创建URL
|
||||||
|
link.setAttribute("download", "成绩.xls");
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
changePaper(e) {
|
changePaper(e) {
|
||||||
this.questDirOptions.forEach(item=>{
|
this.questDirOptions.forEach(item=>{
|
||||||
if(item.id == e) {
|
if(item.id == e) {
|
||||||
@@ -1181,6 +1203,10 @@ export default {
|
|||||||
this.answerData.count = res.result.count;
|
this.answerData.count = res.result.count;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
//导入考试成绩
|
||||||
|
exportAnswers(){
|
||||||
|
|
||||||
},
|
},
|
||||||
handleSizeAnswerChange(val){
|
handleSizeAnswerChange(val){
|
||||||
this.answerData.pageSize = val
|
this.answerData.pageSize = val
|
||||||
|
|||||||
@@ -75,10 +75,10 @@
|
|||||||
<div>{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)</div>
|
<div>{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="question-option">
|
<div class="question-option">
|
||||||
<el-radio v-model="question.userAnswer" :label="true">正确</el-radio>
|
<el-radio v-model="question.userAnswer" label="true">正确</el-radio>
|
||||||
</div>
|
</div>
|
||||||
<div class="question-option">
|
<div class="question-option">
|
||||||
<el-radio v-model="question.userAnswer" :label="false">错误</el-radio>
|
<el-radio v-model="question.userAnswer" label="false">错误</el-radio>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -349,24 +349,25 @@ export default {
|
|||||||
answer.push(key);
|
answer.push(key);
|
||||||
paperJson.forEach((item,index) => {
|
paperJson.forEach((item,index) => {
|
||||||
item.result=true;
|
item.result=true;
|
||||||
if(item.id == key) {
|
if(item.id == key) {
|
||||||
if(item.type==1){
|
if(item.type==1){
|
||||||
item.userAnswer='';
|
item.userAnswer='';
|
||||||
}else if(item.type==2){
|
}else if(item.type==2){
|
||||||
item.userAnswer=[];
|
item.userAnswer=[];
|
||||||
}else{
|
}else{
|
||||||
item.userAnswer=''
|
item.userAnswer=''
|
||||||
}
|
}
|
||||||
item.correctOptIdxs=[];
|
|
||||||
item.userOptIdxs=[];
|
item.correctOptIdxs=[];
|
||||||
if(item.type==1){
|
item.userOptIdxs=[];
|
||||||
item.userAnswer=answerJson[key];
|
if(item.type==1){
|
||||||
}else if(item.type==2){
|
item.userAnswer=answerJson[key];
|
||||||
item.userAnswer.push(...answerJson[key].split(','));
|
}else if(item.type==2){
|
||||||
}else{
|
item.userAnswer.push(...answerJson[key].split(','));
|
||||||
item.userAnswer=answerJson[key]
|
}else{
|
||||||
}
|
item.userAnswer=answerJson[key]
|
||||||
data.push(item);
|
}
|
||||||
|
data.push(item);
|
||||||
// item.userAnswer.push(answerJson[key]);
|
// item.userAnswer.push(answerJson[key]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -579,7 +580,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let str1=item.userAnswer.join();
|
let str1=item.userAnswer.join();
|
||||||
let str2=tempAnswer.join();
|
let str2=tempAnswer.join();
|
||||||
|
|
||||||
if(str1==str2){
|
if(str1==str2){
|
||||||
console.log('str1='+str1);
|
console.log('str1='+str1);
|
||||||
console.log('str2='+str2);
|
console.log('str2='+str2);
|
||||||
@@ -605,10 +606,12 @@ export default {
|
|||||||
}else if(qitem.type==2){ //多选
|
}else if(qitem.type==2){ //多选
|
||||||
qitem.userAnswer=avalue.split(',');
|
qitem.userAnswer=avalue.split(',');
|
||||||
}else if(qitem.type==3){ //判断
|
}else if(qitem.type==3){ //判断
|
||||||
qitem.userAnswer=avalue=='true'? true:false;
|
qitem.userAnswer=avalue;
|
||||||
|
//console.log(avalue,'avalue');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//console.log(this.paperQuestion,'this.paperQuestion')
|
||||||
this.arrangeQuestion();
|
this.arrangeQuestion();
|
||||||
this.splitQuestionType();
|
this.splitQuestionType();
|
||||||
//进入考试阶段
|
//进入考试阶段
|
||||||
@@ -726,10 +729,9 @@ export default {
|
|||||||
if(this.judge.length > 0){
|
if(this.judge.length > 0){
|
||||||
this.judge.forEach(item => {
|
this.judge.forEach(item => {
|
||||||
let judgeUserAnswer = "";
|
let judgeUserAnswer = "";
|
||||||
if(String(item.userAnswer) && item.userAnswer != null){
|
//if(String(item.userAnswer) && item.userAnswer != null){
|
||||||
|
|
||||||
judgeUserAnswer = item.userAnswer + "";
|
judgeUserAnswer = item.userAnswer + "";
|
||||||
}
|
//}
|
||||||
answer[item.id] = judgeUserAnswer;
|
answer[item.id] = judgeUserAnswer;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,6 +546,24 @@ export default {
|
|||||||
if(!this.paper.testName) {
|
if(!this.paper.testName) {
|
||||||
return this.$message.warning('请您完善基本信息必填项!')
|
return this.$message.warning('请您完善基本信息必填项!')
|
||||||
}
|
}
|
||||||
|
//检查是否有重复的试卷
|
||||||
|
let qidMap=new Map();
|
||||||
|
let hasItem=null;
|
||||||
|
this.paper.data.some(qitem=>{
|
||||||
|
if(qidMap.has(qitem.id)){
|
||||||
|
hasItem=qitem;
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
qidMap.set(qitem.id,qitem.id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(hasItem!=null){
|
||||||
|
console.log(hasItem);
|
||||||
|
this.$message.error('选择的试题重复:'+hasItem.title)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.paper.resOwner1 = this.resOwner[0];
|
this.paper.resOwner1 = this.resOwner[0];
|
||||||
this.paper.resOwner2 = this.resOwner[1];
|
this.paper.resOwner2 = this.resOwner[1];
|
||||||
this.paper.resOwner3 = this.resOwner[2];
|
this.paper.resOwner3 = this.resOwner[2];
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="cor-praises" v-if="cinfo.source == 1"><interactBar :type="1" :data="cinfo" :comments="false" :praises="false" :shares="false" :views="false"></interactBar> </div>
|
<div class="cor-praises" v-if="cinfo.source == 2"><interactBar :type="1" :data="cinfo" :comments="false" :praises="false" :shares="false" :views="false"></interactBar> </div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user