mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
提交修改
This commit is contained in:
@@ -32,8 +32,8 @@ const update = function(data) {
|
|||||||
}
|
}
|
||||||
/* 编辑详情 */
|
/* 编辑详情 */
|
||||||
const detail = function(id) {
|
const detail = function(id) {
|
||||||
return ajax.get('/xboe/m/exam/paper/query?id=' + id);
|
return ajax.get('/xboe/m/exam/paper/query?id=' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 试卷批量导入计算
|
/* 试卷批量导入计算
|
||||||
* num 数目
|
* num 数目
|
||||||
|
|||||||
@@ -277,8 +277,8 @@
|
|||||||
<el-tab-pane label="考试" name="exam">
|
<el-tab-pane label="考试" name="exam">
|
||||||
<div v-if="exam.show==1">
|
<div v-if="exam.show==1">
|
||||||
<div style="padding: 10px; text-align: center;">
|
<div style="padding: 10px; text-align: center;">
|
||||||
<el-button @click="changeExamShow(3)" type="primary" >自定义考试</el-button>
|
<el-button @click="openCusExam()" type="primary" >自定义考试</el-button>
|
||||||
<!-- <el-button @click="changeExamShow(2)" type="primary" size="small">选择已有考试</el-button> -->
|
<el-button @click="openChoosePaper()" type="primary">选择已有考试</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="exam.show==2">
|
<div v-if="exam.show==2">
|
||||||
@@ -289,37 +289,39 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div><el-input maxlength="50" placeholder="名称"></el-input></div>
|
<div><el-input v-model="usePaper.keyword" maxlength="50" placeholder="名称"></el-input></div>
|
||||||
<div><el-input maxlength="50" placeholder="创建人"></el-input></div>
|
<div style="padding-left: 10px;"><el-button @click="findExamPapers()" type="primary" >查询</el-button></div>
|
||||||
<div style="padding-left: 10px;"><el-button type="primary" >搜索已有考试</el-button></div>
|
<div style="padding-left: 10px;"><el-button @click="changeExamShow(1)" type="danger" >返回</el-button></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="text-align: center;padding-top: 10px;">
|
<div style="text-align: center;padding-top: 10px; overflow-y: auto;">
|
||||||
<el-table style="100%" :data="hasCWare.list" border stripe>
|
<el-table style="100%" height="480" :data="usePaper.list" border stripe>
|
||||||
<el-table-column label="考试名称" prop="author"><template>考试名称</template></el-table-column>
|
<el-table-column prop="testName" label="考试名称"></el-table-column>
|
||||||
<el-table-column label="创建时间" prop="author">
|
<el-table-column prop="sysCreateTime" label="创建时间"></el-table-column>
|
||||||
|
<el-table-column prop="sysCreateBy" label="创建人" width="80px" ></el-table-column>
|
||||||
|
<el-table-column label="选择" width="60px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
2022-02-03
|
<el-button size="mini" @click="chooseExamPaper(scope.row)" type="primary" >选择</el-button>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="创建人" prop="content">
|
|
||||||
<template>
|
|
||||||
XXX
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="选择" width="80px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button @click="changeExamShow(9)" type="primary" >选择</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页功能-->
|
<!--分页功能-->
|
||||||
|
<div v-if="usePaper.total >10" style="text-align: center; margin-top:10px">
|
||||||
|
<el-pagination background
|
||||||
|
@current-change="changePaperPage"
|
||||||
|
:current-page="usePaper.pageIndex"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="usePaper.pageSize"
|
||||||
|
layout="total,pager"
|
||||||
|
:total="usePaper.total"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="exam.show==3">
|
<div v-if="exam.show==3">
|
||||||
<div style="display: flex;justify-content: space-between;padding:5px 10px;line-height: 30px; border-bottom: 1px solid #e7e7e7;">
|
<div style="display: flex;justify-content: space-between;padding:5px 10px;line-height: 30px; border-bottom: 1px solid #e7e7e7;">
|
||||||
<div>自定义考试</div>
|
<div>{{exam.paperType==1? '自定义考试':'使用独立考试试卷'}} </div>
|
||||||
<div>
|
<div>
|
||||||
<el-checkbox v-model="exam.onlyQuestion">只显示试题</el-checkbox>
|
<el-checkbox v-model="exam.onlyQuestion">只显示试题</el-checkbox>
|
||||||
<el-button :loading="loading" style="margin-left: 10px;" @click="saveContent(3)" type="primary" > 保 存 </el-button>
|
<el-button :loading="loading" style="margin-left: 10px;" @click="saveContent(3)" type="primary" > 保 存 </el-button>
|
||||||
@@ -401,9 +403,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-if="exam.info.paperType==1">
|
||||||
<simplePaper :data="exam.paperJson"></simplePaper>
|
<simplePaper :data="exam.paperJson"></simplePaper>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="exam.info.paperType==2">
|
||||||
|
<div style="font-size: 20px;padding: 10px;" >试卷: {{usePaper.paperName}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="exam.show==9">
|
<div v-if="exam.show==9">
|
||||||
@@ -541,6 +546,7 @@
|
|||||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||||
|
import apiExamPaper from '../../api/modules/paper.js';
|
||||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||||
import {getType} from '../../utils/tools.js';
|
import {getType} from '../../utils/tools.js';
|
||||||
import { deepClone } from "../../utils";
|
import { deepClone } from "../../utils";
|
||||||
@@ -685,6 +691,16 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
usePaper:{ //使用考试试卷
|
||||||
|
pageIndex:1,
|
||||||
|
pageSize:10,
|
||||||
|
total:0,
|
||||||
|
list:[],
|
||||||
|
keyword:'',
|
||||||
|
paperId:'',//选择的试卷的id
|
||||||
|
paperName:'',//选择的试卷的名称
|
||||||
|
paperJson:{items:[]},
|
||||||
|
},
|
||||||
exam:{
|
exam:{
|
||||||
show:1,
|
show:1,
|
||||||
content:{id:'',contentType:61,sortIndex:3},
|
content:{id:'',contentType:61,sortIndex:3},
|
||||||
@@ -711,7 +727,6 @@
|
|||||||
paperId:'',//试卷的id,只有paperType为2的时间才会有值
|
paperId:'',//试卷的id,只有paperType为2的时间才会有值
|
||||||
info:'',//考试说明
|
info:'',//考试说明
|
||||||
paperContent:'',//试题的json字符串
|
paperContent:'',//试题的json字符串
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
assess:{
|
assess:{
|
||||||
@@ -1242,15 +1257,74 @@
|
|||||||
changeHomeworkShow(idx){
|
changeHomeworkShow(idx){
|
||||||
this.homework.show=idx;
|
this.homework.show=idx;
|
||||||
},
|
},
|
||||||
changeExamShow(idx){
|
|
||||||
|
|
||||||
this.exam.show=idx;
|
|
||||||
},
|
|
||||||
assessmentHandle(){
|
assessmentHandle(){
|
||||||
this.assess.show=2;
|
this.assess.show=2;
|
||||||
|
},
|
||||||
|
changeExamShow(idx){
|
||||||
|
this.exam.show=idx;
|
||||||
|
},
|
||||||
|
openCusExam(){ //自定义考试
|
||||||
|
this.exam.show=3;
|
||||||
|
this.exam.paperType=1;
|
||||||
|
this.exam.paperId='';
|
||||||
|
this.usePaper.pageIndex=1;
|
||||||
|
this.usePaper.keyword="";
|
||||||
|
},
|
||||||
|
openChoosePaper(){
|
||||||
|
this.exam.show=2;
|
||||||
|
this.exam.paperType=3;
|
||||||
|
this.exam.paperId='';
|
||||||
|
},
|
||||||
|
findExamPapers(){ //查询已有的考试试卷
|
||||||
|
this.usePaper.pageIndex=1;
|
||||||
|
this.loadExamPapers();
|
||||||
|
},
|
||||||
|
loadExamPapers(){
|
||||||
|
let pars={
|
||||||
|
pageIndex:this.usePaper.pageIndex,
|
||||||
|
pageSize:this.usePaper.pageSize,
|
||||||
|
keyword:this.usePaper.keyword
|
||||||
}
|
}
|
||||||
|
apiExamPaper.querylist(pars).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
this.usePaper.list=rs.result.list;
|
||||||
|
this.usePaper.total=rs.result.count;
|
||||||
|
}else{
|
||||||
|
this.$message.error('查询可用试卷失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changePaperPage(pindex){
|
||||||
|
this.usePaper.pageIndex=pindex;
|
||||||
|
this.loadExamPapers();
|
||||||
|
},
|
||||||
|
chooseExamPaper(epaper){ //选择试卷后
|
||||||
|
if(epaper.counts==0){
|
||||||
|
this.$message.error('此试卷无试题内容,请重新选择');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.exam.info.paperType=2;// 选择已有试卷
|
||||||
|
this.exam.info.paperId=epaper.id;// 选择已有试卷
|
||||||
|
this.usePaper.paperId=epaper.id;
|
||||||
|
this.usePaper.paperName=epaper.testName;
|
||||||
|
//this.usePaper.paperJson= epaper.paperContent;
|
||||||
|
this.loadExamPaper();
|
||||||
|
this.changeExamShow(3);
|
||||||
|
},
|
||||||
|
loadExamPaper(){
|
||||||
|
if(this.exam.info.paperType!=2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
apiExamPaper.detail(this.exam.info.paperId).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
this.usePaper.paperId=rs.result.id;
|
||||||
|
this.usePaper.paperName=rs.result.testName;
|
||||||
|
//this.usePaper.paperJson= rs.result.paperContent;
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
<div style="padding: 20px;" v-html="contentData.content"></div>
|
<div style="padding: 20px;" v-html="contentData.content"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="resType == 50" style="min-height: 500px;">
|
<div v-if="resType == 50" style="min-height: 500px;">
|
||||||
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" scrolling="no" border="0px" style="width:100%;height:490px;border:0px;overflow:hidden;"></iframe>
|
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" scrolling="no" border="0px" style="width:100%;height:500px;border:0px;overflow:hidden;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="resType == 52">
|
<div v-if="resType == 52">
|
||||||
<div v-if="contentData.content != ''">
|
<div v-if="contentData.content != ''">
|
||||||
|
|||||||
Reference in New Issue
Block a user